@valtimo/connector-management 4.15.2-next-main.14 → 4.15.3-next-main.15

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.
Files changed (41) hide show
  1. package/bundles/valtimo-connector-management.umd.js +1997 -1997
  2. package/esm2015/lib/components/add-connector/add-connector.component.js +78 -78
  3. package/esm2015/lib/components/connector-link-extension/connector-link-extension.component.js +94 -94
  4. package/esm2015/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.js +135 -135
  5. package/esm2015/lib/components/connector-management/connector-management.component.js +94 -94
  6. package/esm2015/lib/components/connector-modal/connector-modal.component.js +57 -57
  7. package/esm2015/lib/components/edit-connector-form/edit-connector-form.component.js +41 -41
  8. package/esm2015/lib/components/edit-connector-properties/edit-connector-properties.component.js +139 -139
  9. package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.js +149 -149
  10. package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.js +499 -499
  11. package/esm2015/lib/components/modify-connector/modify-connector.component.js +72 -72
  12. package/esm2015/lib/components/multi-value-connector-property/multi-value-connector-property.component.js +91 -91
  13. package/esm2015/lib/connector-management-routing.js +43 -43
  14. package/esm2015/lib/connector-management.module.js +75 -75
  15. package/esm2015/lib/extension/connector-management.extension.init.js +38 -38
  16. package/esm2015/lib/services/connector-management/connector-management.service.js +59 -59
  17. package/esm2015/lib/services/connector-management-state/connector-management-state.service.js +82 -82
  18. package/esm2015/lib/services/object-api-sync/object-api-sync.service.js +50 -50
  19. package/esm2015/public-api.js +31 -31
  20. package/esm2015/valtimo-connector-management.js +7 -7
  21. package/fesm2015/valtimo-connector-management.js +1693 -1693
  22. package/lib/components/add-connector/add-connector.component.d.ts +26 -26
  23. package/lib/components/connector-link-extension/connector-link-extension.component.d.ts +25 -25
  24. package/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.d.ts +40 -40
  25. package/lib/components/connector-management/connector-management.component.d.ts +28 -28
  26. package/lib/components/connector-modal/connector-modal.component.d.ts +16 -16
  27. package/lib/components/edit-connector-form/edit-connector-form.component.d.ts +15 -15
  28. package/lib/components/edit-connector-properties/edit-connector-properties.component.d.ts +35 -35
  29. package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.d.ts +45 -45
  30. package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.d.ts +225 -225
  31. package/lib/components/modify-connector/modify-connector.component.d.ts +19 -19
  32. package/lib/components/multi-value-connector-property/multi-value-connector-property.component.d.ts +26 -26
  33. package/lib/connector-management-routing.d.ts +2 -2
  34. package/lib/connector-management.module.d.ts +2 -2
  35. package/lib/extension/connector-management.extension.init.d.ts +2 -2
  36. package/lib/services/connector-management/connector-management.service.d.ts +17 -17
  37. package/lib/services/connector-management-state/connector-management-state.service.d.ts +26 -26
  38. package/lib/services/object-api-sync/object-api-sync.service.d.ts +14 -14
  39. package/package.json +1 -1
  40. package/public-api.d.ts +13 -13
  41. package/valtimo-connector-management.d.ts +7 -7
