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