oip-common 0.0.29 → 0.0.31

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.
@@ -1,223 +1,223 @@
1
- {
2
- "app-configurator": {
3
- "primary": "Основной",
4
- "surface": "Фон",
5
- "presets": "Стиль",
6
- "menuMode": "Режим меню"
7
- },
8
- "msgService": {
9
- "success": "Успешно",
10
- "info": "Информация",
11
- "warn": "Внимание",
12
- "error": "Ошибка",
13
- "secondary": "Вспомогательный"
14
- },
15
- "securityComponent": {
16
- "security": "Безопасность",
17
- "save": "Сохранить",
18
- "savedSecurity": "Настройки сохранены"
19
- },
20
- "profileComponent": {
21
- "changePhoto": "Загрузить фото",
22
- "successfullyUploaded": "Загружено"
23
- },
24
- "configComponent": {
25
- "profile": "Профиль",
26
- "photo": "Фото",
27
- "usePhoto256x256Pixel": "Используйте фото 256х256 пикселей",
28
- "localization": "Язык",
29
- "selectLanguage": "Выберите язык"
30
- },
31
- "baseComponent": {
32
- "content": "Содержимое",
33
- "settings": "Настройки",
34
- "security": "Безопасность",
35
- "success": "Сохранено"
36
- },
37
- "menuComponent": {
38
- "all": "Все",
39
- "new": "Добавить"
40
- },
41
- "menuItemEditDialogComponent": {
42
- "header": "Редактировать элемент меню",
43
- "label": "Имя",
44
- "icon": "Иконка",
45
- "cancel": "Отмена",
46
- "save": "Сохранить",
47
- "security": "Доступ на чтение"
48
- },
49
- "menuItemCreateDialogComponent": {
50
- "header": "Новый элемент меню",
51
- "parentLabel": "Родительский узел",
52
- "label": "Имя",
53
- "module": "Модуль",
54
- "selectModule": "Выбери модуль",
55
- "icon": "Иконка",
56
- "cancel": "Отмена",
57
- "save": "Сохранить"
58
- },
59
- "unauthorized": {
60
- "welcomeToOip": "Добро пожаловать в OIP!",
61
- "signInToContinue": "Войдите чтобы продолжить",
62
- "signIn": "Войти"
63
- },
64
- "menuItemComponent": {
65
- "new": "Добавить",
66
- "edit": "Редактировать",
67
- "delete": "Удалить",
68
- "deleteItemConfirmHeader": "Удаление",
69
- "deleteItemConfirmMessage": "Вы уверены что хотите удалить элемент?",
70
- "deleteItemSuccessMessage": "Успешно удалено",
71
- "deleteItemConfirmRejectButtonPropsLabel": "Отмена",
72
- "deleteItemConfirmAcceptButtonPropsLabel": "Удалить"
73
- },
74
- "topbar": {
75
- "logout": "Выход",
76
- "profile": "Профиль"
77
- },
78
- "primeng": {
79
- "accept": "Да",
80
- "addRule": "Добавить правило",
81
- "am": "до полудня",
82
- "apply": "Принять",
83
- "cancel": "Отмена",
84
- "choose": "Выбрать",
85
- "chooseDate": "Выбрать дату",
86
- "chooseMonth": "Выбрать месяц",
87
- "chooseYear": "Выбрать год",
88
- "clear": "Очистить",
89
- "completed": "Завершено",
90
- "contains": "Содержит",
91
- "custom": "Пользовательский",
92
- "dateAfter": "Дата после",
93
- "dateBefore": "Дата до",
94
- "dateFormat": "dd.mm.yy",
95
- "dateIs": "Дата равна",
96
- "dateIsNot": "Дата не равна",
97
- "dayNames": ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
98
- "dayNamesMin": ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
99
- "dayNamesShort": ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"],
100
- "emptyFilterMessage": "Результатов не найдено",
101
- "emptyMessage": "Нет доступных вариантов",
102
- "emptySearchMessage": "Результатов не найдено",
103
- "emptySelectionMessage": "Нет выбранного элемента",
104
- "endsWith": "Заканчивается",
105
- "equals": "Равно",
106
- "fileChosenMessage": "{0} файлов",
107
- "fileSizeTypes": ["Б", "Кб", "Мб", "Гб", "Тб", "Пб", "Эб", "Зб", "Йб"],
108
- "filter": "Фильтр",
109
- "firstDayOfWeek": 1,
110
- "gt": "Более чем",
111
- "gte": "Более чем или равно",
112
- "lt": "Меньше чем",
113
- "lte": "Меньше чем или равно",
114
- "matchAll": "Сопоставить все",
115
- "matchAny": "Совпадение с любым",
116
- "medium": "Нормальный",
117
- "monthNames": [
118
- "Январь",
119
- "Февраль",
120
- "Март",
121
- "Апрель",
122
- "Май",
123
- "Июнь",
124
- "Июль",
125
- "Август",
126
- "Сентябрь",
127
- "Октябрь",
128
- "Ноябрь",
129
- "Декабрь"
130
- ],
131
- "monthNamesShort": ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
132
- "nextDecade": "Следующее десятилетие",
133
- "nextHour": "Следующий час",
134
- "nextMinute": "Следующая минута",
135
- "nextMonth": "Следующий месяц",
136
- "nextSecond": "Следующая секунда",
137
- "nextYear": "Следующий год",
138
- "noFileChosenMessage": "Файл не выбран",
139
- "noFilter": "Нет фильтра",
140
- "notContains": "Не содержит",
141
- "notEquals": "Не равно",
142
- "now": "Сейчас",
143
- "passwordPrompt": "Введите пароль",
144
- "pending": "В ожидании",
145
- "pm": "после полудня",
146
- "prevDecade": "Предыдущее десятилетие",
147
- "prevHour": "Предыдущий час",
148
- "prevMinute": "Предыдущая минута",
149
- "prevMonth": "Предыдущий месяц",
150
- "prevSecond": "Предыдущая секунда",
151
- "prevYear": "Предыдущий год",
152
- "reject": "Нет",
153
- "removeRule": "Удалить правило",
154
- "searchMessage": "{0} результатов доступно",
155
- "selectionMessage": "{0} элементов выбрано",
156
- "showMonthAfterYear": false,
157
- "startsWith": "Начинается с",
158
- "strong": "Хороший",
159
- "today": "Сегодня",
160
- "upload": "Загрузить",
161
- "weak": "Простой",
162
- "weekHeader": "Нед.",
163
- "aria": {
164
- "cancelEdit": "Отменить правку",
165
- "close": "Закрыть",
166
- "collapseLabel": "Свернуть",
167
- "collapseRow": "Свернуть строку",
168
- "editRow": "Редактировать строку",
169
- "expandLabel": "Развернуть",
170
- "expandRow": "Развернуть строку",
171
- "falseLabel": "Неверно",
172
- "filterConstraint": "Ограничение фильтра",
173
- "filterOperator": "Оператор фильтра",
174
- "firstPageLabel": "Первая страница",
175
- "gridView": "В виде сетки",
176
- "hideFilterMenu": "Скрыть меню фильтра",
177
- "jumpToPageDropdownLabel": "Перейти к раскрывающемуся списку страниц",
178
- "jumpToPageInputLabel": "Перейти к вводу страницы",
179
- "lastPageLabel": "Последняя страница",
180
- "listLabel": "Список опций",
181
- "listView": "В виде списка",
182
- "moveAllToSource": "Переместить всё в источник",
183
- "moveAllToTarget": "Переместить всё в приёмник",
184
- "moveBottom": "Переместить в конец",
185
- "moveDown": "Переместить вниз",
186
- "moveTop": "Переместить в начало",
187
- "moveToSource": "Переместить в источник",
188
- "moveToTarget": "Переместить в приёмник",
189
- "moveUp": "Переместить вверх",
190
- "navigation": "Навигация",
191
- "next": "Следующий",
192
- "nextPageLabel": "Следующая страница",
193
- "nullLabel": "Не выбран",
194
- "otpLabel": "Введите символ одноразового пароля {0}",
195
- "pageLabel": "{page}",
196
- "passwordHide": "Скрыть пароль",
197
- "passwordShow": "Показать пароль",
198
- "previous": "Предыдущий",
199
- "prevPageLabel": "Предыдущая страница",
200
- "removeLabel": "Удалить",
201
- "rotateLeft": "Повернуть влево",
202
- "rotateRight": "Повернуть вправо",
203
- "rowsPerPageLabel": "Строк на странице",
204
- "saveEdit": "Сохранить правку",
205
- "scrollTop": "Прокрутить в начало",
206
- "selectAll": "Выбрать все строки",
207
- "selectLabel": "Выбрать",
208
- "selectRow": "Выбрать строку",
209
- "showFilterMenu": "Показать меню фильтра",
210
- "slide": "Слайд",
211
- "slideNumber": "{slideNumber}",
212
- "star": "1 звезда",
213
- "stars": "{star} звёзд",
214
- "trueLabel": "Верно",
215
- "unselectAll": "Отменить выбор всех строк",
216
- "unselectLabel": "Отменить выбор",
217
- "unselectRow": "Отменить выбор строки",
218
- "zoomImage": "Увеличить изображение",
219
- "zoomIn": "Увеличить",
220
- "zoomOut": "Уменьшить"
221
- }
222
- }
223
- }
1
+ {
2
+ "app-configurator": {
3
+ "primary": "Основной",
4
+ "surface": "Фон",
5
+ "presets": "Стиль",
6
+ "menuMode": "Режим меню"
7
+ },
8
+ "msgService": {
9
+ "success": "Успешно",
10
+ "info": "Информация",
11
+ "warn": "Внимание",
12
+ "error": "Ошибка",
13
+ "secondary": "Вспомогательный"
14
+ },
15
+ "securityComponent": {
16
+ "security": "Безопасность",
17
+ "save": "Сохранить",
18
+ "savedSecurity": "Настройки сохранены"
19
+ },
20
+ "profileComponent": {
21
+ "changePhoto": "Загрузить фото",
22
+ "successfullyUploaded": "Загружено"
23
+ },
24
+ "configComponent": {
25
+ "profile": "Профиль",
26
+ "photo": "Фото",
27
+ "usePhoto256x256Pixel": "Используйте фото 256х256 пикселей",
28
+ "localization": "Язык",
29
+ "selectLanguage": "Выберите язык"
30
+ },
31
+ "baseComponent": {
32
+ "content": "Содержимое",
33
+ "settings": "Настройки",
34
+ "security": "Безопасность",
35
+ "success": "Сохранено"
36
+ },
37
+ "menuComponent": {
38
+ "all": "Все",
39
+ "new": "Добавить"
40
+ },
41
+ "menuItemEditDialogComponent": {
42
+ "header": "Редактировать элемент меню",
43
+ "label": "Имя",
44
+ "icon": "Иконка",
45
+ "cancel": "Отмена",
46
+ "save": "Сохранить",
47
+ "security": "Доступ на чтение"
48
+ },
49
+ "menuItemCreateDialogComponent": {
50
+ "header": "Новый элемент меню",
51
+ "parentLabel": "Родительский узел",
52
+ "label": "Имя",
53
+ "module": "Модуль",
54
+ "selectModule": "Выбери модуль",
55
+ "icon": "Иконка",
56
+ "cancel": "Отмена",
57
+ "save": "Сохранить"
58
+ },
59
+ "unauthorized": {
60
+ "welcomeToOip": "Добро пожаловать в OIP!",
61
+ "signInToContinue": "Войдите чтобы продолжить",
62
+ "signIn": "Войти"
63
+ },
64
+ "menuItemComponent": {
65
+ "new": "Добавить",
66
+ "edit": "Редактировать",
67
+ "delete": "Удалить",
68
+ "deleteItemConfirmHeader": "Удаление",
69
+ "deleteItemConfirmMessage": "Вы уверены что хотите удалить элемент?",
70
+ "deleteItemSuccessMessage": "Успешно удалено",
71
+ "deleteItemConfirmRejectButtonPropsLabel": "Отмена",
72
+ "deleteItemConfirmAcceptButtonPropsLabel": "Удалить"
73
+ },
74
+ "topbar": {
75
+ "logout": "Выход",
76
+ "profile": "Профиль"
77
+ },
78
+ "primeng": {
79
+ "accept": "Да",
80
+ "addRule": "Добавить правило",
81
+ "am": "до полудня",
82
+ "apply": "Принять",
83
+ "cancel": "Отмена",
84
+ "choose": "Выбрать",
85
+ "chooseDate": "Выбрать дату",
86
+ "chooseMonth": "Выбрать месяц",
87
+ "chooseYear": "Выбрать год",
88
+ "clear": "Очистить",
89
+ "completed": "Завершено",
90
+ "contains": "Содержит",
91
+ "custom": "Пользовательский",
92
+ "dateAfter": "Дата после",
93
+ "dateBefore": "Дата до",
94
+ "dateFormat": "dd.mm.yy",
95
+ "dateIs": "Дата равна",
96
+ "dateIsNot": "Дата не равна",
97
+ "dayNames": ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
98
+ "dayNamesMin": ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
99
+ "dayNamesShort": ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"],
100
+ "emptyFilterMessage": "Результатов не найдено",
101
+ "emptyMessage": "Нет доступных вариантов",
102
+ "emptySearchMessage": "Результатов не найдено",
103
+ "emptySelectionMessage": "Нет выбранного элемента",
104
+ "endsWith": "Заканчивается",
105
+ "equals": "Равно",
106
+ "fileChosenMessage": "{0} файлов",
107
+ "fileSizeTypes": ["Б", "Кб", "Мб", "Гб", "Тб", "Пб", "Эб", "Зб", "Йб"],
108
+ "filter": "Фильтр",
109
+ "firstDayOfWeek": 1,
110
+ "gt": "Более чем",
111
+ "gte": "Более чем или равно",
112
+ "lt": "Меньше чем",
113
+ "lte": "Меньше чем или равно",
114
+ "matchAll": "Сопоставить все",
115
+ "matchAny": "Совпадение с любым",
116
+ "medium": "Нормальный",
117
+ "monthNames": [
118
+ "Январь",
119
+ "Февраль",
120
+ "Март",
121
+ "Апрель",
122
+ "Май",
123
+ "Июнь",
124
+ "Июль",
125
+ "Август",
126
+ "Сентябрь",
127
+ "Октябрь",
128
+ "Ноябрь",
129
+ "Декабрь"
130
+ ],
131
+ "monthNamesShort": ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
132
+ "nextDecade": "Следующее десятилетие",
133
+ "nextHour": "Следующий час",
134
+ "nextMinute": "Следующая минута",
135
+ "nextMonth": "Следующий месяц",
136
+ "nextSecond": "Следующая секунда",
137
+ "nextYear": "Следующий год",
138
+ "noFileChosenMessage": "Файл не выбран",
139
+ "noFilter": "Нет фильтра",
140
+ "notContains": "Не содержит",
141
+ "notEquals": "Не равно",
142
+ "now": "Сейчас",
143
+ "passwordPrompt": "Введите пароль",
144
+ "pending": "В ожидании",
145
+ "pm": "после полудня",
146
+ "prevDecade": "Предыдущее десятилетие",
147
+ "prevHour": "Предыдущий час",
148
+ "prevMinute": "Предыдущая минута",
149
+ "prevMonth": "Предыдущий месяц",
150
+ "prevSecond": "Предыдущая секунда",
151
+ "prevYear": "Предыдущий год",
152
+ "reject": "Нет",
153
+ "removeRule": "Удалить правило",
154
+ "searchMessage": "{0} результатов доступно",
155
+ "selectionMessage": "{0} элементов выбрано",
156
+ "showMonthAfterYear": false,
157
+ "startsWith": "Начинается с",
158
+ "strong": "Хороший",
159
+ "today": "Сегодня",
160
+ "upload": "Загрузить",
161
+ "weak": "Простой",
162
+ "weekHeader": "Нед.",
163
+ "aria": {
164
+ "cancelEdit": "Отменить правку",
165
+ "close": "Закрыть",
166
+ "collapseLabel": "Свернуть",
167
+ "collapseRow": "Свернуть строку",
168
+ "editRow": "Редактировать строку",
169
+ "expandLabel": "Развернуть",
170
+ "expandRow": "Развернуть строку",
171
+ "falseLabel": "Неверно",
172
+ "filterConstraint": "Ограничение фильтра",
173
+ "filterOperator": "Оператор фильтра",
174
+ "firstPageLabel": "Первая страница",
175
+ "gridView": "В виде сетки",
176
+ "hideFilterMenu": "Скрыть меню фильтра",
177
+ "jumpToPageDropdownLabel": "Перейти к раскрывающемуся списку страниц",
178
+ "jumpToPageInputLabel": "Перейти к вводу страницы",
179
+ "lastPageLabel": "Последняя страница",
180
+ "listLabel": "Список опций",
181
+ "listView": "В виде списка",
182
+ "moveAllToSource": "Переместить всё в источник",
183
+ "moveAllToTarget": "Переместить всё в приёмник",
184
+ "moveBottom": "Переместить в конец",
185
+ "moveDown": "Переместить вниз",
186
+ "moveTop": "Переместить в начало",
187
+ "moveToSource": "Переместить в источник",
188
+ "moveToTarget": "Переместить в приёмник",
189
+ "moveUp": "Переместить вверх",
190
+ "navigation": "Навигация",
191
+ "next": "Следующий",
192
+ "nextPageLabel": "Следующая страница",
193
+ "nullLabel": "Не выбран",
194
+ "otpLabel": "Введите символ одноразового пароля {0}",
195
+ "pageLabel": "{page}",
196
+ "passwordHide": "Скрыть пароль",
197
+ "passwordShow": "Показать пароль",
198
+ "previous": "Предыдущий",
199
+ "prevPageLabel": "Предыдущая страница",
200
+ "removeLabel": "Удалить",
201
+ "rotateLeft": "Повернуть влево",
202
+ "rotateRight": "Повернуть вправо",
203
+ "rowsPerPageLabel": "Строк на странице",
204
+ "saveEdit": "Сохранить правку",
205
+ "scrollTop": "Прокрутить в начало",
206
+ "selectAll": "Выбрать все строки",
207
+ "selectLabel": "Выбрать",
208
+ "selectRow": "Выбрать строку",
209
+ "showFilterMenu": "Показать меню фильтра",
210
+ "slide": "Слайд",
211
+ "slideNumber": "{slideNumber}",
212
+ "star": "1 звезда",
213
+ "stars": "{star} звёзд",
214
+ "trueLabel": "Верно",
215
+ "unselectAll": "Отменить выбор всех строк",
216
+ "unselectLabel": "Отменить выбор",
217
+ "unselectRow": "Отменить выбор строки",
218
+ "zoomImage": "Увеличить изображение",
219
+ "zoomIn": "Увеличить",
220
+ "zoomOut": "Уменьшить"
221
+ }
222
+ }
223
+ }
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, signal, computed, effect, ChangeDetectorRef, Component, Input, PLATFORM_ID, InjectionToken, HostBinding, EventEmitter, Output, ViewChild, Renderer2, Pipe } from '@angular/core';
2
+ import { Injectable, inject, signal, computed, effect, ChangeDetectorRef, Component, Input, PLATFORM_ID, InjectionToken, HostBinding, EventEmitter, Output, ViewChild, Renderer2, ApplicationRef, Pipe } from '@angular/core';
3
3
  import * as i2$5 from 'primeng/api';
