@provoly/dashboard 1.4.35 → 1.4.37
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.
- package/esm2022/lib/core/components/about/about.component.mjs +3 -3
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +21 -6
- package/esm2022/presentation/components/presentation.component.mjs +3 -3
- package/esm2022/widgets/widget-template/component/widget-template.component.mjs +15 -3
- package/fesm2022/provoly-dashboard-presentation.mjs +2 -2
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-template.mjs +14 -2
- package/fesm2022/provoly-dashboard-widgets-widget-template.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +22 -7
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/dashboard/store/dashboard.effects.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-presentation.mjs","sources":["../../../../projects/provoly/dashboard/presentation/components/add-edit-presentation/add-edit-presentation.component.ts","../../../../projects/provoly/dashboard/presentation/components/add-edit-presentation/add-edit-presentation.component.html","../../../../projects/provoly/dashboard/presentation/components/title-presentation/title-presentation.component.ts","../../../../projects/provoly/dashboard/presentation/components/title-presentation/title-presentation.component.html","../../../../projects/provoly/dashboard/presentation/style/css.component.ts","../../../../projects/provoly/dashboard/presentation/components/presentation.component.ts","../../../../projects/provoly/dashboard/presentation/components/presentation.component.html","../../../../projects/provoly/dashboard/presentation/i18n/en.translations.ts","../../../../projects/provoly/dashboard/presentation/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/presentation/presentation.module.ts","../../../../projects/provoly/dashboard/presentation/provoly-dashboard-presentation.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Optional, Output } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport {\n DashboardActions,\n DashboardGridLayout,\n DashboardSelectors,\n GlobalManifest,\n IMetadata,\n ManifestDescription,\n MetadataValue,\n SubscriptionnerDirective,\n ViewMode,\n WidgetPlacementUtils\n} from '@provoly/dashboard';\nimport { BehaviorSubject, combineLatest, Observable, take } from 'rxjs';\nimport { MetadataSelectors, MetaEventType } from '@provoly/dashboard/components/metadata-editor';\nimport { v4 as uuidv4 } from 'uuid';\nimport { PresentationFormValue } from '@provoly/dashboard/toolbox';\n\n@Component({\n selector: 'pry-add-edit-presentation',\n templateUrl: './add-edit-presentation.component.html'\n})\nexport class PryAddEditPresentationComponent extends SubscriptionnerDirective {\n staticManifest$: Observable<GlobalManifest>;\n staticManifest?: GlobalManifest;\n selectedPresentation$ = new BehaviorSubject<ManifestDescription | undefined>(undefined);\n chosenLayout: string = DashboardGridLayout.FULL;\n metadataDefs: IMetadata[] | undefined;\n metadataThemeId: string = '';\n formValue?: Partial<PresentationFormValue>;\n isFormValid = false;\n\n @Input() set selectedPresentation(presentation: ManifestDescription | undefined) {\n this.selectedPresentation$.next(presentation);\n }\n @Input() edition: boolean = false;\n @Input() themePrefix: string | null = null;\n @Input() editionStartUrl: string = '/';\n @Input() mode: 'theme' | 'meta' = 'meta';\n\n @Output() goBack = new EventEmitter<void>();\n\n constructor(\n protected store: Store,\n @Optional() protected router: Router\n ) {\n super();\n this.staticManifest$ = this.store.select(DashboardSelectors.staticManifest);\n this.subscriptions.add(this.staticManifest$.subscribe(manifest => this.staticManifest = manifest));\n this.subscriptions.add(\n combineLatest([this.staticManifest$, this.store.select(DashboardSelectors.gridLayout)]).subscribe(\n ([staticManifest, gridLayout]) => {\n this.chosenLayout =\n this.edition && staticManifest.windows[0]?.grid?.layout !== undefined\n ? staticManifest.windows[0]?.grid?.layout\n : gridLayout;\n }\n )\n );\n this.subscriptions.add(\n this.store.select(MetadataSelectors.metadata).subscribe((metadata) => {\n this.metadataDefs = metadata;\n const metadataTheme = metadata?.find((meta) => meta.name === '_theme');\n if (metadataTheme) {\n this.metadataThemeId = metadataTheme?.id ?? '';\n }\n })\n );\n }\n\n dispatchSave(): ManifestDescription {\n const presentation = {\n ...this.selectedPresentation$.value!,\n id: this.selectedPresentation$.value?.id || uuidv4(),\n ...this.formValue,\n metadata: this.metadata()\n };\n\n this.store.dispatch(\n DashboardActions.saveManifest({\n ...presentation,\n metadata: presentation.metadata?.map((metadata: MetadataValue) => ({\n metadataDefId: metadata.metadataDef.id,\n value: metadata.value\n })),\n manifest: this.edition ? this.staticManifest : this.getNewManifest()\n })\n );\n return presentation;\n }\n\n save() {\n const presentation = this.dispatchSave();\n this.store.dispatch(\n DashboardActions.selectPresentation({\n presentation,\n viewMode: ViewMode.EDITION\n })\n );\n }\n\n configureDashboard(selectedPresentation: ManifestDescription) {\n if (this.isFormValid) {\n this.dispatchSave();\n }\n\n const presentation = {\n ...this.selectedPresentation$.value!,\n ...this.formValue,\n metadata: this.metadata()\n };\n\n if (!this.edition) {\n this.store.dispatch(\n DashboardActions.selectPresentation({\n presentation,\n viewMode: ViewMode.CREATION\n })\n );\n } else {\n this.store.dispatch(\n DashboardActions.loadPresentation({\n presentation,\n viewMode: ViewMode.EDITION\n })\n );\n }\n this.router?.navigateByUrl(this.editionStartUrl);\n }\n\n addMetadata(metadata: MetaEventType) {\n this.store.dispatch(\n DashboardActions.addManifestMetadata({\n presentationId: this.selectedPresentation$.value?.id!,\n metadataId: metadata.metadataId,\n value: metadata.value ?? ''\n })\n );\n }\n\n removeMetadata(metadata: MetaEventType) {\n this.store.dispatch(\n DashboardActions.deleteManifestMetadata({\n presentationId: this.selectedPresentation$.value?.id!,\n metadataId: metadata.metadataId\n })\n );\n }\n\n close() {\n this.goBack.emit();\n }\n\n metadata(): MetadataValue[] {\n return this.mode === 'theme'\n ? !this.formValue?.theme || this.formValue?.theme === ''\n ? []\n : [\n {\n metadataDef: this.metadataDefs!.find((metadata) => metadata.id === this.metadataThemeId)!,\n value: this.formValue.theme ?? ''\n }\n ]\n : this.selectedPresentation$.value?.metadata ?? [];\n }\n\n getNewManifest(): GlobalManifest {\n return {\n windows: [\n {\n widgets: [],\n grid: {\n layout: this.chosenLayout,\n columns: WidgetPlacementUtils.getLayout(this.chosenLayout)?.columns,\n rows: WidgetPlacementUtils.getLayout(this.chosenLayout)?.rows\n }\n }\n ]\n };\n }\n}\n","<div class=\"o-manifest-layout\">\n <div class=\"o-manifest-layout__toolbox -justify-space-between -align-center\">\n <button class=\"a-btn a-btn--secondary\" type=\"button\" (click)=\"close()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" type=\"button\" (click)=\"save()\" [disabled]=\"!isFormValid\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content--presentation\">\n <h2 class=\"a-h2\">{{ '@pry.presentation.add' + '.pageTitle' | i18n }}</h2>\n <div class=\"o-presentation-form-wrapper\">\n <div class=\"u-display-flex -column\">\n <pry-presentation-form\n mode=\"theme\"\n [selectedPresentation]=\"(selectedPresentation$ | async) ?? undefined\"\n (formValue)=\"formValue = $event\"\n (isFormValid)=\"isFormValid = $event\"\n [mode]=\"mode\"\n [themePrefix]=\"themePrefix\"\n ></pry-presentation-form>\n <div class=\"m-form-label-field -width-full m-form-label-field--inline\">\n <label class=\"a-label\">{{ '@pry.presentation.form.grid' | i18n }}</label>\n <span class=\"a-label\">{{ '@pry.toolbox.layout.' + this.chosenLayout | i18n }}</span>\n @if (!edition) {\n <pry-select-grid-layout></pry-select-grid-layout>\n }\n </div>\n </div>\n @if (mode === 'meta') {\n @if (selectedPresentation$ | async; as selectedPresentation) {\n <div class=\"o-presentation__metadata-editor\">\n <pry-metadata-editor\n [targetId]=\"selectedPresentation.id\"\n [isModification]=\"true\"\n [metadata]=\"selectedPresentation.metadata ?? []\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </div>\n }\n }\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"configureDashboard(selectedPresentation$.value!)\"\n [disabled]=\"!isFormValid\"\n >\n {{ '@pry.presentation.configuration' | i18n }}\n </button>\n </div>\n</div>\n","import { Component } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { DashboardSelectors, ManifestDescription } from '@provoly/dashboard';\n\n@Component({\n selector: 'pry-title-presentation',\n templateUrl: './title-presentation.component.html'\n})\nexport class PryTitlePresentationComponent {\n currentPresentation$: Observable<ManifestDescription | undefined>;\n\n constructor(private store: Store) {\n this.currentPresentation$ = this.store.select(DashboardSelectors.currentManifest);\n }\n}\n","@if (currentPresentation$ | async; as currentPresentation) {\n <div class=\"m-presentation-title u-display-flex -gap-10\">\n <h1 class=\"a-h2 m-presentation-title__text\">\n {{ currentPresentation.name || ('@pry.header.noCurrentPresentation' | i18n) }}\n </h1>\n @if (!!currentPresentation.description) {\n <div\n class=\"m-presentation-title__description m-info-icon a-tooltip -tooltip-width-lg align-center\"\n [attr.data-tooltip]=\"currentPresentation.description\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n }\n </div>\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-presentation-css',\n template: '',\n styleUrls: ['./_o-pry-new-presentation.scss', './_o-pry-presentation.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryPresentationCssComponent {}\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n Component,\n ElementRef,\n Inject,\n Input,\n NgZone,\n Optional,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport {\n DashboardActions,\n DashboardGridLayout,\n DashboardSelectors,\n ManifestDescription,\n PRY_ACCESS_TOKEN,\n PryAccessRightsShareModalComponent,\n PryBaseAccess,\n PryDialogService,\n PryTitleService,\n SubscriptionnerDirective,\n ViewMode\n} from '@provoly/dashboard';\nimport { BehaviorSubject, combineLatest, map, Observable, of, startWith } from 'rxjs';\nimport { v4 } from 'uuid';\n\ninterface ManifestDescriptionWithTheme extends ManifestDescription {\n theme: string | undefined;\n}\n\n@Component({\n selector: 'pry-presentation',\n templateUrl: './presentation.component.html'\n})\nexport class PryPresentationComponent extends SubscriptionnerDirective {\n manifests$: Observable<ManifestDescriptionWithTheme[]>;\n search$ = new BehaviorSubject('');\n filteredPresentations$: Observable<ManifestDescriptionWithTheme[]>;\n\n selectedPresentation$ = new BehaviorSubject<ManifestDescription | undefined>(undefined);\n selectedMode: ViewMode = ViewMode.CATALOG;\n ViewMode = ViewMode;\n\n @ViewChild('modalActions', { read: TemplateRef }) templateModalActions!: TemplateRef<any>;\n @ViewChild('openModal') openModal!: ElementRef<HTMLButtonElement>;\n overlayRef?: OverlayRef;\n\n @Input() editionStartUrl: string = '/';\n @Input() consultStartUrl: string = '/';\n @Input() meAsOwner?: string;\n @Input() themePrefix: string | null = null;\n @Input() mode: 'theme' | 'meta' = 'meta';\n @Input() hideToolbox = false;\n @Input() showTheme = true;\n\n listOfManifests$ = new BehaviorSubject<ManifestDescription[] | null>(null);\n @Input() set listOfManifests(manifests: ManifestDescription[] | null) {\n this.listOfManifests$.next(Array.isArray(manifests) ? manifests : null);\n }\n\n inputSearch$ = new BehaviorSubject('');\n @Input() set search(query: string) {\n this.inputSearch$.next(query);\n }\n\n constructor(\n protected store: Store<any>,\n protected overlay: Overlay,\n protected viewContainerRef: ViewContainerRef,\n protected router: Router,\n protected titleService: PryTitleService,\n protected activatedRoute: ActivatedRoute,\n protected ngZone: NgZone,\n @Optional() @Inject(PRY_ACCESS_TOKEN) private access: PryBaseAccess,\n private dialog: PryDialogService\n ) {\n super();\n this.subscriptions.add(\n this.activatedRoute.queryParams.subscribe((params) => {\n if (params['create']) {\n this.creation();\n }\n })\n );\n this.store.dispatch(DashboardActions.fetchManifestsList());\n this.manifests$ = combineLatest([\n this.store\n .select(DashboardSelectors.manifestsList)\n .pipe(\n map((manifestList) =>\n [...manifestList].sort((a, b) =>\n a.modificationDate ? b.modificationDate.localeCompare(a.modificationDate) : 1\n )\n )\n ),\n this.listOfManifests$\n ]).pipe(\n map(([dynamics, statics]) => statics ?? dynamics),\n map((manifests) =>\n manifests.map(\n (manifest) =>\n ({\n ...manifest,\n theme: manifest.metadata?.find((meta) => meta.metadataDef.name === '_theme')?.value\n }) as ManifestDescriptionWithTheme\n )\n )\n );\n\n this.filteredPresentations$ = combineLatest([\n this.manifests$,\n this.search$,\n this.inputSearch$.pipe(startWith(''))\n ]).pipe(\n map(([presentations, search, inputSearch]) =>\n presentations.filter((presentations) => {\n const [name, description] = [presentations.name.toLowerCase(), presentations.description?.toLowerCase()];\n const [searchQuery, inputSearchQuery] = [search?.toLowerCase(), inputSearch?.toLowerCase()];\n return !!searchQuery || !!inputSearchQuery\n ? (!!searchQuery && (name.includes(searchQuery) || description?.includes(searchQuery))) ||\n (!!inputSearchQuery && (name.includes(inputSearchQuery) || description?.includes(inputSearchQuery)))\n : true;\n })\n )\n );\n this.subscriptions.add(\n this.store.select(DashboardSelectors.presentation).subscribe((presentation) => {\n this.selectedMode = presentation?.viewMode ?? this.ViewMode.CATALOG;\n this.selectedPresentation$.next(presentation.current);\n })\n );\n this.titleService.changeTitle('@pry.presentation.title');\n }\n\n closeRestitution() {\n this.selectedPresentation$.next(undefined);\n this.selectedMode = ViewMode.CATALOG;\n this.store.dispatch(DashboardActions.selectPresentation({ presentation: undefined, viewMode: ViewMode.CATALOG }));\n }\n\n fetch(presentation: ManifestDescription) {\n this.store.dispatch(DashboardActions.loadPresentation({ presentation, viewMode: ViewMode.CONSULT }));\n this.ngZone.run(() => {\n this.router?.navigateByUrl(this.consultStartUrl);\n });\n }\n\n creation() {\n this.selectedMode = ViewMode.CREATION;\n this.store.dispatch(DashboardActions.updateManifest({ manifest: { windows: [] }, selectedIds: [] }));\n const newPresentation = {\n presentation: {\n id: v4(),\n name: '',\n accessRightsByGroup: {} as { [key: string]: string[] },\n owner: true\n } as ManifestDescription,\n viewMode: ViewMode.CREATION\n };\n this.store.dispatch(DashboardActions.selectPresentation(newPresentation));\n this.store.dispatch(DashboardActions.setGridLayout({ layout: DashboardGridLayout.FULL }));\n this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.CREATION }));\n }\n\n edit(presentation: ManifestDescription) {\n this.selectedMode = ViewMode.EDITION;\n this.selectedPresentation$.next(presentation);\n this.titleService.changeTitle(presentation.name);\n this.store.dispatch(DashboardActions.selectPresentation({ presentation, viewMode: ViewMode.EDITION }));\n this.store.dispatch(DashboardActions.fetchStaticManifest({ id: presentation.id }));\n this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.EDITION }));\n this.overlayRef?.dispose();\n this.overlayRef = undefined;\n }\n\n delete(id: string) {\n this.store.dispatch(DashboardActions.confirmManifestDeletion({ id }));\n this.toggleModalActions();\n }\n\n toggleModalActions(presentation?: ManifestDescription | null, moreButton?: HTMLButtonElement) {\n if (!this.overlayRef && presentation) {\n this.selectedPresentation$.next(presentation);\n this.store.dispatch(DashboardActions.selectPresentation({ presentation, viewMode: ViewMode.CATALOG }));\n this.store.dispatch(DashboardActions.loadManifest({ id: presentation.id }));\n this.overlayRef = this.overlay.create(\n new OverlayConfig({\n hasBackdrop: true,\n panelClass: ['m-context-menu-wrapper'],\n backdropClass: 'backdrop'\n })\n );\n this.overlayRef.backdropClick().subscribe(() => this.toggleModalActions(presentation));\n this.overlayRef.attach(new TemplatePortal(this.templateModalActions, this.viewContainerRef));\n const contextMenu = document.querySelector('div.m-context-menu') as HTMLDivElement;\n if (!!contextMenu && moreButton) {\n const rect = moreButton.getBoundingClientRect();\n contextMenu.style.minWidth = '185px';\n contextMenu.style.left = (rect?.left ?? 0) - (contextMenu?.clientWidth ?? 0) + 23 + 'px';\n contextMenu.style.top = (rect?.top ?? 0) + 30 + 'px';\n }\n } else {\n this.overlayRef?.dispose();\n this.overlayRef = undefined;\n this.selectedPresentation$.next(undefined);\n }\n }\n\n toggleModal(presentation?: ManifestDescription | null) {\n if (presentation) {\n this.selectedPresentation$.next(presentation);\n this.store.dispatch(DashboardActions.selectPresentation({ presentation, viewMode: ViewMode.CATALOG }));\n this.toggleModalActions();\n this.dialog.open(PryAccessRightsShareModalComponent, {\n hasBackdrop: true,\n panelClass: ['o-modal-wrapper'],\n backdropClass: 'backdrop',\n data: { manifest: presentation }\n });\n }\n }\n\n editContent(selectedPresentation: ManifestDescription) {\n this.store.dispatch(\n DashboardActions.loadPresentation({ presentation: selectedPresentation, viewMode: ViewMode.EDITION })\n );\n this.ngZone.run(() => {\n this.router?.navigateByUrl(this.consultStartUrl);\n });\n }\n\n isPrivate(presentation: ManifestDescription) {\n return Object.keys(presentation.accessRightsByGroup).length === 0;\n }\n\n canModify$(presentation: ManifestDescription) {\n return !this.access ? of(false) : this.access.canModifyPresentation(presentation);\n }\n}\n","<pry-presentation-css></pry-presentation-css>\n<div class=\"o-manifest-layout\">\n @switch (selectedMode) {\n @default {\n <div class=\"o-manifest-layout__toolbox\" [class.-u-hidden]=\"hideToolbox\">\n <button\n class=\"a-btn a-btn--primary\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"o-manifest-layout__toolbox__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.presentation.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n <pry-icon class=\"search-icon\" iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.title' | i18n }}</h1>\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n @for (presentation of filteredPresentations$ | async; track presentation; let index = $index) {\n <li\n class=\"o-presentation__item\"\n >\n <div class=\"o-presentation__item__header\">\n @if (isPrivate(presentation)) {\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip -tooltip-no-wrap\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n }\n <div\n class=\"a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <div class=\"o-presentation__item__image\">\n <img alt=\"\" class=\"is-full-width\" [src]=\"presentation.image | getSecuredImage | async\" />\n </div>\n </div>\n @if (this.canModify$(presentation) | async) {\n <div class=\"more-button\" *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip -tooltip-no-wrap\"\n [id]=\"'more-button-' + index\"\n [attr.data-tooltip]=\"'@pry.presentation.more' | i18n\"\n (click)=\"$event.stopPropagation(); toggleModalActions(presentation, button)\"\n #button\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n </button>\n </div>\n }\n </div>\n <div class=\"o-presentation__item__txt\" (click)=\"fetch(presentation)\">\n <div class=\"o-presentation__item__title-container\" ellipsis textElementSelector=\".a-h3\">\n <p class=\"a-h3\">{{ presentation.name }}</p>\n </div>\n <div class=\"o-presentation__item__description-container\" ellipsis textElementSelector=\".a-p\">\n <div class=\"o-presentation__item__description a-p\">\n {{ presentation.description }}\n </div>\n </div>\n <div class=\"u-display-flex -justify-space-between -align-center\">\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n @if (presentation.theme !== undefined) {\n <span class=\"a-chip -theme -md u-self-end\" [class.-u-hidden]=\"!showTheme\">\n {{ (themePrefix ?? '') + presentation.theme | i18n: { warn: false } }}\n </span>\n }\n </div>\n </div>\n <div\n class=\"o-presentation__item__footer a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <button class=\"a-btn\">\n {{ '@pry.presentation.consult' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n </li>\n }\n </ul>\n </div>\n </div>\n }\n @case (ViewMode.CREATION) {\n <pry-add-edit-presentation\n [selectedPresentation]=\"(selectedPresentation$ | async) ?? undefined\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"false\"\n [mode]=\"mode\"\n [themePrefix]=\"themePrefix\"\n ></pry-add-edit-presentation>\n }\n @case (ViewMode.EDITION) {\n <pry-add-edit-presentation\n [selectedPresentation]=\"(selectedPresentation$ | async) ?? undefined\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"true\"\n [mode]=\"mode\"\n [themePrefix]=\"themePrefix\"\n ></pry-add-edit-presentation>\n }\n }\n</div>\n<ng-template #modalActions>\n <div class=\"m-context-menu\">\n @if (selectedPresentation$ | async; as selectedPresentation) {\n <ul\n class=\"m-context-menu__list\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presentation options\"\n >\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.edition' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"editContent(selectedPresentation)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.editionContent' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn -link-like\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n {{ '@pry.presentation.share' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n {{ '@pry.presentation.delete' | i18n }}\n </button>\n </li>\n </ul>\n }\n </div>\n</ng-template>\n","export const enTranslations = {\n '@pry': {\n presentation: {\n add: {\n pageTitle: 'Add presentation description',\n submit: 'Save dashboard'\n },\n edit: {\n pageTitle: 'Change dashboard description',\n submit: 'Save dashboard'\n },\n form: {\n name: 'Title',\n description: 'Description',\n image: 'Image',\n dragDrop: 'Drag and drop',\n or: 'or',\n categories: 'Categories',\n categoryInput: 'Add categories',\n grid: 'Current grid: ',\n cover: 'Image will cover the whole presentation card',\n theme: 'Theme'\n },\n share: 'Share',\n options: 'Presentation options',\n consult: 'Consult',\n view: 'Consult the presentation',\n private: 'Private presentation',\n homeView: 'Show on homepage',\n erase: 'Delete presentation',\n change: 'Modify the presentation',\n create: 'Create presentation',\n configuration: 'Build presentation',\n required: 'This field is required',\n maxLength: 'Allowed length : {{len}}',\n edition: 'Edit',\n editionContent: 'Edit content',\n delete: 'Delete',\n backToCatalog: 'Back to catalog',\n search: 'Search',\n title: 'Presentation catalog',\n more: 'Options'\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n presentation: {\n add: {\n pageTitle: 'Renseigner la description du tableau de bord',\n info: 'Informations',\n submit: 'Enregistrer'\n },\n edit: {\n pageTitle: 'Changer la description du tableau de bord',\n submit: 'Sauvegarder le tableau de bord'\n },\n form: {\n name: 'Titre',\n description: 'Description',\n image: 'Image d’illustration',\n dragDrop: 'Glisser - Déposer',\n or: 'ou',\n categories: 'Catégories',\n categoryInput: 'Saisir la/les catégories',\n grid: 'Grille actuelle: ',\n theme: 'Thématique'\n },\n share: 'Partager',\n options: 'Options du tableau de bord',\n consult: 'Consulter',\n view: 'Consulter le tableau de bord',\n private: 'Présentation privée',\n homeView: \"Afficher en page d'accueil\",\n erase: 'Supprimer le tableau de bord',\n change: 'Modifier le tableau de bord',\n create: 'Créer un tableau de bord',\n configuration: 'Construire le tableau de bord',\n required: 'Ce champ est requis',\n maxLength: 'Nombre de caractères autorisés : {{len}}',\n edition: 'Modifier',\n editionContent: 'Modifier la composition',\n delete: 'Supprimer',\n backToCatalog: 'Revenir au catalogue',\n search: 'Rechercher',\n title: 'Catalogue de tableaux de bord',\n more: 'Options'\n }\n }\n};\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport {\n PryCoreModule,\n PryDashboardModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule,\n PryOverlayModule,\n PrySelectModule,\n PryShareModule, PrySinceDateModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { PryAddEditPresentationComponent } from './components/add-edit-presentation/add-edit-presentation.component';\nimport { PryTitlePresentationComponent } from './components/title-presentation/title-presentation.component';\nimport { PryPresentationComponent } from './components/presentation.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryPresentationCssComponent } from './style/css.component';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { PryExpandPanelModule } from '@provoly/dashboard/components/metadata-editor';\nimport { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';\nimport { PryToolboxModule } from '@provoly/dashboard/toolbox';\n\nconst COMPONENTS = [\n PryPresentationComponent,\n PryAddEditPresentationComponent,\n PryTitlePresentationComponent,\n PryPresentationCssComponent\n];\n\n@NgModule({\n providers: [],\n declarations: [...COMPONENTS],\n imports: [\n PryIconModule,\n PryCoreModule,\n PryDashboardModule,\n ReactiveFormsModule,\n PrySelectModule,\n PryShareModule,\n FormsModule,\n PryOverlayModule,\n PryI18nModule,\n PryToolboxModule,\n PryCheckboxModule,\n CommonModule,\n A11yModule,\n PryExpandPanelModule,\n PryTextEditorModule,\n PrySinceDateModule\n ],\n exports: [...COMPONENTS]\n})\nexport class PryPresentationModule {\n constructor(private pryTranslateService: PryI18nService) {\n this.pryTranslateService.addLangObject('fr', 'presentation', frTranslations);\n this.pryTranslateService.addLangObject('en', 'presentation', enTranslations);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["uuidv4","i2","i3","i5","i4","i6.PryAddEditPresentationComponent","i7.PryPresentationCssComponent","i8","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwBM,MAAO,+BAAgC,SAAQ,wBAAwB,CAAA;IAU3E,IAAa,oBAAoB,CAAC,YAA6C,EAAA;AAC7E,QAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC/C;IAQD,WACY,CAAA,KAAY,EACA,MAAc,EAAA;AAEpC,QAAA,KAAK,EAAE,CAAC;QAHE,IAAK,CAAA,KAAA,GAAL,KAAK,CAAO;QACA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AAnBtC,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,eAAe,CAAkC,SAAS,CAAC,CAAC;AACxF,QAAA,IAAA,CAAA,YAAY,GAAW,mBAAmB,CAAC,IAAI,CAAC;QAEhD,IAAe,CAAA,eAAA,GAAW,EAAE,CAAC;QAE7B,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;QAKX,IAAO,CAAA,OAA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AY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACb,aAAa;wBACb,kBAAkB;wBAClB,mBAAmB;wBACnB,eAAe;wBACf,cAAc;wBACd,WAAW;wBACX,gBAAgB;wBAChB,aAAa;wBACb,gBAAgB;wBAChB,iBAAiB;wBACjB,YAAY;wBACZ,UAAU;wBACV,oBAAoB;wBACpB,mBAAmB;wBACnB,kBAAkB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACzB,iBAAA,CAAA;;;ACtDD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-presentation.mjs","sources":["../../../../projects/provoly/dashboard/presentation/components/add-edit-presentation/add-edit-presentation.component.ts","../../../../projects/provoly/dashboard/presentation/components/add-edit-presentation/add-edit-presentation.component.html","../../../../projects/provoly/dashboard/presentation/components/title-presentation/title-presentation.component.ts","../../../../projects/provoly/dashboard/presentation/components/title-presentation/title-presentation.component.html","../../../../projects/provoly/dashboard/presentation/style/css.component.ts","../../../../projects/provoly/dashboard/presentation/components/presentation.component.ts","../../../../projects/provoly/dashboard/presentation/components/presentation.component.html","../../../../projects/provoly/dashboard/presentation/i18n/en.translations.ts","../../../../projects/provoly/dashboard/presentation/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/presentation/presentation.module.ts","../../../../projects/provoly/dashboard/presentation/provoly-dashboard-presentation.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Optional, Output } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport {\n DashboardActions,\n DashboardGridLayout,\n DashboardSelectors,\n GlobalManifest,\n IMetadata,\n ManifestDescription,\n MetadataValue,\n SubscriptionnerDirective,\n ViewMode,\n WidgetPlacementUtils\n} from '@provoly/dashboard';\nimport { BehaviorSubject, combineLatest, Observable, take } from 'rxjs';\nimport { MetadataSelectors, MetaEventType } from '@provoly/dashboard/components/metadata-editor';\nimport { v4 as uuidv4 } from 'uuid';\nimport { PresentationFormValue } from '@provoly/dashboard/toolbox';\n\n@Component({\n selector: 'pry-add-edit-presentation',\n templateUrl: './add-edit-presentation.component.html'\n})\nexport class PryAddEditPresentationComponent extends SubscriptionnerDirective {\n staticManifest$: Observable<GlobalManifest>;\n staticManifest?: GlobalManifest;\n selectedPresentation$ = new BehaviorSubject<ManifestDescription | undefined>(undefined);\n chosenLayout: string = DashboardGridLayout.FULL;\n metadataDefs: IMetadata[] | undefined;\n metadataThemeId: string = '';\n formValue?: Partial<PresentationFormValue>;\n isFormValid = false;\n\n @Input() set selectedPresentation(presentation: ManifestDescription | undefined) {\n this.selectedPresentation$.next(presentation);\n }\n @Input() edition: boolean = false;\n @Input() themePrefix: string | null = null;\n @Input() editionStartUrl: string = '/';\n @Input() mode: 'theme' | 'meta' = 'meta';\n\n @Output() goBack = new EventEmitter<void>();\n\n constructor(\n protected store: Store,\n @Optional() protected router: Router\n ) {\n super();\n this.staticManifest$ = this.store.select(DashboardSelectors.staticManifest);\n this.subscriptions.add(this.staticManifest$.subscribe(manifest => this.staticManifest = manifest));\n this.subscriptions.add(\n combineLatest([this.staticManifest$, this.store.select(DashboardSelectors.gridLayout)]).subscribe(\n ([staticManifest, gridLayout]) => {\n this.chosenLayout =\n this.edition && staticManifest.windows[0]?.grid?.layout !== undefined\n ? staticManifest.windows[0]?.grid?.layout\n : gridLayout;\n }\n )\n );\n this.subscriptions.add(\n this.store.select(MetadataSelectors.metadata).subscribe((metadata) => {\n this.metadataDefs = metadata;\n const metadataTheme = metadata?.find((meta) => meta.name === '_theme');\n if (metadataTheme) {\n this.metadataThemeId = metadataTheme?.id ?? '';\n }\n })\n );\n }\n\n dispatchSave(): ManifestDescription {\n const presentation = {\n ...this.selectedPresentation$.value!,\n id: this.selectedPresentation$.value?.id || uuidv4(),\n ...this.formValue,\n metadata: this.metadata()\n };\n\n this.store.dispatch(\n DashboardActions.saveManifest({\n ...presentation,\n metadata: presentation.metadata?.map((metadata: MetadataValue) => ({\n metadataDefId: metadata.metadataDef.id,\n value: metadata.value\n })),\n manifest: this.edition ? this.staticManifest : this.getNewManifest()\n })\n );\n return presentation;\n }\n\n save() {\n const presentation = this.dispatchSave();\n this.store.dispatch(\n DashboardActions.selectPresentation({\n presentation,\n viewMode: ViewMode.EDITION\n })\n );\n }\n\n configureDashboard(selectedPresentation: ManifestDescription) {\n if (this.isFormValid) {\n this.dispatchSave();\n }\n\n const presentation = {\n ...this.selectedPresentation$.value!,\n ...this.formValue,\n metadata: this.metadata()\n };\n\n if (!this.edition) {\n this.store.dispatch(\n DashboardActions.selectPresentation({\n presentation,\n viewMode: ViewMode.CREATION\n })\n );\n } else {\n this.store.dispatch(\n DashboardActions.loadPresentation({\n presentation,\n viewMode: ViewMode.EDITION\n })\n );\n }\n this.router?.navigateByUrl(this.editionStartUrl);\n }\n\n addMetadata(metadata: MetaEventType) {\n this.store.dispatch(\n DashboardActions.addManifestMetadata({\n presentationId: this.selectedPresentation$.value?.id!,\n metadataId: metadata.metadataId,\n value: metadata.value ?? ''\n })\n );\n }\n\n removeMetadata(metadata: MetaEventType) {\n this.store.dispatch(\n DashboardActions.deleteManifestMetadata({\n presentationId: this.selectedPresentation$.value?.id!,\n metadataId: metadata.metadataId\n })\n );\n }\n\n close() {\n this.goBack.emit();\n }\n\n metadata(): MetadataValue[] {\n return this.mode === 'theme'\n ? !this.formValue?.theme || this.formValue?.theme === ''\n ? []\n : [\n {\n metadataDef: this.metadataDefs!.find((metadata) => metadata.id === this.metadataThemeId)!,\n value: this.formValue.theme ?? ''\n }\n ]\n : this.selectedPresentation$.value?.metadata ?? [];\n }\n\n getNewManifest(): GlobalManifest {\n return {\n windows: [\n {\n widgets: [],\n grid: {\n layout: this.chosenLayout,\n columns: WidgetPlacementUtils.getLayout(this.chosenLayout)?.columns,\n rows: WidgetPlacementUtils.getLayout(this.chosenLayout)?.rows\n }\n }\n ]\n };\n }\n}\n","<div class=\"o-manifest-layout\">\n <div class=\"o-manifest-layout__toolbox -justify-space-between -align-center\">\n <button class=\"a-btn a-btn--secondary\" type=\"button\" (click)=\"close()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" type=\"button\" (click)=\"save()\" [disabled]=\"!isFormValid\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content--presentation\">\n <h2 class=\"a-h2\">{{ '@pry.presentation.add' + '.pageTitle' | i18n }}</h2>\n <div class=\"o-presentation-form-wrapper\">\n <div class=\"u-display-flex -column\">\n <pry-presentation-form\n mode=\"theme\"\n [selectedPresentation]=\"(selectedPresentation$ | async) ?? undefined\"\n (formValue)=\"formValue = $event\"\n (isFormValid)=\"isFormValid = $event\"\n [mode]=\"mode\"\n [themePrefix]=\"themePrefix\"\n ></pry-presentation-form>\n <div class=\"m-form-label-field -width-full m-form-label-field--inline\">\n <label class=\"a-label\">{{ '@pry.presentation.form.grid' | i18n }}</label>\n <span class=\"a-label\">{{ '@pry.toolbox.layout.' + this.chosenLayout | i18n }}</span>\n @if (!edition) {\n <pry-select-grid-layout></pry-select-grid-layout>\n }\n </div>\n </div>\n @if (mode === 'meta') {\n @if (selectedPresentation$ | async; as selectedPresentation) {\n <div class=\"o-presentation__metadata-editor\">\n <pry-metadata-editor\n [targetId]=\"selectedPresentation.id\"\n [isModification]=\"true\"\n [metadata]=\"selectedPresentation.metadata ?? []\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </div>\n }\n }\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"configureDashboard(selectedPresentation$.value!)\"\n [disabled]=\"!isFormValid\"\n >\n {{ '@pry.presentation.configuration' | i18n }}\n </button>\n </div>\n</div>\n","import { Component } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { DashboardSelectors, ManifestDescription } from '@provoly/dashboard';\n\n@Component({\n selector: 'pry-title-presentation',\n templateUrl: './title-presentation.component.html'\n})\nexport class PryTitlePresentationComponent {\n currentPresentation$: Observable<ManifestDescription | undefined>;\n\n constructor(private store: Store) {\n this.currentPresentation$ = this.store.select(DashboardSelectors.currentManifest);\n }\n}\n","@if (currentPresentation$ | async; as currentPresentation) {\n <div class=\"m-presentation-title u-display-flex -gap-10\">\n <h1 class=\"a-h2 m-presentation-title__text\">\n {{ currentPresentation.name || ('@pry.header.noCurrentPresentation' | i18n) }}\n </h1>\n @if (!!currentPresentation.description) {\n <div\n class=\"m-presentation-title__description m-info-icon a-tooltip -tooltip-width-lg align-center\"\n [attr.data-tooltip]=\"currentPresentation.description\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n }\n </div>\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-presentation-css',\n template: '',\n styleUrls: ['./_o-pry-new-presentation.scss', './_o-pry-presentation.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryPresentationCssComponent {}\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n Component,\n ElementRef,\n Inject,\n Input,\n NgZone,\n Optional,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport {\n DashboardActions,\n DashboardGridLayout,\n DashboardSelectors,\n ManifestDescription,\n PRY_ACCESS_TOKEN,\n PryAccessRightsShareModalComponent,\n PryBaseAccess,\n PryDialogService,\n PryTitleService,\n SubscriptionnerDirective,\n ViewMode\n} from '@provoly/dashboard';\nimport { BehaviorSubject, combineLatest, map, Observable, of, startWith } from 'rxjs';\nimport { v4 } from 'uuid';\n\ninterface ManifestDescriptionWithTheme extends ManifestDescription {\n theme: string | undefined;\n}\n\n@Component({\n selector: 'pry-presentation',\n templateUrl: './presentation.component.html'\n})\nexport class PryPresentationComponent extends SubscriptionnerDirective {\n manifests$: Observable<ManifestDescriptionWithTheme[]>;\n search$ = new BehaviorSubject('');\n filteredPresentations$: Observable<ManifestDescriptionWithTheme[]>;\n\n selectedPresentation$ = new BehaviorSubject<ManifestDescription | undefined>(undefined);\n selectedMode: ViewMode = ViewMode.CATALOG;\n ViewMode = ViewMode;\n\n @ViewChild('modalActions', { read: TemplateRef }) templateModalActions!: TemplateRef<any>;\n @ViewChild('openModal') openModal!: ElementRef<HTMLButtonElement>;\n overlayRef?: OverlayRef;\n\n @Input() editionStartUrl: string = '/';\n @Input() consultStartUrl: string = '/';\n @Input() meAsOwner?: string;\n @Input() themePrefix: string | null = null;\n @Input() mode: 'theme' | 'meta' = 'meta';\n @Input() hideToolbox = false;\n @Input() showTheme = true;\n\n listOfManifests$ = new BehaviorSubject<ManifestDescription[] | null>(null);\n @Input() set listOfManifests(manifests: ManifestDescription[] | null) {\n this.listOfManifests$.next(Array.isArray(manifests) ? manifests : null);\n }\n\n inputSearch$ = new BehaviorSubject('');\n @Input() set search(query: string) {\n this.inputSearch$.next(query);\n }\n\n constructor(\n protected store: Store<any>,\n protected overlay: Overlay,\n protected viewContainerRef: ViewContainerRef,\n protected router: Router,\n protected titleService: PryTitleService,\n protected activatedRoute: ActivatedRoute,\n protected ngZone: NgZone,\n @Optional() @Inject(PRY_ACCESS_TOKEN) private access: PryBaseAccess,\n private dialog: PryDialogService\n ) {\n super();\n this.subscriptions.add(\n this.activatedRoute.queryParams.subscribe((params) => {\n if (params['create']) {\n this.creation();\n }\n })\n );\n this.store.dispatch(DashboardActions.fetchManifestsList());\n this.manifests$ = combineLatest([\n this.store\n .select(DashboardSelectors.manifestsList)\n .pipe(\n map((manifestList) =>\n [...manifestList].sort((a, b) =>\n a.modificationDate ? b.modificationDate.localeCompare(a.modificationDate) : 1\n )\n )\n ),\n this.listOfManifests$\n ]).pipe(\n map(([dynamics, statics]) => statics ?? dynamics),\n map((manifests) =>\n manifests.map(\n (manifest) =>\n ({\n ...manifest,\n theme: manifest.metadata?.find((meta) => meta.metadataDef.name === '_theme')?.value\n }) as ManifestDescriptionWithTheme\n )\n )\n );\n\n this.filteredPresentations$ = combineLatest([\n this.manifests$,\n this.search$,\n this.inputSearch$.pipe(startWith(''))\n ]).pipe(\n map(([presentations, search, inputSearch]) =>\n presentations.filter((presentations) => {\n const [name, description] = [presentations.name.toLowerCase(), presentations.description?.toLowerCase()];\n const [searchQuery, inputSearchQuery] = [search?.toLowerCase(), inputSearch?.toLowerCase()];\n return !!searchQuery || !!inputSearchQuery\n ? (!!searchQuery && (name.includes(searchQuery) || description?.includes(searchQuery))) ||\n (!!inputSearchQuery && (name.includes(inputSearchQuery) || description?.includes(inputSearchQuery)))\n : true;\n })\n )\n );\n this.subscriptions.add(\n this.store.select(DashboardSelectors.presentation).subscribe((presentation) => {\n this.selectedMode = presentation?.viewMode ?? this.ViewMode.CATALOG;\n this.selectedPresentation$.next(presentation.current);\n })\n );\n this.titleService.changeTitle('@pry.presentation.title');\n }\n\n closeRestitution() {\n this.selectedPresentation$.next(undefined);\n this.selectedMode = ViewMode.CATALOG;\n this.store.dispatch(DashboardActions.selectPresentation({ presentation: undefined, viewMode: ViewMode.CATALOG }));\n }\n\n fetch(presentation: ManifestDescription) {\n this.store.dispatch(DashboardActions.loadPresentation({ presentation, viewMode: ViewMode.CONSULT }));\n this.ngZone.run(() => {\n this.router?.navigateByUrl(this.consultStartUrl);\n });\n }\n\n creation() {\n this.selectedMode = ViewMode.CREATION;\n this.store.dispatch(DashboardActions.updateManifest({ manifest: { windows: [] }, selectedIds: [] }));\n const newPresentation = {\n presentation: {\n id: v4(),\n name: '',\n accessRightsByGroup: {} as { [key: string]: string[] },\n owner: true\n } as ManifestDescription,\n viewMode: ViewMode.CREATION\n };\n this.store.dispatch(DashboardActions.selectPresentation(newPresentation));\n this.store.dispatch(DashboardActions.setGridLayout({ layout: DashboardGridLayout.FULL }));\n this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.CREATION }));\n }\n\n edit(presentation: ManifestDescription) {\n this.selectedMode = ViewMode.EDITION;\n this.selectedPresentation$.next(presentation);\n this.titleService.changeTitle(presentation.name);\n this.store.dispatch(DashboardActions.selectPresentation({ presentation, viewMode: ViewMode.EDITION }));\n this.store.dispatch(DashboardActions.fetchStaticManifest({ id: presentation.id }));\n this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.EDITION }));\n this.overlayRef?.dispose();\n this.overlayRef = undefined;\n }\n\n delete(id: string) {\n this.store.dispatch(DashboardActions.confirmManifestDeletion({ id }));\n this.toggleModalActions();\n }\n\n toggleModalActions(presentation?: ManifestDescription | null, moreButton?: HTMLButtonElement) {\n if (!this.overlayRef && presentation) {\n this.selectedPresentation$.next(presentation);\n this.store.dispatch(DashboardActions.selectPresentation({ presentation, viewMode: ViewMode.CATALOG }));\n this.store.dispatch(DashboardActions.loadManifest({ id: presentation.id }));\n this.overlayRef = this.overlay.create(\n new OverlayConfig({\n hasBackdrop: true,\n panelClass: ['m-context-menu-wrapper'],\n backdropClass: 'backdrop'\n })\n );\n this.overlayRef.backdropClick().subscribe(() => this.toggleModalActions(presentation));\n this.overlayRef.attach(new TemplatePortal(this.templateModalActions, this.viewContainerRef));\n const contextMenu = document.querySelector('div.m-context-menu') as HTMLDivElement;\n if (!!contextMenu && moreButton) {\n const rect = moreButton.getBoundingClientRect();\n contextMenu.style.minWidth = '185px';\n contextMenu.style.left = (rect?.left ?? 0) - (contextMenu?.clientWidth ?? 0) + 23 + 'px';\n contextMenu.style.top = (rect?.top ?? 0) + 30 + 'px';\n }\n } else {\n this.overlayRef?.dispose();\n this.overlayRef = undefined;\n this.selectedPresentation$.next(undefined);\n }\n }\n\n toggleModal(presentation?: ManifestDescription | null) {\n if (presentation) {\n this.selectedPresentation$.next(presentation);\n this.store.dispatch(DashboardActions.selectPresentation({ presentation, viewMode: ViewMode.CATALOG }));\n this.toggleModalActions();\n this.dialog.open(PryAccessRightsShareModalComponent, {\n hasBackdrop: true,\n panelClass: ['o-modal-wrapper'],\n backdropClass: 'backdrop',\n data: { manifest: presentation }\n });\n }\n }\n\n editContent(selectedPresentation: ManifestDescription) {\n this.store.dispatch(\n DashboardActions.loadPresentation({ presentation: selectedPresentation, viewMode: ViewMode.EDITION })\n );\n this.ngZone.run(() => {\n this.router?.navigateByUrl(this.consultStartUrl);\n });\n }\n\n isPrivate(presentation: ManifestDescription) {\n return Object.keys(presentation.accessRightsByGroup).length === 0;\n }\n\n canModify$(presentation: ManifestDescription) {\n return !this.access ? of(false) : this.access.canModifyPresentation(presentation);\n }\n}\n","<pry-presentation-css></pry-presentation-css>\n<div class=\"o-manifest-layout\">\n @switch (selectedMode) {\n @default {\n <div class=\"o-manifest-layout__toolbox\" [class.-u-hidden]=\"hideToolbox\">\n <button\n class=\"a-btn a-btn--primary\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"o-manifest-layout__toolbox__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.presentation.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n <pry-icon class=\"search-icon\" iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.title' | i18n }}</h1>\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n @for (presentation of filteredPresentations$ | async; track presentation.id; let index = $index) {\n <li class=\"o-presentation__item\">\n <div class=\"o-presentation__item__header\">\n @if (isPrivate(presentation)) {\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip -tooltip-no-wrap\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n }\n <div\n class=\"a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <div class=\"o-presentation__item__image\">\n <img alt=\"\" class=\"is-full-width\" [src]=\"presentation.image | getSecuredImage | async\" />\n </div>\n </div>\n @if (this.canModify$(presentation) | async) {\n <div class=\"more-button\" *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip -tooltip-no-wrap\"\n [id]=\"'more-button-' + index\"\n [attr.data-tooltip]=\"'@pry.presentation.more' | i18n\"\n (click)=\"$event.stopPropagation(); toggleModalActions(presentation, button)\"\n #button\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n </button>\n </div>\n }\n </div>\n <div class=\"o-presentation__item__txt\" (click)=\"fetch(presentation)\">\n <div class=\"o-presentation__item__title-container\" ellipsis textElementSelector=\".a-h3\">\n <p class=\"a-h3\">{{ presentation.name }}</p>\n </div>\n <div class=\"o-presentation__item__description-container\" ellipsis textElementSelector=\".a-p\">\n <div class=\"o-presentation__item__description a-p\">\n {{ presentation.description }}\n </div>\n </div>\n <div class=\"u-display-flex -justify-space-between -align-center\">\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n @if (presentation.theme !== undefined) {\n <span class=\"a-chip -theme -md u-self-end\" [class.-u-hidden]=\"!showTheme\">\n {{ (themePrefix ?? '') + presentation.theme | i18n: { warn: false } }}\n </span>\n }\n </div>\n </div>\n <div\n class=\"o-presentation__item__footer a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <button class=\"a-btn\">\n {{ '@pry.presentation.consult' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n </li>\n }\n </ul>\n </div>\n </div>\n }\n @case (ViewMode.CREATION) {\n <pry-add-edit-presentation\n [selectedPresentation]=\"(selectedPresentation$ | async) ?? undefined\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"false\"\n [mode]=\"mode\"\n [themePrefix]=\"themePrefix\"\n ></pry-add-edit-presentation>\n }\n @case (ViewMode.EDITION) {\n <pry-add-edit-presentation\n [selectedPresentation]=\"(selectedPresentation$ | async) ?? undefined\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"true\"\n [mode]=\"mode\"\n [themePrefix]=\"themePrefix\"\n ></pry-add-edit-presentation>\n }\n }\n</div>\n<ng-template #modalActions>\n <div class=\"m-context-menu\">\n @if (selectedPresentation$ | async; as selectedPresentation) {\n <ul class=\"m-context-menu__list\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"dialog presentation options\">\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.edition' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"editContent(selectedPresentation)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.editionContent' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn -link-like\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n {{ '@pry.presentation.share' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n {{ '@pry.presentation.delete' | i18n }}\n </button>\n </li>\n </ul>\n }\n </div>\n</ng-template>\n","export const enTranslations = {\n '@pry': {\n presentation: {\n add: {\n pageTitle: 'Add presentation description',\n submit: 'Save dashboard'\n },\n edit: {\n pageTitle: 'Change dashboard description',\n submit: 'Save dashboard'\n },\n form: {\n name: 'Title',\n description: 'Description',\n image: 'Image',\n dragDrop: 'Drag and drop',\n or: 'or',\n categories: 'Categories',\n categoryInput: 'Add categories',\n grid: 'Current grid: ',\n cover: 'Image will cover the whole presentation card',\n theme: 'Theme'\n },\n share: 'Share',\n options: 'Presentation options',\n consult: 'Consult',\n view: 'Consult the presentation',\n private: 'Private presentation',\n homeView: 'Show on homepage',\n erase: 'Delete presentation',\n change: 'Modify the presentation',\n create: 'Create presentation',\n configuration: 'Build presentation',\n required: 'This field is required',\n maxLength: 'Allowed length : {{len}}',\n edition: 'Edit',\n editionContent: 'Edit content',\n delete: 'Delete',\n backToCatalog: 'Back to catalog',\n search: 'Search',\n title: 'Presentation catalog',\n more: 'Options'\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n presentation: {\n add: {\n pageTitle: 'Renseigner la description du tableau de bord',\n info: 'Informations',\n submit: 'Enregistrer'\n },\n edit: {\n pageTitle: 'Changer la description du tableau de bord',\n submit: 'Sauvegarder le tableau de bord'\n },\n form: {\n name: 'Titre',\n description: 'Description',\n image: 'Image d’illustration',\n dragDrop: 'Glisser - Déposer',\n or: 'ou',\n categories: 'Catégories',\n categoryInput: 'Saisir la/les catégories',\n grid: 'Grille actuelle: ',\n theme: 'Thématique'\n },\n share: 'Partager',\n options: 'Options du tableau de bord',\n consult: 'Consulter',\n view: 'Consulter le tableau de bord',\n private: 'Présentation privée',\n homeView: \"Afficher en page d'accueil\",\n erase: 'Supprimer le tableau de bord',\n change: 'Modifier le tableau de bord',\n create: 'Créer un tableau de bord',\n configuration: 'Construire le tableau de bord',\n required: 'Ce champ est requis',\n maxLength: 'Nombre de caractères autorisés : {{len}}',\n edition: 'Modifier',\n editionContent: 'Modifier la composition',\n delete: 'Supprimer',\n backToCatalog: 'Revenir au catalogue',\n search: 'Rechercher',\n title: 'Catalogue de tableaux de bord',\n more: 'Options'\n }\n }\n};\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport {\n PryCoreModule,\n PryDashboardModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule,\n PryOverlayModule,\n PrySelectModule,\n PryShareModule, PrySinceDateModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { PryAddEditPresentationComponent } from './components/add-edit-presentation/add-edit-presentation.component';\nimport { PryTitlePresentationComponent } from './components/title-presentation/title-presentation.component';\nimport { PryPresentationComponent } from './components/presentation.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryPresentationCssComponent } from './style/css.component';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { PryExpandPanelModule } from '@provoly/dashboard/components/metadata-editor';\nimport { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';\nimport { PryToolboxModule } from '@provoly/dashboard/toolbox';\n\nconst COMPONENTS = [\n PryPresentationComponent,\n PryAddEditPresentationComponent,\n PryTitlePresentationComponent,\n PryPresentationCssComponent\n];\n\n@NgModule({\n providers: [],\n declarations: [...COMPONENTS],\n imports: [\n PryIconModule,\n PryCoreModule,\n PryDashboardModule,\n ReactiveFormsModule,\n PrySelectModule,\n PryShareModule,\n FormsModule,\n PryOverlayModule,\n PryI18nModule,\n PryToolboxModule,\n PryCheckboxModule,\n CommonModule,\n A11yModule,\n PryExpandPanelModule,\n PryTextEditorModule,\n PrySinceDateModule\n ],\n exports: [...COMPONENTS]\n})\nexport class PryPresentationModule {\n constructor(private pryTranslateService: PryI18nService) {\n this.pryTranslateService.addLangObject('fr', 'presentation', frTranslations);\n this.pryTranslateService.addLangObject('en', 'presentation', enTranslations);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["uuidv4","i2","i3","i5","i4","i6.PryAddEditPresentationComponent","i7.PryPresentationCssComponent","i8","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwBM,MAAO,+BAAgC,SAAQ,wBAAwB,CAAA;IAU3E,IAAa,oBAAoB,CAAC,YAA6C,EAAA;AAC7E,QAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC/C;IAQD,WACY,CAAA,KAAY,EACA,MAAc,EAAA;AAEpC,QAAA,KAAK,EAAE,CAAC;QAHE,IAAK,CAAA,KAAA,GAAL,KAAK,CAAO;QACA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AAnBtC,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,eAAe,CAAkC,SAAS,CAAC,CAAC;AACxF,QAAA,IAAA,CAAA,YAAY,GAAW,mBAAmB,CAAC,IAAI,CAAC;QAEhD,IAAe,CAAA,eAAA,GAAW,EAAE,CAAC;QAE7B,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;QAKX,IAAO,CAAA,OAAA,GAAY,KAAK,CAAC;QACzB,IAAW,CAAA,WAAA,GAAkB,IAAI,CAAC;QAClC,IAAe,CAAA,eAAA,GAAW,GAAG,CAAC;QAC9B,IAAI,CAAA,IAAA,GAAqB,MAAM,CAAC;AAE/B,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EA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iBAAiB;wBACjB,YAAY;wBACZ,UAAU;wBACV,oBAAoB;wBACpB,mBAAmB;wBACnB,kBAAkB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACzB,iBAAA,CAAA;;;ACtDD;;AAEG;;;;"}
|
|
@@ -50,8 +50,20 @@ class WidgetTemplateComponent extends DataWidgetComponent {
|
|
|
50
50
|
let evaluation = null;
|
|
51
51
|
try {
|
|
52
52
|
// Replace rs references with actual values from the rs object
|
|
53
|
-
const replacedExpr = expr.replace(/rs\['(.*?)'\]\[(
|
|
54
|
-
|
|
53
|
+
const replacedExpr = expr.replace(/rs\['(.*?)'\]\[(.*?)\]\.attributes\.(\w+)/g, (match, p1, p2, p3) => {
|
|
54
|
+
if (p2.startsWith('id=')) {
|
|
55
|
+
const id = p2.split('=')[1].replace(/['"]/g, '');
|
|
56
|
+
const item = rs.items[p1].find((item) => item.id === id);
|
|
57
|
+
return item ? item.attributes[p3].value : '';
|
|
58
|
+
}
|
|
59
|
+
else if (p2.includes('=')) {
|
|
60
|
+
const conditions = p2.split('&').map((cond) => cond.split('='));
|
|
61
|
+
const item = rs.items[p1].find((item) => conditions.every(([attr, value]) => item.attributes[attr].value == value.replace(/['"]/g, '')));
|
|
62
|
+
return item ? item.attributes[p3].value : '';
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return rs.items[p1][parseInt(p2, 10)].attributes[p3].value;
|
|
66
|
+
}
|
|
55
67
|
});
|
|
56
68
|
// Evaluate the arithmetic expression
|
|
57
69
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-widgets-widget-template.mjs","sources":["../../../../projects/provoly/dashboard/widgets/widget-template/style/css.component.ts","../../../../projects/provoly/dashboard/widgets/widget-template/component/widget-template.component.ts","../../../../projects/provoly/dashboard/widgets/widget-template/component/widget-template.component.html","../../../../projects/provoly/dashboard/widgets/widget-template/i18n/en.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-template/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-template/widget-template.module.ts","../../../../projects/provoly/dashboard/widgets/widget-template/provoly-dashboard-widgets-widget-template.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-widget-template-css',\n template: '',\n styleUrls: ['./_o-widget-template.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryWidgetTemplateCssComponent {}\n","import { Component, ElementRef, SecurityContext } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { Store } from '@ngrx/store';\nimport { DataWidgetComponent, TemplateWidgetOptions } from '@provoly/dashboard';\nimport { combineLatestWith, filter, map, Observable } from 'rxjs';\n\n@Component({\n selector: 'pry-widget-template',\n templateUrl: './widget-template.component.html'\n})\nexport class WidgetTemplateComponent extends DataWidgetComponent {\n options$: Observable<TemplateWidgetOptions>;\n optionsCopy: TemplateWidgetOptions = {};\n template$: Observable<SafeHtml>;\n css$: Observable<SafeHtml>;\n id: number;\n static idGenerator = 0;\n\n constructor(\n store: Store<any>,\n el: ElementRef,\n private sanitizer: DomSanitizer\n ) {\n super(store, el);\n this.id = WidgetTemplateComponent.idGenerator++;\n this.options$ = this.manifest$.pipe(map((manifest) => manifest.options as TemplateWidgetOptions));\n\n this.subscriptions.add(\n this.options$.pipe(filter((opt) => !!opt)).subscribe((options) => {\n this.optionsCopy = { ...(structuredClone(options) as TemplateWidgetOptions) };\n })\n );\n\n this.template$ = this.options$.pipe(\n map((options) => (!!options.svg ? options.svg : options.html ?? '')),\n combineLatestWith(this.resultSet$),\n map(\n ([template, rs]) =>\n this.sanitizer.sanitize(SecurityContext.HTML, WidgetTemplateComponent.evaluate(template, rs)) ?? ''\n )\n );\n\n this.css$ = this.options$.pipe(\n map((options) => `<style>${WidgetTemplateComponent.limitScope(options.css ?? '', this.id + '')}</style>`),\n combineLatestWith(this.resultSet$),\n map(\n ([template, rs]) => this.sanitizer.bypassSecurityTrustHtml(WidgetTemplateComponent.evaluate(template, rs)) ?? ''\n )\n );\n }\n\n override emitManifest() {\n this.manifestModified.emit({\n widgetIndex: this.widgetIndex,\n manifest: { ...this.manifest, options: this.optionsCopy }\n });\n }\n\n static evaluate(template: string, rs: any): string {\n const regexp = new RegExp('{{(.*?)}}', 'g');\n const toReplace = template.match(regexp);\n let result = template;\n\n if (!!toReplace) {\n toReplace.forEach((extracted) => {\n const expr = extracted.substring(2, extracted.length - 2).trim();\n let evaluation: any = null;\n\n try {\n // Replace rs references with actual values from the rs object\n const replacedExpr = expr.replace(/rs\\['(.*?)'\\]\\[(\\d+)\\]\\.attributes\\.(\\w+)/g, (match, p1, p2, p3) => {\n return rs.items[p1][parseInt(p2, 10)].attributes[p3].value;\n });\n\n // Evaluate the arithmetic expression\n try {\n evaluation = new Function('return ' + replacedExpr)();\n } catch (error) {\n evaluation = replacedExpr;\n }\n } catch (error) {\n console.error('Error evaluating expression:', expr, error);\n }\n\n result = result.replace(extracted, evaluation);\n });\n }\n\n return result;\n }\n\n static limitScope(css: string, id: string): string {\n const scope = `.pry-template-${id}`;\n\n const scoped = css.replace(/([},] ?)/g, `$1${scope} `).replace(new RegExp(scope + ' $'), '');\n\n return scope + ' ' + scoped;\n }\n\n changeHtml($event: Event) {\n // @ts-ignore\n this.optionsCopy.html = $event.currentTarget.value;\n }\n\n changeCss($event: Event) {\n // @ts-ignore\n this.optionsCopy.css = $event.currentTarget.value;\n }\n}\n","<pry-widget-template-css></pry-widget-template-css>\n@if (displayHeader$ | async) {\n <pry-widget-header\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"html_src\">{{ '@pry.widget.template.html' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"html_src\"\n [value]=\"optionsCopy.html\"\n (input)=\"changeHtml($event)\"\n ></textarea>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"css_src\">{{ '@pry.widget.template.css' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"css_src\"\n [value]=\"optionsCopy.css\"\n (input)=\"changeCss($event)\"\n ></textarea>\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n}\n@if (css$ | async; as css) {\n <div [innerHtml]=\"css\"></div>\n}\n@if (template$ | async; as template) {\n <div [class]=\"'pry-template-' + id\" [innerHtml]=\"template\"></div>\n}\n","export const enTranslations = {\n '@pry': {\n widget: {\n template: {\n html: 'Html',\n css: 'Css'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n widget: {\n template: {\n html: 'Html',\n css: 'Css'\n }\n }\n }\n};\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseWidgetComponent,\n BaseWidgetModule,\n PryCoreModule,\n PryDashboardModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule,\n PrySelectModule,\n PryToggleModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { WidgetTemplateComponent } from './component/widget-template.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryWidgetTemplateCssComponent } from './style/css.component';\n\n@NgModule({\n declarations: [WidgetTemplateComponent, PryWidgetTemplateCssComponent],\n imports: [\n CommonModule,\n FormsModule,\n OverlayModule,\n PryCoreModule,\n PryDashboardModule,\n PrySelectModule,\n PryIconModule,\n PryCheckboxModule,\n PryToggleModule,\n PryI18nModule\n ],\n exports: [WidgetTemplateComponent]\n})\nexport class WidgetTemplateModule extends BaseWidgetModule {\n constructor(private pryTranslateService: PryI18nService) {\n super();\n this.pryTranslateService.addLangObject('fr', 'widget-template', frTranslations);\n this.pryTranslateService.addLangObject('en', 'widget-template', enTranslations);\n }\n\n override getComponent() {\n return WidgetTemplateComponent as Type<BaseWidgetComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i4.PryWidgetTemplateCssComponent","i1"],"mappings":";;;;;;;;;;;;;MAQa,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,+DAJ9B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wCAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAID,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EACzB,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,wCAAA,CAAA,EAAA,CAAA;;;ACIjC,MAAO,uBAAwB,SAAQ,mBAAmB,CAAA;aAMvD,IAAW,CAAA,WAAA,GAAG,CAAH,CAAK,EAAA;AAEvB,IAAA,WAAA,CACE,KAAiB,EACjB,EAAc,EACN,SAAuB,EAAA;AA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6B,aAEnE,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe;AACf,YAAA,aAAa,aAEL,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAb7B,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIJ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAhBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,6BAA6B,CAAC;AACtE,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;wBACb,kBAAkB;wBAClB,eAAe;wBACf,aAAa;wBACb,iBAAiB;wBACjB,eAAe;wBACf,aAAa;AACd,qBAAA;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACpCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-widgets-widget-template.mjs","sources":["../../../../projects/provoly/dashboard/widgets/widget-template/style/css.component.ts","../../../../projects/provoly/dashboard/widgets/widget-template/component/widget-template.component.ts","../../../../projects/provoly/dashboard/widgets/widget-template/component/widget-template.component.html","../../../../projects/provoly/dashboard/widgets/widget-template/i18n/en.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-template/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-template/widget-template.module.ts","../../../../projects/provoly/dashboard/widgets/widget-template/provoly-dashboard-widgets-widget-template.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-widget-template-css',\n template: '',\n styleUrls: ['./_o-widget-template.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryWidgetTemplateCssComponent {}\n","import { Component, ElementRef, SecurityContext } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { Store } from '@ngrx/store';\nimport { DataWidgetComponent, TemplateWidgetOptions } from '@provoly/dashboard';\nimport { combineLatestWith, filter, map, Observable } from 'rxjs';\n\n@Component({\n selector: 'pry-widget-template',\n templateUrl: './widget-template.component.html'\n})\nexport class WidgetTemplateComponent extends DataWidgetComponent {\n options$: Observable<TemplateWidgetOptions>;\n optionsCopy: TemplateWidgetOptions = {};\n template$: Observable<SafeHtml>;\n css$: Observable<SafeHtml>;\n id: number;\n static idGenerator = 0;\n\n constructor(\n store: Store<any>,\n el: ElementRef,\n private sanitizer: DomSanitizer\n ) {\n super(store, el);\n this.id = WidgetTemplateComponent.idGenerator++;\n this.options$ = this.manifest$.pipe(map((manifest) => manifest.options as TemplateWidgetOptions));\n\n this.subscriptions.add(\n this.options$.pipe(filter((opt) => !!opt)).subscribe((options) => {\n this.optionsCopy = { ...(structuredClone(options) as TemplateWidgetOptions) };\n })\n );\n\n this.template$ = this.options$.pipe(\n map((options) => (!!options.svg ? options.svg : options.html ?? '')),\n combineLatestWith(this.resultSet$),\n map(\n ([template, rs]) =>\n this.sanitizer.sanitize(SecurityContext.HTML, WidgetTemplateComponent.evaluate(template, rs)) ?? ''\n )\n );\n\n this.css$ = this.options$.pipe(\n map((options) => `<style>${WidgetTemplateComponent.limitScope(options.css ?? '', this.id + '')}</style>`),\n combineLatestWith(this.resultSet$),\n map(\n ([template, rs]) => this.sanitizer.bypassSecurityTrustHtml(WidgetTemplateComponent.evaluate(template, rs)) ?? ''\n )\n );\n }\n\n override emitManifest() {\n this.manifestModified.emit({\n widgetIndex: this.widgetIndex,\n manifest: { ...this.manifest, options: this.optionsCopy }\n });\n }\n\n static evaluate(template: string, rs: any): string {\n const regexp = new RegExp('{{(.*?)}}', 'g');\n const toReplace = template.match(regexp);\n let result = template;\n\n if (!!toReplace) {\n toReplace.forEach((extracted) => {\n const expr = extracted.substring(2, extracted.length - 2).trim();\n let evaluation: any = null;\n\n try {\n // Replace rs references with actual values from the rs object\n const replacedExpr = expr.replace(/rs\\['(.*?)'\\]\\[(.*?)\\]\\.attributes\\.(\\w+)/g, (match, p1, p2, p3) => {\n if (p2.startsWith('id=')) {\n const id = p2.split('=')[1].replace(/['\"]/g, '');\n const item = rs.items[p1].find((item: any) => item.id === id);\n return item ? item.attributes[p3].value : '';\n } else if (p2.includes('=')) {\n const conditions = p2.split('&').map((cond: any) => cond.split('='));\n const item = rs.items[p1].find((item: any) =>\n conditions.every(\n ([attr, value]: [any, any]) => item.attributes[attr].value == value.replace(/['\"]/g, '')\n )\n );\n return item ? item.attributes[p3].value : '';\n } else {\n return rs.items[p1][parseInt(p2, 10)].attributes[p3].value;\n }\n });\n\n // Evaluate the arithmetic expression\n try {\n evaluation = new Function('return ' + replacedExpr)();\n } catch (error) {\n evaluation = replacedExpr;\n }\n } catch (error) {\n console.error('Error evaluating expression:', expr, error);\n }\n\n result = result.replace(extracted, evaluation);\n });\n }\n\n return result;\n }\n\n static limitScope(css: string, id: string): string {\n const scope = `.pry-template-${id}`;\n\n const scoped = css.replace(/([},] ?)/g, `$1${scope} `).replace(new RegExp(scope + ' $'), '');\n\n return scope + ' ' + scoped;\n }\n\n changeHtml($event: Event) {\n // @ts-ignore\n this.optionsCopy.html = $event.currentTarget.value;\n }\n\n changeCss($event: Event) {\n // @ts-ignore\n this.optionsCopy.css = $event.currentTarget.value;\n }\n}\n","<pry-widget-template-css></pry-widget-template-css>\n@if (displayHeader$ | async) {\n <pry-widget-header\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"html_src\">{{ '@pry.widget.template.html' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"html_src\"\n [value]=\"optionsCopy.html\"\n (input)=\"changeHtml($event)\"\n ></textarea>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"css_src\">{{ '@pry.widget.template.css' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"css_src\"\n [value]=\"optionsCopy.css\"\n (input)=\"changeCss($event)\"\n ></textarea>\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n}\n@if (css$ | async; as css) {\n <div [innerHtml]=\"css\"></div>\n}\n@if (template$ | async; as template) {\n <div [class]=\"'pry-template-' + id\" [innerHtml]=\"template\"></div>\n}\n","export const enTranslations = {\n '@pry': {\n widget: {\n template: {\n html: 'Html',\n css: 'Css'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n widget: {\n template: {\n html: 'Html',\n css: 'Css'\n }\n }\n }\n};\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseWidgetComponent,\n BaseWidgetModule,\n PryCoreModule,\n PryDashboardModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule,\n PrySelectModule,\n PryToggleModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { WidgetTemplateComponent } from './component/widget-template.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryWidgetTemplateCssComponent } from './style/css.component';\n\n@NgModule({\n declarations: [WidgetTemplateComponent, PryWidgetTemplateCssComponent],\n imports: [\n CommonModule,\n FormsModule,\n OverlayModule,\n PryCoreModule,\n PryDashboardModule,\n PrySelectModule,\n PryIconModule,\n PryCheckboxModule,\n PryToggleModule,\n PryI18nModule\n ],\n exports: [WidgetTemplateComponent]\n})\nexport class WidgetTemplateModule extends BaseWidgetModule {\n constructor(private pryTranslateService: PryI18nService) {\n super();\n this.pryTranslateService.addLangObject('fr', 'widget-template', frTranslations);\n this.pryTranslateService.addLangObject('en', 'widget-template', enTranslations);\n }\n\n override getComponent() {\n return WidgetTemplateComponent as Type<BaseWidgetComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i4.PryWidgetTemplateCssComponent","i1"],"mappings":";;;;;;;;;;;;;MAQa,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,+DAJ9B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wCAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAID,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EACzB,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,w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6B,aAEnE,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe;AACf,YAAA,aAAa,aAEL,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAb7B,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIJ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAhBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,6BAA6B,CAAC;AACtE,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;wBACb,kBAAkB;wBAClB,eAAe;wBACf,aAAa;wBACb,iBAAiB;wBACjB,eAAe;wBACf,aAAa;AACd,qBAAA;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACpCD;;AAEG;;;;"}
|
|
@@ -10627,11 +10627,11 @@ class PryAboutComponent {
|
|
|
10627
10627
|
return !!value && (!!backVersion.chartVersion || !!frontVersion.libVersion);
|
|
10628
10628
|
}
|
|
10629
10629
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryAboutComponent, deps: [{ token: i1.Store }, { token: PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10630
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryAboutComponent, selector: "pry-about", inputs: { tooltipPosition: "tooltipPosition" }, ngImport: i0, template: "<div class=\"o-about\">\n <div class=\"m-info-icon\">\n <span>i</span>\n </div>\n <div class=\"o-about__tooltip -position-{{ tooltipPosition }}\">\n @for (version of (version$ | async) ?? {} | keyvalue; track version) {\n <div class=\"o-about__line\">\n {{ '@pry.about.' + version.key | i18n }}\n <p class=\"a-chip -md -no-wrap\" [class.-not-found]=\"!hasVersion(version.value)\">\n {{ displayVersion(version.value) }}\n </p>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
10630
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryAboutComponent, selector: "pry-about", inputs: { tooltipPosition: "tooltipPosition" }, ngImport: i0, template: "<div class=\"o-about\">\n <div class=\"m-info-icon\">\n <span>i</span>\n </div>\n <div class=\"o-about__tooltip -position-{{ tooltipPosition }}\">\n @for (version of (version$ | async) ?? {} | keyvalue; track version.key) {\n <div class=\"o-about__line\">\n {{ '@pry.about.' + version.key | i18n }}\n <p class=\"a-chip -md -no-wrap\" [class.-not-found]=\"!hasVersion(version.value)\">\n {{ displayVersion(version.value) }}\n </p>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
10631
10631
|
}
|
|
10632
10632
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryAboutComponent, decorators: [{
|
|
10633
10633
|
type: Component,
|
|
10634
|
-
args: [{ selector: 'pry-about', template: "<div class=\"o-about\">\n <div class=\"m-info-icon\">\n <span>i</span>\n </div>\n <div class=\"o-about__tooltip -position-{{ tooltipPosition }}\">\n @for (version of (version$ | async) ?? {} | keyvalue; track version) {\n <div class=\"o-about__line\">\n {{ '@pry.about.' + version.key | i18n }}\n <p class=\"a-chip -md -no-wrap\" [class.-not-found]=\"!hasVersion(version.value)\">\n {{ displayVersion(version.value) }}\n </p>\n </div>\n }\n </div>\n</div>\n" }]
|
|
10634
|
+
args: [{ selector: 'pry-about', template: "<div class=\"o-about\">\n <div class=\"m-info-icon\">\n <span>i</span>\n </div>\n <div class=\"o-about__tooltip -position-{{ tooltipPosition }}\">\n @for (version of (version$ | async) ?? {} | keyvalue; track version.key) {\n <div class=\"o-about__line\">\n {{ '@pry.about.' + version.key | i18n }}\n <p class=\"a-chip -md -no-wrap\" [class.-not-found]=\"!hasVersion(version.value)\">\n {{ displayVersion(version.value) }}\n </p>\n </div>\n }\n </div>\n</div>\n" }]
|
|
10635
10635
|
}], ctorParameters: () => [{ type: i1.Store }, { type: PryI18nService }], propDecorators: { tooltipPosition: [{
|
|
10636
10636
|
type: Input
|
|
10637
10637
|
}] } });
|
|
@@ -12208,6 +12208,9 @@ const wfsUrlBuilder = (wmsUrl, bbox, geomPropName, params) => {
|
|
|
12208
12208
|
};
|
|
12209
12209
|
|
|
12210
12210
|
class DashboardEffects {
|
|
12211
|
+
distance(a, b) {
|
|
12212
|
+
return Math.sqrt(Math.pow(a[0] - b[0], 2) + Math.pow(a[1] - b[1], 2));
|
|
12213
|
+
}
|
|
12211
12214
|
constructor(dashboardInitService, actions$, store, manifestService, itemService, titleService, translateService, snackBar, router, refreshService, toolboxManifestService, busService, searchService, pryDialog, wmsService, widgetFactoryService, i18nService) {
|
|
12212
12215
|
this.dashboardInitService = dashboardInitService;
|
|
12213
12216
|
this.actions$ = actions$;
|
|
@@ -12606,14 +12609,26 @@ class DashboardEffects {
|
|
|
12606
12609
|
});
|
|
12607
12610
|
})));
|
|
12608
12611
|
this.getWfsFeaturesForPointStack = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getWfsFeaturesForPointStackTooltips), mergeMap((action) => combineLatest([of(action), this.wmsService.getWmsFeatures(action.url)])), mergeMap(([action, wmsJson]) => {
|
|
12612
|
+
// Search the one that is closest from the click
|
|
12613
|
+
const closestFeature = wmsJson.features
|
|
12614
|
+
.map((feature) => ({
|
|
12615
|
+
original: feature,
|
|
12616
|
+
center: feature.geometry.coordinates
|
|
12617
|
+
}))
|
|
12618
|
+
.map((tmp) => ({
|
|
12619
|
+
...tmp,
|
|
12620
|
+
distance: this.distance(tmp.center, action.coordinates)
|
|
12621
|
+
}))
|
|
12622
|
+
.sort((a, b) => a.distance - b.distance)[0]?.original;
|
|
12609
12623
|
// check if data is at least a stack of points
|
|
12610
|
-
const isStack =
|
|
12611
|
-
|
|
12612
|
-
.
|
|
12624
|
+
const isStack = !!closestFeature &&
|
|
12625
|
+
!!closestFeature.properties.count &&
|
|
12626
|
+
closestFeature.properties.countunique &&
|
|
12627
|
+
closestFeature.properties.count > 1;
|
|
12613
12628
|
if (isStack) {
|
|
12614
|
-
let envBBOXCoords = [...
|
|
12629
|
+
let envBBOXCoords = [...closestFeature.properties.envBBOX.matchAll(/\d+.\d+/g)].map((m) => parseFloat(m[0]));
|
|
12615
12630
|
return this.wmsService
|
|
12616
|
-
.getWfsFeatures(action.url, envBBOXCoords, action.geomPropName ??
|
|
12631
|
+
.getWfsFeatures(action.url, envBBOXCoords, action.geomPropName ?? closestFeature['geometry_name'])
|
|
12617
12632
|
.pipe(map((wfsJson) => ({ action, json: wfsJson })));
|
|
12618
12633
|
}
|
|
12619
12634
|
// if data is not a stack just add features without calling wfs service
|