@inspark/inspark-components 1.0.43 → 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 -4621
  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 -532
  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 -553
  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 -4171
  229. package/full/fesm2015/inspark-inspark-components.js.map +0 -1
  230. package/full/fesm5/inspark-inspark-components.js +0 -4323
  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,4323 +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
- return _this.groupInfo[key] = { isExpanded: true };
1889
- });
1890
- this.sortByGroup();
1891
- if (this.dt && this.dt.filteredValue) {
1892
- this.sortByGroup(this.dt.filteredValue, this.dt._sortOrder);
1893
- }
1894
- else if (this.dt && this.dt._value && this.dt._sortOrder) {
1895
- this.sortByGroup(this.dt._value, this.dt._sortOrder);
1896
- }
1897
- }
1898
- };
1899
- TableComponent.prototype.isShowGroup = function (key, rowIndex) {
1900
- if (rowIndex === 0) {
1901
- this.groupIndex = {};
1902
- }
1903
- if (!this.groupInfo[key]) {
1904
- this.groupInfo[key] = { isExpanded: this.isGroupedExpanded !== undefined ? this.isGroupedExpanded : true };
1905
- }
1906
- if (!this.groupIndex[key]) {
1907
- this.groupIndex[key] = { rowIndex: rowIndex };
1908
- }
1909
- return this.groupIndex[key].rowIndex === rowIndex;
1910
- };
1911
- TableComponent.prototype.toggleGroup = function (rowIndex, key) {
1912
- this.groupInfo[key].isExpanded = !this.groupInfo[key].isExpanded;
1913
- };
1914
- TableComponent.prototype.clear = function () {
1915
- this.dt.filterGlobal('', 'contains');
1916
- };
1917
- TableComponent.prototype.localSearch = function (dt, searchText) {
1918
- dt.filterGlobal(searchText, 'contains');
1919
- };
1920
- TableComponent.prototype.sortByGroup = function (values, sortOrder) {
1921
- var g = this.groupMode;
1922
- if (values) {
1923
- return values.sort(function (row1, row2) {
1924
- if (typeof (row1.groupOrder[g]) === 'number') {
1925
- return sortOrder * (row1.groupOrder[g] - row2.groupOrder[g]);
1926
- }
1927
- else {
1928
- return sortOrder * row1.groupOrder[g].localeCompare(row2.groupOrder[g], undefined, { numeric: true, sensitivity: 'base' });
1929
- }
1930
- });
1931
- }
1932
- this.values.sort(function (row1, row2) {
1933
- if (typeof (row1.groupOrder[g]) === 'number') {
1934
- return row1.groupOrder[g] - row2.groupOrder[g];
1935
- }
1936
- else {
1937
- return row1.groupOrder[g].localeCompare(row2.groupOrder[g], undefined, { numeric: true, sensitivity: 'base' });
1938
- }
1939
- });
1940
- };
1941
- TableComponent.prototype.countGroup = function (groupKey, g) {
1942
- return this.values.filter(function (_value) { return _value.groupKey[g] === groupKey; }).length;
1943
- };
1944
- TableComponent.prototype.toggleNodes = function (isExpanded) {
1945
- var _this = this;
1946
- var g = this.groupMode;
1947
- this.values.forEach(function (v) {
1948
- if (_this.groupInfo[v.groupKey[g]]) {
1949
- _this.groupInfo[v.groupKey[g]].isExpanded = isExpanded;
1950
- }
1951
- });
1952
- };
1953
- TableComponent.prototype.toggleMode = function (item) {
1954
- this.groupMode = item;
1955
- this.groupInfo = {};
1956
- for (var i = 0; i < this.values.length; i++) {
1957
- this.isShowGroup(this.values[i].groupKey[this.groupMode], i);
1958
- }
1959
- if (this.searchText) {
1960
- this.dt.filterGlobal(this.searchText, 'contains');
1961
- }
1962
- this.sortByGroup();
1963
- };
1964
- var TableComponent_1;
1965
- __decorate([
1966
- Input(),
1967
- __metadata("design:type", Array)
1968
- ], TableComponent.prototype, "columns", void 0);
1969
- __decorate([
1970
- Input(),
1971
- __metadata("design:type", Object)
1972
- ], TableComponent.prototype, "values", void 0);
1973
- __decorate([
1974
- Input(),
1975
- __metadata("design:type", String)
1976
- ], TableComponent.prototype, "scrollHeight", void 0);
1977
- __decorate([
1978
- Input(),
1979
- __metadata("design:type", Boolean)
1980
- ], TableComponent.prototype, "scrollable", void 0);
1981
- __decorate([
1982
- Input(),
1983
- __metadata("design:type", String)
1984
- ], TableComponent.prototype, "selectionMode", void 0);
1985
- __decorate([
1986
- Input(),
1987
- __metadata("design:type", String)
1988
- ], TableComponent.prototype, "label", void 0);
1989
- __decorate([
1990
- Input(),
1991
- __metadata("design:type", String)
1992
- ], TableComponent.prototype, "error", void 0);
1993
- __decorate([
1994
- Input(),
1995
- __metadata("design:type", String)
1996
- ], TableComponent.prototype, "class", void 0);
1997
- __decorate([
1998
- Input(),
1999
- __metadata("design:type", Boolean)
2000
- ], TableComponent.prototype, "required", void 0);
2001
- __decorate([
2002
- Input(),
2003
- __metadata("design:type", Object)
2004
- ], TableComponent.prototype, "style", void 0);
2005
- __decorate([
2006
- Input(),
2007
- __metadata("design:type", Object)
2008
- ], TableComponent.prototype, "toolbar", void 0);
2009
- __decorate([
2010
- Input(),
2011
- __metadata("design:type", Object)
2012
- ], TableComponent.prototype, "checkboxSelection", void 0);
2013
- __decorate([
2014
- Input(),
2015
- __metadata("design:type", Object)
2016
- ], TableComponent.prototype, "active", void 0);
2017
- __decorate([
2018
- Input(),
2019
- __metadata("design:type", Object)
2020
- ], TableComponent.prototype, "sortField", void 0);
2021
- __decorate([
2022
- Input(),
2023
- __metadata("design:type", Object)
2024
- ], TableComponent.prototype, "isAscending", void 0);
2025
- __decorate([
2026
- Input(),
2027
- __metadata("design:type", Object)
2028
- ], TableComponent.prototype, "dataKey", void 0);
2029
- __decorate([
2030
- Input(),
2031
- __metadata("design:type", Object)
2032
- ], TableComponent.prototype, "stateKey", void 0);
2033
- __decorate([
2034
- Input(),
2035
- __metadata("design:type", Boolean)
2036
- ], TableComponent.prototype, "isGrouped", void 0);
2037
- __decorate([
2038
- Input(),
2039
- __metadata("design:type", Boolean)
2040
- ], TableComponent.prototype, "customSort", void 0);
2041
- __decorate([
2042
- Input(),
2043
- __metadata("design:type", Boolean)
2044
- ], TableComponent.prototype, "isGroupedExpanded", void 0);
2045
- __decorate([
2046
- Input(),
2047
- __metadata("design:type", Boolean)
2048
- ], TableComponent.prototype, "showHeader", void 0);
2049
- __decorate([
2050
- Input(),
2051
- __metadata("design:type", Boolean)
2052
- ], TableComponent.prototype, "isMobileView", void 0);
2053
- __decorate([
2054
- Input(),
2055
- __metadata("design:type", Boolean)
2056
- ], TableComponent.prototype, "resizableColumns", void 0);
2057
- __decorate([
2058
- Input(),
2059
- __metadata("design:type", Boolean)
2060
- ], TableComponent.prototype, "isTextSearch", void 0);
2061
- __decorate([
2062
- Input(),
2063
- __metadata("design:type", Boolean)
2064
- ], TableComponent.prototype, "isSortIcon", void 0);
2065
- __decorate([
2066
- Output(),
2067
- __metadata("design:type", Object)
2068
- ], TableComponent.prototype, "activeChange", void 0);
2069
- __decorate([
2070
- ContentChildren(InsparkTemplate),
2071
- __metadata("design:type", QueryList)
2072
- ], TableComponent.prototype, "templates", void 0);
2073
- __decorate([
2074
- Output(),
2075
- __metadata("design:type", EventEmitter)
2076
- ], TableComponent.prototype, "selectionChange", void 0);
2077
- __decorate([
2078
- Output(),
2079
- __metadata("design:type", EventEmitter)
2080
- ], TableComponent.prototype, "addAction", void 0);
2081
- __decorate([
2082
- Output(),
2083
- __metadata("design:type", EventEmitter)
2084
- ], TableComponent.prototype, "csvAction", void 0);
2085
- __decorate([
2086
- Output(),
2087
- __metadata("design:type", EventEmitter)
2088
- ], TableComponent.prototype, "saveAction", void 0);
2089
- __decorate([
2090
- Output(),
2091
- __metadata("design:type", EventEmitter)
2092
- ], TableComponent.prototype, "removeAction", void 0);
2093
- __decorate([
2094
- Output(),
2095
- __metadata("design:type", EventEmitter)
2096
- ], TableComponent.prototype, "unlinkAction", void 0);
2097
- __decorate([
2098
- Output(),
2099
- __metadata("design:type", EventEmitter)
2100
- ], TableComponent.prototype, "linkAction", void 0);
2101
- __decorate([
2102
- Output(),
2103
- __metadata("design:type", EventEmitter)
2104
- ], TableComponent.prototype, "groupEditAction", void 0);
2105
- __decorate([
2106
- Output(),
2107
- __metadata("design:type", EventEmitter)
2108
- ], TableComponent.prototype, "paramsEditAction", void 0);
2109
- __decorate([
2110
- Output(),
2111
- __metadata("design:type", EventEmitter)
2112
- ], TableComponent.prototype, "sortFunction", void 0);
2113
- __decorate([
2114
- Output(),
2115
- __metadata("design:type", EventEmitter)
2116
- ], TableComponent.prototype, "filterFunction", void 0);
2117
- __decorate([
2118
- ViewChild('dt', { static: false }),
2119
- __metadata("design:type", Object)
2120
- ], TableComponent.prototype, "dt", void 0);
2121
- __decorate([
2122
- Input(),
2123
- __metadata("design:type", Object),
2124
- __metadata("design:paramtypes", [Object])
2125
- ], TableComponent.prototype, "selection", null);
2126
- TableComponent = TableComponent_1 = __decorate([
2127
- Component({
2128
- selector: 'in-table',
2129
- 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",
2130
- entryComponents: [],
2131
- providers: [
2132
- DomHandler,
2133
- ObjectUtils,
2134
- TableService,
2135
- {
2136
- provide: Table,
2137
- useFactory: tableFactory,
2138
- deps: [TableComponent_1],
2139
- },
2140
- ],
2141
- 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}"]
2142
- })
2143
- ], TableComponent);
2144
- return TableComponent;
2145
- }());
2146
- var TableComponentModule = /** @class */ (function () {
2147
- function TableComponentModule() {
2148
- }
2149
- TableComponentModule = __decorate([
2150
- NgModule({
2151
- imports: [CommonModule, TableModule, PipesModule, TranslateModule, FormsModule, DropdownModule$1, MultiSelectModule, NgbDropdownModule, CheckboxModule],
2152
- exports: [TableComponent, TableColumnsMultiselectComponent],
2153
- declarations: [TableComponent, TableColumnsMultiselectComponent, TableMenuOverlayComponent, TableClickOutsideDirective]
2154
- })
2155
- ], TableComponentModule);
2156
- return TableComponentModule;
2157
- }());
2158
-
2159
- var EmptyComponent = /** @class */ (function () {
2160
- function EmptyComponent() {
2161
- }
2162
- EmptyComponent = __decorate([
2163
- Component({
2164
- selector: 'in-empty',
2165
- template: "<div class=\"status-text\">\n {{'no_records' | translate}}\n</div>\n",
2166
- styles: [".status-text{font-size:16px;opacity:.8}"]
2167
- })
2168
- ], EmptyComponent);
2169
- return EmptyComponent;
2170
- }());
2171
-
2172
- var PreloaderComponent = /** @class */ (function () {
2173
- function PreloaderComponent() {
2174
- this.inline = false;
2175
- this.overlay = false;
2176
- this.size = 'normal';
2177
- }
2178
- PreloaderComponent.prototype.ngOnInit = function () {
2179
- };
2180
- __decorate([
2181
- Input(),
2182
- __metadata("design:type", Object)
2183
- ], PreloaderComponent.prototype, "inline", void 0);
2184
- __decorate([
2185
- Input(),
2186
- __metadata("design:type", Object)
2187
- ], PreloaderComponent.prototype, "overlay", void 0);
2188
- __decorate([
2189
- Input(),
2190
- __metadata("design:type", String)
2191
- ], PreloaderComponent.prototype, "size", void 0);
2192
- PreloaderComponent = __decorate([
2193
- Component({
2194
- selector: 'in-preloader',
2195
- 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",
2196
- encapsulation: ViewEncapsulation.Emulated,
2197
- 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}"]
2198
- }),
2199
- __metadata("design:paramtypes", [])
2200
- ], PreloaderComponent);
2201
- return PreloaderComponent;
2202
- }());
2203
-
2204
- var InsparkStickyComponent = /** @class */ (function () {
2205
- function InsparkStickyComponent(cdr) {
2206
- var _this = this;
2207
- this.cdr = cdr;
2208
- this.top = 100;
2209
- this.isInline = false;
2210
- this.isFloated = true;
2211
- this.zIndex = 10;
2212
- this.class = '';
2213
- this.isSticky = false;
2214
- this.height = 0;
2215
- this.width = 0;
2216
- this.left = 0;
2217
- this.right = 0;
2218
- this.resize = function () {
2219
- var rect = _this.stickyRef.nativeElement.getBoundingClientRect();
2220
- _this.width = rect.width;
2221
- _this.left = rect.x;
2222
- _this.cdr.detectChanges();
2223
- };
2224
- this.scroll = function () {
2225
- var rect = _this.stickyRef.nativeElement.getBoundingClientRect();
2226
- var isSticky = rect.top < _this.top;
2227
- if (isSticky !== _this.isSticky) {
2228
- _this.height = rect.height;
2229
- _this.isSticky = rect.top < _this.top;
2230
- _this.left = rect.x;
2231
- _this.width = rect.width;
2232
- _this.right = rect.right;
2233
- _this.cdr.detectChanges();
2234
- }
2235
- };
2236
- }
2237
- InsparkStickyComponent.prototype.ngOnInit = function () {
2238
- document.addEventListener('scroll', this.scroll);
2239
- window.addEventListener('resize', this.resize);
2240
- };
2241
- InsparkStickyComponent.prototype.ngOnDestroy = function () {
2242
- document.removeEventListener('scroll', this.scroll);
2243
- window.removeEventListener('resize', this.resize);
2244
- };
2245
- InsparkStickyComponent.ctorParameters = function () { return [
2246
- { type: ChangeDetectorRef }
2247
- ]; };
2248
- __decorate([
2249
- ViewChild('sticky', { static: false }),
2250
- __metadata("design:type", ElementRef)
2251
- ], InsparkStickyComponent.prototype, "stickyRef", void 0);
2252
- __decorate([
2253
- Input(),
2254
- __metadata("design:type", Object)
2255
- ], InsparkStickyComponent.prototype, "top", void 0);
2256
- __decorate([
2257
- Input(),
2258
- __metadata("design:type", Object)
2259
- ], InsparkStickyComponent.prototype, "isInline", void 0);
2260
- __decorate([
2261
- Input(),
2262
- __metadata("design:type", Object)
2263
- ], InsparkStickyComponent.prototype, "isFloated", void 0);
2264
- __decorate([
2265
- Input(),
2266
- __metadata("design:type", Object)
2267
- ], InsparkStickyComponent.prototype, "zIndex", void 0);
2268
- __decorate([
2269
- Input(),
2270
- __metadata("design:type", Object)
2271
- ], InsparkStickyComponent.prototype, "class", void 0);
2272
- InsparkStickyComponent = __decorate([
2273
- Component({
2274
- selector: 'in-sticky',
2275
- 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",
2276
- encapsulation: ViewEncapsulation.Emulated,
2277
- changeDetection: ChangeDetectionStrategy.OnPush,
2278
- styles: [".sticky{position:fixed;display:inline-block}.floated{box-shadow:0 0 4px 2px rgba(0,0,0,.3)}.inline{display:inline-block}"]
2279
- }),
2280
- __metadata("design:paramtypes", [ChangeDetectorRef])
2281
- ], InsparkStickyComponent);
2282
- return InsparkStickyComponent;
2283
- }());
2284
-
2285
- var InsparkHeaderComponent = /** @class */ (function () {
2286
- function InsparkHeaderComponent() {
2287
- this.level = 1;
2288
- this.label = '';
2289
- }
2290
- InsparkHeaderComponent.prototype.ngOnInit = function () {
2291
- this.level = Math.max(Math.min(this.level, 6), 1);
2292
- };
2293
- __decorate([
2294
- Input(),
2295
- __metadata("design:type", Object)
2296
- ], InsparkHeaderComponent.prototype, "level", void 0);
2297
- __decorate([
2298
- Input(),
2299
- __metadata("design:type", Object)
2300
- ], InsparkHeaderComponent.prototype, "label", void 0);
2301
- InsparkHeaderComponent = __decorate([
2302
- Component({
2303
- selector: 'in-header',
2304
- 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",
2305
- encapsulation: ViewEncapsulation.Emulated,
2306
- 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}"]
2307
- }),
2308
- __metadata("design:paramtypes", [])
2309
- ], InsparkHeaderComponent);
2310
- return InsparkHeaderComponent;
2311
- }());
2312
-
2313
- var ToolbarComponent = /** @class */ (function () {
2314
- function ToolbarComponent(element, cdRef, router) {
2315
- this.element = element;
2316
- this.cdRef = cdRef;
2317
- this.router = router;
2318
- this.display = false;
2319
- }
2320
- ToolbarComponent.prototype.ngOnInit = function () {
2321
- };
2322
- ToolbarComponent.prototype.clickedOutsideOverlay = function (event) {
2323
- if (!this.element.nativeElement.contains(event.target)) {
2324
- this.display = false;
2325
- this.cdRef.detectChanges();
2326
- }
2327
- };
2328
- ToolbarComponent.ctorParameters = function () { return [
2329
- { type: ElementRef },
2330
- { type: ChangeDetectorRef },
2331
- { type: Router }
2332
- ]; };
2333
- __decorate([
2334
- Input(),
2335
- __metadata("design:type", String)
2336
- ], ToolbarComponent.prototype, "title", void 0);
2337
- ToolbarComponent = __decorate([
2338
- Component({
2339
- selector: 'in-toolbar',
2340
- 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",
2341
- changeDetection: ChangeDetectionStrategy.OnPush,
2342
- entryComponents: [],
2343
- 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}"]
2344
- }),
2345
- __metadata("design:paramtypes", [ElementRef, ChangeDetectorRef, Router])
2346
- ], ToolbarComponent);
2347
- return ToolbarComponent;
2348
- }());
2349
-
2350
- var BreadcrumbComponent = /** @class */ (function () {
2351
- function BreadcrumbComponent() {
2352
- }
2353
- BreadcrumbComponent.prototype.ngOnInit = function () {
2354
- };
2355
- __decorate([
2356
- Input(),
2357
- __metadata("design:type", Array)
2358
- ], BreadcrumbComponent.prototype, "items", void 0);
2359
- BreadcrumbComponent = __decorate([
2360
- Component({
2361
- selector: 'in-breadcrumb',
2362
- 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",
2363
- changeDetection: ChangeDetectionStrategy.OnPush,
2364
- styles: [""]
2365
- }),
2366
- __metadata("design:paramtypes", [])
2367
- ], BreadcrumbComponent);
2368
- return BreadcrumbComponent;
2369
- }());
2370
-
2371
- var FileComponent = /** @class */ (function () {
2372
- function FileComponent() {
2373
- this.name = null;
2374
- this.label = null;
2375
- this.accept = null;
2376
- this.required = false;
2377
- this.error = null;
2378
- this.onChange = new EventEmitter();
2379
- this.file = null;
2380
- }
2381
- FileComponent.prototype.onClear = function () {
2382
- this.file = null;
2383
- this.onChange.emit(this.file);
2384
- this.el.nativeElement.value = '';
2385
- };
2386
- FileComponent.prototype.onClickChoose = function () {
2387
- this.el.nativeElement.click();
2388
- };
2389
- FileComponent.prototype.onChangeFile = function (e) {
2390
- e.preventDefault();
2391
- if (e.srcElement.files[0]) {
2392
- this.file = e.srcElement.files[0];
2393
- this.onChange.emit(this.file);
2394
- }
2395
- };
2396
- __decorate([
2397
- Input(),
2398
- __metadata("design:type", Object)
2399
- ], FileComponent.prototype, "name", void 0);
2400
- __decorate([
2401
- Input(),
2402
- __metadata("design:type", Object)
2403
- ], FileComponent.prototype, "label", void 0);
2404
- __decorate([
2405
- Input(),
2406
- __metadata("design:type", String)
2407
- ], FileComponent.prototype, "accept", void 0);
2408
- __decorate([
2409
- Input(),
2410
- __metadata("design:type", Object)
2411
- ], FileComponent.prototype, "required", void 0);
2412
- __decorate([
2413
- Input(),
2414
- __metadata("design:type", Object)
2415
- ], FileComponent.prototype, "error", void 0);
2416
- __decorate([
2417
- Output(),
2418
- __metadata("design:type", EventEmitter)
2419
- ], FileComponent.prototype, "onChange", void 0);
2420
- __decorate([
2421
- ViewChild('fileInput', { static: false }),
2422
- __metadata("design:type", ElementRef)
2423
- ], FileComponent.prototype, "el", void 0);
2424
- FileComponent = __decorate([
2425
- Component({
2426
- selector: 'in-file',
2427
- 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",
2428
- styles: [".hide{display:none}"]
2429
- })
2430
- ], FileComponent);
2431
- return FileComponent;
2432
- }());
2433
-
2434
- var SelectButtonComponent = /** @class */ (function () {
2435
- function SelectButtonComponent(cdRef) {
2436
- this.cdRef = cdRef;
2437
- this.name = '';
2438
- this.testId = '';
2439
- this.label = '';
2440
- this.icon = '';
2441
- this.error = '';
2442
- this.iconPos = 'left';
2443
- this.options = [];
2444
- this.required = false;
2445
- this.multiple = false;
2446
- this.focus = new EventEmitter();
2447
- this.blur = new EventEmitter();
2448
- this.click = new EventEmitter();
2449
- this.change = new EventEmitter();
2450
- this.selected = [];
2451
- this.propagateChange = function (_) {
2452
- };
2453
- }
2454
- SelectButtonComponent_1 = SelectButtonComponent;
2455
- SelectButtonComponent.prototype.ngOnInit = function () {
2456
- };
2457
- SelectButtonComponent.prototype.ngOnChanges = function () {
2458
- if (this.initial) {
2459
- this.selected = this.initial;
2460
- }
2461
- else {
2462
- this.selected = [];
2463
- }
2464
- };
2465
- SelectButtonComponent.prototype.clickButton = function (option) {
2466
- var _this = this;
2467
- if (option.readonly) {
2468
- return false;
2469
- }
2470
- if (this.multiple) {
2471
- if (this.selected.indexOf(option.value) !== -1) {
2472
- this.selected = this.selected.filter(function (item) { return item !== option.value; });
2473
- }
2474
- else {
2475
- this.selected.push(option.value);
2476
- }
2477
- this.value = this.options.filter(function (item) { return _this.selected.indexOf(item.value) !== -1; }).map(function (val) { return val.value; });
2478
- }
2479
- else {
2480
- this.selected = [option.value];
2481
- this.value = option.value;
2482
- }
2483
- this.cdRef.detectChanges();
2484
- this.onChange();
2485
- };
2486
- /**
2487
- * Write form value to the DOM element (model => view)
2488
- */
2489
- SelectButtonComponent.prototype.writeValue = function (value) {
2490
- this.value = value;
2491
- if (value !== null && value !== undefined) {
2492
- if (Array.isArray(value)) {
2493
- this.selected = value.map(function (val) { return val; });
2494
- }
2495
- else {
2496
- this.selected = [value];
2497
- }
2498
- }
2499
- this.cdRef.detectChanges();
2500
- };
2501
- /**
2502
- * Write form disabled state to the DOM element (model => view)
2503
- */
2504
- SelectButtonComponent.prototype.setDisabledState = function (isDisabled) {
2505
- this.disabled = isDisabled;
2506
- };
2507
- /**
2508
- * Update form when DOM element value changes (view => model)
2509
- */
2510
- SelectButtonComponent.prototype.registerOnChange = function (fn) {
2511
- // Store the provided function as an internal method.
2512
- this.propagateChange = fn;
2513
- };
2514
- /**
2515
- * Update form when DOM element is blurred (view => model)
2516
- */
2517
- SelectButtonComponent.prototype.registerOnTouched = function (fn) {
2518
- // Store the provided function as an internal method.
2519
- this.onTouched = fn;
2520
- };
2521
- SelectButtonComponent.prototype.onChange = function () {
2522
- this.propagateChange(this.value);
2523
- this.change.emit(this.value);
2524
- };
2525
- SelectButtonComponent.prototype.onTouched = function () {
2526
- };
2527
- var SelectButtonComponent_1;
2528
- SelectButtonComponent.ctorParameters = function () { return [
2529
- { type: ChangeDetectorRef }
2530
- ]; };
2531
- __decorate([
2532
- Input(),
2533
- __metadata("design:type", Object)
2534
- ], SelectButtonComponent.prototype, "name", void 0);
2535
- __decorate([
2536
- Input(),
2537
- __metadata("design:type", Object)
2538
- ], SelectButtonComponent.prototype, "testId", void 0);
2539
- __decorate([
2540
- Input(),
2541
- __metadata("design:type", Object)
2542
- ], SelectButtonComponent.prototype, "label", void 0);
2543
- __decorate([
2544
- Input(),
2545
- __metadata("design:type", Object)
2546
- ], SelectButtonComponent.prototype, "icon", void 0);
2547
- __decorate([
2548
- Input(),
2549
- __metadata("design:type", Object)
2550
- ], SelectButtonComponent.prototype, "error", void 0);
2551
- __decorate([
2552
- Input(),
2553
- __metadata("design:type", String)
2554
- ], SelectButtonComponent.prototype, "iconPos", void 0);
2555
- __decorate([
2556
- Input(),
2557
- __metadata("design:type", Array)
2558
- ], SelectButtonComponent.prototype, "options", void 0);
2559
- __decorate([
2560
- Input(),
2561
- __metadata("design:type", Boolean)
2562
- ], SelectButtonComponent.prototype, "disabled", void 0);
2563
- __decorate([
2564
- Input(),
2565
- __metadata("design:type", Object)
2566
- ], SelectButtonComponent.prototype, "required", void 0);
2567
- __decorate([
2568
- Input(),
2569
- __metadata("design:type", Object)
2570
- ], SelectButtonComponent.prototype, "multiple", void 0);
2571
- __decorate([
2572
- Input(),
2573
- __metadata("design:type", Array)
2574
- ], SelectButtonComponent.prototype, "initial", void 0);
2575
- __decorate([
2576
- Output(),
2577
- __metadata("design:type", EventEmitter)
2578
- ], SelectButtonComponent.prototype, "focus", void 0);
2579
- __decorate([
2580
- Output(),
2581
- __metadata("design:type", EventEmitter)
2582
- ], SelectButtonComponent.prototype, "blur", void 0);
2583
- __decorate([
2584
- Output(),
2585
- __metadata("design:type", EventEmitter)
2586
- ], SelectButtonComponent.prototype, "click", void 0);
2587
- __decorate([
2588
- Output(),
2589
- __metadata("design:type", EventEmitter)
2590
- ], SelectButtonComponent.prototype, "change", void 0);
2591
- SelectButtonComponent = SelectButtonComponent_1 = __decorate([
2592
- Component({
2593
- selector: 'in-select-button',
2594
- 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",
2595
- providers: [
2596
- {
2597
- provide: NG_VALUE_ACCESSOR,
2598
- useExisting: forwardRef(function () { return SelectButtonComponent_1; }),
2599
- multi: true,
2600
- }
2601
- ],
2602
- 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}"]
2603
- }),
2604
- __metadata("design:paramtypes", [ChangeDetectorRef])
2605
- ], SelectButtonComponent);
2606
- return SelectButtonComponent;
2607
- }());
2608
-
2609
- var StatusCircleComponent = /** @class */ (function () {
2610
- function StatusCircleComponent() {
2611
- this.label = '';
2612
- this.title = '';
2613
- this.icon = '';
2614
- this.showLabel = true;
2615
- this.mode = 'success';
2616
- this.size = 'normal';
2617
- this.content = '';
2618
- }
2619
- __decorate([
2620
- Input(),
2621
- __metadata("design:type", Object)
2622
- ], StatusCircleComponent.prototype, "label", void 0);
2623
- __decorate([
2624
- Input(),
2625
- __metadata("design:type", Object)
2626
- ], StatusCircleComponent.prototype, "title", void 0);
2627
- __decorate([
2628
- Input(),
2629
- __metadata("design:type", Object)
2630
- ], StatusCircleComponent.prototype, "icon", void 0);
2631
- __decorate([
2632
- Input(),
2633
- __metadata("design:type", Object)
2634
- ], StatusCircleComponent.prototype, "showLabel", void 0);
2635
- __decorate([
2636
- Input(),
2637
- __metadata("design:type", String)
2638
- ], StatusCircleComponent.prototype, "mode", void 0);
2639
- __decorate([
2640
- Input(),
2641
- __metadata("design:type", String)
2642
- ], StatusCircleComponent.prototype, "size", void 0);
2643
- __decorate([
2644
- Input(),
2645
- __metadata("design:type", Object)
2646
- ], StatusCircleComponent.prototype, "content", void 0);
2647
- StatusCircleComponent = __decorate([
2648
- Component({
2649
- selector: 'in-status-circle',
2650
- 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",
2651
- encapsulation: ViewEncapsulation.Emulated,
2652
- 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}"]
2653
- })
2654
- ], StatusCircleComponent);
2655
- return StatusCircleComponent;
2656
- }());
2657
-
2658
- var SvgComponent = /** @class */ (function (_super) {
2659
- __extends(SvgComponent, _super);
2660
- function SvgComponent() {
2661
- var _this = _super !== null && _super.apply(this, arguments) || this;
2662
- _this.size = 'normal';
2663
- _this.width = '100%';
2664
- _this.height = '100%';
2665
- return _this;
2666
- }
2667
- __decorate([
2668
- Input(),
2669
- __metadata("design:type", String)
2670
- ], SvgComponent.prototype, "size", void 0);
2671
- __decorate([
2672
- Input(),
2673
- __metadata("design:type", Object)
2674
- ], SvgComponent.prototype, "width", void 0);
2675
- __decorate([
2676
- Input(),
2677
- __metadata("design:type", Object)
2678
- ], SvgComponent.prototype, "height", void 0);
2679
- __decorate([
2680
- Input(),
2681
- __metadata("design:type", String)
2682
- ], SvgComponent.prototype, "src", void 0);
2683
- SvgComponent = __decorate([
2684
- Component({
2685
- selector: 'in-svg',
2686
- 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",
2687
- styles: [".svg{display:inline-flex;align-items:center;justify-content:center}.c-icon_svg-small{width:16px;height:16px}:host{display:inline-block}"]
2688
- })
2689
- ], SvgComponent);
2690
- return SvgComponent;
2691
- }(Button));
2692
-
2693
- var SwitcherComponent = /** @class */ (function () {
2694
- function SwitcherComponent(element, cdRef, router) {
2695
- this.element = element;
2696
- this.cdRef = cdRef;
2697
- this.router = router;
2698
- this.name = null;
2699
- this.label = null;
2700
- this.error = null;
2701
- this.iconOff = '';
2702
- this.iconOn = '';
2703
- this.labelOff = 'Off';
2704
- this.labelOn = 'On';
2705
- this.faIconOn = '';
2706
- this.faIconOff = '';
2707
- this.id = null;
2708
- this.change = new EventEmitter();
2709
- this._isBoolean = false;
2710
- this.propagateChange = function (_) {
2711
- };
2712
- }
2713
- SwitcherComponent_1 = SwitcherComponent;
2714
- SwitcherComponent.prototype.ngOnInit = function () {
2715
- this._isBoolean = typeof this.value === 'boolean';
2716
- this.value = typeof this.value === 'string' ? JSON.parse(this.value) : !!this.value;
2717
- };
2718
- SwitcherComponent.prototype.ngOnChanges = function (changes) {
2719
- };
2720
- /**
2721
- * Write form value to the DOM element (model => view)
2722
- */
2723
- SwitcherComponent.prototype.writeValue = function (value) {
2724
- this._isBoolean = typeof value === 'boolean';
2725
- this.value = value;
2726
- this.cdRef.detectChanges();
2727
- };
2728
- /**
2729
- * Write form disabled state to the DOM element (model => view)
2730
- */
2731
- SwitcherComponent.prototype.setDisabledState = function (isDisabled) {
2732
- this.disabled = isDisabled;
2733
- };
2734
- /**
2735
- * Update form when DOM element value changes (view => model)
2736
- */
2737
- SwitcherComponent.prototype.registerOnChange = function (fn) {
2738
- // Store the provided function as an internal method.
2739
- this.propagateChange = fn;
2740
- };
2741
- /**
2742
- * Update form when DOM element is blurred (view => model)
2743
- */
2744
- SwitcherComponent.prototype.registerOnTouched = function (fn) {
2745
- // Store the provided function as an internal method.
2746
- this.onTouched = fn;
2747
- };
2748
- SwitcherComponent.prototype.onChange = function (e) {
2749
- e.stopPropagation();
2750
- e.preventDefault();
2751
- if (this._isBoolean) {
2752
- this.propagateChange(this.value);
2753
- this.change.emit(this.value);
2754
- }
2755
- else {
2756
- this.propagateChange(this.value ? 1 : 0);
2757
- this.change.emit(this.value ? 1 : 0);
2758
- }
2759
- };
2760
- SwitcherComponent.prototype.onTouched = function () {
2761
- };
2762
- var SwitcherComponent_1;
2763
- SwitcherComponent.ctorParameters = function () { return [
2764
- { type: ElementRef },
2765
- { type: ChangeDetectorRef },
2766
- { type: Router }
2767
- ]; };
2768
- __decorate([
2769
- Input(),
2770
- __metadata("design:type", Object)
2771
- ], SwitcherComponent.prototype, "name", void 0);
2772
- __decorate([
2773
- Input(),
2774
- __metadata("design:type", Object)
2775
- ], SwitcherComponent.prototype, "label", void 0);
2776
- __decorate([
2777
- Input(),
2778
- __metadata("design:type", Object)
2779
- ], SwitcherComponent.prototype, "error", void 0);
2780
- __decorate([
2781
- Input(),
2782
- __metadata("design:type", Object)
2783
- ], SwitcherComponent.prototype, "iconOff", void 0);
2784
- __decorate([
2785
- Input(),
2786
- __metadata("design:type", Object)
2787
- ], SwitcherComponent.prototype, "iconOn", void 0);
2788
- __decorate([
2789
- Input(),
2790
- __metadata("design:type", Object)
2791
- ], SwitcherComponent.prototype, "labelOff", void 0);
2792
- __decorate([
2793
- Input(),
2794
- __metadata("design:type", Object)
2795
- ], SwitcherComponent.prototype, "labelOn", void 0);
2796
- __decorate([
2797
- Input(),
2798
- __metadata("design:type", Object)
2799
- ], SwitcherComponent.prototype, "faIconOn", void 0);
2800
- __decorate([
2801
- Input(),
2802
- __metadata("design:type", Object)
2803
- ], SwitcherComponent.prototype, "faIconOff", void 0);
2804
- __decorate([
2805
- Input(),
2806
- __metadata("design:type", Object)
2807
- ], SwitcherComponent.prototype, "id", void 0);
2808
- __decorate([
2809
- Input(),
2810
- __metadata("design:type", Boolean)
2811
- ], SwitcherComponent.prototype, "disabled", void 0);
2812
- __decorate([
2813
- Input(),
2814
- __metadata("design:type", Boolean)
2815
- ], SwitcherComponent.prototype, "waiting", void 0);
2816
- __decorate([
2817
- Output(),
2818
- __metadata("design:type", EventEmitter)
2819
- ], SwitcherComponent.prototype, "change", void 0);
2820
- SwitcherComponent = SwitcherComponent_1 = __decorate([
2821
- Component({
2822
- selector: 'in-switcher',
2823
- 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",
2824
- providers: [
2825
- {
2826
- provide: NG_VALUE_ACCESSOR,
2827
- useExisting: forwardRef(function () { return SwitcherComponent_1; }),
2828
- multi: true,
2829
- }
2830
- ],
2831
- 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}"]
2832
- }),
2833
- __metadata("design:paramtypes", [ElementRef, ChangeDetectorRef, Router])
2834
- ], SwitcherComponent);
2835
- return SwitcherComponent;
2836
- }());
2837
-
2838
- var InlineMessageComponent = /** @class */ (function () {
2839
- function InlineMessageComponent() {
2840
- this.message = '';
2841
- this.align = 'center';
2842
- }
2843
- __decorate([
2844
- Input(),
2845
- __metadata("design:type", Object)
2846
- ], InlineMessageComponent.prototype, "message", void 0);
2847
- __decorate([
2848
- Input(),
2849
- __metadata("design:type", String)
2850
- ], InlineMessageComponent.prototype, "align", void 0);
2851
- InlineMessageComponent = __decorate([
2852
- Component({
2853
- selector: 'in-inline-message',
2854
- template: "<div [ngClass]=\"align\" class=\"message\">\n {{message}}\n <ng-content></ng-content>\n</div>\n",
2855
- styles: [".message{padding:12px 0;text-align:center;color:#aaa}.message.left{text-align:left}.message.right{text-align:right}"]
2856
- })
2857
- ], InlineMessageComponent);
2858
- return InlineMessageComponent;
2859
- }());
2860
-
2861
- var LinkComponent = /** @class */ (function () {
2862
- function LinkComponent() {
2863
- this.color = 'normal';
2864
- this.name = '';
2865
- this.testId = '';
2866
- this.label = '';
2867
- this.icon = '';
2868
- this.className = '';
2869
- this.svg = '';
2870
- this.link = '';
2871
- /**
2872
- * external - ссылка на внешний источник
2873
- * internal - ссылка внутри приложения
2874
- * auto - определяется автоматически исходя из link
2875
- */
2876
- this.linkType = 'auto';
2877
- /**
2878
- * self - открывается в этом же окне
2879
- * blank - открывается в новом окне
2880
- * auto - определяется автоматически исходя из linkType
2881
- */
2882
- this.linkTarget = 'auto';
2883
- // Отображает кнопку нажатой
2884
- this.pressed = false;
2885
- this.disabled = false;
2886
- this.iconPos = 'left';
2887
- this.menuItems = [];
2888
- this.focus = new EventEmitter();
2889
- this.blur = new EventEmitter();
2890
- this.click = new EventEmitter();
2891
- this.style = {};
2892
- this._target = '_self';
2893
- this._linkType = 'auto';
2894
- this.isMaterialIcon = false;
2895
- }
2896
- LinkComponent.prototype.ngOnInit = function () {
2897
- this.updateData();
2898
- };
2899
- LinkComponent.prototype.ngOnChanges = function (changes) {
2900
- this.updateData();
2901
- };
2902
- LinkComponent.prototype.updateData = function () {
2903
- this._linkType = this.linkType;
2904
- if (this._linkType === 'auto') {
2905
- if ((this.link.indexOf('://') !== -1 || this.link.indexOf('//') === 0)) {
2906
- this._linkType = 'external';
2907
- }
2908
- else {
2909
- this._linkType = 'internal';
2910
- }
2911
- }
2912
- if (this.linkTarget === 'auto') {
2913
- if (this._linkType === 'external') {
2914
- this._target = '_blank';
2915
- }
2916
- else {
2917
- this._target = '_self';
2918
- }
2919
- }
2920
- else {
2921
- this._target = this.linkTarget === 'self' ? '_self' : 'blank';
2922
- }
2923
- if (this.icon && this.icon.indexOf('fa-') === -1) {
2924
- this.isMaterialIcon = true;
2925
- }
2926
- else {
2927
- this.isMaterialIcon = false;
2928
- }
2929
- };
2930
- LinkComponent.prototype._onClick = function ($event) {
2931
- // if (!this.link) {
2932
- // $event.stopPropagation();
2933
- // $event.preventDefault();
2934
- // this.click.emit($event);
2935
- // }
2936
- if (this.menuItems.length) {
2937
- this._menu.toggle($event);
2938
- }
2939
- };
2940
- __decorate([
2941
- Input(),
2942
- __metadata("design:type", String)
2943
- ], LinkComponent.prototype, "color", void 0);
2944
- __decorate([
2945
- Input(),
2946
- __metadata("design:type", Object)
2947
- ], LinkComponent.prototype, "name", void 0);
2948
- __decorate([
2949
- Input(),
2950
- __metadata("design:type", Object)
2951
- ], LinkComponent.prototype, "testId", void 0);
2952
- __decorate([
2953
- Input(),
2954
- __metadata("design:type", Object)
2955
- ], LinkComponent.prototype, "label", void 0);
2956
- __decorate([
2957
- Input(),
2958
- __metadata("design:type", Object)
2959
- ], LinkComponent.prototype, "icon", void 0);
2960
- __decorate([
2961
- Input(),
2962
- __metadata("design:type", Object)
2963
- ], LinkComponent.prototype, "className", void 0);
2964
- __decorate([
2965
- Input(),
2966
- __metadata("design:type", Object)
2967
- ], LinkComponent.prototype, "svg", void 0);
2968
- __decorate([
2969
- Input(),
2970
- __metadata("design:type", Object)
2971
- ], LinkComponent.prototype, "link", void 0);
2972
- __decorate([
2973
- Input(),
2974
- __metadata("design:type", String)
2975
- ], LinkComponent.prototype, "linkType", void 0);
2976
- __decorate([
2977
- Input(),
2978
- __metadata("design:type", String)
2979
- ], LinkComponent.prototype, "linkTarget", void 0);
2980
- __decorate([
2981
- Input(),
2982
- __metadata("design:type", Object)
2983
- ], LinkComponent.prototype, "pressed", void 0);
2984
- __decorate([
2985
- Input(),
2986
- __metadata("design:type", Object)
2987
- ], LinkComponent.prototype, "disabled", void 0);
2988
- __decorate([
2989
- Input(),
2990
- __metadata("design:type", String)
2991
- ], LinkComponent.prototype, "iconPos", void 0);
2992
- __decorate([
2993
- Input(),
2994
- __metadata("design:type", Array)
2995
- ], LinkComponent.prototype, "menuItems", void 0);
2996
- __decorate([
2997
- ViewChild(Menu, { static: false }),
2998
- __metadata("design:type", Menu)
2999
- ], LinkComponent.prototype, "_menu", void 0);
3000
- __decorate([
3001
- Output(),
3002
- __metadata("design:type", EventEmitter)
3003
- ], LinkComponent.prototype, "focus", void 0);
3004
- __decorate([
3005
- Output(),
3006
- __metadata("design:type", EventEmitter)
3007
- ], LinkComponent.prototype, "blur", void 0);
3008
- __decorate([
3009
- Output(),
3010
- __metadata("design:type", EventEmitter)
3011
- ], LinkComponent.prototype, "click", void 0);
3012
- LinkComponent = __decorate([
3013
- Component({
3014
- selector: 'in-link',
3015
- 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",
3016
- 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}"]
3017
- })
3018
- ], LinkComponent);
3019
- return LinkComponent;
3020
- }());
3021
-
3022
- var TooltipComponent = /** @class */ (function () {
3023
- function TooltipComponent() {
3024
- }
3025
- TooltipComponent.prototype.ngOnInit = function () {
3026
- };
3027
- TooltipComponent = __decorate([
3028
- Component({
3029
- selector: 'in-tooltip',
3030
- 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",
3031
- changeDetection: ChangeDetectionStrategy.OnPush,
3032
- 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}"]
3033
- }),
3034
- __metadata("design:paramtypes", [])
3035
- ], TooltipComponent);
3036
- return TooltipComponent;
3037
- }());
3038
-
3039
- var TreeTableComponent = /** @class */ (function () {
3040
- function TreeTableComponent() {
3041
- this.columns = [];
3042
- this.values = [];
3043
- this.checkboxSelection = true;
3044
- this.activeChange = new EventEmitter();
3045
- this.selectionChange = new EventEmitter();
3046
- this.addAction = new EventEmitter();
3047
- this.csvAction = new EventEmitter();
3048
- this.saveAction = new EventEmitter();
3049
- this.collapseAction = new EventEmitter();
3050
- this.removeAction = new EventEmitter();
3051
- this.unlinkAction = new EventEmitter();
3052
- this.groupEditAction = new EventEmitter();
3053
- this.groupAddAction = new EventEmitter();
3054
- this.rowIndex = 0;
3055
- this.isCollapse = true;
3056
- this._selection = null;
3057
- }
3058
- Object.defineProperty(TreeTableComponent.prototype, "selection", {
3059
- set: function (val) {
3060
- this._selection = val;
3061
- },
3062
- enumerable: true,
3063
- configurable: true
3064
- });
3065
- Object.defineProperty(TreeTableComponent.prototype, "selectionValue", {
3066
- get: function () {
3067
- return this._selection;
3068
- },
3069
- set: function (val) {
3070
- this._selection = val;
3071
- this.selectionChange.emit(val);
3072
- },
3073
- enumerable: true,
3074
- configurable: true
3075
- });
3076
- TreeTableComponent.prototype.isRowActive = function (row) {
3077
- return this.active && this.active.id === row.id;
3078
- };
3079
- TreeTableComponent.prototype.visibleColumns = function () {
3080
- return this.columns.filter(function (column) { return !column.isHidden; });
3081
- };
3082
- TreeTableComponent.prototype.columnsChange = function (data) {
3083
- data.column.isHidden = !data.event;
3084
- };
3085
- TreeTableComponent.prototype.ngAfterContentInit = function () {
3086
- var _this = this;
3087
- this.templates.forEach(function (item) {
3088
- switch (item.getType()) {
3089
- case 'caption':
3090
- _this.captionTemplate = item.template;
3091
- break;
3092
- case 'header':
3093
- _this.headerTemplate = item.template;
3094
- break;
3095
- case 'body':
3096
- _this.bodyTemplate = item.template;
3097
- break;
3098
- case 'value':
3099
- _this.valueTemplate = item.template;
3100
- break;
3101
- case 'loadingbody':
3102
- _this.loadingBodyTemplate = item.template;
3103
- break;
3104
- case 'footer':
3105
- _this.footerTemplate = item.template;
3106
- break;
3107
- case 'summary':
3108
- _this.summaryTemplate = item.template;
3109
- break;
3110
- case 'colgroup':
3111
- _this.colGroupTemplate = item.template;
3112
- break;
3113
- case 'rowexpansion':
3114
- _this.expandedRowTemplate = item.template;
3115
- break;
3116
- case 'frozenrows':
3117
- _this.frozenRowsTemplate = item.template;
3118
- break;
3119
- case 'frozenheader':
3120
- _this.frozenHeaderTemplate = item.template;
3121
- break;
3122
- case 'frozenbody':
3123
- _this.frozenBodyTemplate = item.template;
3124
- break;
3125
- case 'frozenfooter':
3126
- _this.frozenFooterTemplate = item.template;
3127
- break;
3128
- case 'frozencolgroup':
3129
- _this.frozenColGroupTemplate = item.template;
3130
- break;
3131
- case 'emptymessage':
3132
- _this.emptyMessageTemplate = item.template;
3133
- break;
3134
- case 'paginatorleft':
3135
- _this.paginatorLeftTemplate = item.template;
3136
- break;
3137
- case 'paginatorright':
3138
- _this.paginatorRightTemplate = item.template;
3139
- break;
3140
- }
3141
- });
3142
- };
3143
- TreeTableComponent.prototype.collapse = function (event, dt) {
3144
- var _this = this;
3145
- this.values.forEach(function (node) {
3146
- _this.toggleCollapse(node, _this.isCollapse);
3147
- });
3148
- this.isCollapse = !this.isCollapse;
3149
- dt.filterGlobal(this.searchText, 'contains');
3150
- };
3151
- TreeTableComponent.prototype.toggleCollapse = function (node, isCollapsed) {
3152
- var e_1, _a;
3153
- if (node.children) {
3154
- node.expanded = isCollapsed;
3155
- try {
3156
- for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {
3157
- var cn = _c.value;
3158
- if (cn) {
3159
- this.toggleCollapse(cn, isCollapsed);
3160
- }
3161
- }
3162
- }
3163
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
3164
- finally {
3165
- try {
3166
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
3167
- }
3168
- finally { if (e_1) throw e_1.error; }
3169
- }
3170
- }
3171
- };
3172
- __decorate([
3173
- Input(),
3174
- __metadata("design:type", Array)
3175
- ], TreeTableComponent.prototype, "columns", void 0);
3176
- __decorate([
3177
- Input(),
3178
- __metadata("design:type", Object)
3179
- ], TreeTableComponent.prototype, "values", void 0);
3180
- __decorate([
3181
- Input(),
3182
- __metadata("design:type", String)
3183
- ], TreeTableComponent.prototype, "scrollHeight", void 0);
3184
- __decorate([
3185
- Input(),
3186
- __metadata("design:type", Boolean)
3187
- ], TreeTableComponent.prototype, "scrollable", void 0);
3188
- __decorate([
3189
- Input(),
3190
- __metadata("design:type", String)
3191
- ], TreeTableComponent.prototype, "selectionMode", void 0);
3192
- __decorate([
3193
- Input(),
3194
- __metadata("design:type", String)
3195
- ], TreeTableComponent.prototype, "label", void 0);
3196
- __decorate([
3197
- Input(),
3198
- __metadata("design:type", String)
3199
- ], TreeTableComponent.prototype, "error", void 0);
3200
- __decorate([
3201
- Input(),
3202
- __metadata("design:type", String)
3203
- ], TreeTableComponent.prototype, "class", void 0);
3204
- __decorate([
3205
- Input(),
3206
- __metadata("design:type", Boolean)
3207
- ], TreeTableComponent.prototype, "required", void 0);
3208
- __decorate([
3209
- Input(),
3210
- __metadata("design:type", Object)
3211
- ], TreeTableComponent.prototype, "style", void 0);
3212
- __decorate([
3213
- Input(),
3214
- __metadata("design:type", Object)
3215
- ], TreeTableComponent.prototype, "toolbar", void 0);
3216
- __decorate([
3217
- Input(),
3218
- __metadata("design:type", Object)
3219
- ], TreeTableComponent.prototype, "checkboxSelection", void 0);
3220
- __decorate([
3221
- Input(),
3222
- __metadata("design:type", Object)
3223
- ], TreeTableComponent.prototype, "active", void 0);
3224
- __decorate([
3225
- Input(),
3226
- __metadata("design:type", Object)
3227
- ], TreeTableComponent.prototype, "sortField", void 0);
3228
- __decorate([
3229
- Input(),
3230
- __metadata("design:type", Object)
3231
- ], TreeTableComponent.prototype, "isAscending", void 0);
3232
- __decorate([
3233
- Input(),
3234
- __metadata("design:type", Object)
3235
- ], TreeTableComponent.prototype, "dataKey", void 0);
3236
- __decorate([
3237
- Output(),
3238
- __metadata("design:type", Object)
3239
- ], TreeTableComponent.prototype, "activeChange", void 0);
3240
- __decorate([
3241
- ContentChildren(InsparkTemplate),
3242
- __metadata("design:type", QueryList)
3243
- ], TreeTableComponent.prototype, "templates", void 0);
3244
- __decorate([
3245
- Output(),
3246
- __metadata("design:type", EventEmitter)
3247
- ], TreeTableComponent.prototype, "selectionChange", void 0);
3248
- __decorate([
3249
- Output(),
3250
- __metadata("design:type", EventEmitter)
3251
- ], TreeTableComponent.prototype, "addAction", void 0);
3252
- __decorate([
3253
- Output(),
3254
- __metadata("design:type", EventEmitter)
3255
- ], TreeTableComponent.prototype, "csvAction", void 0);
3256
- __decorate([
3257
- Output(),
3258
- __metadata("design:type", EventEmitter)
3259
- ], TreeTableComponent.prototype, "saveAction", void 0);
3260
- __decorate([
3261
- Output(),
3262
- __metadata("design:type", EventEmitter)
3263
- ], TreeTableComponent.prototype, "collapseAction", void 0);
3264
- __decorate([
3265
- Output(),
3266
- __metadata("design:type", EventEmitter)
3267
- ], TreeTableComponent.prototype, "removeAction", void 0);
3268
- __decorate([
3269
- Output(),
3270
- __metadata("design:type", EventEmitter)
3271
- ], TreeTableComponent.prototype, "unlinkAction", void 0);
3272
- __decorate([
3273
- Output(),
3274
- __metadata("design:type", EventEmitter)
3275
- ], TreeTableComponent.prototype, "groupEditAction", void 0);
3276
- __decorate([
3277
- Output(),
3278
- __metadata("design:type", EventEmitter)
3279
- ], TreeTableComponent.prototype, "groupAddAction", void 0);
3280
- __decorate([
3281
- Input(),
3282
- __metadata("design:type", Object),
3283
- __metadata("design:paramtypes", [Object])
3284
- ], TreeTableComponent.prototype, "selection", null);
3285
- TreeTableComponent = __decorate([
3286
- Component({
3287
- selector: 'in-tree-table',
3288
- 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",
3289
- entryComponents: [],
3290
- 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}"]
3291
- })
3292
- ], TreeTableComponent);
3293
- return TreeTableComponent;
3294
- }());
3295
- var TreeTableComponentModule = /** @class */ (function () {
3296
- function TreeTableComponentModule() {
3297
- }
3298
- TreeTableComponentModule = __decorate([
3299
- NgModule({
3300
- imports: [CommonModule, TreeTableModule, PipesModule, TranslateModule, FormsModule, TableComponentModule],
3301
- exports: [TreeTableComponent],
3302
- declarations: [TreeTableComponent]
3303
- })
3304
- ], TreeTableComponentModule);
3305
- return TreeTableComponentModule;
3306
- }());
3307
-
3308
- var RadiobuttonComponent = /** @class */ (function () {
3309
- function RadiobuttonComponent() {
3310
- this.name = null;
3311
- this.label = null;
3312
- this.required = false;
3313
- this.error = null;
3314
- this.placeholder = '';
3315
- this.id = null;
3316
- this.change = new EventEmitter();
3317
- }
3318
- RadiobuttonComponent.prototype.onChangeEvent = function (value) {
3319
- this.change.next({ name: this.name, value: value });
3320
- };
3321
- __decorate([
3322
- Input(),
3323
- __metadata("design:type", Object)
3324
- ], RadiobuttonComponent.prototype, "name", void 0);
3325
- __decorate([
3326
- Input(),
3327
- __metadata("design:type", Object)
3328
- ], RadiobuttonComponent.prototype, "label", void 0);
3329
- __decorate([
3330
- Input(),
3331
- __metadata("design:type", Object)
3332
- ], RadiobuttonComponent.prototype, "required", void 0);
3333
- __decorate([
3334
- Input(),
3335
- __metadata("design:type", Object)
3336
- ], RadiobuttonComponent.prototype, "error", void 0);
3337
- __decorate([
3338
- Input(),
3339
- __metadata("design:type", Object)
3340
- ], RadiobuttonComponent.prototype, "placeholder", void 0);
3341
- __decorate([
3342
- Input(),
3343
- __metadata("design:type", Object)
3344
- ], RadiobuttonComponent.prototype, "id", void 0);
3345
- __decorate([
3346
- Input(),
3347
- __metadata("design:type", Boolean)
3348
- ], RadiobuttonComponent.prototype, "disabled", void 0);
3349
- __decorate([
3350
- Input(),
3351
- __metadata("design:type", Object)
3352
- ], RadiobuttonComponent.prototype, "value", void 0);
3353
- __decorate([
3354
- Input(),
3355
- __metadata("design:type", Object)
3356
- ], RadiobuttonComponent.prototype, "values", void 0);
3357
- __decorate([
3358
- Input(),
3359
- __metadata("design:type", Object)
3360
- ], RadiobuttonComponent.prototype, "keyLabel", void 0);
3361
- __decorate([
3362
- Input(),
3363
- __metadata("design:type", Object)
3364
- ], RadiobuttonComponent.prototype, "item", void 0);
3365
- __decorate([
3366
- Output(),
3367
- __metadata("design:type", Object)
3368
- ], RadiobuttonComponent.prototype, "change", void 0);
3369
- RadiobuttonComponent = __decorate([
3370
- Component({
3371
- selector: 'in-radiobutton',
3372
- 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",
3373
- changeDetection: ChangeDetectionStrategy.OnPush,
3374
- styles: [""]
3375
- }),
3376
- __metadata("design:paramtypes", [])
3377
- ], RadiobuttonComponent);
3378
- return RadiobuttonComponent;
3379
- }());
3380
-
3381
- var SelectListComponent = /** @class */ (function () {
3382
- function SelectListComponent(ref, config, messageService, router) {
3383
- this.ref = ref;
3384
- this.config = config;
3385
- this.messageService = messageService;
3386
- this.router = router;
3387
- this.options = null;
3388
- this.isShowSpinner = false;
3389
- }
3390
- SelectListComponent.prototype.ngOnInit = function () {
3391
- this.options = this.config.data.command.options.map(function (item) {
3392
- return { value: item, checked: false };
3393
- });
3394
- this.selected = Array(this.options.length).fill(false);
3395
- };
3396
- SelectListComponent.prototype.closeModal = function (val) {
3397
- if (val === void 0) { val = null; }
3398
- this.ref.close(val);
3399
- };
3400
- SelectListComponent.prototype.applySelection = function () {
3401
- if (!this.selected) {
3402
- this.messageService.message(gettext('Select object'));
3403
- return;
3404
- }
3405
- else {
3406
- this.closeModal({ selected: this.options.filter(function (o) { return o.checked; }) });
3407
- }
3408
- };
3409
- SelectListComponent.prototype.select = function (i) {
3410
- this.options[i].checked = !this.options[i].checked;
3411
- };
3412
- SelectListComponent.prototype.highlight = function (value, text) {
3413
- var regex = new RegExp('(' + text + ')', 'gi');
3414
- return value.replace(regex, '<span class="u-text-highlight">$1</span>');
3415
- };
3416
- SelectListComponent.ctorParameters = function () { return [
3417
- { type: DynamicDialogRef },
3418
- { type: DynamicDialogConfig },
3419
- { type: InsparkMessageService },
3420
- { type: Router }
3421
- ]; };
3422
- SelectListComponent = __decorate([
3423
- Component({
3424
- selector: 'app-select-list',
3425
- 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",
3426
- 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}"]
3427
- }),
3428
- __metadata("design:paramtypes", [DynamicDialogRef,
3429
- DynamicDialogConfig,
3430
- InsparkMessageService,
3431
- Router])
3432
- ], SelectListComponent);
3433
- return SelectListComponent;
3434
- }());
3435
-
3436
- var ObjectTreeComponent = /** @class */ (function () {
3437
- function ObjectTreeComponent() {
3438
- }
3439
- ObjectTreeComponent.prototype.ngOnInit = function () {
3440
- };
3441
- ObjectTreeComponent = __decorate([
3442
- Component({
3443
- selector: 'in-object-tree',
3444
- template: "<p>object-tree works!</p>\n",
3445
- changeDetection: ChangeDetectionStrategy.OnPush,
3446
- styles: [""]
3447
- }),
3448
- __metadata("design:paramtypes", [])
3449
- ], ObjectTreeComponent);
3450
- return ObjectTreeComponent;
3451
- }());
3452
-
3453
- var ModalInputTextComponent = /** @class */ (function () {
3454
- function ModalInputTextComponent(ref, config, translateService, messageService, router) {
3455
- this.ref = ref;
3456
- this.config = config;
3457
- this.translateService = translateService;
3458
- this.messageService = messageService;
3459
- this.router = router;
3460
- this.options = null;
3461
- this.isShowSpinner = false;
3462
- this.maxLength = 0;
3463
- }
3464
- ModalInputTextComponent.prototype.ngOnInit = function () {
3465
- this.param = this.config.data.command.param;
3466
- this.options = this.config.data.command.options.map(function (item) {
3467
- return { value: item, checked: false };
3468
- });
3469
- if (this.options && this.options.length > 0) {
3470
- this.calculateWidth();
3471
- }
3472
- this.selected = Array(this.options.length).fill(false);
3473
- };
3474
- ModalInputTextComponent.prototype.closeModal = function (val) {
3475
- if (val === void 0) { val = null; }
3476
- this.ref.close(val);
3477
- };
3478
- ModalInputTextComponent.prototype.applySelection = function () {
3479
- if (!this.selected) {
3480
- this.messageService.message(gettext('Select object'));
3481
- return;
3482
- }
3483
- else {
3484
- this.closeModal({
3485
- selected: this.options.filter(function (o) { return o.checked; }),
3486
- param: this.param ? this.param.value : undefined
3487
- });
3488
- }
3489
- };
3490
- ModalInputTextComponent.prototype.select = function (i) {
3491
- this.options[i].checked = !this.options[i].checked;
3492
- };
3493
- ModalInputTextComponent.prototype.checkSelected = function () {
3494
- if (this.param) {
3495
- return !this.param.value;
3496
- }
3497
- else if (this.options) {
3498
- return this.options.filter(function (opt) { return opt.checked; }).length === 0;
3499
- }
3500
- return false;
3501
- };
3502
- ModalInputTextComponent.prototype.highlight = function (value, text) {
3503
- var regex = new RegExp('(' + text + ')', 'gi');
3504
- return value.replace(regex, '<span class="u-text-highlight">$1</span>');
3505
- };
3506
- ModalInputTextComponent.prototype.calculateWidth = function () {
3507
- var _this = this;
3508
- this.options.forEach(function (opt) {
3509
- if (opt.value.length * 7 > _this.maxLength) {
3510
- _this.maxLength = opt.value.length * 7 + 100;
3511
- }
3512
- });
3513
- };
3514
- ModalInputTextComponent.prototype.translate = function (str) {
3515
- var _this = this;
3516
- var splited = str.split('\n');
3517
- var translated = '';
3518
- splited.forEach(function (s) { return translated += _this.translateService.instant(s) + '\n'; });
3519
- return translated;
3520
- };
3521
- ModalInputTextComponent.ctorParameters = function () { return [
3522
- { type: DynamicDialogRef },
3523
- { type: DynamicDialogConfig },
3524
- { type: TranslateService },
3525
- { type: InsparkMessageService },
3526
- { type: Router }
3527
- ]; };
3528
- ModalInputTextComponent = __decorate([
3529
- Component({
3530
- selector: 'app-modal-input-text',
3531
- 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",
3532
- 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}"]
3533
- }),
3534
- __metadata("design:paramtypes", [DynamicDialogRef,
3535
- DynamicDialogConfig,
3536
- TranslateService,
3537
- InsparkMessageService,
3538
- Router])
3539
- ], ModalInputTextComponent);
3540
- return ModalInputTextComponent;
3541
- }());
3542
-
3543
- var ContentToggleComponent = /** @class */ (function () {
3544
- function ContentToggleComponent(cdr) {
3545
- this.cdr = cdr;
3546
- this.defaultOpen = true;
3547
- this.isOpen = this.defaultOpen;
3548
- this.icon = null;
3549
- this.manualArrow = true;
3550
- this.toggle = new EventEmitter();
3551
- }
3552
- ContentToggleComponent.prototype.ngOnInit = function () {
3553
- this.isOpen = this.defaultOpen;
3554
- };
3555
- ContentToggleComponent.prototype.toggleOpen = function (e) {
3556
- // Получаем родительский элемент div
3557
- var parentElement = this.elementButtons.nativeElement;
3558
- // Проверяем, входит ли цель события в родительский элемент
3559
- if (!parentElement.contains(e.target) || e.target === parentElement) {
3560
- this.isOpen = !this.isOpen;
3561
- this.toggle.emit(this.isOpen);
3562
- this.cdr.detectChanges();
3563
- }
3564
- };
3565
- ContentToggleComponent.ctorParameters = function () { return [
3566
- { type: ChangeDetectorRef }
3567
- ]; };
3568
- __decorate([
3569
- Input(),
3570
- __metadata("design:type", Object)
3571
- ], ContentToggleComponent.prototype, "label", void 0);
3572
- __decorate([
3573
- Input(),
3574
- __metadata("design:type", Boolean)
3575
- ], ContentToggleComponent.prototype, "defaultOpen", void 0);
3576
- __decorate([
3577
- Input(),
3578
- __metadata("design:type", Object)
3579
- ], ContentToggleComponent.prototype, "isOpen", void 0);
3580
- __decorate([
3581
- Input(),
3582
- __metadata("design:type", String)
3583
- ], ContentToggleComponent.prototype, "icon", void 0);
3584
- __decorate([
3585
- Input(),
3586
- __metadata("design:type", Boolean)
3587
- ], ContentToggleComponent.prototype, "manualArrow", void 0);
3588
- __decorate([
3589
- Output(),
3590
- __metadata("design:type", EventEmitter)
3591
- ], ContentToggleComponent.prototype, "toggle", void 0);
3592
- __decorate([
3593
- ViewChild('buttons', { static: true }),
3594
- __metadata("design:type", ElementRef)
3595
- ], ContentToggleComponent.prototype, "elementButtons", void 0);
3596
- ContentToggleComponent = __decorate([
3597
- Component({
3598
- selector: 'in-content-toggle',
3599
- 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",
3600
- 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}"]
3601
- }),
3602
- __metadata("design:paramtypes", [ChangeDetectorRef])
3603
- ], ContentToggleComponent);
3604
- return ContentToggleComponent;
3605
- }());
3606
-
3607
- var InputGroupComponent = /** @class */ (function () {
3608
- function InputGroupComponent() {
3609
- this.name = null;
3610
- this.measureunit = null;
3611
- this.autocomplete = true;
3612
- this.label = null;
3613
- this.required = false;
3614
- this.error = null;
3615
- this.size = 100000;
3616
- this.maxlength = 100000;
3617
- this.width = 'auto';
3618
- this.placeholder = '';
3619
- this.id = null;
3620
- this.testId = null;
3621
- this.opacity = true;
3622
- this.shadow = false;
3623
- this.isEditMode = true;
3624
- this.focus = new EventEmitter();
3625
- this.blur = new EventEmitter();
3626
- this.updateValue = new EventEmitter();
3627
- this.disableEditableView = new EventEmitter();
3628
- this.validators = [/^-?\d*\.?\d*$/];
3629
- this.isEditable = true;
3630
- this.propagateChange = function (_) {
3631
- };
3632
- }
3633
- InputGroupComponent_1 = InputGroupComponent;
3634
- InputGroupComponent.prototype.ngOnInit = function () {
3635
- this._value = this.value;
3636
- };
3637
- /**
3638
- * Write form value to the DOM element (model => view)
3639
- */
3640
- InputGroupComponent.prototype.writeValue = function (value) {
3641
- this.value = value ? value : this.name;
3642
- this._value = this.value;
3643
- };
3644
- /**
3645
- * Write form disabled state to the DOM element (model => view)
3646
- */
3647
- InputGroupComponent.prototype.setDisabledState = function (isDisabled) {
3648
- this.disabled = isDisabled;
3649
- };
3650
- /**
3651
- * Update form when DOM element value changes (view => model)
3652
- */
3653
- InputGroupComponent.prototype.registerOnChange = function (fn) {
3654
- // Store the provided function as an internal method.
3655
- this.propagateChange = fn;
3656
- };
3657
- /**
3658
- * Update form when DOM element is blurred (view => model)
3659
- */
3660
- InputGroupComponent.prototype.registerOnTouched = function (fn) {
3661
- // Store the provided function as an internal method.
3662
- this.onTouched = fn;
3663
- };
3664
- InputGroupComponent.prototype.onChange = function (_) {
3665
- this.propagateChange(this.value);
3666
- };
3667
- InputGroupComponent.prototype.onTouched = function () {
3668
- };
3669
- InputGroupComponent.prototype.cancel = function () {
3670
- this.isEditable = false;
3671
- this.disableEditableView.emit(false);
3672
- this.value = this._value;
3673
- };
3674
- InputGroupComponent.prototype.numberOnly = function (event) {
3675
- if (event.keyCode === 8) {
3676
- return true;
3677
- }
3678
- var test = '';
3679
- if (this.value) {
3680
- test = this.value + event.key;
3681
- }
3682
- else {
3683
- test = event.key;
3684
- }
3685
- return this.validators[0].test(test);
3686
- };
3687
- InputGroupComponent.prototype.changeEditMode = function () {
3688
- this.isEditable = !this.isEditable;
3689
- };
3690
- //
3691
- // disableEditableView() {
3692
- // this.isEditableView.emit(false);
3693
- // }
3694
- InputGroupComponent.prototype.changeValue = function (value) {
3695
- this.value = value;
3696
- this._value = this.value;
3697
- // this.isEditable = false;
3698
- this.updateValue.emit(value);
3699
- this.disableEditableView.emit(false);
3700
- };
3701
- InputGroupComponent.prototype.isApplyDisabled = function () {
3702
- return this.value != null ? false : true;
3703
- };
3704
- var InputGroupComponent_1;
3705
- __decorate([
3706
- Input(),
3707
- __metadata("design:type", Object)
3708
- ], InputGroupComponent.prototype, "name", void 0);
3709
- __decorate([
3710
- Input(),
3711
- __metadata("design:type", Object)
3712
- ], InputGroupComponent.prototype, "measureunit", void 0);
3713
- __decorate([
3714
- Input(),
3715
- __metadata("design:type", Object)
3716
- ], InputGroupComponent.prototype, "autocomplete", void 0);
3717
- __decorate([
3718
- Input(),
3719
- __metadata("design:type", Object)
3720
- ], InputGroupComponent.prototype, "label", void 0);
3721
- __decorate([
3722
- Input(),
3723
- __metadata("design:type", Object)
3724
- ], InputGroupComponent.prototype, "required", void 0);
3725
- __decorate([
3726
- Input(),
3727
- __metadata("design:type", Object)
3728
- ], InputGroupComponent.prototype, "error", void 0);
3729
- __decorate([
3730
- Input(),
3731
- __metadata("design:type", Object)
3732
- ], InputGroupComponent.prototype, "size", void 0);
3733
- __decorate([
3734
- Input(),
3735
- __metadata("design:type", Object)
3736
- ], InputGroupComponent.prototype, "maxlength", void 0);
3737
- __decorate([
3738
- Input(),
3739
- __metadata("design:type", Object)
3740
- ], InputGroupComponent.prototype, "width", void 0);
3741
- __decorate([
3742
- Input(),
3743
- __metadata("design:type", Object)
3744
- ], InputGroupComponent.prototype, "placeholder", void 0);
3745
- __decorate([
3746
- Input(),
3747
- __metadata("design:type", Object)
3748
- ], InputGroupComponent.prototype, "id", void 0);
3749
- __decorate([
3750
- Input(),
3751
- __metadata("design:type", Object)
3752
- ], InputGroupComponent.prototype, "testId", void 0);
3753
- __decorate([
3754
- Input(),
3755
- __metadata("design:type", Boolean)
3756
- ], InputGroupComponent.prototype, "disabled", void 0);
3757
- __decorate([
3758
- Input(),
3759
- __metadata("design:type", Object)
3760
- ], InputGroupComponent.prototype, "opacity", void 0);
3761
- __decorate([
3762
- Input(),
3763
- __metadata("design:type", Object)
3764
- ], InputGroupComponent.prototype, "shadow", void 0);
3765
- __decorate([
3766
- Input(),
3767
- __metadata("design:type", Object)
3768
- ], InputGroupComponent.prototype, "isEditMode", void 0);
3769
- __decorate([
3770
- Output(),
3771
- __metadata("design:type", EventEmitter)
3772
- ], InputGroupComponent.prototype, "focus", void 0);
3773
- __decorate([
3774
- Output(),
3775
- __metadata("design:type", EventEmitter)
3776
- ], InputGroupComponent.prototype, "blur", void 0);
3777
- __decorate([
3778
- Output(),
3779
- __metadata("design:type", EventEmitter)
3780
- ], InputGroupComponent.prototype, "updateValue", void 0);
3781
- __decorate([
3782
- Output(),
3783
- __metadata("design:type", EventEmitter)
3784
- ], InputGroupComponent.prototype, "disableEditableView", void 0);
3785
- InputGroupComponent = InputGroupComponent_1 = __decorate([
3786
- Component({
3787
- selector: 'in-input-group',
3788
- 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",
3789
- providers: [
3790
- {
3791
- provide: NG_VALUE_ACCESSOR,
3792
- useExisting: forwardRef(function () { return InputGroupComponent_1; }),
3793
- multi: true,
3794
- }
3795
- ],
3796
- styles: [""]
3797
- })
3798
- ], InputGroupComponent);
3799
- return InputGroupComponent;
3800
- }());
3801
-
3802
- var AutoCompleteComponent = /** @class */ (function (_super) {
3803
- __extends(AutoCompleteComponent, _super);
3804
- function AutoCompleteComponent() {
3805
- var _this = _super !== null && _super.apply(this, arguments) || this;
3806
- _this.minLength = 1;
3807
- _this.delay = 300;
3808
- _this.type = 'text';
3809
- _this.autoZIndex = true;
3810
- _this.baseZIndex = 0;
3811
- _this.dropdownIcon = "pi pi-caret-down";
3812
- _this.unique = true;
3813
- _this.completeMethod = new EventEmitter();
3814
- _this.onSelect = new EventEmitter();
3815
- _this.onUnselect = new EventEmitter();
3816
- _this.onFocus = new EventEmitter();
3817
- _this.onBlur = new EventEmitter();
3818
- _this.onDropdownClick = new EventEmitter();
3819
- _this.onClear = new EventEmitter();
3820
- _this.onKeyUp = new EventEmitter();
3821
- _this.scrollHeight = '200px';
3822
- _this.dropdownMode = 'blank';
3823
- _this.immutable = true;
3824
- _this.showTransitionOptions = '225ms ease-out';
3825
- _this.hideTransitionOptions = '195ms ease-in';
3826
- _this.autocomplete = 'off';
3827
- return _this;
3828
- }
3829
- AutoCompleteComponent_1 = AutoCompleteComponent;
3830
- AutoCompleteComponent.prototype.ngAfterContentInit = function () {
3831
- var _this = this;
3832
- this.templates.forEach(function (item) {
3833
- switch (item.getType()) {
3834
- case 'item':
3835
- _this.itemTemplate = item.template;
3836
- break;
3837
- case 'selectedItem':
3838
- _this.selectedItemTemplate = item.template;
3839
- break;
3840
- default:
3841
- _this.itemTemplate = item.template;
3842
- break;
3843
- }
3844
- });
3845
- };
3846
- var AutoCompleteComponent_1;
3847
- __decorate([
3848
- Input(),
3849
- __metadata("design:type", Number)
3850
- ], AutoCompleteComponent.prototype, "minLength", void 0);
3851
- __decorate([
3852
- Input(),
3853
- __metadata("design:type", Number)
3854
- ], AutoCompleteComponent.prototype, "delay", void 0);
3855
- __decorate([
3856
- Input(),
3857
- __metadata("design:type", Object)
3858
- ], AutoCompleteComponent.prototype, "style", void 0);
3859
- __decorate([
3860
- Input(),
3861
- __metadata("design:type", Object)
3862
- ], AutoCompleteComponent.prototype, "panelStyle", void 0);
3863
- __decorate([
3864
- Input(),
3865
- __metadata("design:type", String)
3866
- ], AutoCompleteComponent.prototype, "styleClass", void 0);
3867
- __decorate([
3868
- Input(),
3869
- __metadata("design:type", String)
3870
- ], AutoCompleteComponent.prototype, "panelStyleClass", void 0);
3871
- __decorate([
3872
- Input(),
3873
- __metadata("design:type", Object)
3874
- ], AutoCompleteComponent.prototype, "inputStyle", void 0);
3875
- __decorate([
3876
- Input(),
3877
- __metadata("design:type", String)
3878
- ], AutoCompleteComponent.prototype, "inputId", void 0);
3879
- __decorate([
3880
- Input(),
3881
- __metadata("design:type", String)
3882
- ], AutoCompleteComponent.prototype, "inputStyleClass", void 0);
3883
- __decorate([
3884
- Input(),
3885
- __metadata("design:type", String)
3886
- ], AutoCompleteComponent.prototype, "placeholder", void 0);
3887
- __decorate([
3888
- Input(),
3889
- __metadata("design:type", Boolean)
3890
- ], AutoCompleteComponent.prototype, "readonly", void 0);
3891
- __decorate([
3892
- Input(),
3893
- __metadata("design:type", Boolean)
3894
- ], AutoCompleteComponent.prototype, "disabled", void 0);
3895
- __decorate([
3896
- Input(),
3897
- __metadata("design:type", Number)
3898
- ], AutoCompleteComponent.prototype, "maxlength", void 0);
3899
- __decorate([
3900
- Input(),
3901
- __metadata("design:type", String)
3902
- ], AutoCompleteComponent.prototype, "name", void 0);
3903
- __decorate([
3904
- Input(),
3905
- __metadata("design:type", Boolean)
3906
- ], AutoCompleteComponent.prototype, "required", void 0);
3907
- __decorate([
3908
- Input(),
3909
- __metadata("design:type", Number)
3910
- ], AutoCompleteComponent.prototype, "size", void 0);
3911
- __decorate([
3912
- Input(),
3913
- __metadata("design:type", Object)
3914
- ], AutoCompleteComponent.prototype, "appendTo", void 0);
3915
- __decorate([
3916
- Input(),
3917
- __metadata("design:type", Boolean)
3918
- ], AutoCompleteComponent.prototype, "autoHighlight", void 0);
3919
- __decorate([
3920
- Input(),
3921
- __metadata("design:type", Boolean)
3922
- ], AutoCompleteComponent.prototype, "forceSelection", void 0);
3923
- __decorate([
3924
- Input(),
3925
- __metadata("design:type", String)
3926
- ], AutoCompleteComponent.prototype, "type", void 0);
3927
- __decorate([
3928
- Input(),
3929
- __metadata("design:type", Boolean)
3930
- ], AutoCompleteComponent.prototype, "autoZIndex", void 0);
3931
- __decorate([
3932
- Input(),
3933
- __metadata("design:type", Number)
3934
- ], AutoCompleteComponent.prototype, "baseZIndex", void 0);
3935
- __decorate([
3936
- Input(),
3937
- __metadata("design:type", String)
3938
- ], AutoCompleteComponent.prototype, "ariaLabel", void 0);
3939
- __decorate([
3940
- Input(),
3941
- __metadata("design:type", String)
3942
- ], AutoCompleteComponent.prototype, "ariaLabelledBy", void 0);
3943
- __decorate([
3944
- Input(),
3945
- __metadata("design:type", String)
3946
- ], AutoCompleteComponent.prototype, "dropdownIcon", void 0);
3947
- __decorate([
3948
- Input(),
3949
- __metadata("design:type", Boolean)
3950
- ], AutoCompleteComponent.prototype, "unique", void 0);
3951
- __decorate([
3952
- Output(),
3953
- __metadata("design:type", EventEmitter)
3954
- ], AutoCompleteComponent.prototype, "completeMethod", void 0);
3955
- __decorate([
3956
- Output(),
3957
- __metadata("design:type", EventEmitter)
3958
- ], AutoCompleteComponent.prototype, "onSelect", void 0);
3959
- __decorate([
3960
- Output(),
3961
- __metadata("design:type", EventEmitter)
3962
- ], AutoCompleteComponent.prototype, "onUnselect", void 0);
3963
- __decorate([
3964
- Output(),
3965
- __metadata("design:type", EventEmitter)
3966
- ], AutoCompleteComponent.prototype, "onFocus", void 0);
3967
- __decorate([
3968
- Output(),
3969
- __metadata("design:type", EventEmitter)
3970
- ], AutoCompleteComponent.prototype, "onBlur", void 0);
3971
- __decorate([
3972
- Output(),
3973
- __metadata("design:type", EventEmitter)
3974
- ], AutoCompleteComponent.prototype, "onDropdownClick", void 0);
3975
- __decorate([
3976
- Output(),
3977
- __metadata("design:type", EventEmitter)
3978
- ], AutoCompleteComponent.prototype, "onClear", void 0);
3979
- __decorate([
3980
- Output(),
3981
- __metadata("design:type", EventEmitter)
3982
- ], AutoCompleteComponent.prototype, "onKeyUp", void 0);
3983
- __decorate([
3984
- Input(),
3985
- __metadata("design:type", String)
3986
- ], AutoCompleteComponent.prototype, "field", void 0);
3987
- __decorate([
3988
- Input(),
3989
- __metadata("design:type", String)
3990
- ], AutoCompleteComponent.prototype, "scrollHeight", void 0);
3991
- __decorate([
3992
- Input(),
3993
- __metadata("design:type", Boolean)
3994
- ], AutoCompleteComponent.prototype, "dropdown", void 0);
3995
- __decorate([
3996
- Input(),
3997
- __metadata("design:type", String)
3998
- ], AutoCompleteComponent.prototype, "dropdownMode", void 0);
3999
- __decorate([
4000
- Input(),
4001
- __metadata("design:type", Boolean)
4002
- ], AutoCompleteComponent.prototype, "multiple", void 0);
4003
- __decorate([
4004
- Input(),
4005
- __metadata("design:type", Number)
4006
- ], AutoCompleteComponent.prototype, "tabindex", void 0);
4007
- __decorate([
4008
- Input(),
4009
- __metadata("design:type", String)
4010
- ], AutoCompleteComponent.prototype, "dataKey", void 0);
4011
- __decorate([
4012
- Input(),
4013
- __metadata("design:type", String)
4014
- ], AutoCompleteComponent.prototype, "emptyMessage", void 0);
4015
- __decorate([
4016
- Input(),
4017
- __metadata("design:type", Boolean)
4018
- ], AutoCompleteComponent.prototype, "immutable", void 0);
4019
- __decorate([
4020
- Input(),
4021
- __metadata("design:type", String)
4022
- ], AutoCompleteComponent.prototype, "showTransitionOptions", void 0);
4023
- __decorate([
4024
- Input(),
4025
- __metadata("design:type", String)
4026
- ], AutoCompleteComponent.prototype, "hideTransitionOptions", void 0);
4027
- __decorate([
4028
- Input(),
4029
- __metadata("design:type", Boolean)
4030
- ], AutoCompleteComponent.prototype, "autofocus", void 0);
4031
- __decorate([
4032
- Input(),
4033
- __metadata("design:type", String)
4034
- ], AutoCompleteComponent.prototype, "autocomplete", void 0);
4035
- __decorate([
4036
- ViewChild('in', { static: false }),
4037
- __metadata("design:type", ElementRef)
4038
- ], AutoCompleteComponent.prototype, "inputEL", void 0);
4039
- __decorate([
4040
- ViewChild('multiIn', { static: false }),
4041
- __metadata("design:type", ElementRef)
4042
- ], AutoCompleteComponent.prototype, "multiInputEL", void 0);
4043
- __decorate([
4044
- ViewChild('multiContainer', { static: false }),
4045
- __metadata("design:type", ElementRef)
4046
- ], AutoCompleteComponent.prototype, "multiContainerEL", void 0);
4047
- __decorate([
4048
- ViewChild('ddBtn', { static: false }),
4049
- __metadata("design:type", ElementRef)
4050
- ], AutoCompleteComponent.prototype, "dropdownButton", void 0);
4051
- __decorate([
4052
- ContentChildren(InsparkTemplate),
4053
- __metadata("design:type", QueryList)
4054
- ], AutoCompleteComponent.prototype, "templates", void 0);
4055
- AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
4056
- Component({
4057
- selector: 'in-autocomplete',
4058
- 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",
4059
- animations: [
4060
- trigger('overlayAnimation', [
4061
- state('void', style({
4062
- transform: 'translateY(5%)',
4063
- opacity: 0
4064
- })),
4065
- state('visible', style({
4066
- transform: 'translateY(0)',
4067
- opacity: 1
4068
- })),
4069
- transition('void => visible', animate('{{showTransitionParams}}')),
4070
- transition('visible => void', animate('{{hideTransitionParams}}'))
4071
- ])
4072
- ],
4073
- providers: [{
4074
- provide: NG_VALUE_ACCESSOR,
4075
- useExisting: forwardRef(function () { return AutoCompleteComponent_1; }),
4076
- multi: true
4077
- }],
4078
- styles: [""]
4079
- })
4080
- ], AutoCompleteComponent);
4081
- return AutoCompleteComponent;
4082
- }(AutoComplete));
4083
- var AutoCompleteComponentModule = /** @class */ (function () {
4084
- function AutoCompleteComponentModule() {
4085
- }
4086
- AutoCompleteComponentModule = __decorate([
4087
- NgModule({
4088
- declarations: [
4089
- AutoCompleteComponent,
4090
- ],
4091
- imports: [
4092
- TooltipModule,
4093
- ScrollingModule,
4094
- CommonModule,
4095
- PrimengComponentsModule,
4096
- ButtonModule,
4097
- ],
4098
- exports: [
4099
- AutoCompleteComponent,
4100
- ],
4101
- entryComponents: [
4102
- AutoCompleteComponent,
4103
- ]
4104
- })
4105
- ], AutoCompleteComponentModule);
4106
- return AutoCompleteComponentModule;
4107
- }());
4108
-
4109
- var PieService = /** @class */ (function () {
4110
- function PieService() {
4111
- this.colorArray = ['-1', 0, 1, 2, 3, 4]; // Цвета и последовательность в которой они будут отображены
4112
- this.colors = {
4113
- 1: '#31ac51',
4114
- 2: '#EE9946',
4115
- 3: '#F95C5D',
4116
- 4: '#a20000',
4117
- 0: '#7E8087',
4118
- '-1': '#85B3CB'
4119
- };
4120
- }
4121
- PieService.prototype.create = function (statuses, size) {
4122
- var _this = this;
4123
- var data = [];
4124
- var allCount = 0;
4125
- this.colorArray.forEach(function (color) {
4126
- allCount += statuses[color] || 0;
4127
- });
4128
- var cumulativePercent = 0;
4129
- this.colorArray.forEach(function (color) {
4130
- var count = statuses[color];
4131
- if (!count) {
4132
- return;
4133
- }
4134
- var percent = count / allCount;
4135
- var _a = __read(_this.getCoordinatesForPercent(size, cumulativePercent), 2), startX = _a[0], startY = _a[1];
4136
- cumulativePercent += percent;
4137
- var _b = __read(_this.getCoordinatesForPercent(size, cumulativePercent), 2), endX = _b[0], endY = _b[1];
4138
- var largeArcFlag = percent > .5 ? 1 : 0;
4139
- var pathData = [
4140
- "M " + startX + " " + startY,
4141
- "A 20 20 0 " + largeArcFlag + " 1 " + endX + " " + endY,
4142
- "L 0 0",
4143
- ].join(' ');
4144
- data.push({
4145
- path: pathData,
4146
- color: _this.colors[color + '']
4147
- });
4148
- });
4149
- return data;
4150
- };
4151
- PieService.prototype.getCoordinatesForPercent = function (size, percent) {
4152
- var x = size / 2 * Math.cos(2 * Math.PI * percent);
4153
- var y = size / 2 * Math.sin(2 * Math.PI * percent);
4154
- return [x, y];
4155
- };
4156
- PieService = __decorate([
4157
- Injectable()
4158
- ], PieService);
4159
- return PieService;
4160
- }());
4161
-
4162
- var ObjectPieComponent = /** @class */ (function () {
4163
- function ObjectPieComponent(translate, pieService, cdr) {
4164
- this.translate = translate;
4165
- this.pieService = pieService;
4166
- this.cdr = cdr;
4167
- this.count = 30;
4168
- this.size = 40;
4169
- this.statuses = {
4170
- '-1': 20,
4171
- 0: 4,
4172
- 1: 3,
4173
- 2: 4,
4174
- 3: 5
4175
- };
4176
- }
4177
- ObjectPieComponent.prototype.ngOnInit = function () {
4178
- this.data = this.pieService.create(this.statuses, this.size);
4179
- };
4180
- ObjectPieComponent.prototype.ngOnDestroy = function () {
4181
- };
4182
- ObjectPieComponent.prototype.ngOnChanges = function (changes) {
4183
- };
4184
- ObjectPieComponent.ctorParameters = function () { return [
4185
- { type: TranslateService },
4186
- { type: PieService },
4187
- { type: ChangeDetectorRef }
4188
- ]; };
4189
- __decorate([
4190
- Input(),
4191
- __metadata("design:type", Object)
4192
- ], ObjectPieComponent.prototype, "count", void 0);
4193
- __decorate([
4194
- Input(),
4195
- __metadata("design:type", Object)
4196
- ], ObjectPieComponent.prototype, "size", void 0);
4197
- __decorate([
4198
- Input(),
4199
- __metadata("design:type", Object)
4200
- ], ObjectPieComponent.prototype, "statuses", void 0);
4201
- ObjectPieComponent = __decorate([
4202
- Component({
4203
- selector: 'in-pie',
4204
- 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",
4205
- encapsulation: ViewEncapsulation.Emulated,
4206
- providers: [],
4207
- changeDetection: ChangeDetectionStrategy.OnPush,
4208
- 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}"]
4209
- }),
4210
- __metadata("design:paramtypes", [TranslateService,
4211
- PieService,
4212
- ChangeDetectorRef])
4213
- ], ObjectPieComponent);
4214
- return ObjectPieComponent;
4215
- }());
4216
-
4217
- var InsparkComponentsModule = /** @class */ (function () {
4218
- function InsparkComponentsModule() {
4219
- }
4220
- InsparkComponentsModule = __decorate([
4221
- NgModule({
4222
- imports: [
4223
- AutoCompleteComponentModule,
4224
- FormsModule,
4225
- ReactiveFormsModule,
4226
- CommonModule,
4227
- DropdownComponentModule,
4228
- TableComponentModule,
4229
- TreeTableComponentModule,
4230
- RadioButtonModule,
4231
- TranslateModule,
4232
- MenuModule,
4233
- SliderModule,
4234
- NgbModule,
4235
- InlineSVGModule.forRoot({ baseUrl: 'assets/images/' }),
4236
- BreadcrumbModule,
4237
- TreeModule,
4238
- SharedModule
4239
- ],
4240
- declarations: [
4241
- ButtonComponent,
4242
- InputTextComponent,
4243
- TextareaComponent,
4244
- PanelComponent,
4245
- ComponentContainerComponent,
4246
- CheckboxComponent,
4247
- EmptyComponent,
4248
- PreloaderComponent,
4249
- InsparkStickyComponent,
4250
- InsparkHeaderComponent,
4251
- ToolbarComponent,
4252
- BreadcrumbComponent,
4253
- FileComponent,
4254
- SelectButtonComponent,
4255
- ModalInputTextComponent,
4256
- SelectListComponent,
4257
- StatusCircleComponent,
4258
- SvgComponent,
4259
- SwitcherComponent,
4260
- InlineMessageComponent,
4261
- LinkComponent,
4262
- InsparkTemplate,
4263
- TooltipComponent,
4264
- RadiobuttonComponent,
4265
- ObjectTreeComponent,
4266
- ContentToggleComponent,
4267
- InputGroupComponent,
4268
- ObjectPieComponent,
4269
- ],
4270
- exports: [
4271
- ButtonComponent,
4272
- InputTextComponent,
4273
- TextareaComponent,
4274
- PanelComponent,
4275
- ComponentContainerComponent,
4276
- CheckboxComponent,
4277
- DropdownComponentModule,
4278
- TableComponentModule,
4279
- TreeTableComponentModule,
4280
- EmptyComponent,
4281
- PreloaderComponent,
4282
- InsparkStickyComponent,
4283
- InsparkHeaderComponent,
4284
- ToolbarComponent,
4285
- BreadcrumbComponent,
4286
- FileComponent,
4287
- SelectButtonComponent,
4288
- ModalInputTextComponent,
4289
- SelectListComponent,
4290
- StatusCircleComponent,
4291
- SvgComponent,
4292
- SwitcherComponent,
4293
- MenuModule,
4294
- SliderModule,
4295
- InlineMessageComponent,
4296
- LinkComponent,
4297
- InsparkTemplate,
4298
- NgbModule,
4299
- TooltipComponent,
4300
- RadiobuttonComponent,
4301
- ObjectTreeComponent,
4302
- ContentToggleComponent,
4303
- ObjectPieComponent,
4304
- InputGroupComponent,
4305
- AutoCompleteComponentModule
4306
- ],
4307
- entryComponents: [SelectListComponent, ModalInputTextComponent],
4308
- schemas: [NO_ERRORS_SCHEMA]
4309
- })
4310
- ], InsparkComponentsModule);
4311
- return InsparkComponentsModule;
4312
- }());
4313
-
4314
- /*
4315
- * Public API Surface of inspark-components
4316
- */
4317
-
4318
- /**
4319
- * Generated bundle index. Do not edit.
4320
- */
4321
-
4322
- 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 };
4323
- //# sourceMappingURL=inspark-inspark-components.js.map