4
4
  import { MessageService, ConfirmationService, PrimeIcons, SharedModule } from 'primeng/api';
5
5
  import { HttpErrorResponse, HttpClient as HttpClient$1, HttpHeaders } from '@angular/common/http';
@@ -3340,6 +3340,7 @@ class L10nService {
3340
3340
  this.translateService = inject(TranslateService);
3341
3341
  this.primeNg = inject(PrimeNG);
3342
3342
  this.layoutService = inject(LayoutService);
3343
+ this.appRef = inject(ApplicationRef);
3343
3344
  }
3344
3345
  /**
3345
3346
  * Loads translations for a specific component
@@ -3363,25 +3364,19 @@ class L10nService {
3363
3364
  * @param lang - Language code to load translations for
3364
3365
  */
3365
3366
  loadTranslations(component, lang) {
3366
- // Create unique key for this component-language combination
3367
3367
  const key = `${component}.${lang}`;
3368
- // Skip if translations are already loaded
3369
3368
  if (this.loadedTranslations.has(key)) {
3370
3369
  return;
3371
3370
  }
3372
3371
  try {
3373
- // Load translation file from assets
3374
3372
  this.httpClient.get(`./assets/i18n/${component}.${lang}.json`).subscribe((translations) => {
3375
- // Get existing translations for the language
3376
3373
  const current = this.translateService.translations[lang] || {};
3377
- // Merge new translations with existing ones
3378
3374
  this.translateService.setTranslation(lang, { ...current, ...translations }, true);
3379
- // Mark these translations as loaded
3380
3375
  this.loadedTranslations.add(key);
3381
3376
  });
3382
3377
  }
3383
3378
  catch (e) {
3384
- console.warn(`No translations found for ${component}.${lang}.json`);
3379
+ console.error(`No translations found for ${component}.${lang}.json`);
3385
3380
  console.error(e);
3386
3381
  }
3387
3382
  }
