@arsedizioni/ars-utils 18.2.6 → 18.2.8

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 (172) hide show
  1. package/arsedizioni-ars-utils.d.ts.map +1 -0
  2. package/clipper.common/arsedizioni-ars-utils-clipper.common.d.ts.map +1 -0
  3. package/clipper.common/common/common.module.d.ts.map +1 -0
  4. package/clipper.common/common/definitions.d.ts +57 -7
  5. package/clipper.common/common/definitions.d.ts.map +1 -0
  6. package/clipper.common/common/interceptors/auth.interceptor.d.ts.map +1 -0
  7. package/clipper.common/common/messages.d.ts.map +1 -0
  8. package/clipper.common/common/services/clipper.service.d.ts +13 -23
  9. package/clipper.common/common/services/clipper.service.d.ts.map +1 -0
  10. package/clipper.common/public_api.d.ts.map +1 -0
  11. package/clipper.ui/arsedizioni-ars-utils-clipper.ui.d.ts.map +1 -0
  12. package/clipper.ui/documents.d.ts.map +1 -0
  13. package/clipper.ui/public_api.d.ts.map +1 -0
  14. package/clipper.ui/ui/browser-dialog/browser-dialog.component.d.ts.map +1 -0
  15. package/clipper.ui/ui/document/document.component.d.ts.map +1 -0
  16. package/clipper.ui/ui/document-index/document-index.component.d.ts +3 -3
  17. package/clipper.ui/ui/document-index/document-index.component.d.ts.map +1 -0
  18. package/clipper.ui/ui/document-manager/document-manager.d.ts.map +1 -0
  19. package/clipper.ui/ui/document-menu/document-menu.component.d.ts.map +1 -0
  20. package/clipper.ui/ui/references/references.component.d.ts.map +1 -0
  21. package/clipper.ui/ui/search-calendar/search-calendar.component.d.ts.map +1 -0
  22. package/clipper.ui/ui/search-dialog/search-dialog.component.d.ts.map +1 -0
  23. package/clipper.ui/ui/search-facets/search-facets.component.d.ts.map +1 -0
  24. package/clipper.ui/ui/search-free-text-help/search-free-text-help.component.d.ts.map +1 -0
  25. package/clipper.ui/ui/search-free-text-query-builder/search-free-text-query-builder.component.d.ts.map +1 -0
  26. package/clipper.ui/ui/search-result-item/search-result-item.component.d.ts.map +1 -0
  27. package/clipper.ui/ui/search-result-manager/search-result-manager.d.ts +1 -0
  28. package/clipper.ui/ui/search-result-manager/search-result-manager.d.ts.map +1 -0
  29. package/core/arsedizioni-ars-utils-core.d.ts.map +1 -0
  30. package/core/core.module.d.ts.map +1 -0
  31. package/core/dateFnsAdapter.d.ts.map +1 -0
  32. package/core/definitions.d.ts +14 -0
  33. package/core/definitions.d.ts.map +1 -0
  34. package/core/directives/autoFocusDirective.d.ts.map +1 -0
  35. package/core/directives/changeDateIntervalDirective.d.ts.map +1 -0
  36. package/core/directives/copyClipboardDirective.d.ts.map +1 -0
  37. package/core/directives/validators.d.ts.map +1 -0
  38. package/core/pipes/format.pipe.d.ts.map +1 -0
  39. package/core/pipes/replace.pipe.d.ts.map +1 -0
  40. package/core/pipes/safe-html.pipe.d.ts.map +1 -0
  41. package/core/pipes/safe-url.pipe.d.ts.map +1 -0
  42. package/core/pipes/search-callback.pipe.d.ts.map +1 -0
  43. package/core/pipes/search-filter.pipe.d.ts.map +1 -0
  44. package/core/public_api.d.ts.map +1 -0
  45. package/core/selectable.d.ts.map +1 -0
  46. package/core/services/broadcast.service.d.ts.map +1 -0
  47. package/core/services/environment.service.d.ts.map +1 -0
  48. package/core/services/screen.service.d.ts.map +1 -0
  49. package/core/system.d.ts +3 -3
  50. package/core/system.d.ts.map +1 -0
  51. package/esm2022/clipper.common/common/definitions.mjs +17 -1
  52. package/esm2022/clipper.common/common/services/clipper.service.mjs +12 -43
  53. package/esm2022/clipper.ui/ui/browser-dialog/browser-dialog.component.mjs +3 -3
  54. package/esm2022/clipper.ui/ui/document/document.component.mjs +3 -3
  55. package/esm2022/clipper.ui/ui/document-index/document-index.component.mjs +1 -1
  56. package/esm2022/clipper.ui/ui/references/references.component.mjs +3 -3
  57. package/esm2022/clipper.ui/ui/search-facets/search-facets.component.mjs +3 -3
  58. package/esm2022/clipper.ui/ui/search-result-item/search-result-item.component.mjs +3 -3
  59. package/esm2022/clipper.ui/ui/search-result-manager/search-result-manager.mjs +4 -1
  60. package/esm2022/core/definitions.mjs +1 -1
  61. package/esm2022/core/system.mjs +1 -1
  62. package/esm2022/help/components/help-viewer/help-viewer.component.mjs +3 -3
  63. package/esm2022/help/definitions.mjs +2 -0
  64. package/esm2022/help/public_api.mjs +2 -1
  65. package/esm2022/help/services/help.service.mjs +1 -8
  66. package/esm2022/support.common/common/definitions.mjs +1 -1
  67. package/esm2022/support.common/common/services/support.service.mjs +4 -4
  68. package/esm2022/support.ui/ui/notifications-browser/notification/notification.component.mjs +3 -3
  69. package/esm2022/support.ui/ui/notifications-browser/notifications-browser.component.mjs +3 -3
  70. package/esm2022/ui/ui/dialogs/busy/busy-dialog.component.mjs +3 -3
  71. package/esm2022/ui/ui/dialogs/confirm/confirm-dialog.component.mjs +3 -3
  72. package/esm2022/ui/ui/dialogs/credentials/credentials-dialog.component.mjs +3 -3
  73. package/esm2022/ui/ui/dialogs/info/info-dialog.component.mjs +3 -3
  74. package/esm2022/ui/ui/dialogs/recover-password/recover-password-dialog.component.mjs +3 -3
  75. package/esm2022/ui/ui/dialogs/reset-password/reset-password-dialog.component.mjs +3 -3
  76. package/esm2022/ui.application/ui/components/filter-bar/filter-bar.component.mjs +3 -3
  77. package/esm2022/ui.application/ui/dialogs/prompt/prompt-dialog.component.mjs +3 -3
  78. package/esm2022/ui.application/ui/dialogs/prompt-date/prompt-date-dialog.component.mjs +3 -3
  79. package/esm2022/ui.application/ui/dialogs/prompt-time/prompt-time-dialog.component.mjs +3 -3
  80. package/esm2022/ui.application/ui/dialogs/select/select-dialog.component.mjs +3 -3
  81. package/esm2022/ui.application/ui/dialogs/select-file/select-file-dialog.component.mjs +3 -3
  82. package/esm2022/ui.application/ui/dialogs/select-picture/select-picture-dialog.component.mjs +3 -3
  83. package/esm2022/ui.application/ui/dialogs/select-tree/select-tree-dialog.component.mjs +3 -3
  84. package/esm2022/ui.application/ui/dialogs/send-to/send-to-dialog.component.mjs +3 -3
  85. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +28 -43
  86. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  87. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +13 -10
  88. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  89. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  90. package/fesm2022/arsedizioni-ars-utils-help.mjs +2 -9
  91. package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
  92. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +3 -3
  93. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  94. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +4 -4
  95. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs.map +1 -1
  96. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +18 -18
  97. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  98. package/fesm2022/arsedizioni-ars-utils-ui.mjs +12 -12
  99. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  100. package/help/arsedizioni-ars-utils-help.d.ts.map +1 -0
  101. package/help/components/help-viewer/help-viewer.component.d.ts.map +1 -0
  102. package/help/definitions.d.ts +17 -0
  103. package/help/definitions.d.ts.map +1 -0
  104. package/help/help.module.d.ts.map +1 -0
  105. package/help/public_api.d.ts +1 -0
  106. package/help/public_api.d.ts.map +1 -0
  107. package/help/services/help.service.d.ts +4 -8
  108. package/help/services/help.service.d.ts.map +1 -0
  109. package/package.json +12 -12
  110. package/public_api.d.ts.map +1 -0
  111. package/styles/ui.colors.scss +0 -1
  112. package/styles/ui.scss +2 -0
  113. package/support.common/arsedizioni-ars-utils-support.common.d.ts.map +1 -0
  114. package/support.common/common/common.module.d.ts.map +1 -0
  115. package/support.common/common/definitions.d.ts +22 -2
  116. package/support.common/common/definitions.d.ts.map +1 -0
  117. package/support.common/common/interceptors/auth.interceptor.d.ts.map +1 -0
  118. package/support.common/common/messages.d.ts.map +1 -0
  119. package/support.common/common/services/support.service.d.ts +4 -4
  120. package/support.common/common/services/support.service.d.ts.map +1 -0
  121. package/support.common/public_api.d.ts.map +1 -0
  122. package/support.ui/arsedizioni-ars-utils-support.ui.d.ts.map +1 -0
  123. package/support.ui/public_api.d.ts.map +1 -0
  124. package/support.ui/ui/notifications-browser/notification/notification.component.d.ts.map +1 -0
  125. package/support.ui/ui/notifications-browser/notifications-browser.component.d.ts.map +1 -0
  126. package/tinymce/arsedizioni-ars-utils-tinymce.d.ts.map +1 -0
  127. package/tinymce/full-screen-editor/full-screen-editor.component.d.ts.map +1 -0
  128. package/tinymce/public_api.d.ts.map +1 -0
  129. package/tinymce/tinymce.module.d.ts.map +1 -0
  130. package/tinymce/utils.d.ts.map +1 -0
  131. package/ui/arsedizioni-ars-utils-ui.d.ts.map +1 -0
  132. package/ui/public_api.d.ts.map +1 -0
  133. package/ui/ui/definitions.d.ts.map +1 -0
  134. package/ui/ui/dialogs/busy/busy-dialog.component.d.ts.map +1 -0
  135. package/ui/ui/dialogs/confirm/confirm-dialog.component.d.ts.map +1 -0
  136. package/ui/ui/dialogs/credentials/credentials-dialog.component.d.ts.map +1 -0
  137. package/ui/ui/dialogs/info/info-dialog.component.d.ts.map +1 -0
  138. package/ui/ui/dialogs/recover-password/recover-password-dialog.component.d.ts.map +1 -0
  139. package/ui/ui/dialogs/reset-password/reset-password-dialog.component.d.ts.map +1 -0
  140. package/ui/ui/dialogs/toast/toast.component.d.ts.map +1 -0
  141. package/ui/ui/paginatorIntl.d.ts.map +1 -0
  142. package/ui/ui/services/dialog.service.d.ts.map +1 -0
  143. package/ui/ui/services/ui.service.d.ts.map +1 -0
  144. package/ui/ui/ui.module.d.ts.map +1 -0
  145. package/ui.application/arsedizioni-ars-utils-ui.application.d.ts.map +1 -0
  146. package/ui.application/public_api.d.ts.map +1 -0
  147. package/ui.application/ui/components/button-selector/button-selector.component.d.ts.map +1 -0
  148. package/ui.application/ui/components/button-toggle/button-toggle.component.d.ts.map +1 -0
  149. package/ui.application/ui/components/calendar-empty-header/calendar-empy-header.component.d.ts.map +1 -0
  150. package/ui.application/ui/components/chips-selector/chips-selector.component.d.ts.map +1 -0
  151. package/ui.application/ui/components/file-input/file-input.component.d.ts.map +1 -0
  152. package/ui.application/ui/components/file-preview/file-preview.component.d.ts.map +1 -0
  153. package/ui.application/ui/components/filter-bar/filter-bar.component.d.ts.map +1 -0
  154. package/ui.application/ui/definitions.d.ts.map +1 -0
  155. package/ui.application/ui/dialogs/prompt/prompt-dialog.component.d.ts.map +1 -0
  156. package/ui.application/ui/dialogs/prompt-date/prompt-date-dialog.component.d.ts.map +1 -0
  157. package/ui.application/ui/dialogs/prompt-time/prompt-time-dialog.component.d.ts.map +1 -0
  158. package/ui.application/ui/dialogs/select/select-dialog.component.d.ts.map +1 -0
  159. package/ui.application/ui/dialogs/select-file/select-file-dialog.component.d.ts.map +1 -0
  160. package/ui.application/ui/dialogs/select-picture/select-picture-dialog.component.d.ts.map +1 -0
  161. package/ui.application/ui/dialogs/select-tree/select-tree-dialog.component.d.ts.map +1 -0
  162. package/ui.application/ui/dialogs/send-to/send-to-dialog.component.d.ts.map +1 -0
  163. package/ui.application/ui/directives/resize-table-column.directive.d.ts.map +1 -0
  164. package/ui.application/ui/filters.d.ts.map +1 -0
  165. package/ui.application/ui/messages.d.ts.map +1 -0
  166. package/ui.application/ui/services/applicationDialog.service.d.ts.map +1 -0
  167. package/ui.application/ui/ui.module.d.ts.map +1 -0
  168. package/ui.oauth/arsedizioni-ars-utils-ui.oauth.d.ts.map +1 -0
  169. package/ui.oauth/public_api.d.ts.map +1 -0
  170. package/ui.oauth/ui/components/login/login-oauth.component.d.ts.map +1 -0
  171. package/ui.oauth/ui/definitions.d.ts.map +1 -0
  172. package/ui.oauth/ui/ui.module.d.ts.map +1 -0
@@ -459,12 +459,12 @@ class HelpViewerComponent {
459
459
  this.getChapter(n.id, n.position + 1);
460
460
  }
