@igo2/context 1.15.5 → 1.15.6

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 (125) hide show
  1. package/esm2020/igo2-context.mjs +4 -4
  2. package/esm2020/lib/context-import-export/context-import-export/context-import-export.component.mjs +227 -227
  3. package/esm2020/lib/context-import-export/context-import-export.module.mjs +84 -84
  4. package/esm2020/lib/context-import-export/index.mjs +2 -2
  5. package/esm2020/lib/context-import-export/shared/context-export.errors.mjs +14 -14
  6. package/esm2020/lib/context-import-export/shared/context-export.interface.mjs +1 -1
  7. package/esm2020/lib/context-import-export/shared/context-export.service.mjs +37 -37
  8. package/esm2020/lib/context-import-export/shared/context-export.utils.mjs +14 -14
  9. package/esm2020/lib/context-import-export/shared/context-import.errors.mjs +32 -32
  10. package/esm2020/lib/context-import-export/shared/context-import.service.mjs +78 -78
  11. package/esm2020/lib/context-import-export/shared/context-import.utils.mjs +132 -132
  12. package/esm2020/lib/context-import-export/shared/index.mjs +7 -7
  13. package/esm2020/lib/context-manager/context-edit/context-edit-binding.directive.mjs +49 -49
  14. package/esm2020/lib/context-manager/context-edit/context-edit.component.mjs +45 -45
  15. package/esm2020/lib/context-manager/context-edit/index.mjs +2 -2
  16. package/esm2020/lib/context-manager/context-form/context-form.component.mjs +142 -142
  17. package/esm2020/lib/context-manager/context-form/index.mjs +1 -1
  18. package/esm2020/lib/context-manager/context-item/context-item.component.mjs +244 -244
  19. package/esm2020/lib/context-manager/context-item/index.mjs +1 -1
  20. package/esm2020/lib/context-manager/context-list/context-list-binding.directive.mjs +239 -239
  21. package/esm2020/lib/context-manager/context-list/context-list.component.mjs +591 -591
  22. package/esm2020/lib/context-manager/context-list/context-list.enum.mjs +6 -6
  23. package/esm2020/lib/context-manager/context-list/index.mjs +2 -2
  24. package/esm2020/lib/context-manager/context-manager.module.mjs +161 -161
  25. package/esm2020/lib/context-manager/context-permissions/context-permissions-binding.directive.mjs +98 -98
  26. package/esm2020/lib/context-manager/context-permissions/context-permissions.component.mjs +305 -305
  27. package/esm2020/lib/context-manager/context-permissions/index.mjs +2 -2
  28. package/esm2020/lib/context-manager/index.mjs +6 -6
  29. package/esm2020/lib/context-manager/shared/context.enum.mjs +12 -12
  30. package/esm2020/lib/context-manager/shared/context.interface.mjs +1 -1
  31. package/esm2020/lib/context-manager/shared/context.service.mjs +631 -631
  32. package/esm2020/lib/context-manager/shared/index.mjs +5 -5
  33. package/esm2020/lib/context-manager/shared/layer-context.directive.mjs +155 -155
  34. package/esm2020/lib/context-manager/shared/map-context.directive.mjs +69 -69
  35. package/esm2020/lib/context-map-button/bookmark-button/bookmark-button.component.mjs +65 -65
  36. package/esm2020/lib/context-map-button/bookmark-button/bookmark-dialog.component.mjs +49 -49
  37. package/esm2020/lib/context-map-button/bookmark-button/index.mjs +2 -2
  38. package/esm2020/lib/context-map-button/context-map-button.module.mjs +95 -95
  39. package/esm2020/lib/context-map-button/index.mjs +3 -3
  40. package/esm2020/lib/context-map-button/poi-button/index.mjs +3 -3
  41. package/esm2020/lib/context-map-button/poi-button/poi-button.component.mjs +160 -160
  42. package/esm2020/lib/context-map-button/poi-button/poi-dialog.component.mjs +49 -49
  43. package/esm2020/lib/context-map-button/poi-button/shared/index.mjs +2 -2
  44. package/esm2020/lib/context-map-button/poi-button/shared/poi.interface.mjs +1 -1
  45. package/esm2020/lib/context-map-button/poi-button/shared/poi.service.mjs +32 -32
  46. package/esm2020/lib/context-map-button/user-button/index.mjs +2 -2
  47. package/esm2020/lib/context-map-button/user-button/user-button.animation.mjs +16 -16
  48. package/esm2020/lib/context-map-button/user-button/user-button.component.mjs +103 -103
  49. package/esm2020/lib/context-map-button/user-button/user-dialog.component.mjs +65 -65
  50. package/esm2020/lib/context.module.mjs +44 -44
  51. package/esm2020/lib/share-map/index.mjs +4 -4
  52. package/esm2020/lib/share-map/share-map/share-map-api.component.mjs +169 -169
  53. package/esm2020/lib/share-map/share-map/share-map-url.component.mjs +242 -242
  54. package/esm2020/lib/share-map/share-map/share-map.component.mjs +56 -56
  55. package/esm2020/lib/share-map/share-map.module.mjs +66 -66
  56. package/esm2020/lib/share-map/shared/index.mjs +1 -1
  57. package/esm2020/lib/share-map/shared/share-map.service.mjs +209 -209
  58. package/esm2020/lib/sidenav/index.mjs +1 -1
  59. package/esm2020/lib/sidenav/sidenav.component.mjs +169 -169
  60. package/esm2020/lib/sidenav/sidenav.module.mjs +60 -60
  61. package/esm2020/public_api.mjs +14 -14
  62. package/fesm2015/igo2-context.mjs +4942 -4942
  63. package/fesm2020/igo2-context.mjs +4591 -4591
  64. package/index.d.ts +5 -5
  65. package/lib/context-import-export/context-import-export/context-import-export.component.d.ts +44 -44
  66. package/lib/context-import-export/context-import-export.module.d.ts +23 -23
  67. package/lib/context-import-export/index.d.ts +2 -2
  68. package/lib/context-import-export/shared/context-export.errors.d.ts +8 -8
  69. package/lib/context-import-export/shared/context-export.interface.d.ts +5 -5
  70. package/lib/context-import-export/shared/context-export.service.d.ts +10 -10
  71. package/lib/context-import-export/shared/context-export.utils.d.ts +4 -4
  72. package/lib/context-import-export/shared/context-import.errors.d.ts +17 -17
  73. package/lib/context-import-export/shared/context-import.service.d.ts +18 -18
  74. package/lib/context-import-export/shared/context-import.utils.d.ts +17 -17
  75. package/lib/context-import-export/shared/index.d.ts +7 -7
  76. package/lib/context-manager/context-edit/context-edit-binding.directive.d.ts +20 -20
  77. package/lib/context-manager/context-edit/context-edit.component.d.ts +14 -14
  78. package/lib/context-manager/context-edit/index.d.ts +2 -2
  79. package/lib/context-manager/context-form/context-form.component.d.ts +30 -30
  80. package/lib/context-manager/context-form/index.d.ts +1 -1
  81. package/lib/context-manager/context-item/context-item.component.d.ts +32 -32
  82. package/lib/context-manager/context-item/index.d.ts +1 -1
  83. package/lib/context-manager/context-list/context-list-binding.directive.d.ts +46 -46
  84. package/lib/context-manager/context-list/context-list.component.d.ts +93 -93
  85. package/lib/context-manager/context-list/context-list.enum.d.ts +5 -5
  86. package/lib/context-manager/context-list/index.d.ts +2 -2
  87. package/lib/context-manager/context-manager.module.d.ts +37 -37
  88. package/lib/context-manager/context-permissions/context-permissions-binding.directive.d.ts +23 -23
  89. package/lib/context-manager/context-permissions/context-permissions.component.d.ts +40 -40
  90. package/lib/context-manager/context-permissions/index.d.ts +2 -2
  91. package/lib/context-manager/index.d.ts +6 -6
  92. package/lib/context-manager/shared/context.enum.d.ts +10 -10
  93. package/lib/context-manager/shared/context.interface.d.ts +75 -75
  94. package/lib/context-manager/shared/context.service.d.ts +75 -75
  95. package/lib/context-manager/shared/index.d.ts +5 -5
  96. package/lib/context-manager/shared/layer-context.directive.d.ts +28 -28
  97. package/lib/context-manager/shared/map-context.directive.d.ts +19 -19
  98. package/lib/context-map-button/bookmark-button/bookmark-button.component.d.ts +20 -20
  99. package/lib/context-map-button/bookmark-button/bookmark-dialog.component.d.ts +9 -9
  100. package/lib/context-map-button/bookmark-button/index.d.ts +2 -2
  101. package/lib/context-map-button/context-map-button.module.d.ts +27 -27
  102. package/lib/context-map-button/index.d.ts +3 -3
  103. package/lib/context-map-button/poi-button/index.d.ts +3 -3
  104. package/lib/context-map-button/poi-button/poi-button.component.d.ts +34 -34
  105. package/lib/context-map-button/poi-button/poi-dialog.component.d.ts +9 -9
  106. package/lib/context-map-button/poi-button/shared/index.d.ts +2 -2
  107. package/lib/context-map-button/poi-button/shared/poi.interface.d.ts +7 -7
  108. package/lib/context-map-button/poi-button/shared/poi.service.d.ts +16 -16
  109. package/lib/context-map-button/user-button/index.d.ts +2 -2
  110. package/lib/context-map-button/user-button/user-button.animation.d.ts +2 -2
  111. package/lib/context-map-button/user-button/user-button.component.d.ts +25 -25
  112. package/lib/context-map-button/user-button/user-dialog.component.d.ts +15 -15
  113. package/lib/context.module.d.ts +16 -16
  114. package/lib/share-map/index.d.ts +4 -4
  115. package/lib/share-map/share-map/share-map-api.component.d.ts +27 -27
  116. package/lib/share-map/share-map/share-map-url.component.d.ts +26 -26
  117. package/lib/share-map/share-map/share-map.component.d.ts +11 -11
  118. package/lib/share-map/share-map.module.d.ts +21 -21
  119. package/lib/share-map/shared/index.d.ts +1 -1
  120. package/lib/share-map/shared/share-map.service.d.ts +17 -17
  121. package/lib/sidenav/index.d.ts +1 -1
  122. package/lib/sidenav/sidenav.component.d.ts +35 -35
  123. package/lib/sidenav/sidenav.module.d.ts +18 -18
  124. package/package.json +6 -6
  125. package/public_api.d.ts +11 -11
