@provoly/dashboard 0.25.0 → 0.25.1

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.
@@ -61,7 +61,7 @@ class AutocompleteComponent extends BaseFilterComponent {
61
61
  .subscribe((values) => this.items$.next(values)));
62
62
  }
63
63
  resetAutocompleteValues() {
64
- if (this.items$.getValue().length !== this.possibleFilterValues.length) {
64
+ if (this.items$.getValue()?.length !== this.possibleFilterValues?.length) {
65
65
  this.items$.next(this.possibleFilterValues);
66
66
  }
67
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"provoly-dashboard-filters-autocomplete.mjs","sources":["../../../../projects/provoly/dashboard/filters/autocomplete/style/css.component.ts","../../../../projects/provoly/dashboard/filters/autocomplete/autocomplete.component.ts","../../../../projects/provoly/dashboard/filters/autocomplete/autocomplete.component.html","../../../../projects/provoly/dashboard/filters/autocomplete/autocomplete.module.ts","../../../../projects/provoly/dashboard/filters/autocomplete/provoly-dashboard-filters-autocomplete.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-autocomplete-css',\n template: '',\n styleUrls: ['./_m-autocomplete.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryAutocompleteCssComponent {}\n","import { Component, EventEmitter, OnDestroy, OnInit } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { BaseFilterComponent, SearchActions, SearchSelectors, SearchService } from '@provoly/dashboard';\nimport {\n BehaviorSubject,\n catchError,\n combineLatest,\n debounceTime,\n distinctUntilChanged,\n map,\n Observable,\n of,\n skipUntil,\n startWith,\n Subject,\n switchMap\n} from 'rxjs';\nimport equal from 'fast-deep-equal/es6';\nimport { tap } from 'rxjs/operators';\nimport { Attribute } from '@provoly/dashboard/toolbox';\n\n@Component({\n selector: 'pry-autocomplete',\n templateUrl: './autocomplete.component.html'\n})\nexport class AutocompleteComponent extends BaseFilterComponent implements OnInit, OnDestroy {\n search$ = new BehaviorSubject<string>('');\n autocomplete$?: Observable<string[]>;\n loader: boolean = false;\n preventInitCall$ = new Subject<void>();\n possibleFilterValues$!: Observable<string[]>;\n possibleFilterValues: string[] = [];\n items$ = new BehaviorSubject<string[]>([]);\n\n constructor(\n store: Store,\n private searchService: SearchService\n ) {\n super(store);\n this.type = 'autocomplete';\n }\n\n override ngOnInit() {\n this.possibleFilterValues$ = this.store.select(SearchSelectors.possibleFilterValues(this.filter?.id));\n this.subscriptions.add(this.possibleFilterValues$.subscribe((values) => (this.possibleFilterValues = values)));\n\n super.ngOnInit();\n if (this.filter?.attributes) {\n this.store.dispatch(\n SearchActions.getPossibleFilterValues({\n filterId: this.filter?.id ?? '',\n attributes: (this.filter?.attributes as Omit<Attribute, 'customId'>[]).filter(\n (a) => !!a.datasource && !!a.id\n ),\n limit: this.filter?.limit ?? 10\n })\n );\n }\n\n this.search$.next(`${this._value}`);\n this.autocomplete$ = this.search$.pipe(\n distinctUntilChanged((p, v) => equal(p, v)),\n skipUntil(this.preventInitCall$),\n debounceTime(500),\n switchMap((search) => {\n if (!!search && search.length > 1) {\n this.loader = true;\n this.items$.next([]);\n return this.searchService.autocomplete(this.filter?.attributes, search, this.filter?.limit).pipe(\n tap(() => (this.loader = false)),\n catchError((err) => {\n this.loader = false;\n console.error('Autocomplete failed', err);\n return [];\n })\n );\n }\n return of([] as string[]);\n })\n );\n setTimeout(() => this.preventInitCall$.next(), 200);\n\n this.subscriptions.add(\n combineLatest([this.possibleFilterValues$, this.autocomplete$.pipe(startWith([] as string[]))])\n .pipe(map(([possibleValues, autocomplete]) => (autocomplete.length > 0 ? autocomplete : possibleValues)))\n .subscribe((values) => this.items$.next(values))\n );\n }\n\n resetAutocompleteValues() {\n if (this.items$.getValue().length !== this.possibleFilterValues.length) {\n this.items$.next(this.possibleFilterValues);\n }\n }\n\n setFilter(value: string) {\n if (value !== this.filter?.value) {\n super.updateFilter(value);\n }\n }\n\n updateSearch($event?: Event) {\n // @ts-ignore\n const value = $event ? $event.target!.value : '';\n this.search$.next(value);\n }\n\n clear() {\n this.search$.next('');\n }\n}\n","<pry-autocomplete-css></pry-autocomplete-css>\n<div\n class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown\"\n *ngIf=\"filter\"\n (keyup)=\"updateSearch($event)\"\n #ref\n>\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }}&nbsp;:&nbsp;</label>\n <pry-select\n [id]=\"filter.name\"\n [items]=\"items$ | async\"\n [ngModel]=\"filter.value\"\n (ngModelChange)=\"setFilter($event)\"\n [clearable]=\"true\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n aria-labelledby=\"item-label\"\n (blur)=\"updateSearch($event)\"\n [elementRef]=\"ref\"\n (cleared)=\"clear()\"\n [loading]=\"loader\"\n (clicked)=\"resetAutocompleteValues()\"\n ></pry-select>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport {\n BaseFilterComponent,\n BaseFilterModule,\n PryI18nModule,\n PryIconModule,\n PrySelectModule\n} from '@provoly/dashboard';\nimport { AutocompleteComponent } from './autocomplete.component';\nimport { PryAutocompleteCssComponent } from './style/css.component';\n\n@NgModule({\n declarations: [AutocompleteComponent, PryAutocompleteCssComponent],\n exports: [AutocompleteComponent],\n imports: [CommonModule, ReactiveFormsModule, FormsModule, PrySelectModule, PryIconModule, PryI18nModule]\n})\nexport class PryAutocompleteModule extends BaseFilterModule {\n override getComponent(): Type<BaseFilterComponent> {\n return AutocompleteComponent as Type<AutocompleteComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i5.PryAutocompleteCssComponent"],"mappings":";;;;;;;;;;;;;MAQa,2BAA2B,CAAA;8GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,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A2B,CAAA,EAAA,OAAA,EAAA,CAEvD,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,aAD7F,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAGpB,qBAAqB,EAAA,OAAA,EAAA,CAFtB,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAE5F,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;oBAClE,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,CAAC;AACzG,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"provoly-dashboard-filters-autocomplete.mjs","sources":["../../../../projects/provoly/dashboard/filters/autocomplete/style/css.component.ts","../../../../projects/provoly/dashboard/filters/autocomplete/autocomplete.component.ts","../../../../projects/provoly/dashboard/filters/autocomplete/autocomplete.component.html","../../../../projects/provoly/dashboard/filters/autocomplete/autocomplete.module.ts","../../../../projects/provoly/dashboard/filters/autocomplete/provoly-dashboard-filters-autocomplete.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-autocomplete-css',\n template: '',\n styleUrls: ['./_m-autocomplete.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryAutocompleteCssComponent {}\n","import { Component, EventEmitter, OnDestroy, OnInit } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { BaseFilterComponent, SearchActions, SearchSelectors, SearchService } from '@provoly/dashboard';\nimport {\n BehaviorSubject,\n catchError,\n combineLatest,\n debounceTime,\n distinctUntilChanged,\n map,\n Observable,\n of,\n skipUntil,\n startWith,\n Subject,\n switchMap\n} from 'rxjs';\nimport equal from 'fast-deep-equal/es6';\nimport { tap } from 'rxjs/operators';\nimport { Attribute } from '@provoly/dashboard/toolbox';\n\n@Component({\n selector: 'pry-autocomplete',\n templateUrl: './autocomplete.component.html'\n})\nexport class AutocompleteComponent extends BaseFilterComponent implements OnInit, OnDestroy {\n search$ = new BehaviorSubject<string>('');\n autocomplete$?: Observable<string[]>;\n loader: boolean = false;\n preventInitCall$ = new Subject<void>();\n possibleFilterValues$!: Observable<string[]>;\n possibleFilterValues: string[] = [];\n items$ = new BehaviorSubject<string[]>([]);\n\n constructor(\n store: Store,\n private searchService: SearchService\n ) {\n super(store);\n this.type = 'autocomplete';\n }\n\n override ngOnInit() {\n this.possibleFilterValues$ = this.store.select(SearchSelectors.possibleFilterValues(this.filter?.id));\n this.subscriptions.add(this.possibleFilterValues$.subscribe((values) => (this.possibleFilterValues = values)));\n\n super.ngOnInit();\n if (this.filter?.attributes) {\n this.store.dispatch(\n SearchActions.getPossibleFilterValues({\n filterId: this.filter?.id ?? '',\n attributes: (this.filter?.attributes as Omit<Attribute, 'customId'>[]).filter(\n (a) => !!a.datasource && !!a.id\n ),\n limit: this.filter?.limit ?? 10\n })\n );\n }\n\n this.search$.next(`${this._value}`);\n this.autocomplete$ = this.search$.pipe(\n distinctUntilChanged((p, v) => equal(p, v)),\n skipUntil(this.preventInitCall$),\n debounceTime(500),\n switchMap((search) => {\n if (!!search && search.length > 1) {\n this.loader = true;\n this.items$.next([]);\n return this.searchService.autocomplete(this.filter?.attributes, search, this.filter?.limit).pipe(\n tap(() => (this.loader = false)),\n catchError((err) => {\n this.loader = false;\n console.error('Autocomplete failed', err);\n return [];\n })\n );\n }\n return of([] as string[]);\n })\n );\n setTimeout(() => this.preventInitCall$.next(), 200);\n\n this.subscriptions.add(\n combineLatest([this.possibleFilterValues$, this.autocomplete$.pipe(startWith([] as string[]))])\n .pipe(map(([possibleValues, autocomplete]) => (autocomplete.length > 0 ? autocomplete : possibleValues)))\n .subscribe((values) => this.items$.next(values))\n );\n }\n\n resetAutocompleteValues() {\n if (this.items$.getValue()?.length !== this.possibleFilterValues?.length) {\n this.items$.next(this.possibleFilterValues);\n }\n }\n\n setFilter(value: string) {\n if (value !== this.filter?.value) {\n super.updateFilter(value);\n }\n }\n\n updateSearch($event?: Event) {\n // @ts-ignore\n const value = $event ? $event.target!.value : '';\n this.search$.next(value);\n }\n\n clear() {\n this.search$.next('');\n }\n}\n","<pry-autocomplete-css></pry-autocomplete-css>\n<div\n class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown\"\n *ngIf=\"filter\"\n (keyup)=\"updateSearch($event)\"\n #ref\n>\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }}&nbsp;:&nbsp;</label>\n <pry-select\n [id]=\"filter.name\"\n [items]=\"items$ | async\"\n [ngModel]=\"filter.value\"\n (ngModelChange)=\"setFilter($event)\"\n [clearable]=\"true\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n aria-labelledby=\"item-label\"\n (blur)=\"updateSearch($event)\"\n [elementRef]=\"ref\"\n (cleared)=\"clear()\"\n [loading]=\"loader\"\n (clicked)=\"resetAutocompleteValues()\"\n ></pry-select>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport {\n BaseFilterComponent,\n BaseFilterModule,\n PryI18nModule,\n PryIconModule,\n PrySelectModule\n} from '@provoly/dashboard';\nimport { AutocompleteComponent } from './autocomplete.component';\nimport { PryAutocompleteCssComponent } from './style/css.component';\n\n@NgModule({\n declarations: [AutocompleteComponent, PryAutocompleteCssComponent],\n exports: [AutocompleteComponent],\n imports: [CommonModule, ReactiveFormsModule, FormsModule, PrySelectModule, PryIconModule, PryI18nModule]\n})\nexport class PryAutocompleteModule extends BaseFilterModule {\n override getComponent(): Type<BaseFilterComponent> {\n return AutocompleteComponent as Type<AutocompleteComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i5.PryAutocompleteCssComponent"],"mappings":";;;;;;;;;;;;;MAQa,2BAA2B,CAAA;8GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,4DAJ5B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,sNAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAID,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EACtB,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,sNAAA,CAAA,EAAA,CAAA;;;ACmBjC,MAAO,qBAAsB,SAAQ,mBAAmB,CAAA;IAS5D,WACE,CAAA,KAAY,EACJ,aAA4B,EAAA;QAEpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAFL,IAAa,CAAA,aAAA,GAAb,aAAa,CAAe;AAVtC,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAS,EAAE,CAAC,CAAC;QAE1C,IAAM,CAAA,MAAA,GAAY,KAAK,CAAC;AACxB,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAQ,CAAC;QAEvC,IAAoB,CAAA,oBAAA,GAAa,EAAE,CAAC;AACpC,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe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AAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAArB,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,qBAAqB,iBAJjB,qBAAqB,EAAE,2BAA2B,CAAA,EAAA,OAAA,EAAA,CAEvD,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,aAD7F,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAGpB,qBAAqB,EAAA,OAAA,EAAA,CAFtB,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAE5F,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;oBAClE,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,CAAC;AACzG,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
@@ -9,7 +9,7 @@ import { EventEmitter, Component, Input, Output, ViewEncapsulation, TemplateRef,
9
9
  import * as i4 from '@angular/forms';
10
10
  import { FormsModule } from '@angular/forms';
11
11
  import * as i3$1 from '@provoly/dashboard';
12
- import { SubscriptionnerDirective, DashboardActions, ConfigActions, DashboardSelectors, DataSourceSelectors, ClassSelectors, FieldSelectors, FieldType, NamedQueryTypes, DataSourceActions, MIME_TYPE_RESULTSET, LibraryTypes, ViewMode, DashboardGridLayout, WidgetPlacementUtils, SearchActions, PRY_ACCESS_TOKEN, PryOverlayModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryShareModule, PryI18nModule } from '@provoly/dashboard';
12
+ import { SubscriptionnerDirective, DashboardActions, ConfigActions, DashboardSelectors, DataSourceSelectors, ClassSelectors, FieldSelectors, FieldType, NamedQueryTypes, DataSourceActions, MIME_TYPE_RESULTSET, LibraryTypes, ViewMode, DashboardGridLayout, WidgetPlacementUtils, SearchActions, PryVisibilityType, canManifestBeMadePublic, getCommonDatasourceGroupsForManifest, PRY_ACCESS_TOKEN, PryOverlayModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryShareModule, PryI18nModule } from '@provoly/dashboard';
13
13
  import * as i6 from '@provoly/dashboard/components/checkbox';
14
14
  import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
15
15
  import * as i6$1 from '@provoly/dashboard/components/stepper';
@@ -854,10 +854,25 @@ class ShareComponent extends ToolboxActionComponent {
854
854
  this.viewContainerRef = viewContainerRef;
855
855
  this.modalOpened = false;
856
856
  this.accessGroups = [];
857
+ this.shareRadioValue$ = new BehaviorSubject(undefined);
858
+ this.disableShareButton$ = new BehaviorSubject(false);
857
859
  this.subscriptions.add(this.store.select(DashboardSelectors.presentation).subscribe((prez) => {
858
- this.presentation = prez;
860
+ this.presentation = prez.current;
859
861
  this.accessGroups = prez?.current?.groups ?? [];
860
862
  }));
863
+ this.disableShareRadios$ = this.store.select(DataSourceSelectors.datasets).pipe(map((datasets) => {
864
+ return {
865
+ [PryVisibilityType.PRIVATE]: false,
866
+ [PryVisibilityType.PUBLIC]: this.presentation ? !canManifestBeMadePublic(this.presentation, datasets) : true,
867
+ [PryVisibilityType.RESTRICTED]: this.presentation
868
+ ? !(canManifestBeMadePublic(this.presentation, datasets) ||
869
+ getCommonDatasourceGroupsForManifest(this.presentation, datasets).length > 0)
870
+ : true
871
+ };
872
+ }));
873
+ this.allowedShareGroups$ = this.store.select(DataSourceSelectors.datasets).pipe(map((datasets) => {
874
+ return this.presentation ? getCommonDatasourceGroupsForManifest(this.presentation, datasets) : [];
875
+ }));
861
876
  }
862
877
  trigger() {
863
878
  this.toggleModal();
@@ -865,9 +880,6 @@ class ShareComponent extends ToolboxActionComponent {
865
880
  toggleModal() {
866
881
  this.modalOpened = !this.modalOpened;
867
882
  if (this.modalOpened && this.presentation) {
868
- this.store.dispatch(DashboardActions.selectPresentation({ presentation: this.presentation.current, viewMode: ViewMode.CATALOG }));
869
- /* we need to load manifest in order to be able to save it later */
870
- this.store.dispatch(DashboardActions.loadManifest({ id: this.presentation.current.id }));
871
883
  this.overlayRef = this.overlay.create(new OverlayConfig({
872
884
  hasBackdrop: true,
873
885
  panelClass: ['o-modal-wrapper'],
@@ -882,24 +894,40 @@ class ShareComponent extends ToolboxActionComponent {
882
894
  this.close();
883
895
  }
884
896
  }
885
- changeVisibility() {
886
- if (this.presentation) {
887
- this.store.dispatch(DashboardActions.saveManifest({
888
- id: this.presentation.current.id ?? '',
889
- name: this.presentation.current.name ?? '',
890
- description: this.presentation.current.description ?? '',
891
- image: this.presentation.current.image ?? '',
892
- groups: this.accessGroups
893
- }));
894
- }
897
+ validate() {
898
+ this.store.dispatch(DashboardActions.saveManifest({
899
+ id: this.presentation.id ?? '',
900
+ name: this.presentation.name ?? '',
901
+ description: this.presentation.description ?? '',
902
+ image: this.presentation.image ?? '',
903
+ groups: this.accessGroups
904
+ }));
895
905
  this.toggleModal();
896
906
  }
907
+ updateAccessGroups($event) {
908
+ this.accessGroups = $event;
909
+ this.updateDisableButtonValue();
910
+ }
911
+ updateVisibility($event) {
912
+ this.shareRadioValue$.next($event);
913
+ this.updateDisableButtonValue();
914
+ }
915
+ updateDisableButtonValue() {
916
+ if (this.shareRadioValue$.getValue() === PryVisibilityType.RESTRICTED && this.accessGroups.length === 0) {
917
+ this.disableShareButton$.next(true);
918
+ }
919
+ else {
920
+ if (this.disableShareButton$.getValue()) {
921
+ this.disableShareButton$.next(false);
922
+ }
923
+ }
924
+ }
897
925
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ShareComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
898
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: ShareComponent, selector: "pry-share-pres", viewQueries: [{ propertyName: "template", first: true, predicate: ["modal"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"this.presentation?.current?.owner\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.share' | i18n }}</ng-container>\n </button>\n</ng-container>\n<ng-template #modal>\n <div\n class=\"o-modal\"\n #visibilityModal\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog change visibility\"\n *ngIf=\"presentation as selectedPresentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.toolbox.share' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #crossVisibility (click)=\"toggleModal()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-group-share\n [ngModel]=\"selectedPresentation.current?.groups\"\n (ngModelChange)=\"accessGroups = $event\"\n ></pry-group-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" class=\"a-btn a-btn--primary\" #submit (click)=\"changeVisibility()\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3$1.PryGroupShareComponent, selector: "pry-group-share", inputs: ["disableRadios", "allowedGroups"], outputs: ["radioValueChange"] }, { kind: "pipe", type: i3$1.I18nPipe, name: "i18n" }] }); }
926
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: ShareComponent, selector: "pry-share-pres", viewQueries: [{ propertyName: "template", first: true, predicate: ["modal"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"presentation?.owner\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.share' | i18n }}</ng-container>\n </button>\n</ng-container>\n<ng-template #modal>\n <div\n class=\"o-modal\"\n #visibilityModal\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog change visibility\"\n *ngIf=\"presentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.toolbox.share' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #crossVisibility (click)=\"toggleModal()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-group-share\n [ngModel]=\"presentation.groups\"\n [disableRadios]=\"disableShareRadios$ | async\"\n [allowedGroups]=\"allowedShareGroups$ | async\"\n (ngModelChange)=\"updateAccessGroups($event)\"\n (radioValueChange)=\"updateVisibility($event)\"\n ></pry-group-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" class=\"a-btn a-btn--primary\" #submit (click)=\"validate()\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3$1.PryGroupShareComponent, selector: "pry-group-share", inputs: ["disableRadios", "allowedGroups"], outputs: ["radioValueChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.I18nPipe, name: "i18n" }] }); }
899
927
  }
900
928
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ShareComponent, decorators: [{
901
929
  type: Component,
902
- args: [{ selector: 'pry-share-pres', template: "<ng-container *ngIf=\"this.presentation?.current?.owner\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.share' | i18n }}</ng-container>\n </button>\n</ng-container>\n<ng-template #modal>\n <div\n class=\"o-modal\"\n #visibilityModal\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog change visibility\"\n *ngIf=\"presentation as selectedPresentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.toolbox.share' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #crossVisibility (click)=\"toggleModal()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-group-share\n [ngModel]=\"selectedPresentation.current?.groups\"\n (ngModelChange)=\"accessGroups = $event\"\n ></pry-group-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" class=\"a-btn a-btn--primary\" #submit (click)=\"changeVisibility()\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
930
+ args: [{ selector: 'pry-share-pres', template: "<ng-container *ngIf=\"presentation?.owner\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.share' | i18n }}</ng-container>\n </button>\n</ng-container>\n<ng-template #modal>\n <div\n class=\"o-modal\"\n #visibilityModal\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog change visibility\"\n *ngIf=\"presentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.toolbox.share' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #crossVisibility (click)=\"toggleModal()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-group-share\n [ngModel]=\"presentation.groups\"\n [disableRadios]=\"disableShareRadios$ | async\"\n [allowedGroups]=\"allowedShareGroups$ | async\"\n (ngModelChange)=\"updateAccessGroups($event)\"\n (radioValueChange)=\"updateVisibility($event)\"\n ></pry-group-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" class=\"a-btn a-btn--primary\" #submit (click)=\"validate()\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
903
931
  }], ctorParameters: () => [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }], propDecorators: { template: [{
904
932
  type: ViewChild,
905
933
  args: ['modal', { read: TemplateRef }]