@tuki-io/tuki-widgets 0.0.219-dev.5 → 0.0.219-dev.50

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 (193) hide show
  1. package/di2mt/api/api.endpoints.d.ts +3 -0
  2. package/esm2020/di2mt/api/api.endpoints.mjs +4 -1
  3. package/esm2020/locations/public-api.mjs +8 -0
  4. package/esm2020/locations/src/app.constants.mjs +14 -0
  5. package/esm2020/locations/src/location-confirm-dialog/location-confirm-dialog.component.mjs +23 -0
  6. package/esm2020/locations/src/locations.component.mjs +351 -0
  7. package/esm2020/locations/src/locations.module.mjs +42 -0
  8. package/esm2020/locations/src/material.module.mjs +55 -0
  9. package/esm2020/locations/src/services/api.service.mjs +67 -0
  10. package/esm2020/locations/src/services/locations.service.mjs +65 -0
  11. package/esm2020/locations/src/types/location.mjs +2 -0
  12. package/esm2020/locations/src/utils/app-loader/app-loader.mjs +14 -0
  13. package/esm2020/locations/tuki-io-tuki-widgets-locations.mjs +5 -0
  14. package/esm2020/meetings/public-api.mjs +8 -0
  15. package/esm2020/meetings/src/app.constants.mjs +9 -0
  16. package/esm2020/meetings/src/components/live-meetings/live-meeting/live-meeting.component.mjs +107 -0
  17. package/esm2020/meetings/src/components/live-meetings/live-meetings.component.mjs +98 -0
  18. package/esm2020/meetings/src/components/meeting-spaces/meeting-space/meeting-space.component.mjs +110 -0
  19. package/esm2020/meetings/src/components/meeting-spaces/meeting-spaces.component.mjs +65 -0
  20. package/esm2020/meetings/src/material.module.mjs +76 -0
  21. package/esm2020/meetings/src/meetings.component.mjs +65 -0
  22. package/esm2020/meetings/src/meetings.module.mjs +51 -0
  23. package/esm2020/meetings/src/services/api.service.mjs +67 -0
  24. package/esm2020/meetings/src/services/live-meetings.service.mjs +178 -0
  25. package/esm2020/meetings/src/services/meeting-spaces.service.mjs +102 -0
  26. package/esm2020/meetings/src/types/live-meeting.mjs +2 -0
  27. package/esm2020/meetings/src/types/meeting-space.mjs +2 -0
  28. package/esm2020/meetings/src/utils/app-loader/app-loader.mjs +14 -0
  29. package/esm2020/meetings/tuki-io-tuki-widgets-meetings.mjs +5 -0
  30. package/esm2020/shared/public-api.mjs +4 -0
  31. package/esm2020/shared/src/ui/material.module.mjs +188 -0
  32. package/esm2020/shared/src/ui/shared.module.mjs +36 -0
  33. package/esm2020/shared/src/ui/tk-page-section/tk-page-section.component.mjs +13 -0
  34. package/esm2020/shared/src/ui/tk-page-section-row/tk-page-section-row.component.mjs +13 -0
  35. package/esm2020/shared/src/ui/ui.module.mjs +37 -0
  36. package/esm2020/shared/tuki-io-tuki-widgets-shared.mjs +5 -0
  37. package/esm2020/user-creation/src/utils/device-default-prefix.mjs +19 -2
  38. package/esm2020/user-creation/src/utils/device-name-dynamic-tokens.mjs +4 -0
  39. package/esm2020/user-creation/src/utils/parse-device-name-rule.mjs +6 -3
  40. package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.mjs +60 -13
  41. package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.mjs +2 -1
  42. package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.mjs +8 -6
  43. package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.mjs +13 -9
  44. package/esm2020/user-device-manage/src/classes/simplified-user.mjs +1 -1
  45. package/esm2020/user-device-manage/src/user-device-manage.module.mjs +1 -4
  46. package/esm2020/user-manage/src/app.constants.mjs +7 -1
  47. package/esm2020/user-manage/src/classes/simplified-user.mjs +5 -3
  48. package/esm2020/user-manage/src/device-list/device-list.component.mjs +7 -4
  49. package/esm2020/user-manage/src/device-list/device-row/device-row.component.mjs +6 -3
  50. package/esm2020/user-manage/src/material.module.mjs +14 -7
  51. package/esm2020/user-manage/src/services/dcp-api.service.mjs +79 -0
  52. package/esm2020/user-manage/src/services/user.service.mjs +65 -19
  53. package/esm2020/user-manage/src/user-calling/user-calling.component.mjs +12 -7
  54. package/esm2020/user-manage/src/user-manage-widget.component.mjs +64 -23
  55. package/esm2020/user-manage/src/user-manage.module.mjs +10 -3
  56. package/esm2020/users-list/src/app.constants.mjs +2 -1
  57. package/esm2020/users-list/src/classes/simlified-user.mjs +1 -1
  58. package/esm2020/users-list/src/classes/user-list.mjs +2 -1
  59. package/esm2020/users-list/src/components/table-toolbar/table-toolbar.component.mjs +3 -3
  60. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.mjs +14 -3
  61. package/esm2020/users-list/src/move-user-wizard/move-user-wizard.component.mjs +5 -3
  62. package/esm2020/users-list/src/users-list.component.mjs +100 -17
  63. package/esm2020/workspaces/public-api.mjs +8 -0
  64. package/esm2020/workspaces/src/app.constants.mjs +27 -0
  65. package/esm2020/workspaces/src/components/workspace-confirm-dialog/workspace-confirm-dialog.component.mjs +32 -0
  66. package/esm2020/workspaces/src/components/workspace-detail/workspace-detail.component.mjs +61 -0
  67. package/esm2020/workspaces/src/components/workspaces-filters/workspaces-filters.component.mjs +56 -0
  68. package/esm2020/workspaces/src/components/workspaces-table/workspaces-table.component.mjs +127 -0
  69. package/esm2020/workspaces/src/material.module.mjs +83 -0
  70. package/esm2020/workspaces/src/services/api-webex.service.mjs +14 -0
  71. package/esm2020/workspaces/src/services/api.service.mjs +67 -0
  72. package/esm2020/workspaces/src/services/workspace-detail.service.mjs +122 -0
  73. package/esm2020/workspaces/src/services/workspaces-migration.service.mjs +59 -0
  74. package/esm2020/workspaces/src/services/workspaces.service.mjs +105 -0
  75. package/esm2020/workspaces/src/types/workspace.mjs +4 -0
  76. package/esm2020/workspaces/src/utils/app-loader/app-loader.mjs +14 -0
  77. package/esm2020/workspaces/src/utils/device-icon.mjs +13 -0
  78. package/esm2020/workspaces/src/utils/workspace-name.mjs +8 -0
  79. package/esm2020/workspaces/src/workspaces.component.mjs +306 -0
  80. package/esm2020/workspaces/src/workspaces.module.mjs +51 -0
  81. package/esm2020/workspaces/tuki-io-tuki-widgets-workspaces.mjs +5 -0
  82. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs +3 -0
  83. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
  84. package/fesm2015/tuki-io-tuki-widgets-locations.mjs +623 -0
  85. package/fesm2015/tuki-io-tuki-widgets-locations.mjs.map +1 -0
  86. package/fesm2015/tuki-io-tuki-widgets-meetings.mjs +894 -0
  87. package/fesm2015/tuki-io-tuki-widgets-meetings.mjs.map +1 -0
  88. package/fesm2015/tuki-io-tuki-widgets-shared.mjs +280 -0
  89. package/fesm2015/tuki-io-tuki-widgets-shared.mjs.map +1 -0
  90. package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs +111 -32
  91. package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
  92. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs +0 -13
  93. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -1
  94. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +253 -60
  95. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +1 -1
  96. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +121 -22
  97. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
  98. package/fesm2015/tuki-io-tuki-widgets-workspaces.mjs +1082 -0
  99. package/fesm2015/tuki-io-tuki-widgets-workspaces.mjs.map +1 -0
  100. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs +3 -0
  101. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
  102. package/fesm2020/tuki-io-tuki-widgets-locations.mjs +617 -0
  103. package/fesm2020/tuki-io-tuki-widgets-locations.mjs.map +1 -0
  104. package/fesm2020/tuki-io-tuki-widgets-meetings.mjs +902 -0
  105. package/fesm2020/tuki-io-tuki-widgets-meetings.mjs.map +1 -0
  106. package/fesm2020/tuki-io-tuki-widgets-shared.mjs +280 -0
  107. package/fesm2020/tuki-io-tuki-widgets-shared.mjs.map +1 -0
  108. package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs +104 -28
  109. package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
  110. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs +0 -13
  111. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -1
  112. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +248 -58
  113. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +1 -1
  114. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +120 -22
  115. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
  116. package/fesm2020/tuki-io-tuki-widgets-workspaces.mjs +1089 -0
  117. package/fesm2020/tuki-io-tuki-widgets-workspaces.mjs.map +1 -0
  118. package/locations/index.d.ts +5 -0
  119. package/locations/public-api.d.ts +2 -0
  120. package/locations/src/app.constants.d.ts +9 -0
  121. package/locations/src/location-confirm-dialog/location-confirm-dialog.component.d.ts +15 -0
  122. package/locations/src/locations.component.d.ts +86 -0
  123. package/locations/src/locations.module.d.ts +13 -0
  124. package/locations/src/material.module.d.ts +12 -0
  125. package/locations/src/services/api.service.d.ts +18 -0
  126. package/locations/src/services/locations.service.d.ts +19 -0
  127. package/locations/src/types/location.d.ts +28 -0
  128. package/locations/src/utils/app-loader/app-loader.d.ts +6 -0
  129. package/meetings/index.d.ts +5 -0
  130. package/meetings/public-api.d.ts +2 -0
  131. package/meetings/src/app.constants.d.ts +8 -0
  132. package/meetings/src/components/live-meetings/live-meeting/live-meeting.component.d.ts +34 -0
  133. package/meetings/src/components/live-meetings/live-meetings.component.d.ts +43 -0
  134. package/meetings/src/components/meeting-spaces/meeting-space/meeting-space.component.d.ts +39 -0
  135. package/meetings/src/components/meeting-spaces/meeting-spaces.component.d.ts +27 -0
  136. package/meetings/src/material.module.d.ts +15 -0
  137. package/meetings/src/meetings.component.d.ts +29 -0
  138. package/meetings/src/meetings.module.d.ts +16 -0
  139. package/meetings/src/services/api.service.d.ts +18 -0
  140. package/meetings/src/services/live-meetings.service.d.ts +9 -0
  141. package/meetings/src/services/meeting-spaces.service.d.ts +16 -0
  142. package/meetings/src/types/live-meeting.d.ts +71 -0
  143. package/meetings/src/types/meeting-space.d.ts +52 -0
  144. package/meetings/src/utils/app-loader/app-loader.d.ts +6 -0
  145. package/package.json +33 -1
  146. package/shared/index.d.ts +5 -0
  147. package/shared/public-api.d.ts +3 -0
  148. package/shared/src/ui/material.module.d.ts +28 -0
  149. package/shared/src/ui/shared.module.d.ts +10 -0
  150. package/{user-device-manage/src/shared/tk-page-section/page-section.component.d.ts → shared/src/ui/tk-page-section/tk-page-section.component.d.ts} +1 -1
  151. package/shared/src/ui/tk-page-section-row/tk-page-section-row.component.d.ts +6 -0
  152. package/shared/src/ui/ui.module.d.ts +11 -0
  153. package/user-creation/src/utils/device-default-prefix.d.ts +7 -2
  154. package/user-creation/src/utils/device-name-dynamic-tokens.d.ts +1 -0
  155. package/user-creation/src/utils/parse-device-name-rule.d.ts +1 -0
  156. package/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.d.ts +2 -0
  157. package/user-device-manage/src/classes/simplified-user.d.ts +1 -1
  158. package/user-device-manage/src/user-device-manage.module.d.ts +9 -10
  159. package/user-manage/src/app.constants.d.ts +6 -0
  160. package/user-manage/src/classes/simplified-user.d.ts +11 -1
  161. package/user-manage/src/device-list/device-list.component.d.ts +2 -0
  162. package/user-manage/src/material.module.d.ts +2 -1
  163. package/user-manage/src/services/dcp-api.service.d.ts +21 -0
  164. package/user-manage/src/services/user.service.d.ts +8 -1
  165. package/user-manage/src/user-calling/user-calling.component.d.ts +3 -2
  166. package/user-manage/src/user-manage-widget.component.d.ts +10 -2
  167. package/user-manage/src/user-manage.module.d.ts +2 -1
  168. package/users-list/src/app.constants.d.ts +1 -0
  169. package/users-list/src/classes/simlified-user.d.ts +1 -1
  170. package/users-list/src/classes/user-list.d.ts +4 -0
  171. package/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.d.ts +3 -1
  172. package/users-list/src/move-user-wizard/move-user-wizard.component.d.ts +2 -1
  173. package/users-list/src/users-list.component.d.ts +6 -1
  174. package/workspaces/index.d.ts +5 -0
  175. package/workspaces/public-api.d.ts +2 -0
  176. package/workspaces/src/app.constants.d.ts +25 -0
  177. package/workspaces/src/components/workspace-confirm-dialog/workspace-confirm-dialog.component.d.ts +20 -0
  178. package/workspaces/src/components/workspace-detail/workspace-detail.component.d.ts +25 -0
  179. package/workspaces/src/components/workspaces-filters/workspaces-filters.component.d.ts +20 -0
  180. package/workspaces/src/components/workspaces-table/workspaces-table.component.d.ts +42 -0
  181. package/workspaces/src/material.module.d.ts +16 -0
  182. package/workspaces/src/services/api-webex.service.d.ts +6 -0
  183. package/workspaces/src/services/api.service.d.ts +18 -0
  184. package/workspaces/src/services/workspace-detail.service.d.ts +20 -0
  185. package/workspaces/src/services/workspaces-migration.service.d.ts +18 -0
  186. package/workspaces/src/services/workspaces.service.d.ts +11 -0
  187. package/workspaces/src/types/workspace.d.ts +416 -0
  188. package/workspaces/src/utils/app-loader/app-loader.d.ts +6 -0
  189. package/workspaces/src/utils/device-icon.d.ts +1 -0
  190. package/workspaces/src/utils/workspace-name.d.ts +1 -0
  191. package/workspaces/src/workspaces.component.d.ts +74 -0
  192. package/workspaces/src/workspaces.module.d.ts +16 -0
  193. package/esm2020/user-device-manage/src/shared/tk-page-section/page-section.component.mjs +0 -13
