aril 1.2.47 → 1.2.49

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 (139) hide show
  1. package/boot/config/apps/src/interfaces.d.ts +14 -0
  2. package/esm2022/boot/bridge/index.mjs +1 -1
  3. package/esm2022/boot/bridge/src/mfe-bridge.mjs +1 -1
  4. package/esm2022/boot/bridge/src/provide-mfe-bridge.mjs +1 -1
  5. package/esm2022/boot/config/api/index.mjs +1 -1
  6. package/esm2022/boot/config/apps/src/apps.service.mjs +1 -1
  7. package/esm2022/boot/config/apps/src/auth.guard.mjs +1 -1
  8. package/esm2022/boot/config/apps/src/interfaces.mjs +1 -1
  9. package/esm2022/boot/config/apps/src/route-permissions.mjs +1 -1
  10. package/esm2022/boot/config/plugins/src/getNgZone.mjs +1 -1
  11. package/esm2022/boot/config/plugins/src/interfaces.mjs +1 -1
  12. package/esm2022/boot/config/plugins/src/plugins.service.mjs +1 -1
  13. package/esm2022/boot/config/translate/primeng/i18n/tr.mjs +1 -1
  14. package/esm2022/boot/host/src/app.component.mjs +1 -1
  15. package/esm2022/boot/mfe/src/app.component.mjs +13 -13
  16. package/esm2022/boot/mfe/src/bootstrap.mjs +1 -1
  17. package/esm2022/boot/pages/index.mjs +1 -1
  18. package/esm2022/boot/pages/src/forbidden.component.mjs +51 -51
  19. package/esm2022/boot/pages/src/notFound.component.mjs +47 -47
  20. package/esm2022/http/lib/enums.mjs +1 -1
  21. package/esm2022/http/src/serviceBase.mjs +1 -1
  22. package/esm2022/http/src/serviceStateMethods.mjs +1 -1
  23. package/esm2022/keycloak/src/auth.interceptor.mjs +1 -1
  24. package/esm2022/provider/src/prodiveHostRouter.mjs +1 -1
  25. package/esm2022/provider/src/provideHostKeycloak.mjs +1 -1
  26. package/esm2022/superset/index.mjs +1 -1
  27. package/esm2022/theme/layout/app/breadcrumb/app.breadcrumb.component.mjs +1 -1
  28. package/esm2022/theme/layout/app/expandableMenu/expandable-menu.component.mjs +16 -8
  29. package/esm2022/theme/layout/app/general-search/general-search.component.mjs +1 -1
  30. package/esm2022/theme/layout/app/site-map/site-map-sidebar.component.mjs +1 -1
  31. package/esm2022/theme/layout/app/static-sidebar/static-sidebar.component.mjs +19 -11
  32. package/esm2022/theme/layout/index.mjs +1 -1
  33. package/esm2022/theme/layout/service/interfaces/enum.mjs +1 -1
  34. package/esm2022/theme/layout/service/interfaces/interfaces.mjs +1 -1
  35. package/esm2022/theme/layout/service/menu-action-confirm.mjs +73 -0
  36. package/esm2022/theme/layout/service/selection-group.service.mjs +72 -6
  37. package/esm2022/ui/autoComplete/src/auto-complete.component.mjs +1 -1
  38. package/esm2022/ui/button/src/button.component.mjs +1 -1
  39. package/esm2022/ui/chip/src/chip.component.mjs +1 -1
  40. package/esm2022/ui/form/src/form-submit-button.component.mjs +3 -3
  41. package/esm2022/ui/table/src/table.component.mjs +3 -3
  42. package/esm2022/ui/table-expand/src/table.component.mjs +3 -3
  43. package/esm2022/ui/treeTable/src/tree-table.component.mjs +1 -1
  44. package/esm2022/ui-business/assetPicker/index.mjs +1 -1
  45. package/esm2022/ui-business/assetPicker/src/asset-picker.component.mjs +3 -3
  46. package/esm2022/ui-business/detailed-overlay-panel/src/detailed-overlay-panel.component.mjs +3 -3
  47. package/esm2022/ui-business/enumPicker/src/interface.mjs +1 -1
  48. package/esm2022/ui-business/multiAssetPicker/index.mjs +1 -1
  49. package/esm2022/ui-business/multiAssetPicker/src/multi-asset-picker.component.mjs +3 -3
  50. package/esm2022/ui-business/pdf-preview-modal/index.mjs +1 -1
  51. package/esm2022/ui-business/pdf-preview-modal/src/open-pdf-preview.mjs +1 -1
  52. package/esm2022/ui-business/pdf-preview-modal/src/pdf-preview-modal.component.mjs +27 -27
  53. package/esm2022/ui-business/ref-value/src/ref-value.component.mjs +3 -3
  54. package/esm2022/ui-business/trace-drawer/index.mjs +1 -1
  55. package/esm2022/ui-business/trace-drawer/src/app-log.service.mjs +1 -1
  56. package/esm2022/ui-business/trace-drawer/src/trace-log.service.mjs +1 -1
  57. package/esm2022/ui-business/trace-id/index.mjs +1 -1
  58. package/esm2022/ui-business/trace-id/src/trace-id.component.mjs +3 -3
  59. package/esm2022/util/activity/index.mjs +1 -1
  60. package/esm2022/util/activity/src/activity.constants.mjs +1 -1
  61. package/esm2022/util/activity/src/activity.service.mjs +1 -1
  62. package/esm2022/util/activity/src/activity.types.mjs +1 -1
  63. package/esm2022/util/directives/src/detail-page-customization/detail-page-customization.directive.mjs +1 -1
  64. package/esm2022/util/pipes/src/translate-json/translate-json.pipe.mjs +1 -1
  65. package/fesm2022/{aril-app.component-YBy2gyza.mjs → aril-app.component-BUjucZ0J.mjs} +13 -13
  66. package/fesm2022/aril-app.component-BUjucZ0J.mjs.map +1 -0
  67. package/fesm2022/aril-boot-bridge.mjs.map +1 -1
  68. package/fesm2022/aril-boot-config-apps.mjs.map +1 -1
  69. package/fesm2022/aril-boot-config-plugins.mjs.map +1 -1
  70. package/fesm2022/aril-boot-config-translate.mjs.map +1 -1
  71. package/fesm2022/aril-boot-host.mjs.map +1 -1
  72. package/fesm2022/{aril-boot-mfe-app.component-GbZAGlTf.mjs → aril-boot-mfe-app.component-D1w8I2ug.mjs} +14 -14
  73. package/fesm2022/aril-boot-mfe-app.component-D1w8I2ug.mjs.map +1 -0
  74. package/fesm2022/{aril-boot-mfe-aril-boot-mfe-I5xT2fQx.mjs → aril-boot-mfe-aril-boot-mfe-JHrhKvhU.mjs} +2 -2
  75. package/fesm2022/aril-boot-mfe-aril-boot-mfe-JHrhKvhU.mjs.map +1 -0
  76. package/fesm2022/aril-boot-mfe.mjs +1 -1
  77. package/fesm2022/aril-boot-pages.mjs +96 -96
  78. package/fesm2022/aril-boot-pages.mjs.map +1 -1
  79. package/fesm2022/aril-http.mjs.map +1 -1
  80. package/fesm2022/aril-keycloak.mjs.map +1 -1
  81. package/fesm2022/aril-provider.mjs.map +1 -1
  82. package/fesm2022/aril-theme-layout.mjs +184 -33
  83. package/fesm2022/aril-theme-layout.mjs.map +1 -1
  84. package/fesm2022/aril-ui-autoComplete.mjs.map +1 -1
  85. package/fesm2022/aril-ui-business-assetPicker.mjs +2 -2
  86. package/fesm2022/aril-ui-business-assetPicker.mjs.map +1 -1
  87. package/fesm2022/aril-ui-business-detailed-overlay-panel.mjs +2 -2
  88. package/fesm2022/aril-ui-business-detailed-overlay-panel.mjs.map +1 -1
  89. package/fesm2022/aril-ui-business-multiAssetPicker.mjs +2 -2
  90. package/fesm2022/aril-ui-business-multiAssetPicker.mjs.map +1 -1
  91. package/fesm2022/aril-ui-business-pdf-preview-modal.mjs +26 -26
  92. package/fesm2022/aril-ui-business-pdf-preview-modal.mjs.map +1 -1
  93. package/fesm2022/aril-ui-business-ref-value.mjs +2 -2
  94. package/fesm2022/aril-ui-business-ref-value.mjs.map +1 -1
  95. package/fesm2022/aril-ui-business-trace-drawer.mjs.map +1 -1
  96. package/fesm2022/aril-ui-business-trace-id.mjs +2 -2
  97. package/fesm2022/aril-ui-business-trace-id.mjs.map +1 -1
  98. package/fesm2022/aril-ui-button.mjs.map +1 -1
  99. package/fesm2022/aril-ui-chip.mjs.map +1 -1
  100. package/fesm2022/aril-ui-form.mjs +2 -2
  101. package/fesm2022/aril-ui-form.mjs.map +1 -1
  102. package/fesm2022/aril-ui-table-expand.mjs +2 -2
  103. package/fesm2022/aril-ui-table-expand.mjs.map +1 -1
  104. package/fesm2022/aril-ui-table.mjs +2 -2
  105. package/fesm2022/aril-ui-table.mjs.map +1 -1
  106. package/fesm2022/aril-ui-treeTable.mjs.map +1 -1
  107. package/fesm2022/aril-util-activity.mjs.map +1 -1
  108. package/fesm2022/aril-util-directives.mjs.map +1 -1
  109. package/fesm2022/aril-util-pipes.mjs.map +1 -1
  110. package/fesm2022/aril.mjs +1 -1
  111. package/fesm2022/aril.mjs.map +1 -1
  112. package/package.json +66 -66
  113. package/theme/layout/app/breadcrumb/app.breadcrumb.component.ts +127 -127
  114. package/theme/layout/app/expandableMenu/expandable-menu.component.d.ts +4 -1
  115. package/theme/layout/app/expandableMenu/expandable-menu.component.html +137 -137
  116. package/theme/layout/app/expandableMenu/expandable-menu.component.ts +387 -373
  117. package/theme/layout/app/general-search/general-search.component.ts +93 -93
  118. package/theme/layout/app/site-map/site-map-sidebar.component.ts +195 -195
  119. package/theme/layout/app/static-sidebar/static-sidebar.component.d.ts +4 -1
  120. package/theme/layout/app/static-sidebar/static-sidebar.component.html +162 -162
  121. package/theme/layout/app/static-sidebar/static-sidebar.component.ts +357 -343
  122. package/theme/layout/index.ts +9 -9
  123. package/theme/layout/service/interfaces/enum.ts +19 -19
  124. package/theme/layout/service/interfaces/interfaces.d.ts +7 -0
  125. package/theme/layout/service/interfaces/interfaces.ts +8 -0
  126. package/theme/layout/service/menu-action-confirm.d.ts +15 -0
  127. package/theme/layout/service/menu-action-confirm.ts +112 -0
  128. package/theme/layout/service/selection-group.service.d.ts +12 -0
  129. package/theme/layout/service/selection-group.service.ts +78 -7
  130. package/theme/styles/layout/_fonts.scss +81 -81
  131. package/theme/styles/theme/base/components/input/_inputtext.scss +104 -104
  132. package/theme/styles/theme/base/components/overlay/_sidebar.scss +27 -27
  133. package/theme/styles/theme/base/components/panel/_stepper.scss +205 -205
  134. package/theme/styles/theme/dark/_variables.scss +933 -933
  135. package/theme/styles/theme/light/_variables.scss +940 -940
  136. package/ui/table/src/table.component.d.ts +1 -1
  137. package/fesm2022/aril-app.component-YBy2gyza.mjs.map +0 -1
  138. package/fesm2022/aril-boot-mfe-app.component-GbZAGlTf.mjs.map +0 -1
  139. package/fesm2022/aril-boot-mfe-aril-boot-mfe-I5xT2fQx.mjs.map +0 -1
