@inspark/inspark-components 1.0.44 → 14.0.0

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