@@ -0,0 +1,623 @@
1
+ import * as i4 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { NgModule, Component, ViewEncapsulation, Inject, Injectable, EventEmitter, Input, Output } from '@angular/core';
5
+ import * as i1$1 from '@angular/common/http';
6
+ import { HttpHeaders, HttpClientModule } from '@angular/common/http';
7
+ import * as i5 from '@angular/forms';
8
+ import { FormsModule } from '@angular/forms';
9
+ import * as i6 from '@angular/material/button';
10
+ import { MatButtonModule } from '@angular/material/button';
11
+ import * as i1 from '@angular/material/dialog';
12
+ import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
13
+ import * as i7 from '@angular/material/icon';
14
+ import { MatIconModule } from '@angular/material/icon';
15
+ import * as i8 from '@angular/material/menu';
16
+ import { MatMenuModule } from '@angular/material/menu';
17
+ import * as i1$2 from '@angular/material/progress-spinner';
18
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
19
+ import * as i10 from '@angular/material/tooltip';
20
+ import { MatTooltipModule } from '@angular/material/tooltip';
21
+ import { map } from 'rxjs/operators';
22
+
23
+ class MaterialModule {
24
+ }
25
+ MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
26
+ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [MatButtonModule,
27
+ MatDialogModule,
28
+ MatIconModule,
29
+ MatMenuModule,
30
+ MatProgressSpinnerModule,
31
+ MatTooltipModule], exports: [MatButtonModule,
32
+ MatDialogModule,
33
+ MatIconModule,
34
+ MatMenuModule,
35
+ MatProgressSpinnerModule,
36
+ MatTooltipModule] });
37
+ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [MatButtonModule,
38
+ MatDialogModule,
39
+ MatIconModule,
40
+ MatMenuModule,
41
+ MatProgressSpinnerModule,
42
+ MatTooltipModule, MatButtonModule,
43
+ MatDialogModule,
44
+ MatIconModule,
45
+ MatMenuModule,
46
+ MatProgressSpinnerModule,
47
+ MatTooltipModule] });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
49
+ type: NgModule,
50
+ args: [{
51
+ imports: [
52
+ MatButtonModule,
53
+ MatDialogModule,
54
+ MatIconModule,
55
+ MatMenuModule,
56
+ MatProgressSpinnerModule,
57
+ MatTooltipModule,
58
+ ],
59
+ exports: [
60
+ MatButtonModule,
61
+ MatDialogModule,
62
+ MatIconModule,
63
+ MatMenuModule,
64
+ MatProgressSpinnerModule,
65
+ MatTooltipModule,
66
+ ]
67
+ }]
68
+ }] });
69
+
70
+ class LocationConfirmDialogComponent {
71
+ constructor(dialogRef, data) {
72
+ this.dialogRef = dialogRef;
73
+ this.data = data;
74
+ }
75
+ onClose(result) {
76
+ this.dialogRef.close(result);
77
+ }
78
+ }
79
+ LocationConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationConfirmDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
80
+ LocationConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LocationConfirmDialogComponent, selector: "tk-location-confirm-dialog", ngImport: i0, template: "<div class=\"tk-location-confirm-dialog\" role=\"dialog\" aria-labelledby=\"tk-location-confirm-dialog-title\">\n <h3 id=\"tk-location-confirm-dialog-title\" class=\"tk-location-confirm-dialog__title\">{{ data.title }}</h3>\n <div mat-dialog-content class=\"tk-location-confirm-dialog__content\" [innerHTML]=\"data.message\"></div>\n <div mat-dialog-actions class=\"tk-location-confirm-dialog__actions\">\n <button type=\"button\" class=\"tk-location-confirm-dialog__button tk-location-confirm-dialog__button--cancel\" (click)=\"onClose(false)\">\n Cancel\n </button>\n <button type=\"button\" class=\"tk-location-confirm-dialog__button tk-location-confirm-dialog__button--confirm\" (click)=\"onClose(true)\">\n {{ data.confirmButtonText }}\n </button>\n </div>\n</div>\n", styles: [".tk-location-confirm-dialog-panel .mat-dialog-container{padding:24px;border-radius:8px;background:#fff;box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.tk-location-confirm-dialog-backdrop{background:rgba(0,0,0,.32)}.tk-location-confirm-dialog{font-family:Inter,Helvetica Neue,Helvetica,Arial,sans-serif;width:400px;box-sizing:border-box;padding:0 0 16px}.tk-location-confirm-dialog__title{text-align:center;font-weight:600;font-size:16px;margin:0 0 20px}.tk-location-confirm-dialog__content{color:#000000b3;font-size:14px;padding:0}.tk-location-confirm-dialog__content p{margin:0 0 12px}.tk-location-confirm-dialog__actions{display:flex;justify-content:flex-end;gap:12px;margin:16px 0 0}.tk-location-confirm-dialog__button{height:32px;padding:0 16px;border-radius:50px;box-shadow:none;border:none;font-size:14px;font-family:Inter,Helvetica Neue,Helvetica,Arial,sans-serif;cursor:pointer}.tk-location-confirm-dialog__button--cancel{border:1px solid rgba(0,0,0,.5);color:#000;background:#fff}.tk-location-confirm-dialog__button--confirm{background:#000;color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }], encapsulation: i0.ViewEncapsulation.None });
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationConfirmDialogComponent, decorators: [{
82
+ type: Component,
83
+ args: [{ selector: 'tk-location-confirm-dialog', encapsulation: ViewEncapsulation.None, template: "<div class=\"tk-location-confirm-dialog\" role=\"dialog\" aria-labelledby=\"tk-location-confirm-dialog-title\">\n <h3 id=\"tk-location-confirm-dialog-title\" class=\"tk-location-confirm-dialog__title\">{{ data.title }}</h3>\n <div mat-dialog-content class=\"tk-location-confirm-dialog__content\" [innerHTML]=\"data.message\"></div>\n <div mat-dialog-actions class=\"tk-location-confirm-dialog__actions\">\n <button type=\"button\" class=\"tk-location-confirm-dialog__button tk-location-confirm-dialog__button--cancel\" (click)=\"onClose(false)\">\n Cancel\n </button>\n <button type=\"button\" class=\"tk-location-confirm-dialog__button tk-location-confirm-dialog__button--confirm\" (click)=\"onClose(true)\">\n {{ data.confirmButtonText }}\n </button>\n </div>\n</div>\n", styles: [".tk-location-confirm-dialog-panel .mat-dialog-container{padding:24px;border-radius:8px;background:#fff;box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.tk-location-confirm-dialog-backdrop{background:rgba(0,0,0,.32)}.tk-location-confirm-dialog{font-family:Inter,Helvetica Neue,Helvetica,Arial,sans-serif;width:400px;box-sizing:border-box;padding:0 0 16px}.tk-location-confirm-dialog__title{text-align:center;font-weight:600;font-size:16px;margin:0 0 20px}.tk-location-confirm-dialog__content{color:#000000b3;font-size:14px;padding:0}.tk-location-confirm-dialog__content p{margin:0 0 12px}.tk-location-confirm-dialog__actions{display:flex;justify-content:flex-end;gap:12px;margin:16px 0 0}.tk-location-confirm-dialog__button{height:32px;padding:0 16px;border-radius:50px;box-shadow:none;border:none;font-size:14px;font-family:Inter,Helvetica Neue,Helvetica,Arial,sans-serif;cursor:pointer}.tk-location-confirm-dialog__button--cancel{border:1px solid rgba(0,0,0,.5);color:#000;background:#fff}.tk-location-confirm-dialog__button--confirm{background:#000;color:#fff}\n"] }]
84
+ }], ctorParameters: function () {
85
+ return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
86
+ type: Inject,
87
+ args: [MAT_DIALOG_DATA]
88
+ }] }];
89
+ } });
90
+
91
+ class APIService {
92
+ constructor(httpClient) {
93
+ this.httpClient = httpClient;
94
+ }
95
+ fetch(url, params, cache) {
96
+ const headers = this.getHeaders(cache);
97
+ params = params || {};
98
+ return this.httpClient.get(this.apiUrl + url, { params: this.prepareEncodedParams(params), headers });
99
+ }
100
+ post(url, body, params = {}) {
101
+ body = body || null;
102
+ const headers = this.getHeaders();
103
+ return this.httpClient.post(this.apiUrl + url, body, { params: this.prepareEncodedParams(params), headers });
104
+ }
105
+ put(url, body = null, params = {}) {
106
+ const headers = this.getHeaders();
107
+ return this.httpClient.put(this.apiUrl + url, body, { headers, params: this.prepareEncodedParams(params) });
108
+ }
109
+ delete(url, params = {}) {
110
+ const headers = this.getHeaders();
111
+ return this.httpClient.delete(this.apiUrl + url, { headers, params: this.prepareEncodedParams(params) });
112
+ }
113
+ prepareEncodedParams(params) {
114
+ const result = {};
115
+ if (!params) {
116
+ return {};
117
+ }
118
+ for (const key of Object.keys(params)) {
119
+ if (params[key]) {
120
+ const stringParam = params[key].toString();
121
+ result[key] = stringParam.includes('+') ? encodeURIComponent(stringParam) : stringParam;
122
+ }
123
+ }
124
+ return result;
125
+ }
126
+ getHeaders(cache) {
127
+ let headers = new HttpHeaders();
128
+ if (cache) {
129
+ headers = headers.append('_Cache', 'true ');
130
+ }
131
+ const token = this.token || this.getParameterByName('token');
132
+ headers = headers.append('Authorization', 'Bearer ' + token);
133
+ return headers;
134
+ }
135
+ getParameterByName(name, url = window.location.href) {
136
+ name = name.replace(/[\[\]]/g, '\\$&');
137
+ var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);
138
+ if (!results)
139
+ return null;
140
+ if (!results[2])
141
+ return '';
142
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
143
+ }
144
+ }
145
+ APIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
146
+ APIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, providedIn: 'root' });
147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, decorators: [{
148
+ type: Injectable,
149
+ args: [{
150
+ providedIn: 'root'
151
+ }]
152
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
153
+
154
+ const API = {
155
+ SITES_LOCATIONS: {
156
+ // Returns every site for the customer paired with its mapped Control Hub
157
+ // location (or null when the site hasn't been migrated yet) — this is the
158
+ // source of truth for siteId, superseding the old LOCATIONS.GET_ALL
159
+ // endpoint, which only listed already-mapped locations and exposed no siteId.
160
+ GET_ALL: "/api/webex/configuration/customers/:customerId/siteslocations",
161
+ },
162
+ SITE_MIGRATION: {
163
+ MIGRATE_SITE: "/api/migration/webex/sites/:siteId/migrate",
164
+ BATCH_STATUS: "/api/migration/webex/customer/:customerId/batchesstatus",
165
+ },
166
+ };
167
+
168
+ function toLocationAddress(raw) {
169
+ return {
170
+ address1: (raw === null || raw === void 0 ? void 0 : raw.address1) || '',
171
+ address2: (raw === null || raw === void 0 ? void 0 : raw.address2) || '',
172
+ city: (raw === null || raw === void 0 ? void 0 : raw.city) || '',
173
+ state: (raw === null || raw === void 0 ? void 0 : raw.state) || '',
174
+ postalCode: (raw === null || raw === void 0 ? void 0 : raw.postalCode) || '',
175
+ country: (raw === null || raw === void 0 ? void 0 : raw.country) || '',
176
+ countryName: (raw === null || raw === void 0 ? void 0 : raw.countryName) || (raw === null || raw === void 0 ? void 0 : raw.country) || '',
177
+ };
178
+ }
179
+ function toLocation(raw) {
180
+ var _a;
181
+ return {
182
+ id: String((_a = raw === null || raw === void 0 ? void 0 : raw.id) !== null && _a !== void 0 ? _a : ''),
183
+ name: (raw === null || raw === void 0 ? void 0 : raw.name) || '',
184
+ timeZone: (raw === null || raw === void 0 ? void 0 : raw.timeZone) || '',
185
+ address: toLocationAddress(raw === null || raw === void 0 ? void 0 : raw.address),
186
+ // Every location returned by this endpoint is a Webex Control Hub location.
187
+ provisioningType: (raw === null || raw === void 0 ? void 0 : raw.provisioningType) || 'WEBEX',
188
+ hasPendingActions: !!(raw === null || raw === void 0 ? void 0 : raw.hasPendingActions),
189
+ };
190
+ }
191
+ function toSite(raw) {
192
+ return {
193
+ id: Number(raw === null || raw === void 0 ? void 0 : raw.id),
194
+ name: (raw === null || raw === void 0 ? void 0 : raw.name) || '',
195
+ };
196
+ }
197
+ function toSiteLocation(raw) {
198
+ return {
199
+ site: toSite(raw === null || raw === void 0 ? void 0 : raw.site),
200
+ location: (raw === null || raw === void 0 ? void 0 : raw.location) ? toLocation(raw.location) : null,
201
+ };
202
+ }
203
+ class LocationsService {
204
+ constructor(apiService) {
205
+ this.apiService = apiService;
206
+ }
207
+ fetchSiteLocations(customerId) {
208
+ const url = API.SITES_LOCATIONS.GET_ALL.replace(':customerId', String(customerId));
209
+ return this.apiService.fetch(url).pipe(map((response) => (Array.isArray(response) ? response : []).map(toSiteLocation)));
210
+ }
211
+ migrateSite(siteId) {
212
+ const url = API.SITE_MIGRATION.MIGRATE_SITE.replace(':siteId', String(siteId));
213
+ return this.apiService.post(url, {}, { batchId: '' });
214
+ }
215
+ getMigrationBatchStatuses(customerId, batchIds) {
216
+ const url = API.SITE_MIGRATION.BATCH_STATUS.replace(':customerId', String(customerId));
217
+ return this.apiService.post(url, batchIds);
218
+ }
219
+ }
220
+ LocationsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
221
+ LocationsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationsService, providedIn: 'root' });
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationsService, decorators: [{
223
+ type: Injectable,
224
+ args: [{
225
+ providedIn: 'root'
226
+ }]
227
+ }], ctorParameters: function () { return [{ type: APIService }]; } });
228
+
229
+ class AppLoaderComponent {
230
+ constructor() {
231
+ }
232
+ }
233
+ AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
234
+ AppLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppLoaderComponent, selector: "app-loader", ngImport: i0, template: "<div class=\"overlay\">\n <mat-progress-spinner\n class=\"page-spinner\"\n mode=\"indeterminate\"\n [diameter]=\"70\"\n strokeWidth=\"3\"></mat-progress-spinner>\n</div>\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}.mat-progress-spinner circle,.mat-spinner circle{stroke:#000!important}\n"], dependencies: [{ kind: "component", type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
236
+ type: Component,
237
+ args: [{ selector: 'app-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"overlay\">\n <mat-progress-spinner\n class=\"page-spinner\"\n mode=\"indeterminate\"\n [diameter]=\"70\"\n strokeWidth=\"3\"></mat-progress-spinner>\n</div>\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}.mat-progress-spinner circle,.mat-spinner circle{stroke:#000!important}\n"] }]
238
+ }], ctorParameters: function () { return []; } });
239
+
240
+ const MIGRATION_POLL_INTERVAL_MS = 10000;
241
+ const PAGE_SIZE_OPTIONS = [10, 25, 50];
242
+ class LocationsComponent {
243
+ constructor(apiService, locationsService, dialog) {
244
+ this.apiService = apiService;
245
+ this.locationsService = locationsService;
246
+ this.dialog = dialog;
247
+ this.openLocation = new EventEmitter();
248
+ this.editLocation = new EventEmitter();
249
+ this.removeLocation = new EventEmitter();
250
+ this.addLocation = new EventEmitter();
251
+ this.importLocations = new EventEmitter();
252
+ // Every site for the customer, each paired with its mapped Control Hub
253
+ // location or null — the siteslocations API returns the full, unpaged list,
254
+ // so search/filter/sort/pagination below all run client-side over this.
255
+ this.siteLocations = [];
256
+ this.isLoading = false;
257
+ this.searchTerm = '';
258
+ this.sortDirection = 'asc';
259
+ this.isBannerDismissed = false;
260
+ this.pageSizeOptions = PAGE_SIZE_OPTIONS;
261
+ this.pageIndex = 0;
262
+ this.pageSize = PAGE_SIZE_OPTIONS[0];
263
+ this.isFilterPanelOpen = false;
264
+ this.filters = {
265
+ country: '',
266
+ pendingActions: '',
267
+ mapped: '',
268
+ };
269
+ this.countryDisplayNames = typeof Intl !== 'undefined' && 'DisplayNames' in Intl
270
+ ? new Intl.DisplayNames(['en'], { type: 'region' })
271
+ : null;
272
+ this.migrationIntervals = new Map();
273
+ // Same icon set as users-list's "Provisioning Type" column (assets/icons/webex.svg,
274
+ // local_24.svg, di_cloud_24.svg).
275
+ this.provisioningTypeIcons = {
276
+ WEBEX: { src: 'assets/icons/webex.svg', tooltip: 'Webex Calling' },
277
+ UCM: { src: 'assets/icons/local_24.svg', tooltip: 'UCM' },
278
+ DI: { src: 'assets/icons/di_cloud_24.svg', tooltip: 'Webex Calling DI' },
279
+ };
280
+ }
281
+ ngOnInit() {
282
+ this.apiService.token = this.token;
283
+ this.apiService.apiUrl = this.exHost + '/webex';
284
+ this.loadSiteLocations();
285
+ }
286
+ ngOnDestroy() {
287
+ this.migrationIntervals.forEach(interval => clearInterval(interval));
288
+ this.migrationIntervals.clear();
289
+ }
290
+ loadSiteLocations() {
291
+ this.isLoading = true;
292
+ this.locationsService.fetchSiteLocations(this.customerId).subscribe({
293
+ next: (siteLocations) => {
294
+ this.siteLocations = siteLocations;
295
+ this.isLoading = false;
296
+ },
297
+ error: () => {
298
+ this.isLoading = false;
299
+ },
300
+ });
301
+ }
302
+ get pendingLocations() {
303
+ return this.siteLocations.filter(row => { var _a; return !!((_a = row.location) === null || _a === void 0 ? void 0 : _a.hasPendingActions); });
304
+ }
305
+ get showPendingBanner() {
306
+ return !this.isBannerDismissed && this.pendingLocations.length > 0;
307
+ }
308
+ get countries() {
309
+ return Array.from(new Set(this.siteLocations.map(row => this.countryLabel(row)).filter(Boolean))).sort();
310
+ }
311
+ get filteredRows() {
312
+ const term = this.searchTerm.trim().toLowerCase();
313
+ const filtered = this.siteLocations.filter(row => {
314
+ var _a, _b, _c, _d, _e;
315
+ return (!term ||
316
+ this.rowName(row).toLowerCase().includes(term) ||
317
+ this.addressLine(row).toLowerCase().includes(term) ||
318
+ (((_b = (_a = row.location) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b.city) || '').toLowerCase().includes(term) ||
319
+ (((_d = (_c = row.location) === null || _c === void 0 ? void 0 : _c.address) === null || _d === void 0 ? void 0 : _d.state) || '').toLowerCase().includes(term) ||
320
+ this.countryLabel(row).toLowerCase().includes(term)) &&
321
+ (!this.filters.country || this.countryLabel(row) === this.filters.country) &&
322
+ (!this.filters.pendingActions || String(!!((_e = row.location) === null || _e === void 0 ? void 0 : _e.hasPendingActions)) === this.filters.pendingActions) &&
323
+ (!this.filters.mapped || (this.filters.mapped === 'mapped' ? this.isMapped(row) : !this.isMapped(row)));
324
+ });
325
+ return filtered.sort((a, b) => {
326
+ const comparison = this.rowName(a).localeCompare(this.rowName(b));
327
+ return this.sortDirection === 'asc' ? comparison : -comparison;
328
+ });
329
+ }
330
+ get pagedRows() {
331
+ const start = this.pageIndex * this.pageSize;
332
+ return this.filteredRows.slice(start, start + this.pageSize);
333
+ }
334
+ get totalElements() {
335
+ return this.filteredRows.length;
336
+ }
337
+ get pageRangeLabel() {
338
+ if (!this.totalElements) {
339
+ return '0 of 0';
340
+ }
341
+ const start = this.pageIndex * this.pageSize + 1;
342
+ const end = Math.min(this.totalElements, start + this.pagedRows.length - 1);
343
+ return `${start} – ${end} of ${this.totalElements}`;
344
+ }
345
+ get hasPreviousPage() {
346
+ return this.pageIndex > 0;
347
+ }
348
+ get hasNextPage() {
349
+ return (this.pageIndex + 1) * this.pageSize < this.totalElements;
350
+ }
351
+ rowName(row) {
352
+ return row.site.name;
353
+ }
354
+ isMapped(row) {
355
+ return !!row.location;
356
+ }
357
+ addressLine(row) {
358
+ if (!row.location) {
359
+ return '';
360
+ }
361
+ return [row.location.address.address1, row.location.address.address2, row.location.address.city]
362
+ .filter(Boolean)
363
+ .join(' - ');
364
+ }
365
+ countryLabel(row) {
366
+ var _a;
367
+ if (!row.location) {
368
+ return '';
369
+ }
370
+ const { countryName, country } = row.location.address;
371
+ if (countryName) {
372
+ return countryName;
373
+ }
374
+ if (!country) {
375
+ return '';
376
+ }
377
+ return ((_a = this.countryDisplayNames) === null || _a === void 0 ? void 0 : _a.of(country)) || country;
378
+ }
379
+ provisioningTypeIcon(row) {
380
+ if (!row.location) {
381
+ return null;
382
+ }
383
+ return this.provisioningTypeIcons[row.location.provisioningType] || null;
384
+ }
385
+ onSearchInputChange(event) {
386
+ this.searchTerm = event.target.value;
387
+ this.pageIndex = 0;
388
+ }
389
+ toggleNameSort() {
390
+ this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';
391
+ }
392
+ dismissBanner() {
393
+ this.isBannerDismissed = true;
394
+ }
395
+ toggleFilterPanel() {
396
+ this.isFilterPanelOpen = !this.isFilterPanelOpen;
397
+ }
398
+ closeFilterPanel() {
399
+ this.isFilterPanelOpen = false;
400
+ }
401
+ onFilterChange() {
402
+ this.pageIndex = 0;
403
+ }
404
+ clearFilters() {
405
+ this.filters = { country: '', pendingActions: '', mapped: '' };
406
+ this.pageIndex = 0;
407
+ }
408
+ onPageSizeChange(event) {
409
+ this.pageSize = Number(event.target.value);
410
+ this.pageIndex = 0;
411
+ }
412
+ goToPreviousPage() {
413
+ if (this.hasPreviousPage) {
414
+ this.pageIndex--;
415
+ }
416
+ }
417
+ goToNextPage() {
418
+ if (this.hasNextPage) {
419
+ this.pageIndex++;
420
+ }
421
+ }
422
+ onOpenLocation(row) {
423
+ if (row.location) {
424
+ this.openLocation.emit(row.location.id);
425
+ }
426
+ }
427
+ onEditLocation(row) {
428
+ if (row.location) {
429
+ this.editLocation.emit(row.location.id);
430
+ }
431
+ }
432
+ onRemoveLocation(row) {
433
+ if (row.location) {
434
+ this.removeLocation.emit(row.location.id);
435
+ }
436
+ }
437
+ canMigrateSite(row) {
438
+ return row.migrationStatus !== 'IN_PROGRESS';
439
+ }
440
+ onMigrateSite(row) {
441
+ const dialogRef = this.dialog.open(LocationConfirmDialogComponent, {
442
+ panelClass: 'tk-location-confirm-dialog-panel',
443
+ backdropClass: 'tk-location-confirm-dialog-backdrop',
444
+ data: {
445
+ title: `Migrate ${row.site.name}?`,
446
+ message: `<p>Are you sure you want to migrate this site?</p>`,
447
+ confirmButtonText: 'Yes, migrate',
448
+ },
449
+ });
450
+ dialogRef.afterClosed().subscribe(confirmed => {
451
+ if (confirmed) {
452
+ this.migrateSite(row);
453
+ }
454
+ });
455
+ }
456
+ migrateSite(row) {
457
+ const siteId = row.site.id;
458
+ row.migrationStatus = 'IN_PROGRESS';
459
+ this.locationsService.migrateSite(siteId).subscribe({
460
+ next: (batchId) => {
461
+ if (batchId) {
462
+ this.pollMigrationStatus(siteId, batchId);
463
+ }
464
+ else {
465
+ this.onMigrationComplete(siteId);
466
+ }
467
+ },
468
+ error: () => {
469
+ this.setMigrationStatus(siteId, 'FAILED');
470
+ },
471
+ });
472
+ }
473
+ pollMigrationStatus(siteId, batchId) {
474
+ this.clearMigrationInterval(siteId);
475
+ const poll = () => {
476
+ this.locationsService.getMigrationBatchStatuses(this.customerId, [batchId]).subscribe({
477
+ next: (statuses) => {
478
+ const status = statuses.find(item => item.id === batchId);
479
+ if (!status || status.status === 'In Progress') {
480
+ return;
481
+ }
482
+ this.clearMigrationInterval(siteId);
483
+ if (status.status === 'Completed') {
484
+ this.onMigrationComplete(siteId);
485
+ }
486
+ else {
487
+ this.setMigrationStatus(siteId, 'FAILED');
488
+ }
489
+ },
490
+ error: () => {
491
+ this.clearMigrationInterval(siteId);
492
+ this.setMigrationStatus(siteId, 'FAILED');
493
+ },
494
+ });
495
+ };
496
+ poll();
497
+ this.migrationIntervals.set(siteId, setInterval(poll, MIGRATION_POLL_INTERVAL_MS));
498
+ }
499
+ // Looks the row up by siteId (rather than closing over a row reference) so
500
+ // status updates still land on whatever object is currently in
501
+ // siteLocations, even after loadSiteLocations()/mergeSiteLocations() below
502
+ // have replaced the array with freshly-fetched row objects.
503
+ setMigrationStatus(siteId, status) {
504
+ const row = this.siteLocations.find(item => item.site.id === siteId);
505
+ if (row) {
506
+ row.migrationStatus = status;
507
+ }
508
+ }
509
+ // The migrate/batch-status APIs don't return the newly created location's
510
+ // details, so re-fetch to pick up its mapping, address, timezone, etc.
511
+ onMigrationComplete(siteId) {
512
+ this.setMigrationStatus(siteId, 'COMPLETED');
513
+ this.locationsService.fetchSiteLocations(this.customerId).subscribe({
514
+ next: (fresh) => this.mergeSiteLocations(fresh),
515
+ });
516
+ }
517
+ // Preserves the IN_PROGRESS status of any other site still migrating so a
518
+ // concurrent poll's next tick doesn't land on a row that briefly lost it.
519
+ mergeSiteLocations(fresh) {
520
+ const inProgressSiteIds = new Set(this.siteLocations.filter(row => row.migrationStatus === 'IN_PROGRESS').map(row => row.site.id));
521
+ this.siteLocations = fresh.map(row => inProgressSiteIds.has(row.site.id) && !row.location
522
+ ? Object.assign(Object.assign({}, row), { migrationStatus: 'IN_PROGRESS' }) : row);
523
+ }
524
+ clearMigrationInterval(siteId) {
525
+ const interval = this.migrationIntervals.get(siteId);
526
+ if (interval) {
527
+ clearInterval(interval);
528
+ this.migrationIntervals.delete(siteId);
529
+ }
530
+ }
531
+ onAddLocation() {
532
+ this.addLocation.emit();
533
+ }
534
+ onImportLocations() {
535
+ this.importLocations.emit();
536
+ }
537
+ exportLocations() {
538
+ const rows = this.filteredRows.map(row => [
539
+ row.site.name,
540
+ this.addressLine(row),
541
+ this.countryLabel(row),
542
+ this.isMapped(row) ? 'Mapped' : 'Not mapped',
543
+ ]);
544
+ const csvLines = [
545
+ ['Location Name', 'Address', 'Country/Region', 'Mapping Status'],
546
+ ...rows,
547
+ ].map(row => row.map(cell => `"${String(cell).replace(/"/g, '""')}"`).join(','));
548
+ const blob = new Blob([csvLines.join('\n')], { type: 'text/csv;charset=utf-8;' });
549
+ const url = URL.createObjectURL(blob);
550
+ const link = document.createElement('a');
551
+ link.href = url;
552
+ link.download = 'locations.csv';
553
+ link.click();
554
+ URL.revokeObjectURL(url);
555
+ }
556
+ }
557
+ LocationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationsComponent, deps: [{ token: APIService }, { token: LocationsService }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
558
+ LocationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LocationsComponent, selector: "tk-locations", inputs: { exHost: "exHost", token: "token", customerId: "customerId" }, outputs: { openLocation: "openLocation", editLocation: "editLocation", removeLocation: "removeLocation", addLocation: "addLocation", importLocations: "importLocations" }, ngImport: i0, template: "<div class=\"tk-locations\">\n <app-loader *ngIf=\"isLoading\"></app-loader>\n\n <div class=\"tk-locations__view-toggle\">\n <button type=\"button\" class=\"tk-locations__view-button tk-locations__view-button--active\">\n <mat-icon class=\"tk-locations__view-icon\">menu</mat-icon>\n List\n </button>\n <button type=\"button\" class=\"tk-locations__view-button\" disabled title=\"Map view coming soon\">\n <mat-icon class=\"tk-locations__view-icon\">place</mat-icon>\n Map\n </button>\n </div>\n\n <div class=\"tk-locations__banner\" *ngIf=\"showPendingBanner\">\n <mat-icon class=\"tk-locations__banner-icon\">warning</mat-icon>\n <span class=\"tk-locations__banner-text\">\n View location(s) with pending action items to resume your calling service in {{ pendingLocations.length }} or more locations.\n </span>\n <button type=\"button\" class=\"tk-locations__banner-close\" aria-label=\"Dismiss\" (click)=\"dismissBanner()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <div class=\"tk-locations__toolbar\">\n <div style=\"position: relative; width: fit-content; min-width: 200px\">\n <input\n [value]=\"searchTerm\"\n class=\"blue-input\"\n (input)=\"onSearchInputChange($event)\"\n type=\"text\"\n placeholder=\"Search by name, city, state, country\"\n style=\"\n width: 100%;\n height: 34px;\n border-radius: 0.5rem;\n font-size: 16px;\n padding: 6px 12px 6px 44px;\n border: 1px solid #00000080;\n background: #fff;\n color: #222;\n outline: none;\n box-sizing: border-box;\n min-width: 280px;\n \"\n />\n <span\n style=\"\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n color: #757575;\n font-size: 18px;\n font-weight: normal;\n pointer-events: none;\n \"\n >\n <i\n class=\"material-icons\"\n style=\"font-size: 18px; font-weight: normal\"\n >search</i\n >\n </span>\n </div>\n\n <button type=\"button\" class=\"tk-locations__filter-button\" (click)=\"toggleFilterPanel()\">\n <img class=\"tk-locations__filter-icon\" src=\"assets/icons/filter-regular.svg\" alt=\"filter_list\" title=\"filter_list\">\n Filter\n </button>\n\n <span class=\"tk-locations__count\">{{ totalElements }} locations</span>\n\n <button type=\"button\" class=\"tk-locations__download-button\" aria-label=\"Download locations\" title=\"Download locations\" (click)=\"exportLocations()\">\n <mat-icon>file_download</mat-icon>\n </button>\n\n <button type=\"button\" class=\"tk-locations__manage-button\" [matMenuTriggerFor]=\"manageMenu\">\n Manage locations\n <mat-icon class=\"tk-locations__manage-chevron\">expand_more</mat-icon>\n </button>\n <mat-menu #manageMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item type=\"button\" (click)=\"onAddLocation()\">Add location</button>\n <button mat-menu-item type=\"button\" (click)=\"onImportLocations()\">Import locations</button>\n </mat-menu>\n </div>\n\n <table class=\"tk-locations__table\">\n <thead>\n <tr>\n <th (click)=\"toggleNameSort()\">\n Location Name\n <mat-icon class=\"tk-locations__sort-icon\">{{ sortDirection === 'asc' ? 'arrow_upward' : 'arrow_downward' }}</mat-icon>\n </th>\n <th>Address</th>\n <th>Country/Region</th>\n <th>Mapping</th>\n <th>Provisioning Type</th>\n <th class=\"tk-locations__actions-col\"></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of pagedRows\" (click)=\"onOpenLocation(row)\">\n <td class=\"tk-locations__name-cell\">\n <a href=\"javascript:void(0)\" class=\"tk-locations__name-link\" (click)=\"$event.stopPropagation(); onOpenLocation(row)\">{{ row.site.name }}</a>\n </td>\n <td>{{ addressLine(row) || '\u2014' }}</td>\n <td>{{ countryLabel(row) || '\u2014' }}</td>\n <td>\n <span class=\"tk-locations__mapping-badge\" [class.tk-locations__mapping-badge--mapped]=\"isMapped(row)\">\n {{ isMapped(row) ? 'Mapped' : 'Not mapped' }}\n </span>\n </td>\n <td>\n <span class=\"tk-locations__icon-wrapper\" *ngIf=\"provisioningTypeIcon(row) as pt; else noProvisioningType\">\n <img [src]=\"pt.src\" [matTooltip]=\"pt.tooltip\" matTooltipPosition=\"right\" width=\"20\" alt=\"\">\n </span>\n <ng-template #noProvisioningType>\u2014</ng-template>\n </td>\n <td class=\"tk-locations__actions-col\">\n <mat-progress-spinner\n *ngIf=\"row.migrationStatus === 'IN_PROGRESS'\"\n class=\"tk-locations__row-action-spinner\"\n [diameter]=\"20\"\n strokeWidth=\"2\"\n mode=\"indeterminate\"\n matTooltip=\"Migrating site\u2026\">\n </mat-progress-spinner>\n <button\n *ngIf=\"row.migrationStatus !== 'IN_PROGRESS'\"\n mat-icon-button\n class=\"tk-locations__row-action-button\"\n [matMenuTriggerFor]=\"rowMenu\"\n (click)=\"$event.stopPropagation()\"\n aria-label=\"Open location actions\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #rowMenu=\"matMenu\" yPosition=\"below\">\n <button *ngIf=\"row.location\" mat-menu-item type=\"button\" (click)=\"onOpenLocation(row)\">View details</button>\n <button *ngIf=\"row.location\" mat-menu-item type=\"button\" (click)=\"onEditLocation(row)\">Edit location</button>\n <button\n *ngIf=\"canMigrateSite(row)\"\n mat-menu-item\n type=\"button\"\n (click)=\"onMigrateSite(row)\">Migrate site</button>\n <button *ngIf=\"row.location\" mat-menu-item type=\"button\" (click)=\"onRemoveLocation(row)\">Remove location</button>\n </mat-menu>\n </td>\n </tr>\n <tr *ngIf=\"!pagedRows.length\">\n <td colspan=\"6\" class=\"tk-locations__empty\">No locations match your search.</td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"tk-locations__footer\">\n <div class=\"tk-locations__rows-per-page\">\n <label for=\"tk-locations-page-size\">Rows per page:</label>\n <select id=\"tk-locations-page-size\" class=\"tk-locations__rows-per-page-select\" [ngModel]=\"pageSize\" (change)=\"onPageSizeChange($event)\">\n <option *ngFor=\"let size of pageSizeOptions\" [value]=\"size\">{{ size }}</option>\n </select>\n </div>\n <span class=\"tk-locations__footer-text\">{{ pageRangeLabel }}</span>\n <div class=\"tk-locations__pagination\">\n <button type=\"button\" class=\"tk-locations__pagination-button\" [disabled]=\"!hasPreviousPage\" (click)=\"goToPreviousPage()\" aria-label=\"Previous page\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button type=\"button\" class=\"tk-locations__pagination-button\" [disabled]=\"!hasNextPage\" (click)=\"goToNextPage()\" aria-label=\"Next page\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n </div>\n\n <div\n class=\"tk-locations__filter-backdrop\"\n *ngIf=\"isFilterPanelOpen\"\n (click)=\"closeFilterPanel()\">\n </div>\n\n <aside class=\"tk-locations__filter-panel\" [class.tk-locations__filter-panel--open]=\"isFilterPanelOpen\">\n <div class=\"tk-locations__filter-panel-header\">\n <h3 class=\"tk-locations__filter-panel-title\">Filter locations</h3>\n <button\n type=\"button\"\n class=\"tk-locations__filter-panel-close\"\n aria-label=\"Close filter panel\"\n (click)=\"closeFilterPanel()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <div class=\"tk-locations__filter-panel-body\">\n <div class=\"tk-locations__filter-field\">\n <label class=\"tk-locations__filter-label\" for=\"tk-locations-filter-mapped\">Mapping</label>\n <div class=\"tk-locations__filter-select-wrap\">\n <select id=\"tk-locations-filter-mapped\" class=\"tk-locations__filter-select\" [(ngModel)]=\"filters.mapped\" (change)=\"onFilterChange()\">\n <option value=\"\">All</option>\n <option value=\"mapped\">Mapped</option>\n <option value=\"unmapped\">Not mapped</option>\n </select>\n <mat-icon class=\"tk-locations__filter-select-icon\">expand_more</mat-icon>\n </div>\n </div>\n\n <div class=\"tk-locations__filter-field\">\n <label class=\"tk-locations__filter-label\" for=\"tk-locations-filter-country\">Country/Region</label>\n <div class=\"tk-locations__filter-select-wrap\">\n <select id=\"tk-locations-filter-country\" class=\"tk-locations__filter-select\" [(ngModel)]=\"filters.country\" (change)=\"onFilterChange()\">\n <option value=\"\">All countries</option>\n <option *ngFor=\"let country of countries\" [value]=\"country\">{{ country }}</option>\n </select>\n <mat-icon class=\"tk-locations__filter-select-icon\">expand_more</mat-icon>\n </div>\n </div>\n\n <div class=\"tk-locations__filter-field\">\n <label class=\"tk-locations__filter-label\" for=\"tk-locations-filter-pending\">Pending action items</label>\n <div class=\"tk-locations__filter-select-wrap\">\n <select id=\"tk-locations-filter-pending\" class=\"tk-locations__filter-select\" [(ngModel)]=\"filters.pendingActions\" (change)=\"onFilterChange()\">\n <option value=\"\">All</option>\n <option value=\"true\">Yes</option>\n <option value=\"false\">No</option>\n </select>\n <mat-icon class=\"tk-locations__filter-select-icon\">expand_more</mat-icon>\n </div>\n </div>\n </div>\n\n <div class=\"tk-locations__filter-panel-footer\">\n <button type=\"button\" class=\"tk-locations__filter-clear\" (click)=\"clearFilters()\">Clear all</button>\n <button type=\"button\" class=\"tk-locations__filter-done\" (click)=\"closeFilterPanel()\">Done</button>\n </div>\n </aside>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap\";.tk-locations{font-family:Inter,Helvetica Neue,Helvetica,Arial,sans-serif;color:#000000f2;padding-top:0}.tk-locations__view-toggle{display:flex;align-items:center;gap:.25rem;margin-bottom:1rem;width:-moz-fit-content;width:fit-content}.tk-locations__view-button{display:inline-flex;align-items:center;gap:.375rem;padding:.5rem .875rem;background:none;border:none;border-radius:6.25rem;font-family:inherit;font-size:1rem;font-weight:500;color:#000000b3;cursor:pointer}.tk-locations__view-button:hover:not(:disabled){background:rgba(0,0,0,.0705882353)}.tk-locations__view-button--active{background:#C1C1C1;color:#000000f2}.tk-locations__view-button--active:hover{background:rgba(0,0,0,.3019607843)}.tk-locations__view-button:disabled{cursor:default;opacity:.5}.tk-locations__view-button:disabled:hover{background:none}.tk-locations__view-icon{height:1.125rem;width:1.125rem;opacity:.6}.tk-locations__view-button--active .tk-locations__view-icon{opacity:1}.tk-locations__banner{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding:.75rem 1rem;background:#fdf1d6;border:1px solid #f0d9a6;border-radius:.5rem;color:#7a5b0a}.tk-locations__banner-icon{font-size:1.125rem;height:1.125rem;width:1.125rem;color:#b5860b;flex-shrink:0}.tk-locations__banner-text{flex:1;font-size:.8125rem}.tk-locations__banner-close{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;color:#7a5b0a;cursor:pointer}.tk-locations__banner-close:hover{color:#000000f2}.tk-locations__toolbar{display:flex;align-items:center;gap:.75rem;margin:.5rem .5rem 1rem}.tk-locations__filter-button{display:inline-flex;align-items:center;gap:.375rem;height:34px;padding:.5rem .875rem;background:#fff;border:1px solid rgba(0,0,0,.5019607843);border-radius:.5rem;font-family:inherit;font-size:.8125rem;font-weight:500;color:#000000f2;cursor:pointer}.tk-locations__filter-button:hover{background:rgba(0,0,0,.03)}.tk-locations__filter-icon{font-size:1rem;height:1rem;width:1rem;opacity:.6}.tk-locations__count{font-size:.8125rem;color:#0009;white-space:nowrap}.tk-locations__download-button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;margin-left:auto;background:none;border:none;color:#0009;cursor:pointer}.tk-locations__download-button:hover{color:#000000f2}.tk-locations__manage-button{display:inline-flex;align-items:center;gap:.375rem;height:34px;padding:.5rem 1rem;background:#000;color:#fff;border:none;border-radius:6.25rem;font-family:inherit;font-size:.8125rem;font-weight:500;cursor:pointer}.tk-locations__manage-button:hover{background:#222}.tk-locations__manage-icon,.tk-locations__manage-chevron{font-size:1.125rem;height:1.125rem;width:1.125rem}.tk-locations__table{width:100%;border-collapse:collapse;font-family:Inter,sans-serif}.tk-locations__table th{height:39px;padding:.5rem 1.5rem .5rem .75rem;background-color:#ededed;text-align:start;font-size:.75rem;font-weight:500;color:#000000b3;word-break:break-all;max-inline-size:100%;cursor:pointer}.tk-locations__table th:hover{background-color:#dedede}.tk-locations__table td{height:49px;padding:.5rem 1.5rem .5rem .75rem;box-shadow:inset 0 -1px #0003;background-color:#fff;text-align:start;font-size:.875rem;color:#000000f2;word-break:break-all;cursor:pointer;transition:background-color .2s,box-shadow .2s}.tk-locations__table tbody tr:hover td{background:#ededed}.tk-locations__sort-icon{font-size:1rem;height:1rem;width:1rem;vertical-align:middle;margin-left:.25rem;color:#00000080}.tk-locations__name-cell{min-width:0}.tk-locations__name-link{color:#000000de;font-weight:500;text-decoration:none}.tk-locations__actions-col{width:3rem;text-align:center!important;position:relative}.tk-locations__row-action-spinner{display:inline-block;margin:0 auto}.tk-locations__icon-wrapper{display:inline-flex;align-items:center}.tk-locations__mapping-badge{display:inline-flex;align-items:center;padding:.125rem .5rem;border-radius:6.25rem;font-size:.75rem;font-weight:500;color:#0009;background:rgba(0,0,0,.06)}.tk-locations__mapping-badge--mapped{color:#1a7f37;background:rgba(26,127,55,.1)}.tk-locations__row-action-button{color:#0009}.tk-locations__row-action-button:hover{color:#000000f2}.tk-locations__empty{padding:1.5rem;text-align:center;color:#0009}.tk-locations__footer{display:flex;align-items:center;justify-content:flex-end;gap:1.5rem;margin-top:1rem;font-size:.8125rem;color:#0009}.tk-locations__rows-per-page{display:flex;align-items:center;gap:.5rem}.tk-locations__rows-per-page-select{padding:.25rem .5rem;background:#fff;border:1px solid rgba(0,0,0,.12);border-radius:6px;font-family:inherit;font-size:.8125rem;color:#000000f2;cursor:pointer}.tk-locations__pagination{display:flex;align-items:center;gap:.25rem}.tk-locations__pagination-button{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;color:#0009;cursor:pointer}.tk-locations__pagination-button:hover:not(:disabled){color:#000000f2}.tk-locations__pagination-button:disabled{color:#00000040;cursor:default}.tk-locations__filter-backdrop{position:fixed;inset:0;z-index:1000;background-color:oklch(18% .01 260/20%)}.tk-locations__filter-panel{position:fixed;top:0;right:0;bottom:0;z-index:1001;display:flex;flex-direction:column;width:22rem;max-width:100vw;background:#fff;border-left:1px solid rgba(0,0,0,.12);box-shadow:-4px 0 16px #00000014;font-family:Inter,Helvetica Neue,Helvetica,Arial,sans-serif;transform:translate(100%);transition:transform .1s ease;will-change:transform}.tk-locations__filter-panel--open{transform:translate(0)}.tk-locations__filter-panel-header{display:flex;align-items:center;justify-content:space-between;padding:1.25rem 1.5rem;border-bottom:1px solid rgba(0,0,0,.12)}.tk-locations__filter-panel-title{margin:0;font-size:1rem;font-weight:600;color:#000000f2}.tk-locations__filter-panel-close{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;color:#0009;cursor:pointer}.tk-locations__filter-panel-close:hover{color:#000000f2}.tk-locations__filter-panel-body{padding:1.5rem 1.5rem 0;overflow-y:auto}.tk-locations__filter-field{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1.5rem}.tk-locations__filter-label{font-size:.8125rem;font-weight:500;color:#000000f2}.tk-locations__filter-select-wrap{position:relative;display:flex;align-items:center}.tk-locations__filter-select{width:100%;appearance:none;padding:.625rem 2rem .625rem .75rem;background:#fff;border:1px solid rgba(0,0,0,.12);border-radius:6px;font-family:inherit;font-size:.8125rem;color:#000000f2;cursor:pointer}.tk-locations__filter-select:focus{outline:none;border-color:#0006}.tk-locations__filter-select-icon{position:absolute;right:.5rem;font-size:1.125rem;height:1.125rem;width:1.125rem;color:#0006;pointer-events:none}.tk-locations__filter-panel-footer{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem 1.5rem}.tk-locations__filter-clear{background:none;border:none;padding:0;font-family:inherit;font-size:.813rem;font-weight:500;color:#000000f2;cursor:pointer;padding-inline:.75rem;height:2rem;border-radius:6px}.tk-locations__filter-clear:hover{background-color:oklch(95.5% .005 260)}.tk-locations__filter-done{background-color:#fff;border-radius:6px;font-weight:500;font-family:inherit;font-size:.813rem;cursor:pointer;border:1px solid oklch(92% .003 260);padding-inline:.75rem;height:2rem}.tk-locations__filter-done:hover{background-color:oklch(95.5% .005 260)}::ng-deep input.blue-input{border:solid .0625rem rgba(0,0,0,.5019607843)!important}::ng-deep input.blue-input:focus{color:#000000b3;background-color:#ededed;border:solid .0625rem rgba(0,0,0,.5019607843);font-weight:500;cursor:pointer;box-shadow:0 0 0 .12rem #fff,0 0 0 .25rem #1170cf,0 0 0 .3rem #1170cf59;background-color:#fff!important}::ng-deep input.blue-input:focus:focus-visible{outline:none}::ng-deep input.blue-input:hover{background-color:#00000012!important}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }] });
559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationsComponent, decorators: [{
560
+ type: Component,
561
+ args: [{ selector: 'tk-locations', template: "<div class=\"tk-locations\">\n <app-loader *ngIf=\"isLoading\"></app-loader>\n\n <div class=\"tk-locations__view-toggle\">\n <button type=\"button\" class=\"tk-locations__view-button tk-locations__view-button--active\">\n <mat-icon class=\"tk-locations__view-icon\">menu</mat-icon>\n List\n </button>\n <button type=\"button\" class=\"tk-locations__view-button\" disabled title=\"Map view coming soon\">\n <mat-icon class=\"tk-locations__view-icon\">place</mat-icon>\n Map\n </button>\n </div>\n\n <div class=\"tk-locations__banner\" *ngIf=\"showPendingBanner\">\n <mat-icon class=\"tk-locations__banner-icon\">warning</mat-icon>\n <span class=\"tk-locations__banner-text\">\n View location(s) with pending action items to resume your calling service in {{ pendingLocations.length }} or more locations.\n </span>\n <button type=\"button\" class=\"tk-locations__banner-close\" aria-label=\"Dismiss\" (click)=\"dismissBanner()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <div class=\"tk-locations__toolbar\">\n <div style=\"position: relative; width: fit-content; min-width: 200px\">\n <input\n [value]=\"searchTerm\"\n class=\"blue-input\"\n (input)=\"onSearchInputChange($event)\"\n type=\"text\"\n placeholder=\"Search by name, city, state, country\"\n style=\"\n width: 100%;\n height: 34px;\n border-radius: 0.5rem;\n font-size: 16px;\n padding: 6px 12px 6px 44px;\n border: 1px solid #00000080;\n background: #fff;\n color: #222;\n outline: none;\n box-sizing: border-box;\n min-width: 280px;\n \"\n />\n <span\n style=\"\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n color: #757575;\n font-size: 18px;\n font-weight: normal;\n pointer-events: none;\n \"\n >\n <i\n class=\"material-icons\"\n style=\"font-size: 18px; font-weight: normal\"\n >search</i\n >\n </span>\n </div>\n\n <button type=\"button\" class=\"tk-locations__filter-button\" (click)=\"toggleFilterPanel()\">\n <img class=\"tk-locations__filter-icon\" src=\"assets/icons/filter-regular.svg\" alt=\"filter_list\" title=\"filter_list\">\n Filter\n </button>\n\n <span class=\"tk-locations__count\">{{ totalElements }} locations</span>\n\n <button type=\"button\" class=\"tk-locations__download-button\" aria-label=\"Download locations\" title=\"Download locations\" (click)=\"exportLocations()\">\n <mat-icon>file_download</mat-icon>\n </button>\n\n <button type=\"button\" class=\"tk-locations__manage-button\" [matMenuTriggerFor]=\"manageMenu\">\n Manage locations\n <mat-icon class=\"tk-locations__manage-chevron\">expand_more</mat-icon>\n </button>\n <mat-menu #manageMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item type=\"button\" (click)=\"onAddLocation()\">Add location</button>\n <button mat-menu-item type=\"button\" (click)=\"onImportLocations()\">Import locations</button>\n </mat-menu>\n </div>\n\n <table class=\"tk-locations__table\">\n <thead>\n <tr>\n <th (click)=\"toggleNameSort()\">\n Location Name\n <mat-icon class=\"tk-locations__sort-icon\">{{ sortDirection === 'asc' ? 'arrow_upward' : 'arrow_downward' }}</mat-icon>\n </th>\n <th>Address</th>\n <th>Country/Region</th>\n <th>Mapping</th>\n <th>Provisioning Type</th>\n <th class=\"tk-locations__actions-col\"></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of pagedRows\" (click)=\"onOpenLocation(row)\">\n <td class=\"tk-locations__name-cell\">\n <a href=\"javascript:void(0)\" class=\"tk-locations__name-link\" (click)=\"$event.stopPropagation(); onOpenLocation(row)\">{{ row.site.name }}</a>\n </td>\n <td>{{ addressLine(row) || '\u2014' }}</td>\n <td>{{ countryLabel(row) || '\u2014' }}</td>\n <td>\n <span class=\"tk-locations__mapping-badge\" [class.tk-locations__mapping-badge--mapped]=\"isMapped(row)\">\n {{ isMapped(row) ? 'Mapped' : 'Not mapped' }}\n </span>\n </td>\n <td>\n <span class=\"tk-locations__icon-wrapper\" *ngIf=\"provisioningTypeIcon(row) as pt; else noProvisioningType\">\n <img [src]=\"pt.src\" [matTooltip]=\"pt.tooltip\" matTooltipPosition=\"right\" width=\"20\" alt=\"\">\n </span>\n <ng-template #noProvisioningType>\u2014</ng-template>\n </td>\n <td class=\"tk-locations__actions-col\">\n <mat-progress-spinner\n *ngIf=\"row.migrationStatus === 'IN_PROGRESS'\"\n class=\"tk-locations__row-action-spinner\"\n [diameter]=\"20\"\n strokeWidth=\"2\"\n mode=\"indeterminate\"\n matTooltip=\"Migrating site\u2026\">\n </mat-progress-spinner>\n <button\n *ngIf=\"row.migrationStatus !== 'IN_PROGRESS'\"\n mat-icon-button\n class=\"tk-locations__row-action-button\"\n [matMenuTriggerFor]=\"rowMenu\"\n (click)=\"$event.stopPropagation()\"\n aria-label=\"Open location actions\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #rowMenu=\"matMenu\" yPosition=\"below\">\n <button *ngIf=\"row.location\" mat-menu-item type=\"button\" (click)=\"onOpenLocation(row)\">View details</button>\n <button *ngIf=\"row.location\" mat-menu-item type=\"button\" (click)=\"onEditLocation(row)\">Edit location</button>\n <button\n *ngIf=\"canMigrateSite(row)\"\n mat-menu-item\n type=\"button\"\n (click)=\"onMigrateSite(row)\">Migrate site</button>\n <button *ngIf=\"row.location\" mat-menu-item type=\"button\" (click)=\"onRemoveLocation(row)\">Remove location</button>\n </mat-menu>\n </td>\n </tr>\n <tr *ngIf=\"!pagedRows.length\">\n <td colspan=\"6\" class=\"tk-locations__empty\">No locations match your search.</td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"tk-locations__footer\">\n <div class=\"tk-locations__rows-per-page\">\n <label for=\"tk-locations-page-size\">Rows per page:</label>\n <select id=\"tk-locations-page-size\" class=\"tk-locations__rows-per-page-select\" [ngModel]=\"pageSize\" (change)=\"onPageSizeChange($event)\">\n <option *ngFor=\"let size of pageSizeOptions\" [value]=\"size\">{{ size }}</option>\n </select>\n </div>\n <span class=\"tk-locations__footer-text\">{{ pageRangeLabel }}</span>\n <div class=\"tk-locations__pagination\">\n <button type=\"button\" class=\"tk-locations__pagination-button\" [disabled]=\"!hasPreviousPage\" (click)=\"goToPreviousPage()\" aria-label=\"Previous page\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button type=\"button\" class=\"tk-locations__pagination-button\" [disabled]=\"!hasNextPage\" (click)=\"goToNextPage()\" aria-label=\"Next page\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n </div>\n\n <div\n class=\"tk-locations__filter-backdrop\"\n *ngIf=\"isFilterPanelOpen\"\n (click)=\"closeFilterPanel()\">\n </div>\n\n <aside class=\"tk-locations__filter-panel\" [class.tk-locations__filter-panel--open]=\"isFilterPanelOpen\">\n <div class=\"tk-locations__filter-panel-header\">\n <h3 class=\"tk-locations__filter-panel-title\">Filter locations</h3>\n <button\n type=\"button\"\n class=\"tk-locations__filter-panel-close\"\n aria-label=\"Close filter panel\"\n (click)=\"closeFilterPanel()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <div class=\"tk-locations__filter-panel-body\">\n <div class=\"tk-locations__filter-field\">\n <label class=\"tk-locations__filter-label\" for=\"tk-locations-filter-mapped\">Mapping</label>\n <div class=\"tk-locations__filter-select-wrap\">\n <select id=\"tk-locations-filter-mapped\" class=\"tk-locations__filter-select\" [(ngModel)]=\"filters.mapped\" (change)=\"onFilterChange()\">\n <option value=\"\">All</option>\n <option value=\"mapped\">Mapped</option>\n <option value=\"unmapped\">Not mapped</option>\n </select>\n <mat-icon class=\"tk-locations__filter-select-icon\">expand_more</mat-icon>\n </div>\n </div>\n\n <div class=\"tk-locations__filter-field\">\n <label class=\"tk-locations__filter-label\" for=\"tk-locations-filter-country\">Country/Region</label>\n <div class=\"tk-locations__filter-select-wrap\">\n <select id=\"tk-locations-filter-country\" class=\"tk-locations__filter-select\" [(ngModel)]=\"filters.country\" (change)=\"onFilterChange()\">\n <option value=\"\">All countries</option>\n <option *ngFor=\"let country of countries\" [value]=\"country\">{{ country }}</option>\n </select>\n <mat-icon class=\"tk-locations__filter-select-icon\">expand_more</mat-icon>\n </div>\n </div>\n\n <div class=\"tk-locations__filter-field\">\n <label class=\"tk-locations__filter-label\" for=\"tk-locations-filter-pending\">Pending action items</label>\n <div class=\"tk-locations__filter-select-wrap\">\n <select id=\"tk-locations-filter-pending\" class=\"tk-locations__filter-select\" [(ngModel)]=\"filters.pendingActions\" (change)=\"onFilterChange()\">\n <option value=\"\">All</option>\n <option value=\"true\">Yes</option>\n <option value=\"false\">No</option>\n </select>\n <mat-icon class=\"tk-locations__filter-select-icon\">expand_more</mat-icon>\n </div>\n </div>\n </div>\n\n <div class=\"tk-locations__filter-panel-footer\">\n <button type=\"button\" class=\"tk-locations__filter-clear\" (click)=\"clearFilters()\">Clear all</button>\n <button type=\"button\" class=\"tk-locations__filter-done\" (click)=\"closeFilterPanel()\">Done</button>\n </div>\n </aside>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap\";.tk-locations{font-family:Inter,Helvetica Neue,Helvetica,Arial,sans-serif;color:#000000f2;padding-top:0}.tk-locations__view-toggle{display:flex;align-items:center;gap:.25rem;margin-bottom:1rem;width:-moz-fit-content;width:fit-content}.tk-locations__view-button{display:inline-flex;align-items:center;gap:.375rem;padding:.5rem .875rem;background:none;border:none;border-radius:6.25rem;font-family:inherit;font-size:1rem;font-weight:500;color:#000000b3;cursor:pointer}.tk-locations__view-button:hover:not(:disabled){background:rgba(0,0,0,.0705882353)}.tk-locations__view-button--active{background:#C1C1C1;color:#000000f2}.tk-locations__view-button--active:hover{background:rgba(0,0,0,.3019607843)}.tk-locations__view-button:disabled{cursor:default;opacity:.5}.tk-locations__view-button:disabled:hover{background:none}.tk-locations__view-icon{height:1.125rem;width:1.125rem;opacity:.6}.tk-locations__view-button--active .tk-locations__view-icon{opacity:1}.tk-locations__banner{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding:.75rem 1rem;background:#fdf1d6;border:1px solid #f0d9a6;border-radius:.5rem;color:#7a5b0a}.tk-locations__banner-icon{font-size:1.125rem;height:1.125rem;width:1.125rem;color:#b5860b;flex-shrink:0}.tk-locations__banner-text{flex:1;font-size:.8125rem}.tk-locations__banner-close{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;color:#7a5b0a;cursor:pointer}.tk-locations__banner-close:hover{color:#000000f2}.tk-locations__toolbar{display:flex;align-items:center;gap:.75rem;margin:.5rem .5rem 1rem}.tk-locations__filter-button{display:inline-flex;align-items:center;gap:.375rem;height:34px;padding:.5rem .875rem;background:#fff;border:1px solid rgba(0,0,0,.5019607843);border-radius:.5rem;font-family:inherit;font-size:.8125rem;font-weight:500;color:#000000f2;cursor:pointer}.tk-locations__filter-button:hover{background:rgba(0,0,0,.03)}.tk-locations__filter-icon{font-size:1rem;height:1rem;width:1rem;opacity:.6}.tk-locations__count{font-size:.8125rem;color:#0009;white-space:nowrap}.tk-locations__download-button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;margin-left:auto;background:none;border:none;color:#0009;cursor:pointer}.tk-locations__download-button:hover{color:#000000f2}.tk-locations__manage-button{display:inline-flex;align-items:center;gap:.375rem;height:34px;padding:.5rem 1rem;background:#000;color:#fff;border:none;border-radius:6.25rem;font-family:inherit;font-size:.8125rem;font-weight:500;cursor:pointer}.tk-locations__manage-button:hover{background:#222}.tk-locations__manage-icon,.tk-locations__manage-chevron{font-size:1.125rem;height:1.125rem;width:1.125rem}.tk-locations__table{width:100%;border-collapse:collapse;font-family:Inter,sans-serif}.tk-locations__table th{height:39px;padding:.5rem 1.5rem .5rem .75rem;background-color:#ededed;text-align:start;font-size:.75rem;font-weight:500;color:#000000b3;word-break:break-all;max-inline-size:100%;cursor:pointer}.tk-locations__table th:hover{background-color:#dedede}.tk-locations__table td{height:49px;padding:.5rem 1.5rem .5rem .75rem;box-shadow:inset 0 -1px #0003;background-color:#fff;text-align:start;font-size:.875rem;color:#000000f2;word-break:break-all;cursor:pointer;transition:background-color .2s,box-shadow .2s}.tk-locations__table tbody tr:hover td{background:#ededed}.tk-locations__sort-icon{font-size:1rem;height:1rem;width:1rem;vertical-align:middle;margin-left:.25rem;color:#00000080}.tk-locations__name-cell{min-width:0}.tk-locations__name-link{color:#000000de;font-weight:500;text-decoration:none}.tk-locations__actions-col{width:3rem;text-align:center!important;position:relative}.tk-locations__row-action-spinner{display:inline-block;margin:0 auto}.tk-locations__icon-wrapper{display:inline-flex;align-items:center}.tk-locations__mapping-badge{display:inline-flex;align-items:center;padding:.125rem .5rem;border-radius:6.25rem;font-size:.75rem;font-weight:500;color:#0009;background:rgba(0,0,0,.06)}.tk-locations__mapping-badge--mapped{color:#1a7f37;background:rgba(26,127,55,.1)}.tk-locations__row-action-button{color:#0009}.tk-locations__row-action-button:hover{color:#000000f2}.tk-locations__empty{padding:1.5rem;text-align:center;color:#0009}.tk-locations__footer{display:flex;align-items:center;justify-content:flex-end;gap:1.5rem;margin-top:1rem;font-size:.8125rem;color:#0009}.tk-locations__rows-per-page{display:flex;align-items:center;gap:.5rem}.tk-locations__rows-per-page-select{padding:.25rem .5rem;background:#fff;border:1px solid rgba(0,0,0,.12);border-radius:6px;font-family:inherit;font-size:.8125rem;color:#000000f2;cursor:pointer}.tk-locations__pagination{display:flex;align-items:center;gap:.25rem}.tk-locations__pagination-button{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;color:#0009;cursor:pointer}.tk-locations__pagination-button:hover:not(:disabled){color:#000000f2}.tk-locations__pagination-button:disabled{color:#00000040;cursor:default}.tk-locations__filter-backdrop{position:fixed;inset:0;z-index:1000;background-color:oklch(18% .01 260/20%)}.tk-locations__filter-panel{position:fixed;top:0;right:0;bottom:0;z-index:1001;display:flex;flex-direction:column;width:22rem;max-width:100vw;background:#fff;border-left:1px solid rgba(0,0,0,.12);box-shadow:-4px 0 16px #00000014;font-family:Inter,Helvetica Neue,Helvetica,Arial,sans-serif;transform:translate(100%);transition:transform .1s ease;will-change:transform}.tk-locations__filter-panel--open{transform:translate(0)}.tk-locations__filter-panel-header{display:flex;align-items:center;justify-content:space-between;padding:1.25rem 1.5rem;border-bottom:1px solid rgba(0,0,0,.12)}.tk-locations__filter-panel-title{margin:0;font-size:1rem;font-weight:600;color:#000000f2}.tk-locations__filter-panel-close{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;color:#0009;cursor:pointer}.tk-locations__filter-panel-close:hover{color:#000000f2}.tk-locations__filter-panel-body{padding:1.5rem 1.5rem 0;overflow-y:auto}.tk-locations__filter-field{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1.5rem}.tk-locations__filter-label{font-size:.8125rem;font-weight:500;color:#000000f2}.tk-locations__filter-select-wrap{position:relative;display:flex;align-items:center}.tk-locations__filter-select{width:100%;appearance:none;padding:.625rem 2rem .625rem .75rem;background:#fff;border:1px solid rgba(0,0,0,.12);border-radius:6px;font-family:inherit;font-size:.8125rem;color:#000000f2;cursor:pointer}.tk-locations__filter-select:focus{outline:none;border-color:#0006}.tk-locations__filter-select-icon{position:absolute;right:.5rem;font-size:1.125rem;height:1.125rem;width:1.125rem;color:#0006;pointer-events:none}.tk-locations__filter-panel-footer{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem 1.5rem}.tk-locations__filter-clear{background:none;border:none;padding:0;font-family:inherit;font-size:.813rem;font-weight:500;color:#000000f2;cursor:pointer;padding-inline:.75rem;height:2rem;border-radius:6px}.tk-locations__filter-clear:hover{background-color:oklch(95.5% .005 260)}.tk-locations__filter-done{background-color:#fff;border-radius:6px;font-weight:500;font-family:inherit;font-size:.813rem;cursor:pointer;border:1px solid oklch(92% .003 260);padding-inline:.75rem;height:2rem}.tk-locations__filter-done:hover{background-color:oklch(95.5% .005 260)}::ng-deep input.blue-input{border:solid .0625rem rgba(0,0,0,.5019607843)!important}::ng-deep input.blue-input:focus{color:#000000b3;background-color:#ededed;border:solid .0625rem rgba(0,0,0,.5019607843);font-weight:500;cursor:pointer;box-shadow:0 0 0 .12rem #fff,0 0 0 .25rem #1170cf,0 0 0 .3rem #1170cf59;background-color:#fff!important}::ng-deep input.blue-input:focus:focus-visible{outline:none}::ng-deep input.blue-input:hover{background-color:#00000012!important}\n"] }]
562
+ }], ctorParameters: function () { return [{ type: APIService }, { type: LocationsService }, { type: i1.MatDialog }]; }, propDecorators: { exHost: [{
563
+ type: Input
564
+ }], token: [{
565
+ type: Input
566
+ }], customerId: [{
567
+ type: Input
568
+ }], openLocation: [{
569
+ type: Output
570
+ }], editLocation: [{
571
+ type: Output
572
+ }], removeLocation: [{
573
+ type: Output
574
+ }], addLocation: [{
575
+ type: Output
576
+ }], importLocations: [{
577
+ type: Output
578
+ }] } });
579
+
580
+ class LocationsModule {
581
+ }
582
+ LocationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
583
+ LocationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: LocationsModule, declarations: [LocationsComponent,
584
+ LocationConfirmDialogComponent,
585
+ AppLoaderComponent], imports: [CommonModule,
586
+ HttpClientModule,
587
+ FormsModule,
588
+ MaterialModule], exports: [LocationsComponent] });
589
+ LocationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationsModule, imports: [CommonModule,
590
+ HttpClientModule,
591
+ FormsModule,
592
+ MaterialModule] });
593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocationsModule, decorators: [{
594
+ type: NgModule,
595
+ args: [{
596
+ declarations: [
597
+ LocationsComponent,
598
+ LocationConfirmDialogComponent,
599
+ AppLoaderComponent,
600
+ ],
601
+ imports: [
602
+ CommonModule,
603
+ HttpClientModule,
604
+ FormsModule,
605
+ MaterialModule,
606
+ ],
607
+ exports: [
608
+ LocationsComponent,
609
+ ],
610
+ }]
611
+ }] });
612
+
613
+ /*
614
+ * Public API Surface of @tuki-io/tuki-widgets
615
+ */
616
+ // Widget Modules
617
+
618
+ /**
619
+ * Generated bundle index. Do not edit.
620
+ */
621
+
622
+ export { LocationsComponent, LocationsModule };
623
+ //# sourceMappingURL=tuki-io-tuki-widgets-locations.mjs.map