461
461
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: HelpViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
462
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.6", type: HelpViewerComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "Bind": SystemUtils.generateUUID() } }, providers: [IndexTreeDataSource], viewQueries: [{ propertyName: "indexPane", first: true, predicate: ["indexPane"], descendants: true }], ngImport: i0, template: "<div class=\"helpviewer-fixed\">\r\n <div style=\"height:6px\">\r\n @if (busy()) {\r\n <mat-progress-bar z-index=\"11\" mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div class=\"dialog-menu\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Mostra menu\" [attr.aria-label]=\"'Mostra indice'\"\r\n (click)=\"toggleIndexPane()\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Guida</h2>\r\n </div>\r\n <div fxFlex=\"100px\" fxLayoutAlign=\"end\" class=\"dialog-close\">\r\n @if (canGoBack()) {\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Indietro\" (click)=\"back()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n }\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n</div>\r\n<div mat-dialog-content id=\"helpviewer-scrollable\">\r\n <mat-drawer-container class=\"fill\">\r\n <mat-drawer #indexPane mode=\"side\" [autoFocus]=\"false\" class=\"drawer-small drawer-transparent\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\">\r\n <mat-tree [dataSource]=\"treeData\" [treeControl]=\"treeControl\" class=\"tree \" style=\"max-width:310px\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"20\" class=\"tree-node tree-node-simple tree-node-style\"\r\n (click)=\"getChapter(node.id);\" [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id}\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button disabled class=\"small-icon-button\"></button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\r\n class=\"tree-node tree-node-simple tree-node-style\"\r\n [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id }\" (click)=\"getChapter(node.id)\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button matTreeNodeToggle\r\n [attr.aria-label]=\"'Apri/chiudi ' + node.name\" class=\"small-icon-button\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\r\n </mat-icon>\r\n </button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div style=\"padding: 0 24px;\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div class=\"fill\" id=\"helpviewer-scroller\" (click)=\"gotoChapter($event)\"\r\n [innerHtml]=\"(page() ?? '') | safeHtml\"></div>\r\n </div>\r\n </div>\r\n </mat-drawer-container>\r\n</div>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:10px;margin-top:10px}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto}.scroll-hidden{overflow:hidden}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller}.small{font-size:small!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-accent, #7894ae)!important}.primary{color:var(--ars-primary, #00a293)!important}.secondary{color:var(--ars-secondary, #4a635f)!important}.error{color:var(--ars-error, #ff5449)!important}.warning{color:var(--ars-warning, #FFC107)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer,.drawer-small{min-width:420px!important;max-width:420px!important;padding:20px 0 0}.drawer .title-container,.drawer-small .title-container{padding:20px 10px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 10px 20px}.drawer .title,.drawer-small .title{font-size:1.2em;font-weight:600;padding-left:10px;min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .content,.drawer-small .content{padding:10px 0!important}.drawer .fixed,.drawer-small .fixed{padding:0 4px!important}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:15px;padding-right:20px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-bottom:20px!important}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.drawer-small{min-width:360px!important;max-width:360px!important}.drawer-small .title{min-width:150px}.drawer-small .content{padding:20px 0 10px}@media screen and (min-width: 0px) and (max-width: 359px){.drawer{min-width:360px!important;max-width:360px!important}.drawer .title{min-width:150px}}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}.dialog-menu{margin-top:4px!important}.drawer-small{max-width:320px!important;min-width:320px!important;padding:0!important}.tree{overflow-x:hidden}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-simple,.tree-node-simple>div{min-height:36px!important}.tree-node-activated,.tree-node-activated>div{min-height:36px!important;font-weight:700!important}a.help-link,.help-link>a{text-decoration:none;color:#2a91e0}.help-title-2,.help-title-1{font-weight:600!important}.help-word-hit{font-size:inherit;background-color:#ff0;border:1px solid silver;padding:0 4px}.help-hint{margin:10px;padding:5px 20px;background-color:#fafad2;border-radius:12px}.help-summary{margin:10px;padding:5px 20px;background-color:#e6e6fa;border-radius:12px}.help-img{display:flex;align-items:center;justify-content:center;margin:10px}.help-img-200,.help-img-300,.help-img-400,.help-img-500,.help-img-700,.help-img-800{width:100%}.help-img-200{max-width:200px}.help-img-300{max-width:300px}.help-img-400{max-width:400px}.help-img-500{max-width:500px}.help-img-600{max-width:600px}.help-img-700{max-width:700px}.help-img-800{max-width:800px}.help-filter-box{background-color:#f9fbe7;border-radius:12px;padding:6px;display:inline-block;margin:0 0 8px 10px}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: ExtendedModule }, { kind: "directive", type: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i7.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i7.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i8.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i8.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i8.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i8.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i8.MatTreeNode, selector: "mat-tree-node", inputs: ["disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
462
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.6", type: HelpViewerComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "Bind": SystemUtils.generateUUID() } }, providers: [IndexTreeDataSource], viewQueries: [{ propertyName: "indexPane", first: true, predicate: ["indexPane"], descendants: true }], ngImport: i0, template: "<div class=\"helpviewer-fixed\">\r\n <div style=\"height:6px\">\r\n @if (busy()) {\r\n <mat-progress-bar z-index=\"11\" mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div class=\"dialog-menu\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Mostra menu\" [attr.aria-label]=\"'Mostra indice'\"\r\n (click)=\"toggleIndexPane()\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Guida</h2>\r\n </div>\r\n <div fxFlex=\"100px\" fxLayoutAlign=\"end\" class=\"dialog-close\">\r\n @if (canGoBack()) {\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Indietro\" (click)=\"back()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n }\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n</div>\r\n<div mat-dialog-content id=\"helpviewer-scrollable\">\r\n <mat-drawer-container class=\"fill\">\r\n <mat-drawer #indexPane mode=\"side\" [autoFocus]=\"false\" class=\"drawer-small drawer-transparent\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\">\r\n <mat-tree [dataSource]=\"treeData\" [treeControl]=\"treeControl\" class=\"tree \" style=\"max-width:310px\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"20\" class=\"tree-node tree-node-simple tree-node-style\"\r\n (click)=\"getChapter(node.id);\" [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id}\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button disabled class=\"small-icon-button\"></button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\r\n class=\"tree-node tree-node-simple tree-node-style\"\r\n [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id }\" (click)=\"getChapter(node.id)\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button matTreeNodeToggle\r\n [attr.aria-label]=\"'Apri/chiudi ' + node.name\" class=\"small-icon-button\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\r\n </mat-icon>\r\n </button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div style=\"padding: 0 24px;\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div class=\"fill\" id=\"helpviewer-scroller\" (click)=\"gotoChapter($event)\"\r\n [innerHtml]=\"(page() ?? '') | safeHtml\"></div>\r\n </div>\r\n </div>\r\n </mat-drawer-container>\r\n</div>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:10px;margin-top:10px}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto}.scroll-hidden{overflow:hidden}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller}.small{font-size:small!important;line-height:16px}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-accent, #7894ae)!important}.primary{color:var(--ars-primary, #00a293)!important}.secondary{color:var(--ars-secondary, #4a635f)!important}.error{color:var(--ars-error, #ff5449)!important}.warning{color:var(--ars-warning, #FFC107)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer,.drawer-small{min-width:420px!important;max-width:420px!important;padding:20px 0 0}.drawer .title-container,.drawer-small .title-container{padding:20px 10px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 10px 20px}.drawer .title,.drawer-small .title{font-size:1.2em;font-weight:600;padding-left:10px;min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .content,.drawer-small .content{padding:10px 0!important}.drawer .fixed,.drawer-small .fixed{padding:0 4px!important}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:15px;padding-right:20px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-bottom:20px!important}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.drawer-small{min-width:360px!important;max-width:360px!important}.drawer-small .title{min-width:150px}.drawer-small .content{padding:20px 0 10px}@media screen and (min-width: 0px) and (max-width: 359px){.drawer{min-width:360px!important;max-width:360px!important}.drawer .title{min-width:150px}}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}.dialog-menu{margin-top:4px!important}.drawer-small{max-width:320px!important;min-width:320px!important;padding:0!important}.tree{overflow-x:hidden}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-simple,.tree-node-simple>div{min-height:36px!important}.tree-node-activated,.tree-node-activated>div{min-height:36px!important;font-weight:700!important}a.help-link,.help-link>a{text-decoration:none;color:#2a91e0}.help-title-2,.help-title-1{font-weight:600!important}.help-word-hit{font-size:inherit;background-color:#ff0;border:1px solid silver;padding:0 4px}.help-hint{margin:10px;padding:5px 20px;background-color:#fafad2;border-radius:12px}.help-summary{margin:10px;padding:5px 20px;background-color:#e6e6fa;border-radius:12px}.help-img{display:flex;align-items:center;justify-content:center;margin:10px}.help-img-200,.help-img-300,.help-img-400,.help-img-500,.help-img-700,.help-img-800{width:100%}.help-img-200{max-width:200px}.help-img-300{max-width:300px}.help-img-400{max-width:400px}.help-img-500{max-width:500px}.help-img-600{max-width:600px}.help-img-700{max-width:700px}.help-img-800{max-width:800px}.help-filter-box{background-color:#f9fbe7;border-radius:12px;padding:6px;display:inline-block;margin:0 0 8px 10px}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: ExtendedModule }, { kind: "directive", type: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i7.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i7.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i8.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i8.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i8.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i8.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i8.MatTreeNode, selector: "mat-tree-node", inputs: ["disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
463
463
  }
