@provoly/dashboard 1.1.2 → 1.1.3
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/dataset/components/dataset-detail/dataset-detail.component.d.ts +1 -0
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +4 -3
- package/esm2022/lib/core/components/share/access-rights-share/access-rights-share.component.mjs +127 -0
- package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +1 -1
- package/esm2022/lib/core/components/share/legacy-share/share.component.mjs +83 -0
- package/esm2022/lib/core/components/share/share.module.mjs +9 -7
- package/esm2022/lib/core/components/share/share.utils.mjs +46 -1
- package/esm2022/lib/core/i18n/en.translations.mjs +15 -7
- package/esm2022/lib/core/i18n/fr.translations.mjs +16 -7
- package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
- package/esm2022/lib/core/public-api.mjs +3 -2
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +1 -1
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +2 -2
- package/esm2022/lib/dashboard/store/manifest.service.mjs +3 -3
- package/esm2022/presentation/components/presentation.component.mjs +13 -25
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +8 -8
- package/esm2022/toolbox/components/share/share.component.mjs +9 -15
- package/fesm2022/provoly-dashboard-dataset.mjs +3 -2
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +12 -24
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +15 -21
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +195 -21
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/share/access-rights-share/access-rights-share.component.d.ts +47 -0
- package/lib/core/components/share/{share.component.d.ts → legacy-share/share.component.d.ts} +1 -1
- package/lib/core/components/share/share.module.d.ts +10 -8
- package/lib/core/components/share/share.utils.d.ts +18 -0
- package/lib/core/i18n/en.translations.d.ts +12 -4
- package/lib/core/i18n/fr.translations.d.ts +13 -4
- package/lib/core/model/manifest.interface.d.ts +3 -1
- package/lib/core/public-api.d.ts +2 -1
- package/lib/dashboard/store/dashboard.actions.d.ts +6 -2
- package/lib/dashboard/store/manifest.service.d.ts +3 -1
- package/package.json +1 -1
- package/presentation/components/presentation.component.d.ts +7 -7
- package/styles/components/_o-access-rights-share.scss +73 -0
- package/styles/components/_o-pry-admin-classes-customize.scss +4 -4
- package/styles/main.scss +1 -0
- package/toolbox/components/save-view/save-view.component.d.ts +6 -2
- package/toolbox/components/share/share.component.d.ts +6 -4
- package/esm2022/lib/core/components/share/share.component.mjs +0 -83
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import { Store } from '@ngrx/store';
|
|
3
|
+
import { SubscriptionnerDirective } from '../../../../dashboard/components/subscriptionner.directive';
|
|
4
|
+
import { Group } from '../share.model';
|
|
5
|
+
import { ManifestDescription } from '../../../model/manifest.interface';
|
|
6
|
+
import { PryI18nService } from '../../../i18n/i18n.service';
|
|
7
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class PryAccessRightsShareComponent extends SubscriptionnerDirective implements ControlValueAccessor {
|
|
10
|
+
private store;
|
|
11
|
+
protected i18n: PryI18nService;
|
|
12
|
+
value: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
private _onChange;
|
|
16
|
+
private _onTouched;
|
|
17
|
+
manifestDescription?: ManifestDescription;
|
|
18
|
+
_allowedGroups$: BehaviorSubject<string[] | undefined>;
|
|
19
|
+
set allowedGroups(value: string[] | null);
|
|
20
|
+
groups$: Observable<(Group & {
|
|
21
|
+
label: string;
|
|
22
|
+
})[]>;
|
|
23
|
+
accessRights: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
selectedGroups?: Group[];
|
|
28
|
+
selectedAccessRight: string;
|
|
29
|
+
assignedGroups$: BehaviorSubject<string[]>;
|
|
30
|
+
constructor(store: Store, i18n: PryI18nService);
|
|
31
|
+
writeValue(value: {
|
|
32
|
+
[key: string]: string[];
|
|
33
|
+
} | undefined): void;
|
|
34
|
+
registerOnChange(fn: any): void;
|
|
35
|
+
registerOnTouched(fn: any): void;
|
|
36
|
+
onChange(): void;
|
|
37
|
+
addAccess(): void;
|
|
38
|
+
modifyGroupAccess(group: string, access: string): void;
|
|
39
|
+
removeGroupAccess(group: string): void;
|
|
40
|
+
resetSelection(): void;
|
|
41
|
+
isAddingDisabled(): boolean;
|
|
42
|
+
emitAlreadyAssignedGroups(): void;
|
|
43
|
+
protected readonly getGroupLabel: (group: Group, i18n: PryI18nService) => string;
|
|
44
|
+
protected readonly getGroupLabelByName: (groupName: string, i18n: PryI18nService) => string;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PryAccessRightsShareComponent, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PryAccessRightsShareComponent, "pry-access-rights-share", never, { "manifestDescription": { "alias": "manifestDescription"; "required": true; }; "allowedGroups": { "alias": "allowedGroups"; "required": false; }; }, {}, never, never, false, never>;
|
|
47
|
+
}
|
package/lib/core/components/share/{share.component.d.ts → legacy-share/share.component.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { PryVisibility, PryVisibilityType } from '
|
|
4
|
+
import { PryVisibility, PryVisibilityType } from '../share.model';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class PryShareComponent implements ControlValueAccessor, OnInit {
|
|
7
7
|
private _cd;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./share.component";
|
|
2
|
+
import * as i1 from "./legacy-share/share.component";
|
|
3
3
|
import * as i2 from "./group-share/group-share.component";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@angular/
|
|
6
|
-
import * as i5 from "
|
|
7
|
-
import * as i6 from "
|
|
8
|
-
import * as i7 from "../../
|
|
9
|
-
import * as i8 from "
|
|
4
|
+
import * as i3 from "./access-rights-share/access-rights-share.component";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "../select/select.module";
|
|
8
|
+
import * as i7 from "../../i18n/i18n.module";
|
|
9
|
+
import * as i8 from "../../core.module";
|
|
10
|
+
import * as i9 from "../../../dashboard/dashboard.module";
|
|
11
|
+
import * as i10 from "../icon/icon.module";
|
|
10
12
|
export declare class PryShareModule {
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<PryShareModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PryShareModule, [typeof i1.PryShareComponent, typeof i2.PryGroupShareComponent], [typeof
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PryShareModule, [typeof i1.PryShareComponent, typeof i2.PryGroupShareComponent, typeof i3.PryAccessRightsShareComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.PrySelectModule, typeof i7.PryI18nModule, typeof i8.PryCoreModule, typeof i9.PryDashboardModule, typeof i10.PryIconModule], [typeof i1.PryShareComponent, typeof i2.PryGroupShareComponent, typeof i3.PryAccessRightsShareComponent]>;
|
|
13
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<PryShareModule>;
|
|
14
16
|
}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { ManifestDescription } from '../../model/manifest.interface';
|
|
2
2
|
import { Dataset } from '../../store/data-source/data-source.model';
|
|
3
|
+
import { Group } from './share.model';
|
|
4
|
+
import { PryI18nService } from '../../i18n/i18n.service';
|
|
5
|
+
export declare const READ_ACCESS = "READ";
|
|
6
|
+
export declare const WRITE_ACCESS = "WRITE";
|
|
7
|
+
export declare const getGroupLabel: (group: Group, i18n: PryI18nService) => string;
|
|
8
|
+
export declare const getGroupLabelByName: (groupName: string, i18n: PryI18nService) => string;
|
|
3
9
|
export declare const canManifestBeMadePublic: (manifest: ManifestDescription, datasets: Dataset[]) => boolean;
|
|
4
10
|
export declare const getCommonDatasourceGroupsForManifest: (manifest: ManifestDescription, datasets: Dataset[]) => string[];
|
|
11
|
+
export declare const getAccessRightsArrayByGroup: (accessByGroup: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
}) => {
|
|
14
|
+
[key: string]: string[];
|
|
15
|
+
};
|
|
16
|
+
export declare const getAccessArray: (access: string) => string[];
|
|
17
|
+
export declare const getAccessRightsStringByGroup: (accessByGroup: {
|
|
18
|
+
[key: string]: string[];
|
|
19
|
+
}) => {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const getAccessString: (accessArray: string[]) => string;
|
|
@@ -163,6 +163,7 @@ export declare const enTranslations: {
|
|
|
163
163
|
switchEdit: string;
|
|
164
164
|
switchEditContent: string;
|
|
165
165
|
share: string;
|
|
166
|
+
shareAccessRights: string;
|
|
166
167
|
delete: string;
|
|
167
168
|
notInDsAttr: string;
|
|
168
169
|
};
|
|
@@ -300,11 +301,22 @@ export declare const enTranslations: {
|
|
|
300
301
|
type: string;
|
|
301
302
|
users: string;
|
|
302
303
|
noGroups: string;
|
|
304
|
+
groups: {
|
|
305
|
+
ALL: string;
|
|
306
|
+
AUTHENTICATED: string;
|
|
307
|
+
};
|
|
303
308
|
conflict: {
|
|
304
309
|
title: string;
|
|
305
310
|
main: string;
|
|
306
311
|
unavailable: string;
|
|
307
312
|
};
|
|
313
|
+
dashboardAccess: string;
|
|
314
|
+
placeholder: string;
|
|
315
|
+
read: string;
|
|
316
|
+
write: string;
|
|
317
|
+
accessDescription: string;
|
|
318
|
+
me: string;
|
|
319
|
+
owner: string;
|
|
308
320
|
};
|
|
309
321
|
homepage: {
|
|
310
322
|
menu: {
|
|
@@ -331,10 +343,6 @@ export declare const enTranslations: {
|
|
|
331
343
|
selectItem: string;
|
|
332
344
|
unselectItem: string;
|
|
333
345
|
noItemSelected: string;
|
|
334
|
-
groups: {
|
|
335
|
-
ALL: string;
|
|
336
|
-
AUTHENTICATED: string;
|
|
337
|
-
};
|
|
338
346
|
};
|
|
339
347
|
};
|
|
340
348
|
};
|
|
@@ -163,6 +163,7 @@ export declare const frTranslations: {
|
|
|
163
163
|
switchEdit: string;
|
|
164
164
|
switchEditContent: string;
|
|
165
165
|
share: string;
|
|
166
|
+
shareAccessRights: string;
|
|
166
167
|
delete: string;
|
|
167
168
|
notInDsAttr: string;
|
|
168
169
|
};
|
|
@@ -219,6 +220,7 @@ export declare const frTranslations: {
|
|
|
219
220
|
};
|
|
220
221
|
};
|
|
221
222
|
action: {
|
|
223
|
+
add: string;
|
|
222
224
|
close: string;
|
|
223
225
|
closePanel: string;
|
|
224
226
|
delete: string;
|
|
@@ -300,12 +302,23 @@ export declare const frTranslations: {
|
|
|
300
302
|
restricted: string;
|
|
301
303
|
type: string;
|
|
302
304
|
users: string;
|
|
305
|
+
groups: {
|
|
306
|
+
ALL: string;
|
|
307
|
+
AUTHENTICATED: string;
|
|
308
|
+
};
|
|
303
309
|
noGroups: string;
|
|
304
310
|
conflict: {
|
|
305
311
|
title: string;
|
|
306
312
|
main: string;
|
|
307
313
|
unavailable: string;
|
|
308
314
|
};
|
|
315
|
+
dashboardAccess: string;
|
|
316
|
+
placeholder: string;
|
|
317
|
+
read: string;
|
|
318
|
+
write: string;
|
|
319
|
+
accessDescription: string;
|
|
320
|
+
me: string;
|
|
321
|
+
owner: string;
|
|
309
322
|
};
|
|
310
323
|
homepage: {
|
|
311
324
|
menu: {
|
|
@@ -332,10 +345,6 @@ export declare const frTranslations: {
|
|
|
332
345
|
selectItem: string;
|
|
333
346
|
unselectItem: string;
|
|
334
347
|
noItemSelected: string;
|
|
335
|
-
groups: {
|
|
336
|
-
ALL: string;
|
|
337
|
-
AUTHENTICATED: string;
|
|
338
|
-
};
|
|
339
348
|
};
|
|
340
349
|
};
|
|
341
350
|
};
|
|
@@ -19,7 +19,9 @@ export interface ManifestDescription {
|
|
|
19
19
|
image: string;
|
|
20
20
|
creationDate: string;
|
|
21
21
|
modificationDate: string;
|
|
22
|
-
|
|
22
|
+
accessRightsByGroup: {
|
|
23
|
+
[key: string]: string[];
|
|
24
|
+
};
|
|
23
25
|
owner: boolean;
|
|
24
26
|
datasource: string[];
|
|
25
27
|
metadata?: MetadataValue[];
|
package/lib/core/public-api.d.ts
CHANGED
|
@@ -90,8 +90,9 @@ export * from './components/select/select.component';
|
|
|
90
90
|
export * from './components/select/select.module';
|
|
91
91
|
export * from './components/range/range.component';
|
|
92
92
|
export * from './components/range/range.module';
|
|
93
|
-
export * from './components/share/share.component';
|
|
93
|
+
export * from './components/share/legacy-share/share.component';
|
|
94
94
|
export * from './components/share/group-share/group-share.component';
|
|
95
|
+
export * from './components/share/access-rights-share/access-rights-share.component';
|
|
95
96
|
export * from './components/share/share.model';
|
|
96
97
|
export * from './components/share/share.utils';
|
|
97
98
|
export * from './components/share/share.module';
|
|
@@ -247,7 +247,9 @@ export declare const DashboardActions: {
|
|
|
247
247
|
metadataDefId: string;
|
|
248
248
|
value: string;
|
|
249
249
|
}[] | undefined;
|
|
250
|
-
|
|
250
|
+
accessRightsByGroup?: {
|
|
251
|
+
[key: string]: string[];
|
|
252
|
+
} | undefined;
|
|
251
253
|
additionalInformation?: string | undefined;
|
|
252
254
|
}) => {
|
|
253
255
|
name: string;
|
|
@@ -259,7 +261,9 @@ export declare const DashboardActions: {
|
|
|
259
261
|
metadataDefId: string;
|
|
260
262
|
value: string;
|
|
261
263
|
}[] | undefined;
|
|
262
|
-
|
|
264
|
+
accessRightsByGroup?: {
|
|
265
|
+
[key: string]: string[];
|
|
266
|
+
} | undefined;
|
|
263
267
|
additionalInformation?: string | undefined;
|
|
264
268
|
} & import("@ngrx/store/src/models").TypedAction<"[Dashboard] save manifest">>;
|
|
265
269
|
solveCollisions: import("@ngrx/store").ActionCreator<"[Dashboard] solving collisions", () => import("@ngrx/store/src/models").TypedAction<"[Dashboard] solving collisions">>;
|
|
@@ -17,7 +17,9 @@ export declare class ManifestService {
|
|
|
17
17
|
save(name: string, manifest: GlobalManifest, id: string, description?: string, image?: string, metadata?: {
|
|
18
18
|
metadataDefId: string;
|
|
19
19
|
value: string;
|
|
20
|
-
}[],
|
|
20
|
+
}[], accesRightsByGroup?: {
|
|
21
|
+
[key: string]: string[];
|
|
22
|
+
}, additionalInformation?: string): Observable<ShareConflict>;
|
|
21
23
|
delete(id: string): Observable<void>;
|
|
22
24
|
default(id: string): Observable<boolean>;
|
|
23
25
|
addMetadata(presentationId: string, metadataId: string, value: string): Observable<void>;
|
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ export declare class PryPresentationComponent extends SubscriptionnerDirective {
|
|
|
16
16
|
private access;
|
|
17
17
|
manifests$: Observable<ManifestDescription[]>;
|
|
18
18
|
selectedPresentation$: BehaviorSubject<ManifestDescription | null>;
|
|
19
|
-
presentation?: ManifestDescription;
|
|
20
19
|
staticManifest$?: Observable<DashboardManifest>;
|
|
21
20
|
selectedMode: ViewMode;
|
|
22
21
|
modalOpened: boolean;
|
|
@@ -29,7 +28,9 @@ export declare class PryPresentationComponent extends SubscriptionnerDirective {
|
|
|
29
28
|
crossVisibility: ElementRef<HTMLButtonElement>;
|
|
30
29
|
visibilityModal: ElementRef;
|
|
31
30
|
overlayRef?: OverlayRef;
|
|
32
|
-
|
|
31
|
+
accessRightsByGroup: {
|
|
32
|
+
[key: string]: string[];
|
|
33
|
+
};
|
|
33
34
|
editionStartUrl: string;
|
|
34
35
|
consultStartUrl: string;
|
|
35
36
|
meAsOwner?: string;
|
|
@@ -37,11 +38,7 @@ export declare class PryPresentationComponent extends SubscriptionnerDirective {
|
|
|
37
38
|
search$: BehaviorSubject<string>;
|
|
38
39
|
filteredPresentations$: Observable<ManifestDescription[]>;
|
|
39
40
|
listOfManifests$: BehaviorSubject<ManifestDescription[] | null>;
|
|
40
|
-
disableShareRadios$: Observable<{
|
|
41
|
-
[key in PryVisibilityType]: boolean;
|
|
42
|
-
}>;
|
|
43
41
|
allowedShareGroups$: Observable<string[]>;
|
|
44
|
-
shareRadioValue$: BehaviorSubject<PryVisibilityType | undefined>;
|
|
45
42
|
disableShareButton$: BehaviorSubject<boolean>;
|
|
46
43
|
mode: 'theme' | 'meta';
|
|
47
44
|
set listOfManifests(manifests: ManifestDescription[] | null);
|
|
@@ -60,9 +57,12 @@ export declare class PryPresentationComponent extends SubscriptionnerDirective {
|
|
|
60
57
|
focusCrossElement(): void;
|
|
61
58
|
focusValidation(): void;
|
|
62
59
|
editContent(selectedPresentation: ManifestDescription): void;
|
|
63
|
-
|
|
60
|
+
updateAccessRights($event: {
|
|
61
|
+
[key: string]: string[];
|
|
62
|
+
}): void;
|
|
64
63
|
updateVisibility($event: PryVisibilityType): void;
|
|
65
64
|
updateDisableButtonValue(): void;
|
|
65
|
+
isPrivate(presentation: ManifestDescription): boolean;
|
|
66
66
|
canModify$(presentation: ManifestDescription): Observable<boolean>;
|
|
67
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<PryPresentationComponent, [null, null, null, null, null, null, null, { optional: true; }]>;
|
|
68
68
|
static ɵcmp: i0.ɵɵComponentDeclaration<PryPresentationComponent, "pry-presentation", never, { "editionStartUrl": { "alias": "editionStartUrl"; "required": false; }; "consultStartUrl": { "alias": "consultStartUrl"; "required": false; }; "meAsOwner": { "alias": "meAsOwner"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "listOfManifests": { "alias": "listOfManifests"; "required": false; }; "hideToolbox": { "alias": "hideToolbox"; "required": false; }; "search": { "alias": "search"; "required": false; }; }, {}, never, never, false, never>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@use '../abstracts' as *;
|
|
2
|
+
@use '../../styles-theme/abstracts-theme/variables.theme' as *;
|
|
3
|
+
|
|
4
|
+
body:has(pry-access-rights-share) {
|
|
5
|
+
.o-modal-wrapper {
|
|
6
|
+
padding: toRem(35) toRem(50);
|
|
7
|
+
min-width: toRem(790);
|
|
8
|
+
|
|
9
|
+
.a-h2 {
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.o-access-rights-share {
|
|
16
|
+
form {
|
|
17
|
+
gap: toRem(20);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.m-grouped-select {
|
|
21
|
+
border-radius: toRem(5);
|
|
22
|
+
border: 1px solid themed($theme-map, 'color', 'primary', 600);
|
|
23
|
+
flex: 2;
|
|
24
|
+
|
|
25
|
+
> :first-child {
|
|
26
|
+
border-right: 1px solid themed($theme-map, 'color', 'primary', 600);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.a-pry-select {
|
|
31
|
+
border: none;
|
|
32
|
+
max-width: toRem(450);
|
|
33
|
+
align-items: center;
|
|
34
|
+
|
|
35
|
+
&__content {
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__group-select {
|
|
41
|
+
flex: 2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__access-rights-select {
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.a-label {
|
|
49
|
+
color: themed($theme-map, 'color', 'primary', 500);
|
|
50
|
+
font-size: toRem(12);
|
|
51
|
+
margin: toRem(10) 0 0 toRem(10);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__groups {
|
|
55
|
+
margin: toRem(30) toRem(150) 0 toRem(15);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__group {
|
|
59
|
+
.a-pry-select {
|
|
60
|
+
padding-right: 0;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__group-name {
|
|
65
|
+
padding: 0;
|
|
66
|
+
margin: auto 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__owner {
|
|
70
|
+
font-style: italic;
|
|
71
|
+
font-size: toRem(12);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -73,6 +73,10 @@
|
|
|
73
73
|
.m-tooltip {
|
|
74
74
|
margin-top: toRem(20);
|
|
75
75
|
}
|
|
76
|
+
|
|
77
|
+
pry-select {
|
|
78
|
+
flex: 1;
|
|
79
|
+
}
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
.container {
|
|
@@ -105,10 +109,6 @@
|
|
|
105
109
|
cursor: move;
|
|
106
110
|
}
|
|
107
111
|
|
|
108
|
-
pry-select {
|
|
109
|
-
flex: 1;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
112
|
.cdk-drag-preview {
|
|
113
113
|
border-radius: toRem(4);
|
|
114
114
|
box-shadow:
|
package/styles/main.scss
CHANGED
|
@@ -21,7 +21,9 @@ export declare class SaveViewComponent extends ToolboxActionComponent {
|
|
|
21
21
|
templateSaveAs: TemplateRef<any>;
|
|
22
22
|
overlayRefDirectSaveType?: OverlayRef;
|
|
23
23
|
templateDirectSaveType: TemplateRef<any>;
|
|
24
|
-
|
|
24
|
+
accessRightsByGroup: {
|
|
25
|
+
[key: string]: string[];
|
|
26
|
+
};
|
|
25
27
|
type: LibraryTypes;
|
|
26
28
|
saveTypeOpened: boolean;
|
|
27
29
|
currentManifest?: ManifestDescription;
|
|
@@ -35,7 +37,9 @@ export declare class SaveViewComponent extends ToolboxActionComponent {
|
|
|
35
37
|
toggleSaveAs(): void;
|
|
36
38
|
save(): void;
|
|
37
39
|
closeModals(): void;
|
|
38
|
-
|
|
40
|
+
changeAccessRights($event: {
|
|
41
|
+
[key: string]: string[];
|
|
42
|
+
}): void;
|
|
39
43
|
changeValue($event: string): void;
|
|
40
44
|
changeDescr($event: string): void;
|
|
41
45
|
openSaveAs(): void;
|
|
@@ -11,20 +11,22 @@ export declare class ShareComponent extends ToolboxActionComponent {
|
|
|
11
11
|
presentation?: ManifestDescription;
|
|
12
12
|
modalOpened: boolean;
|
|
13
13
|
overlayRef?: OverlayRef;
|
|
14
|
-
|
|
14
|
+
accessRightsByGroup: {
|
|
15
|
+
[key: string]: string[];
|
|
16
|
+
};
|
|
15
17
|
template: TemplateRef<any>;
|
|
16
18
|
disableShareRadios$: Observable<{
|
|
17
19
|
[key in PryVisibilityType]: boolean;
|
|
18
20
|
}>;
|
|
19
21
|
allowedShareGroups$: Observable<string[]>;
|
|
20
|
-
shareRadioValue$: BehaviorSubject<PryVisibilityType | undefined>;
|
|
21
22
|
disableShareButton$: BehaviorSubject<boolean>;
|
|
22
23
|
constructor(store: Store, overlay: Overlay, viewContainerRef: ViewContainerRef);
|
|
23
24
|
trigger(): void;
|
|
24
25
|
toggleModal(): void;
|
|
25
26
|
validate(): void;
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
updateAccessRights($event: {
|
|
28
|
+
[key: string]: string[];
|
|
29
|
+
}): void;
|
|
28
30
|
updateDisableButtonValue(): void;
|
|
29
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<ShareComponent, never>;
|
|
30
32
|
static ɵcmp: i0.ɵɵComponentDeclaration<ShareComponent, "pry-share-pres", never, {}, {}, never, never, false, never>;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, forwardRef, Input } from '@angular/core';
|
|
2
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
-
import equal from 'fast-deep-equal/es6';
|
|
4
|
-
import { PryVisibilityType } from './share.model';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@angular/common";
|
|
7
|
-
import * as i2 from "@angular/forms";
|
|
8
|
-
import * as i3 from "../select/select.component";
|
|
9
|
-
import * as i4 from "../../i18n/i18n.pipe";
|
|
10
|
-
export class PryShareComponent {
|
|
11
|
-
constructor(_cd) {
|
|
12
|
-
this._cd = _cd;
|
|
13
|
-
this._onChange = (_) => { };
|
|
14
|
-
this._onTouched = () => { };
|
|
15
|
-
this._disabled = false;
|
|
16
|
-
this.PryVisibilityType = PryVisibilityType;
|
|
17
|
-
this.labelProperty = 'label';
|
|
18
|
-
this.valueProperty = 'value';
|
|
19
|
-
this.users$ = null;
|
|
20
|
-
this.visibilityTypes = [];
|
|
21
|
-
}
|
|
22
|
-
ngOnInit() {
|
|
23
|
-
this.visibilityTypes = Object.keys(PryVisibilityType)
|
|
24
|
-
.filter((x) => !(parseInt(x) >= 0))
|
|
25
|
-
.filter((x) => (!this.users$ ? x !== PryVisibilityType.RESTRICTED : true))
|
|
26
|
-
.map((label) => ({ label: label.toLowerCase(), value: label, icon: `${label.toLowerCase()}` }));
|
|
27
|
-
}
|
|
28
|
-
registerOnChange(fn) {
|
|
29
|
-
this._onChange = fn;
|
|
30
|
-
}
|
|
31
|
-
registerOnTouched(fn) {
|
|
32
|
-
this._onTouched = fn;
|
|
33
|
-
}
|
|
34
|
-
setDisabledState(isDisabled) {
|
|
35
|
-
this._disabled = isDisabled;
|
|
36
|
-
this._cd.markForCheck();
|
|
37
|
-
}
|
|
38
|
-
writeValueUsers(obj) {
|
|
39
|
-
if (!equal(this.value?.users, obj)) {
|
|
40
|
-
this.writeValue({ type: this.value?.type, users: obj });
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
writeValueType(type) {
|
|
44
|
-
if (this.value?.type !== type) {
|
|
45
|
-
this.writeValue({ type, users: this.value?.users });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
writeValue(obj) {
|
|
49
|
-
if (!equal(this.value, obj)) {
|
|
50
|
-
this.value = obj;
|
|
51
|
-
this._onChange(this.value);
|
|
52
|
-
this._onTouched();
|
|
53
|
-
this._cd.markForCheck();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryShareComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryShareComponent, selector: "pry-share", inputs: { value: "value", labelProperty: "labelProperty", valueProperty: "valueProperty", users$: "users$" }, providers: [
|
|
58
|
-
{
|
|
59
|
-
provide: NG_VALUE_ACCESSOR,
|
|
60
|
-
useExisting: forwardRef(() => PryShareComponent),
|
|
61
|
-
multi: true
|
|
62
|
-
}
|
|
63
|
-
], ngImport: i0, template: "<div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"share_type\">{{ '@pry.share.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"writeValueType($event)\"\n [items]=\"visibilityTypes\"\n [ngModel]=\"value?.type\"\n [disabled]=\"_disabled\"\n i18nPrefix=\"@pry.share.\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"share_type\"\n bindIcon=\"icon\"\n [iconSize]=\"[21, 18]\"\n ></pry-select>\n</div>\n\n<ng-container *ngIf=\"value?.type === PryVisibilityType.RESTRICTED\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"users\">{{ '@pry.share.users' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"writeValueUsers($event)\"\n [items]=\"users$ | async\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n [ngModel]=\"value?.users\"\n [disabled]=\"_disabled\"\n [bindLabel]=\"labelProperty\"\n [bindValue]=\"valueProperty\"\n [autocomplete]=\"true\"\n id=\"users\"\n ></pry-select>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
64
|
-
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryShareComponent, decorators: [{
|
|
66
|
-
type: Component,
|
|
67
|
-
args: [{ selector: 'pry-share', providers: [
|
|
68
|
-
{
|
|
69
|
-
provide: NG_VALUE_ACCESSOR,
|
|
70
|
-
useExisting: forwardRef(() => PryShareComponent),
|
|
71
|
-
multi: true
|
|
72
|
-
}
|
|
73
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"share_type\">{{ '@pry.share.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"writeValueType($event)\"\n [items]=\"visibilityTypes\"\n [ngModel]=\"value?.type\"\n [disabled]=\"_disabled\"\n i18nPrefix=\"@pry.share.\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"share_type\"\n bindIcon=\"icon\"\n [iconSize]=\"[21, 18]\"\n ></pry-select>\n</div>\n\n<ng-container *ngIf=\"value?.type === PryVisibilityType.RESTRICTED\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"users\">{{ '@pry.share.users' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"writeValueUsers($event)\"\n [items]=\"users$ | async\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n [ngModel]=\"value?.users\"\n [disabled]=\"_disabled\"\n [bindLabel]=\"labelProperty\"\n [bindValue]=\"valueProperty\"\n [autocomplete]=\"true\"\n id=\"users\"\n ></pry-select>\n </div>\n</ng-container>\n" }]
|
|
74
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { value: [{
|
|
75
|
-
type: Input
|
|
76
|
-
}], labelProperty: [{
|
|
77
|
-
type: Input
|
|
78
|
-
}], valueProperty: [{
|
|
79
|
-
type: Input
|
|
80
|
-
}], users$: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}] } });
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcHJvdm9seS9kYXNoYm9hcmQvbGliL2NvcmUvY29tcG9uZW50cy9zaGFyZS9zaGFyZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9wcm92b2x5L2Rhc2hib2FyZC9saWIvY29yZS9jb21wb25lbnRzL3NoYXJlL3NoYXJlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBcUIsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDakgsT0FBTyxFQUF3QixpQkFBaUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3pFLE9BQU8sS0FBSyxNQUFNLHFCQUFxQixDQUFDO0FBRXhDLE9BQU8sRUFBaUIsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7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