@@ -1,170 +1,170 @@
1
- import { Component, Input } from '@angular/core';
2
- import { uuid, Clipboard } from '@igo2/utils';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@igo2/core";
5
- import * as i2 from "@igo2/auth";
6
- import * as i3 from "../shared/share-map.service";
7
- import * as i4 from "@angular/forms";
8
- import * as i5 from "@angular/common";
9
- import * as i6 from "@angular/material/icon";
10
- import * as i7 from "@angular/material/tooltip";
11
- import * as i8 from "@angular/material/form-field";
12
- import * as i9 from "@angular/material/input";
13
- import * as i10 from "@angular/material/button";
14
- import * as i11 from "@ngx-translate/core";
15
- function ShareMapApiComponent_span_10_Template(rf, ctx) { if (rf & 1) {
16
- i0.ɵɵelementStart(0, "span", 11);
17
- i0.ɵɵtext(1);
18
- i0.ɵɵelementEnd();
19
- } if (rf & 2) {
20
- const ctx_r0 = i0.ɵɵnextContext();
21
- i0.ɵɵadvance(1);
22
- i0.ɵɵtextInterpolate1("", ctx_r0.userId, "-");
23
- } }
24
- function ShareMapApiComponent_button_18_Template(rf, ctx) { if (rf & 1) {
25
- i0.ɵɵelementStart(0, "button", 12);
26
- i0.ɵɵtext(1);
27
- i0.ɵɵpipe(2, "translate");
28
- i0.ɵɵelementEnd();
29
- } if (rf & 2) {
30
- const ctx_r1 = i0.ɵɵnextContext();
31
- i0.ɵɵproperty("disabled", !ctx_r1.form.valid);
32
- i0.ɵɵadvance(1);
33
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "igo.context.shareMap.button"), " ");
34
- } }
35
- function ShareMapApiComponent_button_19_Template(rf, ctx) { if (rf & 1) {
36
- const _r5 = i0.ɵɵgetCurrentView();
37
- i0.ɵɵelementStart(0, "button", 13);
38
- i0.ɵɵlistener("click", function ShareMapApiComponent_button_19_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.updateContextShared(ctx_r4.form.value)); });
39
- i0.ɵɵtext(1);
40
- i0.ɵɵpipe(2, "translate");
41
- i0.ɵɵelementEnd();
42
- } if (rf & 2) {
43
- i0.ɵɵadvance(1);
44
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "igo.context.shareMap.refreshBtn"), " ");
45
- } }
46
- function ShareMapApiComponent_div_20_Template(rf, ctx) { if (rf & 1) {
47
- const _r8 = i0.ɵɵgetCurrentView();
48
- i0.ɵɵelementStart(0, "div", 14)(1, "mat-form-field");
49
- i0.ɵɵelement(2, "textarea", 15, 16);
50
- i0.ɵɵpipe(4, "translate");
51
- i0.ɵɵelementStart(5, "button", 17);
52
- i0.ɵɵlistener("click", function ShareMapApiComponent_div_20_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r8); const _r6 = i0.ɵɵreference(3); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.copyTextToClipboard(_r6)); });
53
- i0.ɵɵpipe(6, "translate");
54
- i0.ɵɵelement(7, "mat-icon", 18);
55
- i0.ɵɵelementEnd()();
56
- i0.ɵɵelement(8, "div");
57
- i0.ɵɵelementEnd();
58
- } if (rf & 2) {
59
- const ctx_r3 = i0.ɵɵnextContext();
60
- i0.ɵɵadvance(2);
61
- i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(4, 3, "igo.context.shareMap.placeholderLink"))("value", ctx_r3.url);
62
- i0.ɵɵadvance(3);
63
- i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(6, 5, "igo.context.shareMap.copy"));
64
- } }
65
- export class ShareMapApiComponent {
66
- constructor(languageService, messageService, auth, shareMapService, formBuilder) {
67
- this.languageService = languageService;
68
- this.messageService = messageService;
69
- this.auth = auth;
70
- this.shareMapService = shareMapService;
71
- this.formBuilder = formBuilder;
72
- }
73
- ngOnInit() {
74
- this.auth.authenticate$.subscribe(auth => {
75
- const decodeToken = this.auth.decodeToken();
76
- this.userId = decodeToken.user ? decodeToken.user.id : undefined;
77
- this.buildForm();
78
- });
79
- }
80
- createUrl(values = {}) {
81
- const inputs = Object.assign({}, values);
82
- inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
83
- this.url = this.shareMapService.getUrlWithApi(inputs);
84
- this.shareMapService.createContextShared(this.map, inputs).subscribe(rep => {
85
- this.idContextShared = rep.id;
86
- this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
87
- }, err => {
88
- err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
89
- this.messageService.showError(err);
90
- });
91
- }
92
- updateContextShared(values = {}) {
93
- const inputs = Object.assign({}, values);
94
- inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
95
- this.shareMapService.updateContextShared(this.map, inputs, this.idContextShared).subscribe(rep => {
96
- this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
97
- }, err => {
98
- err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
99
- this.messageService.showError(err);
100
- });
101
- }
102
- copyTextToClipboard(textArea) {
103
- const successful = Clipboard.copy(textArea);
104
- if (successful) {
105
- this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
106
- }
107
- }
108
- buildForm() {
109
- this.url = undefined;
110
- const id = uuid();
111
- let title = 'Partage ';
112
- title += this.userId ? `(${this.userId}-${id})` : `(${id})`;
113
- this.form = this.formBuilder.group({
114
- title: [title],
115
- uri: [id]
116
- });
117
- }
118
- }
119
- ShareMapApiComponent.ɵfac = function ShareMapApiComponent_Factory(t) { return new (t || ShareMapApiComponent)(i0.ɵɵdirectiveInject(i1.LanguageService), i0.ɵɵdirectiveInject(i1.MessageService), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.ShareMapService), i0.ɵɵdirectiveInject(i4.UntypedFormBuilder)); };
120
- ShareMapApiComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShareMapApiComponent, selectors: [["igo-share-map-api"]], inputs: { map: "map" }, decls: 21, vars: 18, consts: [[1, "igo-form", 3, "formGroup", "ngSubmit"], [1, "igo-input-container"], ["matInput", "", "required", "", "formControlName", "title", 3, "placeholder"], ["id", "uriInput", 1, "igo-input-container"], ["class", "prefix", 4, "ngIf"], [1, "fieldWrapper"], ["matInput", "", "required", "", "formControlName", "uri", 3, "readonly", "placeholder"], [1, "igo-form-button-group"], ["mat-raised-button", "", "type", "submit", 3, "disabled", 4, "ngIf"], ["mat-raised-button", "", "type", "button", 3, "click", 4, "ngIf"], ["class", "igo-input-container linkToShare", 4, "ngIf"], [1, "prefix"], ["mat-raised-button", "", "type", "submit", 3, "disabled"], ["mat-raised-button", "", "type", "button", 3, "click"], [1, "igo-input-container", "linkToShare"], ["matInput", "", "readonly", "", "rows", "3", 1, "textAreaWithButton", 3, "placeholder", "value"], ["textArea", ""], ["mat-icon-button", "", "tooltip-position", "below", "matTooltipShowDelay", "500", "color", "primary", 3, "matTooltip", "click"], ["svgIcon", "content-copy"]], template: function ShareMapApiComponent_Template(rf, ctx) { if (rf & 1) {
121
- i0.ɵɵelementStart(0, "form", 0);
122
- i0.ɵɵlistener("ngSubmit", function ShareMapApiComponent_Template_form_ngSubmit_0_listener() { return ctx.createUrl(ctx.form.value); });
123
- i0.ɵɵelementStart(1, "div", 1)(2, "mat-form-field");
124
- i0.ɵɵelement(3, "input", 2);
125
- i0.ɵɵpipe(4, "translate");
126
- i0.ɵɵelementStart(5, "mat-error");
127
- i0.ɵɵtext(6);
128
- i0.ɵɵpipe(7, "translate");
129
- i0.ɵɵelementEnd()()();
130
- i0.ɵɵelementStart(8, "div", 3)(9, "mat-form-field");
131
- i0.ɵɵtemplate(10, ShareMapApiComponent_span_10_Template, 2, 1, "span", 4);
132
- i0.ɵɵelementStart(11, "span", 5);
133
- i0.ɵɵelement(12, "input", 6);
134
- i0.ɵɵpipe(13, "translate");
135
- i0.ɵɵelementEnd();
136
- i0.ɵɵelementStart(14, "mat-error");
137
- i0.ɵɵtext(15);
138
- i0.ɵɵpipe(16, "translate");
139
- i0.ɵɵelementEnd()()();
140
- i0.ɵɵelementStart(17, "div", 7);
141
- i0.ɵɵtemplate(18, ShareMapApiComponent_button_18_Template, 3, 4, "button", 8);
142
- i0.ɵɵtemplate(19, ShareMapApiComponent_button_19_Template, 3, 3, "button", 9);
143
- i0.ɵɵelementEnd()();
144
- i0.ɵɵtemplate(20, ShareMapApiComponent_div_20_Template, 9, 7, "div", 10);
145
- } if (rf & 2) {
146
- i0.ɵɵproperty("formGroup", ctx.form);
147
- i0.ɵɵadvance(3);
148
- i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(4, 10, "igo.context.contextManager.form.title"));
149
- i0.ɵɵadvance(3);
150
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 12, "igo.context.contextManager.form.titleRequired"), " ");
151
- i0.ɵɵadvance(4);
152
- i0.ɵɵproperty("ngIf", ctx.userId);
153
- i0.ɵɵadvance(2);
154
- i0.ɵɵproperty("readonly", !ctx.userId)("placeholder", i0.ɵɵpipeBind1(13, 14, "igo.context.contextManager.form.uri"));
155
- i0.ɵɵadvance(3);
156
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(16, 16, "igo.context.contextManager.form.uriRequired"), " ");
157
- i0.ɵɵadvance(3);
158
- i0.ɵɵproperty("ngIf", !ctx.url);
159
- i0.ɵɵadvance(1);
160
- i0.ɵɵproperty("ngIf", ctx.url);
161
- i0.ɵɵadvance(1);
162
- i0.ɵɵproperty("ngIf", ctx.url);
163
- } }, dependencies: [i5.NgIf, i4.ɵNgNoValidate, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.RequiredValidator, i4.FormGroupDirective, i4.FormControlName, i6.MatIcon, i7.MatTooltip, i8.MatError, i8.MatFormField, i9.MatInput, i10.MatButton, i11.TranslatePipe], styles: ["@charset \"UTF-8\";mat-form-field[_ngcontent-%COMP%]{width:100%}#uriInput[_ngcontent-%COMP%] .fieldWrapper[_ngcontent-%COMP%]{display:block;overflow:hidden}#uriInput[_ngcontent-%COMP%] .prefix[_ngcontent-%COMP%]{float:left}.linkToShare\\a0[_ngcontent-%COMP%] {padding:25px 5px 5px}.linkToShare\\a0[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0[_ngcontent-%COMP%] textarea.textAreaWithButton[_ngcontent-%COMP%]{width:calc(100% - 60px)}.linkToShare\\a0[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{float:right;margin:-10px 0}.igo-form[_ngcontent-%COMP%]{padding:20px 5px 5px}.igo-form-button-group[_ngcontent-%COMP%]{text-align:center;padding-top:10px}"] });
164
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareMapApiComponent, [{
165
- type: Component,
166
- args: [{ selector: 'igo-share-map-api', template: "<form class=\"igo-form\" [formGroup]=\"form\"\n (ngSubmit)=\"createUrl(form.value)\">\n\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input matInput required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\">\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n <span *ngIf=\"userId\" class=\"prefix\">{{userId}}-</span>\n <span class=\"fieldWrapper\">\n <input matInput required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\">\n </span>\n <mat-error>\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"igo-form-button-group\">\n <button *ngIf=\"!url\"\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid\">\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n <button *ngIf=\"url\"\n mat-raised-button\n type=\"button\"\n (click)=\"updateContextShared(form.value)\">\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n </div>\n</form>\n\n<div *ngIf=\"url\" class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea #textArea matInput readonly rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"></textarea>\n <button\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n </mat-form-field>\n<div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form{padding:20px 5px 5px}.igo-form-button-group{text-align:center;padding-top:10px}\n"] }]
167
- }], function () { return [{ type: i1.LanguageService }, { type: i1.MessageService }, { type: i2.AuthService }, { type: i3.ShareMapService }, { type: i4.UntypedFormBuilder }]; }, { map: [{
168
- type: Input
169
- }] }); })();
1
+ import { Component, Input } from '@angular/core';
2
+ import { uuid, Clipboard } from '@igo2/utils';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@igo2/core";
5
+ import * as i2 from "@igo2/auth";
6
+ import * as i3 from "../shared/share-map.service";
7
+ import * as i4 from "@angular/forms";
8
+ import * as i5 from "@angular/common";
9
+ import * as i6 from "@angular/material/icon";
10
+ import * as i7 from "@angular/material/tooltip";
11
+ import * as i8 from "@angular/material/form-field";
12
+ import * as i9 from "@angular/material/input";
13
+ import * as i10 from "@angular/material/button";
14
+ import * as i11 from "@ngx-translate/core";
15
+ function ShareMapApiComponent_span_10_Template(rf, ctx) { if (rf & 1) {
16
+ i0.ɵɵelementStart(0, "span", 11);
17
+ i0.ɵɵtext(1);
18
+ i0.ɵɵelementEnd();
19
+ } if (rf & 2) {
20
+ const ctx_r0 = i0.ɵɵnextContext();
21
+ i0.ɵɵadvance(1);
22
+ i0.ɵɵtextInterpolate1("", ctx_r0.userId, "-");
23
+ } }
24
+ function ShareMapApiComponent_button_18_Template(rf, ctx) { if (rf & 1) {
25
+ i0.ɵɵelementStart(0, "button", 12);
26
+ i0.ɵɵtext(1);
27
+ i0.ɵɵpipe(2, "translate");
28
+ i0.ɵɵelementEnd();
29
+ } if (rf & 2) {
30
+ const ctx_r1 = i0.ɵɵnextContext();
31
+ i0.ɵɵproperty("disabled", !ctx_r1.form.valid);
32
+ i0.ɵɵadvance(1);
33
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "igo.context.shareMap.button"), " ");
34
+ } }
35
+ function ShareMapApiComponent_button_19_Template(rf, ctx) { if (rf & 1) {
36
+ const _r5 = i0.ɵɵgetCurrentView();
37
+ i0.ɵɵelementStart(0, "button", 13);
38
+ i0.ɵɵlistener("click", function ShareMapApiComponent_button_19_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.updateContextShared(ctx_r4.form.value)); });
39
+ i0.ɵɵtext(1);
40
+ i0.ɵɵpipe(2, "translate");
41
+ i0.ɵɵelementEnd();
42
+ } if (rf & 2) {
43
+ i0.ɵɵadvance(1);
44
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "igo.context.shareMap.refreshBtn"), " ");
45
+ } }
46
+ function ShareMapApiComponent_div_20_Template(rf, ctx) { if (rf & 1) {
47
+ const _r8 = i0.ɵɵgetCurrentView();
48
+ i0.ɵɵelementStart(0, "div", 14)(1, "mat-form-field");
49
+ i0.ɵɵelement(2, "textarea", 15, 16);
50
+ i0.ɵɵpipe(4, "translate");
51
+ i0.ɵɵelementStart(5, "button", 17);
52
+ i0.ɵɵlistener("click", function ShareMapApiComponent_div_20_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r8); const _r6 = i0.ɵɵreference(3); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.copyTextToClipboard(_r6)); });
53
+ i0.ɵɵpipe(6, "translate");
54
+ i0.ɵɵelement(7, "mat-icon", 18);
55
+ i0.ɵɵelementEnd()();
56
+ i0.ɵɵelement(8, "div");
57
+ i0.ɵɵelementEnd();
58
+ } if (rf & 2) {
59
+ const ctx_r3 = i0.ɵɵnextContext();
60
+ i0.ɵɵadvance(2);
61
+ i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(4, 3, "igo.context.shareMap.placeholderLink"))("value", ctx_r3.url);
62
+ i0.ɵɵadvance(3);
63
+ i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(6, 5, "igo.context.shareMap.copy"));
64
+ } }
65
+ export class ShareMapApiComponent {
66
+ constructor(languageService, messageService, auth, shareMapService, formBuilder) {
67
+ this.languageService = languageService;
68
+ this.messageService = messageService;
69
+ this.auth = auth;
70
+ this.shareMapService = shareMapService;
71
+ this.formBuilder = formBuilder;
72
+ }
73
+ ngOnInit() {
74
+ this.auth.authenticate$.subscribe(auth => {
75
+ const decodeToken = this.auth.decodeToken();
76
+ this.userId = decodeToken.user ? decodeToken.user.id : undefined;
77
+ this.buildForm();
78
+ });
79
+ }
80
+ createUrl(values = {}) {
81
+ const inputs = Object.assign({}, values);
82
+ inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
83
+ this.url = this.shareMapService.getUrlWithApi(inputs);
84
+ this.shareMapService.createContextShared(this.map, inputs).subscribe(rep => {
85
+ this.idContextShared = rep.id;
86
+ this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
87
+ }, err => {
88
+ err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
89
+ this.messageService.showError(err);
90
+ });
91
+ }
92
+ updateContextShared(values = {}) {
93
+ const inputs = Object.assign({}, values);
94
+ inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
95
+ this.shareMapService.updateContextShared(this.map, inputs, this.idContextShared).subscribe(rep => {
96
+ this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
97
+ }, err => {
98
+ err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
99
+ this.messageService.showError(err);
100
+ });
101
+ }
102
+ copyTextToClipboard(textArea) {
103
+ const successful = Clipboard.copy(textArea);
104
+ if (successful) {
105
+ this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
106
+ }
107
+ }
108
+ buildForm() {
109
+ this.url = undefined;
110
+ const id = uuid();
111
+ let title = 'Partage ';
112
+ title += this.userId ? `(${this.userId}-${id})` : `(${id})`;
113
+ this.form = this.formBuilder.group({
114
+ title: [title],
115
+ uri: [id]
116
+ });
117
+ }
118
+ }
119
+ ShareMapApiComponent.ɵfac = function ShareMapApiComponent_Factory(t) { return new (t || ShareMapApiComponent)(i0.ɵɵdirectiveInject(i1.LanguageService), i0.ɵɵdirectiveInject(i1.MessageService), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.ShareMapService), i0.ɵɵdirectiveInject(i4.UntypedFormBuilder)); };
120
+ ShareMapApiComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShareMapApiComponent, selectors: [["igo-share-map-api"]], inputs: { map: "map" }, decls: 21, vars: 18, consts: [[1, "igo-form", 3, "formGroup", "ngSubmit"], [1, "igo-input-container"], ["matInput", "", "required", "", "formControlName", "title", 3, "placeholder"], ["id", "uriInput", 1, "igo-input-container"], ["class", "prefix", 4, "ngIf"], [1, "fieldWrapper"], ["matInput", "", "required", "", "formControlName", "uri", 3, "readonly", "placeholder"], [1, "igo-form-button-group"], ["mat-raised-button", "", "type", "submit", 3, "disabled", 4, "ngIf"], ["mat-raised-button", "", "type", "button", 3, "click", 4, "ngIf"], ["class", "igo-input-container linkToShare", 4, "ngIf"], [1, "prefix"], ["mat-raised-button", "", "type", "submit", 3, "disabled"], ["mat-raised-button", "", "type", "button", 3, "click"], [1, "igo-input-container", "linkToShare"], ["matInput", "", "readonly", "", "rows", "3", 1, "textAreaWithButton", 3, "placeholder", "value"], ["textArea", ""], ["mat-icon-button", "", "tooltip-position", "below", "matTooltipShowDelay", "500", "color", "primary", 3, "matTooltip", "click"], ["svgIcon", "content-copy"]], template: function ShareMapApiComponent_Template(rf, ctx) { if (rf & 1) {
121
+ i0.ɵɵelementStart(0, "form", 0);
122
+ i0.ɵɵlistener("ngSubmit", function ShareMapApiComponent_Template_form_ngSubmit_0_listener() { return ctx.createUrl(ctx.form.value); });
123
+ i0.ɵɵelementStart(1, "div", 1)(2, "mat-form-field");
124
+ i0.ɵɵelement(3, "input", 2);
125
+ i0.ɵɵpipe(4, "translate");
126
+ i0.ɵɵelementStart(5, "mat-error");
127
+ i0.ɵɵtext(6);
128
+ i0.ɵɵpipe(7, "translate");
129
+ i0.ɵɵelementEnd()()();
130
+ i0.ɵɵelementStart(8, "div", 3)(9, "mat-form-field");
131
+ i0.ɵɵtemplate(10, ShareMapApiComponent_span_10_Template, 2, 1, "span", 4);
132
+ i0.ɵɵelementStart(11, "span", 5);
133
+ i0.ɵɵelement(12, "input", 6);
134
+ i0.ɵɵpipe(13, "translate");
135
+ i0.ɵɵelementEnd();
136
+ i0.ɵɵelementStart(14, "mat-error");
137
+ i0.ɵɵtext(15);
138
+ i0.ɵɵpipe(16, "translate");
139
+ i0.ɵɵelementEnd()()();
140
+ i0.ɵɵelementStart(17, "div", 7);
141
+ i0.ɵɵtemplate(18, ShareMapApiComponent_button_18_Template, 3, 4, "button", 8);
142
+ i0.ɵɵtemplate(19, ShareMapApiComponent_button_19_Template, 3, 3, "button", 9);
143
+ i0.ɵɵelementEnd()();
144
+ i0.ɵɵtemplate(20, ShareMapApiComponent_div_20_Template, 9, 7, "div", 10);
145
+ } if (rf & 2) {
146
+ i0.ɵɵproperty("formGroup", ctx.form);
147
+ i0.ɵɵadvance(3);
148
+ i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(4, 10, "igo.context.contextManager.form.title"));
149
+ i0.ɵɵadvance(3);
150
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 12, "igo.context.contextManager.form.titleRequired"), " ");
151
+ i0.ɵɵadvance(4);
152
+ i0.ɵɵproperty("ngIf", ctx.userId);
153
+ i0.ɵɵadvance(2);
154
+ i0.ɵɵproperty("readonly", !ctx.userId)("placeholder", i0.ɵɵpipeBind1(13, 14, "igo.context.contextManager.form.uri"));
155
+ i0.ɵɵadvance(3);
156
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(16, 16, "igo.context.contextManager.form.uriRequired"), " ");
157
+ i0.ɵɵadvance(3);
158
+ i0.ɵɵproperty("ngIf", !ctx.url);
159
+ i0.ɵɵadvance(1);
160
+ i0.ɵɵproperty("ngIf", ctx.url);
161
+ i0.ɵɵadvance(1);
162
+ i0.ɵɵproperty("ngIf", ctx.url);
163
+ } }, dependencies: [i5.NgIf, i4.ɵNgNoValidate, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.RequiredValidator, i4.FormGroupDirective, i4.FormControlName, i6.MatIcon, i7.MatTooltip, i8.MatError, i8.MatFormField, i9.MatInput, i10.MatButton, i11.TranslatePipe], styles: ["@charset \"UTF-8\";mat-form-field[_ngcontent-%COMP%]{width:100%}#uriInput[_ngcontent-%COMP%] .fieldWrapper[_ngcontent-%COMP%]{display:block;overflow:hidden}#uriInput[_ngcontent-%COMP%] .prefix[_ngcontent-%COMP%]{float:left}.linkToShare\\a0[_ngcontent-%COMP%] {padding:25px 5px 5px}.linkToShare\\a0[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0[_ngcontent-%COMP%] textarea.textAreaWithButton[_ngcontent-%COMP%]{width:calc(100% - 60px)}.linkToShare\\a0[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{float:right;margin:-10px 0}.igo-form[_ngcontent-%COMP%]{padding:20px 5px 5px}.igo-form-button-group[_ngcontent-%COMP%]{text-align:center;padding-top:10px}"] });
164
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareMapApiComponent, [{
165
+ type: Component,
166
+ args: [{ selector: 'igo-share-map-api', template: "<form class=\"igo-form\" [formGroup]=\"form\"\n (ngSubmit)=\"createUrl(form.value)\">\n\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input matInput required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\">\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n <span *ngIf=\"userId\" class=\"prefix\">{{userId}}-</span>\n <span class=\"fieldWrapper\">\n <input matInput required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\">\n </span>\n <mat-error>\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"igo-form-button-group\">\n <button *ngIf=\"!url\"\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid\">\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n <button *ngIf=\"url\"\n mat-raised-button\n type=\"button\"\n (click)=\"updateContextShared(form.value)\">\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n </div>\n</form>\n\n<div *ngIf=\"url\" class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea #textArea matInput readonly rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"></textarea>\n <button\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n </mat-form-field>\n<div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form{padding:20px 5px 5px}.igo-form-button-group{text-align:center;padding-top:10px}\n"] }]
167
+ }], function () { return [{ type: i1.LanguageService }, { type: i1.MessageService }, { type: i2.AuthService }, { type: i3.ShareMapService }, { type: i4.UntypedFormBuilder }]; }, { map: [{
168
+ type: Input
169
+ }] }); })();
170
170
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic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