@@ -1,9 +1,9 @@
1
- export * from './app/layout/app.layout.component';
2
- export * from './app/layout/mfe.layout.component';
3
- export * from './service/app.menu.service';
4
- export * from './service/selection-group.service';
5
- export * from './service/breadcrumb.service';
6
- export * from './service/app.layout.service';
7
- export * from './app/favorite-pages/favorite-pages.service';
8
- export * from './service/interfaces/enum';
9
- export * from './service/interfaces/interfaces';
1
+ export * from './app/layout/app.layout.component';
2
+ export * from './app/layout/mfe.layout.component';
3
+ export * from './service/app.menu.service';
4
+ export * from './service/selection-group.service';
5
+ export * from './service/breadcrumb.service';
6
+ export * from './service/app.layout.service';
7
+ export * from './app/favorite-pages/favorite-pages.service';
8
+ export * from './service/interfaces/enum';
9
+ export * from './service/interfaces/interfaces';
@@ -1,19 +1,19 @@
1
- export enum LanguageCode {
2
- TR = 'tr',
3
- EN = 'en'
4
- }
5
-
6
- export enum ActivityTypesEnum {
7
- SMS = 'SMS',
8
- EMAIL = 'MAIL'
9
- }
10
-
11
- export enum DetailNotificationTypeEnum {
12
- TODO_ITEM = 'TODO_ITEM',
13
- BATCH_JOB = 'BATCH_JOB'
14
- }
15
-
16
- export enum Environment {
17
- DG = 'dg',
18
- PER = 'per'
19
- }
1
+ export enum LanguageCode {
2
+ TR = 'tr',
3
+ EN = 'en'
4
+ }
5
+
6
+ export enum ActivityTypesEnum {
7
+ SMS = 'SMS',
8
+ EMAIL = 'MAIL'
9
+ }
10
+
11
+ export enum DetailNotificationTypeEnum {
12
+ TODO_ITEM = 'TODO_ITEM',
13
+ BATCH_JOB = 'BATCH_JOB'
14
+ }
15
+
16
+ export enum Environment {
17
+ DG = 'dg',
18
+ PER = 'per'
19
+ }
@@ -22,6 +22,13 @@ export interface SelectionGroupDTO {
22
22
  dynamicQuery: string;
23
23
  parentGroupId: number;
24
24
  selectionItems: SelectionItem[];
25
+ /** Sunucudaki tanım her değiştiğinde artar; önbelleğin tazeliği bununla doğrulanır. */
26
+ version: number;
27
+ }
28
+ /** `/selection-group/versions` ucunun hafif yanıtı: yalnız Fixed grupların adı ve sürümü. */
29
+ export interface SelectionGroupVersionDTO {
30
+ groupName: string;
31
+ version: number;
25
32
  }
