@myrmidon/cadmus-refs-asserted-ids 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/asserted-composite-id/asserted-composite-id.component.mjs +12 -4
- package/esm2022/lib/asserted-composite-ids/asserted-composite-ids.component.mjs +3 -3
- package/esm2022/lib/asserted-ids/asserted-ids.component.mjs +3 -3
- package/esm2022/lib/pin-target-lookup/pin-target-lookup.component.mjs +10 -4
- package/fesm2022/myrmidon-cadmus-refs-asserted-ids.mjs +24 -10
- package/fesm2022/myrmidon-cadmus-refs-asserted-ids.mjs.map +1 -1
- package/lib/asserted-composite-id/asserted-composite-id.component.d.ts +1 -0
- package/lib/pin-target-lookup/pin-target-lookup.component.d.ts +6 -4
- package/package.json +2 -2
|
@@ -473,7 +473,7 @@ class AssertedIdsComponent {
|
|
|
473
473
|
this.emitIdsChange();
|
|
474
474
|
}
|
|
475
475
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AssertedIdsComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
476
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: AssertedIdsComponent, isStandalone: true, selector: "cadmus-refs-asserted-ids", inputs: { ids: "ids", idScopeEntries: "idScopeEntries", idTagEntries: "idTagEntries", assTagEntries: "assTagEntries", refTypeEntries: "refTypeEntries", refTagEntries: "refTagEntries" }, outputs: { idsChange: "idsChange" }, ngImport: i0, template: "<form [formGroup]=\"form\">\n <div>\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"addId()\">\n <mat-icon>add_circle</mat-icon> ID\n </button>\n </div>\n @if (entries.value
|
|
476
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: AssertedIdsComponent, isStandalone: true, selector: "cadmus-refs-asserted-ids", inputs: { ids: "ids", idScopeEntries: "idScopeEntries", idTagEntries: "idTagEntries", assTagEntries: "assTagEntries", refTypeEntries: "refTypeEntries", refTagEntries: "refTagEntries" }, outputs: { idsChange: "idsChange" }, ngImport: i0, template: "<form [formGroup]=\"form\">\n <div>\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"addId()\">\n <mat-icon>add_circle</mat-icon> ID\n </button>\n </div>\n @if (entries.value.length) {\n <table>\n <thead>\n <tr>\n <th></th>\n <th>scope</th>\n <th>value</th>\n </tr>\n </thead>\n <tbody>\n @for ( entry of entries.value; track entry; let i = $index; let first =\n $first; let last = $last) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n matTooltip=\"Edit this ID\"\n (click)=\"editId(entry, i)\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Move this ID up\"\n [disabled]=\"first\"\n (click)=\"moveIdUp(i)\"\n >\n <mat-icon>arrow_upward</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Move this ID down\"\n [disabled]=\"last\"\n (click)=\"moveIdDown(i)\"\n >\n <mat-icon>arrow_downward</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n color=\"warn\"\n matTooltip=\"Delete this ID\"\n (click)=\"deleteId(i)\"\n >\n <mat-icon>remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ entry.scope }}</td>\n <td>{{ entry.value }}</td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n <mat-expansion-panel [expanded]=\"edited\" [disabled]=\"!edited\">\n <mat-expansion-panel-header\n >ID {{ edited?.value }}</mat-expansion-panel-header\n >\n <cadmus-refs-asserted-id\n [idScopeEntries]=\"idScopeEntries\"\n [idTagEntries]=\"idTagEntries\"\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [hasSubmit]=\"true\"\n [id]=\"edited\"\n (idChange)=\"onIdChange($event)\"\n (editorClose)=\"closeId()\"\n ></cadmus-refs-asserted-id>\n </mat-expansion-panel>\n</form>\n", styles: ["th{font-weight:400;color:silver;text-align:left}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: "component", type: AssertedIdComponent, selector: "cadmus-refs-asserted-id", inputs: ["idScopeEntries", "idTagEntries", "assTagEntries", "refTypeEntries", "refTagEntries", "id", "noEidLookup", "hasSubmit"], outputs: ["idChange", "editorClose"] }] }); }
|
|
477
477
|
}
|
|
478
478
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AssertedIdsComponent, decorators: [{
|
|
479
479
|
type: Component,
|
|
@@ -483,7 +483,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
483
483
|
MatExpansionModule,
|
|
484
484
|
MatIconModule,
|
|
485
485
|
AssertedIdComponent
|
|
486
|
-
], template: "<form [formGroup]=\"form\">\n <div>\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"addId()\">\n <mat-icon>add_circle</mat-icon> ID\n </button>\n </div>\n @if (entries.value
|
|
486
|
+
], template: "<form [formGroup]=\"form\">\n <div>\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"addId()\">\n <mat-icon>add_circle</mat-icon> ID\n </button>\n </div>\n @if (entries.value.length) {\n <table>\n <thead>\n <tr>\n <th></th>\n <th>scope</th>\n <th>value</th>\n </tr>\n </thead>\n <tbody>\n @for ( entry of entries.value; track entry; let i = $index; let first =\n $first; let last = $last) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n matTooltip=\"Edit this ID\"\n (click)=\"editId(entry, i)\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Move this ID up\"\n [disabled]=\"first\"\n (click)=\"moveIdUp(i)\"\n >\n <mat-icon>arrow_upward</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Move this ID down\"\n [disabled]=\"last\"\n (click)=\"moveIdDown(i)\"\n >\n <mat-icon>arrow_downward</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n color=\"warn\"\n matTooltip=\"Delete this ID\"\n (click)=\"deleteId(i)\"\n >\n <mat-icon>remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ entry.scope }}</td>\n <td>{{ entry.value }}</td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n <mat-expansion-panel [expanded]=\"edited\" [disabled]=\"!edited\">\n <mat-expansion-panel-header\n >ID {{ edited?.value }}</mat-expansion-panel-header\n >\n <cadmus-refs-asserted-id\n [idScopeEntries]=\"idScopeEntries\"\n [idTagEntries]=\"idTagEntries\"\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [hasSubmit]=\"true\"\n [id]=\"edited\"\n (idChange)=\"onIdChange($event)\"\n (editorClose)=\"closeId()\"\n ></cadmus-refs-asserted-id>\n </mat-expansion-panel>\n</form>\n", styles: ["th{font-weight:400;color:silver;text-align:left}\n"] }]
|
|
487
487
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2.DialogService }], propDecorators: { ids: [{
|
|
488
488
|
type: Input
|
|
489
489
|
}], idScopeEntries: [{
|
|
@@ -608,6 +608,7 @@ class PinTargetLookupComponent {
|
|
|
608
608
|
this.targetChange = new EventEmitter();
|
|
609
609
|
this.editorClose = new EventEmitter();
|
|
610
610
|
this.extMoreRequest = new EventEmitter();
|
|
611
|
+
this.extLookupConfigChange = new EventEmitter();
|
|
611
612
|
}
|
|
612
613
|
forceByItem() {
|
|
613
614
|
this.pinByTypeMode = false;
|
|
@@ -912,6 +913,9 @@ class PinTargetLookupComponent {
|
|
|
912
913
|
duration: 1500,
|
|
913
914
|
});
|
|
914
915
|
}
|
|
916
|
+
onExtConfigChange(config) {
|
|
917
|
+
this.extLookupConfigChange.emit(config);
|
|
918
|
+
}
|
|
915
919
|
close() {
|
|
916
920
|
this.editorClose.emit();
|
|
917
921
|
}
|
|
@@ -923,7 +927,7 @@ class PinTargetLookupComponent {
|
|
|
923
927
|
this.targetChange.emit(this._target);
|
|
924
928
|
}
|
|
925
929
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", 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 }); }
|
|
926
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: PinTargetLookupComponent, isStandalone: true, selector: "cadmus-pin-target-lookup", inputs: { pinByTypeMode: "pinByTypeMode", canSwitchMode: "canSwitchMode", canEditTarget: "canEditTarget", lookupDefinitions: "lookupDefinitions", extLookupConfigs: "extLookupConfigs", internalDefault: "internalDefault", target: "target", defaultPartTypeKey: "defaultPartTypeKey" }, outputs: { editorClose: "editorClose", targetChange: "targetChange", extMoreRequest: "extMoreRequest" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div class=\"form-row\">\n <!-- external -->\n <mat-checkbox [formControl]=\"external\">external</mat-checkbox>\n <!-- mode switcher -->\n @if (!external.value) {\n <div>\n @if (canSwitchMode) {\n <mat-checkbox [formControl]=\"byTypeMode\">\n by type</mat-checkbox\n >\n }\n </div>\n }\n </div>\n\n <div class=\"form-row\">\n <!-- label -->\n <div>\n @if (external.value || canEditTarget) {\n <mat-form-field>\n <mat-label>label</mat-label>\n <input matInput [formControl]=\"label\" />\n @if ($any(label).errors?.required && (label.dirty || label.touched)) {\n <mat-error\n >label required</mat-error\n >\n }\n @if (\n $any(label).errors?.maxLength && (label.dirty || label.touched)\n ) {\n <mat-error\n >label too long</mat-error\n >\n }\n </mat-form-field>\n }\n @if (!external.value && !canEditTarget && label.value) {\n <div\n class=\"info\"\n >\n <span class=\"label\">label</span>{{ label.value }}\n </div>\n }\n </div>\n\n <!-- gid -->\n <div>\n @if (external.value || canEditTarget) {\n <mat-form-field>\n <mat-label>GID</mat-label>\n <input matInput [formControl]=\"gid\" />\n @if ($any(gid).errors?.required && (gid.dirty || gid.touched)) {\n <mat-error\n >GID required</mat-error\n >\n }\n @if ($any(gid).errors?.maxLength && (gid.dirty || gid.touched)) {\n <mat-error\n >GID too long</mat-error\n >\n }\n </mat-form-field>\n }\n @if (!external.value && !canEditTarget && gid.value) {\n <div class=\"info\">\n <span class=\"label\">GID</span> <span class=\"gid\">{{ gid.value }}</span>\n </div>\n }\n </div>\n </div>\n\n <!-- external lookup set -->\n @if (external.value && extLookupConfigs?.length) {\n <div>\n <cadmus-ref-lookup-set\n [configs]=\"extLookupConfigs\"\n (itemChange)=\"onExtItemChange($event)\"\n (moreRequest)=\"onExtMoreRequest($event)\"\n ></cadmus-ref-lookup-set>\n </div>\n }\n\n <!-- BY ITEM -->\n @if (!external.value) {\n <div>\n @if (!byTypeMode.value) {\n <fieldset class=\"form-row\">\n <legend>pin filters</legend>\n <!-- item filter -->\n <cadmus-ref-lookup\n [service]=\"itemLookupService\"\n label=\"item\"\n (itemChange)=\"onItemLookupChange($event)\"\n ></cadmus-ref-lookup>\n <!-- part filter -->\n @if (itemParts.length) {\n <mat-form-field>\n <mat-label>part</mat-label>\n <mat-select [formControl]=\"itemPart\">\n <mat-option [value]=\"null\">(any)</mat-option>\n @for (p of itemParts; track p) {\n <mat-option [value]=\"p\">{{\n p.typeId | flatLookup : modelEntries : \"id\" : \"value\"\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </fieldset>\n }\n <!-- BY TYPE -->\n @if (byTypeMode.value) {\n <div>\n <!-- par type filter -->\n @if (partTypeKeys?.length) {\n <mat-form-field>\n <mat-label>part type</mat-label>\n <mat-select [formControl]=\"partTypeKey\">\n @for (k of partTypeKeys; track k) {\n <mat-option [value]=\"k\">{{\n k\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </div>\n }\n <!-- PIN -->\n @if (partTypeKey.value) {\n <div>\n <!-- pin lookup -->\n <cadmus-ref-lookup\n [service]=\"pinLookupService\"\n [baseFilter]=\"filter\"\n [options]=\"pinFilterOptions\"\n label=\"pin\"\n (itemChange)=\"onPinLookupChange($event)\"\n ></cadmus-ref-lookup>\n </div>\n }\n <!-- data -->\n @if (lookupData?.pin?.name) {\n <mat-expansion-panel id=\"data\">\n <mat-expansion-panel-header>pin data</mat-expansion-panel-header>\n <!-- table -->\n <table>\n <thead>\n <th></th>\n <th>source</th>\n <th>value</th>\n </thead>\n <tbody>\n <!-- pin -->\n @if (lookupData?.pin?.value) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.value\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>pin</td>\n <td>{{ lookupData!.pin.value }}</td>\n </tr>\n }\n <!-- item ID -->\n @if (lookupData?.pin?.itemId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.itemId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>item ID</td>\n <td>{{ lookupData!.pin.itemId }}</td>\n </tr>\n }\n <!-- item title -->\n @if (lookupData?.item?.title) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.item!.title\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>item title</td>\n <td>{{ lookupData!.item!.title }}</td>\n </tr>\n }\n <!-- part ID -->\n @if (lookupData?.pin?.partId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.partId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part ID</td>\n <td>{{ lookupData!.pin.partId }}</td>\n </tr>\n }\n <!-- part type ID -->\n @if (lookupData?.pin?.partTypeId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.partTypeId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part type ID</td>\n <td>{{ lookupData!.pin!.partTypeId }}</td>\n </tr>\n }\n <!-- part role ID -->\n @if (lookupData?.pin?.roleId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.roleId!\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part role ID</td>\n <td>{{ lookupData!.pin!.roleId }}</td>\n </tr>\n }\n <!-- part's metadata -->\n @for (\n m of lookupData?.metaPart?.metadata || []; track\n m; let i = $index) {\n <tr\n >\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"m.value\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td class=\"metadata\">{{ m.name }}</td>\n <td class=\"metadata\">{{ m.value }}</td>\n </tr>\n }\n </tbody>\n </table>\n </mat-expansion-panel>\n }\n </div>\n }\n\n <!-- buttons -->\n <div>\n <button mat-flat-button type=\"button\" (click)=\"close()\">\n <mat-icon color=\"warn\">close</mat-icon>\n </button>\n <button mat-flat-button type=\"submit\" [disabled]=\"form.invalid\">\n <mat-icon color=\"primary\">check_circle</mat-icon> target\n </button>\n </div>\n </form>\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}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}.label{border:1px solid silver;border-radius:6px;padding:4px}fieldset{border:1px solid silver;border-radius:6px;padding:4px 8px;margin-bottom:8px}legend{color:silver}\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: ClipboardModule }, { kind: "directive", type: i6$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "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.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "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.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i10.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: NgToolsModule }, { kind: "pipe", type: i3$1.FlatLookupPipe, name: "flatLookup" }, { kind: "component", type: RefLookupComponent, selector: "cadmus-ref-lookup", inputs: ["label", "limit", "baseFilter", "service", "item", "required", "hasMore", "linkTemplate", "optDialog", "options"], outputs: ["itemChange", "moreRequest"] }, { kind: "component", type: RefLookupSetComponent, selector: "cadmus-ref-lookup-set", inputs: ["configs", "iconSize"], outputs: ["itemChange", "moreRequest"] }] }); }
|
|
930
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: PinTargetLookupComponent, isStandalone: true, selector: "cadmus-pin-target-lookup", inputs: { pinByTypeMode: "pinByTypeMode", canSwitchMode: "canSwitchMode", canEditTarget: "canEditTarget", lookupDefinitions: "lookupDefinitions", extLookupConfigs: "extLookupConfigs", internalDefault: "internalDefault", target: "target", defaultPartTypeKey: "defaultPartTypeKey" }, outputs: { editorClose: "editorClose", targetChange: "targetChange", extMoreRequest: "extMoreRequest", extLookupConfigChange: "extLookupConfigChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div class=\"form-row\">\n <!-- external -->\n <mat-checkbox [formControl]=\"external\">external</mat-checkbox>\n <!-- mode switcher -->\n @if (!external.value) {\n <div>\n @if (canSwitchMode) {\n <mat-checkbox [formControl]=\"byTypeMode\"> by type</mat-checkbox>\n }\n </div>\n }\n </div>\n\n <div class=\"form-row\">\n <!-- label -->\n <div>\n @if (external.value || canEditTarget) {\n <mat-form-field>\n <mat-label>label</mat-label>\n <input matInput [formControl]=\"label\" />\n @if ($any(label).errors?.required && (label.dirty || label.touched)) {\n <mat-error>label required</mat-error>\n } @if ( $any(label).errors?.maxLength && (label.dirty || label.touched)\n ) {\n <mat-error>label too long</mat-error>\n }\n </mat-form-field>\n } @if (!external.value && !canEditTarget && label.value) {\n <div class=\"info\"><span class=\"label\">label</span>{{ label.value }}</div>\n }\n </div>\n\n <!-- gid -->\n <div>\n @if (external.value || canEditTarget) {\n <mat-form-field>\n <mat-label>GID</mat-label>\n <input matInput [formControl]=\"gid\" />\n @if ($any(gid).errors?.required && (gid.dirty || gid.touched)) {\n <mat-error>GID required</mat-error>\n } @if ($any(gid).errors?.maxLength && (gid.dirty || gid.touched)) {\n <mat-error>GID too long</mat-error>\n }\n </mat-form-field>\n } @if (!external.value && !canEditTarget && gid.value) {\n <div class=\"info\">\n <span class=\"label\">GID</span> <span class=\"gid\">{{ gid.value }}</span>\n </div>\n }\n </div>\n </div>\n\n <!-- external lookup set -->\n @if (external.value && extLookupConfigs.length) {\n <div>\n <cadmus-ref-lookup-set\n [configs]=\"extLookupConfigs\"\n (itemChange)=\"onExtItemChange($event)\"\n (moreRequest)=\"onExtMoreRequest($event)\"\n (configChange)=\"onExtConfigChange($event)\"\n ></cadmus-ref-lookup-set>\n </div>\n }\n\n <!-- BY ITEM -->\n @if (!external.value) {\n <div>\n @if (!byTypeMode.value) {\n <fieldset class=\"form-row\">\n <legend>pin filters</legend>\n <!-- item filter -->\n <cadmus-ref-lookup\n [service]=\"itemLookupService\"\n label=\"item\"\n (itemChange)=\"onItemLookupChange($event)\"\n ></cadmus-ref-lookup>\n <!-- part filter -->\n @if (itemParts.length) {\n <mat-form-field>\n <mat-label>part</mat-label>\n <mat-select [formControl]=\"itemPart\">\n <mat-option [value]=\"null\">(any)</mat-option>\n @for (p of itemParts; track p) {\n <mat-option [value]=\"p\">{{\n p.typeId | flatLookup : modelEntries : \"id\" : \"value\"\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </fieldset>\n }\n <!-- BY TYPE -->\n @if (byTypeMode.value) {\n <div>\n <!-- par type filter -->\n @if (partTypeKeys.length) {\n <mat-form-field>\n <mat-label>part type</mat-label>\n <mat-select [formControl]=\"partTypeKey\">\n @for (k of partTypeKeys; track k) {\n <mat-option [value]=\"k\">{{ k }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </div>\n }\n <!-- PIN -->\n @if (partTypeKey.value) {\n <div>\n <!-- pin lookup -->\n <cadmus-ref-lookup\n [service]=\"pinLookupService\"\n [baseFilter]=\"filter\"\n [options]=\"pinFilterOptions\"\n label=\"pin\"\n (itemChange)=\"onPinLookupChange($event)\"\n ></cadmus-ref-lookup>\n </div>\n }\n <!-- data -->\n @if (lookupData?.pin?.name) {\n <mat-expansion-panel id=\"data\">\n <mat-expansion-panel-header>pin data</mat-expansion-panel-header>\n <!-- table -->\n <table>\n <thead>\n <th></th>\n <th>source</th>\n <th>value</th>\n </thead>\n <tbody>\n <!-- pin -->\n @if (lookupData?.pin?.value) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.value\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>pin</td>\n <td>{{ lookupData!.pin.value }}</td>\n </tr>\n }\n <!-- item ID -->\n @if (lookupData?.pin?.itemId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.itemId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>item ID</td>\n <td>{{ lookupData!.pin.itemId }}</td>\n </tr>\n }\n <!-- item title -->\n @if (lookupData?.item?.title) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.item!.title\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>item title</td>\n <td>{{ lookupData!.item!.title }}</td>\n </tr>\n }\n <!-- part ID -->\n @if (lookupData?.pin?.partId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.partId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part ID</td>\n <td>{{ lookupData!.pin.partId }}</td>\n </tr>\n }\n <!-- part type ID -->\n @if (lookupData?.pin?.partTypeId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.partTypeId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part type ID</td>\n <td>{{ lookupData!.pin!.partTypeId }}</td>\n </tr>\n }\n <!-- part role ID -->\n @if (lookupData?.pin?.roleId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.roleId!\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part role ID</td>\n <td>{{ lookupData!.pin!.roleId }}</td>\n </tr>\n }\n <!-- part's metadata -->\n @for ( m of lookupData?.metaPart?.metadata || []; track m; let i =\n $index) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"m.value\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td class=\"metadata\">{{ m.name }}</td>\n <td class=\"metadata\">{{ m.value }}</td>\n </tr>\n }\n </tbody>\n </table>\n </mat-expansion-panel>\n }\n </div>\n }\n\n <!-- buttons -->\n <div>\n <button mat-flat-button type=\"button\" (click)=\"close()\">\n <mat-icon color=\"warn\">close</mat-icon>\n </button>\n <button mat-flat-button type=\"submit\" [disabled]=\"form.invalid\">\n <mat-icon color=\"primary\">check_circle</mat-icon> target\n </button>\n </div>\n</form>\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}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}.label{border:1px solid silver;border-radius:6px;padding:4px}fieldset{border:1px solid silver;border-radius:6px;padding:4px 8px;margin-bottom:8px}legend{color:silver}\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: ClipboardModule }, { kind: "directive", type: i6$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "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.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "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.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i10.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: NgToolsModule }, { kind: "pipe", type: i3$1.FlatLookupPipe, name: "flatLookup" }, { kind: "component", type: RefLookupComponent, selector: "cadmus-ref-lookup", inputs: ["label", "limit", "baseFilter", "service", "item", "required", "hasMore", "linkTemplate", "optDialog", "options"], outputs: ["itemChange", "moreRequest"] }, { kind: "component", type: RefLookupSetComponent, selector: "cadmus-ref-lookup-set", inputs: ["configs", "iconSize"], outputs: ["configChange", "itemChange", "moreRequest"] }] }); }
|
|
927
931
|
}
|
|
928
932
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: PinTargetLookupComponent, decorators: [{
|
|
929
933
|
type: Component,
|
|
@@ -940,8 +944,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
940
944
|
MatSelectModule,
|
|
941
945
|
NgToolsModule,
|
|
942
946
|
RefLookupComponent,
|
|
943
|
-
RefLookupSetComponent
|
|
944
|
-
], template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div class=\"form-row\">\n <!-- external -->\n <mat-checkbox [formControl]=\"external\">external</mat-checkbox>\n <!-- mode switcher -->\n @if (!external.value) {\n <div>\n @if (canSwitchMode) {\n <mat-checkbox [formControl]=\"byTypeMode\">\n by type</mat-checkbox\n >\n }\n </div>\n }\n </div>\n\n <div class=\"form-row\">\n <!-- label -->\n <div>\n @if (external.value || canEditTarget) {\n <mat-form-field>\n <mat-label>label</mat-label>\n <input matInput [formControl]=\"label\" />\n @if ($any(label).errors?.required && (label.dirty || label.touched)) {\n <mat-error\n >label required</mat-error\n >\n }\n @if (\n $any(label).errors?.maxLength && (label.dirty || label.touched)\n ) {\n <mat-error\n >label too long</mat-error\n >\n }\n </mat-form-field>\n }\n @if (!external.value && !canEditTarget && label.value) {\n <div\n class=\"info\"\n >\n <span class=\"label\">label</span>{{ label.value }}\n </div>\n }\n </div>\n\n <!-- gid -->\n <div>\n @if (external.value || canEditTarget) {\n <mat-form-field>\n <mat-label>GID</mat-label>\n <input matInput [formControl]=\"gid\" />\n @if ($any(gid).errors?.required && (gid.dirty || gid.touched)) {\n <mat-error\n >GID required</mat-error\n >\n }\n @if ($any(gid).errors?.maxLength && (gid.dirty || gid.touched)) {\n <mat-error\n >GID too long</mat-error\n >\n }\n </mat-form-field>\n }\n @if (!external.value && !canEditTarget && gid.value) {\n <div class=\"info\">\n <span class=\"label\">GID</span> <span class=\"gid\">{{ gid.value }}</span>\n </div>\n }\n </div>\n </div>\n\n <!-- external lookup set -->\n @if (external.value && extLookupConfigs?.length) {\n <div>\n <cadmus-ref-lookup-set\n [configs]=\"extLookupConfigs\"\n (itemChange)=\"onExtItemChange($event)\"\n (moreRequest)=\"onExtMoreRequest($event)\"\n ></cadmus-ref-lookup-set>\n </div>\n }\n\n <!-- BY ITEM -->\n @if (!external.value) {\n <div>\n @if (!byTypeMode.value) {\n <fieldset class=\"form-row\">\n <legend>pin filters</legend>\n <!-- item filter -->\n <cadmus-ref-lookup\n [service]=\"itemLookupService\"\n label=\"item\"\n (itemChange)=\"onItemLookupChange($event)\"\n ></cadmus-ref-lookup>\n <!-- part filter -->\n @if (itemParts.length) {\n <mat-form-field>\n <mat-label>part</mat-label>\n <mat-select [formControl]=\"itemPart\">\n <mat-option [value]=\"null\">(any)</mat-option>\n @for (p of itemParts; track p) {\n <mat-option [value]=\"p\">{{\n p.typeId | flatLookup : modelEntries : \"id\" : \"value\"\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </fieldset>\n }\n <!-- BY TYPE -->\n @if (byTypeMode.value) {\n <div>\n <!-- par type filter -->\n @if (partTypeKeys?.length) {\n <mat-form-field>\n <mat-label>part type</mat-label>\n <mat-select [formControl]=\"partTypeKey\">\n @for (k of partTypeKeys; track k) {\n <mat-option [value]=\"k\">{{\n k\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </div>\n }\n <!-- PIN -->\n @if (partTypeKey.value) {\n <div>\n <!-- pin lookup -->\n <cadmus-ref-lookup\n [service]=\"pinLookupService\"\n [baseFilter]=\"filter\"\n [options]=\"pinFilterOptions\"\n label=\"pin\"\n (itemChange)=\"onPinLookupChange($event)\"\n ></cadmus-ref-lookup>\n </div>\n }\n <!-- data -->\n @if (lookupData?.pin?.name) {\n <mat-expansion-panel id=\"data\">\n <mat-expansion-panel-header>pin data</mat-expansion-panel-header>\n <!-- table -->\n <table>\n <thead>\n <th></th>\n <th>source</th>\n <th>value</th>\n </thead>\n <tbody>\n <!-- pin -->\n @if (lookupData?.pin?.value) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.value\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>pin</td>\n <td>{{ lookupData!.pin.value }}</td>\n </tr>\n }\n <!-- item ID -->\n @if (lookupData?.pin?.itemId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.itemId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>item ID</td>\n <td>{{ lookupData!.pin.itemId }}</td>\n </tr>\n }\n <!-- item title -->\n @if (lookupData?.item?.title) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.item!.title\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>item title</td>\n <td>{{ lookupData!.item!.title }}</td>\n </tr>\n }\n <!-- part ID -->\n @if (lookupData?.pin?.partId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.partId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part ID</td>\n <td>{{ lookupData!.pin.partId }}</td>\n </tr>\n }\n <!-- part type ID -->\n @if (lookupData?.pin?.partTypeId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.partTypeId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part type ID</td>\n <td>{{ lookupData!.pin!.partTypeId }}</td>\n </tr>\n }\n <!-- part role ID -->\n @if (lookupData?.pin?.roleId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.roleId!\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part role ID</td>\n <td>{{ lookupData!.pin!.roleId }}</td>\n </tr>\n }\n <!-- part's metadata -->\n @for (\n m of lookupData?.metaPart?.metadata || []; track\n m; let i = $index) {\n <tr\n >\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"m.value\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td class=\"metadata\">{{ m.name }}</td>\n <td class=\"metadata\">{{ m.value }}</td>\n </tr>\n }\n </tbody>\n </table>\n </mat-expansion-panel>\n }\n </div>\n }\n\n <!-- buttons -->\n <div>\n <button mat-flat-button type=\"button\" (click)=\"close()\">\n <mat-icon color=\"warn\">close</mat-icon>\n </button>\n <button mat-flat-button type=\"submit\" [disabled]=\"form.invalid\">\n <mat-icon color=\"primary\">check_circle</mat-icon> target\n </button>\n </div>\n </form>\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}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}.label{border:1px solid silver;border-radius:6px;padding:4px}fieldset{border:1px solid silver;border-radius:6px;padding:4px 8px;margin-bottom:8px}legend{color:silver}\n"] }]
|
|
947
|
+
RefLookupSetComponent,
|
|
948
|
+
], template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div class=\"form-row\">\n <!-- external -->\n <mat-checkbox [formControl]=\"external\">external</mat-checkbox>\n <!-- mode switcher -->\n @if (!external.value) {\n <div>\n @if (canSwitchMode) {\n <mat-checkbox [formControl]=\"byTypeMode\"> by type</mat-checkbox>\n }\n </div>\n }\n </div>\n\n <div class=\"form-row\">\n <!-- label -->\n <div>\n @if (external.value || canEditTarget) {\n <mat-form-field>\n <mat-label>label</mat-label>\n <input matInput [formControl]=\"label\" />\n @if ($any(label).errors?.required && (label.dirty || label.touched)) {\n <mat-error>label required</mat-error>\n } @if ( $any(label).errors?.maxLength && (label.dirty || label.touched)\n ) {\n <mat-error>label too long</mat-error>\n }\n </mat-form-field>\n } @if (!external.value && !canEditTarget && label.value) {\n <div class=\"info\"><span class=\"label\">label</span>{{ label.value }}</div>\n }\n </div>\n\n <!-- gid -->\n <div>\n @if (external.value || canEditTarget) {\n <mat-form-field>\n <mat-label>GID</mat-label>\n <input matInput [formControl]=\"gid\" />\n @if ($any(gid).errors?.required && (gid.dirty || gid.touched)) {\n <mat-error>GID required</mat-error>\n } @if ($any(gid).errors?.maxLength && (gid.dirty || gid.touched)) {\n <mat-error>GID too long</mat-error>\n }\n </mat-form-field>\n } @if (!external.value && !canEditTarget && gid.value) {\n <div class=\"info\">\n <span class=\"label\">GID</span> <span class=\"gid\">{{ gid.value }}</span>\n </div>\n }\n </div>\n </div>\n\n <!-- external lookup set -->\n @if (external.value && extLookupConfigs.length) {\n <div>\n <cadmus-ref-lookup-set\n [configs]=\"extLookupConfigs\"\n (itemChange)=\"onExtItemChange($event)\"\n (moreRequest)=\"onExtMoreRequest($event)\"\n (configChange)=\"onExtConfigChange($event)\"\n ></cadmus-ref-lookup-set>\n </div>\n }\n\n <!-- BY ITEM -->\n @if (!external.value) {\n <div>\n @if (!byTypeMode.value) {\n <fieldset class=\"form-row\">\n <legend>pin filters</legend>\n <!-- item filter -->\n <cadmus-ref-lookup\n [service]=\"itemLookupService\"\n label=\"item\"\n (itemChange)=\"onItemLookupChange($event)\"\n ></cadmus-ref-lookup>\n <!-- part filter -->\n @if (itemParts.length) {\n <mat-form-field>\n <mat-label>part</mat-label>\n <mat-select [formControl]=\"itemPart\">\n <mat-option [value]=\"null\">(any)</mat-option>\n @for (p of itemParts; track p) {\n <mat-option [value]=\"p\">{{\n p.typeId | flatLookup : modelEntries : \"id\" : \"value\"\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </fieldset>\n }\n <!-- BY TYPE -->\n @if (byTypeMode.value) {\n <div>\n <!-- par type filter -->\n @if (partTypeKeys.length) {\n <mat-form-field>\n <mat-label>part type</mat-label>\n <mat-select [formControl]=\"partTypeKey\">\n @for (k of partTypeKeys; track k) {\n <mat-option [value]=\"k\">{{ k }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </div>\n }\n <!-- PIN -->\n @if (partTypeKey.value) {\n <div>\n <!-- pin lookup -->\n <cadmus-ref-lookup\n [service]=\"pinLookupService\"\n [baseFilter]=\"filter\"\n [options]=\"pinFilterOptions\"\n label=\"pin\"\n (itemChange)=\"onPinLookupChange($event)\"\n ></cadmus-ref-lookup>\n </div>\n }\n <!-- data -->\n @if (lookupData?.pin?.name) {\n <mat-expansion-panel id=\"data\">\n <mat-expansion-panel-header>pin data</mat-expansion-panel-header>\n <!-- table -->\n <table>\n <thead>\n <th></th>\n <th>source</th>\n <th>value</th>\n </thead>\n <tbody>\n <!-- pin -->\n @if (lookupData?.pin?.value) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.value\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>pin</td>\n <td>{{ lookupData!.pin.value }}</td>\n </tr>\n }\n <!-- item ID -->\n @if (lookupData?.pin?.itemId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.itemId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>item ID</td>\n <td>{{ lookupData!.pin.itemId }}</td>\n </tr>\n }\n <!-- item title -->\n @if (lookupData?.item?.title) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.item!.title\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>item title</td>\n <td>{{ lookupData!.item!.title }}</td>\n </tr>\n }\n <!-- part ID -->\n @if (lookupData?.pin?.partId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.partId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part ID</td>\n <td>{{ lookupData!.pin.partId }}</td>\n </tr>\n }\n <!-- part type ID -->\n @if (lookupData?.pin?.partTypeId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.partTypeId\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part type ID</td>\n <td>{{ lookupData!.pin!.partTypeId }}</td>\n </tr>\n }\n <!-- part role ID -->\n @if (lookupData?.pin?.roleId) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"lookupData!.pin!.roleId!\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td>part role ID</td>\n <td>{{ lookupData!.pin!.roleId }}</td>\n </tr>\n }\n <!-- part's metadata -->\n @for ( m of lookupData?.metaPart?.metadata || []; track m; let i =\n $index) {\n <tr>\n <td>\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n [cdkCopyToClipboard]=\"m.value\"\n (cdkCopyToClipboardCopied)=\"onCopied()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n <td class=\"metadata\">{{ m.name }}</td>\n <td class=\"metadata\">{{ m.value }}</td>\n </tr>\n }\n </tbody>\n </table>\n </mat-expansion-panel>\n }\n </div>\n }\n\n <!-- buttons -->\n <div>\n <button mat-flat-button type=\"button\" (click)=\"close()\">\n <mat-icon color=\"warn\">close</mat-icon>\n </button>\n <button mat-flat-button type=\"submit\" [disabled]=\"form.invalid\">\n <mat-icon color=\"primary\">check_circle</mat-icon> target\n </button>\n </div>\n</form>\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}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}.label{border:1px solid silver;border-radius:6px;padding:4px}fieldset{border:1px solid silver;border-radius:6px;padding:4px 8px;margin-bottom:8px}legend{color:silver}\n"] }]
|
|
945
949
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
946
950
|
type: Inject,
|
|
947
951
|
args: ['indexLookupDefinitions']
|
|
@@ -967,6 +971,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
967
971
|
type: Output
|
|
968
972
|
}], extMoreRequest: [{
|
|
969
973
|
type: Output
|
|
974
|
+
}], extLookupConfigChange: [{
|
|
975
|
+
type: Output
|
|
970
976
|
}] } });
|
|
971
977
|
|
|
972
978
|
/**
|
|
@@ -1071,6 +1077,14 @@ class AssertedCompositeIdComponent {
|
|
|
1071
1077
|
onExtMoreRequest(event) {
|
|
1072
1078
|
this.extMoreRequest.emit(event);
|
|
1073
1079
|
}
|
|
1080
|
+
onExtLookupConfigChange(config) {
|
|
1081
|
+
if (!this.scope.value ||
|
|
1082
|
+
this.extLookupConfigs.some((c) => c.name === this.scope.value)) {
|
|
1083
|
+
this.scope.setValue(config.name || null);
|
|
1084
|
+
this.scope.markAsDirty();
|
|
1085
|
+
this.scope.updateValueAndValidity();
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1074
1088
|
cancel() {
|
|
1075
1089
|
this.editorClose.emit();
|
|
1076
1090
|
}
|
|
@@ -1081,7 +1095,7 @@ class AssertedCompositeIdComponent {
|
|
|
1081
1095
|
}
|
|
1082
1096
|
}
|
|
1083
1097
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AssertedCompositeIdComponent, deps: [{ token: i1$1.FormBuilder }, { token: PinRefLookupService }, { token: 'indexLookupDefinitions' }, { token: i3$1.RamStorageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1084
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: AssertedCompositeIdComponent, isStandalone: true, selector: "cadmus-refs-asserted-composite-id", inputs: { idScopeEntries: "idScopeEntries", idTagEntries: "idTagEntries", assTagEntries: "assTagEntries", refTypeEntries: "refTypeEntries", refTagEntries: "refTagEntries", id: "id", internalDefault: "internalDefault", hasSubmit: "hasSubmit", pinByTypeMode: "pinByTypeMode", canSwitchMode: "canSwitchMode", canEditTarget: "canEditTarget", lookupDefinitions: "lookupDefinitions", defaultPartTypeKey: "defaultPartTypeKey" }, outputs: { idChange: "idChange", editorClose: "editorClose", extMoreRequest: "extMoreRequest" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div>\n <div class=\"form-row\">\n <!-- tag (bound) -->\n @if (idTagEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>tag</mat-label>\n <mat-select [formControl]=\"tag\">\n @for (e of idTagEntries; track e) {\n <mat-option [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <!-- tag (free) -->\n @if (!idTagEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>tag</mat-label>\n <input matInput [formControl]=\"tag\" />\n @if ($any(tag.errors)?.maxLength && (tag.dirty || tag.touched)) {\n <mat-error\n >tag too long</mat-error\n >\n }\n </mat-form-field>\n }\n\n <!-- scope (bound) -->\n @if (idScopeEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>scope</mat-label>\n <mat-select [formControl]=\"scope\">\n @for (e of idScopeEntries; track e) {\n <mat-option [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <!-- scope (free) -->\n @if (!idScopeEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>scope</mat-label>\n <input matInput [formControl]=\"scope\" />\n @if (\n $any(scope.errors)?.maxLength && (scope.dirty || scope.touched)\n ) {\n <mat-error\n >scope too long</mat-error\n >\n }\n </mat-form-field>\n }\n\n <!-- label and GID -->\n @if (target.value?.label) {\n <div class=\"info\">\n <span class=\"label\">label</span>{{ target.value?.label }}\n </div>\n }\n @if (target.value?.gid) {\n <div class=\"info\">\n <span class=\"label\">GID</span>{{ target.value?.gid }}\n </div>\n }\n </div>\n\n <!-- target -->\n <div class=\"boxed\">\n <mat-expansion-panel [(expanded)]=\"targetExpanded\">\n <mat-expansion-panel-header>target</mat-expansion-panel-header>\n <cadmus-pin-target-lookup\n [pinByTypeMode]=\"pinByTypeMode\"\n [canSwitchMode]=\"canSwitchMode\"\n [canEditTarget]=\"canEditTarget\"\n [lookupDefinitions]=\"lookupDefinitions\"\n [defaultPartTypeKey]=\"defaultPartTypeKey\"\n [target]=\"target.value\"\n [internalDefault]=\"internalDefault\"\n [extLookupConfigs]=\"extLookupConfigs\"\n (targetChange)=\"onTargetChange($event)\"\n (editorClose)=\"onEditorClose()\"\n (extMoreRequest)=\"onExtMoreRequest($event)\"\n ></cadmus-pin-target-lookup>\n </mat-expansion-panel>\n </div>\n\n <!-- assertion -->\n <br />\n <div class=\"boxed\">\n <mat-expansion-panel>\n <mat-expansion-panel-header>assertion</mat-expansion-panel-header>\n <cadmus-refs-assertion\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [assertion]=\"assertion.value\"\n (assertionChange)=\"onAssertionChange($event)\"\n >\n </cadmus-refs-assertion>\n </mat-expansion-panel>\n </div>\n </div>\n\n <!-- buttons -->\n @if (hasSubmit) {\n <div>\n <button\n mat-icon-button\n color=\"warn\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"!this.target.value?.gid || !this.target.value?.label\"\n >\n <mat-icon>close</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n [disabled]=\"form.invalid\"\n >\n <mat-icon>check_circle</mat-icon>\n </button>\n </div>\n }\n </form>\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: 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: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "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.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i10.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: AssertionComponent, selector: "cadmus-refs-assertion", inputs: ["assTagEntries", "refTypeEntries", "refTagEntries", "assertion"], outputs: ["assertionChange"] }, { kind: "component", type: PinTargetLookupComponent, selector: "cadmus-pin-target-lookup", inputs: ["pinByTypeMode", "canSwitchMode", "canEditTarget", "lookupDefinitions", "extLookupConfigs", "internalDefault", "target", "defaultPartTypeKey"], outputs: ["editorClose", "targetChange", "extMoreRequest"] }] }); }
|
|
1098
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: AssertedCompositeIdComponent, isStandalone: true, selector: "cadmus-refs-asserted-composite-id", inputs: { idScopeEntries: "idScopeEntries", idTagEntries: "idTagEntries", assTagEntries: "assTagEntries", refTypeEntries: "refTypeEntries", refTagEntries: "refTagEntries", id: "id", internalDefault: "internalDefault", hasSubmit: "hasSubmit", pinByTypeMode: "pinByTypeMode", canSwitchMode: "canSwitchMode", canEditTarget: "canEditTarget", lookupDefinitions: "lookupDefinitions", defaultPartTypeKey: "defaultPartTypeKey" }, outputs: { idChange: "idChange", editorClose: "editorClose", extMoreRequest: "extMoreRequest" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div>\n <div class=\"form-row\">\n <!-- tag (bound) -->\n @if (idTagEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>tag</mat-label>\n <mat-select [formControl]=\"tag\">\n @for (e of idTagEntries; track e) {\n <mat-option [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <!-- tag (free) -->\n @if (!idTagEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>tag</mat-label>\n <input matInput [formControl]=\"tag\" />\n @if ($any(tag.errors)?.maxLength && (tag.dirty || tag.touched)) {\n <mat-error\n >tag too long</mat-error\n >\n }\n </mat-form-field>\n }\n\n <!-- scope (bound) -->\n @if (idScopeEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>scope</mat-label>\n <mat-select [formControl]=\"scope\">\n @for (e of idScopeEntries; track e) {\n <mat-option [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <!-- scope (free) -->\n @if (!idScopeEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>scope</mat-label>\n <input matInput [formControl]=\"scope\" />\n @if (\n $any(scope.errors)?.maxLength && (scope.dirty || scope.touched)\n ) {\n <mat-error\n >scope too long</mat-error\n >\n }\n </mat-form-field>\n }\n\n <!-- label and GID -->\n @if (target.value?.label) {\n <div class=\"info\">\n <span class=\"label\">label</span>{{ target.value?.label }}\n </div>\n }\n @if (target.value?.gid) {\n <div class=\"info\">\n <span class=\"label\">GID</span>{{ target.value?.gid }}\n </div>\n }\n </div>\n\n <!-- target -->\n <div class=\"boxed\">\n <mat-expansion-panel [(expanded)]=\"targetExpanded\">\n <mat-expansion-panel-header>target</mat-expansion-panel-header>\n <cadmus-pin-target-lookup\n [pinByTypeMode]=\"pinByTypeMode\"\n [canSwitchMode]=\"canSwitchMode\"\n [canEditTarget]=\"canEditTarget\"\n [lookupDefinitions]=\"lookupDefinitions\"\n [defaultPartTypeKey]=\"defaultPartTypeKey\"\n [target]=\"target.value\"\n [internalDefault]=\"internalDefault\"\n [extLookupConfigs]=\"extLookupConfigs\"\n (targetChange)=\"onTargetChange($event)\"\n (editorClose)=\"onEditorClose()\"\n (extMoreRequest)=\"onExtMoreRequest($event)\"\n (extLookupConfigChange)=\"onExtLookupConfigChange($event)\"\n ></cadmus-pin-target-lookup>\n </mat-expansion-panel>\n </div>\n\n <!-- assertion -->\n <br />\n <div class=\"boxed\">\n <mat-expansion-panel>\n <mat-expansion-panel-header>assertion</mat-expansion-panel-header>\n <cadmus-refs-assertion\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [assertion]=\"assertion.value\"\n (assertionChange)=\"onAssertionChange($event)\"\n >\n </cadmus-refs-assertion>\n </mat-expansion-panel>\n </div>\n </div>\n\n <!-- buttons -->\n @if (hasSubmit) {\n <div>\n <button\n mat-icon-button\n color=\"warn\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"!this.target.value?.gid || !this.target.value?.label\"\n >\n <mat-icon>close</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n [disabled]=\"form.invalid\"\n >\n <mat-icon>check_circle</mat-icon>\n </button>\n </div>\n }\n </form>\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: 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: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "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.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i10.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: AssertionComponent, selector: "cadmus-refs-assertion", inputs: ["assTagEntries", "refTypeEntries", "refTagEntries", "assertion"], outputs: ["assertionChange"] }, { kind: "component", type: PinTargetLookupComponent, selector: "cadmus-pin-target-lookup", inputs: ["pinByTypeMode", "canSwitchMode", "canEditTarget", "lookupDefinitions", "extLookupConfigs", "internalDefault", "target", "defaultPartTypeKey"], outputs: ["editorClose", "targetChange", "extMoreRequest", "extLookupConfigChange"] }] }); }
|
|
1085
1099
|
}
|
|
1086
1100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AssertedCompositeIdComponent, decorators: [{
|
|
1087
1101
|
type: Component,
|
|
@@ -1095,8 +1109,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
1095
1109
|
MatInputModule,
|
|
1096
1110
|
MatSelectModule,
|
|
1097
1111
|
AssertionComponent,
|
|
1098
|
-
PinTargetLookupComponent
|
|
1099
|
-
], template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div>\n <div class=\"form-row\">\n <!-- tag (bound) -->\n @if (idTagEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>tag</mat-label>\n <mat-select [formControl]=\"tag\">\n @for (e of idTagEntries; track e) {\n <mat-option [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <!-- tag (free) -->\n @if (!idTagEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>tag</mat-label>\n <input matInput [formControl]=\"tag\" />\n @if ($any(tag.errors)?.maxLength && (tag.dirty || tag.touched)) {\n <mat-error\n >tag too long</mat-error\n >\n }\n </mat-form-field>\n }\n\n <!-- scope (bound) -->\n @if (idScopeEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>scope</mat-label>\n <mat-select [formControl]=\"scope\">\n @for (e of idScopeEntries; track e) {\n <mat-option [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <!-- scope (free) -->\n @if (!idScopeEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>scope</mat-label>\n <input matInput [formControl]=\"scope\" />\n @if (\n $any(scope.errors)?.maxLength && (scope.dirty || scope.touched)\n ) {\n <mat-error\n >scope too long</mat-error\n >\n }\n </mat-form-field>\n }\n\n <!-- label and GID -->\n @if (target.value?.label) {\n <div class=\"info\">\n <span class=\"label\">label</span>{{ target.value?.label }}\n </div>\n }\n @if (target.value?.gid) {\n <div class=\"info\">\n <span class=\"label\">GID</span>{{ target.value?.gid }}\n </div>\n }\n </div>\n\n <!-- target -->\n <div class=\"boxed\">\n <mat-expansion-panel [(expanded)]=\"targetExpanded\">\n <mat-expansion-panel-header>target</mat-expansion-panel-header>\n <cadmus-pin-target-lookup\n [pinByTypeMode]=\"pinByTypeMode\"\n [canSwitchMode]=\"canSwitchMode\"\n [canEditTarget]=\"canEditTarget\"\n [lookupDefinitions]=\"lookupDefinitions\"\n [defaultPartTypeKey]=\"defaultPartTypeKey\"\n [target]=\"target.value\"\n [internalDefault]=\"internalDefault\"\n [extLookupConfigs]=\"extLookupConfigs\"\n (targetChange)=\"onTargetChange($event)\"\n (editorClose)=\"onEditorClose()\"\n (extMoreRequest)=\"onExtMoreRequest($event)\"\n ></cadmus-pin-target-lookup>\n </mat-expansion-panel>\n </div>\n\n <!-- assertion -->\n <br />\n <div class=\"boxed\">\n <mat-expansion-panel>\n <mat-expansion-panel-header>assertion</mat-expansion-panel-header>\n <cadmus-refs-assertion\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [assertion]=\"assertion.value\"\n (assertionChange)=\"onAssertionChange($event)\"\n >\n </cadmus-refs-assertion>\n </mat-expansion-panel>\n </div>\n </div>\n\n <!-- buttons -->\n @if (hasSubmit) {\n <div>\n <button\n mat-icon-button\n color=\"warn\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"!this.target.value?.gid || !this.target.value?.label\"\n >\n <mat-icon>close</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n [disabled]=\"form.invalid\"\n >\n <mat-icon>check_circle</mat-icon>\n </button>\n </div>\n }\n </form>\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"] }]
|
|
1112
|
+
PinTargetLookupComponent,
|
|
1113
|
+
], template: "<form [formGroup]=\"form\" (submit)=\"save()\">\n <div>\n <div class=\"form-row\">\n <!-- tag (bound) -->\n @if (idTagEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>tag</mat-label>\n <mat-select [formControl]=\"tag\">\n @for (e of idTagEntries; track e) {\n <mat-option [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <!-- tag (free) -->\n @if (!idTagEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>tag</mat-label>\n <input matInput [formControl]=\"tag\" />\n @if ($any(tag.errors)?.maxLength && (tag.dirty || tag.touched)) {\n <mat-error\n >tag too long</mat-error\n >\n }\n </mat-form-field>\n }\n\n <!-- scope (bound) -->\n @if (idScopeEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>scope</mat-label>\n <mat-select [formControl]=\"scope\">\n @for (e of idScopeEntries; track e) {\n <mat-option [value]=\"e.id\">{{\n e.value\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <!-- scope (free) -->\n @if (!idScopeEntries?.length) {\n <mat-form-field class=\"short-text\">\n <mat-label>scope</mat-label>\n <input matInput [formControl]=\"scope\" />\n @if (\n $any(scope.errors)?.maxLength && (scope.dirty || scope.touched)\n ) {\n <mat-error\n >scope too long</mat-error\n >\n }\n </mat-form-field>\n }\n\n <!-- label and GID -->\n @if (target.value?.label) {\n <div class=\"info\">\n <span class=\"label\">label</span>{{ target.value?.label }}\n </div>\n }\n @if (target.value?.gid) {\n <div class=\"info\">\n <span class=\"label\">GID</span>{{ target.value?.gid }}\n </div>\n }\n </div>\n\n <!-- target -->\n <div class=\"boxed\">\n <mat-expansion-panel [(expanded)]=\"targetExpanded\">\n <mat-expansion-panel-header>target</mat-expansion-panel-header>\n <cadmus-pin-target-lookup\n [pinByTypeMode]=\"pinByTypeMode\"\n [canSwitchMode]=\"canSwitchMode\"\n [canEditTarget]=\"canEditTarget\"\n [lookupDefinitions]=\"lookupDefinitions\"\n [defaultPartTypeKey]=\"defaultPartTypeKey\"\n [target]=\"target.value\"\n [internalDefault]=\"internalDefault\"\n [extLookupConfigs]=\"extLookupConfigs\"\n (targetChange)=\"onTargetChange($event)\"\n (editorClose)=\"onEditorClose()\"\n (extMoreRequest)=\"onExtMoreRequest($event)\"\n (extLookupConfigChange)=\"onExtLookupConfigChange($event)\"\n ></cadmus-pin-target-lookup>\n </mat-expansion-panel>\n </div>\n\n <!-- assertion -->\n <br />\n <div class=\"boxed\">\n <mat-expansion-panel>\n <mat-expansion-panel-header>assertion</mat-expansion-panel-header>\n <cadmus-refs-assertion\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [assertion]=\"assertion.value\"\n (assertionChange)=\"onAssertionChange($event)\"\n >\n </cadmus-refs-assertion>\n </mat-expansion-panel>\n </div>\n </div>\n\n <!-- buttons -->\n @if (hasSubmit) {\n <div>\n <button\n mat-icon-button\n color=\"warn\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"!this.target.value?.gid || !this.target.value?.label\"\n >\n <mat-icon>close</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n [disabled]=\"form.invalid\"\n >\n <mat-icon>check_circle</mat-icon>\n </button>\n </div>\n }\n </form>\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"] }]
|
|
1100
1114
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: PinRefLookupService }, { type: undefined, decorators: [{
|
|
1101
1115
|
type: Inject,
|
|
1102
1116
|
args: ['indexLookupDefinitions']
|
|
@@ -1248,7 +1262,7 @@ class AssertedCompositeIdsComponent {
|
|
|
1248
1262
|
this.emitIdsChange();
|
|
1249
1263
|
}
|
|
1250
1264
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AssertedCompositeIdsComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1251
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: AssertedCompositeIdsComponent, isStandalone: true, selector: "cadmus-refs-asserted-composite-ids", inputs: { ids: "ids", idScopeEntries: "idScopeEntries", idTagEntries: "idTagEntries", assTagEntries: "assTagEntries", refTypeEntries: "refTypeEntries", refTagEntries: "refTagEntries", pinByTypeMode: "pinByTypeMode", canSwitchMode: "canSwitchMode", canEditTarget: "canEditTarget", lookupDefinitions: "lookupDefinitions", defaultPartTypeKey: "defaultPartTypeKey", internalDefault: "internalDefault" }, outputs: { idsChange: "idsChange" }, ngImport: i0, template: "<form [formGroup]=\"form\">\n <!-- buttons -->\n <button type=\"button\" color=\"primary\" mat-flat-button (click)=\"addId()\">\n <mat-icon>add_circle</mat-icon> ID\n </button>\n <!-- list -->\n @if (entries.value
|
|
1265
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: AssertedCompositeIdsComponent, isStandalone: true, selector: "cadmus-refs-asserted-composite-ids", inputs: { ids: "ids", idScopeEntries: "idScopeEntries", idTagEntries: "idTagEntries", assTagEntries: "assTagEntries", refTypeEntries: "refTypeEntries", refTagEntries: "refTagEntries", pinByTypeMode: "pinByTypeMode", canSwitchMode: "canSwitchMode", canEditTarget: "canEditTarget", lookupDefinitions: "lookupDefinitions", defaultPartTypeKey: "defaultPartTypeKey", internalDefault: "internalDefault" }, outputs: { idsChange: "idsChange" }, ngImport: i0, template: "<form [formGroup]=\"form\">\n <!-- buttons -->\n <button type=\"button\" color=\"primary\" mat-flat-button (click)=\"addId()\">\n <mat-icon>add_circle</mat-icon> ID\n </button>\n <!-- list -->\n @if (entries.value.length) {\n <table>\n <thead>\n <tr>\n <th></th>\n <th>scope</th>\n <th>label</th>\n <th>value</th>\n <th>ass.</th>\n </tr>\n </thead>\n <tbody>\n @for (\n entry of entries.value; track\n entry; let i = $index; let first = $first; let last = $last) {\n <tr\n >\n <td class=\"fit-width\">\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n matTooltip=\"Edit this ID\"\n (click)=\"editId(entry, i)\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Move this ID up\"\n [disabled]=\"first\"\n (click)=\"moveIdUp(i)\"\n >\n <mat-icon>arrow_upward</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Move this ID down\"\n [disabled]=\"last\"\n (click)=\"moveIdDown(i)\"\n >\n <mat-icon>arrow_downward</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n color=\"warn\"\n matTooltip=\"Delete this ID\"\n (click)=\"deleteId(i)\"\n >\n <mat-icon>remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ entry.scope }}</td>\n <td>{{ entry?.target?.label }}</td>\n <td>{{ entry?.target?.gid }}</td>\n <td>{{ entry?.assertion ? \"Y\" : \"N\" }}</td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n <!-- editor -->\n <mat-expansion-panel [expanded]=\"edited\" [disabled]=\"!edited\">\n <mat-expansion-panel-header\n >ID {{ edited?.target?.label }}</mat-expansion-panel-header\n >\n <cadmus-refs-asserted-composite-id\n [idScopeEntries]=\"idScopeEntries\"\n [idTagEntries]=\"idTagEntries\"\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [hasSubmit]=\"true\"\n [pinByTypeMode]=\"pinByTypeMode\"\n [canSwitchMode]=\"canSwitchMode\"\n [canEditTarget]=\"canEditTarget\"\n [lookupDefinitions]=\"lookupDefinitions\"\n [defaultPartTypeKey]=\"defaultPartTypeKey\"\n [internalDefault]=\"internalDefault\"\n [id]=\"edited\"\n (idChange)=\"onIdChange($event)\"\n (editorClose)=\"closeId()\"\n ></cadmus-refs-asserted-composite-id>\n </mat-expansion-panel>\n </form>\n", styles: ["th{font-weight:400;color:silver;text-align:left}td{padding-right:4px}td.fit-width{width:1px;white-space:nowrap;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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", "internalDefault", "hasSubmit", "pinByTypeMode", "canSwitchMode", "canEditTarget", "lookupDefinitions", "defaultPartTypeKey"], outputs: ["idChange", "editorClose", "extMoreRequest"] }] }); }
|
|
1252
1266
|
}
|
|
1253
1267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AssertedCompositeIdsComponent, decorators: [{
|
|
1254
1268
|
type: Component,
|
|
@@ -1262,7 +1276,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
1262
1276
|
MatIconModule,
|
|
1263
1277
|
MatInputModule,
|
|
1264
1278
|
AssertedCompositeIdComponent
|
|
1265
|
-
], template: "<form [formGroup]=\"form\">\n <!-- buttons -->\n <button type=\"button\" color=\"primary\" mat-flat-button (click)=\"addId()\">\n <mat-icon>add_circle</mat-icon> ID\n </button>\n <!-- list -->\n @if (entries.value
|
|
1279
|
+
], template: "<form [formGroup]=\"form\">\n <!-- buttons -->\n <button type=\"button\" color=\"primary\" mat-flat-button (click)=\"addId()\">\n <mat-icon>add_circle</mat-icon> ID\n </button>\n <!-- list -->\n @if (entries.value.length) {\n <table>\n <thead>\n <tr>\n <th></th>\n <th>scope</th>\n <th>label</th>\n <th>value</th>\n <th>ass.</th>\n </tr>\n </thead>\n <tbody>\n @for (\n entry of entries.value; track\n entry; let i = $index; let first = $first; let last = $last) {\n <tr\n >\n <td class=\"fit-width\">\n <button\n type=\"button\"\n mat-icon-button\n color=\"primary\"\n matTooltip=\"Edit this ID\"\n (click)=\"editId(entry, i)\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Move this ID up\"\n [disabled]=\"first\"\n (click)=\"moveIdUp(i)\"\n >\n <mat-icon>arrow_upward</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Move this ID down\"\n [disabled]=\"last\"\n (click)=\"moveIdDown(i)\"\n >\n <mat-icon>arrow_downward</mat-icon>\n </button>\n <button\n type=\"button\"\n mat-icon-button\n color=\"warn\"\n matTooltip=\"Delete this ID\"\n (click)=\"deleteId(i)\"\n >\n <mat-icon>remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ entry.scope }}</td>\n <td>{{ entry?.target?.label }}</td>\n <td>{{ entry?.target?.gid }}</td>\n <td>{{ entry?.assertion ? \"Y\" : \"N\" }}</td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n <!-- editor -->\n <mat-expansion-panel [expanded]=\"edited\" [disabled]=\"!edited\">\n <mat-expansion-panel-header\n >ID {{ edited?.target?.label }}</mat-expansion-panel-header\n >\n <cadmus-refs-asserted-composite-id\n [idScopeEntries]=\"idScopeEntries\"\n [idTagEntries]=\"idTagEntries\"\n [assTagEntries]=\"assTagEntries\"\n [refTypeEntries]=\"refTypeEntries\"\n [refTagEntries]=\"refTagEntries\"\n [hasSubmit]=\"true\"\n [pinByTypeMode]=\"pinByTypeMode\"\n [canSwitchMode]=\"canSwitchMode\"\n [canEditTarget]=\"canEditTarget\"\n [lookupDefinitions]=\"lookupDefinitions\"\n [defaultPartTypeKey]=\"defaultPartTypeKey\"\n [internalDefault]=\"internalDefault\"\n [id]=\"edited\"\n (idChange)=\"onIdChange($event)\"\n (editorClose)=\"closeId()\"\n ></cadmus-refs-asserted-composite-id>\n </mat-expansion-panel>\n </form>\n", styles: ["th{font-weight:400;color:silver;text-align:left}td{padding-right:4px}td.fit-width{width:1px;white-space:nowrap;padding:0}\n"] }]
|
|
1266
1280
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2.DialogService }], propDecorators: { ids: [{
|
|
1267
1281
|
type: Input
|
|
1268
1282
|
}], idScopeEntries: [{
|