@valtimo/layout 11.3.2 → 12.1.0
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/assets/css/app.css +1 -1
- package/assets/img/emptystate-empty.svg +261 -0
- package/assets/img/emptystate-error.svg +245 -0
- package/assets/img/emptystate-error404.svg +146 -0
- package/assets/img/emptystate-no-result.svg +327 -0
- package/assets/img/emptystate-not-authorised.svg +279 -0
- package/assets/img/emptystate-success.svg +118 -0
- package/assets/img/no-dashboards.svg +156 -0
- package/assets/img/no-widgets.svg +214 -0
- package/assets/img/valtimo/favicons/browserconfig.xml +1 -1
- package/assets/img/widget-management/style/default.svg +26 -0
- package/assets/img/widget-management/style/high-contrast.svg +26 -0
- package/assets/img/widget-management/types/angular.svg +66 -0
- package/assets/img/widget-management/types/collection.svg +1 -0
- package/assets/img/widget-management/types/fields.svg +26 -0
- package/assets/img/widget-management/types/formio.svg +55 -0
- package/assets/img/widget-management/types/table.svg +119 -0
- package/assets/img/widget-management/width/full-width.svg +44 -0
- package/assets/img/widget-management/width/half.svg +26 -0
- package/assets/img/widget-management/width/quarter.svg +17 -0
- package/assets/img/widget-management/width/three-quarters.svg +35 -0
- package/assets/js/app.js +1 -1
- package/esm2022/lib/components/layout/layout.component.mjs +7 -7
- package/esm2022/lib/components/layout-internal/layout-internal.component.mjs +7 -7
- package/esm2022/lib/components/layout-public/layout-public.component.mjs +7 -9
- package/esm2022/lib/components/translation-management/translation-management.component.mjs +185 -0
- package/esm2022/lib/layout.module.mjs +6 -6
- package/esm2022/lib/services/layout/layout.service.mjs +6 -6
- package/esm2022/lib/translation-management-routing.module.mjs +43 -0
- package/esm2022/lib/translation-management.module.mjs +66 -0
- package/esm2022/public_api.mjs +3 -2
- package/fesm2022/valtimo-layout.mjs +311 -37
- package/fesm2022/valtimo-layout.mjs.map +1 -1
- package/lib/components/layout-public/layout-public.component.d.ts +1 -4
- package/lib/components/layout-public/layout-public.component.d.ts.map +1 -1
- package/lib/components/translation-management/translation-management.component.d.ts +46 -0
- package/lib/components/translation-management/translation-management.component.d.ts.map +1 -0
- package/lib/translation-management-routing.module.d.ts +8 -0
- package/lib/translation-management-routing.module.d.ts.map +1 -0
- package/lib/translation-management.module.d.ts +13 -0
- package/lib/translation-management.module.d.ts.map +1 -0
- package/package.json +7 -6
- package/public_api.d.ts +1 -0
- package/public_api.d.ts.map +1 -1
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, ViewChild, ViewContainerRef, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, ViewChild, ViewContainerRef, NgModule, Inject } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/router';
|
|
4
4
|
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
5
5
|
import { filter } from 'rxjs/operators';
|
|
6
|
-
import { Subscription } from 'rxjs';
|
|
7
|
-
import * as
|
|
6
|
+
import { Subscription, BehaviorSubject, tap, switchMap, map, combineLatest, take } from 'rxjs';
|
|
7
|
+
import * as i5 from 'carbon-components-angular';
|
|
8
|
+
import { LoadingModule, ButtonModule, IconModule } from 'carbon-components-angular';
|
|
8
9
|
import * as i4 from '@angular/common';
|
|
9
|
-
import { CommonModule } from '@angular/common';
|
|
10
|
+
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
10
11
|
import * as i2 from '@valtimo/components';
|
|
11
|
-
import { MenuRoutingModule, TopbarModule, LeftSidebarModule, RightSidebarModule, PageHeaderModule, AlertModule, PromptModule } from '@valtimo/components';
|
|
12
|
+
import { MenuRoutingModule, TopbarModule, LeftSidebarModule, RightSidebarModule, PageHeaderModule, AlertModule, PromptModule, MultiInputFormModule, CarbonMultiInputModule, RenderInPageHeaderDirectiveModule, ConfirmationModalModule } from '@valtimo/components';
|
|
13
|
+
import { isEqual } from 'lodash';
|
|
14
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
15
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
16
|
+
import * as i2$1 from '@valtimo/config';
|
|
17
|
+
import { ROLE_ADMIN } from '@valtimo/config';
|
|
18
|
+
import { AuthGuardService } from '@valtimo/security';
|
|
12
19
|
|
|
13
20
|
/*
|
|
14
|
-
* Copyright 2015-
|
|
21
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
15
22
|
*
|
|
16
23
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
17
24
|
* you may not use this file except in compliance with the License.
|
|
@@ -35,18 +42,18 @@ class LayoutService {
|
|
|
35
42
|
toggleFullscreen() {
|
|
36
43
|
this.fullscreen = !this.fullscreen;
|
|
37
44
|
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
39
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
46
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutService, providedIn: 'root' }); }
|
|
40
47
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutService, decorators: [{
|
|
42
49
|
type: Injectable,
|
|
43
50
|
args: [{
|
|
44
51
|
providedIn: 'root',
|
|
45
52
|
}]
|
|
46
|
-
}], ctorParameters:
|
|
53
|
+
}], ctorParameters: () => [] });
|
|
47
54
|
|
|
48
55
|
/*
|
|
49
|
-
* Copyright 2015-
|
|
56
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
50
57
|
*
|
|
51
58
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
52
59
|
* you may not use this file except in compliance with the License.
|
|
@@ -61,18 +68,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
61
68
|
* limitations under the License.
|
|
62
69
|
*/
|
|
63
70
|
class LayoutPublicComponent {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayoutPublicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
67
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LayoutPublicComponent, selector: "valtimo-layout-public", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"public-page-content\">\n <img src=\"assets/logo.svg\" class=\"logo\" />\n <router-outlet></router-outlet>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */body{background-color:#eee}.public-page-content{background-color:#fff;margin:60px auto;border:1px solid #dee2e6;padding:0 30px 30px}.public-page-content .logo{width:25%;display:block;margin:30px auto}@media (min-width: 768px){.public-page-content{width:50%}}@media (max-width: 767px) and (min-width: 576px){.public-page-content{width:75%}}@media (max-width: 575px){.public-page-content{width:95%}.public-page-content .logo{width:50%}}\n"], dependencies: [{ kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutPublicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: LayoutPublicComponent, selector: "valtimo-layout-public", ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"public-page-content\">\n <img src=\"assets/logo.svg\" class=\"logo\" />\n <router-outlet></router-outlet>\n</div>\n", styles: ["body{background-color:#eee}.public-page-content{background-color:#fff;margin:60px auto;border:1px solid #dee2e6;padding:0 30px 30px}.public-page-content .logo{width:25%;display:block;margin:30px auto}@media (min-width: 768px){.public-page-content{width:50%}}@media (max-width: 767px) and (min-width: 576px){.public-page-content{width:75%}}@media (max-width: 575px){.public-page-content{width:95%}.public-page-content .logo{width:50%}}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
68
73
|
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutPublicComponent, decorators: [{
|
|
70
75
|
type: Component,
|
|
71
|
-
args: [{ selector: 'valtimo-layout-public', template: "<!--\n ~ Copyright 2015-
|
|
72
|
-
}]
|
|
76
|
+
args: [{ selector: 'valtimo-layout-public', template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"public-page-content\">\n <img src=\"assets/logo.svg\" class=\"logo\" />\n <router-outlet></router-outlet>\n</div>\n", styles: ["body{background-color:#eee}.public-page-content{background-color:#fff;margin:60px auto;border:1px solid #dee2e6;padding:0 30px 30px}.public-page-content .logo{width:25%;display:block;margin:30px auto}@media (min-width: 768px){.public-page-content{width:50%}}@media (max-width: 767px) and (min-width: 576px){.public-page-content{width:75%}}@media (max-width: 575px){.public-page-content{width:95%}.public-page-content .logo{width:50%}}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
77
|
+
}] });
|
|
73
78
|
|
|
74
79
|
/*
|
|
75
|
-
* Copyright 2015-
|
|
80
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
76
81
|
*
|
|
77
82
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
78
83
|
* you may not use this file except in compliance with the License.
|
|
@@ -108,19 +113,19 @@ class LayoutInternalComponent {
|
|
|
108
113
|
ngOnDestroy() {
|
|
109
114
|
this._observer.disconnect();
|
|
110
115
|
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
112
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutInternalComponent, deps: [{ token: LayoutService }, { token: i0.Renderer2 }, { token: i2.UserInterfaceService }, { token: i2.ShellService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
117
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: LayoutInternalComponent, selector: "valtimo-layout-internal", viewQueries: [{ propertyName: "mainContentRef", first: true, predicate: ["mainContent"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-topbar></valtimo-topbar>\n<main\n class=\"cds--content\"\n [ngClass]=\"{\n 'cds--content--sidebar':\n (sideBarExpanded$ | async) && (collapsibleWidescreenMenu$ | async) === false\n }\"\n #mainContent\n>\n <valtimo-left-sidebar [hidden]=\"layoutService.isFullscreen\"></valtimo-left-sidebar>\n <valtimo-alert></valtimo-alert>\n <valtimo-page-header [hidden]=\"layoutService.isFullscreen\"></valtimo-page-header>\n <router-outlet></router-outlet>\n <valtimo-right-sidebar></valtimo-right-sidebar>\n <v-prompt></v-prompt>\n</main>\n", styles: ["::ng-deep .cds--content{padding-top:24px!important}@media screen and (max-width: 767px){.be-content{margin-left:0!important}}@media only screen and (min-width: 1056px){.cds--content--sidebar{padding-left:18rem}}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2.TopbarComponent, selector: "valtimo-topbar" }, { kind: "component", type: i2.LeftSidebarComponent, selector: "valtimo-left-sidebar" }, { kind: "component", type: i2.RightSidebarComponent, selector: "valtimo-right-sidebar" }, { kind: "component", type: i2.PageHeaderComponent, selector: "valtimo-page-header" }, { kind: "component", type: i2.AlertComponent, selector: "valtimo-alert" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.PromptComponent, selector: "v-prompt", inputs: ["appearingDelayMs", "maxWidthPx"], outputs: ["closeEvent"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] }); }
|
|
113
118
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutInternalComponent, decorators: [{
|
|
115
120
|
type: Component,
|
|
116
|
-
args: [{ selector: 'valtimo-layout-internal', template: "<!--\n ~ Copyright 2015-
|
|
117
|
-
}], ctorParameters:
|
|
121
|
+
args: [{ selector: 'valtimo-layout-internal', template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-topbar></valtimo-topbar>\n<main\n class=\"cds--content\"\n [ngClass]=\"{\n 'cds--content--sidebar':\n (sideBarExpanded$ | async) && (collapsibleWidescreenMenu$ | async) === false\n }\"\n #mainContent\n>\n <valtimo-left-sidebar [hidden]=\"layoutService.isFullscreen\"></valtimo-left-sidebar>\n <valtimo-alert></valtimo-alert>\n <valtimo-page-header [hidden]=\"layoutService.isFullscreen\"></valtimo-page-header>\n <router-outlet></router-outlet>\n <valtimo-right-sidebar></valtimo-right-sidebar>\n <v-prompt></v-prompt>\n</main>\n", styles: ["::ng-deep .cds--content{padding-top:24px!important}@media screen and (max-width: 767px){.be-content{margin-left:0!important}}@media only screen and (min-width: 1056px){.cds--content--sidebar{padding-left:18rem}}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
122
|
+
}], ctorParameters: () => [{ type: LayoutService }, { type: i0.Renderer2 }, { type: i2.UserInterfaceService }, { type: i2.ShellService }], propDecorators: { mainContentRef: [{
|
|
118
123
|
type: ViewChild,
|
|
119
124
|
args: ['mainContent']
|
|
120
125
|
}] } });
|
|
121
126
|
|
|
122
127
|
/*
|
|
123
|
-
* Copyright 2015-
|
|
128
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
124
129
|
*
|
|
125
130
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
126
131
|
* you may not use this file except in compliance with the License.
|
|
@@ -163,19 +168,19 @@ class LayoutComponent {
|
|
|
163
168
|
this.layoutType = layout ? layout : this._DEFAULT_LAYOUT;
|
|
164
169
|
}));
|
|
165
170
|
}
|
|
166
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
167
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
171
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i5.PlaceholderService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: LayoutComponent, selector: "valtimo-layout", viewQueries: [{ propertyName: "_carbonPlaceHolder", first: true, predicate: ["carbonPlaceHolder"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #carbonPlaceHolder class=\"carbon-placeholder\"></div>\n\n<valtimo-layout-public *ngIf=\"layoutType === 'public'\"></valtimo-layout-public>\n<valtimo-layout-internal *ngIf=\"layoutType === 'internal'\"></valtimo-layout-internal>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LayoutPublicComponent, selector: "valtimo-layout-public" }, { kind: "component", type: LayoutInternalComponent, selector: "valtimo-layout-internal" }] }); }
|
|
168
173
|
}
|
|
169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutComponent, decorators: [{
|
|
170
175
|
type: Component,
|
|
171
|
-
args: [{ selector: 'valtimo-layout', template: "<!--\n ~ Copyright 2015-
|
|
172
|
-
}], ctorParameters:
|
|
176
|
+
args: [{ selector: 'valtimo-layout', template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #carbonPlaceHolder class=\"carbon-placeholder\"></div>\n\n<valtimo-layout-public *ngIf=\"layoutType === 'public'\"></valtimo-layout-public>\n<valtimo-layout-internal *ngIf=\"layoutType === 'internal'\"></valtimo-layout-internal>\n" }]
|
|
177
|
+
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i5.PlaceholderService }], propDecorators: { _carbonPlaceHolder: [{
|
|
173
178
|
type: ViewChild,
|
|
174
179
|
args: ['carbonPlaceHolder', { static: true, read: ViewContainerRef }]
|
|
175
180
|
}] } });
|
|
176
181
|
|
|
177
182
|
/*
|
|
178
|
-
* Copyright 2015-
|
|
183
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
179
184
|
*
|
|
180
185
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
181
186
|
* you may not use this file except in compliance with the License.
|
|
@@ -190,8 +195,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
190
195
|
* limitations under the License.
|
|
191
196
|
*/
|
|
192
197
|
class LayoutModule {
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
194
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
198
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
199
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: LayoutModule, declarations: [LayoutComponent, LayoutPublicComponent, LayoutInternalComponent], imports: [RouterModule,
|
|
195
200
|
MenuRoutingModule,
|
|
196
201
|
TopbarModule,
|
|
197
202
|
LeftSidebarModule,
|
|
@@ -200,7 +205,7 @@ class LayoutModule {
|
|
|
200
205
|
AlertModule,
|
|
201
206
|
CommonModule,
|
|
202
207
|
PromptModule], exports: [LayoutComponent] }); }
|
|
203
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
208
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutModule, imports: [RouterModule,
|
|
204
209
|
MenuRoutingModule,
|
|
205
210
|
TopbarModule,
|
|
206
211
|
LeftSidebarModule,
|
|
@@ -210,7 +215,7 @@ class LayoutModule {
|
|
|
210
215
|
CommonModule,
|
|
211
216
|
PromptModule] }); }
|
|
212
217
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LayoutModule, decorators: [{
|
|
214
219
|
type: NgModule,
|
|
215
220
|
args: [{
|
|
216
221
|
declarations: [LayoutComponent, LayoutPublicComponent, LayoutInternalComponent],
|
|
@@ -230,7 +235,276 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
230
235
|
}] });
|
|
231
236
|
|
|
232
237
|
/*
|
|
233
|
-
* Copyright 2015-
|
|
238
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
239
|
+
*
|
|
240
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
241
|
+
* you may not use this file except in compliance with the License.
|
|
242
|
+
* You may obtain a copy of the License at
|
|
243
|
+
*
|
|
244
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
245
|
+
*
|
|
246
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
247
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
248
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
249
|
+
* See the License for the specific language governing permissions and
|
|
250
|
+
* limitations under the License.
|
|
251
|
+
*/
|
|
252
|
+
class TranslationManagementComponent {
|
|
253
|
+
constructor(translateService, localizationService, pageHeaderService, document) {
|
|
254
|
+
this.translateService = translateService;
|
|
255
|
+
this.localizationService = localizationService;
|
|
256
|
+
this.pageHeaderService = pageHeaderService;
|
|
257
|
+
this.document = document;
|
|
258
|
+
this.loading$ = new BehaviorSubject(true);
|
|
259
|
+
this.allChangedValuesValid$ = new BehaviorSubject(false);
|
|
260
|
+
this.disabled$ = new BehaviorSubject(false);
|
|
261
|
+
this._languageOptions$ = new BehaviorSubject(undefined);
|
|
262
|
+
this._refreshLocalizations$ = new BehaviorSubject(null);
|
|
263
|
+
this._localizationTranslations$ = this._refreshLocalizations$.pipe(tap(() => this.loading$.next(true)), switchMap(() => this.localizationService.getMergedLocalizations()), tap(() => this.loading$.next(false)));
|
|
264
|
+
this._defaultValues = [];
|
|
265
|
+
this._changedValues$ = new BehaviorSubject(undefined);
|
|
266
|
+
this.showConfirmationModal$ = new BehaviorSubject(false);
|
|
267
|
+
this.valuesChanged$ = this._changedValues$.pipe(map(changedValues => !isEqual(changedValues, this._defaultValues)));
|
|
268
|
+
this.localizationTranslationValues$ = combineLatest([
|
|
269
|
+
this._languageOptions$,
|
|
270
|
+
this._localizationTranslations$,
|
|
271
|
+
this.translateService.stream('key'),
|
|
272
|
+
]).pipe(map(([languageOptions, localizationTranslations]) => this.mapMergedLocalizationsToMultiInput(languageOptions, localizationTranslations)), tap(defaultValues => {
|
|
273
|
+
this._defaultValues = defaultValues;
|
|
274
|
+
}));
|
|
275
|
+
this.multiInputTiles$ = combineLatest([
|
|
276
|
+
this._languageOptions$,
|
|
277
|
+
this.translateService.stream('key'),
|
|
278
|
+
]).pipe(map(([languageOptions]) => {
|
|
279
|
+
const objToReturn = {};
|
|
280
|
+
objToReturn[0] = this.translateService.instant('listColumn.key');
|
|
281
|
+
languageOptions.forEach((languageOption, index) => {
|
|
282
|
+
objToReturn[index + 1] = this.translateService.instant(`settings.language.options.${languageOption}`);
|
|
283
|
+
});
|
|
284
|
+
return objToReturn;
|
|
285
|
+
}));
|
|
286
|
+
this.amountOfArbitraryValues$ = this.multiInputTiles$.pipe(map(multiInputTitles => Object.keys(multiInputTitles).length));
|
|
287
|
+
this.compactMode$ = this.pageHeaderService.compactMode$;
|
|
288
|
+
}
|
|
289
|
+
ngOnInit() {
|
|
290
|
+
this.setLanguages();
|
|
291
|
+
}
|
|
292
|
+
validChange(valid) {
|
|
293
|
+
this.allChangedValuesValid$.next(valid);
|
|
294
|
+
}
|
|
295
|
+
valueChange(value) {
|
|
296
|
+
this._changedValues$.next(value);
|
|
297
|
+
}
|
|
298
|
+
saveAndRefresh() {
|
|
299
|
+
this.saveChanges(true);
|
|
300
|
+
}
|
|
301
|
+
saveAndStay() {
|
|
302
|
+
this.saveChanges();
|
|
303
|
+
}
|
|
304
|
+
cancel() {
|
|
305
|
+
this.hideModal();
|
|
306
|
+
}
|
|
307
|
+
showModal() {
|
|
308
|
+
this.showConfirmationModal$.next(true);
|
|
309
|
+
}
|
|
310
|
+
saveChanges(reload = false) {
|
|
311
|
+
this.disable();
|
|
312
|
+
combineLatest([this._changedValues$, this._languageOptions$])
|
|
313
|
+
.pipe(take(1), map(([changedValues, languageOptions]) => this.getLocalizationsForUpdateRequest(changedValues, languageOptions)), switchMap(updatedLocalizations => this.localizationService.updateLocalizations(updatedLocalizations)))
|
|
314
|
+
.subscribe(() => {
|
|
315
|
+
if (reload) {
|
|
316
|
+
this.document?.defaultView?.location?.reload();
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
this._refreshLocalizations$.next(null);
|
|
320
|
+
this.enable();
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
setLanguages() {
|
|
325
|
+
this._languageOptions$.next(this.translateService.langs);
|
|
326
|
+
}
|
|
327
|
+
disable() {
|
|
328
|
+
this.disabled$.next(true);
|
|
329
|
+
}
|
|
330
|
+
enable() {
|
|
331
|
+
this.disabled$.next(false);
|
|
332
|
+
}
|
|
333
|
+
hideModal() {
|
|
334
|
+
this.showConfirmationModal$.next(false);
|
|
335
|
+
}
|
|
336
|
+
flattenObject(ob) {
|
|
337
|
+
const toReturn = {};
|
|
338
|
+
for (const i in ob) {
|
|
339
|
+
if (!ob.hasOwnProperty(i))
|
|
340
|
+
continue;
|
|
341
|
+
if (typeof ob[i] == 'object' && ob[i] !== null) {
|
|
342
|
+
const flatObject = this.flattenObject(ob[i]);
|
|
343
|
+
for (const x in flatObject) {
|
|
344
|
+
if (!flatObject.hasOwnProperty(x))
|
|
345
|
+
continue;
|
|
346
|
+
toReturn[i + '.' + x] = flatObject[x];
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
toReturn[i] = ob[i];
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return toReturn;
|
|
354
|
+
}
|
|
355
|
+
unflattenObject(obj, delimiter = '.') {
|
|
356
|
+
return Object.keys(obj).reduce((res, k) => {
|
|
357
|
+
k.split(delimiter).reduce((acc, e, i, keys) => acc[e] ||
|
|
358
|
+
(acc[e] = isNaN(Number(keys[i + 1])) ? (keys.length - 1 === i ? obj[k] : {}) : []), res);
|
|
359
|
+
return res;
|
|
360
|
+
}, {});
|
|
361
|
+
}
|
|
362
|
+
getLocalizationsForUpdateRequest(changedValues, languageOptions) {
|
|
363
|
+
const localizations = [];
|
|
364
|
+
const translationObject = {};
|
|
365
|
+
languageOptions.forEach(languageOption => {
|
|
366
|
+
translationObject[languageOption] = {};
|
|
367
|
+
});
|
|
368
|
+
changedValues.forEach(changedValue => {
|
|
369
|
+
languageOptions.forEach((languageOption, index) => {
|
|
370
|
+
translationObject[languageOption] = {
|
|
371
|
+
...translationObject[languageOption],
|
|
372
|
+
[changedValue[0]]: changedValue[index + 1],
|
|
373
|
+
};
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
languageOptions.forEach(languageOption => {
|
|
377
|
+
translationObject[languageOption] = this.unflattenObject(translationObject[languageOption]);
|
|
378
|
+
});
|
|
379
|
+
Object.keys(translationObject).forEach(languageKey => {
|
|
380
|
+
localizations.push({ languageKey, content: translationObject[languageKey] });
|
|
381
|
+
});
|
|
382
|
+
return localizations;
|
|
383
|
+
}
|
|
384
|
+
mapMergedLocalizationsToMultiInput(languageOptions, mergedLocalizations) {
|
|
385
|
+
if (Object.keys(mergedLocalizations).length === 0) {
|
|
386
|
+
return [];
|
|
387
|
+
}
|
|
388
|
+
const firstLanguageOption = languageOptions[0];
|
|
389
|
+
const firstLanguageTranslations = firstLanguageOption && mergedLocalizations[firstLanguageOption];
|
|
390
|
+
const flattenedFirstLanguageTranslations = firstLanguageTranslations && this.flattenObject(firstLanguageTranslations);
|
|
391
|
+
return Object.keys(flattenedFirstLanguageTranslations).map(flattenedTranslationKey => {
|
|
392
|
+
const emptyArbitraryValue = {};
|
|
393
|
+
emptyArbitraryValue['0'] = flattenedTranslationKey;
|
|
394
|
+
languageOptions.forEach((languageOption, index) => {
|
|
395
|
+
emptyArbitraryValue[`${index + 1}`] =
|
|
396
|
+
this.flattenObject(mergedLocalizations[languageOption])[flattenedTranslationKey] || '';
|
|
397
|
+
});
|
|
398
|
+
return emptyArbitraryValue;
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementComponent, deps: [{ token: i1$1.TranslateService }, { token: i2$1.LocalizationService }, { token: i2.PageHeaderService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
402
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TranslationManagementComponent, selector: "valtimo-translation-management", ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n localizationTranslationValues: localizationTranslationValues$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n multiInputTitles: multiInputTiles$ | async,\n amountOfArbitraryValues: amountOfArbitraryValues$ | async,\n showConfirmationModal: showConfirmationModal$,\n allChangedValuesValid: allChangedValuesValid$ | async,\n valuesChanged: valuesChanged$ | async,\n compactMode: compactMode$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"!obs.loading && obs.localizationTranslationValues; else loading\">\n <valtimo-carbon-multi-input\n [disabled]=\"obs.disabled\"\n [arbitraryAmountTitles]=\"obs.multiInputTitles\"\n [fullWidth]=\"true\"\n [minimumAmountOfRows]=\"0\"\n type=\"arbitraryAmount\"\n [arbitraryValueAmount]=\"obs.amountOfArbitraryValues\"\n [defaultValues]=\"obs.localizationTranslationValues\"\n (allValuesValidEvent)=\"validChange($event)\"\n (valueChange)=\"valueChange($event)\"\n addRowTranslationKey=\"translationManagement.add\"\n ></valtimo-carbon-multi-input>\n </ng-container>\n\n <ng-template #loading>\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n </ng-template>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"saveAndRefresh()\"\n (optionalEvent)=\"saveAndStay()\"\n (cancelEvent)=\"cancel()\"\n [showOptionalButton]=\"true\"\n cancelButtonType=\"ghost\"\n optionalButtonType=\"secondary\"\n confirmButtonTextTranslationKey=\"translationManagement.saveWithReload\"\n optionalButtonTextTranslationKey=\"translationManagement.saveWithoutReload\"\n titleTranslationKey=\"translationManagement.modalTitle\"\n contentTranslationKey=\"translationManagement.modalContent\"\n [spacerAfterCancelButton]=\"true\"\n ></valtimo-confirmation-modal>\n\n <ng-container renderInPageHeader>\n <ng-template>\n <button\n cdsButton=\"primary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"showModal()\"\n [disabled]=\"!obs.allChangedValuesValid || obs.disabled || !obs.valuesChanged\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </ng-template>\n </ng-container>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "arbitraryValueAmount", "arbitraryAmountTitles", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth", "carbonTheme"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "component", type: i5.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "directive", type: i2.RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "directive", type: i5.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i5.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
403
|
+
}
|
|
404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementComponent, decorators: [{
|
|
405
|
+
type: Component,
|
|
406
|
+
args: [{ selector: 'valtimo-translation-management', template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n localizationTranslationValues: localizationTranslationValues$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n multiInputTitles: multiInputTiles$ | async,\n amountOfArbitraryValues: amountOfArbitraryValues$ | async,\n showConfirmationModal: showConfirmationModal$,\n allChangedValuesValid: allChangedValuesValid$ | async,\n valuesChanged: valuesChanged$ | async,\n compactMode: compactMode$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"!obs.loading && obs.localizationTranslationValues; else loading\">\n <valtimo-carbon-multi-input\n [disabled]=\"obs.disabled\"\n [arbitraryAmountTitles]=\"obs.multiInputTitles\"\n [fullWidth]=\"true\"\n [minimumAmountOfRows]=\"0\"\n type=\"arbitraryAmount\"\n [arbitraryValueAmount]=\"obs.amountOfArbitraryValues\"\n [defaultValues]=\"obs.localizationTranslationValues\"\n (allValuesValidEvent)=\"validChange($event)\"\n (valueChange)=\"valueChange($event)\"\n addRowTranslationKey=\"translationManagement.add\"\n ></valtimo-carbon-multi-input>\n </ng-container>\n\n <ng-template #loading>\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n </ng-template>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"saveAndRefresh()\"\n (optionalEvent)=\"saveAndStay()\"\n (cancelEvent)=\"cancel()\"\n [showOptionalButton]=\"true\"\n cancelButtonType=\"ghost\"\n optionalButtonType=\"secondary\"\n confirmButtonTextTranslationKey=\"translationManagement.saveWithReload\"\n optionalButtonTextTranslationKey=\"translationManagement.saveWithoutReload\"\n titleTranslationKey=\"translationManagement.modalTitle\"\n contentTranslationKey=\"translationManagement.modalContent\"\n [spacerAfterCancelButton]=\"true\"\n ></valtimo-confirmation-modal>\n\n <ng-container renderInPageHeader>\n <ng-template>\n <button\n cdsButton=\"primary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"showModal()\"\n [disabled]=\"!obs.allChangedValuesValid || obs.disabled || !obs.valuesChanged\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </ng-template>\n </ng-container>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
407
|
+
}], ctorParameters: () => [{ type: i1$1.TranslateService }, { type: i2$1.LocalizationService }, { type: i2.PageHeaderService }, { type: Document, decorators: [{
|
|
408
|
+
type: Inject,
|
|
409
|
+
args: [DOCUMENT]
|
|
410
|
+
}] }] });
|
|
411
|
+
|
|
412
|
+
/*
|
|
413
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
414
|
+
*
|
|
415
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
416
|
+
* you may not use this file except in compliance with the License.
|
|
417
|
+
* You may obtain a copy of the License at
|
|
418
|
+
*
|
|
419
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
420
|
+
*
|
|
421
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
422
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
423
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
424
|
+
* See the License for the specific language governing permissions and
|
|
425
|
+
* limitations under the License.
|
|
426
|
+
*/
|
|
427
|
+
const routes = [
|
|
428
|
+
{
|
|
429
|
+
path: 'translation-management',
|
|
430
|
+
component: TranslationManagementComponent,
|
|
431
|
+
canActivate: [AuthGuardService],
|
|
432
|
+
data: { title: 'Translations', roles: [ROLE_ADMIN] },
|
|
433
|
+
},
|
|
434
|
+
];
|
|
435
|
+
class TranslationManagementRoutingModule {
|
|
436
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
437
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] }); }
|
|
438
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
439
|
+
}
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementRoutingModule, decorators: [{
|
|
441
|
+
type: NgModule,
|
|
442
|
+
args: [{
|
|
443
|
+
imports: [RouterModule.forChild(routes)],
|
|
444
|
+
exports: [RouterModule],
|
|
445
|
+
}]
|
|
446
|
+
}] });
|
|
447
|
+
|
|
448
|
+
/*
|
|
449
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
450
|
+
*
|
|
451
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
452
|
+
* you may not use this file except in compliance with the License.
|
|
453
|
+
* You may obtain a copy of the License at
|
|
454
|
+
*
|
|
455
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
456
|
+
*
|
|
457
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
458
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
459
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
460
|
+
* See the License for the specific language governing permissions and
|
|
461
|
+
* limitations under the License.
|
|
462
|
+
*/
|
|
463
|
+
class TranslationManagementModule {
|
|
464
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
465
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementModule, declarations: [TranslationManagementComponent], imports: [CommonModule,
|
|
466
|
+
TranslateModule,
|
|
467
|
+
TranslationManagementRoutingModule,
|
|
468
|
+
MultiInputFormModule,
|
|
469
|
+
CarbonMultiInputModule,
|
|
470
|
+
LoadingModule,
|
|
471
|
+
RenderInPageHeaderDirectiveModule,
|
|
472
|
+
ButtonModule,
|
|
473
|
+
IconModule,
|
|
474
|
+
ConfirmationModalModule] }); }
|
|
475
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementModule, imports: [CommonModule,
|
|
476
|
+
TranslateModule,
|
|
477
|
+
TranslationManagementRoutingModule,
|
|
478
|
+
MultiInputFormModule,
|
|
479
|
+
CarbonMultiInputModule,
|
|
480
|
+
LoadingModule,
|
|
481
|
+
RenderInPageHeaderDirectiveModule,
|
|
482
|
+
ButtonModule,
|
|
483
|
+
IconModule,
|
|
484
|
+
ConfirmationModalModule] }); }
|
|
485
|
+
}
|
|
486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TranslationManagementModule, decorators: [{
|
|
487
|
+
type: NgModule,
|
|
488
|
+
args: [{
|
|
489
|
+
declarations: [TranslationManagementComponent],
|
|
490
|
+
imports: [
|
|
491
|
+
CommonModule,
|
|
492
|
+
TranslateModule,
|
|
493
|
+
TranslationManagementRoutingModule,
|
|
494
|
+
MultiInputFormModule,
|
|
495
|
+
CarbonMultiInputModule,
|
|
496
|
+
LoadingModule,
|
|
497
|
+
RenderInPageHeaderDirectiveModule,
|
|
498
|
+
ButtonModule,
|
|
499
|
+
IconModule,
|
|
500
|
+
ConfirmationModalModule,
|
|
501
|
+
],
|
|
502
|
+
exports: [],
|
|
503
|
+
}]
|
|
504
|
+
}] });
|
|
505
|
+
|
|
506
|
+
/*
|
|
507
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
234
508
|
*
|
|
235
509
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
236
510
|
* you may not use this file except in compliance with the License.
|
|
@@ -252,5 +526,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
252
526
|
* Generated bundle index. Do not edit.
|
|
253
527
|
*/
|
|
254
528
|
|
|
255
|
-
export { LayoutComponent, LayoutModule, LayoutService };
|
|
529
|
+
export { LayoutComponent, LayoutModule, LayoutService, TranslationManagementModule };
|
|
256
530
|
//# sourceMappingURL=valtimo-layout.mjs.map
|