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