464
464
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: HelpViewerComponent, decorators: [{
465
465
  type: Component,
466
466
  args: [{ host: { 'Bind': SystemUtils.generateUUID() }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [IndexTreeDataSource], standalone: true, imports: [FlexModule, MatButtonModule, MatTooltipModule, MatIconModule, MatProgressBarModule, MatDialogTitle, MatDialogContent,
467
- NgStyle, ExtendedModule, MatSidenavModule, MatTreeModule, NgClass, SafeHtmlPipe], template: "<div class=\"helpviewer-fixed\">\r\n <div style=\"height:6px\">\r\n @if (busy()) {\r\n <mat-progress-bar z-index=\"11\" mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div class=\"dialog-menu\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Mostra menu\" [attr.aria-label]=\"'Mostra indice'\"\r\n (click)=\"toggleIndexPane()\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Guida</h2>\r\n </div>\r\n <div fxFlex=\"100px\" fxLayoutAlign=\"end\" class=\"dialog-close\">\r\n @if (canGoBack()) {\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Indietro\" (click)=\"back()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n }\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n</div>\r\n<div mat-dialog-content id=\"helpviewer-scrollable\">\r\n <mat-drawer-container class=\"fill\">\r\n <mat-drawer #indexPane mode=\"side\" [autoFocus]=\"false\" class=\"drawer-small drawer-transparent\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\">\r\n <mat-tree [dataSource]=\"treeData\" [treeControl]=\"treeControl\" class=\"tree \" style=\"max-width:310px\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"20\" class=\"tree-node tree-node-simple tree-node-style\"\r\n (click)=\"getChapter(node.id);\" [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id}\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button disabled class=\"small-icon-button\"></button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\r\n class=\"tree-node tree-node-simple tree-node-style\"\r\n [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id }\" (click)=\"getChapter(node.id)\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button matTreeNodeToggle\r\n [attr.aria-label]=\"'Apri/chiudi ' + node.name\" class=\"small-icon-button\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\r\n </mat-icon>\r\n </button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div style=\"padding: 0 24px;\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div class=\"fill\" id=\"helpviewer-scroller\" (click)=\"gotoChapter($event)\"\r\n [innerHtml]=\"(page() ?? '') | safeHtml\"></div>\r\n </div>\r\n </div>\r\n </mat-drawer-container>\r\n</div>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:10px;margin-top:10px}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto}.scroll-hidden{overflow:hidden}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller}.small{font-size:small!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-accent, #7894ae)!important}.primary{color:var(--ars-primary, #00a293)!important}.secondary{color:var(--ars-secondary, #4a635f)!important}.error{color:var(--ars-error, #ff5449)!important}.warning{color:var(--ars-warning, #FFC107)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer,.drawer-small{min-width:420px!important;max-width:420px!important;padding:20px 0 0}.drawer .title-container,.drawer-small .title-container{padding:20px 10px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 10px 20px}.drawer .title,.drawer-small .title{font-size:1.2em;font-weight:600;padding-left:10px;min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .content,.drawer-small .content{padding:10px 0!important}.drawer .fixed,.drawer-small .fixed{padding:0 4px!important}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:15px;padding-right:20px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-bottom:20px!important}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.drawer-small{min-width:360px!important;max-width:360px!important}.drawer-small .title{min-width:150px}.drawer-small .content{padding:20px 0 10px}@media screen and (min-width: 0px) and (max-width: 359px){.drawer{min-width:360px!important;max-width:360px!important}.drawer .title{min-width:150px}}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}.dialog-menu{margin-top:4px!important}.drawer-small{max-width:320px!important;min-width:320px!important;padding:0!important}.tree{overflow-x:hidden}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-simple,.tree-node-simple>div{min-height:36px!important}.tree-node-activated,.tree-node-activated>div{min-height:36px!important;font-weight:700!important}a.help-link,.help-link>a{text-decoration:none;color:#2a91e0}.help-title-2,.help-title-1{font-weight:600!important}.help-word-hit{font-size:inherit;background-color:#ff0;border:1px solid silver;padding:0 4px}.help-hint{margin:10px;padding:5px 20px;background-color:#fafad2;border-radius:12px}.help-summary{margin:10px;padding:5px 20px;background-color:#e6e6fa;border-radius:12px}.help-img{display:flex;align-items:center;justify-content:center;margin:10px}.help-img-200,.help-img-300,.help-img-400,.help-img-500,.help-img-700,.help-img-800{width:100%}.help-img-200{max-width:200px}.help-img-300{max-width:300px}.help-img-400{max-width:400px}.help-img-500{max-width:500px}.help-img-600{max-width:600px}.help-img-700{max-width:700px}.help-img-800{max-width:800px}.help-filter-box{background-color:#f9fbe7;border-radius:12px;padding:6px;display:inline-block;margin:0 0 8px 10px}\n"] }]
467
+ NgStyle, ExtendedModule, MatSidenavModule, MatTreeModule, NgClass, SafeHtmlPipe], template: "<div class=\"helpviewer-fixed\">\r\n <div style=\"height:6px\">\r\n @if (busy()) {\r\n <mat-progress-bar z-index=\"11\" mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div class=\"dialog-menu\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Mostra menu\" [attr.aria-label]=\"'Mostra indice'\"\r\n (click)=\"toggleIndexPane()\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Guida</h2>\r\n </div>\r\n <div fxFlex=\"100px\" fxLayoutAlign=\"end\" class=\"dialog-close\">\r\n @if (canGoBack()) {\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Indietro\" (click)=\"back()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n }\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n</div>\r\n<div mat-dialog-content id=\"helpviewer-scrollable\">\r\n <mat-drawer-container class=\"fill\">\r\n <mat-drawer #indexPane mode=\"side\" [autoFocus]=\"false\" class=\"drawer-small drawer-transparent\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\">\r\n <mat-tree [dataSource]=\"treeData\" [treeControl]=\"treeControl\" class=\"tree \" style=\"max-width:310px\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"20\" class=\"tree-node tree-node-simple tree-node-style\"\r\n (click)=\"getChapter(node.id);\" [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id}\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button disabled class=\"small-icon-button\"></button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\r\n class=\"tree-node tree-node-simple tree-node-style\"\r\n [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id }\" (click)=\"getChapter(node.id)\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button matTreeNodeToggle\r\n [attr.aria-label]=\"'Apri/chiudi ' + node.name\" class=\"small-icon-button\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\r\n </mat-icon>\r\n </button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div style=\"padding: 0 24px;\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div class=\"fill\" id=\"helpviewer-scroller\" (click)=\"gotoChapter($event)\"\r\n [innerHtml]=\"(page() ?? '') | safeHtml\"></div>\r\n </div>\r\n </div>\r\n </mat-drawer-container>\r\n</div>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:10px;margin-top:10px}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto}.scroll-hidden{overflow:hidden}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller}.small{font-size:small!important;line-height:16px}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-accent, #7894ae)!important}.primary{color:var(--ars-primary, #00a293)!important}.secondary{color:var(--ars-secondary, #4a635f)!important}.error{color:var(--ars-error, #ff5449)!important}.warning{color:var(--ars-warning, #FFC107)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer,.drawer-small{min-width:420px!important;max-width:420px!important;padding:20px 0 0}.drawer .title-container,.drawer-small .title-container{padding:20px 10px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 10px 20px}.drawer .title,.drawer-small .title{font-size:1.2em;font-weight:600;padding-left:10px;min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .content,.drawer-small .content{padding:10px 0!important}.drawer .fixed,.drawer-small .fixed{padding:0 4px!important}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:15px;padding-right:20px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-bottom:20px!important}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.drawer-small{min-width:360px!important;max-width:360px!important}.drawer-small .title{min-width:150px}.drawer-small .content{padding:20px 0 10px}@media screen and (min-width: 0px) and (max-width: 359px){.drawer{min-width:360px!important;max-width:360px!important}.drawer .title{min-width:150px}}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}.dialog-menu{margin-top:4px!important}.drawer-small{max-width:320px!important;min-width:320px!important;padding:0!important}.tree{overflow-x:hidden}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-simple,.tree-node-simple>div{min-height:36px!important}.tree-node-activated,.tree-node-activated>div{min-height:36px!important;font-weight:700!important}a.help-link,.help-link>a{text-decoration:none;color:#2a91e0}.help-title-2,.help-title-1{font-weight:600!important}.help-word-hit{font-size:inherit;background-color:#ff0;border:1px solid silver;padding:0 4px}.help-hint{margin:10px;padding:5px 20px;background-color:#fafad2;border-radius:12px}.help-summary{margin:10px;padding:5px 20px;background-color:#e6e6fa;border-radius:12px}.help-img{display:flex;align-items:center;justify-content:center;margin:10px}.help-img-200,.help-img-300,.help-img-400,.help-img-500,.help-img-700,.help-img-800{width:100%}.help-img-200{max-width:200px}.help-img-300{max-width:300px}.help-img-400{max-width:400px}.help-img-500{max-width:500px}.help-img-600{max-width:600px}.help-img-700{max-width:700px}.help-img-800{max-width:800px}.help-filter-box{background-color:#f9fbe7;border-radius:12px;padding:6px;display:inline-block;margin:0 0 8px 10px}\n"] }]
468
468
  }], propDecorators: { indexPane: [{
469
469
  type: ViewChild,
470
470
  args: ['indexPane']
@@ -514,13 +514,6 @@ class HelpService {
514
514
  getToc() {
515
515
  return this.httpClient.get(this.serviceUri + '/help/toc');
516
516
  }
517
- /**
518
- * Search help
519
- * @param params parameters
520
- */
521
- search(params) {
522
- return this.httpClient.post(this.serviceUri + '/help', params);
523
- }
524
517
  /**
525
518
  * Open help viewer
526
519
  */
@@ -1 +1 @@
1
- {"version":3,"file":"arsedizioni-ars-utils-help.mjs","sources":["../../../projects/ars-utils/help/components/help-viewer/help-viewer.component.ts","../../../projects/ars-utils/help/components/help-viewer/help-viewer.component.html","../../../projects/ars-utils/help/services/help.service.ts","../../../projects/ars-utils/help/help.module.ts","../../../projects/ars-utils/help/public_api.ts","../../../projects/ars-utils/help/arsedizioni-ars-utils-help.ts"],"sourcesContent":["import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\r\nimport { FlatTreeControl } from '@angular/cdk/tree';\r\nimport { NgClass, NgStyle } from '@angular/common';\r\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, Injectable, OnDestroy, OnInit, Signal, ViewChild, ViewEncapsulation, computed, inject, signal } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatTreeFlatDataSource, MatTreeFlattener, MatTreeModule } from '@angular/material/tree';\r\nimport { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { ExtendedModule } from '@ngbracket/ngx-layout/extended';\r\nimport { FlexModule } from '@ngbracket/ngx-layout/flex';\r\nimport { BehaviorSubject, Observable, Subject, fromEvent, of as observableOf } from 'rxjs';\r\nimport { debounceTime, takeUntil } from 'rxjs/operators';\r\nimport { HelpService } from '../../services/help.service';\r\n\r\nexport interface HelpViewerDialogData {\r\n id?: string | null;\r\n}\r\n\r\nexport class IndexInfo {\r\n id: string;\r\n parent?: IndexInfo | null;\r\n name: string;\r\n itemsCount?: number | null;\r\n subFolders?: IndexInfo[] | null;\r\n}\r\n\r\nexport class IndexNode extends IndexInfo {\r\n expandable: boolean;\r\n level: number;\r\n\r\n constructor(item: IndexInfo, level: number) {\r\n super();\r\n\r\n // Flattened implementation\r\n this.expandable = item.subFolders && item.subFolders.length > 0;\r\n this.level = level;\r\n\r\n // Data\r\n this.id = item.id;\r\n this.name = item.name;\r\n this.itemsCount = item.itemsCount;\r\n this.parent = item.parent;\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class IndexTreeDataSource implements OnDestroy {\r\n dataChange = new BehaviorSubject<IndexInfo[]>([]);\r\n\r\n get data(): IndexInfo[] {\r\n return this.dataChange.value;\r\n }\r\n\r\n ngOnDestroy() {\r\n this.dataChange.unsubscribe();\r\n }\r\n\r\n /**\r\n * Initialzie the data source\r\n * @param data : data\r\n */\r\n initialize(data: IndexInfo[]) {\r\n this.dataChange.next(data);\r\n }\r\n\r\n /**\r\n * Find a node by id recursively\r\n * @param node: the source node\r\n * @param id : the id to search for\r\n */\r\n findNode(node: IndexInfo, id: string): IndexInfo {\r\n let children;\r\n if (node && node.id === id) return node;\r\n if (node) children = node.subFolders;\r\n else children = this.data;\r\n if (children) {\r\n let _n = null;\r\n children.some(n => {\r\n n.parent = node;\r\n _n = this.findNode(n, id);\r\n if (_n) return true;\r\n return false;\r\n });\r\n return _n;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Remove a node\r\n * @param id : the node id to remove\r\n */\r\n removeNode(id: string) {\r\n let n = this.findNode(null, id);\r\n if (!n) return;\r\n if (n.parent) {\r\n let i = SystemUtils.arrayFindIndexByKey(n.parent.subFolders, 'id', id);\r\n if (i !== -1) {\r\n n.parent.subFolders.splice(i, 1);\r\n n.parent.itemsCount--;\r\n }\r\n } else {\r\n let i = SystemUtils.arrayFindIndexByKey(this.data, 'id', id);\r\n if (i !== -1) {\r\n this.data.splice(i, 1);\r\n }\r\n }\r\n\r\n this.dataChange.next(this.data);\r\n }\r\n\r\n /**\r\n * Insert a new node\r\n * @param node : the new node\r\n */\r\n insertNode(node: IndexInfo) {\r\n if (node.parent) {\r\n node.parent.subFolders.unshift(node);\r\n node.parent.itemsCount++;\r\n } else this.data.unshift(node);\r\n\r\n this.dataChange.next(this.data);\r\n }\r\n\r\n /**\r\n * Rename a node\r\n * @param id : the node id\r\n * @param name : the new node name\r\n */\r\n renameNode(id: string, name: string) {\r\n let n = this.findNode(null, id);\r\n if (n) {\r\n n.name = name;\r\n this.dataChange.next(this.data);\r\n }\r\n }\r\n\r\n /**\r\n * Update data\r\n */\r\n update() {\r\n this.dataChange.next(this.data);\r\n }\r\n}\r\n\r\n@Component({\r\n host: { 'Bind': SystemUtils.generateUUID() },\r\n templateUrl: './help-viewer.component.html',\r\n styleUrls: ['./help-viewer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [IndexTreeDataSource],\r\n standalone: true,\r\n imports: [FlexModule, MatButtonModule, MatTooltipModule, MatIconModule, MatProgressBarModule, MatDialogTitle, MatDialogContent,\r\n NgStyle, ExtendedModule, MatSidenavModule, MatTreeModule, NgClass, SafeHtmlPipe]\r\n})\r\nexport class HelpViewerComponent implements OnInit, OnDestroy, AfterViewInit {\r\n @ViewChild('indexPane') indexPane!: MatSidenav;\r\n\r\n private height: number = -1;\r\n private unsubscribe: Subject<void> = new Subject<void>();\r\n protected changeDetector = inject(ChangeDetectorRef);\r\n private dialogRef = inject(MatDialogRef<HelpViewerComponent>);\r\n protected dialogData: HelpViewerDialogData = inject(MAT_DIALOG_DATA) ?? { id: \"1\" };\r\n private dialogService = inject(DialogService);\r\n private helpService = inject(HelpService);\r\n protected breakpointObserver = inject(BreakpointObserver);\r\n protected busy = signal<boolean>(false);\r\n protected page = signal<string>(null);\r\n private indexId: string = null;\r\n private indexPaneClosed: boolean = false;\r\n protected indexNode: IndexInfo = null;\r\n private history = signal([]);\r\n protected canGoBack: Signal<boolean> = computed(() => {\r\n return this.history()?.length > 1;\r\n })\r\n\r\n /**\r\n * Manage flat tree view\r\n */\r\n private tree = inject(IndexTreeDataSource);\r\n private treeFlattener: MatTreeFlattener<IndexInfo, IndexNode>;\r\n protected treeControl: FlatTreeControl<IndexNode>;\r\n protected treeData: MatTreeFlatDataSource<IndexInfo, IndexNode>;\r\n private folders: any = null;\r\n private getChildren = (node: IndexInfo): Observable<IndexInfo[]> =>\r\n observableOf(node.subFolders);\r\n private getLevel = (node: IndexNode) => node.level;\r\n private isExpandable = (node: IndexNode) => node.expandable;\r\n protected hasChild = (_: number, _node: IndexNode) => _node.expandable;\r\n protected transformer = (item: IndexInfo, level: number) => {\r\n return new IndexNode(item, level);\r\n };\r\n\r\n ngOnInit(): void {\r\n\r\n // Setup tree structure\r\n this.treeFlattener = new MatTreeFlattener(\r\n this.transformer,\r\n this.getLevel,\r\n this.isExpandable,\r\n this.getChildren\r\n );\r\n this.treeControl = new FlatTreeControl<IndexNode>(\r\n this.getLevel,\r\n this.isExpandable\r\n );\r\n this.treeData = new MatTreeFlatDataSource(\r\n this.treeControl,\r\n this.treeFlattener\r\n );\r\n\r\n // Subscribe data change\r\n this.tree.dataChange\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(data => (this.treeData.data = data));\r\n\r\n // Observe layout changes\r\n this.breakpointObserver\r\n .observe([\r\n Breakpoints.XSmall,\r\n Breakpoints.Small,\r\n Breakpoints.Medium,\r\n Breakpoints.Large,\r\n Breakpoints.XLarge,\r\n ])\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe((result: any) => {\r\n for (const query of Object.keys(result.breakpoints)) {\r\n if (result.breakpoints[query]) {\r\n this.handleFilterPaneVisibility();\r\n }\r\n }\r\n });\r\n\r\n\r\n // React to window size change\r\n fromEvent(window, 'resize')\r\n .pipe(takeUntil(this.unsubscribe), debounceTime(500))\r\n .subscribe(() => {\r\n // Update view\r\n this.resize();\r\n });\r\n\r\n this.getToc();\r\n\r\n this.indexId = this.dialogData.id;\r\n if (this.indexId) {\r\n this.getChapter(this.indexId);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unsubscribe.next();\r\n this.unsubscribe.complete();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.handleFilterPaneVisibility();\r\n this.indexPaneClosed = !this.indexPane.opened;\r\n }, 0);\r\n this.resize();\r\n this.changeDetector.detectChanges();\r\n }\r\n\r\n /**\r\n * Resize \r\n */\r\n private resize() {\r\n setTimeout(() => {\r\n let elem = document.getElementById('helpviewer-scrollable');\r\n if (elem) {\r\n const h = this.dialogService.getCurrentDialogScrollableHeight(\r\n ['helpviewer-fixed'],\r\n window.innerHeight\r\n );\r\n if (h != this.height) {\r\n elem.setAttribute('style', 'padding:0 0 0 10px;height:' + h + 'px !important;max-height:' + h + 'px !important');\r\n this.height = h;\r\n this.resize();\r\n }\r\n } else {\r\n this.resize();\r\n }\r\n }, 100);\r\n }\r\n\r\n\r\n /**\r\n* Handle filter pane visibility\r\n*/\r\n private handleFilterPaneVisibility() {\r\n if (this.indexPane) {\r\n if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||\r\n this.breakpointObserver.isMatched(Breakpoints.Small) ||\r\n this.breakpointObserver.isMatched(Breakpoints.Medium)) {\r\n if (this.indexPane.opened) {\r\n this.indexPane.close();\r\n }\r\n } else {\r\n if (!this.indexPane.opened && !this.indexPaneClosed) {\r\n this.indexPane.open();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Show hide index pane manually\r\n */\r\n protected toggleIndexPane() {\r\n this.indexPaneClosed = !this.indexPaneClosed;\r\n this.indexPane?.toggle();\r\n }\r\n\r\n\r\n /**\r\n * Close dialog\r\n */\r\n protected close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**\r\n * Get the toc\r\n */\r\n protected getToc(): void {\r\n this.busy.set(true);\r\n this.helpService\r\n .getToc()\r\n .subscribe({\r\n next: (r: any) => {\r\n if (!r.success) {\r\n this.dialogService.error(r.message);\r\n } else {\r\n this.folders = r.value.subFolders;\r\n this.tree.initialize(r.value.subFolders);\r\n }\r\n },\r\n complete: () => {\r\n this.busy.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * React to click event and find new help target to go to\r\n * @param event : the click event\r\n * @returns : always false, to stop navigation\r\n */\r\n protected gotoChapter(event: any): boolean {\r\n if (event.srcElement.nodeName !== 'A') return false;\r\n let tag = event.srcElement.outerHTML;\r\n let id = '';\r\n let p = tag.indexOf('help-target=\"');\r\n if (p !== -1) {\r\n p += 13;\r\n while (tag[p] !== '\"') {\r\n id += tag[p];\r\n p++;\r\n }\r\n }\r\n if (id) this.getChapter(id);\r\n return false;\r\n }\r\n\r\n /**\r\n * Find a node by id\r\n * @param id : folder id\r\n * @returns: the folder info\r\n */\r\n private findFolder(id: string): IndexInfo {\r\n let node = null;\r\n if (this.folders) {\r\n this.folders.some((n: any) => {\r\n node = this.tree.findNode(n, id);\r\n if (node) return true;\r\n return false;\r\n });\r\n }\r\n return node;\r\n }\r\n\r\n /**\r\n * Expand current fodler node\r\n */\r\n private expandCurrentFolder(): void {\r\n if (this.indexNode) {\r\n this.treeControl.expand(\r\n SystemUtils.arrayFindByKey(\r\n this.treeControl.dataNodes,\r\n 'id',\r\n this.indexNode.id\r\n )\r\n );\r\n if (this.indexNode.parent) {\r\n // Apply previous selection\r\n let n = this.indexNode.parent;\r\n while (n) {\r\n this.treeControl.expand(\r\n SystemUtils.arrayFindByKey(this.treeControl.dataNodes, 'id', n.id)\r\n );\r\n n = n.parent;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Retrieve a new chapter\r\n * @param id the chapter id#anchor\r\n * @param position : the position to scroll to\r\n */\r\n protected getChapter(id: string, position: number = 0): void {\r\n // Detect anchor if exists\r\n let anchor: string = null;\r\n let p = id.indexOf('#');\r\n if (p !== -1) {\r\n anchor = id.substring(p + 1);\r\n id = id.substring(0, p);\r\n }\r\n if (id !== '.') {\r\n this.busy.set(true);\r\n this.helpService.getChapter(id)\r\n .subscribe({\r\n next: (r: any) => {\r\n let found = false;\r\n if (!r.success) {\r\n this.dialogService.error(\"Capitolo non trovato.\");\r\n } else {\r\n if (!position)\r\n this.history().push({ id: this.indexId, position: this.getPosition() });\r\n this.indexId = id;\r\n this.page.set(r.value.data);\r\n found = r.value.chapter?.name?.length > 0;\r\n if (found) {\r\n // Update folder\r\n this.indexNode = this.findFolder(id);\r\n this.expandCurrentFolder();\r\n // Handle positioning\r\n this.gotoPosition(anchor, position);\r\n }\r\n }\r\n\r\n if (!found) {\r\n this.getChapter(\"1\");\r\n }\r\n },\r\n complete: () => {\r\n this.busy.set(false);\r\n }\r\n });\r\n } else {\r\n if (!position)\r\n this.history().push({ id: this.indexId, position: this.getPosition() });\r\n // Move on the same chapter\r\n this.gotoPosition(anchor, position);\r\n }\r\n }\r\n\r\n /**\r\n * Goto position\r\n * @param anchor the anchor to go to\r\n * @param position the offset to go to\r\n */\r\n protected gotoPosition(anchor: string, position: number = 0): void {\r\n // Handle positioning\r\n setTimeout(() => {\r\n // Handle anchor first\r\n if (anchor) {\r\n let elms = document.getElementsByName(anchor.toUpperCase());\r\n if (elms) position = elms[0].offsetTop;\r\n }\r\n // Then position\r\n if (position > 0) this.setPosition(position - 1);\r\n else this.setPosition(0);\r\n }, 50);\r\n }\r\n\r\n /**\r\n * Get scroll position\r\n * @returns: the new scroll top\r\n */\r\n protected getPosition(): number {\r\n let elem = document.getElementById('helpviewer-scroller');\r\n if (elem) {\r\n return elem.scrollTop;\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Set scroll position\r\n * @param position : the position to go to\r\n */\r\n protected setPosition(position: number): void {\r\n let elem = document.getElementById('helpviewer-scroller');\r\n if (elem) {\r\n elem.scrollTo(0, position);\r\n }\r\n }\r\n\r\n /**\r\n * Go back\r\n */\r\n protected back(): void {\r\n if (!this.history || this.history.length === 0) return;\r\n let n = this.history().pop();\r\n this.getChapter(n.id, n.position + 1);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n}\r\n","<div class=\"helpviewer-fixed\">\r\n <div style=\"height:6px\">\r\n @if (busy()) {\r\n <mat-progress-bar z-index=\"11\" mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div class=\"dialog-menu\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Mostra menu\" [attr.aria-label]=\"'Mostra indice'\"\r\n (click)=\"toggleIndexPane()\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Guida</h2>\r\n </div>\r\n <div fxFlex=\"100px\" fxLayoutAlign=\"end\" class=\"dialog-close\">\r\n @if (canGoBack()) {\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Indietro\" (click)=\"back()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n }\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n</div>\r\n<div mat-dialog-content id=\"helpviewer-scrollable\">\r\n <mat-drawer-container class=\"fill\">\r\n <mat-drawer #indexPane mode=\"side\" [autoFocus]=\"false\" class=\"drawer-small drawer-transparent\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\">\r\n <mat-tree [dataSource]=\"treeData\" [treeControl]=\"treeControl\" class=\"tree \" style=\"max-width:310px\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"20\" class=\"tree-node tree-node-simple tree-node-style\"\r\n (click)=\"getChapter(node.id);\" [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id}\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button disabled class=\"small-icon-button\"></button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\r\n class=\"tree-node tree-node-simple tree-node-style\"\r\n [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id }\" (click)=\"getChapter(node.id)\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button matTreeNodeToggle\r\n [attr.aria-label]=\"'Apri/chiudi ' + node.name\" class=\"small-icon-button\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\r\n </mat-icon>\r\n </button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div style=\"padding: 0 24px;\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div class=\"fill\" id=\"helpviewer-scroller\" (click)=\"gotoChapter($event)\"\r\n [innerHtml]=\"(page() ?? '') | safeHtml\"></div>\r\n </div>\r\n </div>\r\n </mat-drawer-container>\r\n</div>","import { Injectable, inject } from '@angular/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { ApiResult } from '@arsedizioni/ars-utils/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { HelpViewerComponent } from '../components/help-viewer/help-viewer.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HelpService {\r\n \r\n private httpClient = inject(HttpClient); \r\n private dialogService = inject(DialogService);\r\n private serviceUri: string;\r\n\r\n /**\r\n * Initialize help service\r\n * @param serviceUri : the service uri\r\n */\r\n initialize(serviceUri: string) {\r\n this.serviceUri = serviceUri;\r\n }\r\n\r\n /**\r\n * Retrieve an help chapter\r\n * @param id the chapter id\r\n * @param query the search query\r\n */\r\n getChapter(id: string, query: string = null) {\r\n return this.httpClient.get<ApiResult<any>>(\r\n this.serviceUri +\r\n '/help/chapter/' +\r\n id +\r\n '/?query=' +\r\n (query == null ? '' : query)\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve an help chapater info\r\n * @param id the chapter id\r\n */\r\n getChapterInfo(id: string) {\r\n return this.httpClient.get<ApiResult<any>>(\r\n this.serviceUri + '/help/chapter/info/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve a repository item\r\n * @param id the file id\r\n */\r\n getRepo(id: string) {\r\n return this.httpClient.get<ApiResult<any>>(\r\n this.serviceUri + '/help/repo/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve an help toc\r\n */\r\n getToc() {\r\n return this.httpClient.get<ApiResult<any>>(\r\n this.serviceUri + '/help/toc'\r\n );\r\n }\r\n\r\n /**\r\n * Search help\r\n * @param params parameters\r\n */\r\n search(params: any) {\r\n return this.httpClient.post<ApiResult<any>>(\r\n this.serviceUri + '/help',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Open help viewer\r\n */\r\n show(id: string = '1') {\r\n this.dialogService.open(HelpViewerComponent, {\r\n ariaLabel: 'guida',\r\n autoFocus: false,\r\n restoreFocus: false,\r\n disableClose: true,\r\n data: {\r\n id: id\r\n },\r\n minWidth: '375px',\r\n maxWidth: '1100px',\r\n width: '99%',\r\n height: '99%'\r\n });\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class ArsHelpModule { }\r\n\r\nexport * from './services/help.service';\r\n","/*\r\n * Public API Surface \r\n */\r\nexport * from './help.module';\r\nexport * from './components/help-viewer/help-viewer.component';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBa,SAAS,CAAA;AAMrB,CAAA;AAEK,MAAO,SAAU,SAAQ,SAAS,CAAA;IAItC,WAAY,CAAA,IAAe,EAAE,KAAa,EAAA;AACxC,QAAA,KAAK,EAAE,CAAC;;AAGR,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;AAChE,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;AAGnB,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;AAClB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AACtB,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;AAClC,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;KAC3B;AACF,CAAA;MAGY,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,eAAe,CAAc,EAAE,CAAC,CAAC;AAgGnD,KAAA;AA9FC,IAAA,IAAI,IAAI,GAAA;AACN,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;AAClB,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,MAAM,EAAE,KAAK;AACd,SAAA,CAAC,CAAC;KACJ;8GAtFU,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCLY,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAb,aAAa,EAAA,CAAA,CAAA,EAAA;+GAAb,aAAa,EAAA,CAAA,CAAA,EAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,QAAQ;;;ACFT;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"arsedizioni-ars-utils-help.mjs","sources":["../../../projects/ars-utils/help/components/help-viewer/help-viewer.component.ts","../../../projects/ars-utils/help/components/help-viewer/help-viewer.component.html","../../../projects/ars-utils/help/services/help.service.ts","../../../projects/ars-utils/help/help.module.ts","../../../projects/ars-utils/help/public_api.ts","../../../projects/ars-utils/help/arsedizioni-ars-utils-help.ts"],"sourcesContent":["import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\r\nimport { FlatTreeControl } from '@angular/cdk/tree';\r\nimport { NgClass, NgStyle } from '@angular/common';\r\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, Injectable, OnDestroy, OnInit, Signal, ViewChild, ViewEncapsulation, computed, inject, signal } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatTreeFlatDataSource, MatTreeFlattener, MatTreeModule } from '@angular/material/tree';\r\nimport { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { ExtendedModule } from '@ngbracket/ngx-layout/extended';\r\nimport { FlexModule } from '@ngbracket/ngx-layout/flex';\r\nimport { BehaviorSubject, Observable, Subject, fromEvent, of as observableOf } from 'rxjs';\r\nimport { debounceTime, takeUntil } from 'rxjs/operators';\r\nimport { HelpService } from '../../services/help.service';\r\n\r\nexport interface HelpViewerDialogData {\r\n id?: string | null;\r\n}\r\n\r\nexport class IndexInfo {\r\n id: string;\r\n parent?: IndexInfo | null;\r\n name: string;\r\n itemsCount?: number | null;\r\n subFolders?: IndexInfo[] | null;\r\n}\r\n\r\nexport class IndexNode extends IndexInfo {\r\n expandable: boolean;\r\n level: number;\r\n\r\n constructor(item: IndexInfo, level: number) {\r\n super();\r\n\r\n // Flattened implementation\r\n this.expandable = item.subFolders && item.subFolders.length > 0;\r\n this.level = level;\r\n\r\n // Data\r\n this.id = item.id;\r\n this.name = item.name;\r\n this.itemsCount = item.itemsCount;\r\n this.parent = item.parent;\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class IndexTreeDataSource implements OnDestroy {\r\n dataChange = new BehaviorSubject<IndexInfo[]>([]);\r\n\r\n get data(): IndexInfo[] {\r\n return this.dataChange.value;\r\n }\r\n\r\n ngOnDestroy() {\r\n this.dataChange.unsubscribe();\r\n }\r\n\r\n /**\r\n * Initialzie the data source\r\n * @param data : data\r\n */\r\n initialize(data: IndexInfo[]) {\r\n this.dataChange.next(data);\r\n }\r\n\r\n /**\r\n * Find a node by id recursively\r\n * @param node: the source node\r\n * @param id : the id to search for\r\n */\r\n findNode(node: IndexInfo, id: string): IndexInfo {\r\n let children;\r\n if (node && node.id === id) return node;\r\n if (node) children = node.subFolders;\r\n else children = this.data;\r\n if (children) {\r\n let _n = null;\r\n children.some(n => {\r\n n.parent = node;\r\n _n = this.findNode(n, id);\r\n if (_n) return true;\r\n return false;\r\n });\r\n return _n;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Remove a node\r\n * @param id : the node id to remove\r\n */\r\n removeNode(id: string) {\r\n let n = this.findNode(null, id);\r\n if (!n) return;\r\n if (n.parent) {\r\n let i = SystemUtils.arrayFindIndexByKey(n.parent.subFolders, 'id', id);\r\n if (i !== -1) {\r\n n.parent.subFolders.splice(i, 1);\r\n n.parent.itemsCount--;\r\n }\r\n } else {\r\n let i = SystemUtils.arrayFindIndexByKey(this.data, 'id', id);\r\n if (i !== -1) {\r\n this.data.splice(i, 1);\r\n }\r\n }\r\n\r\n this.dataChange.next(this.data);\r\n }\r\n\r\n /**\r\n * Insert a new node\r\n * @param node : the new node\r\n */\r\n insertNode(node: IndexInfo) {\r\n if (node.parent) {\r\n node.parent.subFolders.unshift(node);\r\n node.parent.itemsCount++;\r\n } else this.data.unshift(node);\r\n\r\n this.dataChange.next(this.data);\r\n }\r\n\r\n /**\r\n * Rename a node\r\n * @param id : the node id\r\n * @param name : the new node name\r\n */\r\n renameNode(id: string, name: string) {\r\n let n = this.findNode(null, id);\r\n if (n) {\r\n n.name = name;\r\n this.dataChange.next(this.data);\r\n }\r\n }\r\n\r\n /**\r\n * Update data\r\n */\r\n update() {\r\n this.dataChange.next(this.data);\r\n }\r\n}\r\n\r\n@Component({\r\n host: { 'Bind': SystemUtils.generateUUID() },\r\n templateUrl: './help-viewer.component.html',\r\n styleUrls: ['./help-viewer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [IndexTreeDataSource],\r\n standalone: true,\r\n imports: [FlexModule, MatButtonModule, MatTooltipModule, MatIconModule, MatProgressBarModule, MatDialogTitle, MatDialogContent,\r\n NgStyle, ExtendedModule, MatSidenavModule, MatTreeModule, NgClass, SafeHtmlPipe]\r\n})\r\nexport class HelpViewerComponent implements OnInit, OnDestroy, AfterViewInit {\r\n @ViewChild('indexPane') indexPane!: MatSidenav;\r\n\r\n private height: number = -1;\r\n private unsubscribe: Subject<void> = new Subject<void>();\r\n protected changeDetector = inject(ChangeDetectorRef);\r\n private dialogRef = inject(MatDialogRef<HelpViewerComponent>);\r\n protected dialogData: HelpViewerDialogData = inject(MAT_DIALOG_DATA) ?? { id: \"1\" };\r\n private dialogService = inject(DialogService);\r\n private helpService = inject(HelpService);\r\n protected breakpointObserver = inject(BreakpointObserver);\r\n protected busy = signal<boolean>(false);\r\n protected page = signal<string>(null);\r\n private indexId: string = null;\r\n private indexPaneClosed: boolean = false;\r\n protected indexNode: IndexInfo = null;\r\n private history = signal([]);\r\n protected canGoBack: Signal<boolean> = computed(() => {\r\n return this.history()?.length > 1;\r\n })\r\n\r\n /**\r\n * Manage flat tree view\r\n */\r\n private tree = inject(IndexTreeDataSource);\r\n private treeFlattener: MatTreeFlattener<IndexInfo, IndexNode>;\r\n protected treeControl: FlatTreeControl<IndexNode>;\r\n protected treeData: MatTreeFlatDataSource<IndexInfo, IndexNode>;\r\n private folders: any = null;\r\n private getChildren = (node: IndexInfo): Observable<IndexInfo[]> =>\r\n observableOf(node.subFolders);\r\n private getLevel = (node: IndexNode) => node.level;\r\n private isExpandable = (node: IndexNode) => node.expandable;\r\n protected hasChild = (_: number, _node: IndexNode) => _node.expandable;\r\n protected transformer = (item: IndexInfo, level: number) => {\r\n return new IndexNode(item, level);\r\n };\r\n\r\n ngOnInit(): void {\r\n\r\n // Setup tree structure\r\n this.treeFlattener = new MatTreeFlattener(\r\n this.transformer,\r\n this.getLevel,\r\n this.isExpandable,\r\n this.getChildren\r\n );\r\n this.treeControl = new FlatTreeControl<IndexNode>(\r\n this.getLevel,\r\n this.isExpandable\r\n );\r\n this.treeData = new MatTreeFlatDataSource(\r\n this.treeControl,\r\n this.treeFlattener\r\n );\r\n\r\n // Subscribe data change\r\n this.tree.dataChange\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(data => (this.treeData.data = data));\r\n\r\n // Observe layout changes\r\n this.breakpointObserver\r\n .observe([\r\n Breakpoints.XSmall,\r\n Breakpoints.Small,\r\n Breakpoints.Medium,\r\n Breakpoints.Large,\r\n Breakpoints.XLarge,\r\n ])\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe((result: any) => {\r\n for (const query of Object.keys(result.breakpoints)) {\r\n if (result.breakpoints[query]) {\r\n this.handleFilterPaneVisibility();\r\n }\r\n }\r\n });\r\n\r\n\r\n // React to window size change\r\n fromEvent(window, 'resize')\r\n .pipe(takeUntil(this.unsubscribe), debounceTime(500))\r\n .subscribe(() => {\r\n // Update view\r\n this.resize();\r\n });\r\n\r\n this.getToc();\r\n\r\n this.indexId = this.dialogData.id;\r\n if (this.indexId) {\r\n this.getChapter(this.indexId);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unsubscribe.next();\r\n this.unsubscribe.complete();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.handleFilterPaneVisibility();\r\n this.indexPaneClosed = !this.indexPane.opened;\r\n }, 0);\r\n this.resize();\r\n this.changeDetector.detectChanges();\r\n }\r\n\r\n /**\r\n * Resize \r\n */\r\n private resize() {\r\n setTimeout(() => {\r\n let elem = document.getElementById('helpviewer-scrollable');\r\n if (elem) {\r\n const h = this.dialogService.getCurrentDialogScrollableHeight(\r\n ['helpviewer-fixed'],\r\n window.innerHeight\r\n );\r\n if (h != this.height) {\r\n elem.setAttribute('style', 'padding:0 0 0 10px;height:' + h + 'px !important;max-height:' + h + 'px !important');\r\n this.height = h;\r\n this.resize();\r\n }\r\n } else {\r\n this.resize();\r\n }\r\n }, 100);\r\n }\r\n\r\n\r\n /**\r\n* Handle filter pane visibility\r\n*/\r\n private handleFilterPaneVisibility() {\r\n if (this.indexPane) {\r\n if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||\r\n this.breakpointObserver.isMatched(Breakpoints.Small) ||\r\n this.breakpointObserver.isMatched(Breakpoints.Medium)) {\r\n if (this.indexPane.opened) {\r\n this.indexPane.close();\r\n }\r\n } else {\r\n if (!this.indexPane.opened && !this.indexPaneClosed) {\r\n this.indexPane.open();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Show hide index pane manually\r\n */\r\n protected toggleIndexPane() {\r\n this.indexPaneClosed = !this.indexPaneClosed;\r\n this.indexPane?.toggle();\r\n }\r\n\r\n\r\n /**\r\n * Close dialog\r\n */\r\n protected close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**\r\n * Get the toc\r\n */\r\n protected getToc(): void {\r\n this.busy.set(true);\r\n this.helpService\r\n .getToc()\r\n .subscribe({\r\n next: (r: any) => {\r\n if (!r.success) {\r\n this.dialogService.error(r.message);\r\n } else {\r\n this.folders = r.value.subFolders;\r\n this.tree.initialize(r.value.subFolders);\r\n }\r\n },\r\n complete: () => {\r\n this.busy.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * React to click event and find new help target to go to\r\n * @param event : the click event\r\n * @returns : always false, to stop navigation\r\n */\r\n protected gotoChapter(event: any): boolean {\r\n if (event.srcElement.nodeName !== 'A') return false;\r\n let tag = event.srcElement.outerHTML;\r\n let id = '';\r\n let p = tag.indexOf('help-target=\"');\r\n if (p !== -1) {\r\n p += 13;\r\n while (tag[p] !== '\"') {\r\n id += tag[p];\r\n p++;\r\n }\r\n }\r\n if (id) this.getChapter(id);\r\n return false;\r\n }\r\n\r\n /**\r\n * Find a node by id\r\n * @param id : folder id\r\n * @returns: the folder info\r\n */\r\n private findFolder(id: string): IndexInfo {\r\n let node = null;\r\n if (this.folders) {\r\n this.folders.some((n: any) => {\r\n node = this.tree.findNode(n, id);\r\n if (node) return true;\r\n return false;\r\n });\r\n }\r\n return node;\r\n }\r\n\r\n /**\r\n * Expand current fodler node\r\n */\r\n private expandCurrentFolder(): void {\r\n if (this.indexNode) {\r\n this.treeControl.expand(\r\n SystemUtils.arrayFindByKey(\r\n this.treeControl.dataNodes,\r\n 'id',\r\n this.indexNode.id\r\n )\r\n );\r\n if (this.indexNode.parent) {\r\n // Apply previous selection\r\n let n = this.indexNode.parent;\r\n while (n) {\r\n this.treeControl.expand(\r\n SystemUtils.arrayFindByKey(this.treeControl.dataNodes, 'id', n.id)\r\n );\r\n n = n.parent;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Retrieve a new chapter\r\n * @param id the chapter id#anchor\r\n * @param position : the position to scroll to\r\n */\r\n protected getChapter(id: string, position: number = 0): void {\r\n // Detect anchor if exists\r\n let anchor: string = null;\r\n let p = id.indexOf('#');\r\n if (p !== -1) {\r\n anchor = id.substring(p + 1);\r\n id = id.substring(0, p);\r\n }\r\n if (id !== '.') {\r\n this.busy.set(true);\r\n this.helpService.getChapter(id)\r\n .subscribe({\r\n next: (r: any) => {\r\n let found = false;\r\n if (!r.success) {\r\n this.dialogService.error(\"Capitolo non trovato.\");\r\n } else {\r\n if (!position)\r\n this.history().push({ id: this.indexId, position: this.getPosition() });\r\n this.indexId = id;\r\n this.page.set(r.value.data);\r\n found = r.value.chapter?.name?.length > 0;\r\n if (found) {\r\n // Update folder\r\n this.indexNode = this.findFolder(id);\r\n this.expandCurrentFolder();\r\n // Handle positioning\r\n this.gotoPosition(anchor, position);\r\n }\r\n }\r\n\r\n if (!found) {\r\n this.getChapter(\"1\");\r\n }\r\n },\r\n complete: () => {\r\n this.busy.set(false);\r\n }\r\n });\r\n } else {\r\n if (!position)\r\n this.history().push({ id: this.indexId, position: this.getPosition() });\r\n // Move on the same chapter\r\n this.gotoPosition(anchor, position);\r\n }\r\n }\r\n\r\n /**\r\n * Goto position\r\n * @param anchor the anchor to go to\r\n * @param position the offset to go to\r\n */\r\n protected gotoPosition(anchor: string, position: number = 0): void {\r\n // Handle positioning\r\n setTimeout(() => {\r\n // Handle anchor first\r\n if (anchor) {\r\n let elms = document.getElementsByName(anchor.toUpperCase());\r\n if (elms) position = elms[0].offsetTop;\r\n }\r\n // Then position\r\n if (position > 0) this.setPosition(position - 1);\r\n else this.setPosition(0);\r\n }, 50);\r\n }\r\n\r\n /**\r\n * Get scroll position\r\n * @returns: the new scroll top\r\n */\r\n protected getPosition(): number {\r\n let elem = document.getElementById('helpviewer-scroller');\r\n if (elem) {\r\n return elem.scrollTop;\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Set scroll position\r\n * @param position : the position to go to\r\n */\r\n protected setPosition(position: number): void {\r\n let elem = document.getElementById('helpviewer-scroller');\r\n if (elem) {\r\n elem.scrollTo(0, position);\r\n }\r\n }\r\n\r\n /**\r\n * Go back\r\n */\r\n protected back(): void {\r\n if (!this.history || this.history.length === 0) return;\r\n let n = this.history().pop();\r\n this.getChapter(n.id, n.position + 1);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n}\r\n","<div class=\"helpviewer-fixed\">\r\n <div style=\"height:6px\">\r\n @if (busy()) {\r\n <mat-progress-bar z-index=\"11\" mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div class=\"dialog-menu\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Mostra menu\" [attr.aria-label]=\"'Mostra indice'\"\r\n (click)=\"toggleIndexPane()\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Guida</h2>\r\n </div>\r\n <div fxFlex=\"100px\" fxLayoutAlign=\"end\" class=\"dialog-close\">\r\n @if (canGoBack()) {\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Indietro\" (click)=\"back()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n }\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n</div>\r\n<div mat-dialog-content id=\"helpviewer-scrollable\">\r\n <mat-drawer-container class=\"fill\">\r\n <mat-drawer #indexPane mode=\"side\" [autoFocus]=\"false\" class=\"drawer-small drawer-transparent\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\">\r\n <mat-tree [dataSource]=\"treeData\" [treeControl]=\"treeControl\" class=\"tree \" style=\"max-width:310px\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"20\" class=\"tree-node tree-node-simple tree-node-style\"\r\n (click)=\"getChapter(node.id);\" [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id}\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button disabled class=\"small-icon-button\"></button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\r\n class=\"tree-node tree-node-simple tree-node-style\"\r\n [ngClass]=\"{'tree-node-activated': indexNode && indexNode.id === node.id }\" (click)=\"getChapter(node.id)\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button matTreeNodeToggle\r\n [attr.aria-label]=\"'Apri/chiudi ' + node.name\" class=\"small-icon-button\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\r\n </mat-icon>\r\n </button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div style=\"padding: 0 24px;\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div class=\"fill\" id=\"helpviewer-scroller\" (click)=\"gotoChapter($event)\"\r\n [innerHtml]=\"(page() ?? '') | safeHtml\"></div>\r\n </div>\r\n </div>\r\n </mat-drawer-container>\r\n</div>","import { Injectable, inject } from '@angular/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { ApiResult } from '@arsedizioni/ars-utils/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { HelpViewerComponent } from '../components/help-viewer/help-viewer.component';\r\nimport { Chapter, ChapterBag, ChapterTree } from '../definitions';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HelpService {\r\n \r\n private httpClient = inject(HttpClient); \r\n private dialogService = inject(DialogService);\r\n private serviceUri: string;\r\n\r\n /**\r\n * Initialize help service\r\n * @param serviceUri : the service uri\r\n */\r\n initialize(serviceUri: string) {\r\n this.serviceUri = serviceUri;\r\n }\r\n\r\n /**\r\n * Retrieve an help chapter\r\n * @param id the chapter id\r\n * @param query the search query\r\n */\r\n getChapter(id: string, query: string = null) {\r\n return this.httpClient.get<ApiResult<ChapterBag>>(\r\n this.serviceUri +\r\n '/help/chapter/' +\r\n id +\r\n '/?query=' +\r\n (query == null ? '' : query)\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve an help chapater info\r\n * @param id the chapter id\r\n */\r\n getChapterInfo(id: string) {\r\n return this.httpClient.get<ApiResult<Chapter>>(\r\n this.serviceUri + '/help/chapter/info/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve a repository item\r\n * @param id the file id\r\n */\r\n getRepo(id: string) {\r\n return this.httpClient.get<ApiResult<any>>(\r\n this.serviceUri + '/help/repo/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve an help toc\r\n */\r\n getToc() {\r\n return this.httpClient.get<ApiResult<ChapterTree>>(\r\n this.serviceUri + '/help/toc'\r\n );\r\n }\r\n\r\n\r\n /**\r\n * Open help viewer\r\n */\r\n show(id: string = '1') {\r\n this.dialogService.open(HelpViewerComponent, {\r\n ariaLabel: 'guida',\r\n autoFocus: false,\r\n restoreFocus: false,\r\n disableClose: true,\r\n data: {\r\n id: id\r\n },\r\n minWidth: '375px',\r\n maxWidth: '1100px',\r\n width: '99%',\r\n height: '99%'\r\n });\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class ArsHelpModule { }\r\n\r\nexport * from './services/help.service';\r\n","/*\r\n * Public API Surface \r\n */\r\nexport * from './help.module';\r\nexport * from './definitions';\r\nexport * from './components/help-viewer/help-viewer.component';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBa,SAAS,CAAA;AAMrB,CAAA;AAEK,MAAO,SAAU,SAAQ,SAAS,CAAA;IAItC,WAAY,CAAA,IAAe,EAAE,KAAa,EAAA;AACxC,QAAA,KAAK,EAAE,CAAC;;AAGR,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;AAChE,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;AAGnB,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;AAClB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CA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AK;AACnB,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,IAAI,EAAE;AACJ,gBAAA,EAAE,EAAE,EAAE;AACP,aAAA;AACD,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,MAAM,EAAE,KAAK;AACd,SAAA,CAAC,CAAC;KACJ;8GA5EU,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCNY,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAb,aAAa,EAAA,CAAA,CAAA,EAAA;+GAAb,aAAa,EAAA,CAAA,CAAA,EAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,QAAQ;;;ACFT;;AAEG;;ACFH;;AAEG;;;;"}
@@ -109,7 +109,7 @@ class SupportService {
109
109
  this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message) => {
110
110
  if (message.id === SupportMessages.LOGIN_CHANGED) {
111
111
  setTimeout(() => {
112
- this.login(message.data.email, message.data.oauth, message.data.oauthAccessToken).subscribe((r) => {
112
+ this.login(message.data.email, message.data.oauth, message.data.oauthAccessToken).subscribe(r => {
113
113
  if (r.success) {
114
114
  this.countUnreadNotifications();
115
115
  }
@@ -239,7 +239,7 @@ class SupportService {
239
239
  */
240
240
  logout() {
241
241
  return this.httpClient
242
- .post(this._serviceUri + '/logout', {}).pipe(map((r) => { return r; }), catchError((_e) => {
242
+ .post(this._serviceUri + '/logout', {}).pipe(map(r => { return r; }), catchError((_e) => {
243
243
  this.clear();
244
244
  return of([]);
245
245
  }));
@@ -292,7 +292,7 @@ class SupportService {
292
292
  * Count unread notifications
293
293
  */
294
294
  countUnreadNotifications() {
295
- this.httpClient.get(this._serviceUri + '/notifications/count-unread/?products=' + (this.products ?? 0) + "&modules=" + (this.productModules ?? 0)).subscribe((r) => {
295
+ this.httpClient.get(this._serviceUri + '/notifications/count-unread/?products=' + (this.products ?? 0) + "&modules=" + (this.productModules ?? 0)).subscribe(r => {
296
296
  if (r.success) {
297
297
  this._unreadNotifications = r.value > 0 ? r.value : null;
298
298
  }
@@ -1 +1 @@
1
- {"version":3,"file":"arsedizioni-ars-utils-support.common.mjs","sources":["../../../projects/ars-utils/support.common/common/messages.ts","../../../projects/ars-utils/support.common/common/services/support.service.ts","../../../projects/ars-utils/support.common/common/interceptors/auth.interceptor.ts","../../../projects/ars-utils/support.common/common/common.module.ts","../../../projects/ars-utils/support.common/common/definitions.ts","../../../projects/ars-utils/support.common/public_api.ts","../../../projects/ars-utils/support.common/arsedizioni-ars-utils-support.common.ts"],"sourcesContent":["export const SupportMessages = {\r\n /**\r\n * Messages\r\n */\r\n\r\n // Login\r\n LOGIN_CHANGED: '§support-login-changed',\r\n LOGIN_COMPLETED: '§support-login-completed',\r\n LOGIN_DISCONNECTED: '§support-login-disconnected',\r\n LOGOUT_COMPLETED: '§support-logout-completed',\r\n\r\n // Notifications\r\n NOTIFICATION_READ: '§support-notification-read',\r\n};\r\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Injectable, OnDestroy, inject } from '@angular/core';\r\nimport { ApiResult, BroadcastService, LoginInfo, LoginResult, SystemUtils } from '@arsedizioni/ars-utils/core';\r\nimport { EMPTY, Observable, of, Subscription, throwError, timer } from 'rxjs';\r\nimport { catchError, map, shareReplay, switchMap } from 'rxjs/operators';\r\nimport { SupportMessages } from '../messages';\r\nimport { SupportNotificationsSearchParams, SupportProduct, SupportProductModule } from '../definitions';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SupportService implements OnDestroy {\r\n\r\n private readonly REFRESH_INTERVAL = 60000 * 50; //50 min\r\n\r\n private httpClient = inject(HttpClient);\r\n private broadcastService = inject(BroadcastService);\r\n\r\n private refreshing: boolean = false;\r\n private tokenRefreshTimer?: Observable<number | void> | null = null;\r\n private tokenRefreshTimerSubscription?: Subscription | null = null;\r\n private broadcastServiceSubscription?: Subscription | null = null;\r\n\r\n\r\n private _loginInfo: LoginInfo = null;\r\n get loginInfo(): LoginInfo { return this._loginInfo };\r\n set loginInfo(value: LoginInfo) {\r\n this._loginInfo = value;\r\n }\r\n\r\n private _loggedIn: boolean = false;\r\n get loggedIn(): boolean {\r\n return this._loggedIn;\r\n }\r\n set loggedIn(value: boolean) {\r\n this._loggedIn = value;\r\n }\r\n\r\n private _loggingIn: boolean = false;\r\n get loggingIn(): boolean {\r\n return this._loggingIn;\r\n }\r\n set loggingIn(value: boolean) {\r\n this._loggingIn = value;\r\n }\r\n\r\n private _serviceUri: string = \"https://support.arsedizioni.it\"\r\n get serviceUri(): string {\r\n return this._serviceUri;\r\n }\r\n set serviceUri(value: string) {\r\n this._serviceUri = value;\r\n }\r\n private _servicePrefix: string = \"\"\r\n get servicePrefix(): string {\r\n return this._servicePrefix;\r\n }\r\n set servicePrefix(value: string) {\r\n this._servicePrefix = value;\r\n }\r\n\r\n private _products: SupportProduct;\r\n get products(): SupportProduct {\r\n return this._products;\r\n }\r\n set products(value: SupportProduct) {\r\n this._products = value;\r\n }\r\n\r\n private _productModules: SupportProductModule;\r\n get productModules(): SupportProductModule {\r\n return this._productModules;\r\n }\r\n set productModules(value: SupportProductModule) {\r\n this._productModules = value;\r\n }\r\n\r\n private _unreadNotifications: number = null;\r\n get unreadNotifications(): number {\r\n return this._unreadNotifications;\r\n }\r\n\r\n ngOnDestroy() {\r\n // Clean-up\r\n if (this.tokenRefreshTimerSubscription){\r\n this.tokenRefreshTimerSubscription.unsubscribe();\r\n }\r\n if (this.broadcastServiceSubscription){ \r\n this.broadcastServiceSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n /**\r\n * Initialize service\r\n * @param serviceUri : the service uri\r\n * @param servicePrefix : the service prefix used to manage local storage \r\n * @param products: the supported products\r\n */\r\n initialize(\r\n serviceUri: string = null,\r\n servicePrefix: string = null,\r\n products: number = 0) {\r\n\r\n // Create unique client id\r\n if (!localStorage.getItem('support_client_id'))\r\n localStorage.setItem('support_client_id', SystemUtils.generateUUID());\r\n\r\n // Initialize uris\r\n if (serviceUri)\r\n this._serviceUri = serviceUri;\r\n this._servicePrefix = servicePrefix;\r\n if (products)\r\n this._products = products;\r\n\r\n // React to message broadcasting\r\n if (!this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message: any) => {\r\n if (message.id === SupportMessages.LOGIN_CHANGED) {\r\n setTimeout(() => {\r\n this.login(message.data.email, message.data.oauth, message.data.oauthAccessToken).subscribe((r: any) => {\r\n if (r.success) {\r\n this.countUnreadNotifications();\r\n }\r\n });\r\n }, 500);\r\n } else if (message.id === SupportMessages.LOGOUT_COMPLETED ||\r\n message.id === SupportMessages.LOGIN_DISCONNECTED) {\r\n if (!this.loggedIn) {\r\n this.clear();\r\n } else {\r\n this.logout().subscribe({\r\n complete: () => {\r\n this.clear();\r\n }\r\n });\r\n }\r\n } else if (message.id === SupportMessages.NOTIFICATION_READ) {\r\n this.countUnreadNotifications();\r\n }\r\n });\r\n }\r\n\r\n // Eveluate current session storage in case of page refresh (F5)\r\n if (!this.loggedIn && this.getToken()) {\r\n // Auto login\r\n this.loggedIn = true;\r\n\r\n // Start refresh timer\r\n this.enableTokenRefresh();\r\n }\r\n }\r\n\r\n /**\r\n * Set JWT token\r\n * @param token : The token to store\r\n */\r\n private setToken(token: string) {\r\n sessionStorage.setItem('support_jwt', token);\r\n if (token) {\r\n this.enableTokenRefresh();\r\n }\r\n }\r\n\r\n /**\r\n * Enable JWT token auto refresh\r\n */\r\n private enableTokenRefresh() {\r\n if (!this.tokenRefreshTimerSubscription) {\r\n this.tokenRefreshTimer =\r\n timer(this.REFRESH_INTERVAL, this.REFRESH_INTERVAL)\r\n .pipe(\r\n switchMap(() => {\r\n if (this.refreshing || !this.loggedIn) return EMPTY;\r\n this.refreshing = true;\r\n this.refresh().subscribe(\r\n {\r\n error: () => { this.refreshing = false; },\r\n complete: () => { this.refreshing = false; }\r\n });\r\n return EMPTY;\r\n }),\r\n shareReplay(1));\r\n this.tokenRefreshTimerSubscription = this.tokenRefreshTimer.subscribe();\r\n }\r\n }\r\n\r\n /**\r\n * Return current JWT token\r\n * @returns: the string JWT token or string empty if none\r\n */\r\n getToken(): string {\r\n let token = sessionStorage.getItem('support_jwt');\r\n if (token) {\r\n if (token[0] === '\"') token = token.substring(1, token.length - 1);\r\n return token;\r\n }\r\n return '';\r\n }\r\n\r\n\r\n /**\r\n* Perform login \r\n* @param email: the guest email\r\n* @param oauth: the optional open authentication supported\r\n* @param oauthAccessToken: the optional oauth2 access token\r\n* @returns: the login result\r\n*/\r\n login(email: string | null | undefined = null,\r\n oauth: number | null | undefined = null,\r\n oauthAccessToken: string | null | undefined = null) {\r\n this.clear();\r\n this.loggingIn = true;\r\n return this.httpClient\r\n .post<ApiResult<LoginResult>>(\r\n this._serviceUri + '/login',\r\n {\r\n user: oauth > 0 ? null : email,\r\n clientId: localStorage.getItem(\"support_client_id\"),\r\n OAUTH: oauth\r\n },\r\n {\r\n headers:\r\n !oauth\r\n ? new HttpHeaders()\r\n : new HttpHeaders()\r\n .set(\"Authorization\", oauthAccessToken)\r\n })\r\n .pipe(\r\n catchError((err) => {\r\n this.loggingIn = false;\r\n return throwError(() => err);\r\n }),\r\n map((r: ApiResult<LoginResult>) => {\r\n this.loggingIn = false;\r\n if (r.success) {\r\n this.products = this.products;\r\n this.productModules = this.productModules;\r\n return this.handleLoginResult(r);\r\n }\r\n return r;\r\n })\r\n );\r\n\r\n return null;\r\n }\r\n\r\n\r\n /**\r\n * Handle login result\r\n * @param loginResult : the current login result\r\n * @returns: the final login result\r\n */\r\n private handleLoginResult(\r\n loginResult: ApiResult<LoginResult>\r\n ): ApiResult<LoginResult> {\r\n if (loginResult.success) {\r\n // Store access token\r\n this.setToken(loginResult.value.token);\r\n\r\n this._loginInfo = loginResult.value.context;\r\n this._loggedIn = true;\r\n }\r\n return loginResult;\r\n }\r\n\r\n /**\r\n * Perform logout\r\n */\r\n logout() {\r\n return this.httpClient\r\n .post<any>(this._serviceUri + '/logout', {}).pipe(\r\n map((r: any) => { return r; }),\r\n catchError((_e) => {\r\n this.clear();\r\n return of([]);\r\n }));\r\n\r\n }\r\n\r\n /**\r\n * Reset login refresh timer and logins state\r\n */\r\n reset() {\r\n // Clear subscriptions\r\n if (this.tokenRefreshTimerSubscription) {\r\n this.tokenRefreshTimerSubscription.unsubscribe();\r\n this.tokenRefreshTimerSubscription = null;\r\n }\r\n this.tokenRefreshTimer = null;\r\n\r\n // Clear login info\r\n this._loginInfo = null;\r\n this._loggedIn = false;\r\n }\r\n\r\n /**\r\n * Clear login data\r\n */\r\n clear() {\r\n // Reset login\r\n this.reset();\r\n\r\n // Clear local storage\r\n sessionStorage.removeItem('support_jwt');\r\n }\r\n\r\n /**\r\n * Perform token refresh\r\n */\r\n private refresh() {\r\n return this.httpClient.post<ApiResult<LoginResult>>(\r\n this._serviceUri + '/refresh', {}\r\n ).pipe(map((r: ApiResult<LoginResult>) => {\r\n // Update token\r\n this.setToken(r.value.token);\r\n }));\r\n }\r\n\r\n /**\r\n * Navigate to support service\r\n */\r\n open() {\r\n let uri = this.serviceUri ?? '';\r\n if (uri.endsWith('/api'))\r\n uri = uri.substring(0, uri.length - 4)\r\n window.open(uri);\r\n }\r\n\r\n ////\r\n // NOTIFICATIONS\r\n ////\r\n\r\n /**\r\n * Count unread notifications\r\n */\r\n countUnreadNotifications() {\r\n this.httpClient.get<ApiResult<any>>(\r\n this._serviceUri + '/notifications/count-unread/?products=' + (this.products ?? 0) + \"&modules=\" + (this.productModules ?? 0)\r\n ).subscribe((r: any) => {\r\n if (r.success) {\r\n this._unreadNotifications = r.value > 0 ? r.value : null\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Query notifications\r\n * @param params: query parameters\r\n */\r\n queryNotifications(params: SupportNotificationsSearchParams) {\r\n params.products = this.products ?? 0;\r\n params.productModules = this.productModules ?? 0;\r\n return this.httpClient.post<ApiResult<any>>(\r\n this._serviceUri + '/notifications',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve a notification\r\n * @param id: the notification id\r\n */\r\n getNotification(id: number) {\r\n return this.httpClient.get<ApiResult<any>>(\r\n this._serviceUri +\r\n '/notifications/' +\r\n id\r\n );\r\n }\r\n\r\n /**\r\n * Mark a group of notifications as read\r\n * @param ids: the array of notification's ids to set as read\r\n */\r\n markNotifications(params: any) {\r\n return this.httpClient.post<ApiResult<any>>(\r\n this._serviceUri + '/notifications/mark',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Download a notification document\r\n * @param documentId : the notification document id\r\n */\r\n dowloadNotificationDocument(documentId: number) {\r\n return this.httpClient.get(\r\n this._serviceUri + '/documents/download/' + documentId,\r\n { responseType: 'blob' }\r\n );\r\n }\r\n}\r\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { Observable, catchError, throwError } from 'rxjs';\r\nimport { SupportService } from '../services/support.service';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\n\r\n@Injectable()\r\nexport class SupportJwtAuthInterceptor implements HttpInterceptor {\r\n\r\n private supportService = inject(SupportService);\r\n private dialogService = inject(DialogService);\r\n \r\n intercept(\r\n request: HttpRequest<any>,\r\n next: HttpHandler\r\n ): Observable<HttpEvent<any>> {\r\n // Add width-credentials\r\n request = request.clone({ withCredentials: true });\r\n return next.handle(this.addTokenToRequest(request))\r\n .pipe(\r\n catchError((err: any) => {\r\n if (request.url.startsWith(this.supportService.serviceUri)) {\r\n // Get the message\r\n let message = err.error?.message || err.message || \"Impossibile eseguire l'operazione richiesta.\";\r\n let invalidSession = err.status === 401;\r\n switch (err.status) {\r\n case 0:\r\n case 500:\r\n case 502:\r\n case 503:\r\n case 504:\r\n message = null; // No messages\r\n break;\r\n case 403:\r\n message = \"<p>Non hai i permessi necessari per eseguire l'operazione richiesta.</p>\";\r\n break;\r\n default:\r\n message = '<p>' + message.replaceAll('\\r\\n', '</p><p>') + '</p>';\r\n break;\r\n }\r\n // Display message\r\n if (message) {\r\n setTimeout(() => {\r\n this.dialogService.error(message, null, 'Errore in ARS Support', 'Ok', 500, invalidSession ? 5000 : null).afterClosed().subscribe(() => {\r\n if (invalidSession) {\r\n if (this.supportService.loggedIn) {\r\n this.supportService.reset();\r\n }\r\n }\r\n });\r\n }, 250);\r\n }\r\n }\r\n return throwError(() => err);\r\n }));\r\n }\r\n\r\n\r\n /**\r\n * Add token to request\r\n * @param request : the request\r\n * @param token: the token or null to use curre3nt\r\n */\r\n private addTokenToRequest(\r\n request: HttpRequest<any>,\r\n token: string = null\r\n ): HttpRequest<any> {\r\n if (request.url.startsWith(this.supportService.serviceUri)) {\r\n if (!token) token = this.supportService.getToken();\r\n if (token) {\r\n return request.clone({\r\n setHeaders: {\r\n Authorization: 'Bearer ' + token,\r\n 'ngsw-bypass': 'ngsw-bypass'\r\n },\r\n });\r\n }\r\n }\r\n return request;\r\n }\r\n\r\n}\r\n","import { HTTP_INTERCEPTORS } from '@angular/common/http';\r\nimport { NgModule } from '@angular/core';\r\nimport { SupportJwtAuthInterceptor as SupportAuthInterceptor } from './interceptors/auth.interceptor';\r\n\r\n@NgModule({\r\n providers: [ \r\n { provide: HTTP_INTERCEPTORS, useClass: SupportAuthInterceptor, multi: true }, \r\n ]\r\n})\r\nexport class ArsSupportCommonModule {}\r\n","\r\nexport interface SupportNotificationsSearchParams {\r\n any?: string | null;\r\n products?: number | null;\r\n productModules?: number | null;\r\n first?: number | null;\r\n count?: number | null;\r\n}\r\n\r\nexport interface SupportNotificationsInfo {\r\n unread?: number | null;\r\n}\r\n\r\nexport enum SupportProduct {\r\n Clipper = 1,\r\n Evolution = 1 << 1,\r\n DGInfo = 1 << 2\r\n}\r\n\r\nexport enum SupportProductModule {\r\n EvoFormazione = 1,\r\n EvoDPI = 1 << 1,\r\n EvoSorveglianzaSanitaria = 1 << 2,\r\n EvoRegistroEScadenzario = 1 << 3,\r\n EvoAttrezzatureEImpianti = 1 << 4,\r\n EvoMonitoraggio = 1 << 5,\r\n EvoBollettino = 1 << 6,\r\n DgiADR = 1 << 7,\r\n DgiRID = 1 << 8,\r\n DgiIMDG = 1 << 9,\r\n DgiCLP = 1 << 10,\r\n}\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './common/common.module';\r\nexport * from './common/messages';\r\nexport * from './common/definitions';\r\nexport * from './common/services/support.service';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["catchError","SupportAuthInterceptor"],"mappings":";;;;;;;;AAAa,MAAA,eAAe,GAAG;AAC7B;;AAEG;;AAGH,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,eAAe,EAAE,0BAA0B;AAC3C,IAAA,kBAAkB,EAAE,6BAA6B;AACjD,IAAA,gBAAgB,EAAE,2BAA2B;;AAG7C,IAAA,iBAAiB,EAAE,4BAA4B;;;MCApC,cAAc,CAAA;AAH3B,IAAA,WAAA,GAAA;AAKmB,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,GAAG,EAAE,CAAC;AAEvC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC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,CAAA,CAAA,GAAA,yBAAgC,CAAA;AAChC,IAAA,oBAAA,CAAA,oBAAA,CAAA,0BAAA,CAAA,GAAA,EAAA,CAAA,GAAA,0BAAiC,CAAA;AACjC,IAAA,oBAAA,CAAA,oBAAA,CAAA,iBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,iBAAwB,CAAA;AACxB,IAAA,oBAAA,CAAA,oBAAA,CAAA,eAAA,CAAA,GAAA,EAAA,CAAA,GAAA,eAAsB,CAAA;AACtB,IAAA,oBAAA,CAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,GAAA,CAAA,GAAA,QAAe,CAAA;AACf,IAAA,oBAAA,CAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,GAAA,CAAA,GAAA,QAAe,CAAA;AACf,IAAA,oBAAA,CAAA,oBAAA,CAAA,SAAA,CAAA,GAAA,GAAA,CAAA,GAAA,SAAgB,CAAA;AAChB,IAAA,oBAAA,CAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,IAAA,CAAA,GAAA,QAAgB,CAAA;AAClB,CAAC,EAZW,oBAAoB,KAApB,oBAAoB,GAY/B,EAAA,CAAA,CAAA;;AC/BD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"arsedizioni-ars-utils-support.common.mjs","sources":["../../../projects/ars-utils/support.common/common/messages.ts","../../../projects/ars-utils/support.common/common/services/support.service.ts","../../../projects/ars-utils/support.common/common/interceptors/auth.interceptor.ts","../../../projects/ars-utils/support.common/common/common.module.ts","../../../projects/ars-utils/support.common/common/definitions.ts","../../../projects/ars-utils/support.common/public_api.ts","../../../projects/ars-utils/support.common/arsedizioni-ars-utils-support.common.ts"],"sourcesContent":["export const SupportMessages = {\r\n /**\r\n * Messages\r\n */\r\n\r\n // Login\r\n LOGIN_CHANGED: '§support-login-changed',\r\n LOGIN_COMPLETED: '§support-login-completed',\r\n LOGIN_DISCONNECTED: '§support-login-disconnected',\r\n LOGOUT_COMPLETED: '§support-logout-completed',\r\n\r\n // Notifications\r\n NOTIFICATION_READ: '§support-notification-read',\r\n};\r\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Injectable, OnDestroy, inject } from '@angular/core';\r\nimport { ApiResult, BroadcastService, LoginInfo, LoginResult, SystemUtils } from '@arsedizioni/ars-utils/core';\r\nimport { EMPTY, Observable, of, Subscription, throwError, timer } from 'rxjs';\r\nimport { catchError, map, shareReplay, switchMap } from 'rxjs/operators';\r\nimport { SupportMessages } from '../messages';\r\nimport { SupportNotificationInfo, SupportNotificationsMarkParams, SupportNotificationsSearchParams, SupportNotificationsSearchResult, SupportProduct, SupportProductModule } from '../definitions';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SupportService implements OnDestroy {\r\n\r\n private readonly REFRESH_INTERVAL = 60000 * 50; //50 min\r\n\r\n private httpClient = inject(HttpClient);\r\n private broadcastService = inject(BroadcastService);\r\n\r\n private refreshing: boolean = false;\r\n private tokenRefreshTimer?: Observable<number | void> | null = null;\r\n private tokenRefreshTimerSubscription?: Subscription | null = null;\r\n private broadcastServiceSubscription?: Subscription | null = null;\r\n\r\n\r\n private _loginInfo: LoginInfo = null;\r\n get loginInfo(): LoginInfo { return this._loginInfo };\r\n set loginInfo(value: LoginInfo) {\r\n this._loginInfo = value;\r\n }\r\n\r\n private _loggedIn: boolean = false;\r\n get loggedIn(): boolean {\r\n return this._loggedIn;\r\n }\r\n set loggedIn(value: boolean) {\r\n this._loggedIn = value;\r\n }\r\n\r\n private _loggingIn: boolean = false;\r\n get loggingIn(): boolean {\r\n return this._loggingIn;\r\n }\r\n set loggingIn(value: boolean) {\r\n this._loggingIn = value;\r\n }\r\n\r\n private _serviceUri: string = \"https://support.arsedizioni.it\"\r\n get serviceUri(): string {\r\n return this._serviceUri;\r\n }\r\n set serviceUri(value: string) {\r\n this._serviceUri = value;\r\n }\r\n private _servicePrefix: string = \"\"\r\n get servicePrefix(): string {\r\n return this._servicePrefix;\r\n }\r\n set servicePrefix(value: string) {\r\n this._servicePrefix = value;\r\n }\r\n\r\n private _products: SupportProduct;\r\n get products(): SupportProduct {\r\n return this._products;\r\n }\r\n set products(value: SupportProduct) {\r\n this._products = value;\r\n }\r\n\r\n private _productModules: SupportProductModule;\r\n get productModules(): SupportProductModule {\r\n return this._productModules;\r\n }\r\n set productModules(value: SupportProductModule) {\r\n this._productModules = value;\r\n }\r\n\r\n private _unreadNotifications: number = null;\r\n get unreadNotifications(): number {\r\n return this._unreadNotifications;\r\n }\r\n\r\n ngOnDestroy() {\r\n // Clean-up\r\n if (this.tokenRefreshTimerSubscription){\r\n this.tokenRefreshTimerSubscription.unsubscribe();\r\n }\r\n if (this.broadcastServiceSubscription){ \r\n this.broadcastServiceSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n /**\r\n * Initialize service\r\n * @param serviceUri : the service uri\r\n * @param servicePrefix : the service prefix used to manage local storage \r\n * @param products: the supported products\r\n */\r\n initialize(\r\n serviceUri: string = null,\r\n servicePrefix: string = null,\r\n products: number = 0) {\r\n\r\n // Create unique client id\r\n if (!localStorage.getItem('support_client_id'))\r\n localStorage.setItem('support_client_id', SystemUtils.generateUUID());\r\n\r\n // Initialize uris\r\n if (serviceUri)\r\n this._serviceUri = serviceUri;\r\n this._servicePrefix = servicePrefix;\r\n if (products)\r\n this._products = products;\r\n\r\n // React to message broadcasting\r\n if (!this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message: any) => {\r\n if (message.id === SupportMessages.LOGIN_CHANGED) {\r\n setTimeout(() => {\r\n this.login(message.data.email, message.data.oauth, message.data.oauthAccessToken).subscribe(r => {\r\n if (r.success) {\r\n this.countUnreadNotifications();\r\n }\r\n });\r\n }, 500);\r\n } else if (message.id === SupportMessages.LOGOUT_COMPLETED ||\r\n message.id === SupportMessages.LOGIN_DISCONNECTED) {\r\n if (!this.loggedIn) {\r\n this.clear();\r\n } else {\r\n this.logout().subscribe({\r\n complete: () => {\r\n this.clear();\r\n }\r\n });\r\n }\r\n } else if (message.id === SupportMessages.NOTIFICATION_READ) {\r\n this.countUnreadNotifications();\r\n }\r\n });\r\n }\r\n\r\n // Eveluate current session storage in case of page refresh (F5)\r\n if (!this.loggedIn && this.getToken()) {\r\n // Auto login\r\n this.loggedIn = true;\r\n\r\n // Start refresh timer\r\n this.enableTokenRefresh();\r\n }\r\n }\r\n\r\n /**\r\n * Set JWT token\r\n * @param token : The token to store\r\n */\r\n private setToken(token: string) {\r\n sessionStorage.setItem('support_jwt', token);\r\n if (token) {\r\n this.enableTokenRefresh();\r\n }\r\n }\r\n\r\n /**\r\n * Enable JWT token auto refresh\r\n */\r\n private enableTokenRefresh() {\r\n if (!this.tokenRefreshTimerSubscription) {\r\n this.tokenRefreshTimer =\r\n timer(this.REFRESH_INTERVAL, this.REFRESH_INTERVAL)\r\n .pipe(\r\n switchMap(() => {\r\n if (this.refreshing || !this.loggedIn) return EMPTY;\r\n this.refreshing = true;\r\n this.refresh().subscribe(\r\n {\r\n error: () => { this.refreshing = false; },\r\n complete: () => { this.refreshing = false; }\r\n });\r\n return EMPTY;\r\n }),\r\n shareReplay(1));\r\n this.tokenRefreshTimerSubscription = this.tokenRefreshTimer.subscribe();\r\n }\r\n }\r\n\r\n /**\r\n * Return current JWT token\r\n * @returns: the string JWT token or string empty if none\r\n */\r\n getToken(): string {\r\n let token = sessionStorage.getItem('support_jwt');\r\n if (token) {\r\n if (token[0] === '\"') token = token.substring(1, token.length - 1);\r\n return token;\r\n }\r\n return '';\r\n }\r\n\r\n\r\n /**\r\n* Perform login \r\n* @param email: the guest email\r\n* @param oauth: the optional open authentication supported\r\n* @param oauthAccessToken: the optional oauth2 access token\r\n* @returns: the login result\r\n*/\r\n login(email: string | null | undefined = null,\r\n oauth: number | null | undefined = null,\r\n oauthAccessToken: string | null | undefined = null) {\r\n this.clear();\r\n this.loggingIn = true;\r\n return this.httpClient\r\n .post<ApiResult<LoginResult>>(\r\n this._serviceUri + '/login',\r\n {\r\n user: oauth > 0 ? null : email,\r\n clientId: localStorage.getItem(\"support_client_id\"),\r\n OAUTH: oauth\r\n },\r\n {\r\n headers:\r\n !oauth\r\n ? new HttpHeaders()\r\n : new HttpHeaders()\r\n .set(\"Authorization\", oauthAccessToken)\r\n })\r\n .pipe(\r\n catchError((err) => {\r\n this.loggingIn = false;\r\n return throwError(() => err);\r\n }),\r\n map((r: ApiResult<LoginResult>) => {\r\n this.loggingIn = false;\r\n if (r.success) {\r\n this.products = this.products;\r\n this.productModules = this.productModules;\r\n return this.handleLoginResult(r);\r\n }\r\n return r;\r\n })\r\n );\r\n\r\n return null;\r\n }\r\n\r\n\r\n /**\r\n * Handle login result\r\n * @param loginResult : the current login result\r\n * @returns: the final login result\r\n */\r\n private handleLoginResult(\r\n loginResult: ApiResult<LoginResult>\r\n ): ApiResult<LoginResult> {\r\n if (loginResult.success) {\r\n // Store access token\r\n this.setToken(loginResult.value.token);\r\n\r\n this._loginInfo = loginResult.value.context;\r\n this._loggedIn = true;\r\n }\r\n return loginResult;\r\n }\r\n\r\n /**\r\n * Perform logout\r\n */\r\n logout() {\r\n return this.httpClient\r\n .post<any>(this._serviceUri + '/logout', {}).pipe(\r\n map(r => { return r; }),\r\n catchError((_e) => {\r\n this.clear();\r\n return of([]);\r\n }));\r\n\r\n }\r\n\r\n /**\r\n * Reset login refresh timer and logins state\r\n */\r\n reset() {\r\n // Clear subscriptions\r\n if (this.tokenRefreshTimerSubscription) {\r\n this.tokenRefreshTimerSubscription.unsubscribe();\r\n this.tokenRefreshTimerSubscription = null;\r\n }\r\n this.tokenRefreshTimer = null;\r\n\r\n // Clear login info\r\n this._loginInfo = null;\r\n this._loggedIn = false;\r\n }\r\n\r\n /**\r\n * Clear login data\r\n */\r\n clear() {\r\n // Reset login\r\n this.reset();\r\n\r\n // Clear local storage\r\n sessionStorage.removeItem('support_jwt');\r\n }\r\n\r\n /**\r\n * Perform token refresh\r\n */\r\n private refresh() {\r\n return this.httpClient.post<ApiResult<LoginResult>>(\r\n this._serviceUri + '/refresh', {}\r\n ).pipe(map((r: ApiResult<LoginResult>) => {\r\n // Update token\r\n this.setToken(r.value.token);\r\n }));\r\n }\r\n\r\n /**\r\n * Navigate to support service\r\n */\r\n open() {\r\n let uri = this.serviceUri ?? '';\r\n if (uri.endsWith('/api'))\r\n uri = uri.substring(0, uri.length - 4)\r\n window.open(uri);\r\n }\r\n\r\n ////\r\n // NOTIFICATIONS\r\n ////\r\n\r\n /**\r\n * Count unread notifications\r\n */\r\n countUnreadNotifications() {\r\n this.httpClient.get<ApiResult<number>>(\r\n this._serviceUri + '/notifications/count-unread/?products=' + (this.products ?? 0) + \"&modules=\" + (this.productModules ?? 0)\r\n ).subscribe(r => {\r\n if (r.success) {\r\n this._unreadNotifications = r.value > 0 ? r.value : null\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Query notifications\r\n * @param params: query parameters\r\n */\r\n queryNotifications(params: SupportNotificationsSearchParams) {\r\n params.products = this.products ?? 0;\r\n params.productModules = this.productModules ?? 0;\r\n return this.httpClient.post<ApiResult<SupportNotificationsSearchResult>>(\r\n this._serviceUri + '/notifications',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve a notification\r\n * @param id: the notification id\r\n */\r\n getNotification(id: number) {\r\n return this.httpClient.get<ApiResult<SupportNotificationInfo>>(\r\n this._serviceUri +\r\n '/notifications/' +\r\n id\r\n );\r\n }\r\n\r\n /**\r\n * Mark a group of notifications as read\r\n * @param ids: the array of notification's ids to set as read\r\n */\r\n markNotifications(params: SupportNotificationsMarkParams) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/notifications/mark',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Download a notification document\r\n * @param documentId : the notification document id\r\n */\r\n dowloadNotificationDocument(documentId: number) {\r\n return this.httpClient.get(\r\n this._serviceUri + '/documents/download/' + documentId,\r\n { responseType: 'blob' }\r\n );\r\n }\r\n}\r\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { Observable, catchError, throwError } from 'rxjs';\r\nimport { SupportService } from '../services/support.service';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\n\r\n@Injectable()\r\nexport class SupportJwtAuthInterceptor implements HttpInterceptor {\r\n\r\n private supportService = inject(SupportService);\r\n private dialogService = inject(DialogService);\r\n \r\n intercept(\r\n request: HttpRequest<any>,\r\n next: HttpHandler\r\n ): Observable<HttpEvent<any>> {\r\n // Add width-credentials\r\n request = request.clone({ withCredentials: true });\r\n return next.handle(this.addTokenToRequest(request))\r\n .pipe(\r\n catchError((err: any) => {\r\n if (request.url.startsWith(this.supportService.serviceUri)) {\r\n // Get the message\r\n let message = err.error?.message || err.message || \"Impossibile eseguire l'operazione richiesta.\";\r\n let invalidSession = err.status === 401;\r\n switch (err.status) {\r\n case 0:\r\n case 500:\r\n case 502:\r\n case 503:\r\n case 504:\r\n message = null; // No messages\r\n break;\r\n case 403:\r\n message = \"<p>Non hai i permessi necessari per eseguire l'operazione richiesta.</p>\";\r\n break;\r\n default:\r\n message = '<p>' + message.replaceAll('\\r\\n', '</p><p>') + '</p>';\r\n break;\r\n }\r\n // Display message\r\n if (message) {\r\n setTimeout(() => {\r\n this.dialogService.error(message, null, 'Errore in ARS Support', 'Ok', 500, invalidSession ? 5000 : null).afterClosed().subscribe(() => {\r\n if (invalidSession) {\r\n if (this.supportService.loggedIn) {\r\n this.supportService.reset();\r\n }\r\n }\r\n });\r\n }, 250);\r\n }\r\n }\r\n return throwError(() => err);\r\n }));\r\n }\r\n\r\n\r\n /**\r\n * Add token to request\r\n * @param request : the request\r\n * @param token: the token or null to use curre3nt\r\n */\r\n private addTokenToRequest(\r\n request: HttpRequest<any>,\r\n token: string = null\r\n ): HttpRequest<any> {\r\n if (request.url.startsWith(this.supportService.serviceUri)) {\r\n if (!token) token = this.supportService.getToken();\r\n if (token) {\r\n return request.clone({\r\n setHeaders: {\r\n Authorization: 'Bearer ' + token,\r\n 'ngsw-bypass': 'ngsw-bypass'\r\n },\r\n });\r\n }\r\n }\r\n return request;\r\n }\r\n\r\n}\r\n","import { HTTP_INTERCEPTORS } from '@angular/common/http';\r\nimport { NgModule } from '@angular/core';\r\nimport { SupportJwtAuthInterceptor as SupportAuthInterceptor } from './interceptors/auth.interceptor';\r\n\r\n@NgModule({\r\n providers: [ \r\n { provide: HTTP_INTERCEPTORS, useClass: SupportAuthInterceptor, multi: true }, \r\n ]\r\n})\r\nexport class ArsSupportCommonModule {}\r\n","\r\nexport interface SupportNotificationsSearchParams {\r\n any?: string | null;\r\n products?: number | null;\r\n productModules?: number | null;\r\n first?: number | null;\r\n count?: number | null;\r\n}\r\n\r\nexport interface SupportNotificationsSearchResult {\r\n interval?: string | null;\r\n items?: SupportNotificationInfo[] | null;\r\n total?: number | null;\r\n}\r\n\r\nexport interface SupportNotificationInfo {\r\n id: number;\r\n products: number;\r\n productNames?: string | null;\r\n productModules?: number | null;\r\n productModuleNames?: string | null;\r\n publishingDate?: Date | null;\r\n title: string;\r\n text: string;\r\n state: number;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n isRead: boolean;\r\n}\r\n\r\nexport interface SupportNotificationsMarkParams {\r\n ids: number[];\r\n unmark: boolean;\r\n}\r\n\r\nexport enum SupportProduct {\r\n Clipper = 1,\r\n Evolution = 1 << 1,\r\n DGInfo = 1 << 2\r\n}\r\n\r\nexport enum SupportProductModule {\r\n EvoFormazione = 1,\r\n EvoDPI = 1 << 1,\r\n EvoSorveglianzaSanitaria = 1 << 2,\r\n EvoRegistroEScadenzario = 1 << 3,\r\n EvoAttrezzatureEImpianti = 1 << 4,\r\n EvoMonitoraggio = 1 << 5,\r\n EvoBollettino = 1 << 6,\r\n DgiADR = 1 << 7,\r\n DgiRID = 1 << 8,\r\n DgiIMDG = 1 << 9,\r\n DgiCLP = 1 << 10,\r\n}\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './common/common.module';\r\nexport * from './common/messages';\r\nexport * from './common/definitions';\r\nexport * from './common/services/support.service';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["catchError","SupportAuthInterceptor"],"mappings":";;;;;;;;AAAa,MAAA,eAAe,GAAG;AAC7B;;AAEG;;AAGH,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,eAAe,EAAE,0BAA0B;AAC3C,IAAA,kBAAkB,EAAE,6BAA6B;AACjD,IAAA,gBAAgB,EAAE,2BAA2B;;AAG7C,IAAA,iBAAiB,EAAE,4BAA4B;;;MCApC,cAAc,CAAA;AAH3B,IAAA,WAAA,GAAA;AAKmB,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,GAAG,EAAE,CAAC;AAEvC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAChC,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAE5C,IAAU,CAAA,UAAA,GAAY,KAAK,CAAC;QAC5B,IAAiB,CAAA,iBAAA,GAAsC,IAAI,CAAC;QAC5D,IAA6B,CAAA,6BAAA,GAAyB,IAAI,CAAC;QAC3D,IAA4B,CAAA,4BAAA,GAAyB,IAAI,CAAC;QAG1D,IAAU,CAAA,UAAA,GAAc,IAAI,CAAC;QAM7B,IAAS,CAAA,SAAA,GAAY,KAAK,CAAC;QAQ3B,IAAU,CAAA,UAAA,GAAY,KAAK,CAAC;QAQ5B,IAAW,CAAA,WAAA,GAAW,gCAAgC,CAAA;QAOtD,IAAc,CAAA,cAAA,GAAW,EAAE,CAAA;QAwB3B,IAAoB,CAAA,oBAAA,GAAW,IAAI,CAAC;AA0T7C,KAAA;IA9WC,IAAI,SAAS,KAAgB,OAAO,IAAI,CAAC,UAAU,CAAA,EAAE;;IACrD,IAAI,SAAS,CAAC,KAAgB,EAAA;AAC5B,QAAA,IAAI,CAAC,UAAU,GAAG,KAAK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