26
33
  export interface SelectionItem {
27
34
  id: number;
@@ -31,6 +31,14 @@ export interface SelectionGroupDTO {
31
31
  dynamicQuery: string;
32
32
  parentGroupId: number;
33
33
  selectionItems: SelectionItem[];
34
+ /** Sunucudaki tanım her değiştiğinde artar; önbelleğin tazeliği bununla doğrulanır. */
35
+ version: number;
36
+ }
37
+
38
+ /** `/selection-group/versions` ucunun hafif yanıtı: yalnız Fixed grupların adı ve sürümü. */
39
+ export interface SelectionGroupVersionDTO {
40
+ groupName: string;
41
+ version: number;
34
42
  }
35
43
 
36
44
  export interface SelectionItem {
@@ -0,0 +1,15 @@
1
+ import { ConfirmationService } from 'primeng/api';
2
+ import { TranslocoService } from '@ngneat/transloco';
3
+ import { MenuItemAction } from 'aril/boot/config/apps';
4
+ export interface MenuActionConfirmDeps {
5
+ confirmationService: ConfirmationService;
6
+ translocoService: TranslocoService;
7
+ }
8
+ /**
9
+ * A menu action is a write on the server the moment the item is clicked — a wizard menu item starts
10
+ * a state machine — so confirmation is the default for every method but GET. `confirm: false` opts out.
11
+ */
12
+ export declare function isGetAction(action: MenuItemAction): boolean;
13
+ export declare function menuActionNeedsConfirm(action?: MenuItemAction): boolean;
14
+ /** Runs `accept` directly when no confirmation is needed, otherwise asks first. */
15
+ export declare function confirmMenuAction(deps: MenuActionConfirmDeps, action: MenuItemAction, menuLabel: string, accept: () => void): void;
@@ -0,0 +1,112 @@
1
+ import { ConfirmationService } from 'primeng/api';
2
+
3
+ import { TranslocoService } from '@ngneat/transloco';
4
+
5
+ import { MenuItemAction, MenuItemActionConfirm } from 'aril/boot/config/apps';
6
+
7
+ /** Confirm dialog anchored once in the layout templates (`<p-confirmDialog key="confirmDialog-root" />`). */
8
+ const CONFIRM_DIALOG_KEY = 'confirmDialog-root';
9
+ const HEADER_KEY = 'menuActionConfirmHeader';
10
+ const MESSAGE_KEY = 'menuActionConfirmMessage';
11
+
12
+ /** Used when the host application has not translated the keys above yet. */
13
+ const HEADER_FALLBACK: Record<string, string> = {
14
+ tr: 'İşlem Onayı',
15
+ en: 'Confirm Action'
16
+ };
17
+
18
+ const MESSAGE_FALLBACK: Record<string, string> = {
19
+ tr: '"{{menu}}" süreci başlatılacak. Devam edilsin mi?',
20
+ en: 'The "{{menu}}" process will be started. Do you want to continue?'
21
+ };
22
+
23
+ export interface MenuActionConfirmDeps {
24
+ confirmationService: ConfirmationService;
25
+ translocoService: TranslocoService;
26
+ }
27
+
28
+ /**
29
+ * A menu action is a write on the server the moment the item is clicked — a wizard menu item starts
30
+ * a state machine — so confirmation is the default for every method but GET. `confirm: false` opts out.
31
+ */
32
+ export function isGetAction(action: MenuItemAction): boolean {
33
+ return (action.method ?? '').toUpperCase() === 'GET';
34
+ }
35
+
36
+ export function menuActionNeedsConfirm(action?: MenuItemAction): boolean {
37
+ if (!action) {
38
+ return false;
39
+ }
40
+
41
+ if (action.confirm === false) {
42
+ return false;
43
+ }
44
+
45
+ if (action.confirm) {
46
+ return true;
47
+ }
48
+
49
+ return !isGetAction(action);
50
+ }
51
+
52
+ /** Runs `accept` directly when no confirmation is needed, otherwise asks first. */
53
+ export function confirmMenuAction(
54
+ deps: MenuActionConfirmDeps,
55
+ action: MenuItemAction,
56
+ menuLabel: string,
57
+ accept: () => void
58
+ ): void {
59
+ if (!menuActionNeedsConfirm(action)) {
60
+ accept();
61
+ return;
62
+ }
63
+
64
+ const options: MenuItemActionConfirm = action.confirm && typeof action.confirm === 'object' ? action.confirm : {};
65
+
66
+ deps.confirmationService.confirm({
67
+ key: CONFIRM_DIALOG_KEY,
68
+ header: buildHeader(deps.translocoService, options),
69
+ message: buildMessage(deps.translocoService, options, menuLabel),
70
+ icon: 'pi pi-info-circle',
71
+ acceptLabel: deps.translocoService.translate('acceptButtonLabel'),
72
+ rejectLabel: deps.translocoService.translate('rejectButtonLabel'),
73
+ acceptButtonStyleClass: 'p-button-success',
74
+ rejectButtonStyleClass: 'p-button-danger',
75
+ accept
76
+ });
77
+ }
78
+
79
+ function buildHeader(translocoService: TranslocoService, options: MenuItemActionConfirm): string {
80
+ const key = options.headerKey ?? HEADER_KEY;
81
+
82
+ return translateOrFallback(translocoService, key, {}, HEADER_FALLBACK);
83
+ }
84
+
85
+ function buildMessage(translocoService: TranslocoService, options: MenuItemActionConfirm, menuLabel: string): string {
86
+ if (options.message) {
87
+ return options.message;
88
+ }
89
+
90
+ const key = options.messageKey ?? MESSAGE_KEY;
91
+
92
+ return translateOrFallback(translocoService, key, { menu: menuLabel }, MESSAGE_FALLBACK);
93
+ }
94
+
95
+ function translateOrFallback(
96
+ translocoService: TranslocoService,
97
+ key: string,
98
+ params: Record<string, string>,
99
+ fallbacks: Record<string, string>
100
+ ): string {
101
+ const translated = translocoService.translate(key, params);
102
+
103
+ // Transloco echoes the key back when it is missing from the host application's dictionary.
104
+ if (translated && translated !== key) {
105
+ return translated;
106
+ }
107
+
108
+ const lang = translocoService.getActiveLang();
109
+ const fallback = fallbacks[lang] ?? fallbacks['en'];
110
+
111
+ return Object.entries(params).reduce((text, [name, value]) => text.split(`{{${name}}}`).join(value), fallback);
112
+ }
@@ -10,7 +10,19 @@ export declare class SelectionGroupService {
10
10
  private loaded;
11
11
  constructor(http: HttpClient);
12
12
  private loadStatesFromLocalStorage;
13
+ /**
14
+ * Önbellek kendi başına bayatlar: bir grubun etiketi sunucuda değiştiğinde localStorage'daki
15
+ * kopya güncellenmez ve kullanıcı eski etiketi süresiz görür. Bu yüzden açılışta grup sürümleri
16
+ * okunur ve yalnız değişenler düşürülür; düşen grubu bileşenlerin mevcut "grup yoksa fetchEnum"
17
+ * yolu yeniden çeker.
18
+ *
19
+ * Sürüm listesi alınamazsa önbelleğe DOKUNULMAZ: davranış bu durumda bugünküne eşitlenir,
20
+ * yani tazelik kaybedilir ama hiçbir etiket kaybolmaz.
21
+ */
22
+ private revalidateCachedGroups;
23
+ private dropStaleGroups;
13
24
  fetchEnum(groupName: string, parentSelectionKey?: string): void;
25
+ private hostApi;
14
26
  isLoading(groupName: string): boolean;
15
27
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectionGroupService, never>;
16
28
  static ɵprov: i0.ɵɵInjectableDeclaration<SelectionGroupService>;
@@ -5,7 +5,9 @@ import { take } from 'rxjs';
5
5
 
6
6
  import { API_CONFIGS } from 'aril/boot/config/api';
7
7
 
8
- import { SelectionGroupDTO, SelectionRequestDTO } from './interfaces/interfaces';
8
+ import { SelectionGroupDTO, SelectionGroupVersionDTO, SelectionRequestDTO } from './interfaces/interfaces';
9
+
10
+ const STORAGE_KEY = 'selection-groups';
9
11
 
10
12
  @Injectable({
11
13
  providedIn: 'root'
@@ -18,15 +20,21 @@ export class SelectionGroupService {
18
20
 
19
21
  constructor(private http: HttpClient) {
20
22
  this.loadStatesFromLocalStorage();
23
+ this.revalidateCachedGroups();
21
24
 
22
25
  effect(() => {
23
- const encodedData = btoa(encodeURI(JSON.stringify(this.selectionGroups())));
24
- localStorage.setItem('selection-groups', encodedData);
26
+ try {
27
+ const encodedData = btoa(encodeURI(JSON.stringify(this.selectionGroups())));
28
+ localStorage.setItem(STORAGE_KEY, encodedData);
29
+ } catch (e) {
30
+ // Kota dolduysa ya da depolama kapalıysa yalnızca önbellek kaybolur; gruplar sunucudan çekilmeye devam eder.
31
+ console.warn('Selection groups could not be cached', e);
32
+ }
25
33
  });
26
34
  }
27
35
 
28
36
  private async loadStatesFromLocalStorage() {
29
- const selectionGroups = localStorage.getItem('selection-groups');
37
+ const selectionGroups = localStorage.getItem(STORAGE_KEY);
30
38
 
31
39
  if (selectionGroups) {
32
40
  try {
@@ -38,6 +46,67 @@ export class SelectionGroupService {
38
46
  }
39
47
  }
40
48
 
49
+ /**
50
+ * Önbellek kendi başına bayatlar: bir grubun etiketi sunucuda değiştiğinde localStorage'daki
51
+ * kopya güncellenmez ve kullanıcı eski etiketi süresiz görür. Bu yüzden açılışta grup sürümleri
52
+ * okunur ve yalnız değişenler düşürülür; düşen grubu bileşenlerin mevcut "grup yoksa fetchEnum"
53
+ * yolu yeniden çeker.
54
+ *
55
+ * Sürüm listesi alınamazsa önbelleğe DOKUNULMAZ: davranış bu durumda bugünküne eşitlenir,
56
+ * yani tazelik kaybedilir ama hiçbir etiket kaybolmaz.
57
+ */
58
+ private revalidateCachedGroups() {
59
+ if (!Object.keys(this.selectionGroups()).length) return;
60
+
61
+ this.http
62
+ .get<SelectionGroupVersionDTO[]>(this.hostApi() + '/selection-group/versions')
63
+ .pipe(take(1))
64
+ .subscribe({
65
+ next: (versions) => {
66
+ // Gövdesiz/biçimsiz yanıt "sürüm bilinmiyor" demektir; hata yolundaki gibi önbellek korunur.
67
+ if (!Array.isArray(versions)) return;
68
+ this.dropStaleGroups(versions);
69
+ },
70
+ error: () => {
71
+ console.debug('Selection group versions unavailable; cached groups are kept as is.');
72
+ }
73
+ });
74
+ }
75
+
76
+ private dropStaleGroups(versions: SelectionGroupVersionDTO[]) {
77
+ const serverVersions = new Map(versions.map((version) => [version.groupName, version.version]));
78
+
79
+ this.selectionGroups.update((groups) => {
80
+ const next = { ...groups };
81
+ let dropped = false;
82
+
83
+ for (const key of Object.keys(next)) {
84
+ const group = next[key];
85
+ if (!group) continue;
86
+
87
+ // Yalnız localStorage'dan gelen girdiler doğrulanır. Bu oturumda istenmiş bir grup zaten
88
+ // tazedir ve düşürülmemelidir: tüketiciler kendi "istedim" kaydını tuttuğu için (bkz.
89
+ // TableComponent.requestedEnumKeys) düşen grubu yeniden istemezler ve seçenekleri
90
+ // kalıcı olarak boş kalır. `has`, süren istekleri de kapsar: fetchEnum başlarken false,
91
+ // biterken true yazar.
92
+ if (this.loaded.has(key)) continue;
93
+
94
+ // Anahtar `groupName~parentSelectionKey` biçimindedir: aynı grubun her parent varyantı
95
+ // ayrı bir girdidir ve grup değiştiğinde hepsi birlikte düşmelidir.
96
+ const serverVersion = serverVersions.get(key.split('~')[0]);
97
+
98
+ // Sunucu yalnız Fixed grupların sürümünü döndürür. Sürümü gelmeyen grup ya Dynamic'tir
99
+ // (içeriği sorgudan üretilir, doğrulanamaz) ya da silinmiştir; ikisinde de tutulmaz.
100
+ if (serverVersion !== undefined && serverVersion === group.version) continue;
101
+
102
+ delete next[key];
103
+ dropped = true;
104
+ }
105
+
106
+ return dropped ? next : groups;
107
+ });
108
+ }
109
+
41
110
  fetchEnum(groupName: string, parentSelectionKey: string = 'ALL') {
42
111
  const key = groupName + '~' + parentSelectionKey;
43
112
 
@@ -51,10 +120,8 @@ export class SelectionGroupService {
51
120
  this.loading.set(key, true);
52
121
  this.loaded.set(key, false);
53
122
 
54
- const hostApi = API_CONFIGS.api.replace(/\/[^\/]+\/v1$/, `/host/v1`);
55
-
56
123
  this.http
57
- .post<SelectionGroupDTO>(hostApi + '/selection-group/load', payload)
124
+ .post<SelectionGroupDTO>(this.hostApi() + '/selection-group/load', payload)
58
125
  .pipe(take(1))
59
126
  .subscribe((selectionGroup) => {
60
127
  this.loading.set(key, false);
@@ -67,6 +134,10 @@ export class SelectionGroupService {
67
134
  });
68
135
  }
69
136
 
137
+ private hostApi(): string {
138
+ return API_CONFIGS.api.replace(/\/[^\/]+\/v1$/, `/host/v1`);
139
+ }
140
+
70
141
  isLoading(groupName: string): boolean {
71
142
  return this.loading.get(groupName) ?? false;
72
143
  }
@@ -1,81 +1,81 @@
1
- /* poppins-regular - latin */
2
- @font-face {
3
- font-family: 'Poppins';
4
- font-style: normal;
5
- font-weight: 400;
6
- src:
7
- local(''),
8
- url('../../fonts/poppins-v20-latin-regular.woff2') format('woff2'),
9
- /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/poppins-v20-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
10
- }
11
- /* poppins-500 - latin */
12
- @font-face {
13
- font-family: 'Poppins';
14
- font-style: normal;
15
- font-weight: 500;
16
- src:
17
- local(''),
18
- url('../../fonts/poppins-v20-latin-500.woff2') format('woff2'),
19
- /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/poppins-v20-latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
20
- }
21
- /* poppins-600 - latin */
22
- @font-face {
23
- font-family: 'Poppins';
24
- font-style: normal;
25
- font-weight: 600;
26
- src:
27
- local(''),
28
- url('../../fonts/poppins-v20-latin-600.woff2') format('woff2'),
29
- /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/poppins-v20-latin-600.woff') format('woff');
30
- }
31
- /* poppins-700 - latin */
32
- @font-face {
33
- font-family: 'Poppins';
34
- font-style: normal;
35
- font-weight: 700;
36
- src:
37
- local(''),
38
- url('../../fonts/poppins-v20-latin-700.woff2') format('woff2'),
39
- /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/poppins-v20-latin-700.woff') format('woff');
40
- }
41
-
42
- @font-face {
43
- font-family: 'Inter';
44
- font-style: normal;
45
- font-weight: 400;
46
- src:
47
- local(''),
48
- url('../../fonts/Inter/woff/Inter18pt-Regular.woff2') format('woff2'),
49
- /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/Inter/woff/Inter18pt-Regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
50
- }
51
-
52
-
53
- @font-face {
54
- font-family: 'Inter';
55
- font-style: normal;
56
- font-weight: 500;
57
- src:
58
- local(''),
59
- url('../../fonts/Inter/woff/Inter18pt-Medium.woff2') format('woff2'),
60
- /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/Inter/woff/Inter18pt-Medium.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
61
- }
62
-
63
- @font-face {
64
- font-family: 'Inter';
65
- font-style: normal;
66
- font-weight: 600;
67
- src:
68
- local(''),
69
- url('../../fonts/Inter/woff/Inter18pt-SemiBold.woff2') format('woff2'),
70
- /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/Inter/woff/Inter18pt-SemiBold.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
71
- }
72
-
73
- @font-face {
74
- font-family: 'Inter';
75
- font-style: normal;
76
- font-weight: 700;
77
- src:
78
- local(''),
79
- url('../../fonts/Inter/woff/Inter18pt-Bold.woff2') format('woff2'),
80
- /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/Inter/woff/Inter18pt-Bold.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
81
- }
1
+ /* poppins-regular - latin */
2
+ @font-face {
3
+ font-family: 'Poppins';
4
+ font-style: normal;
5
+ font-weight: 400;
6
+ src:
7
+ local(''),
8
+ url('../../fonts/poppins-v20-latin-regular.woff2') format('woff2'),
9
+ /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/poppins-v20-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
10
+ }
11
+ /* poppins-500 - latin */
12
+ @font-face {
13
+ font-family: 'Poppins';
14
+ font-style: normal;
15
+ font-weight: 500;
16
+ src:
17
+ local(''),
18
+ url('../../fonts/poppins-v20-latin-500.woff2') format('woff2'),
19
+ /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/poppins-v20-latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
20
+ }
21
+ /* poppins-600 - latin */
22
+ @font-face {
23
+ font-family: 'Poppins';
24
+ font-style: normal;
25
+ font-weight: 600;
26
+ src:
27
+ local(''),
28
+ url('../../fonts/poppins-v20-latin-600.woff2') format('woff2'),
29
+ /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/poppins-v20-latin-600.woff') format('woff');
30
+ }
31
+ /* poppins-700 - latin */
32
+ @font-face {
33
+ font-family: 'Poppins';
34
+ font-style: normal;
35
+ font-weight: 700;
36
+ src:
37
+ local(''),
38
+ url('../../fonts/poppins-v20-latin-700.woff2') format('woff2'),
39
+ /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/poppins-v20-latin-700.woff') format('woff');
40
+ }
41
+
42
+ @font-face {
43
+ font-family: 'Inter';
44
+ font-style: normal;
45
+ font-weight: 400;
46
+ src:
47
+ local(''),
48
+ url('../../fonts/Inter/woff/Inter18pt-Regular.woff2') format('woff2'),
49
+ /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/Inter/woff/Inter18pt-Regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
50
+ }
51
+
52
+
53
+ @font-face {
54
+ font-family: 'Inter';
55
+ font-style: normal;
56
+ font-weight: 500;
57
+ src:
58
+ local(''),
59
+ url('../../fonts/Inter/woff/Inter18pt-Medium.woff2') format('woff2'),
60
+ /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/Inter/woff/Inter18pt-Medium.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
61
+ }
62
+
63
+ @font-face {
64
+ font-family: 'Inter';
65
+ font-style: normal;
66
+ font-weight: 600;
67
+ src:
68
+ local(''),
69
+ url('../../fonts/Inter/woff/Inter18pt-SemiBold.woff2') format('woff2'),
70
+ /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/Inter/woff/Inter18pt-SemiBold.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
71
+ }
72
+
73
+ @font-face {
74
+ font-family: 'Inter';
75
+ font-style: normal;
76
+ font-weight: 700;
77
+ src:
78
+ local(''),
79
+ url('../../fonts/Inter/woff/Inter18pt-Bold.woff2') format('woff2'),
80
+ /* Chrome 26+, Opera 23+, Firefox 39+ */ url('../../fonts/Inter/woff/Inter18pt-Bold.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
81
+ }