@myrmidon/cadmus-refs-asserted-ids 10.0.9 → 10.0.11
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, model, input, output, signal, effect, Inject, ChangeDetectionStrategy, Component
|
|
2
|
+
import { Injectable, model, input, output, signal, effect, Inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/forms';
|
|
4
4
|
import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { filter, debounceTime as debounceTime$1 } from 'rxjs/operators';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i2 from '@angular/material/button';
|
|
8
8
|
import { MatButtonModule } from '@angular/material/button';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i5 from '@angular/material/expansion';
|
|
10
10
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
11
11
|
import * as i6$1 from '@angular/material/form-field';
|
|
12
12
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
@@ -25,11 +25,11 @@ import * as i6 from '@angular/cdk/clipboard';
|
|
|
25
25
|
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
26
26
|
import * as i8 from '@angular/material/checkbox';
|
|
27
27
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
28
|
-
import * as i3
|
|
29
|
-
import { FlatLookupPipe } from '@myrmidon/ngx-tools';
|
|
28
|
+
import * as i3 from '@myrmidon/ngx-tools';
|
|
29
|
+
import { FlatLookupPipe, deepCopy } from '@myrmidon/ngx-tools';
|
|
30
30
|
import * as i1 from '@myrmidon/cadmus-api';
|
|
31
31
|
import * as i4 from '@angular/material/snack-bar';
|
|
32
|
-
import * as
|
|
32
|
+
import * as i1$2 from '@myrmidon/ngx-mat-tools';
|
|
33
33
|
|
|
34
34
|
class ItemRefLookupService {
|
|
35
35
|
_itemService;
|
|
@@ -46,10 +46,10 @@ class ItemRefLookupService {
|
|
|
46
46
|
getName(item) {
|
|
47
47
|
return item?.title;
|
|
48
48
|
}
|
|
49
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
50
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
49
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ItemRefLookupService, deps: [{ token: i1.ItemService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
50
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ItemRefLookupService, providedIn: 'root' });
|
|
51
51
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ItemRefLookupService, decorators: [{
|
|
53
53
|
type: Injectable,
|
|
54
54
|
args: [{
|
|
55
55
|
providedIn: 'root',
|
|
@@ -127,10 +127,10 @@ class PinRefLookupService {
|
|
|
127
127
|
}
|
|
128
128
|
}));
|
|
129
129
|
}
|
|
130
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
131
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
130
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PinRefLookupService, deps: [{ token: i1.ItemService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
131
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PinRefLookupService, providedIn: 'root' });
|
|
132
132
|
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PinRefLookupService, decorators: [{
|
|
134
134
|
type: Injectable,
|
|
135
135
|
args: [{
|
|
136
136
|
providedIn: 'root',
|
|
@@ -393,14 +393,14 @@ class PinTargetLookupComponent {
|
|
|
393
393
|
}
|
|
394
394
|
buildGid() {
|
|
395
395
|
// the GID is the part ID if any, or the item ID, followed by
|
|
396
|
-
//
|
|
396
|
+
// slash, pin's name, slash, value (=EID)
|
|
397
397
|
const pin = this.lookupData()?.pin;
|
|
398
398
|
if (!pin?.value) {
|
|
399
399
|
return null;
|
|
400
400
|
}
|
|
401
401
|
return pin.partId
|
|
402
|
-
? `P${pin.partId}/${pin.value}`
|
|
403
|
-
: `I${pin.itemId}/${pin.value}`;
|
|
402
|
+
? `P${pin.partId}/${pin.name}/${pin.value}`
|
|
403
|
+
: `I${pin.itemId}/${pin.name}/${pin.value}`;
|
|
404
404
|
}
|
|
405
405
|
buildLabel() {
|
|
406
406
|
if (!this.lookupData()?.pin) {
|
|
@@ -635,16 +635,16 @@ class PinTargetLookupComponent {
|
|
|
635
635
|
}
|
|
636
636
|
this.emitTargetChange();
|
|
637
637
|
}
|
|
638
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
639
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: PinTargetLookupComponent, isStandalone: true, selector: "cadmus-pin-target-lookup", inputs: { pinByTypeMode: { classPropertyName: "pinByTypeMode", publicName: "pinByTypeMode", isSignal: true, isRequired: false, transformFunction: null }, canSwitchMode: { classPropertyName: "canSwitchMode", publicName: "canSwitchMode", isSignal: true, isRequired: false, transformFunction: null }, canEditTarget: { classPropertyName: "canEditTarget", publicName: "canEditTarget", isSignal: true, isRequired: false, transformFunction: null }, lookupDefinitions: { classPropertyName: "lookupDefinitions", publicName: "lookupDefinitions", isSignal: true, isRequired: false, transformFunction: null }, extLookupConfigs: { classPropertyName: "extLookupConfigs", publicName: "extLookupConfigs", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, defaultPartTypeKey: { classPropertyName: "defaultPartTypeKey", publicName: "defaultPartTypeKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pinByTypeMode: "pinByTypeModeChange", canSwitchMode: "canSwitchModeChange", lookupDefinitions: "lookupDefinitionsChange", target: "targetChange", editorClose: "editorClose", extMoreRequest: "extMoreRequest", extLookupConfigChange: "extLookupConfigChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\r\n <div class=\"form-row\">\r\n <!-- external -->\r\n <mat-checkbox [formControl]=\"external\">external</mat-checkbox>\r\n <!-- mode switcher -->\r\n @if (!external.value) {\r\n <div>\r\n @if (canSwitchMode()) {\r\n <mat-checkbox [formControl]=\"byTypeMode\"> by type</mat-checkbox>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"form-row\">\r\n <!-- label -->\r\n <div>\r\n @if (external.value || canEditTarget()) {\r\n <mat-form-field>\r\n <mat-label>label</mat-label>\r\n <input matInput [formControl]=\"label\" />\r\n @if ($any(label).errors?.required && (label.dirty || label.touched)) {\r\n <mat-error>label required</mat-error>\r\n } @if ( $any(label).errors?.maxLength && (label.dirty || label.touched)\r\n ) {\r\n <mat-error>label too long</mat-error>\r\n }\r\n </mat-form-field>\r\n } @if (!external.value && !canEditTarget() && label.value) {\r\n <div class=\"info\"><span class=\"label\">label</span>{{ label.value }}</div>\r\n }\r\n </div>\r\n\r\n <!-- gid -->\r\n <div id=\"gid-container\">\r\n @if (external.value || canEditTarget()) {\r\n <mat-form-field>\r\n <mat-label>GID</mat-label>\r\n <input matInput [formControl]=\"gid\" />\r\n @if ($any(gid).errors?.required && (gid.dirty || gid.touched)) {\r\n <mat-error>GID required</mat-error>\r\n } @if ($any(gid).errors?.maxLength && (gid.dirty || gid.touched)) {\r\n <mat-error>GID too long</mat-error>\r\n }\r\n </mat-form-field>\r\n } @if (!external.value && !canEditTarget() && gid.value) {\r\n <div class=\"info\">\r\n <span class=\"label\">GID</span> <span class=\"gid\">{{ gid.value }}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- external lookup set -->\r\n @if (external.value && extLookupConfigs().length) {\r\n <fieldset>\r\n <legend>external lookup</legend>\r\n <cadmus-refs-lookup-set\r\n [configs]=\"extLookupConfigs()\"\r\n (itemChange)=\"onExtItemChange($event)\"\r\n (moreRequest)=\"onExtMoreRequest($event)\"\r\n (configChange)=\"onExtConfigChange($any($event))\"\r\n />\r\n </fieldset>\r\n }\r\n\r\n <!-- BY ITEM -->\r\n @if (!external.value) {\r\n <fieldset>\r\n <legend>internal lookup</legend>\r\n <div class=\"form-row\">\r\n @if (!byTypeMode.value) {\r\n <fieldset class=\"form-row\">\r\n <legend>pin filters</legend>\r\n <!-- item filter -->\r\n <cadmus-refs-lookup\r\n [service]=\"itemLookupService\"\r\n label=\"item\"\r\n (itemChange)=\"onItemLookupChange($event)\"\r\n />\r\n <!-- part filter -->\r\n @if (itemParts.length) {\r\n <mat-form-field>\r\n <mat-label>part</mat-label>\r\n <mat-select [formControl]=\"itemPart\">\r\n <mat-option [value]=\"null\">(any)</mat-option>\r\n @for (p of itemParts(); track p) {\r\n <mat-option [value]=\"p\">{{\r\n p.typeId | flatLookup : modelEntries() : \"id\" : \"value\"\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>parts: {{ itemParts().length }}</mat-hint>\r\n </mat-form-field>\r\n }\r\n </fieldset>\r\n }\r\n <!-- BY TYPE -->\r\n @if (byTypeMode.value) {\r\n <div>\r\n <!-- part type filter -->\r\n @if (partTypeKeys().length) {\r\n <mat-form-field>\r\n <mat-label>part type</mat-label>\r\n <mat-select [formControl]=\"partTypeKey\">\r\n @for (k of partTypeKeys(); track k) {\r\n <mat-option [value]=\"k\">{{ k }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n </div>\r\n }\r\n <!-- PIN -->\r\n @if (partTypeKey.value) {\r\n <div>\r\n <!-- pin lookup -->\r\n <cadmus-refs-lookup\r\n [service]=\"pinLookupService\"\r\n [baseFilter]=\"filter()\"\r\n [options]=\"pinFilterOptions()\"\r\n label=\"pin\"\r\n (itemChange)=\"onPinLookupChange($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n <!-- data -->\r\n @if (lookupData()?.pin?.name) {\r\n <mat-expansion-panel id=\"data\">\r\n <mat-expansion-panel-header>pin data</mat-expansion-panel-header>\r\n <!-- table -->\r\n <table>\r\n <thead>\r\n <th></th>\r\n <th>source</th>\r\n <th>value</th>\r\n </thead>\r\n <tbody>\r\n <!-- pin name -->\r\n @if (lookupData()?.pin?.name) {\r\n <tr>\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Copy value\"\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.name\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>pin name</td>\r\n <td>{{ lookupData()!.pin.name }}</td>\r\n </tr>\r\n }\r\n <!-- pin value -->\r\n @if (lookupData()?.pin?.value) {\r\n <tr>\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Copy value\"\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.value\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>pin value</td>\r\n <td>{{ lookupData()!.pin.value }}</td>\r\n </tr>\r\n }\r\n <!-- item ID -->\r\n @if (lookupData()?.pin?.itemId) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.itemId\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>item ID</td>\r\n <td>{{ lookupData()!.pin.itemId }}</td>\r\n </tr>\r\n }\r\n <!-- item title -->\r\n @if (lookupData()?.item?.title) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.item!.title\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>item title</td>\r\n <td>{{ lookupData()!.item!.title }}</td>\r\n </tr>\r\n }\r\n <!-- part ID -->\r\n @if (lookupData()?.pin?.partId) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.partId\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>part ID</td>\r\n <td>{{ lookupData()!.pin.partId }}</td>\r\n </tr>\r\n }\r\n <!-- part type ID -->\r\n @if (lookupData()?.pin?.partTypeId) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.partTypeId\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>part type ID</td>\r\n <td>{{ lookupData()!.pin!.partTypeId }}</td>\r\n </tr>\r\n }\r\n <!-- part role ID -->\r\n @if (lookupData()?.pin?.roleId) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.roleId!\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>part role ID</td>\r\n <td>{{ lookupData()!.pin!.roleId }}</td>\r\n </tr>\r\n }\r\n <!-- part's metadata -->\r\n @for ( m of lookupData()?.metaPart?.metadata || []; track m; let i =\r\n $index) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"m.value\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td class=\"metadata\">{{ m.name }}</td>\r\n <td class=\"metadata\">{{ m.value }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </mat-expansion-panel>\r\n }\r\n </fieldset>\r\n }\r\n\r\n <!-- buttons -->\r\n <div class=\"button-row\" id=\"toolbar\">\r\n <button mat-icon-button type=\"button\" (click)=\"close()\">\r\n <mat-icon class=\"mat-warn\">close</mat-icon>\r\n </button>\r\n <button mat-flat-button type=\"submit\" [disabled]=\"form.invalid\">\r\n <mat-icon>check_circle</mat-icon>\r\n target\r\n </button>\r\n </div>\r\n</form>\r\n", styles: [".metadata{color:#4a3001}.info{border:1px solid silver;border-radius:6px;background-color:silver;color:#fff;padding:4px;margin:8px 0}.info .label{background-color:#fff;color:silver;margin:0 6px}#data{margin:8px 0}table{border:1px solid silver;border-radius:6px;padding:4px;margin-top:8px}tr:nth-child(odd){background-color:#f0f0f0}td.fit-width{width:1px;white-space:nowrap}th{font-weight:400;text-align:left;color:silver}.form-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.form-row *{flex:0 0 auto}#gid-container{flex:1 1 auto}#gid-container mat-form-field{width:100%}.button-row{display:flex;align-items:center;flex-wrap:wrap}.label{border:1px solid silver;border-radius:6px;padding:4px}fieldset{border:1px solid silver;border-radius:6px;padding:8px;margin-bottom:8px}legend{color:silver}div#toolbar{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type:
|
|
638
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PinTargetLookupComponent, deps: [{ token: 'indexLookupDefinitions' }, { token: ItemRefLookupService }, { token: PinRefLookupService }, { token: i1.ItemService }, { token: i1.ThesaurusService }, { token: i4.MatSnackBar }, { token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
639
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: PinTargetLookupComponent, isStandalone: true, selector: "cadmus-pin-target-lookup", inputs: { pinByTypeMode: { classPropertyName: "pinByTypeMode", publicName: "pinByTypeMode", isSignal: true, isRequired: false, transformFunction: null }, canSwitchMode: { classPropertyName: "canSwitchMode", publicName: "canSwitchMode", isSignal: true, isRequired: false, transformFunction: null }, canEditTarget: { classPropertyName: "canEditTarget", publicName: "canEditTarget", isSignal: true, isRequired: false, transformFunction: null }, lookupDefinitions: { classPropertyName: "lookupDefinitions", publicName: "lookupDefinitions", isSignal: true, isRequired: false, transformFunction: null }, extLookupConfigs: { classPropertyName: "extLookupConfigs", publicName: "extLookupConfigs", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, defaultPartTypeKey: { classPropertyName: "defaultPartTypeKey", publicName: "defaultPartTypeKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pinByTypeMode: "pinByTypeModeChange", canSwitchMode: "canSwitchModeChange", lookupDefinitions: "lookupDefinitionsChange", target: "targetChange", editorClose: "editorClose", extMoreRequest: "extMoreRequest", extLookupConfigChange: "extLookupConfigChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\r\n <div class=\"form-row\">\r\n <!-- external -->\r\n <mat-checkbox [formControl]=\"external\">external</mat-checkbox>\r\n <!-- mode switcher -->\r\n @if (!external.value) {\r\n <div>\r\n @if (canSwitchMode()) {\r\n <mat-checkbox [formControl]=\"byTypeMode\"> by type</mat-checkbox>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"form-row\">\r\n <!-- label -->\r\n <div>\r\n @if (external.value || canEditTarget()) {\r\n <mat-form-field>\r\n <mat-label>label</mat-label>\r\n <input matInput [formControl]=\"label\" />\r\n @if ($any(label).errors?.required && (label.dirty || label.touched)) {\r\n <mat-error>label required</mat-error>\r\n } @if ( $any(label).errors?.maxLength && (label.dirty || label.touched)\r\n ) {\r\n <mat-error>label too long</mat-error>\r\n }\r\n </mat-form-field>\r\n } @if (!external.value && !canEditTarget() && label.value) {\r\n <div class=\"info\"><span class=\"label\">label</span>{{ label.value }}</div>\r\n }\r\n </div>\r\n\r\n <!-- gid -->\r\n <div id=\"gid-container\">\r\n @if (external.value || canEditTarget()) {\r\n <mat-form-field>\r\n <mat-label>GID</mat-label>\r\n <input matInput [formControl]=\"gid\" />\r\n @if ($any(gid).errors?.required && (gid.dirty || gid.touched)) {\r\n <mat-error>GID required</mat-error>\r\n } @if ($any(gid).errors?.maxLength && (gid.dirty || gid.touched)) {\r\n <mat-error>GID too long</mat-error>\r\n }\r\n </mat-form-field>\r\n } @if (!external.value && !canEditTarget() && gid.value) {\r\n <div class=\"info\">\r\n <span class=\"label\">GID</span> <span class=\"gid\">{{ gid.value }}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- external lookup set -->\r\n @if (external.value && extLookupConfigs().length) {\r\n <fieldset>\r\n <legend>external lookup</legend>\r\n <cadmus-refs-lookup-set\r\n [configs]=\"extLookupConfigs()\"\r\n (itemChange)=\"onExtItemChange($event)\"\r\n (moreRequest)=\"onExtMoreRequest($event)\"\r\n (configChange)=\"onExtConfigChange($any($event))\"\r\n />\r\n </fieldset>\r\n }\r\n\r\n <!-- BY ITEM -->\r\n @if (!external.value) {\r\n <fieldset>\r\n <legend>internal lookup</legend>\r\n <div class=\"form-row\">\r\n @if (!byTypeMode.value) {\r\n <fieldset class=\"form-row\">\r\n <legend>pin filters</legend>\r\n <!-- item filter -->\r\n <cadmus-refs-lookup\r\n [service]=\"itemLookupService\"\r\n label=\"item\"\r\n (itemChange)=\"onItemLookupChange($event)\"\r\n />\r\n <!-- part filter -->\r\n @if (itemParts.length) {\r\n <mat-form-field>\r\n <mat-label>part</mat-label>\r\n <mat-select [formControl]=\"itemPart\">\r\n <mat-option [value]=\"null\">(any)</mat-option>\r\n @for (p of itemParts(); track p) {\r\n <mat-option [value]=\"p\">{{\r\n p.typeId | flatLookup : modelEntries() : \"id\" : \"value\"\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>parts: {{ itemParts().length }}</mat-hint>\r\n </mat-form-field>\r\n }\r\n </fieldset>\r\n }\r\n <!-- BY TYPE -->\r\n @if (byTypeMode.value) {\r\n <div>\r\n <!-- part type filter -->\r\n @if (partTypeKeys().length) {\r\n <mat-form-field>\r\n <mat-label>part type</mat-label>\r\n <mat-select [formControl]=\"partTypeKey\">\r\n @for (k of partTypeKeys(); track k) {\r\n <mat-option [value]=\"k\">{{ k }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n </div>\r\n }\r\n <!-- PIN -->\r\n @if (partTypeKey.value) {\r\n <div>\r\n <!-- pin lookup -->\r\n <cadmus-refs-lookup\r\n [service]=\"pinLookupService\"\r\n [baseFilter]=\"filter()\"\r\n [options]=\"pinFilterOptions()\"\r\n label=\"pin\"\r\n (itemChange)=\"onPinLookupChange($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n <!-- data -->\r\n @if (lookupData()?.pin?.name) {\r\n <mat-expansion-panel id=\"data\">\r\n <mat-expansion-panel-header>pin data</mat-expansion-panel-header>\r\n <!-- table -->\r\n <table>\r\n <thead>\r\n <th></th>\r\n <th>source</th>\r\n <th>value</th>\r\n </thead>\r\n <tbody>\r\n <!-- pin name -->\r\n @if (lookupData()?.pin?.name) {\r\n <tr>\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Copy value\"\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.name\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>pin name</td>\r\n <td>{{ lookupData()!.pin.name }}</td>\r\n </tr>\r\n }\r\n <!-- pin value -->\r\n @if (lookupData()?.pin?.value) {\r\n <tr>\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Copy value\"\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.value\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>pin value</td>\r\n <td>{{ lookupData()!.pin.value }}</td>\r\n </tr>\r\n }\r\n <!-- item ID -->\r\n @if (lookupData()?.pin?.itemId) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.itemId\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>item ID</td>\r\n <td>{{ lookupData()!.pin.itemId }}</td>\r\n </tr>\r\n }\r\n <!-- item title -->\r\n @if (lookupData()?.item?.title) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.item!.title\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>item title</td>\r\n <td>{{ lookupData()!.item!.title }}</td>\r\n </tr>\r\n }\r\n <!-- part ID -->\r\n @if (lookupData()?.pin?.partId) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.partId\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>part ID</td>\r\n <td>{{ lookupData()!.pin.partId }}</td>\r\n </tr>\r\n }\r\n <!-- part type ID -->\r\n @if (lookupData()?.pin?.partTypeId) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.partTypeId\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>part type ID</td>\r\n <td>{{ lookupData()!.pin!.partTypeId }}</td>\r\n </tr>\r\n }\r\n <!-- part role ID -->\r\n @if (lookupData()?.pin?.roleId) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"lookupData()!.pin!.roleId!\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td>part role ID</td>\r\n <td>{{ lookupData()!.pin!.roleId }}</td>\r\n </tr>\r\n }\r\n <!-- part's metadata -->\r\n @for ( m of lookupData()?.metaPart?.metadata || []; track m; let i =\r\n $index) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [cdkCopyToClipboard]=\"m.value\"\r\n (cdkCopyToClipboardCopied)=\"onCopied()\"\r\n >\r\n <mat-icon class=\"mat-primary\">content_copy</mat-icon>\r\n </button>\r\n </td>\r\n <td class=\"metadata\">{{ m.name }}</td>\r\n <td class=\"metadata\">{{ m.value }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </mat-expansion-panel>\r\n }\r\n </fieldset>\r\n }\r\n\r\n <!-- buttons -->\r\n <div class=\"button-row\" id=\"toolbar\">\r\n <button mat-icon-button type=\"button\" (click)=\"close()\">\r\n <mat-icon class=\"mat-warn\">close</mat-icon>\r\n </button>\r\n <button mat-flat-button type=\"submit\" [disabled]=\"form.invalid\">\r\n <mat-icon>check_circle</mat-icon>\r\n target\r\n </button>\r\n </div>\r\n</form>\r\n", styles: [".metadata{color:#4a3001}.info{border:1px solid silver;border-radius:6px;background-color:silver;color:#fff;padding:4px;margin:8px 0}.info .label{background-color:#fff;color:silver;margin:0 6px}#data{margin:8px 0}table{border:1px solid silver;border-radius:6px;padding:4px;margin-top:8px}tr:nth-child(odd){background-color:#f0f0f0}td.fit-width{width:1px;white-space:nowrap}th{font-weight:400;text-align:left;color:silver}.form-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.form-row *{flex:0 0 auto}#gid-container{flex:1 1 auto}#gid-container mat-form-field{width:100%}.button-row{display:flex;align-items:center;flex-wrap:wrap}.label{border:1px solid silver;border-radius:6px;padding:4px}fieldset{border:1px solid silver;border-radius:6px;padding:8px;margin-bottom:8px}legend{color:silver}div#toolbar{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type:
|
|
640
640
|
// material
|
|
641
|
-
ClipboardModule }, { kind: "directive", type: i6.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type:
|
|
641
|
+
ClipboardModule }, { kind: "directive", type: i6.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i9.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type:
|
|
642
642
|
// bricks
|
|
643
643
|
RefLookupComponent, selector: "cadmus-refs-lookup", inputs: ["label", "limit", "baseFilter", "service", "item", "required", "hasMore", "linkTemplate", "optDialog", "options"], outputs: ["itemChange", "optionsChange", "moreRequest"] }, { kind: "component", type: RefLookupSetComponent, selector: "cadmus-refs-lookup-set", inputs: ["configs", "iconSize"], outputs: ["configChange", "itemChange", "moreRequest"] }, { kind: "pipe", type:
|
|
644
644
|
// myrmidon
|
|
645
645
|
FlatLookupPipe, name: "flatLookup" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
646
646
|
}
|
|
647
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PinTargetLookupComponent, decorators: [{
|
|
648
648
|
type: Component,
|
|
649
649
|
args: [{ selector: 'cadmus-pin-target-lookup', imports: [
|
|
650
650
|
FormsModule,
|
|
@@ -668,7 +668,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
668
668
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
669
669
|
type: Inject,
|
|
670
670
|
args: ['indexLookupDefinitions']
|
|
671
|
-
}] }, { type: ItemRefLookupService }, { type: PinRefLookupService }, { type: i1.ItemService }, { type: i1.ThesaurusService }, { type: i4.MatSnackBar }, { type: i1$1.FormBuilder }] });
|
|
671
|
+
}] }, { type: ItemRefLookupService }, { type: PinRefLookupService }, { type: i1.ItemService }, { type: i1.ThesaurusService }, { type: i4.MatSnackBar }, { type: i1$1.FormBuilder }], propDecorators: { pinByTypeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinByTypeMode", required: false }] }, { type: i0.Output, args: ["pinByTypeModeChange"] }], canSwitchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "canSwitchMode", required: false }] }, { type: i0.Output, args: ["canSwitchModeChange"] }], canEditTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEditTarget", required: false }] }], lookupDefinitions: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookupDefinitions", required: false }] }, { type: i0.Output, args: ["lookupDefinitionsChange"] }], extLookupConfigs: [{ type: i0.Input, args: [{ isSignal: true, alias: "extLookupConfigs", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }, { type: i0.Output, args: ["targetChange"] }], defaultPartTypeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPartTypeKey", required: false }] }], editorClose: [{ type: i0.Output, args: ["editorClose"] }], extMoreRequest: [{ type: i0.Output, args: ["extMoreRequest"] }], extLookupConfigChange: [{ type: i0.Output, args: ["extLookupConfigChange"] }] } });
|
|
672
672
|
|
|
673
673
|
/**
|
|
674
674
|
* An asserted composite ID editor. This allows the user to edit an asserted
|
|
@@ -846,16 +846,16 @@ class AssertedCompositeIdComponent {
|
|
|
846
846
|
this.id.set(this.getId());
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
850
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
849
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AssertedCompositeIdComponent, deps: [{ token: i1$1.FormBuilder }, { token: PinRefLookupService }, { token: 'indexLookupDefinitions' }, { token: i3.RamStorageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
850
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AssertedCompositeIdComponent, isStandalone: true, selector: "cadmus-refs-asserted-composite-id", inputs: { idScopeEntries: { classPropertyName: "idScopeEntries", publicName: "idScopeEntries", isSignal: true, isRequired: false, transformFunction: null }, idTagEntries: { classPropertyName: "idTagEntries", publicName: "idTagEntries", isSignal: true, isRequired: false, transformFunction: null }, assTagEntries: { classPropertyName: "assTagEntries", publicName: "assTagEntries", isSignal: true, isRequired: false, transformFunction: null }, refTypeEntries: { classPropertyName: "refTypeEntries", publicName: "refTypeEntries", isSignal: true, isRequired: false, transformFunction: null }, refTagEntries: { classPropertyName: "refTagEntries", publicName: "refTagEntries", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, hasSubmit: { classPropertyName: "hasSubmit", publicName: "hasSubmit", isSignal: true, isRequired: false, transformFunction: null }, pinByTypeMode: { classPropertyName: "pinByTypeMode", publicName: "pinByTypeMode", isSignal: true, isRequired: false, transformFunction: null }, canSwitchMode: { classPropertyName: "canSwitchMode", publicName: "canSwitchMode", isSignal: true, isRequired: false, transformFunction: null }, canEditTarget: { classPropertyName: "canEditTarget", publicName: "canEditTarget", isSignal: true, isRequired: false, transformFunction: null }, lookupDefinitions: { classPropertyName: "lookupDefinitions", publicName: "lookupDefinitions", isSignal: true, isRequired: false, transformFunction: null }, defaultPartTypeKey: { classPropertyName: "defaultPartTypeKey", publicName: "defaultPartTypeKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { id: "idChange", editorClose: "editorClose", extMoreRequest: "extMoreRequest" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\r\n <div>\r\n <div class=\"form-row\">\r\n <!-- tag (bound) -->\r\n @if (idTagEntries()?.length) {\r\n <mat-form-field class=\"short-text\">\r\n <mat-label>tag</mat-label>\r\n <mat-select [formControl]=\"tag\">\r\n @for (e of idTagEntries(); track e) {\r\n <mat-option [value]=\"e.id\">{{ e.value }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n <!-- tag (free) -->\r\n @else {\r\n <mat-form-field class=\"short-text\">\r\n <mat-label>tag</mat-label>\r\n <input matInput [formControl]=\"tag\" />\r\n @if ($any(tag.errors)?.maxLength && (tag.dirty || tag.touched)) {\r\n <mat-error>tag too long</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n\r\n <!-- scope (bound) -->\r\n @if (idScopeEntries()?.length) {\r\n <mat-form-field class=\"short-text\">\r\n <mat-label>scope</mat-label>\r\n <mat-select [formControl]=\"scope\">\r\n @for (e of idScopeEntries(); track e) {\r\n <mat-option [value]=\"e.id\">{{ e.value }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n <!-- scope (free) -->\r\n @else {\r\n <mat-form-field class=\"short-text\">\r\n <mat-label>scope</mat-label>\r\n <input matInput [formControl]=\"scope\" />\r\n @if ( $any(scope.errors)?.maxLength && (scope.dirty || scope.touched) )\r\n {\r\n <mat-error>scope too long</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n\r\n <!-- label and GID -->\r\n @if (target.value?.label) {\r\n <div class=\"info\">\r\n <span class=\"label\">label</span>{{ target.value?.label }}\r\n </div>\r\n } @if (target.value?.gid) {\r\n <div class=\"info\">\r\n <span class=\"label\">GID</span>{{ target.value?.gid }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- target -->\r\n <div class=\"boxed\">\r\n <mat-expansion-panel\r\n [expanded]=\"targetExpanded()\"\r\n (expandedChange)=\"targetExpanded.set($event)\"\r\n >\r\n <mat-expansion-panel-header>target</mat-expansion-panel-header>\r\n <cadmus-pin-target-lookup\r\n [pinByTypeMode]=\"pinByTypeMode()\"\r\n [canSwitchMode]=\"canSwitchMode()\"\r\n [canEditTarget]=\"canEditTarget()\"\r\n [lookupDefinitions]=\"lookupDefinitions()\"\r\n [defaultPartTypeKey]=\"defaultPartTypeKey()\"\r\n [target]=\"target.value || undefined\"\r\n [extLookupConfigs]=\"extLookupConfigs()\"\r\n (targetChange)=\"onTargetChange($event)\"\r\n (editorClose)=\"onEditorClose()\"\r\n (extMoreRequest)=\"onExtMoreRequest($event)\"\r\n (extLookupConfigChange)=\"onExtLookupConfigChange($event)\"\r\n />\r\n </mat-expansion-panel>\r\n </div>\r\n\r\n <!-- assertion -->\r\n <br />\r\n <div class=\"boxed\">\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>assertion</mat-expansion-panel-header>\r\n <cadmus-refs-assertion\r\n [assTagEntries]=\"assTagEntries()\"\r\n [refTypeEntries]=\"refTypeEntries()\"\r\n [refTagEntries]=\"refTagEntries()\"\r\n [assertion]=\"assertion.value || undefined\"\r\n (assertionChange)=\"onAssertionChange($event)\"\r\n />\r\n </mat-expansion-panel>\r\n </div>\r\n </div>\r\n\r\n <!-- buttons -->\r\n @if (hasSubmit()) {\r\n <div>\r\n <button mat-icon-button type=\"button\" (click)=\"cancel()\">\r\n <mat-icon class=\"mat-warn\">close</mat-icon>\r\n </button>\r\n <button mat-icon-button type=\"submit\" [disabled]=\"form.invalid\">\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n</form>\r\n", styles: [".form-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.form-row *{flex:0 0 auto}.boxed{border:1px solid silver;border-radius:6px;padding:6px}.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type:
|
|
851
851
|
// material
|
|
852
|
-
MatButtonModule }, { kind: "component", type:
|
|
852
|
+
MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i9.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "component", type:
|
|
853
853
|
// bricks
|
|
854
854
|
AssertionComponent, selector: "cadmus-refs-assertion", inputs: ["assTagEntries", "refTypeEntries", "refTagEntries", "assertion", "noLookup", "noCitation", "defaultPicker"], outputs: ["assertionChange"] }, { kind: "component", type:
|
|
855
855
|
// local
|
|
856
856
|
PinTargetLookupComponent, selector: "cadmus-pin-target-lookup", inputs: ["pinByTypeMode", "canSwitchMode", "canEditTarget", "lookupDefinitions", "extLookupConfigs", "target", "defaultPartTypeKey"], outputs: ["pinByTypeModeChange", "canSwitchModeChange", "lookupDefinitionsChange", "targetChange", "editorClose", "extMoreRequest", "extLookupConfigChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
857
857
|
}
|
|
858
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AssertedCompositeIdComponent, decorators: [{
|
|
859
859
|
type: Component,
|
|
860
860
|
args: [{ selector: 'cadmus-refs-asserted-composite-id', imports: [
|
|
861
861
|
ReactiveFormsModule,
|
|
@@ -875,28 +875,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
875
875
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: PinRefLookupService }, { type: undefined, decorators: [{
|
|
876
876
|
type: Inject,
|
|
877
877
|
args: ['indexLookupDefinitions']
|
|
878
|
-
}] }, { type: i3
|
|
878
|
+
}] }, { type: i3.RamStorageService }], propDecorators: { idScopeEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "idScopeEntries", required: false }] }], idTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "idTagEntries", required: false }] }], assTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "assTagEntries", required: false }] }], refTypeEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "refTypeEntries", required: false }] }], refTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "refTagEntries", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }, { type: i0.Output, args: ["idChange"] }], hasSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasSubmit", required: false }] }], pinByTypeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinByTypeMode", required: false }] }], canSwitchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "canSwitchMode", required: false }] }], canEditTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEditTarget", required: false }] }], lookupDefinitions: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookupDefinitions", required: false }] }], defaultPartTypeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPartTypeKey", required: false }] }], editorClose: [{ type: i0.Output, args: ["editorClose"] }], extMoreRequest: [{ type: i0.Output, args: ["extMoreRequest"] }] } });
|
|
879
879
|
|
|
880
880
|
/**
|
|
881
881
|
* Asserted composite IDs editor.
|
|
882
882
|
*/
|
|
883
883
|
class AssertedCompositeIdsComponent {
|
|
884
884
|
_dialogService;
|
|
885
|
-
_ids;
|
|
886
|
-
editedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "editedIndex" }] : []));
|
|
887
|
-
edited = signal(undefined, ...(ngDevMode ? [{ debugName: "edited" }] : []));
|
|
888
885
|
/**
|
|
889
886
|
* The asserted IDs.
|
|
890
887
|
*/
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
}
|
|
894
|
-
set ids(value) {
|
|
895
|
-
if (this._ids !== value) {
|
|
896
|
-
this._ids = value || [];
|
|
897
|
-
this.updateForm(value);
|
|
898
|
-
}
|
|
899
|
-
}
|
|
888
|
+
ids = model([], ...(ngDevMode ? [{ debugName: "ids" }] : []));
|
|
889
|
+
editedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "editedIndex" }] : []));
|
|
890
|
+
edited = signal(undefined, ...(ngDevMode ? [{ debugName: "edited" }] : []));
|
|
900
891
|
// asserted-id-scopes
|
|
901
892
|
idScopeEntries = input(...(ngDevMode ? [undefined, { debugName: "idScopeEntries" }] : []));
|
|
902
893
|
// asserted-id-tags
|
|
@@ -934,32 +925,8 @@ class AssertedCompositeIdsComponent {
|
|
|
934
925
|
* The default part type key.
|
|
935
926
|
*/
|
|
936
927
|
defaultPartTypeKey = input(...(ngDevMode ? [undefined, { debugName: "defaultPartTypeKey" }] : []));
|
|
937
|
-
|
|
938
|
-
* Emitted whenever any ID changes.
|
|
939
|
-
*/
|
|
940
|
-
idsChange = output();
|
|
941
|
-
entries;
|
|
942
|
-
form;
|
|
943
|
-
constructor(formBuilder, _dialogService) {
|
|
928
|
+
constructor(_dialogService) {
|
|
944
929
|
this._dialogService = _dialogService;
|
|
945
|
-
this._ids = [];
|
|
946
|
-
this.entries = formBuilder.control([], { nonNullable: true });
|
|
947
|
-
// form
|
|
948
|
-
this.form = formBuilder.group({
|
|
949
|
-
ids: this.entries,
|
|
950
|
-
});
|
|
951
|
-
}
|
|
952
|
-
updateForm(ids) {
|
|
953
|
-
if (!ids?.length) {
|
|
954
|
-
this.form.reset();
|
|
955
|
-
return;
|
|
956
|
-
}
|
|
957
|
-
this.entries.setValue(ids, { emitEvent: false });
|
|
958
|
-
this.entries.updateValueAndValidity();
|
|
959
|
-
this.form.markAsPristine();
|
|
960
|
-
}
|
|
961
|
-
emitIdsChange() {
|
|
962
|
-
this.idsChange.emit(this.entries.value);
|
|
963
930
|
}
|
|
964
931
|
addId() {
|
|
965
932
|
this.editId({
|
|
@@ -968,23 +935,21 @@ class AssertedCompositeIdsComponent {
|
|
|
968
935
|
}
|
|
969
936
|
editId(id, index) {
|
|
970
937
|
this.editedIndex.set(index);
|
|
971
|
-
this.edited.set(id);
|
|
938
|
+
this.edited.set(deepCopy(id));
|
|
972
939
|
}
|
|
973
940
|
closeId() {
|
|
974
941
|
this.editedIndex.set(-1);
|
|
975
942
|
this.edited.set(undefined);
|
|
976
943
|
}
|
|
977
944
|
saveId(entry) {
|
|
978
|
-
const
|
|
945
|
+
const ids = [...this.ids()];
|
|
979
946
|
if (this.editedIndex() === -1) {
|
|
980
|
-
|
|
947
|
+
ids.push(entry);
|
|
981
948
|
}
|
|
982
949
|
else {
|
|
983
|
-
|
|
950
|
+
ids.splice(this.editedIndex(), 1, entry);
|
|
984
951
|
}
|
|
985
|
-
this.
|
|
986
|
-
this.entries.markAsDirty();
|
|
987
|
-
this.entries.updateValueAndValidity();
|
|
952
|
+
this.ids.set(ids);
|
|
988
953
|
this.closeId();
|
|
989
954
|
}
|
|
990
955
|
deleteId(index) {
|
|
@@ -996,12 +961,9 @@ class AssertedCompositeIdsComponent {
|
|
|
996
961
|
if (this.editedIndex() === index) {
|
|
997
962
|
this.closeId();
|
|
998
963
|
}
|
|
999
|
-
const
|
|
1000
|
-
|
|
1001
|
-
this.
|
|
1002
|
-
this.entries.markAsDirty();
|
|
1003
|
-
this.entries.updateValueAndValidity();
|
|
1004
|
-
this.emitIdsChange();
|
|
964
|
+
const ids = [...this.ids()];
|
|
965
|
+
ids.splice(index, 1);
|
|
966
|
+
this.ids.set(ids);
|
|
1005
967
|
}
|
|
1006
968
|
});
|
|
1007
969
|
}
|
|
@@ -1009,36 +971,29 @@ class AssertedCompositeIdsComponent {
|
|
|
1009
971
|
if (index < 1) {
|
|
1010
972
|
return;
|
|
1011
973
|
}
|
|
1012
|
-
const
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
this.
|
|
1017
|
-
this.entries.markAsDirty();
|
|
1018
|
-
this.entries.updateValueAndValidity();
|
|
1019
|
-
this.emitIdsChange();
|
|
974
|
+
const id = this.ids()[index];
|
|
975
|
+
const ids = [...this.ids()];
|
|
976
|
+
ids.splice(index, 1);
|
|
977
|
+
ids.splice(index - 1, 0, id);
|
|
978
|
+
this.ids.set(ids);
|
|
1020
979
|
}
|
|
1021
980
|
moveIdDown(index) {
|
|
1022
|
-
if (index + 1 >= this.
|
|
981
|
+
if (index + 1 >= this.ids().length) {
|
|
1023
982
|
return;
|
|
1024
983
|
}
|
|
1025
|
-
const
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
this.
|
|
1030
|
-
this.entries.markAsDirty();
|
|
1031
|
-
this.entries.updateValueAndValidity();
|
|
1032
|
-
this.emitIdsChange();
|
|
984
|
+
const id = this.ids()[index];
|
|
985
|
+
const ids = [...this.ids()];
|
|
986
|
+
ids.splice(index, 1);
|
|
987
|
+
ids.splice(index + 1, 0, id);
|
|
988
|
+
this.ids.set(ids);
|
|
1033
989
|
}
|
|
1034
990
|
onIdChange(id) {
|
|
1035
991
|
this.saveId(id);
|
|
1036
|
-
this.emitIdsChange();
|
|
1037
992
|
}
|
|
1038
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1039
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AssertedCompositeIdsComponent, deps: [{ token: i1$2.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
994
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AssertedCompositeIdsComponent, isStandalone: true, selector: "cadmus-refs-asserted-composite-ids", inputs: { ids: { classPropertyName: "ids", publicName: "ids", isSignal: true, isRequired: false, transformFunction: null }, idScopeEntries: { classPropertyName: "idScopeEntries", publicName: "idScopeEntries", isSignal: true, isRequired: false, transformFunction: null }, idTagEntries: { classPropertyName: "idTagEntries", publicName: "idTagEntries", isSignal: true, isRequired: false, transformFunction: null }, assTagEntries: { classPropertyName: "assTagEntries", publicName: "assTagEntries", isSignal: true, isRequired: false, transformFunction: null }, refTypeEntries: { classPropertyName: "refTypeEntries", publicName: "refTypeEntries", isSignal: true, isRequired: false, transformFunction: null }, refTagEntries: { classPropertyName: "refTagEntries", publicName: "refTagEntries", isSignal: true, isRequired: false, transformFunction: null }, pinByTypeMode: { classPropertyName: "pinByTypeMode", publicName: "pinByTypeMode", isSignal: true, isRequired: false, transformFunction: null }, canSwitchMode: { classPropertyName: "canSwitchMode", publicName: "canSwitchMode", isSignal: true, isRequired: false, transformFunction: null }, canEditTarget: { classPropertyName: "canEditTarget", publicName: "canEditTarget", isSignal: true, isRequired: false, transformFunction: null }, lookupDefinitions: { classPropertyName: "lookupDefinitions", publicName: "lookupDefinitions", isSignal: true, isRequired: false, transformFunction: null }, defaultPartTypeKey: { classPropertyName: "defaultPartTypeKey", publicName: "defaultPartTypeKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ids: "idsChange" }, ngImport: i0, template: "<div>\r\n <!-- buttons -->\r\n <button type=\"button\" class=\"mat-primary\" mat-flat-button (click)=\"addId()\">\r\n <mat-icon>add_circle</mat-icon> ID\r\n </button>\r\n <!-- list -->\r\n @if (ids().length) {\r\n <table>\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>scope</th>\r\n <th>type</th>\r\n <th>label</th>\r\n <th>gid</th>\r\n <th>ass.</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for ( id of ids(); track id; let i = $index; let first = $first; let last\r\n = $last) {\r\n <tr [class.selected]=\"i === editedIndex()\">\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Edit this ID\"\r\n (click)=\"editId(id, i)\"\r\n >\r\n <mat-icon class=\"mat-primary\">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 matTooltip=\"Delete this ID\"\r\n (click)=\"deleteId(i)\"\r\n >\r\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ id.scope }}</td>\r\n <td>\r\n <mat-icon>{{ id?.target?.name ? \"login\" : \"logout\" }}</mat-icon>\r\n </td>\r\n <td>{{ id?.target?.label }}</td>\r\n <td>{{ id?.target?.gid }}</td>\r\n <td>{{ id?.assertion ? \"Y\" : \"N\" }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n }\r\n <!-- editor -->\r\n @if (edited()) {\r\n <mat-expansion-panel [expanded]=\"edited()\" [disabled]=\"!edited()\">\r\n <mat-expansion-panel-header\r\n ><mat-icon>{{ edited()?.target?.name ? \"login\" : \"logout\" }}</mat-icon> ID\r\n {{ 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 [defaultPartTypeKey]=\"defaultPartTypeKey()\"\r\n [id]=\"edited()\"\r\n (idChange)=\"onIdChange($event)\"\r\n (editorClose)=\"closeId()\"\r\n />\r\n </mat-expansion-panel>\r\n }\r\n</div>\r\n", styles: ["table{width:100%;border-collapse:collapse}tbody tr:nth-child(odd){background-color:#e2e2e2}th{text-align:left;font-weight:400;color:silver}td.fit-width{width:1px;white-space:nowrap}tr.selected{background-color:#d0d0d0!important}fieldset{border:1px solid silver;border-radius:6px;padding:6px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "component", type: AssertedCompositeIdComponent, selector: "cadmus-refs-asserted-composite-id", inputs: ["idScopeEntries", "idTagEntries", "assTagEntries", "refTypeEntries", "refTagEntries", "id", "hasSubmit", "pinByTypeMode", "canSwitchMode", "canEditTarget", "lookupDefinitions", "defaultPartTypeKey"], outputs: ["idChange", "editorClose", "extMoreRequest"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1040
995
|
}
|
|
1041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AssertedCompositeIdsComponent, decorators: [{
|
|
1042
997
|
type: Component,
|
|
1043
998
|
args: [{ selector: 'cadmus-refs-asserted-composite-ids', imports: [
|
|
1044
999
|
FormsModule,
|
|
@@ -1050,10 +1005,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1050
1005
|
MatIconModule,
|
|
1051
1006
|
MatInputModule,
|
|
1052
1007
|
AssertedCompositeIdComponent,
|
|
1053
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
1054
|
-
}], ctorParameters: () => [{ type: i1$
|
|
1055
|
-
type: Input
|
|
1056
|
-
}] } });
|
|
1008
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\r\n <!-- buttons -->\r\n <button type=\"button\" class=\"mat-primary\" mat-flat-button (click)=\"addId()\">\r\n <mat-icon>add_circle</mat-icon> ID\r\n </button>\r\n <!-- list -->\r\n @if (ids().length) {\r\n <table>\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>scope</th>\r\n <th>type</th>\r\n <th>label</th>\r\n <th>gid</th>\r\n <th>ass.</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for ( id of ids(); track id; let i = $index; let first = $first; let last\r\n = $last) {\r\n <tr [class.selected]=\"i === editedIndex()\">\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Edit this ID\"\r\n (click)=\"editId(id, i)\"\r\n >\r\n <mat-icon class=\"mat-primary\">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 matTooltip=\"Delete this ID\"\r\n (click)=\"deleteId(i)\"\r\n >\r\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ id.scope }}</td>\r\n <td>\r\n <mat-icon>{{ id?.target?.name ? \"login\" : \"logout\" }}</mat-icon>\r\n </td>\r\n <td>{{ id?.target?.label }}</td>\r\n <td>{{ id?.target?.gid }}</td>\r\n <td>{{ id?.assertion ? \"Y\" : \"N\" }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n }\r\n <!-- editor -->\r\n @if (edited()) {\r\n <mat-expansion-panel [expanded]=\"edited()\" [disabled]=\"!edited()\">\r\n <mat-expansion-panel-header\r\n ><mat-icon>{{ edited()?.target?.name ? \"login\" : \"logout\" }}</mat-icon> ID\r\n {{ 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 [defaultPartTypeKey]=\"defaultPartTypeKey()\"\r\n [id]=\"edited()\"\r\n (idChange)=\"onIdChange($event)\"\r\n (editorClose)=\"closeId()\"\r\n />\r\n </mat-expansion-panel>\r\n }\r\n</div>\r\n", styles: ["table{width:100%;border-collapse:collapse}tbody tr:nth-child(odd){background-color:#e2e2e2}th{text-align:left;font-weight:400;color:silver}td.fit-width{width:1px;white-space:nowrap}tr.selected{background-color:#d0d0d0!important}fieldset{border:1px solid silver;border-radius:6px;padding:6px}\n"] }]
|
|
1009
|
+
}], ctorParameters: () => [{ type: i1$2.DialogService }], propDecorators: { ids: [{ type: i0.Input, args: [{ isSignal: true, alias: "ids", required: false }] }, { type: i0.Output, args: ["idsChange"] }], idScopeEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "idScopeEntries", required: false }] }], idTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "idTagEntries", required: false }] }], assTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "assTagEntries", required: false }] }], refTypeEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "refTypeEntries", required: false }] }], refTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "refTagEntries", required: false }] }], pinByTypeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinByTypeMode", required: false }] }], canSwitchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "canSwitchMode", required: false }] }], canEditTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEditTarget", required: false }] }], lookupDefinitions: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookupDefinitions", required: false }] }], defaultPartTypeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPartTypeKey", required: false }] }] } });
|
|
1057
1010
|
|
|
1058
1011
|
// from Cadmus general parts
|
|
1059
1012
|
const METADATA_PART_ID = 'it.vedph.metadata';
|
|
@@ -1174,14 +1127,14 @@ class ScopedPinLookupComponent {
|
|
|
1174
1127
|
this.id.markAsDirty();
|
|
1175
1128
|
this.id.updateValueAndValidity();
|
|
1176
1129
|
}
|
|
1177
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1178
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
1130
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ScopedPinLookupComponent, deps: [{ token: i1$1.FormBuilder }, { token: i1.ItemService }, { token: PinRefLookupService }, { token: 'indexLookupDefinitions' }], target: i0.ɵɵFactoryTarget.Component });
|
|
1131
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: ScopedPinLookupComponent, isStandalone: true, selector: "cadmus-scoped-pin-lookup", outputs: { idPick: "idPick" }, ngImport: i0, template: "<div>\r\n <!-- lookup -->\r\n <div>\r\n <form [formGroup]=\"keyForm\" class=\"form-row\">\r\n <!-- key -->\r\n @if (keys().length > 1) {\r\n <mat-form-field>\r\n <mat-label>type</mat-label>\r\n <mat-select [formControl]=\"key\">\r\n @for (k of keys(); track k) {\r\n <mat-option [value]=\"k\">{{ k }}</mat-option>\r\n }\r\n </mat-select>\r\n @if ($any(key).errors?.required && (key.dirty || key.touched)) {\r\n <mat-error>type required</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n <cadmus-refs-lookup\r\n [service]=\"lookupService\"\r\n label=\"pin\"\r\n [options]=\"key.value ? lookupDefs[key.value] : undefined\"\r\n (itemChange)=\"onItemChange($event)\"\r\n />\r\n </form>\r\n </div>\r\n\r\n <!-- builder -->\r\n @if (info()) {\r\n <mat-expansion-panel [expanded]=\"info()\" [disabled]=\"!info()\">\r\n <mat-expansion-panel-header>ID builder</mat-expansion-panel-header>\r\n <!-- ID -->\r\n <div>\r\n <form [formGroup]=\"idForm\" (submit)=\"pickId()\">\r\n <mat-form-field style=\"width: 100%\">\r\n <input matInput [formControl]=\"id\" />\r\n @if ($any(id).errors?.required && (id.dirty || id.touched)) {\r\n <mat-error>ID required</mat-error>\r\n } @if ($any(id).errors?.maxLength && (id.dirty || id.touched)) {\r\n <mat-error>ID too long</mat-error>\r\n }\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matSuffix\r\n (click)=\"resetId()\"\r\n [disabled]=\"!id.value\"\r\n >\r\n <mat-icon class=\"mat-warn\">close</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matSuffix\r\n (click)=\"pickId()\"\r\n [disabled]=\"idForm.invalid\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <!-- table -->\r\n <table>\r\n <thead>\r\n <th></th>\r\n <th>source</th>\r\n <th>value</th>\r\n </thead>\r\n <tbody>\r\n <!-- pin -->\r\n <tr class=\"fit-width\">\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n (click)=\"appendIdComponent('pin')\"\r\n >\r\n <mat-icon class=\"mat-primary\">add_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>pin</td>\r\n <td>{{ info()!.pin.value }}</td>\r\n </tr>\r\n <!-- item ID -->\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n (click)=\"appendIdComponent('itemId')\"\r\n >\r\n <mat-icon class=\"mat-primary\">add_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>item ID</td>\r\n <td>{{ info()!.item?.id }}</td>\r\n </tr>\r\n <!-- item title -->\r\n <tr>\r\n <td></td>\r\n <td>item title</td>\r\n <td>{{ info()!.item?.title }}</td>\r\n </tr>\r\n <!-- part ID -->\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n (click)=\"appendIdComponent('partId')\"\r\n >\r\n <mat-icon class=\"mat-primary\">add_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>part ID</td>\r\n <td>{{ info()!.part?.id }}</td>\r\n </tr>\r\n <!-- part type ID -->\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n (click)=\"appendIdComponent('partTypeId')\"\r\n >\r\n <mat-icon class=\"mat-primary\">add_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>part type ID</td>\r\n <td>{{ info()!.part?.typeId }}</td>\r\n </tr>\r\n <!-- part role ID -->\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n (click)=\"appendIdComponent('partRoleId')\"\r\n >\r\n <mat-icon class=\"mat-primary\">add_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>part role ID</td>\r\n <td>{{ info()!.part?.roleId }}</td>\r\n </tr>\r\n <!-- part's metadata -->\r\n @for (m of info()!.part?.metadata; track m; let i = $index) {\r\n <tr>\r\n <td>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n (click)=\"appendIdComponent('metadata', i)\"\r\n >\r\n <mat-icon class=\"mat-primary\">add_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td class=\"metadata\">{{ m.name }}</td>\r\n <td class=\"metadata\">{{ m.value }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </mat-expansion-panel>\r\n }\r\n</div>\r\n", styles: [".metadata{color:#4a3001}table{border:1px solid silver;border-radius:6px;padding:4px;margin-top:8px}tr:nth-child(odd){background-color:#f0f0f0}th{font-weight:400;text-align:left;color:silver}td.fit-width{width:1px;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type:
|
|
1179
1132
|
// material
|
|
1180
|
-
MatButtonModule }, { kind: "component", type:
|
|
1133
|
+
MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i6$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i9.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type:
|
|
1181
1134
|
// bricks
|
|
1182
1135
|
RefLookupComponent, selector: "cadmus-refs-lookup", inputs: ["label", "limit", "baseFilter", "service", "item", "required", "hasMore", "linkTemplate", "optDialog", "options"], outputs: ["itemChange", "optionsChange", "moreRequest"] }] });
|
|
1183
1136
|
}
|
|
1184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ScopedPinLookupComponent, decorators: [{
|
|
1185
1138
|
type: Component,
|
|
1186
1139
|
args: [{ selector: 'cadmus-scoped-pin-lookup', imports: [
|
|
1187
1140
|
FormsModule,
|
|
@@ -1199,7 +1152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1199
1152
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i1.ItemService }, { type: PinRefLookupService }, { type: undefined, decorators: [{
|
|
1200
1153
|
type: Inject,
|
|
1201
1154
|
args: ['indexLookupDefinitions']
|
|
1202
|
-
}] }] });
|
|
1155
|
+
}] }], propDecorators: { idPick: [{ type: i0.Output, args: ["idPick"] }] } });
|
|
1203
1156
|
|
|
1204
1157
|
/**
|
|
1205
1158
|
* Asserted ID editor component.
|
|
@@ -1323,14 +1276,14 @@ class AssertedIdComponent {
|
|
|
1323
1276
|
this.id.set(this.getId());
|
|
1324
1277
|
}
|
|
1325
1278
|
}
|
|
1326
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1327
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
1279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AssertedIdComponent, deps: [{ token: i1$1.FormBuilder }, { token: PinRefLookupService }, { token: 'indexLookupDefinitions' }], target: i0.ɵɵFactoryTarget.Component });
|
|
1280
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AssertedIdComponent, isStandalone: true, selector: "cadmus-refs-asserted-id", inputs: { idScopeEntries: { classPropertyName: "idScopeEntries", publicName: "idScopeEntries", isSignal: true, isRequired: false, transformFunction: null }, idTagEntries: { classPropertyName: "idTagEntries", publicName: "idTagEntries", isSignal: true, isRequired: false, transformFunction: null }, assTagEntries: { classPropertyName: "assTagEntries", publicName: "assTagEntries", isSignal: true, isRequired: false, transformFunction: null }, refTypeEntries: { classPropertyName: "refTypeEntries", publicName: "refTypeEntries", isSignal: true, isRequired: false, transformFunction: null }, refTagEntries: { classPropertyName: "refTagEntries", publicName: "refTagEntries", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, noEidLookup: { classPropertyName: "noEidLookup", publicName: "noEidLookup", isSignal: true, isRequired: false, transformFunction: null }, hasSubmit: { classPropertyName: "hasSubmit", publicName: "hasSubmit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { id: "idChange", editorClose: "editorClose" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\r\n <div>\r\n <div class=\"form-row\">\r\n <!-- tag (bound) -->\r\n @if (idTagEntries()?.length) {\r\n <mat-form-field>\r\n <mat-label>tag</mat-label>\r\n <mat-select [formControl]=\"tag\">\r\n @for (e of idTagEntries(); track e) {\r\n <mat-option [value]=\"e.id\">{{ e.value }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n <!-- tag (free) -->\r\n @else {\r\n <mat-form-field>\r\n <mat-label>tag</mat-label>\r\n <input matInput [formControl]=\"tag\" />\r\n @if ($any(tag.errors)?.maxLength && (tag.dirty || tag.touched)) {\r\n <mat-error>tag too long</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n\r\n <!-- scope (bound) -->\r\n @if (idScopeEntries()?.length) {\r\n <mat-form-field>\r\n <mat-label>scope</mat-label>\r\n <mat-select [formControl]=\"scope\">\r\n @for (e of idScopeEntries(); track e) {\r\n <mat-option [value]=\"e.id\">{{ e.value }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n <!-- scope (free) -->\r\n @else {\r\n <mat-form-field>\r\n <mat-label>scope</mat-label>\r\n <input matInput [formControl]=\"scope\" />\r\n @if ($any(scope.errors)?.maxLength && (scope.dirty || scope.touched)) {\r\n <mat-error>scope too long</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n\r\n <!-- value -->\r\n <mat-form-field>\r\n <mat-label>value</mat-label>\r\n <input matInput [formControl]=\"value\" />\r\n @if ($any(value.errors)?.required && (value.dirty || value.touched)) {\r\n <mat-error>value required</mat-error>\r\n } @if ($any(value.errors)?.maxLength && (value.dirty || value.touched))\r\n {\r\n <mat-error>value too long</mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <!-- label -->\r\n <mat-form-field>\r\n <mat-label>label</mat-label>\r\n <input matInput [formControl]=\"label\" />\r\n @if ($any(label.errors)?.maxLength && (label.dirty || label.touched)) {\r\n <mat-error>label too long</mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <!-- lookup -->\r\n @if (!noEidLookup()) {\r\n <div>\r\n <mat-expansion-panel\r\n [expanded]=\"lookupExpanded()\"\r\n (expandedChange)=\"lookupExpanded.set($event)\"\r\n >\r\n <mat-expansion-panel-header>lookup</mat-expansion-panel-header>\r\n <cadmus-scoped-pin-lookup (idPick)=\"onIdPick($event)\" />\r\n </mat-expansion-panel>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- assertion -->\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>assertion</mat-expansion-panel-header>\r\n <cadmus-refs-assertion\r\n [assTagEntries]=\"assTagEntries()\"\r\n [refTypeEntries]=\"refTypeEntries()\"\r\n [refTagEntries]=\"refTagEntries()\"\r\n [assertion]=\"assertion.value || undefined\"\r\n (assertionChange)=\"onAssertionChange($event)\"\r\n />\r\n </mat-expansion-panel>\r\n </div>\r\n\r\n <!-- buttons -->\r\n @if (hasSubmit()) {\r\n <div>\r\n <button mat-icon-button type=\"button\" (click)=\"cancel()\">\r\n <mat-icon class=\"mat-warn\">close</mat-icon>\r\n </button>\r\n <button mat-icon-button type=\"submit\" [disabled]=\"form.invalid\">\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n</form>\r\n", styles: [".form-row{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}.form-row *{flex:0 0 auto}.pin-info{font-size:90%;color:silver}fieldset{border:1px solid silver;border-radius:6px;padding: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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type:
|
|
1328
1281
|
// material
|
|
1329
|
-
MatButtonModule }, { kind: "component", type:
|
|
1282
|
+
MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i9.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type:
|
|
1330
1283
|
// bricks
|
|
1331
1284
|
AssertionComponent, selector: "cadmus-refs-assertion", inputs: ["assTagEntries", "refTypeEntries", "refTagEntries", "assertion", "noLookup", "noCitation", "defaultPicker"], outputs: ["assertionChange"] }, { kind: "component", type: ScopedPinLookupComponent, selector: "cadmus-scoped-pin-lookup", outputs: ["idPick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1332
1285
|
}
|
|
1333
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AssertedIdComponent, decorators: [{
|
|
1334
1287
|
type: Component,
|
|
1335
1288
|
args: [{ selector: 'cadmus-refs-asserted-id', imports: [
|
|
1336
1289
|
FormsModule,
|
|
@@ -1349,7 +1302,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1349
1302
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: PinRefLookupService }, { type: undefined, decorators: [{
|
|
1350
1303
|
type: Inject,
|
|
1351
1304
|
args: ['indexLookupDefinitions']
|
|
1352
|
-
}] }] });
|
|
1305
|
+
}] }], propDecorators: { idScopeEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "idScopeEntries", required: false }] }], idTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "idTagEntries", required: false }] }], assTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "assTagEntries", required: false }] }], refTypeEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "refTypeEntries", required: false }] }], refTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "refTagEntries", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }, { type: i0.Output, args: ["idChange"] }], noEidLookup: [{ type: i0.Input, args: [{ isSignal: true, alias: "noEidLookup", required: false }] }], hasSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasSubmit", required: false }] }], editorClose: [{ type: i0.Output, args: ["editorClose"] }] } });
|
|
1353
1306
|
|
|
1354
1307
|
/**
|
|
1355
1308
|
* Asserted IDs editor.
|
|
@@ -1372,28 +1325,8 @@ class AssertedIdsComponent {
|
|
|
1372
1325
|
refTypeEntries = input(...(ngDevMode ? [undefined, { debugName: "refTypeEntries" }] : []));
|
|
1373
1326
|
// doc-reference-tags
|
|
1374
1327
|
refTagEntries = input(...(ngDevMode ? [undefined, { debugName: "refTagEntries" }] : []));
|
|
1375
|
-
|
|
1376
|
-
form;
|
|
1377
|
-
constructor(formBuilder, _dialogService) {
|
|
1328
|
+
constructor(_dialogService) {
|
|
1378
1329
|
this._dialogService = _dialogService;
|
|
1379
|
-
this.entries = formBuilder.control([], { nonNullable: true });
|
|
1380
|
-
// form
|
|
1381
|
-
this.form = formBuilder.group({
|
|
1382
|
-
ids: this.entries,
|
|
1383
|
-
});
|
|
1384
|
-
// when ids change, update form
|
|
1385
|
-
effect(() => {
|
|
1386
|
-
this.updateForm(this.ids());
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
updateForm(ids) {
|
|
1390
|
-
if (!ids?.length) {
|
|
1391
|
-
this.form.reset();
|
|
1392
|
-
return;
|
|
1393
|
-
}
|
|
1394
|
-
this.entries.setValue(ids, { emitEvent: false });
|
|
1395
|
-
this.entries.updateValueAndValidity();
|
|
1396
|
-
this.form.markAsPristine();
|
|
1397
1330
|
}
|
|
1398
1331
|
addId() {
|
|
1399
1332
|
this.editId({
|
|
@@ -1403,23 +1336,21 @@ class AssertedIdsComponent {
|
|
|
1403
1336
|
}
|
|
1404
1337
|
editId(id, index) {
|
|
1405
1338
|
this.editedIndex.set(index);
|
|
1406
|
-
this.edited.set(id);
|
|
1339
|
+
this.edited.set(deepCopy(id));
|
|
1407
1340
|
}
|
|
1408
1341
|
closeId() {
|
|
1409
1342
|
this.editedIndex.set(-1);
|
|
1410
1343
|
this.edited.set(undefined);
|
|
1411
1344
|
}
|
|
1412
|
-
saveId(
|
|
1413
|
-
const
|
|
1345
|
+
saveId(id) {
|
|
1346
|
+
const ids = [...this.ids()];
|
|
1414
1347
|
if (this.editedIndex() === -1) {
|
|
1415
|
-
|
|
1348
|
+
ids.push(id);
|
|
1416
1349
|
}
|
|
1417
1350
|
else {
|
|
1418
|
-
|
|
1351
|
+
ids.splice(this.editedIndex(), 1, id);
|
|
1419
1352
|
}
|
|
1420
|
-
this.
|
|
1421
|
-
this.entries.markAsDirty();
|
|
1422
|
-
this.entries.updateValueAndValidity();
|
|
1353
|
+
this.ids.set(ids);
|
|
1423
1354
|
this.closeId();
|
|
1424
1355
|
}
|
|
1425
1356
|
deleteId(index) {
|
|
@@ -1431,12 +1362,9 @@ class AssertedIdsComponent {
|
|
|
1431
1362
|
if (this.editedIndex() === index) {
|
|
1432
1363
|
this.closeId();
|
|
1433
1364
|
}
|
|
1434
|
-
const
|
|
1435
|
-
|
|
1436
|
-
this.
|
|
1437
|
-
this.entries.markAsDirty();
|
|
1438
|
-
this.entries.updateValueAndValidity();
|
|
1439
|
-
this.ids.set(this.entries.value);
|
|
1365
|
+
const ids = [...this.ids()];
|
|
1366
|
+
ids.splice(index, 1);
|
|
1367
|
+
this.ids.set(ids);
|
|
1440
1368
|
}
|
|
1441
1369
|
});
|
|
1442
1370
|
}
|
|
@@ -1444,40 +1372,33 @@ class AssertedIdsComponent {
|
|
|
1444
1372
|
if (index < 1) {
|
|
1445
1373
|
return;
|
|
1446
1374
|
}
|
|
1447
|
-
const
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
this.
|
|
1452
|
-
this.entries.markAsDirty();
|
|
1453
|
-
this.entries.updateValueAndValidity();
|
|
1454
|
-
this.ids.set(this.entries.value);
|
|
1375
|
+
const id = this.ids()[index];
|
|
1376
|
+
const ids = [...this.ids()];
|
|
1377
|
+
ids.splice(index, 1);
|
|
1378
|
+
ids.splice(index - 1, 0, id);
|
|
1379
|
+
this.ids.set(ids);
|
|
1455
1380
|
}
|
|
1456
1381
|
moveIdDown(index) {
|
|
1457
|
-
if (index + 1 >= this.
|
|
1382
|
+
if (index + 1 >= this.ids().length) {
|
|
1458
1383
|
return;
|
|
1459
1384
|
}
|
|
1460
|
-
const
|
|
1461
|
-
const
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
this.
|
|
1465
|
-
this.entries.markAsDirty();
|
|
1466
|
-
this.entries.updateValueAndValidity();
|
|
1467
|
-
this.ids.set(this.entries.value);
|
|
1385
|
+
const id = this.ids()[index];
|
|
1386
|
+
const ids = [...this.ids()];
|
|
1387
|
+
ids.splice(index, 1);
|
|
1388
|
+
ids.splice(index + 1, 0, id);
|
|
1389
|
+
this.ids.set(ids);
|
|
1468
1390
|
}
|
|
1469
1391
|
onIdChange(id) {
|
|
1470
1392
|
this.saveId(id);
|
|
1471
|
-
this.ids.set(this.entries.value);
|
|
1472
1393
|
}
|
|
1473
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1474
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
1394
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AssertedIdsComponent, deps: [{ token: i1$2.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1395
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AssertedIdsComponent, isStandalone: true, selector: "cadmus-refs-asserted-ids", inputs: { ids: { classPropertyName: "ids", publicName: "ids", isSignal: true, isRequired: false, transformFunction: null }, idScopeEntries: { classPropertyName: "idScopeEntries", publicName: "idScopeEntries", isSignal: true, isRequired: false, transformFunction: null }, idTagEntries: { classPropertyName: "idTagEntries", publicName: "idTagEntries", isSignal: true, isRequired: false, transformFunction: null }, assTagEntries: { classPropertyName: "assTagEntries", publicName: "assTagEntries", isSignal: true, isRequired: false, transformFunction: null }, refTypeEntries: { classPropertyName: "refTypeEntries", publicName: "refTypeEntries", isSignal: true, isRequired: false, transformFunction: null }, refTagEntries: { classPropertyName: "refTagEntries", publicName: "refTagEntries", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ids: "idsChange" }, ngImport: i0, template: "<div>\r\n <div>\r\n <button type=\"button\" mat-flat-button class=\"mat-primary\" (click)=\"addId()\">\r\n <mat-icon>add_circle</mat-icon> ID\r\n </button>\r\n </div>\r\n @if (ids().length) {\r\n <table>\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>scope</th>\r\n <th>value</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for ( id of ids(); track id; let i = $index; let first = $first; let last\r\n = $last) {\r\n <tr [class.selected]=\"i === editedIndex()\">\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Edit this ID\"\r\n (click)=\"editId(id, i)\"\r\n >\r\n <mat-icon class=\"mat-primary\">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 matTooltip=\"Delete this ID\"\r\n (click)=\"deleteId(i)\"\r\n >\r\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ id.scope }}</td>\r\n <td>{{ id.value }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n } @if (edited()) {\r\n <mat-expansion-panel [expanded]=\"edited()\" [disabled]=\"!edited()\">\r\n <mat-expansion-panel-header\r\n >ID #{{ editedIndex() + 1 }}</mat-expansion-panel-header\r\n >\r\n <cadmus-refs-asserted-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 [id]=\"edited()\"\r\n (idChange)=\"onIdChange($event)\"\r\n (editorClose)=\"closeId()\"\r\n />\r\n </mat-expansion-panel>\r\n }\r\n</div>\r\n", styles: ["table{width:100%;border-collapse:collapse}tbody tr:nth-child(odd){background-color:#e2e2e2}th{text-align:left;font-weight:400;color:silver}td.fit-width{width:1px;white-space:nowrap}tr.selected{background-color:#d0d0d0!important}fieldset{border:1px solid silver;border-radius:6px;padding:6px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type:
|
|
1475
1396
|
// material
|
|
1476
|
-
MatButtonModule }, { kind: "component", type:
|
|
1397
|
+
MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type:
|
|
1477
1398
|
// bricks
|
|
1478
1399
|
AssertedIdComponent, selector: "cadmus-refs-asserted-id", inputs: ["idScopeEntries", "idTagEntries", "assTagEntries", "refTypeEntries", "refTagEntries", "id", "noEidLookup", "hasSubmit"], outputs: ["idChange", "editorClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1479
1400
|
}
|
|
1480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AssertedIdsComponent, decorators: [{
|
|
1481
1402
|
type: Component,
|
|
1482
1403
|
args: [{ selector: 'cadmus-refs-asserted-ids', imports: [
|
|
1483
1404
|
FormsModule,
|
|
@@ -1489,8 +1410,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1489
1410
|
MatTooltipModule,
|
|
1490
1411
|
// bricks
|
|
1491
1412
|
AssertedIdComponent,
|
|
1492
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
1493
|
-
}], ctorParameters: () => [{ type: i1$
|
|
1413
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\r\n <div>\r\n <button type=\"button\" mat-flat-button class=\"mat-primary\" (click)=\"addId()\">\r\n <mat-icon>add_circle</mat-icon> ID\r\n </button>\r\n </div>\r\n @if (ids().length) {\r\n <table>\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>scope</th>\r\n <th>value</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for ( id of ids(); track id; let i = $index; let first = $first; let last\r\n = $last) {\r\n <tr [class.selected]=\"i === editedIndex()\">\r\n <td class=\"fit-width\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Edit this ID\"\r\n (click)=\"editId(id, i)\"\r\n >\r\n <mat-icon class=\"mat-primary\">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 matTooltip=\"Delete this ID\"\r\n (click)=\"deleteId(i)\"\r\n >\r\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ id.scope }}</td>\r\n <td>{{ id.value }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n } @if (edited()) {\r\n <mat-expansion-panel [expanded]=\"edited()\" [disabled]=\"!edited()\">\r\n <mat-expansion-panel-header\r\n >ID #{{ editedIndex() + 1 }}</mat-expansion-panel-header\r\n >\r\n <cadmus-refs-asserted-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 [id]=\"edited()\"\r\n (idChange)=\"onIdChange($event)\"\r\n (editorClose)=\"closeId()\"\r\n />\r\n </mat-expansion-panel>\r\n }\r\n</div>\r\n", styles: ["table{width:100%;border-collapse:collapse}tbody tr:nth-child(odd){background-color:#e2e2e2}th{text-align:left;font-weight:400;color:silver}td.fit-width{width:1px;white-space:nowrap}tr.selected{background-color:#d0d0d0!important}fieldset{border:1px solid silver;border-radius:6px;padding:6px}\n"] }]
|
|
1414
|
+
}], ctorParameters: () => [{ type: i1$2.DialogService }], propDecorators: { ids: [{ type: i0.Input, args: [{ isSignal: true, alias: "ids", required: false }] }, { type: i0.Output, args: ["idsChange"] }], idScopeEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "idScopeEntries", required: false }] }], idTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "idTagEntries", required: false }] }], assTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "assTagEntries", required: false }] }], refTypeEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "refTypeEntries", required: false }] }], refTagEntries: [{ type: i0.Input, args: [{ isSignal: true, alias: "refTagEntries", required: false }] }] } });
|
|
1494
1415
|
|
|
1495
1416
|
/*
|
|
1496
1417
|
* Public API Surface of cadmus-refs-asserted-ids
|