@@ -1,58 +1,58 @@
1
- /*
2
- * Copyright 2015-2020 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Component, Input, ViewChild } from '@angular/core';
17
- import { ModalComponent } from '@valtimo/components';
18
- import { ConnectorManagementStateService } from '../../services/connector-management-state/connector-management-state.service';
19
- export class ConnectorModalComponent {
20
- constructor(stateService) {
21
- this.stateService = stateService;
22
- }
23
- ngAfterViewInit() {
24
- this.showSubscription = this.stateService.showModal$.subscribe((show) => {
25
- if (show) {
26
- this.show();
27
- }
28
- else {
29
- this.hide();
30
- }
31
- });
32
- }
33
- ngOnDestroy() {
34
- var _a;
35
- (_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
36
- }
37
- show() {
38
- this.modal.show();
39
- }
40
- hide() {
41
- this.modal.hide();
42
- }
43
- }
44
- ConnectorModalComponent.decorators = [
45
- { type: Component, args: [{
46
- selector: 'valtimo-connector-modal',
47
- 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<valtimo-modal #modal [title]=\"'connectorManagement.' + modalType | translate\">\n <div class=\"mt-2\" body>\n <valtimo-add-connector *ngIf=\"modalType === 'add'\"></valtimo-add-connector>\n <valtimo-modify-connector *ngIf=\"modalType === 'modify'\"></valtimo-modify-connector>\n </div>\n</valtimo-modal>\n",
48
- 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 */"]
49
- },] }
50
- ];
51
- ConnectorModalComponent.ctorParameters = () => [
52
- { type: ConnectorManagementStateService }
53
- ];
54
- ConnectorModalComponent.propDecorators = {
55
- modal: [{ type: ViewChild, args: ['modal',] }],
56
- modalType: [{ type: Input }]
57
- };
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Component, Input, ViewChild } from '@angular/core';
17
+ import { ModalComponent } from '@valtimo/components';
18
+ import { ConnectorManagementStateService } from '../../services/connector-management-state/connector-management-state.service';
19
+ export class ConnectorModalComponent {
20
+ constructor(stateService) {
21
+ this.stateService = stateService;
22
+ }
23
+ ngAfterViewInit() {
24
+ this.showSubscription = this.stateService.showModal$.subscribe((show) => {
25
+ if (show) {
26
+ this.show();
27
+ }
28
+ else {
29
+ this.hide();
30
+ }
31
+ });
32
+ }
33
+ ngOnDestroy() {
34
+ var _a;
35
+ (_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
36
+ }
37
+ show() {
38
+ this.modal.show();
39
+ }
40
+ hide() {
41
+ this.modal.hide();
42
+ }
43
+ }
44
+ ConnectorModalComponent.decorators = [
45
+ { type: Component, args: [{
46
+ selector: 'valtimo-connector-modal',
47
+ 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<valtimo-modal #modal [title]=\"'connectorManagement.' + modalType | translate\">\n <div class=\"mt-2\" body>\n <valtimo-add-connector *ngIf=\"modalType === 'add'\"></valtimo-add-connector>\n <valtimo-modify-connector *ngIf=\"modalType === 'modify'\"></valtimo-modify-connector>\n </div>\n</valtimo-modal>\n",
48
+ 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 */"]
49
+ },] }
50
+ ];
51
+ ConnectorModalComponent.ctorParameters = () => [
52
+ { type: ConnectorManagementStateService }
53
+ ];
54
+ ConnectorModalComponent.propDecorators = {
55
+ modal: [{ type: ViewChild, args: ['modal',] }],
56
+ modalType: [{ type: Input }]
57
+ };
58
58
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29ubmVjdG9yLW1vZGFsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vY29ubmVjdG9yLW1hbmFnZW1lbnQvc3JjL2xpYi9jb21wb25lbnRzL2Nvbm5lY3Rvci1tb2RhbC9jb25uZWN0b3ItbW9kYWwuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUgsT0FBTyxFQUFnQixTQUFTLEVBQUUsS0FBSyxFQUFhLFNBQVMsRUFBQ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09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICB0aGlzLnNob3dTdWJzY3JpcHRpb24/LnVuc3Vic2NyaWJlKCk7XG4gIH1cblxuICBwcml2YXRlIHNob3coKTogdm9pZCB7XG4gICAgdGhpcy5tb2RhbC5zaG93KCk7XG4gIH1cblxuICBwcml2YXRlIGhpZGUoKTogdm9pZCB7XG4gICAgdGhpcy5tb2RhbC5oaWRlKCk7XG4gIH1cbn1cbiJdfQ==
@@ -1,42 +1,42 @@
1
- /*
2
- * Copyright 2015-2020 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Component, EventEmitter, Input, Output } from '@angular/core';
17
- export class EditConnectorFormComponent {
18
- constructor() {
19
- this.withDefaults = false;
20
- this.showDeleteButton = false;
21
- this.propertiesSave = new EventEmitter();
22
- this.connectorDelete = new EventEmitter();
23
- this.productAanvragenName = 'ProductAanvragen';
24
- }
25
- }
26
- EditConnectorFormComponent.decorators = [
27
- { type: Component, args: [{
28
- selector: 'valtimo-edit-connector-form',
29
- 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<valtimo-edit-connector-properties\n *ngIf=\"connectorName !== productAanvragenName\"\n [properties]=\"properties\"\n [withDefaults]=\"withDefaults\"\n [defaultName]=\"defaultName\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-connector-properties>\n\n<valtimo-edit-product-aanvragen-connector\n *ngIf=\"connectorName === productAanvragenName\"\n [defaultName]=\"defaultName\"\n [properties]=\"properties\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-product-aanvragen-connector>\n",
30
- 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 */"]
31
- },] }
32
- ];
33
- EditConnectorFormComponent.propDecorators = {
34
- properties: [{ type: Input }],
35
- withDefaults: [{ type: Input }],
36
- showDeleteButton: [{ type: Input }],
37
- defaultName: [{ type: Input }],
38
- connectorName: [{ type: Input }],
39
- propertiesSave: [{ type: Output }],
40
- connectorDelete: [{ type: Output }]
41
- };
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
17
+ export class EditConnectorFormComponent {
18
+ constructor() {
19
+ this.withDefaults = false;
20
+ this.showDeleteButton = false;
21
+ this.propertiesSave = new EventEmitter();
22
+ this.connectorDelete = new EventEmitter();
23
+ this.productAanvragenName = 'ProductAanvragen';
24
+ }
25
+ }
26
+ EditConnectorFormComponent.decorators = [
27
+ { type: Component, args: [{
28
+ selector: 'valtimo-edit-connector-form',
29
+ 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<valtimo-edit-connector-properties\n *ngIf=\"connectorName !== productAanvragenName\"\n [properties]=\"properties\"\n [withDefaults]=\"withDefaults\"\n [defaultName]=\"defaultName\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-connector-properties>\n\n<valtimo-edit-product-aanvragen-connector\n *ngIf=\"connectorName === productAanvragenName\"\n [defaultName]=\"defaultName\"\n [properties]=\"properties\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-product-aanvragen-connector>\n",
30
+ 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 */"]
31
+ },] }
32
+ ];
33
+ EditConnectorFormComponent.propDecorators = {
34
+ properties: [{ type: Input }],
35
+ withDefaults: [{ type: Input }],
36
+ showDeleteButton: [{ type: Input }],
37
+ defaultName: [{ type: Input }],
38
+ connectorName: [{ type: Input }],
39
+ propertiesSave: [{ type: Output }],
40
+ connectorDelete: [{ type: Output }]
41
+ };
42
42
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdC1jb25uZWN0b3ItZm9ybS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92YWx0aW1vL2Nvbm5lY3Rvci1tYW5hZ2VtZW50L3NyYy9saWIvY29tcG9uZW50cy9lZGl0LWNvbm5lY3Rvci1mb3JtL2VkaXQtY29ubmVjdG9yLWZvcm0uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUgsT0FBTyxFQUFDLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBQyxNQUFNLGVBQWUsQ0FBQztBQVFyRSxNQUFNLE9BQU8sMEJBQTBCO0lBTHZDO1FBT1csaUJBQVksR0FBRyxLQUFLLENBQUM7UUFDckIscUJBQWdCLEdBQUcsS0FBSyxDQUFDO1FBSXhCLG1CQUFjLEdBQUcsSUFBSSxZQUFZLEVBQW1ELENBQUM7UUFDckY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m9kdWN0QWFudnJhZ2VuJztcbn1cbiJdfQ==
@@ -1,140 +1,140 @@
1
- /*
2
- * Copyright 2015-2020 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Component, EventEmitter, Input, Output } from '@angular/core';
17
- import { BehaviorSubject, combineLatest } from 'rxjs';
18
- import { map, take } from 'rxjs/operators';
19
- import { set, get, cloneDeep } from 'lodash';
20
- import { ConnectorManagementStateService } from '../../services/connector-management-state/connector-management-state.service';
21
- export class EditConnectorPropertiesComponent {
22
- constructor(stateService) {
23
- this.stateService = stateService;
24
- this.withDefaults = false;
25
- this.showDeleteButton = false;
26
- this.propertiesSave = new EventEmitter();
27
- this.connectorDelete = new EventEmitter();
28
- this.modifiedProperties$ = new BehaviorSubject(undefined);
29
- this.editFields$ = new BehaviorSubject([]);
30
- this.connectorName$ = new BehaviorSubject('');
31
- this.saveButtonDisabled$ = combineLatest([this.editFields$, this.modifiedProperties$, this.connectorName$]).pipe(map(([editFields, modifiedProperties, connectorName]) => {
32
- const values = editFields.map((field) => get(modifiedProperties, field.key));
33
- const validValues = values.filter((value) => Array.isArray(value) ? value.length > 0 : value === 0 || value);
34
- return (editFields.length !== validValues.length) || !connectorName;
35
- }));
36
- this.disabled$ = this.stateService.inputDisabled$;
37
- }
38
- ngOnInit() {
39
- this.setEditFields();
40
- this.setName();
41
- }
42
- ngOnChanges() {
43
- this.setEditFields();
44
- this.setName();
45
- }
46
- multiFieldValuesSet(event) {
47
- this.modifiedProperties$.pipe(take(1)).subscribe((properties) => {
48
- set(properties, event.editFieldKey, event.values);
49
- this.modifiedProperties$.next(properties);
50
- });
51
- }
52
- onSingleValueChange(value, editField) {
53
- this.modifiedProperties$.pipe(take(1)).subscribe((properties) => {
54
- set(properties, editField.key, editField.editType === 'string' ? value.trim() : parseInt(value, 10));
55
- this.modifiedProperties$.next(properties);
56
- });
57
- }
58
- onNameValueChange(value) {
59
- this.connectorName$.next(value.trim());
60
- }
61
- onSave() {
62
- this.stateService.disableInput();
63
- combineLatest([this.modifiedProperties$, this.connectorName$])
64
- .pipe(take(1)).subscribe(([properties, name]) => {
65
- this.propertiesSave.emit({ properties, name });
66
- });
67
- }
68
- onDelete() {
69
- this.stateService.disableInput();
70
- this.connectorDelete.emit();
71
- }
72
- setName() {
73
- if (this.withDefaults && this.defaultName) {
74
- this.connectorName$.next(this.defaultName);
75
- }
76
- else {
77
- this.connectorName$.next('');
78
- }
79
- }
80
- setModifiedProperties(editFields) {
81
- const propertiesCopy = cloneDeep(this.properties);
82
- if (!this.withDefaults) {
83
- editFields.forEach((editField) => {
84
- set(propertiesCopy, editField.key, undefined);
85
- });
86
- }
87
- this.modifiedProperties$.next(propertiesCopy);
88
- }
89
- setEditFields() {
90
- const editFields = [];
91
- const keysToFilter = ['className'];
92
- const handlePropertyLevel = (propertyLevel, previousKeys) => {
93
- const propertyLevelKeys = Object.keys(propertyLevel)
94
- .filter((key) => !keysToFilter.includes(key));
95
- propertyLevelKeys.forEach((key) => {
96
- const propertyValue = propertyLevel[key];
97
- const baseEditField = Object.assign({ key: previousKeys + key }, (this.withDefaults && { defaultValue: propertyValue }));
98
- if (typeof propertyValue === 'number') {
99
- editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number' }));
100
- }
101
- else if (Array.isArray(propertyValue)) {
102
- if (propertyValue[0] && typeof propertyValue[0] === 'number') {
103
- editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number[]' }));
104
- }
105
- else {
106
- editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string[]' }));
107
- }
108
- }
109
- else if (typeof propertyValue === 'string') {
110
- editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string' }));
111
- }
112
- else if (typeof propertyValue === 'object') {
113
- handlePropertyLevel(propertyValue, `${previousKeys}${key}.`);
114
- }
115
- });
116
- };
117
- handlePropertyLevel(this.properties, '');
118
- this.editFields$.next(editFields);
119
- this.setModifiedProperties(editFields);
120
- }
121
- }
122
- EditConnectorPropertiesComponent.decorators = [
123
- { type: Component, args: [{
124
- selector: 'valtimo-edit-connector-properties',
125
- 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=\"edit-fields\" *ngIf=\"{editFields: editFields$ | async, disabled: disabled$ | async} as obs\">\n <ng-container *ngTemplateOutlet=\"nameInput;context:{disabled: obs.disabled}\"></ng-container>\n <ng-container *ngFor=\"let editField of obs.editFields\">\n <ng-container *ngIf=\"editField.editType === 'string' || editField.editType === 'number'\">\n <ng-container *ngTemplateOutlet=\"singleInput;context:{editField: editField, disabled: obs.disabled}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"editField.editType === 'string[]' || editField.editType === 'number[]'\">\n <valtimo-multi-value-connector-property\n [editField]=\"editField\"\n (valuesSet)=\"multiFieldValuesSet($event)\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"withDefaults && editField.defaultValue\"\n >\n </valtimo-multi-value-connector-property>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons;context:{disabled: obs.disabled}\"></ng-container>\n</div>\n\n<ng-template #nameInput let-disabled=\"disabled\">\n <div class=\"form-group row\">\n <label class=\"col-3 col-form-label text-sm-right\">\n {{'connectorManagement.inputLabels.connectorName' | translate}}\n </label>\n <div class=\"col-7\">\n <input\n class=\"form-control\"\n type=\"text\"\n (input)=\"onNameValueChange($event.target.value)\"\n [disabled]=\"disabled\"\n [value]=\"(withDefaults && defaultName) ? defaultName : ''\"\n >\n </div>\n </div>\n</ng-template>\n\n<ng-template #singleInput let-editField=\"editField\" let-disabled=\"disabled\">\n <div class=\"form-group row\">\n <label class=\"col-3 col-form-label text-sm-right\">\n {{'connectorManagement.inputLabels.' + editField.key | translate}}\n </label>\n <div class=\"col-7\">\n <input\n *ngIf=\"editField.editType === 'string'\"\n class=\"form-control\"\n type=\"text\"\n (input)=\"onSingleValueChange($event.target.value, editField)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults ? editField.defaultValue : ''\"\n >\n <input\n *ngIf=\"editField.editType === 'number'\"\n class=\"form-control\"\n type=\"number\"\n step=\"1\"\n min=\"0\"\n oninput=\"validity.valid||(value='');\"\n (input)=\"onSingleValueChange($event.target.value, editField)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults ? editField.defaultValue : ''\"\n >\n </div>\n </div>\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"border-top mt-3 pt-6\">\n <div class=\"button-container\">\n <button class=\"btn btn-primary\" [disabled]=\"disabled || (saveButtonDisabled$ | async)\" (click)=\"onSave()\">\n <i class=\"icon mdi mdi-save mr-1\"></i>\n {{'connectorManagement.save' | translate}}\n </button>\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\" [disabled]=\"disabled\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{'connectorManagement.remove' | translate}}\n </button>\n </div>\n </div>\n</ng-template>\n",
126
- 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 */.button-container{display:flex;flex-flow:row-reverse;justify-content:space-between;width:100%}"]
127
- },] }
128
- ];
129
- EditConnectorPropertiesComponent.ctorParameters = () => [
130
- { type: ConnectorManagementStateService }
131
- ];
132
- EditConnectorPropertiesComponent.propDecorators = {
133
- properties: [{ type: Input }],
134
- withDefaults: [{ type: Input }],
135
- showDeleteButton: [{ type: Input }],
136
- defaultName: [{ type: Input }],
137
- propertiesSave: [{ type: Output }],
138
- connectorDelete: [{ type: Output }]
139
- };
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
17
+ import { BehaviorSubject, combineLatest } from 'rxjs';
18
+ import { map, take } from 'rxjs/operators';
19
+ import { set, get, cloneDeep } from 'lodash';
20
+ import { ConnectorManagementStateService } from '../../services/connector-management-state/connector-management-state.service';
21
+ export class EditConnectorPropertiesComponent {
22
+ constructor(stateService) {
23
+ this.stateService = stateService;
24
+ this.withDefaults = false;
25
+ this.showDeleteButton = false;
26
+ this.propertiesSave = new EventEmitter();
27
+ this.connectorDelete = new EventEmitter();
28
+ this.modifiedProperties$ = new BehaviorSubject(undefined);
29
+ this.editFields$ = new BehaviorSubject([]);
30
+ this.connectorName$ = new BehaviorSubject('');
31
+ this.saveButtonDisabled$ = combineLatest([this.editFields$, this.modifiedProperties$, this.connectorName$]).pipe(map(([editFields, modifiedProperties, connectorName]) => {
32
+ const values = editFields.map((field) => get(modifiedProperties, field.key));
33
+ const validValues = values.filter((value) => Array.isArray(value) ? value.length > 0 : value === 0 || value);
34
+ return (editFields.length !== validValues.length) || !connectorName;
35
+ }));
36
+ this.disabled$ = this.stateService.inputDisabled$;
37
+ }
38
+ ngOnInit() {
39
+ this.setEditFields();
40
+ this.setName();
41
+ }
42
+ ngOnChanges() {
43
+ this.setEditFields();
44
+ this.setName();
45
+ }
46
+ multiFieldValuesSet(event) {
47
+ this.modifiedProperties$.pipe(take(1)).subscribe((properties) => {
48
+ set(properties, event.editFieldKey, event.values);
49
+ this.modifiedProperties$.next(properties);
50
+ });
51
+ }
52
+ onSingleValueChange(value, editField) {
53
+ this.modifiedProperties$.pipe(take(1)).subscribe((properties) => {
54
+ set(properties, editField.key, editField.editType === 'string' ? value.trim() : parseInt(value, 10));
55
+ this.modifiedProperties$.next(properties);
56
+ });
57
+ }
58
+ onNameValueChange(value) {
59
+ this.connectorName$.next(value.trim());
60
+ }
61
+ onSave() {
62
+ this.stateService.disableInput();
63
+ combineLatest([this.modifiedProperties$, this.connectorName$])
64
+ .pipe(take(1)).subscribe(([properties, name]) => {
65
+ this.propertiesSave.emit({ properties, name });
66
+ });
67
+ }
68
+ onDelete() {
69
+ this.stateService.disableInput();
70
+ this.connectorDelete.emit();
71
+ }
72
+ setName() {
73
+ if (this.withDefaults && this.defaultName) {
74
+ this.connectorName$.next(this.defaultName);
75
+ }
76
+ else {
77
+ this.connectorName$.next('');
78
+ }
79
+ }
80
+ setModifiedProperties(editFields) {
81
+ const propertiesCopy = cloneDeep(this.properties);
82
+ if (!this.withDefaults) {
83
+ editFields.forEach((editField) => {
84
+ set(propertiesCopy, editField.key, undefined);
85
+ });
86
+ }
87
+ this.modifiedProperties$.next(propertiesCopy);
88
+ }
89
+ setEditFields() {
90
+ const editFields = [];
91
+ const keysToFilter = ['className'];
92
+ const handlePropertyLevel = (propertyLevel, previousKeys) => {
93
+ const propertyLevelKeys = Object.keys(propertyLevel)
94
+ .filter((key) => !keysToFilter.includes(key));
95
+ propertyLevelKeys.forEach((key) => {
96
+ const propertyValue = propertyLevel[key];
97
+ const baseEditField = Object.assign({ key: previousKeys + key }, (this.withDefaults && { defaultValue: propertyValue }));
98
+ if (typeof propertyValue === 'number') {
99
+ editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number' }));
100
+ }
101
+ else if (Array.isArray(propertyValue)) {
102
+ if (propertyValue[0] && typeof propertyValue[0] === 'number') {
103
+ editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number[]' }));
104
+ }
105
+ else {
106
+ editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string[]' }));
107
+ }
108
+ }
109
+ else if (typeof propertyValue === 'string') {
110
+ editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string' }));
111
+ }
112
+ else if (typeof propertyValue === 'object') {
113
+ handlePropertyLevel(propertyValue, `${previousKeys}${key}.`);
114
+ }
115
+ });
116
+ };
117
+ handlePropertyLevel(this.properties, '');
118
+ this.editFields$.next(editFields);
119
+ this.setModifiedProperties(editFields);
120
+ }
121
+ }
122
+ EditConnectorPropertiesComponent.decorators = [
123
+ { type: Component, args: [{
124
+ selector: 'valtimo-edit-connector-properties',
125
+ 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=\"edit-fields\" *ngIf=\"{editFields: editFields$ | async, disabled: disabled$ | async} as obs\">\n <ng-container *ngTemplateOutlet=\"nameInput;context:{disabled: obs.disabled}\"></ng-container>\n <ng-container *ngFor=\"let editField of obs.editFields\">\n <ng-container *ngIf=\"editField.editType === 'string' || editField.editType === 'number'\">\n <ng-container *ngTemplateOutlet=\"singleInput;context:{editField: editField, disabled: obs.disabled}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"editField.editType === 'string[]' || editField.editType === 'number[]'\">\n <valtimo-multi-value-connector-property\n [editField]=\"editField\"\n (valuesSet)=\"multiFieldValuesSet($event)\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"withDefaults && editField.defaultValue\"\n >\n </valtimo-multi-value-connector-property>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons;context:{disabled: obs.disabled}\"></ng-container>\n</div>\n\n<ng-template #nameInput let-disabled=\"disabled\">\n <div class=\"form-group row\">\n <label class=\"col-3 col-form-label text-sm-right\">\n {{'connectorManagement.inputLabels.connectorName' | translate}}\n </label>\n <div class=\"col-7\">\n <input\n class=\"form-control\"\n type=\"text\"\n (input)=\"onNameValueChange($event.target.value)\"\n [disabled]=\"disabled\"\n [value]=\"(withDefaults && defaultName) ? defaultName : ''\"\n >\n </div>\n </div>\n</ng-template>\n\n<ng-template #singleInput let-editField=\"editField\" let-disabled=\"disabled\">\n <div class=\"form-group row\">\n <label class=\"col-3 col-form-label text-sm-right\">\n {{'connectorManagement.inputLabels.' + editField.key | translate}}\n </label>\n <div class=\"col-7\">\n <input\n *ngIf=\"editField.editType === 'string'\"\n class=\"form-control\"\n type=\"text\"\n (input)=\"onSingleValueChange($event.target.value, editField)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults ? editField.defaultValue : ''\"\n >\n <input\n *ngIf=\"editField.editType === 'number'\"\n class=\"form-control\"\n type=\"number\"\n step=\"1\"\n min=\"0\"\n oninput=\"validity.valid||(value='');\"\n (input)=\"onSingleValueChange($event.target.value, editField)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults ? editField.defaultValue : ''\"\n >\n </div>\n </div>\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"border-top mt-3 pt-6\">\n <div class=\"button-container\">\n <button class=\"btn btn-primary\" [disabled]=\"disabled || (saveButtonDisabled$ | async)\" (click)=\"onSave()\">\n <i class=\"icon mdi mdi-save mr-1\"></i>\n {{'connectorManagement.save' | translate}}\n </button>\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\" [disabled]=\"disabled\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{'connectorManagement.remove' | translate}}\n </button>\n </div>\n </div>\n</ng-template>\n",
126
+ 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 */.button-container{display:flex;flex-flow:row-reverse;justify-content:space-between;width:100%}"]
127
+ },] }
128
+ ];
129
+ EditConnectorPropertiesComponent.ctorParameters = () => [
130
+ { type: ConnectorManagementStateService }
131
+ ];
132
+ EditConnectorPropertiesComponent.propDecorators = {
133
+ properties: [{ type: Input }],
134
+ withDefaults: [{ type: Input }],
135
+ showDeleteButton: [{ type: Input }],
136
+ defaultName: [{ type: Input }],
137
+ propertiesSave: [{ type: Output }],
138
+ connectorDelete: [{ type: Output }]
139
+ };
140
140
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaW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