@@ -3399,9 +3394,10 @@ class L10nService {
3399
3394
  this.translateService.addLangs(languages.map((x) => x.code));
3400
3395
  const lang = this.layoutService.language() ? this.layoutService.language() : 'en';
3401
3396
  this.translateService.setDefaultLang(lang);
3402
- this.translateService.use(lang);
3403
- this.loadComponentTranslations('app-info');
3404
- this.translateService.get('primeng').subscribe((res) => this.primeNg.setTranslation(res));
3397
+ this.translateService.use(lang).subscribe(() => {
3398
+ this.loadComponentTranslations('app-info');
3399
+ this.translateService.get('primeng').subscribe((res) => this.primeNg.setTranslation(res));
3400
+ });
3405
3401
  }
3406
3402
  instant(key, interpolateParams) {
3407
3403
  return this.translateService.instant(key, interpolateParams);
@@ -4498,17 +4494,6 @@ class NotificationService {
4498
4494
  this.msgService.add(opt);
4499
4495
  });
4500
4496
  }
4501
- async startConnection() {
4502
- try {
4503
- await this.connection.start();
4504
- console.log('SignalR Connected');
4505
- }
4506
- catch (err) {
4507
- this.msgService.error(err.message);
4508
- console.error('SignalR Connection Failed: ', err);
4509
- setTimeout(() => this.startConnection(), 5000);
4510
- }
4511
- }
4512
4497
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4513
4498
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
4514
4499
  }