@valtimo/object-management 10.2.0 → 10.3.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/README.md +16 -7
- package/esm2020/lib/components/object-management-detail-container/object-management-detail-container.component.mjs +1 -1
- package/esm2020/lib/components/object-management-detail-container/tabs/object-management-detail/object-management-detail.component.mjs +4 -5
- package/esm2020/lib/components/object-management-detail-container/tabs/object-management-list-tab/object-management-list-tab.component.mjs +3 -3
- package/esm2020/lib/components/object-management-list/object-management-list.component.mjs +8 -5
- package/esm2020/lib/components/object-management-modal/object-management-modal.component.mjs +12 -10
- package/esm2020/lib/components/object-management-upload-modal/object-management-upload-modal.component.mjs +15 -7
- package/esm2020/lib/models/object-management.model.mjs +1 -1
- package/esm2020/lib/object-management-routing.module.mjs +2 -2
- package/esm2020/lib/object-management.module.mjs +5 -5
- package/esm2020/lib/services/object-management.service.mjs +2 -2
- package/esm2020/lib/services/tab.enum.mjs +1 -1
- package/esm2020/public-api.mjs +1 -1
- package/fesm2015/valtimo-object-management.mjs +40 -28
- package/fesm2015/valtimo-object-management.mjs.map +1 -1
- package/fesm2020/valtimo-object-management.mjs +40 -28
- package/fesm2020/valtimo-object-management.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ ObjectManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.
|
|
|
57
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementService, decorators: [{
|
|
58
58
|
type: Injectable,
|
|
59
59
|
args: [{
|
|
60
|
-
providedIn: 'root'
|
|
60
|
+
providedIn: 'root',
|
|
61
61
|
}]
|
|
62
62
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
|
|
63
63
|
|
|
@@ -185,27 +185,29 @@ class ObjectManagementModalComponent {
|
|
|
185
185
|
this.modalType$ = this.objectManagementState.modalType$;
|
|
186
186
|
this.formData$ = new BehaviorSubject(null);
|
|
187
187
|
this.selectedObjecttype$ = new BehaviorSubject(null);
|
|
188
|
-
this.formDefinitions$ = this.formManagementService.queryFormDefinitions().pipe(map(
|
|
188
|
+
this.formDefinitions$ = this.formManagementService.queryFormDefinitions().pipe(map(results => {
|
|
189
189
|
var _a;
|
|
190
190
|
return (_a = results === null || results === void 0 ? void 0 : results.body) === null || _a === void 0 ? void 0 : _a.content.map(configuration => ({
|
|
191
191
|
id: configuration.id,
|
|
192
|
-
text: configuration.name
|
|
192
|
+
text: configuration.name,
|
|
193
193
|
}));
|
|
194
194
|
}));
|
|
195
|
-
this.configurationInstances$ = this.pluginManagementService
|
|
196
|
-
|
|
195
|
+
this.configurationInstances$ = this.pluginManagementService
|
|
196
|
+
.getAllPluginConfigurations()
|
|
197
|
+
.pipe(map(configurations => configurations));
|
|
198
|
+
this.objectsApiConfigurations$ = this.configurationInstances$.pipe(map(configurations => {
|
|
197
199
|
const filteredObjectsApiConfigurations = configurations.filter(configuration => { var _a; return ((_a = configuration === null || configuration === void 0 ? void 0 : configuration.pluginDefinition) === null || _a === void 0 ? void 0 : _a.key) === 'objectenapi'; });
|
|
198
200
|
return filteredObjectsApiConfigurations.map(configuration => ({
|
|
199
201
|
id: configuration.id,
|
|
200
202
|
text: configuration.title,
|
|
201
203
|
}));
|
|
202
204
|
}));
|
|
203
|
-
this.objecttypesApiConfigurations$ = this.configurationInstances$.pipe(map(
|
|
205
|
+
this.objecttypesApiConfigurations$ = this.configurationInstances$.pipe(map(configurations => {
|
|
204
206
|
const filteredObjecttypesApiConfigurations = configurations.filter(configuration => { var _a; return ((_a = configuration === null || configuration === void 0 ? void 0 : configuration.pluginDefinition) === null || _a === void 0 ? void 0 : _a.key) === 'objecttypenapi'; });
|
|
205
207
|
return filteredObjecttypesApiConfigurations.map(configuration => ({
|
|
206
208
|
id: configuration.id,
|
|
207
209
|
text: configuration.title,
|
|
208
|
-
properties: configuration.properties
|
|
210
|
+
properties: configuration.properties,
|
|
209
211
|
}));
|
|
210
212
|
}));
|
|
211
213
|
}
|
|
@@ -281,10 +283,10 @@ class ObjectManagementModalComponent {
|
|
|
281
283
|
}
|
|
282
284
|
}
|
|
283
285
|
ObjectManagementModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModalComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token: i3.FormManagementService }, { token: i4.PluginManagementService }, { token: i5.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
284
|
-
ObjectManagementModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: { prefillObject$: "prefillObject$" }, viewQueries: [{ propertyName: "objectManagementModal", first: true, predicate: ["objectManagementModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<v-modal
|
|
286
|
+
ObjectManagementModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: { prefillObject$: "prefillObject$" }, viewQueries: [{ propertyName: "objectManagementModal", first: true, predicate: ["objectManagementModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<v-modal\n #objectManagementModal\n *ngIf=\"{\n disabled: disabled$ | async,\n valid: valid$ | async,\n modalType: modalType$ | async,\n prefillObject: prefillObject$ | async\n } as obs\"\n>\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{\n (obs.modalType === 'add'\n ? 'objectManagement.createObjecttype'\n : 'objectManagement.editObjecttype'\n ) | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container\n *ngTemplateOutlet=\"\n form;\n context: {prefillObject: obs.prefillObject, modalType: obs.modalType}\n \"\n ></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{\n (obs.modalType === 'add' ? 'objectManagement.add' : 'objectManagement.edit') | translate\n }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #form let-prefillObject=\"prefillObject\" let-modalType=\"modalType\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n *ngIf=\"modalType === 'edit'\"\n hidden\n [disabled]=\"true\"\n [defaultValue]=\"prefillObject?.id\"\n name=\"id\"\n ></v-input>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.title' | translate\"\n [tooltip]=\"'objectManagement.tooltips.title' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.title\"\n name=\"title\"\n ></v-input>\n\n <ng-container\n *ngIf=\"{\n connectionInstances: configurationInstances$ | async,\n objectsApiConfigurations: objectsApiConfigurations$ | async,\n objecttypesApiConfigurations: objecttypesApiConfigurations$ | async\n } as objectObs\"\n >\n <v-select\n [items]=\"objectObs.objectsApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objectenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objects' | translate\"\n [defaultSelectionId]=\"prefillObject?.objectenApiPluginConfigurationId\"\n [required]=\"true\"\n ></v-select>\n\n <v-select\n [items]=\"objectObs.objecttypesApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objecttypenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objecttypes' | translate\"\n [defaultSelectionId]=\"prefillObject?.objecttypenApiPluginConfigurationId\"\n [required]=\"true\"\n (selectedChange)=\"selectObjectType($event)\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.objecttypeId' | translate\"\n [tooltip]=\"'objectManagement.tooltips.objecttypeId' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.objecttypeId\"\n name=\"objecttypeId\"\n ></v-input>\n\n <ng-container *ngIf=\"{formDefinitions: formDefinitions$ | async} as formObs\">\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionView\"\n [title]=\"'objectManagement.labels.formDefinitionView' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionView' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionView\"\n ></v-select>\n\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionEdit\"\n [title]=\"'objectManagement.labels.formDefinitionEdit' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionEdit' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionEdit\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n type=\"checkbox\"\n [title]=\"'objectManagement.labels.showInDataMenu' | translate\"\n [tooltip]=\"'objectManagement.tooltips.showInDataMenu' | translate\"\n name=\"showInDataMenu\"\n [defaultValue]=\"prefillObject?.showInDataMenu\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i5.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: i5.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "component", type: i5.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i5.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$"], outputs: ["valueChange"] }, { kind: "component", type: i5.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder"], outputs: ["selectedChange", "clear"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
|
|
285
287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementModalComponent, decorators: [{
|
|
286
288
|
type: Component,
|
|
287
|
-
args: [{ selector: 'valtimo-object-management-modal', template: "<!--\n ~ Copyright 2015-2020 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<v-modal
|
|
289
|
+
args: [{ selector: 'valtimo-object-management-modal', template: "<!--\n ~ Copyright 2015-2020 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<v-modal\n #objectManagementModal\n *ngIf=\"{\n disabled: disabled$ | async,\n valid: valid$ | async,\n modalType: modalType$ | async,\n prefillObject: prefillObject$ | async\n } as obs\"\n>\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{\n (obs.modalType === 'add'\n ? 'objectManagement.createObjecttype'\n : 'objectManagement.editObjecttype'\n ) | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container\n *ngTemplateOutlet=\"\n form;\n context: {prefillObject: obs.prefillObject, modalType: obs.modalType}\n \"\n ></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{\n (obs.modalType === 'add' ? 'objectManagement.add' : 'objectManagement.edit') | translate\n }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #form let-prefillObject=\"prefillObject\" let-modalType=\"modalType\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n *ngIf=\"modalType === 'edit'\"\n hidden\n [disabled]=\"true\"\n [defaultValue]=\"prefillObject?.id\"\n name=\"id\"\n ></v-input>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.title' | translate\"\n [tooltip]=\"'objectManagement.tooltips.title' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.title\"\n name=\"title\"\n ></v-input>\n\n <ng-container\n *ngIf=\"{\n connectionInstances: configurationInstances$ | async,\n objectsApiConfigurations: objectsApiConfigurations$ | async,\n objecttypesApiConfigurations: objecttypesApiConfigurations$ | async\n } as objectObs\"\n >\n <v-select\n [items]=\"objectObs.objectsApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objectenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objects' | translate\"\n [defaultSelectionId]=\"prefillObject?.objectenApiPluginConfigurationId\"\n [required]=\"true\"\n ></v-select>\n\n <v-select\n [items]=\"objectObs.objecttypesApiConfigurations\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objecttypenApiPluginConfigurationId\"\n [title]=\"'objectManagement.labels.objecttypes' | translate\"\n [defaultSelectionId]=\"prefillObject?.objecttypenApiPluginConfigurationId\"\n [required]=\"true\"\n (selectedChange)=\"selectObjectType($event)\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'objectManagement.labels.objecttypeId' | translate\"\n [tooltip]=\"'objectManagement.tooltips.objecttypeId' | translate\"\n [widthPx]=\"350\"\n [defaultValue]=\"prefillObject?.objecttypeId\"\n name=\"objecttypeId\"\n ></v-input>\n\n <ng-container *ngIf=\"{formDefinitions: formDefinitions$ | async} as formObs\">\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionView\"\n [title]=\"'objectManagement.labels.formDefinitionView' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionView' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionView\"\n ></v-select>\n\n <v-select\n [items]=\"formObs.formDefinitions\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"formDefinitionEdit\"\n [title]=\"'objectManagement.labels.formDefinitionEdit' | translate\"\n [tooltip]=\"'objectManagement.tooltips.formDefinitionEdit' | translate\"\n [defaultSelectionId]=\"prefillObject?.formDefinitionEdit\"\n ></v-select>\n </ng-container>\n\n <v-input\n [margin]=\"true\"\n type=\"checkbox\"\n [title]=\"'objectManagement.labels.showInDataMenu' | translate\"\n [tooltip]=\"'objectManagement.tooltips.showInDataMenu' | translate\"\n name=\"showInDataMenu\"\n [defaultValue]=\"prefillObject?.showInDataMenu\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"] }]
|
|
288
290
|
}], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4.PluginManagementService }, { type: i5.ModalService }]; }, propDecorators: { objectManagementModal: [{
|
|
289
291
|
type: ViewChild,
|
|
290
292
|
args: ['objectManagementModal']
|
|
@@ -313,8 +315,7 @@ class ObjectManagementDetailComponent {
|
|
|
313
315
|
this.objectManagementState = objectManagementState;
|
|
314
316
|
}
|
|
315
317
|
downloadDefinition(object) {
|
|
316
|
-
const dataString = 'data:text/json;charset=utf-8,' +
|
|
317
|
-
encodeURIComponent(JSON.stringify(object, null, 2));
|
|
318
|
+
const dataString = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(object, null, 2));
|
|
318
319
|
console.log(dataString);
|
|
319
320
|
const downloadAnchorElement = document.getElementById('downloadAnchorElement');
|
|
320
321
|
downloadAnchorElement.setAttribute('href', dataString);
|
|
@@ -327,10 +328,10 @@ class ObjectManagementDetailComponent {
|
|
|
327
328
|
}
|
|
328
329
|
}
|
|
329
330
|
ObjectManagementDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailComponent, deps: [{ token: ObjectManagementService }, { token: ObjectManagementStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
330
|
-
ObjectManagementDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementDetailComponent, selector: "valtimo-object-management-detail", inputs: { object$: "object$" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<div
|
|
331
|
+
ObjectManagementDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementDetailComponent, selector: "valtimo-object-management-detail", inputs: { object$: "object$" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<div\n id=\"object-datail-content\"\n class=\"pt-0\"\n *ngIf=\"{\n object: object$ | async\n } as obs\"\n>\n <ng-container *ngTemplateOutlet=\"buttons; context: {object: obs.object}\"></ng-container>\n <div class=\"clearfix\"></div>\n <ng-container *ngTemplateOutlet=\"widget; context: {object: obs.object}\"></ng-container>\n</div>\n\n<ng-template #buttons let-object=\"object\">\n <div class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <button (click)=\"downloadDefinition(object)\" class=\"btn btn-primary btn-space\">\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'objectManagement.download' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" class=\"d-none\"></a>\n <button (click)=\"showEditModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-pencil mr-1\"></i>\n {{ 'objectManagement.editObjecttype' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #widget let-object=\"object\">\n <valtimo-widget>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 object-schema\" disabled rows=\"25\">{{ object | json }}</textarea>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<valtimo-object-management-modal [prefillObject$]=\"object$\"></valtimo-object-management-modal>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.row{margin:0}.object-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: ["prefillObject$"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.JsonPipe, name: "json" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
|
|
331
332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementDetailComponent, decorators: [{
|
|
332
333
|
type: Component,
|
|
333
|
-
args: [{ selector: 'valtimo-object-management-detail', template: "<!--\n ~ Copyright 2015-2020 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<div
|
|
334
|
+
args: [{ selector: 'valtimo-object-management-detail', template: "<!--\n ~ Copyright 2015-2020 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<div\n id=\"object-datail-content\"\n class=\"pt-0\"\n *ngIf=\"{\n object: object$ | async\n } as obs\"\n>\n <ng-container *ngTemplateOutlet=\"buttons; context: {object: obs.object}\"></ng-container>\n <div class=\"clearfix\"></div>\n <ng-container *ngTemplateOutlet=\"widget; context: {object: obs.object}\"></ng-container>\n</div>\n\n<ng-template #buttons let-object=\"object\">\n <div class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <button (click)=\"downloadDefinition(object)\" class=\"btn btn-primary btn-space\">\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'objectManagement.download' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" class=\"d-none\"></a>\n <button (click)=\"showEditModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-pencil mr-1\"></i>\n {{ 'objectManagement.editObjecttype' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #widget let-object=\"object\">\n <valtimo-widget>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 object-schema\" disabled rows=\"25\">{{ object | json }}</textarea>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<valtimo-object-management-modal [prefillObject$]=\"object$\"></valtimo-object-management-modal>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.row{margin:0}.object-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"] }]
|
|
334
335
|
}], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: ObjectManagementStateService }]; }, propDecorators: { object$: [{
|
|
335
336
|
type: Input
|
|
336
337
|
}] } });
|
|
@@ -354,10 +355,10 @@ class ObjectManagementListTabComponent {
|
|
|
354
355
|
constructor() { }
|
|
355
356
|
}
|
|
356
357
|
ObjectManagementListTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
357
|
-
ObjectManagementListTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListTabComponent, selector: "valtimo-object-management-list-tab", inputs: { object$: "object$" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<div id=\"object-list-tab-content\" class=\"pt-0\">\n <ng-container *ngTemplateOutlet=\"widget\"></ng-container>\n</div>\n\n<ng-template #widget></ng-template>\n
|
|
358
|
+
ObjectManagementListTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListTabComponent, selector: "valtimo-object-management-list-tab", inputs: { object$: "object$" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<div id=\"object-list-tab-content\" class=\"pt-0\">\n <ng-container *ngTemplateOutlet=\"widget\"></ng-container>\n</div>\n\n<ng-template #widget></ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
358
359
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListTabComponent, decorators: [{
|
|
359
360
|
type: Component,
|
|
360
|
-
args: [{ selector: 'valtimo-object-management-list-tab', template: "<!--\n ~ Copyright 2015-2020 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<div id=\"object-list-tab-content\" class=\"pt-0\">\n <ng-container *ngTemplateOutlet=\"widget\"></ng-container>\n</div>\n\n<ng-template #widget></ng-template>\n
|
|
361
|
+
args: [{ selector: 'valtimo-object-management-list-tab', template: "<!--\n ~ Copyright 2015-2020 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<div id=\"object-list-tab-content\" class=\"pt-0\">\n <ng-container *ngTemplateOutlet=\"widget\"></ng-container>\n</div>\n\n<ng-template #widget></ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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"] }]
|
|
361
362
|
}], ctorParameters: function () { return []; }, propDecorators: { object$: [{
|
|
362
363
|
type: Input
|
|
363
364
|
}] } });
|
|
@@ -464,8 +465,10 @@ class ObjectManagementUploadModalComponent {
|
|
|
464
465
|
}
|
|
465
466
|
uploadDefinition() {
|
|
466
467
|
this.disable();
|
|
467
|
-
this.jsonString$.pipe(take(1)).subscribe(
|
|
468
|
-
this.objectManagementService
|
|
468
|
+
this.jsonString$.pipe(take(1)).subscribe(objecttypeDefinition => {
|
|
469
|
+
this.objectManagementService
|
|
470
|
+
.createObject(Object.assign({}, JSON.parse(objecttypeDefinition)))
|
|
471
|
+
.subscribe(() => {
|
|
469
472
|
this.objectManagementState.refresh();
|
|
470
473
|
this.objectManagementState.hideModal();
|
|
471
474
|
});
|
|
@@ -538,7 +541,13 @@ class ObjectManagementUploadModalComponent {
|
|
|
538
541
|
isValidJsonObjecttype(string) {
|
|
539
542
|
var _a;
|
|
540
543
|
const jsonObjecttype = JSON.parse(string);
|
|
541
|
-
const isValid = this.validateObject(jsonObjecttype, [
|
|
544
|
+
const isValid = this.validateObject(jsonObjecttype, [
|
|
545
|
+
'title',
|
|
546
|
+
'objecttypenApiPluginConfigurationId',
|
|
547
|
+
'objecttypeId',
|
|
548
|
+
'objectenApiPluginConfigurationId',
|
|
549
|
+
'showInDataMenu',
|
|
550
|
+
]);
|
|
542
551
|
const isObjecttypeTitleUnique = !((_a = this.objecttypes) === null || _a === void 0 ? void 0 : _a.find(objecttype => objecttype.title === jsonObjecttype.title));
|
|
543
552
|
if (isValid && isObjecttypeTitleUnique) {
|
|
544
553
|
return true;
|
|
@@ -566,10 +575,10 @@ class ObjectManagementUploadModalComponent {
|
|
|
566
575
|
}
|
|
567
576
|
}
|
|
568
577
|
ObjectManagementUploadModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementUploadModalComponent, deps: [{ token: ObjectManagementStateService }, { token: ObjectManagementService }, { token: i3.FormManagementService }, { token: i4.PluginManagementService }, { token: i5.ModalService }, { token: i6$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
569
|
-
ObjectManagementUploadModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementUploadModalComponent, selector: "valtimo-object-management-upload-modal", inputs: { objecttypes: "objecttypes" }, viewQueries: [{ propertyName: "objectManagementUploadModal", first: true, predicate: ["objectManagementUploadModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<v-modal
|
|
578
|
+
ObjectManagementUploadModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementUploadModalComponent, selector: "valtimo-object-management-upload-modal", inputs: { objecttypes: "objecttypes" }, viewQueries: [{ propertyName: "objectManagementUploadModal", first: true, predicate: ["objectManagementUploadModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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<v-modal\n #objectManagementUploadModal\n *ngIf=\"{\n disabled: disabled$ | async,\n jsonString: jsonString$ | async,\n error: error$ | async\n } as obs\"\n>\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{ 'objectManagement.uploadObjecttype' | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"uploadForm\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button\n (clickEvent)=\"uploadDefinition()\"\n [disabled]=\"obs.jsonString === '' || obs.disabled\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{ 'Upload' | translate }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #uploadForm>\n <ng-container *ngIf=\"showForm$ | async\">\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.objecttypeDef' | translate\"\n [externalError$]=\"error$\"\n [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "component", type: i5.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i5.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: i5.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
|
|
570
579
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementUploadModalComponent, decorators: [{
|
|
571
580
|
type: Component,
|
|
572
|
-
args: [{ selector: 'valtimo-object-management-upload-modal', template: "<!--\n ~ Copyright 2015-2020 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<v-modal
|
|
581
|
+
args: [{ selector: 'valtimo-object-management-upload-modal', template: "<!--\n ~ Copyright 2015-2020 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<v-modal\n #objectManagementUploadModal\n *ngIf=\"{\n disabled: disabled$ | async,\n jsonString: jsonString$ | async,\n error: error$ | async\n } as obs\"\n>\n <div role=\"header\">\n <div class=\"add-title\">\n <v-title [margin]=\"false\">{{ 'objectManagement.uploadObjecttype' | translate }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"uploadForm\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">\n {{ 'objectManagement.cancel' | translate }}\n </v-button>\n <v-button\n (clickEvent)=\"uploadDefinition()\"\n [disabled]=\"obs.jsonString === '' || obs.disabled\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{ 'Upload' | translate }}\n </v-button>\n </div>\n </div>\n</v-modal>\n\n<ng-template #uploadForm>\n <ng-container *ngIf=\"showForm$ | async\">\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.objecttypeDef' | translate\"\n [externalError$]=\"error$\"\n [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 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 */.buttons{width:100%;display:flex;flex-direction:row;justify-content:space-between}\n"] }]
|
|
573
582
|
}], ctorParameters: function () { return [{ type: ObjectManagementStateService }, { type: ObjectManagementService }, { type: i3.FormManagementService }, { type: i4.PluginManagementService }, { type: i5.ModalService }, { type: i6$1.TranslateService }]; }, propDecorators: { objectManagementUploadModal: [{
|
|
574
583
|
type: ViewChild,
|
|
575
584
|
args: ['objectManagementUploadModal']
|
|
@@ -602,7 +611,7 @@ class ObjectManagementListComponent {
|
|
|
602
611
|
this.fields$ = new BehaviorSubject([]);
|
|
603
612
|
this.objecttypesInstances$ = combineLatest([
|
|
604
613
|
this.translateService.stream('key'),
|
|
605
|
-
this.objectManagementState.refresh
|
|
614
|
+
this.objectManagementState.refresh$,
|
|
606
615
|
]).pipe(tap(() => this.setFields()), switchMap$1(() => this.objectManagementService.getAllObjects()), tap(() => this.loading$.next(false)));
|
|
607
616
|
}
|
|
608
617
|
showAddModal() {
|
|
@@ -618,14 +627,17 @@ class ObjectManagementListComponent {
|
|
|
618
627
|
}
|
|
619
628
|
setFields() {
|
|
620
629
|
const keys = ['title'];
|
|
621
|
-
this.fields$.next(keys.map(key => ({
|
|
630
|
+
this.fields$.next(keys.map(key => ({
|
|
631
|
+
label: `${this.translateService.instant(`objectManagement.labels.${key}`)}`,
|
|
632
|
+
key,
|
|
633
|
+
})));
|
|
622
634
|
}
|
|
623
635
|
}
|
|
624
636
|
ObjectManagementListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListComponent, deps: [{ token: ObjectManagementService }, { token: ObjectManagementStateService }, { token: i6$1.TranslateService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
625
|
-
ObjectManagementListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListComponent, selector: "valtimo-object-management-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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=\"main-content pt-0\" *ngIf=\"{loading: loading$ | async} as obs\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div class=\"text-right mt-m3px mb-3\">\n <button (click)=\"showUploadModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'objectManagement.uploadObjecttype' | translate }}\n </button>\n <button (click)=\"showAddModal()\" type=\"button\" class=\"btn btn-space btn-primary mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'objectManagement.createObjecttype' | translate }}\n </button>\n </div>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-obs=\"obs\">\n
|
|
637
|
+
ObjectManagementListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ObjectManagementListComponent, selector: "valtimo-object-management-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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=\"main-content pt-0\" *ngIf=\"{loading: loading$ | async} as obs\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div class=\"text-right mt-m3px mb-3\">\n <button (click)=\"showUploadModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'objectManagement.uploadObjecttype' | translate }}\n </button>\n <button (click)=\"showAddModal()\" type=\"button\" class=\"btn btn-space btn-primary mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'objectManagement.createObjecttype' | translate }}\n </button>\n </div>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-obs=\"obs\">\n <ng-container *ngIf=\"fields$ | async as fields\">\n <ng-container *ngIf=\"objecttypesInstances$ | async as objecttypesInstances\">\n <valtimo-widget *ngIf=\"obs.loading === false\">\n <valtimo-list\n [items]=\"objecttypesInstances\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"objecttypesList\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'objectManagement.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n objecttypesInstances?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<valtimo-object-management-upload-modal\n [objecttypes]=\"objecttypesInstances$ | async\"\n></valtimo-object-management-upload-modal>\n<valtimo-object-management-modal></valtimo-object-management-modal>\n", styles: ["/*!\n * Copyright 2015-2020 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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i6$2.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: ObjectManagementModalComponent, selector: "valtimo-object-management-modal", inputs: ["prefillObject$"] }, { kind: "component", type: ObjectManagementUploadModalComponent, selector: "valtimo-object-management-upload-modal", inputs: ["objecttypes"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslatePipe, name: "translate" }] });
|
|
626
638
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ObjectManagementListComponent, decorators: [{
|
|
627
639
|
type: Component,
|
|
628
|
-
args: [{ selector: 'valtimo-object-management-list', template: "<!--\n ~ Copyright 2015-2020 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=\"main-content pt-0\" *ngIf=\"{loading: loading$ | async} as obs\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div class=\"text-right mt-m3px mb-3\">\n <button (click)=\"showUploadModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'objectManagement.uploadObjecttype' | translate }}\n </button>\n <button (click)=\"showAddModal()\" type=\"button\" class=\"btn btn-space btn-primary mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'objectManagement.createObjecttype' | translate }}\n </button>\n </div>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-obs=\"obs\">\n
|
|
640
|
+
args: [{ selector: 'valtimo-object-management-list', template: "<!--\n ~ Copyright 2015-2020 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=\"main-content pt-0\" *ngIf=\"{loading: loading$ | async} as obs\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div class=\"text-right mt-m3px mb-3\">\n <button (click)=\"showUploadModal()\" class=\"btn btn-secondary btn-space\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'objectManagement.uploadObjecttype' | translate }}\n </button>\n <button (click)=\"showAddModal()\" type=\"button\" class=\"btn btn-space btn-primary mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'objectManagement.createObjecttype' | translate }}\n </button>\n </div>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-obs=\"obs\">\n <ng-container *ngIf=\"fields$ | async as fields\">\n <ng-container *ngIf=\"objecttypesInstances$ | async as objecttypesInstances\">\n <valtimo-widget *ngIf=\"obs.loading === false\">\n <valtimo-list\n [items]=\"objecttypesInstances\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"objecttypesList\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ 'objectManagement.title' | translate }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n objecttypesInstances?.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<valtimo-object-management-upload-modal\n [objecttypes]=\"objecttypesInstances$ | async\"\n></valtimo-object-management-upload-modal>\n<valtimo-object-management-modal></valtimo-object-management-modal>\n", styles: ["/*!\n * Copyright 2015-2020 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"] }]
|
|
629
641
|
}], ctorParameters: function () { return [{ type: ObjectManagementService }, { type: ObjectManagementStateService }, { type: i6$1.TranslateService }, { type: i3$1.Router }]; } });
|
|
630
642
|
|
|
631
643
|
/*
|
|
@@ -655,7 +667,7 @@ const routes = [
|
|
|
655
667
|
canActivate: [AuthGuardService],
|
|
656
668
|
component: ObjectManagementDetailContainerComponent,
|
|
657
669
|
data: { title: 'Object', roles: [ROLE_ADMIN] },
|
|
658
|
-
}
|
|
670
|
+
},
|
|
659
671
|
];
|
|
660
672
|
class ObjectManagementRoutingModule {
|
|
661
673
|
}
|
|
@@ -727,7 +739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
727
739
|
ObjectManagementDetailComponent,
|
|
728
740
|
ObjectManagementListTabComponent,
|
|
729
741
|
ObjectManagementModalComponent,
|
|
730
|
-
ObjectManagementUploadModalComponent
|
|
742
|
+
ObjectManagementUploadModalComponent,
|
|
731
743
|
],
|
|
732
744
|
imports: [
|
|
733
745
|
CommonModule,
|
|
@@ -741,9 +753,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
741
753
|
ButtonModule,
|
|
742
754
|
FormModule,
|
|
743
755
|
InputModule,
|
|
744
|
-
SelectModule
|
|
756
|
+
SelectModule,
|
|
745
757
|
],
|
|
746
|
-
exports: []
|
|
758
|
+
exports: [],
|
|
747
759
|
}]
|
|
748
760
|
}] });
|
|
749
761
|
|