@myrmidon/cadmus-refs-asserted-ids 1.0.9 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -96
- package/esm2022/lib/asserted-composite-id/asserted-composite-id.component.mjs +142 -0
- package/esm2022/lib/asserted-composite-ids/asserted-composite-ids.component.mjs +154 -0
- package/esm2022/lib/asserted-id/asserted-id.component.mjs +133 -0
- package/esm2022/lib/asserted-ids/asserted-ids.component.mjs +147 -0
- package/esm2022/lib/cadmus-refs-asserted-ids.module.mjs +122 -0
- package/esm2022/lib/pin-target-lookup/pin-target-lookup.component.mjs +405 -0
- package/esm2022/lib/scoped-pin-lookup/scoped-pin-lookup.component.mjs +130 -0
- package/esm2022/lib/services/item-ref-lookup.service.mjs +29 -0
- package/esm2022/lib/services/pin-ref-lookup.service.mjs +85 -0
- package/{esm2020 → esm2022}/myrmidon-cadmus-refs-asserted-ids.mjs +4 -4
- package/esm2022/public-api.mjs +13 -0
- package/fesm2022/myrmidon-cadmus-refs-asserted-ids.mjs +1265 -0
- package/fesm2022/myrmidon-cadmus-refs-asserted-ids.mjs.map +1 -0
- package/index.d.ts +5 -5
- package/lib/asserted-composite-id/asserted-composite-id.component.d.ts +83 -0
- package/lib/asserted-composite-ids/asserted-composite-ids.component.d.ts +67 -0
- package/lib/asserted-id/asserted-id.component.d.ts +49 -49
- package/lib/asserted-ids/asserted-ids.component.d.ts +44 -44
- package/lib/cadmus-refs-asserted-ids.module.d.ts +28 -22
- package/lib/pin-target-lookup/pin-target-lookup.component.d.ts +139 -0
- package/lib/scoped-pin-lookup/scoped-pin-lookup.component.d.ts +39 -39
- package/lib/services/item-ref-lookup.service.d.ts +13 -0
- package/lib/services/pin-ref-lookup.service.d.ts +27 -18
- package/package.json +8 -14
- package/public-api.d.ts +9 -5
- package/esm2020/lib/asserted-id/asserted-id.component.mjs +0 -132
- package/esm2020/lib/asserted-ids/asserted-ids.component.mjs +0 -146
- package/esm2020/lib/cadmus-refs-asserted-ids.module.mjs +0 -91
- package/esm2020/lib/scoped-pin-lookup/scoped-pin-lookup.component.mjs +0 -129
- package/esm2020/lib/services/pin-ref-lookup.service.mjs +0 -72
- package/esm2020/public-api.mjs +0 -9
- package/fesm2015/myrmidon-cadmus-refs-asserted-ids.mjs +0 -554
- package/fesm2015/myrmidon-cadmus-refs-asserted-ids.mjs.map +0 -1
- package/fesm2020/myrmidon-cadmus-refs-asserted-ids.mjs +0 -547
- package/fesm2020/myrmidon-cadmus-refs-asserted-ids.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
# CadmusRefsAssertedIds
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0.
|
|
4
|
-
|
|
5
|
-
## Model
|
|
6
|
-
|
|
7
|
-
The asserted ID and asserted IDs bricks provide a way to include external or internal references to resource identifiers, whatever their type and origin.
|
|
8
|
-
|
|
9
|
-
The asserted ID brick allows editing a simple model representing such IDs, having:
|
|
10
|
-
|
|
11
|
-
- a value, the ID itself.
|
|
12
|
-
- a scope, representing the context the ID originates from (e.g. an ontology, a repository, a website, etc.).
|
|
13
|
-
- an optional tag, eventually used to group or classify the ID.
|
|
14
|
-
- an optional assertion, eventually used to define the uncertainty level of the assignment of this ID to the context it applies to.
|
|
15
|
-
|
|
16
|
-
The asserted IDs brick is just a collection of such IDs.
|
|
17
|
-
|
|
18
|
-
## Behavior
|
|
19
|
-
|
|
20
|
-
In both cases, the component provides a special mechanism for internal, pin-based lookup. In most cases, human users prefer to adopt friendly IDs, which are unique only in the context of their editing environment. Such identifiers are typically named EIDs (entity IDs), and may be found scattered among parts, or linked to items via a metadata part.
|
|
21
|
-
|
|
22
|
-
For instance, a decorations part in a manuscript collects a number of decorations; for each one, it might define an arbitrary EID (like e.g. `angel1`) used to identify it among the others, in the context of that part.
|
|
23
|
-
|
|
24
|
-
When filling the decorations part with data, users just ensure that this EID is unique in the context of the list they are editing. Yet, should we be in need of a non-scoped, unique ID, it would be easy to build it by assembling together the EID with its part/item IDs, which by definition are globally unique (being GUIDs). For instance, this is what can be done when mapping entities from parts into a semantic graph (via mapping rules).
|
|
25
|
-
|
|
26
|
-
Also, sometimes we might also want to assign a human-friendly ID to the item itself, rather than referring to it by its GUID. In this case, the conventional method relies on the generic metadata part, which allows users entering any number of arbitrarily defined name=value pairs. So, a user might enter a pair like e.g. `eid=vat_lat_123`, and use it as the human friendly identifier for a manuscript item corresponding to Vat. Lat. 123.
|
|
27
|
-
|
|
28
|
-
The asserted ID library provides a number of components which can be used to easily refer to the entities identified in this way. According to the scenario illustrated above, the basic requirements for building non-scoped, unique IDs from scoped, human-friendly identifiers are:
|
|
29
|
-
|
|
30
|
-
- we must be able to draw EIDs _from parts or from items_, assuming the convention by which an item can be assigned an EID via its generic _metadata_ part.
|
|
31
|
-
- we must let users pick _the preferred combination_ of components which once assembled build a unique, yet human-friendly identifier.
|
|
32
|
-
|
|
33
|
-
To this end, the asserted ID component provides an internal lookup mechanism based on data pins and metadata conventions. When users want to add an ID referring to some internal entity, either found in a part or corresponding to an item, he just has to pick the type of desired lookup (when more than a single lookup search definition is present), and type some characters to get the first N pins starting with these characters; he can then pick one from the list. Once a pin value is picked, the lookup control shows all the relevant data which can be used as components for the ID to build:
|
|
34
|
-
|
|
35
|
-
- the item GUID.
|
|
36
|
-
- the item title.
|
|
37
|
-
- the part GUID.
|
|
38
|
-
- the part type ID.
|
|
39
|
-
- the item's metadata part entries.
|
|
40
|
-
|
|
41
|
-
The user can then use buttons to append each of these components to the ID being built, and/or variously edit it. When he's ok with the ID, he can then use it as the reference ID being edited.
|
|
42
|
-
|
|
43
|
-
>👉 The demo found in this workspace uses a [mock data service](../../../src/app/services/mock-item.service.ts) instead of the real one, which provides a minimal set of data and functions, just required for the components to function.
|
|
44
|
-
|
|
45
|
-
## Using Scoped ID Lookup
|
|
46
|
-
|
|
47
|
-
Apart from the IDs list, you can use the scoped ID lookup control to add a pin-based lookup for any entity in your own UI:
|
|
48
|
-
|
|
49
|
-
(1) ensure to import this module (`CadmusRefsAssertedIdsModule`).
|
|
50
|
-
|
|
51
|
-
(2) add a lookup control to your UI, like this:
|
|
52
|
-
|
|
53
|
-
```html
|
|
54
|
-
<!-- lookup -->
|
|
55
|
-
<cadmus-scoped-pin-lookup *ngIf="!noLookup" (idPick)="onIdPick($event)"></cadmus-scoped-pin-lookup>
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
In this sample, my UI has a `noLookup` property which can be used to hide the lookup if not required:
|
|
59
|
-
|
|
60
|
-
```ts
|
|
61
|
-
@Input()
|
|
62
|
-
public noLookup?: boolean;
|
|
63
|
-
|
|
64
|
-
public onIdPick(id: string): void {
|
|
65
|
-
// TODO: set your control's value, e.g.:
|
|
66
|
-
// this.myId.setValue(id);
|
|
67
|
-
// this.myId.updateValueAndValidity();
|
|
68
|
-
// this.myId.markAsDirty();
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
(3) in your app's `index-lookup-definitions.ts` file, add the required lookup definitions. Each definition has a conventional key, and is an object with part type ID for the lookup scope, and pin name, e.g.:
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
import { IndexLookupDefinitions } from '@myrmidon/cadmus-core';
|
|
76
|
-
import {
|
|
77
|
-
METADATA_PART_TYPEID,
|
|
78
|
-
HISTORICAL_EVENTS_PART_TYPEID,
|
|
79
|
-
} from '@myrmidon/cadmus-part-general-ui';
|
|
80
|
-
|
|
81
|
-
export const INDEX_LOOKUP_DEFINITIONS: IndexLookupDefinitions = {
|
|
82
|
-
// item's metadata
|
|
83
|
-
meta_eid: {
|
|
84
|
-
typeId: METADATA_PART_TYPEID,
|
|
85
|
-
name: 'eid',
|
|
86
|
-
},
|
|
87
|
-
// general parts
|
|
88
|
-
event_eid: {
|
|
89
|
-
typeId: HISTORICAL_EVENTS_PART_TYPEID,
|
|
90
|
-
name: 'eid',
|
|
91
|
-
},
|
|
92
|
-
// ... etc.
|
|
93
|
-
};
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
>Note that while pin name and type will not be displayed to the end user, the key of each definition will. Unless you have a single definition, the lookup component will display a dropdown list with all the available keys, so that the user can select the lookup's scope. So, use short, yet meaningful keys here, like in the above sample (`meta_eid`, `event_eid`).
|
|
1
|
+
# CadmusRefsAssertedIds
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0.
|
|
4
|
+
|
|
5
|
+
## Model
|
|
6
|
+
|
|
7
|
+
The asserted ID and asserted IDs bricks provide a way to include external or internal references to resource identifiers, whatever their type and origin.
|
|
8
|
+
|
|
9
|
+
The asserted ID brick allows editing a simple model representing such IDs, having:
|
|
10
|
+
|
|
11
|
+
- a value, the ID itself.
|
|
12
|
+
- a scope, representing the context the ID originates from (e.g. an ontology, a repository, a website, etc.).
|
|
13
|
+
- an optional tag, eventually used to group or classify the ID.
|
|
14
|
+
- an optional assertion, eventually used to define the uncertainty level of the assignment of this ID to the context it applies to.
|
|
15
|
+
|
|
16
|
+
The asserted IDs brick is just a collection of such IDs.
|
|
17
|
+
|
|
18
|
+
## Behavior
|
|
19
|
+
|
|
20
|
+
In both cases, the component provides a special mechanism for internal, pin-based lookup. In most cases, human users prefer to adopt friendly IDs, which are unique only in the context of their editing environment. Such identifiers are typically named EIDs (entity IDs), and may be found scattered among parts, or linked to items via a metadata part.
|
|
21
|
+
|
|
22
|
+
For instance, a decorations part in a manuscript collects a number of decorations; for each one, it might define an arbitrary EID (like e.g. `angel1`) used to identify it among the others, in the context of that part.
|
|
23
|
+
|
|
24
|
+
When filling the decorations part with data, users just ensure that this EID is unique in the context of the list they are editing. Yet, should we be in need of a non-scoped, unique ID, it would be easy to build it by assembling together the EID with its part/item IDs, which by definition are globally unique (being GUIDs). For instance, this is what can be done when mapping entities from parts into a semantic graph (via mapping rules).
|
|
25
|
+
|
|
26
|
+
Also, sometimes we might also want to assign a human-friendly ID to the item itself, rather than referring to it by its GUID. In this case, the conventional method relies on the generic metadata part, which allows users entering any number of arbitrarily defined name=value pairs. So, a user might enter a pair like e.g. `eid=vat_lat_123`, and use it as the human friendly identifier for a manuscript item corresponding to Vat. Lat. 123.
|
|
27
|
+
|
|
28
|
+
The asserted ID library provides a number of components which can be used to easily refer to the entities identified in this way. According to the scenario illustrated above, the basic requirements for building non-scoped, unique IDs from scoped, human-friendly identifiers are:
|
|
29
|
+
|
|
30
|
+
- we must be able to draw EIDs _from parts or from items_, assuming the convention by which an item can be assigned an EID via its generic _metadata_ part.
|
|
31
|
+
- we must let users pick _the preferred combination_ of components which once assembled build a unique, yet human-friendly identifier.
|
|
32
|
+
|
|
33
|
+
To this end, the asserted ID component provides an internal lookup mechanism based on data pins and metadata conventions. When users want to add an ID referring to some internal entity, either found in a part or corresponding to an item, he just has to pick the type of desired lookup (when more than a single lookup search definition is present), and type some characters to get the first N pins starting with these characters; he can then pick one from the list. Once a pin value is picked, the lookup control shows all the relevant data which can be used as components for the ID to build:
|
|
34
|
+
|
|
35
|
+
- the item GUID.
|
|
36
|
+
- the item title.
|
|
37
|
+
- the part GUID.
|
|
38
|
+
- the part type ID.
|
|
39
|
+
- the item's metadata part entries.
|
|
40
|
+
|
|
41
|
+
The user can then use buttons to append each of these components to the ID being built, and/or variously edit it. When he's ok with the ID, he can then use it as the reference ID being edited.
|
|
42
|
+
|
|
43
|
+
>👉 The demo found in this workspace uses a [mock data service](../../../src/app/services/mock-item.service.ts) instead of the real one, which provides a minimal set of data and functions, just required for the components to function.
|
|
44
|
+
|
|
45
|
+
## Using Scoped ID Lookup
|
|
46
|
+
|
|
47
|
+
Apart from the IDs list, you can use the scoped ID lookup control to add a pin-based lookup for any entity in your own UI:
|
|
48
|
+
|
|
49
|
+
(1) ensure to import this module (`CadmusRefsAssertedIdsModule`).
|
|
50
|
+
|
|
51
|
+
(2) add a lookup control to your UI, like this:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<!-- lookup -->
|
|
55
|
+
<cadmus-scoped-pin-lookup *ngIf="!noLookup" (idPick)="onIdPick($event)"></cadmus-scoped-pin-lookup>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
In this sample, my UI has a `noLookup` property which can be used to hide the lookup if not required:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
@Input()
|
|
62
|
+
public noLookup?: boolean;
|
|
63
|
+
|
|
64
|
+
public onIdPick(id: string): void {
|
|
65
|
+
// TODO: set your control's value, e.g.:
|
|
66
|
+
// this.myId.setValue(id);
|
|
67
|
+
// this.myId.updateValueAndValidity();
|
|
68
|
+
// this.myId.markAsDirty();
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
(3) in your app's `index-lookup-definitions.ts` file, add the required lookup definitions. Each definition has a conventional key, and is an object with part type ID for the lookup scope, and pin name, e.g.:
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { IndexLookupDefinitions } from '@myrmidon/cadmus-core';
|
|
76
|
+
import {
|
|
77
|
+
METADATA_PART_TYPEID,
|
|
78
|
+
HISTORICAL_EVENTS_PART_TYPEID,
|
|
79
|
+
} from '@myrmidon/cadmus-part-general-ui';
|
|
80
|
+
|
|
81
|
+
export const INDEX_LOOKUP_DEFINITIONS: IndexLookupDefinitions = {
|
|
82
|
+
// item's metadata
|
|
83
|
+
meta_eid: {
|
|
84
|
+
typeId: METADATA_PART_TYPEID,
|
|
85
|
+
name: 'eid',
|
|
86
|
+
},
|
|
87
|
+
// general parts
|
|
88
|
+
event_eid: {
|
|
89
|
+
typeId: HISTORICAL_EVENTS_PART_TYPEID,
|
|
90
|
+
name: 'eid',
|
|
91
|
+
},
|
|
92
|
+
// ... etc.
|
|
93
|
+
};
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
>Note that while pin name and type will not be displayed to the end user, the key of each definition will. Unless you have a single definition, the lookup component will display a dropdown list with all the available keys, so that the user can select the lookup's scope. So, use short, yet meaningful keys here, like in the above sample (`meta_eid`, `event_eid`).
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Component, EventEmitter, Inject, Input, Output, } from '@angular/core';
|
|
2
|
+
import { Validators, } from '@angular/forms';
|
|
3
|
+
import { debounceTime } from 'rxjs/operators';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
import * as i2 from "../services/pin-ref-lookup.service";
|
|
7
|
+
import * as i3 from "@angular/common";
|
|
8
|
+
import * as i4 from "@angular/material/button";
|
|
9
|
+
import * as i5 from "@angular/material/expansion";
|
|
10
|
+
import * as i6 from "@angular/material/form-field";
|
|
11
|
+
import * as i7 from "@angular/material/icon";
|
|
12
|
+
import * as i8 from "@angular/material/input";
|
|
13
|
+
import * as i9 from "@angular/material/select";
|
|
14
|
+
import * as i10 from "@angular/material/core";
|
|
15
|
+
import * as i11 from "@myrmidon/cadmus-refs-assertion";
|
|
16
|
+
import * as i12 from "../pin-target-lookup/pin-target-lookup.component";
|
|
17
|
+
class AssertedCompositeIdComponent {
|
|
18
|
+
get id() {
|
|
19
|
+
return this._id;
|
|
20
|
+
}
|
|
21
|
+
set id(value) {
|
|
22
|
+
if (this._id !== value) {
|
|
23
|
+
this._id = value || undefined;
|
|
24
|
+
this.updateForm(this._id);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
constructor(formBuilder, lookupService, lookupDefs) {
|
|
28
|
+
this.lookupService = lookupService;
|
|
29
|
+
this.lookupDefs = lookupDefs;
|
|
30
|
+
this.target = formBuilder.control(null, Validators.required);
|
|
31
|
+
this.scope = formBuilder.control(null, Validators.maxLength(500));
|
|
32
|
+
this.tag = formBuilder.control(null, Validators.maxLength(50));
|
|
33
|
+
this.assertion = formBuilder.control(null);
|
|
34
|
+
this.form = formBuilder.group({
|
|
35
|
+
target: this.target,
|
|
36
|
+
scope: this.scope,
|
|
37
|
+
tag: this.tag,
|
|
38
|
+
assertion: this.assertion,
|
|
39
|
+
});
|
|
40
|
+
this.targetExpanded = false;
|
|
41
|
+
// events
|
|
42
|
+
this.idChange = new EventEmitter();
|
|
43
|
+
this.editorClose = new EventEmitter();
|
|
44
|
+
}
|
|
45
|
+
ngOnInit() {
|
|
46
|
+
this.form.valueChanges.pipe(debounceTime(300)).subscribe((_) => {
|
|
47
|
+
if (!this._updatingForm) {
|
|
48
|
+
this.emitIdChange();
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
onAssertionChange(assertion) {
|
|
53
|
+
this.assertion.setValue(assertion || null);
|
|
54
|
+
}
|
|
55
|
+
onTargetChange(target) {
|
|
56
|
+
this.target.setValue(target);
|
|
57
|
+
this.target.markAsDirty();
|
|
58
|
+
this.target.updateValueAndValidity();
|
|
59
|
+
this.targetExpanded = false;
|
|
60
|
+
}
|
|
61
|
+
updateForm(id) {
|
|
62
|
+
this._updatingForm = true;
|
|
63
|
+
if (!id) {
|
|
64
|
+
this.form.reset();
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.target.setValue(id.target);
|
|
68
|
+
this.scope.setValue(id.scope || null);
|
|
69
|
+
this.tag.setValue(id.tag || null);
|
|
70
|
+
this.assertion.setValue(id.assertion || null);
|
|
71
|
+
this.form.markAsPristine();
|
|
72
|
+
}
|
|
73
|
+
this._updatingForm = false;
|
|
74
|
+
}
|
|
75
|
+
getId() {
|
|
76
|
+
const external = !this.target.value?.name;
|
|
77
|
+
const target = this.target.value;
|
|
78
|
+
return {
|
|
79
|
+
target: external
|
|
80
|
+
? {
|
|
81
|
+
gid: target?.gid || '',
|
|
82
|
+
label: target?.label || target?.gid || '',
|
|
83
|
+
}
|
|
84
|
+
: target,
|
|
85
|
+
scope: this.scope.value?.trim() || '',
|
|
86
|
+
tag: this.tag.value?.trim(),
|
|
87
|
+
assertion: this.assertion.value || undefined,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
emitIdChange() {
|
|
91
|
+
if (!this.hasSubmit) {
|
|
92
|
+
this._id = this.getId();
|
|
93
|
+
this.idChange.emit(this._id);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
cancel() {
|
|
97
|
+
this.editorClose.emit();
|
|
98
|
+
}
|
|
99
|
+
save() {
|
|
100
|
+
if (this.form.valid) {
|
|
101
|
+
this._id = this.getId();
|
|
102
|
+
this.idChange.emit(this._id);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AssertedCompositeIdComponent, deps: [{ token: i1.FormBuilder }, { token: i2.PinRefLookupService }, { token: 'indexLookupDefinitions' }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
106
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: AssertedCompositeIdComponent, selector: "cadmus-refs-asserted-composite-id", inputs: { idScopeEntries: "idScopeEntries", idTagEntries: "idTagEntries", assTagEntries: "assTagEntries", refTypeEntries: "refTypeEntries", refTagEntries: "refTagEntries", id: "id", hasSubmit: "hasSubmit", pinByTypeMode: "pinByTypeMode", canSwitchMode: "canSwitchMode", canEditTarget: "canEditTarget", lookupDefinitions: "lookupDefinitions" }, outputs: { idChange: "idChange", editorClose: "editorClose" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div>\n <div class=\"form-row\">\n <!-- tag (bound) -->\n <mat-form-field *ngIf=\"idTagEntries?.length\" class=\"short-text\">\n <mat-label>tag</mat-label>\n <mat-select [formControl]=\"tag\">\n <mat-option *ngFor=\"let e of idTagEntries\" [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n <!-- tag (free) -->\n <mat-form-field *ngIf=\"!idTagEntries?.length\" class=\"short-text\">\n <mat-label>tag</mat-label>\n <input matInput [formControl]=\"tag\" />\n <mat-error *ngIf=\"tag.errors?.maxLength && (tag.dirty || tag.touched)\"\n >tag too long</mat-error\n >\n </mat-form-field>\n\n <!-- scope (bound) -->\n <mat-form-field *ngIf=\"idScopeEntries?.length\" class=\"short-text\">\n <mat-label>scope</mat-label>\n <mat-select [formControl]=\"scope\">\n <mat-option *ngFor=\"let e of idScopeEntries\" [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n <!-- scope (free) -->\n <mat-form-field *ngIf=\"!idScopeEntries?.length\" class=\"short-text\">\n <mat-label>scope</mat-label>\n <input matInput [formControl]=\"scope\" />\n <mat-error\n *ngIf=\"scope.errors?.maxLength && (scope.dirty || scope.touched)\"\n >scope too long</mat-error\n >\n </mat-form-field>\n\n <!-- label and GID -->\n <div class=\"info\" *ngIf=\"target.value?.label\">\n <span class=\"label\">label</span>{{ target.value?.label }}\n </div>\n <div class=\"info\" *ngIf=\"target.value?.gid\">\n <span class=\"label\">GID</span>{{ target.value?.gid }}\n </div>\n </div>\n\n <!-- target -->\n <div>\n <mat-expansion-panel [(expanded)]=\"targetExpanded\">\n <mat-expansion-panel-header>target</mat-expansion-panel-header>\n <cadmus-pin-target-lookup\n [pinByTypeMode]=\"pinByTypeMode\"\n [canSwitchMode]=\"canSwitchMode\"\n [canEditTarget]=\"canEditTarget\"\n [lookupDefinitions]=\"lookupDefinitions\"\n [target]=\"target.value\"\n (targetChange)=\"onTargetChange($event)\"\n ></cadmus-pin-target-lookup>\n </mat-expansion-panel>\n </div>\n\n <!-- assertion -->\n <br />\n <mat-expansion-panel>\n <mat-expansion-panel-header>assertion</mat-expansion-panel-header>\n <cadmus-refs-assertion\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [assertion]=\"assertion.value\"\n (assertionChange)=\"onAssertionChange($event)\"\n >\n </cadmus-refs-assertion>\n </mat-expansion-panel>\n </div>\n\n <!-- buttons -->\n <div *ngIf=\"hasSubmit\">\n <button\n mat-icon-button\n color=\"warn\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"!this.target.value?.gid || !this.target.value?.label\"\n >\n <mat-icon>close</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n [disabled]=\"form.invalid\"\n >\n <mat-icon>check_circle</mat-icon>\n </button>\n </div>\n</form>\n", styles: [".form-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.form-row *{flex:0 0 auto}.short-text{width:8em}.pin-info{font-size:90%;color:silver}fieldset{border:1px solid silver;border-radius:6px;padding:6px}.info{border:1px solid silver;border-radius:6px;background-color:silver;color:#fff;padding:4px}.info .label{background-color:#fff;color:silver;margin:0 6px}@media only screen and (max-width: 959px){div#container{grid-template-rows:1fr auto;grid-template-columns:1fr;grid-template-areas:\"editor\" \"lookup\"}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i10.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i11.AssertionComponent, selector: "cadmus-refs-assertion", inputs: ["assTagEntries", "refTypeEntries", "refTagEntries", "assertion"], outputs: ["assertionChange"] }, { kind: "component", type: i12.PinTargetLookupComponent, selector: "cadmus-pin-target-lookup", inputs: ["pinByTypeMode", "canSwitchMode", "canEditTarget", "lookupDefinitions", "target"], outputs: ["editorClose", "targetChange"] }] }); }
|
|
107
|
+
}
|
|
108
|
+
export { AssertedCompositeIdComponent };
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AssertedCompositeIdComponent, decorators: [{
|
|
110
|
+
type: Component,
|
|
111
|
+
args: [{ selector: 'cadmus-refs-asserted-composite-id', template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div>\n <div class=\"form-row\">\n <!-- tag (bound) -->\n <mat-form-field *ngIf=\"idTagEntries?.length\" class=\"short-text\">\n <mat-label>tag</mat-label>\n <mat-select [formControl]=\"tag\">\n <mat-option *ngFor=\"let e of idTagEntries\" [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n <!-- tag (free) -->\n <mat-form-field *ngIf=\"!idTagEntries?.length\" class=\"short-text\">\n <mat-label>tag</mat-label>\n <input matInput [formControl]=\"tag\" />\n <mat-error *ngIf=\"tag.errors?.maxLength && (tag.dirty || tag.touched)\"\n >tag too long</mat-error\n >\n </mat-form-field>\n\n <!-- scope (bound) -->\n <mat-form-field *ngIf=\"idScopeEntries?.length\" class=\"short-text\">\n <mat-label>scope</mat-label>\n <mat-select [formControl]=\"scope\">\n <mat-option *ngFor=\"let e of idScopeEntries\" [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n <!-- scope (free) -->\n <mat-form-field *ngIf=\"!idScopeEntries?.length\" class=\"short-text\">\n <mat-label>scope</mat-label>\n <input matInput [formControl]=\"scope\" />\n <mat-error\n *ngIf=\"scope.errors?.maxLength && (scope.dirty || scope.touched)\"\n >scope too long</mat-error\n >\n </mat-form-field>\n\n <!-- label and GID -->\n <div class=\"info\" *ngIf=\"target.value?.label\">\n <span class=\"label\">label</span>{{ target.value?.label }}\n </div>\n <div class=\"info\" *ngIf=\"target.value?.gid\">\n <span class=\"label\">GID</span>{{ target.value?.gid }}\n </div>\n </div>\n\n <!-- target -->\n <div>\n <mat-expansion-panel [(expanded)]=\"targetExpanded\">\n <mat-expansion-panel-header>target</mat-expansion-panel-header>\n <cadmus-pin-target-lookup\n [pinByTypeMode]=\"pinByTypeMode\"\n [canSwitchMode]=\"canSwitchMode\"\n [canEditTarget]=\"canEditTarget\"\n [lookupDefinitions]=\"lookupDefinitions\"\n [target]=\"target.value\"\n (targetChange)=\"onTargetChange($event)\"\n ></cadmus-pin-target-lookup>\n </mat-expansion-panel>\n </div>\n\n <!-- assertion -->\n <br />\n <mat-expansion-panel>\n <mat-expansion-panel-header>assertion</mat-expansion-panel-header>\n <cadmus-refs-assertion\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [assertion]=\"assertion.value\"\n (assertionChange)=\"onAssertionChange($event)\"\n >\n </cadmus-refs-assertion>\n </mat-expansion-panel>\n </div>\n\n <!-- buttons -->\n <div *ngIf=\"hasSubmit\">\n <button\n mat-icon-button\n color=\"warn\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"!this.target.value?.gid || !this.target.value?.label\"\n >\n <mat-icon>close</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n [disabled]=\"form.invalid\"\n >\n <mat-icon>check_circle</mat-icon>\n </button>\n </div>\n</form>\n", styles: [".form-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.form-row *{flex:0 0 auto}.short-text{width:8em}.pin-info{font-size:90%;color:silver}fieldset{border:1px solid silver;border-radius:6px;padding:6px}.info{border:1px solid silver;border-radius:6px;background-color:silver;color:#fff;padding:4px}.info .label{background-color:#fff;color:silver;margin:0 6px}@media only screen and (max-width: 959px){div#container{grid-template-rows:1fr auto;grid-template-columns:1fr;grid-template-areas:\"editor\" \"lookup\"}}\n"] }]
|
|
112
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.PinRefLookupService }, { type: undefined, decorators: [{
|
|
113
|
+
type: Inject,
|
|
114
|
+
args: ['indexLookupDefinitions']
|
|
115
|
+
}] }]; }, propDecorators: { idScopeEntries: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], idTagEntries: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}], assTagEntries: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}], refTypeEntries: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], refTagEntries: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], id: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], hasSubmit: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], pinByTypeMode: [{
|
|
130
|
+
type: Input
|
|
131
|
+
}], canSwitchMode: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], canEditTarget: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], lookupDefinitions: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], idChange: [{
|
|
138
|
+
type: Output
|
|
139
|
+
}], editorClose: [{
|
|
140
|
+
type: Output
|
|
141
|
+
}] } });
|
|
142
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0ZWQtY29tcG9zaXRlLWlkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL215cm1pZG9uL2NhZG11cy1yZWZzLWFzc2VydGVkLWlkcy9zcmMvbGliL2Fzc2VydGVkLWNvbXBvc2l0ZS1pZC9hc3NlcnRlZC1jb21wb3NpdGUtaWQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbXlybWlkb24vY2FkbXVzLXJlZnMtYXNzZXJ0ZWQtaWRzL3NyYy9saWIvYXNzZXJ0ZWQtY29tcG9zaXRlLWlkL2Fzc2VydGVkLWNvbXBvc2l0ZS1pZC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUNULFlBQVksRUFDWixNQUFNLEVBQ04sS0FBSyxFQUVMLE1BQU0sR0FDUCxNQUFNLGVBQWU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LT5cbiAgPGRpdiAqbmdJZj1cImhhc1N1Ym1pdFwiPlxuICAgIDxidXR0b25cbiAgICAgIG1hdC1pY29uLWJ1dHRvblxuICAgICAgY29sb3I9XCJ3YXJuXCJcbiAgICAgIHR5cGU9XCJidXR0b25cIlxuICAgICAgKGNsaWNrKT1cImNhbmNlbCgpXCJcbiAgICAgIFtkaXNhYmxlZF09XCIhdGhpcy50YXJnZXQudmFsdWU/LmdpZCB8fCAhdGhpcy50YXJnZXQudmFsdWU/LmxhYmVsXCJcbiAgICA+XG4gICAgICA8bWF0LWljb24+Y2xvc2U8L21hdC1pY29uPlxuICAgIDwvYnV0dG9uPlxuICAgIDxidXR0b25cbiAgICAgIG1hdC1pY29uLWJ1dHRvblxuICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgIHR5cGU9XCJzdWJtaXRcIlxuICAgICAgW2Rpc2FibGVkXT1cImZvcm0uaW52YWxpZFwiXG4gICAgPlxuICAgICAgPG1hdC1pY29uPmNoZWNrX2NpcmNsZTwvbWF0LWljb24+XG4gICAgPC9idXR0b24+XG4gIDwvZGl2PlxuPC9mb3JtPlxuIl19
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { take } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/forms";
|
|
5
|
+
import * as i2 from "@myrmidon/ng-mat-tools";
|
|
6
|
+
import * as i3 from "@angular/common";
|
|
7
|
+
import * as i4 from "@angular/material/button";
|
|
8
|
+
import * as i5 from "@angular/material/expansion";
|
|
9
|
+
import * as i6 from "@angular/material/icon";
|
|
10
|
+
import * as i7 from "../asserted-composite-id/asserted-composite-id.component";
|
|
11
|
+
/**
|
|
12
|
+
* Asserted IDs editor.
|
|
13
|
+
*/
|
|
14
|
+
class AssertedCompositeIdsComponent {
|
|
15
|
+
/**
|
|
16
|
+
* The asserted IDs.
|
|
17
|
+
*/
|
|
18
|
+
get ids() {
|
|
19
|
+
return this._ids;
|
|
20
|
+
}
|
|
21
|
+
set ids(value) {
|
|
22
|
+
if (this._ids !== value) {
|
|
23
|
+
this._ids = value || [];
|
|
24
|
+
this.updateForm(value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
constructor(formBuilder, _dialogService) {
|
|
28
|
+
this._dialogService = _dialogService;
|
|
29
|
+
this._ids = [];
|
|
30
|
+
this._editedIndex = -1;
|
|
31
|
+
this.idsChange = new EventEmitter();
|
|
32
|
+
this.entries = formBuilder.control([], { nonNullable: true });
|
|
33
|
+
// form
|
|
34
|
+
this.form = formBuilder.group({
|
|
35
|
+
ids: this.entries,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
updateForm(ids) {
|
|
39
|
+
if (!ids?.length) {
|
|
40
|
+
this.form.reset();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.entries.setValue(ids, { emitEvent: false });
|
|
44
|
+
this.entries.updateValueAndValidity();
|
|
45
|
+
this.form.markAsPristine();
|
|
46
|
+
}
|
|
47
|
+
emitIdsChange() {
|
|
48
|
+
this.idsChange.emit(this.entries.value);
|
|
49
|
+
}
|
|
50
|
+
addId() {
|
|
51
|
+
this.editId({
|
|
52
|
+
target: { gid: '', label: '' },
|
|
53
|
+
}, -1);
|
|
54
|
+
}
|
|
55
|
+
editId(id, index) {
|
|
56
|
+
this._editedIndex = index;
|
|
57
|
+
this.edited = id;
|
|
58
|
+
}
|
|
59
|
+
closeId() {
|
|
60
|
+
this._editedIndex = -1;
|
|
61
|
+
this.edited = undefined;
|
|
62
|
+
}
|
|
63
|
+
saveId(entry) {
|
|
64
|
+
const entries = [...this.entries.value];
|
|
65
|
+
if (this._editedIndex === -1) {
|
|
66
|
+
entries.push(entry);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
entries.splice(this._editedIndex, 1, entry);
|
|
70
|
+
}
|
|
71
|
+
this.entries.setValue(entries);
|
|
72
|
+
this.entries.markAsDirty();
|
|
73
|
+
this.entries.updateValueAndValidity();
|
|
74
|
+
this.closeId();
|
|
75
|
+
}
|
|
76
|
+
deleteId(index) {
|
|
77
|
+
this._dialogService
|
|
78
|
+
.confirm('Confirmation', 'Delete ID?')
|
|
79
|
+
.pipe(take(1))
|
|
80
|
+
.subscribe((yes) => {
|
|
81
|
+
if (yes) {
|
|
82
|
+
if (this._editedIndex === index) {
|
|
83
|
+
this.closeId();
|
|
84
|
+
}
|
|
85
|
+
const entries = [...this.entries.value];
|
|
86
|
+
entries.splice(index, 1);
|
|
87
|
+
this.entries.setValue(entries);
|
|
88
|
+
this.entries.markAsDirty();
|
|
89
|
+
this.entries.updateValueAndValidity();
|
|
90
|
+
this.emitIdsChange();
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
moveIdUp(index) {
|
|
95
|
+
if (index < 1) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const entry = this.entries.value[index];
|
|
99
|
+
const entries = [...this.entries.value];
|
|
100
|
+
entries.splice(index, 1);
|
|
101
|
+
entries.splice(index - 1, 0, entry);
|
|
102
|
+
this.entries.setValue(entries);
|
|
103
|
+
this.entries.markAsDirty();
|
|
104
|
+
this.entries.updateValueAndValidity();
|
|
105
|
+
this.emitIdsChange();
|
|
106
|
+
}
|
|
107
|
+
moveIdDown(index) {
|
|
108
|
+
if (index + 1 >= this.entries.value.length) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const entry = this.entries.value[index];
|
|
112
|
+
const entries = [...this.entries.value];
|
|
113
|
+
entries.splice(index, 1);
|
|
114
|
+
entries.splice(index + 1, 0, entry);
|
|
115
|
+
this.entries.setValue(entries);
|
|
116
|
+
this.entries.markAsDirty();
|
|
117
|
+
this.entries.updateValueAndValidity();
|
|
118
|
+
this.emitIdsChange();
|
|
119
|
+
}
|
|
120
|
+
onIdChange(id) {
|
|
121
|
+
this.saveId(id);
|
|
122
|
+
this.emitIdsChange();
|
|
123
|
+
}
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AssertedCompositeIdsComponent, deps: [{ token: i1.FormBuilder }, { token: i2.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: AssertedCompositeIdsComponent, selector: "cadmus-refs-asserted-composite-ids", inputs: { ids: "ids", idScopeEntries: "idScopeEntries", idTagEntries: "idTagEntries", assTagEntries: "assTagEntries", refTypeEntries: "refTypeEntries", refTagEntries: "refTagEntries", pinByTypeMode: "pinByTypeMode", canSwitchMode: "canSwitchMode", canEditTarget: "canEditTarget", lookupDefinitions: "lookupDefinitions" }, outputs: { idsChange: "idsChange" }, ngImport: i0, template: "<form [formGroup]=\"form\">\r\n <!-- buttons -->\r\n <button type=\"button\" color=\"primary\" mat-flat-button (click)=\"addId()\">\r\n <mat-icon>add_circle</mat-icon> ID\r\n </button>\r\n <!-- list -->\r\n <table *ngIf=\"entries.value?.length\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>scope</th>\r\n <th>label</th>\r\n <th>value</th>\r\n <th>ass.</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor=\"\r\n let entry of entries.value;\r\n let i = index;\r\n let first = first;\r\n let last = last\r\n \"\r\n >\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n color=\"primary\"\r\n matTooltip=\"Edit this ID\"\r\n (click)=\"editId(entry, i)\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Move this ID up\"\r\n [disabled]=\"first\"\r\n (click)=\"moveIdUp(i)\"\r\n >\r\n <mat-icon>arrow_upward</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Move this ID down\"\r\n [disabled]=\"last\"\r\n (click)=\"moveIdDown(i)\"\r\n >\r\n <mat-icon>arrow_downward</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n matTooltip=\"Delete this ID\"\r\n (click)=\"deleteId(i)\"\r\n >\r\n <mat-icon>remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ entry.scope }}</td>\r\n <td>{{ entry?.target?.label }}</td>\r\n <td>{{ entry?.target?.gid }}</td>\r\n <td>{{ entry?.assertion ? \"Y\" : \"N\" }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n\r\n <!-- editor -->\r\n <mat-expansion-panel [expanded]=\"edited\" [disabled]=\"!edited\">\r\n <mat-expansion-panel-header\r\n >ID {{ edited?.target?.label }}</mat-expansion-panel-header\r\n >\r\n <cadmus-refs-asserted-composite-id\r\n [idScopeEntries]=\"idScopeEntries\"\r\n [idTagEntries]=\"idTagEntries\"\r\n [assTagEntries]=\"assTagEntries\"\r\n [refTypeEntries]=\"refTypeEntries\"\r\n [refTagEntries]=\"refTagEntries\"\r\n [hasSubmit]=\"true\"\r\n [pinByTypeMode]=\"pinByTypeMode\"\r\n [canSwitchMode]=\"canSwitchMode\"\r\n [canEditTarget]=\"canEditTarget\"\r\n [lookupDefinitions]=\"lookupDefinitions\"\r\n [id]=\"edited\"\r\n (idChange)=\"onIdChange($event)\"\r\n (editorClose)=\"closeId()\"\r\n ></cadmus-refs-asserted-composite-id>\r\n </mat-expansion-panel>\r\n</form>\r\n", styles: ["th{font-weight:400;color:silver;text-align:left}td{padding-right:4px}td.fit-width{width:1px;white-space:nowrap;padding:0}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.AssertedCompositeIdComponent, selector: "cadmus-refs-asserted-composite-id", inputs: ["idScopeEntries", "idTagEntries", "assTagEntries", "refTypeEntries", "refTagEntries", "id", "hasSubmit", "pinByTypeMode", "canSwitchMode", "canEditTarget", "lookupDefinitions"], outputs: ["idChange", "editorClose"] }] }); }
|
|
126
|
+
}
|
|
127
|
+
export { AssertedCompositeIdsComponent };
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AssertedCompositeIdsComponent, decorators: [{
|
|
129
|
+
type: Component,
|
|
130
|
+
args: [{ selector: 'cadmus-refs-asserted-composite-ids', template: "<form [formGroup]=\"form\">\r\n <!-- buttons -->\r\n <button type=\"button\" color=\"primary\" mat-flat-button (click)=\"addId()\">\r\n <mat-icon>add_circle</mat-icon> ID\r\n </button>\r\n <!-- list -->\r\n <table *ngIf=\"entries.value?.length\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>scope</th>\r\n <th>label</th>\r\n <th>value</th>\r\n <th>ass.</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor=\"\r\n let entry of entries.value;\r\n let i = index;\r\n let first = first;\r\n let last = last\r\n \"\r\n >\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n color=\"primary\"\r\n matTooltip=\"Edit this ID\"\r\n (click)=\"editId(entry, i)\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Move this ID up\"\r\n [disabled]=\"first\"\r\n (click)=\"moveIdUp(i)\"\r\n >\r\n <mat-icon>arrow_upward</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Move this ID down\"\r\n [disabled]=\"last\"\r\n (click)=\"moveIdDown(i)\"\r\n >\r\n <mat-icon>arrow_downward</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n matTooltip=\"Delete this ID\"\r\n (click)=\"deleteId(i)\"\r\n >\r\n <mat-icon>remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ entry.scope }}</td>\r\n <td>{{ entry?.target?.label }}</td>\r\n <td>{{ entry?.target?.gid }}</td>\r\n <td>{{ entry?.assertion ? \"Y\" : \"N\" }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n\r\n <!-- editor -->\r\n <mat-expansion-panel [expanded]=\"edited\" [disabled]=\"!edited\">\r\n <mat-expansion-panel-header\r\n >ID {{ edited?.target?.label }}</mat-expansion-panel-header\r\n >\r\n <cadmus-refs-asserted-composite-id\r\n [idScopeEntries]=\"idScopeEntries\"\r\n [idTagEntries]=\"idTagEntries\"\r\n [assTagEntries]=\"assTagEntries\"\r\n [refTypeEntries]=\"refTypeEntries\"\r\n [refTagEntries]=\"refTagEntries\"\r\n [hasSubmit]=\"true\"\r\n [pinByTypeMode]=\"pinByTypeMode\"\r\n [canSwitchMode]=\"canSwitchMode\"\r\n [canEditTarget]=\"canEditTarget\"\r\n [lookupDefinitions]=\"lookupDefinitions\"\r\n [id]=\"edited\"\r\n (idChange)=\"onIdChange($event)\"\r\n (editorClose)=\"closeId()\"\r\n ></cadmus-refs-asserted-composite-id>\r\n </mat-expansion-panel>\r\n</form>\r\n", styles: ["th{font-weight:400;color:silver;text-align:left}td{padding-right:4px}td.fit-width{width:1px;white-space:nowrap;padding:0}\n"] }]
|
|
131
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.DialogService }]; }, propDecorators: { ids: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], idScopeEntries: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], idTagEntries: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], assTagEntries: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}], refTypeEntries: [{
|
|
140
|
+
type: Input
|
|
141
|
+
}], refTagEntries: [{
|
|
142
|
+
type: Input
|
|
143
|
+
}], pinByTypeMode: [{
|
|
144
|
+
type: Input
|
|
145
|
+
}], canSwitchMode: [{
|
|
146
|
+
type: Input
|
|
147
|
+
}], canEditTarget: [{
|
|
148
|
+
type: Input
|
|
149
|
+
}], lookupDefinitions: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], idsChange: [{
|
|
152
|
+
type: Output
|
|
153
|
+
}] } });
|
|
154
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0ZWQtY29tcG9zaXRlLWlkcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9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NvbmZpcm0oJ0NvbmZpcm1hdGlvbicsICdEZWxldGUgSUQ/JylcclxuICAgICAgLnBpcGUodGFrZSgxKSlcclxuICAgICAgLnN1YnNjcmliZSgoeWVzKSA9PiB7XHJcbiAgICAgICAgaWYgKHllcykge1xyXG4gICAgICAgICAgaWYgKHRoaXMuX2VkaXRlZEluZGV4ID09PSBpbmRleCkge1xyXG4gICAgICAgICAgICB0aGlzLmNsb3NlSWQoKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGNvbnN0IGVudHJpZXMgPSBbLi4udGhpcy5lbnRyaWVzLnZhbHVlXTtcclxuICAgICAgICAgIGVudHJpZXMuc3BsaWNlKGluZGV4LCAxKTtcclxuICAgICAgICAgIHRoaXMuZW50cmllcy5zZXRWYWx1ZShlbnRyaWVzKTtcclxuICAgICAgICAgIHRoaXMuZW50cmllcy5tYXJrQXNEaXJ0eSgpO1xyXG4gICAgICAgICAgdGhpcy5lbnRyaWVzLnVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKTtcclxuICAgICAgICAgIHRoaXMuZW1pdElkc0NoYW5nZSgpO1xyXG4gICAgICAgIH1cclxuICAgICAgfSk7XHJcbiAgfVxyXG5cclxuICBwdWJsaWMgbW92ZUlkVXAoaW5kZXg6IG51bWJlcik6IHZvaWQge1xyXG4gICAgaWYgKGluZGV4IDwgMSkge1xyXG4gICAgICByZXR1cm47XHJcbiAgICB9XHJcbiAgICBjb25zdCBlbnRyeSA9IHRoaXMuZW50cmllcy52YWx1ZVtpbmRleF07XHJcbiAgICBjb25zdCBlbnRyaWVzID0gWy4uLnRoaXMuZW50cmllcy52YWx1ZV07XHJcbiAgICBlbnRyaWVzLnNwbGljZShpbmRleCwgMSk7XHJcbiAgICBlbnRyaWVzLnNwbGljZShpbmRleCAtIDEsIDAsIGVudHJ5KTtcclxuICAgIHRoaXMuZW50cmllcy5zZXRWYWx1ZShlbnRyaWVzKTtcclxuICAgIHRoaXMuZW50cmllcy5tYXJrQXNEaXJ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XG4gICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcclxuICAgICAgICAgICAgbWF0LWljb24tYnV0dG9uXHJcbiAgICAgICAgICAgIG1hdFRvb2x0aXA9XCJNb3ZlIHRoaXMgSUQgdXBcIlxyXG4gICAgICAgICAgICBbZGlzYWJsZWRdPVwiZmlyc3RcIlxyXG4gICAgICAgICAgICAoY2xpY2spPVwibW92ZUlkVXAoaSlcIlxyXG4gICAgICAgICAgPlxyXG4gICAgICAgICAgICA8bWF0LWljb24+YXJyb3dfdXB3YXJkPC9tYXQtaWNvbj5cclxuICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgPGJ1dHRvblxyXG4gICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcclxuICAgICAgICAgICAgbWF0LWljb24tYnV0dG9uXHJcbiAgICAgICAgICAgIG1hdFRvb2x0aXA9XCJNb3ZlIHRoaXMgSUQgZG93blwiXHJcbiAgICAgICAgICAgIFtkaXNhYmxlZF09XCJsYXN0XCJcclxuICAgICAgICAgICAgKGNsaWNrKT1cIm1vdmVJZERvd24oaSlcIlxyXG4gICAgICAgICAgPlxyXG4gICAgICAgICAgICA8bWF0LWljb24+YXJyb3dfZG93bndhcmQ8L21hdC1pY29uPlxyXG4gICAgICAgICAgPC9idXR0b24+XHJcbiAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxyXG4gICAgICAgICAgICBtYXQtaWNvbi1idXR0b25cclxuICAgICAgICAgICAgY29sb3I9XCJ3YXJuXCJcclxuICAgICAgICAgICAgbWF0VG9vbHRpcD1cIkRlbGV0ZSB0aGlzIElEXCJcclxuICAgICAgICAgICAgKGNsaWNrKT1cImRlbGV0ZUlkKGkpXCJcclxuICAgICAgICAgID5cclxuICAgICAgICAgICAgPG1hdC1pY29uPnJlbW92ZV9jaXJjbGU8L21hdC1pY29uPlxyXG4gICAgICAgICAgPC9idXR0b24+XHJcbiAgICAgICAgPC90ZD5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