@yuuvis/app-invoice 2.3.6 → 3.0.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/fesm2022/yuuvis-app-invoice-extensions.mjs +37 -37
- package/fesm2022/yuuvis-app-invoice-extensions.mjs.map +1 -1
- package/package.json +10 -9
- package/types/yuuvis-app-invoice-extensions.d.ts +74 -0
- package/types/yuuvis-app-invoice.d.ts +5 -0
- package/extensions/index.d.ts +0 -4
- package/extensions/lib/actions/open-email/open-email.action.d.ts +0 -18
- package/extensions/lib/actions/retention/manage-retention/manage-retention.component.d.ts +0 -26
- package/extensions/lib/actions/retention/retention.action.d.ts +0 -17
- package/extensions/lib/components/apply-create-flavor/apply-create-flavor.component.d.ts +0 -12
- package/extensions/lib/components/apply-flavor/apply-flavor.component.d.ts +0 -26
- package/extensions/lib/components/form-extensions/ai-extracted-property/ai-extracted-property.component.d.ts +0 -28
- package/extensions/lib/invoice.flavor.create.d.ts +0 -2
- package/extensions/lib/invoice.schema.d.ts +0 -7
- package/extensions/lib/services/apply-flavor.service.d.ts +0 -11
- package/extensions/lib/services/extensions.service.d.ts +0 -8
- package/index.d.ts +0 -1
- package/lib/lib.routes.d.ts +0 -2
|
@@ -11,7 +11,7 @@ import { PredictionService, SystemService, TranslateModule, TranslateService as
|
|
|
11
11
|
import * as i1$1 from '@angular/common';
|
|
12
12
|
import { CommonModule } from '@angular/common';
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i3$1 from '@angular/material/dialog';
|
|
15
15
|
import { MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
|
16
16
|
import { BusyOverlayDirective, DialogComponent } from '@yuuvis/client-framework/common';
|
|
17
17
|
import { AbstractApplyObjectFlavorComponent, AbstractApplyCreateFlavorComponent } from '@yuuvis/client-framework/object-flavor';
|
|
@@ -24,7 +24,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
24
24
|
import * as i1 from '@angular/material/menu';
|
|
25
25
|
import { MatMenuModule } from '@angular/material/menu';
|
|
26
26
|
import { YmtButtonDirective } from '@yuuvis/material';
|
|
27
|
-
import * as
|
|
27
|
+
import * as i4 from '@angular/material/tooltip';
|
|
28
28
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
29
29
|
|
|
30
30
|
class OpenEmailAction extends AbstractContextAction {
|
|
@@ -56,17 +56,17 @@ class OpenEmailAction extends AbstractContextAction {
|
|
|
56
56
|
|
|
57
57
|
class ApplyFlavorService {
|
|
58
58
|
#predict = inject(PredictionService);
|
|
59
|
-
#extractedDataSource = signal(null);
|
|
59
|
+
#extractedDataSource = signal(null, ...(ngDevMode ? [{ debugName: "#extractedDataSource" }] : /* istanbul ignore next */ []));
|
|
60
60
|
extractedData = this.#extractedDataSource.asReadonly();
|
|
61
61
|
extract(schemaObjectTypeId, objectID) {
|
|
62
62
|
return this.#predict
|
|
63
63
|
.extract(schemaObjectTypeId, [objectID])
|
|
64
64
|
.pipe(tap((res) => this.#extractedDataSource.set(res[objectID].properties)));
|
|
65
65
|
}
|
|
66
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
67
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ApplyFlavorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
67
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ApplyFlavorService });
|
|
68
68
|
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ApplyFlavorService, decorators: [{
|
|
70
70
|
type: Injectable
|
|
71
71
|
}] });
|
|
72
72
|
|
|
@@ -88,7 +88,7 @@ class AiExtractedPropertyComponent extends ObjectFormElementExtension {
|
|
|
88
88
|
#system = inject(SystemService);
|
|
89
89
|
#elRef = inject(ElementRef);
|
|
90
90
|
predictionValues = [];
|
|
91
|
-
currentValueProbability = signal(undefined);
|
|
91
|
+
currentValueProbability = signal(undefined, ...(ngDevMode ? [{ debugName: "currentValueProbability" }] : /* istanbul ignore next */ []));
|
|
92
92
|
#currentValueProbabilityEffect = effect(() => {
|
|
93
93
|
const cp = this.currentValueProbability();
|
|
94
94
|
if (!cp)
|
|
@@ -96,7 +96,7 @@ class AiExtractedPropertyComponent extends ObjectFormElementExtension {
|
|
|
96
96
|
// set the probability color
|
|
97
97
|
const color = cp < 30 ? '--ymt-danger' : cp < 60 ? '--ymt-warning' : '--ymt-success';
|
|
98
98
|
this.#elRef.nativeElement.style.setProperty('--current-value-probability-color', `var(${color})`);
|
|
99
|
-
});
|
|
99
|
+
}, ...(ngDevMode ? [{ debugName: "#currentValueProbabilityEffect" }] : /* istanbul ignore next */ []));
|
|
100
100
|
extractedData = this.#applyFlavorService.extractedData;
|
|
101
101
|
extractedDataEffect = effect(() => {
|
|
102
102
|
const extData = this.extractedData();
|
|
@@ -107,7 +107,7 @@ class AiExtractedPropertyComponent extends ObjectFormElementExtension {
|
|
|
107
107
|
this.#applyPredictionValues();
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
});
|
|
110
|
+
}, ...(ngDevMode ? [{ debugName: "extractedDataEffect" }] : /* istanbul ignore next */ []));
|
|
111
111
|
#internalFieldType;
|
|
112
112
|
#applyPredictionValues() {
|
|
113
113
|
// set the value of the form field to the extracted value with
|
|
@@ -145,12 +145,12 @@ class AiExtractedPropertyComponent extends ObjectFormElementExtension {
|
|
|
145
145
|
ngOnInit() {
|
|
146
146
|
this.#internalFieldType = this.#system.getObjectTypeField(this.input().formControlName)?._internalType;
|
|
147
147
|
}
|
|
148
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
149
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
148
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AiExtractedPropertyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
149
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: AiExtractedPropertyComponent, isStandalone: true, selector: "yin-ai-extracted-property", usesInheritance: true, ngImport: i0, template: "@if (predictionValues.length === 1) {\n <span class=\"probability\">\n <mat-icon class=\"ymt-icon--size-s\">robot_2</mat-icon>\n {{ 'yuv.app.invoice.ai.probability' | translate: { probability: currentValueProbability() } }}\n </span\n >\n} @else if (predictionValues.length > 1) {\n <button class=\"probability\" [matMenuTriggerFor]=\"menu\">\n <!-- (click)=\"openValueOptions(options, $event)\"> -->\n <mat-icon class=\"ymt-icon--size-s\">robot_2</mat-icon>\n {{ 'yuv.app.invoice.ai.probability' | translate: { probability: currentValueProbability() } }}\n <mat-icon class=\"ymt-icon--size-s\">arrow_drop_down</mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n @for (pv of predictionValues; track $index) {\n <button mat-menu-item (click)=\"selectOptionByIndex($index)\">{{ pv.value }\n <span>{{ 'yuv.app.invoice.ai.probability' | translate: { probability: pv.probability } }}</span>\n </button>\n }\n </mat-menu>\n}\n", styles: [":host{--current-value-probability-color: var(--ymt-success)}:host .probability{padding:2px;background-color:rgb(from var(--current-value-probability-color) r g b/.1);border:1px solid rgb(from var(--current-value-probability-color) r g b/.3);color:var(--current-value-probability-color);display:flex;border-radius:.25em;gap:var(--ymt-spacing-2xs);font:var(--ymt-font-body-subtle);align-items:center;line-height:1em;--icon-size: 14px}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
150
150
|
}
|
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AiExtractedPropertyComponent, decorators: [{
|
|
152
152
|
type: Component,
|
|
153
|
-
args: [{ selector: 'yin-ai-extracted-property', standalone: true, imports: [
|
|
153
|
+
args: [{ selector: 'yin-ai-extracted-property', standalone: true, imports: [MatMenuModule, MatIconModule, TranslateModule], template: "@if (predictionValues.length === 1) {\n <span class=\"probability\">\n <mat-icon class=\"ymt-icon--size-s\">robot_2</mat-icon>\n {{ 'yuv.app.invoice.ai.probability' | translate: { probability: currentValueProbability() } }}\n </span\n >\n} @else if (predictionValues.length > 1) {\n <button class=\"probability\" [matMenuTriggerFor]=\"menu\">\n <!-- (click)=\"openValueOptions(options, $event)\"> -->\n <mat-icon class=\"ymt-icon--size-s\">robot_2</mat-icon>\n {{ 'yuv.app.invoice.ai.probability' | translate: { probability: currentValueProbability() } }}\n <mat-icon class=\"ymt-icon--size-s\">arrow_drop_down</mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n @for (pv of predictionValues; track $index) {\n <button mat-menu-item (click)=\"selectOptionByIndex($index)\">{{ pv.value }\n <span>{{ 'yuv.app.invoice.ai.probability' | translate: { probability: pv.probability } }}</span>\n </button>\n }\n </mat-menu>\n}\n", styles: [":host{--current-value-probability-color: var(--ymt-success)}:host .probability{padding:2px;background-color:rgb(from var(--current-value-probability-color) r g b/.1);border:1px solid rgb(from var(--current-value-probability-color) r g b/.3);color:var(--current-value-probability-color);display:flex;border-radius:.25em;gap:var(--ymt-spacing-2xs);font:var(--ymt-font-body-subtle);align-items:center;line-height:1em;--icon-size: 14px}\n"] }]
|
|
154
154
|
}] });
|
|
155
155
|
|
|
156
156
|
const COMPONENTS = [
|
|
@@ -169,30 +169,30 @@ class ApplyFlavorComponent extends AbstractApplyObjectFlavorComponent {
|
|
|
169
169
|
#applyFlavorService = inject(ApplyFlavorService);
|
|
170
170
|
translate = inject(TranslateService$1);
|
|
171
171
|
userService = inject(UserService);
|
|
172
|
-
objectForm = viewChild(ObjectFormComponent);
|
|
173
|
-
flavorLabel = computed(() => this.#shell.getFlavorLabel(this.flavor().id));
|
|
172
|
+
objectForm = viewChild(ObjectFormComponent, ...(ngDevMode ? [{ debugName: "objectForm" }] : /* istanbul ignore next */ []));
|
|
173
|
+
flavorLabel = computed(() => this.#shell.getFlavorLabel(this.flavor().id), ...(ngDevMode ? [{ debugName: "flavorLabel" }] : /* istanbul ignore next */ []));
|
|
174
174
|
#flavorEffect = effect(() => {
|
|
175
175
|
const f = this.flavor();
|
|
176
176
|
untracked(() => {
|
|
177
177
|
if (f)
|
|
178
178
|
this.#loadForm(f);
|
|
179
179
|
});
|
|
180
|
-
});
|
|
180
|
+
}, ...(ngDevMode ? [{ debugName: "#flavorEffect" }] : /* istanbul ignore next */ []));
|
|
181
181
|
#dmsObjectEffect = effect(() => {
|
|
182
182
|
const o = this.dmsObject();
|
|
183
183
|
untracked(() => {
|
|
184
184
|
this.supportsExtraction.set(!!o.content && o.content.mimeType === 'application/pdf'
|
|
185
185
|
&& this.userService.getCurrentUser().authorities.includes('YUUVIS_AI_PREDICT'));
|
|
186
186
|
});
|
|
187
|
-
});
|
|
188
|
-
error = signal(false);
|
|
189
|
-
applyDisabled = signal(true);
|
|
190
|
-
supportsExtraction = signal(true);
|
|
191
|
-
busyLoading = signal(false);
|
|
192
|
-
busySaving = signal(false);
|
|
193
|
-
busyExtracting = signal(false);
|
|
194
|
-
formOptions = signal(null);
|
|
195
|
-
extensions = signal([]);
|
|
187
|
+
}, ...(ngDevMode ? [{ debugName: "#dmsObjectEffect" }] : /* istanbul ignore next */ []));
|
|
188
|
+
error = signal(false, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
189
|
+
applyDisabled = signal(true, ...(ngDevMode ? [{ debugName: "applyDisabled" }] : /* istanbul ignore next */ []));
|
|
190
|
+
supportsExtraction = signal(true, ...(ngDevMode ? [{ debugName: "supportsExtraction" }] : /* istanbul ignore next */ []));
|
|
191
|
+
busyLoading = signal(false, ...(ngDevMode ? [{ debugName: "busyLoading" }] : /* istanbul ignore next */ []));
|
|
192
|
+
busySaving = signal(false, ...(ngDevMode ? [{ debugName: "busySaving" }] : /* istanbul ignore next */ []));
|
|
193
|
+
busyExtracting = signal(false, ...(ngDevMode ? [{ debugName: "busyExtracting" }] : /* istanbul ignore next */ []));
|
|
194
|
+
formOptions = signal(null, ...(ngDevMode ? [{ debugName: "formOptions" }] : /* istanbul ignore next */ []));
|
|
195
|
+
extensions = signal([], ...(ngDevMode ? [{ debugName: "extensions" }] : /* istanbul ignore next */ []));
|
|
196
196
|
immediateExtract = (this.data() && this.data().immediateExtract) || false;
|
|
197
197
|
headline = this.data() && this.data().headline;
|
|
198
198
|
#loadForm(f) {
|
|
@@ -248,13 +248,13 @@ class ApplyFlavorComponent extends AbstractApplyObjectFlavorComponent {
|
|
|
248
248
|
close() {
|
|
249
249
|
this.dialogRef.close();
|
|
250
250
|
}
|
|
251
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
252
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
251
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ApplyFlavorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
252
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ApplyFlavorComponent, isStandalone: true, selector: "yin-apply-flavor", providers: [ApplyFlavorService], viewQueries: [{ propertyName: "objectForm", first: true, predicate: ObjectFormComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<yuv-dialog [headertitel]=\"headline || ('yuv.app.invoice.apply-flavor.headline' | translate: { name: flavorLabel() })\">\n <main>\n <yuv-split-view [gutterSize]=\"1\">\n <ng-template yuvSplitArea [size]=\"60\">\n @if (dmsObject() && dmsObject().content) {\n <yuv-object-preview [objectId]=\"dmsObject().id\"></yuv-object-preview>\n }\n </ng-template>\n\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"metadata\" [yuvBusyOverlay]=\"busyLoading()\">\n <div class=\"ai\">\n @if (supportsExtraction()) {\n @if (error()) {\n <mat-icon class=\"warning\" [matTooltip]=\"'yuv.app.invoice.apply-flavor.button.extract.error' | translate\">warning</mat-icon>\n }\n @if (busyExtracting()) {\n <div class=\"spinner\"></div>\n }\n <button ymtButton=\"secondary\" class=\"ai-extract\" [ngClass]=\"{ spinning: busyExtracting() }\" (click)=\"extract()\">\n <mat-icon>robot_2</mat-icon>\n {{ 'yuv.app.invoice.apply-flavor.button.extract' | translate }}\n </button>\n }\n </div>\n\n @let fo = formOptions();\n @if (fo) {\n <yuv-object-form\n [elementExtensions]=\"extensions()\"\n [inert]=\"busySaving() || busyExtracting()\"\n [formOptions]=\"fo\"\n (statusChanged)=\"onFormStatusChanged($event)\"\n ></yuv-object-form>\n }\n </div>\n </ng-template>\n </yuv-split-view>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" mat-dialog-close [disabled]=\"busySaving() || busyExtracting()\">\n {{ 'yuv.app.invoice.apply-flavor.button.cancel' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n mat-dialog-close\n cdkFocusInitial\n class=\"primary\"\n [ngClass]=\"{ spinning: busySaving() }\"\n [disabled]=\"applyDisabled() || busyExtracting()\"\n (click)=\"applyFlavor()\"\n >\n {{ 'yuv.app.invoice.apply-flavor.button.apply' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{width:90vw;--ymt-dialog-content-display: block}:host .spinning{opacity:.5;pointer-events:none}:host main{height:65vh}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);flex:1}:host .metadata{display:flex;flex-flow:column;height:100%;overflow:hidden}:host .metadata .ai{display:flex;flex:0 0 auto;justify-content:end;padding:0 var(--ymt-spacing-m);border-block-end:1px solid var(--ymt-outline-variant);align-items:center;gap:1em}:host .metadata .ai mat-icon.warning{--icon-size: 18px;color:var(--ymt-warning)}:host .metadata .ai button{display:flex}:host .metadata .ai button mat-icon{--icon-size: 18px;color:var(--ymt-text-color-subtle)}:host .metadata .ai button{margin-block:var(--ymt-spacing-2xs);padding:.25em 1.5em}:host .metadata yuv-object-form{display:block;background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline-variant);max-width:100%;margin-inline:auto;box-sizing:border-box;overflow:auto}:host .spinner{color:var(--mat-sys-primary)}:host .spinner,:host .spinner:after{box-sizing:border-box}:host .spinner{display:inline-block;width:40px;height:40px}:host .spinner:after{content:\" \";display:block;width:32px;height:32px;margin:4px;border-radius:50%;border:6.4px solid currentColor;border-color:currentColor transparent currentColor transparent;animation:spinner 1.2s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}::ng-deep .cdk-overlay-pane.mat-mdc-dialog-panel{max-width:unset!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i2$1.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible", "lockSize"] }, { kind: "component", type: i2$1.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay", "yuvBusyOverlayConfig", "yuvBusyError"], outputs: ["yuvBusyErrorDismiss"] }, { kind: "component", type: ObjectFormComponent, selector: "yuv-object-form", inputs: ["formOptions", "inert", "readonly", "elementExtensions", "isInnerTableForm"], outputs: ["statusChanged", "onFormReady"] }, { kind: "component", type: ObjectPreviewComponent, selector: "yuv-object-preview", inputs: ["objectId", "dmsObject", "version", "metadata"] }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitle", "headertitel"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i3$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
253
253
|
}
|
|
254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ApplyFlavorComponent, decorators: [{
|
|
255
255
|
type: Component,
|
|
256
|
-
args: [{ selector: 'yin-apply-flavor', standalone: true, providers: [ApplyFlavorService], imports: [CommonModule, ...COMPONENTS, ...MATERIAL, MatIconModule], template: "<yuv-dialog [headertitel]=\"headline || ('yuv.app.invoice.apply-flavor.headline' | translate: { name: flavorLabel() })\">\n <main>\n <yuv-split-view [gutterSize]=\"1\">\n <ng-template yuvSplitArea [size]=\"60\">\n @if (dmsObject() && dmsObject().content) {\n <yuv-object-preview [objectId]=\"dmsObject().id\"></yuv-object-preview>\n }\n </ng-template>\n\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"metadata\" [yuvBusyOverlay]=\"busyLoading()\">\n <div class=\"ai\">\n @if (supportsExtraction()) {\n @if (error()) {\n <mat-icon class=\"warning\" [matTooltip]=\"'yuv.app.invoice.apply-flavor.button.extract.error' | translate\">warning</mat-icon>\n }\n @if (busyExtracting()) {\n <div class=\"spinner\"></div>\n }\n <button ymtButton=\"secondary\" class=\"ai-extract\" [ngClass]=\"{ spinning: busyExtracting() }\" (click)=\"extract()\">\n <mat-icon>robot_2</mat-icon>\n {{ 'yuv.app.invoice.apply-flavor.button.extract' | translate }}\n </button>\n }\n </div>\n\n @let fo = formOptions();\n @if (fo) {\n <yuv-object-form\n [elementExtensions]=\"extensions()\"\n [inert]=\"busySaving() || busyExtracting()\"\n [formOptions]=\"fo\"\n (statusChanged)=\"onFormStatusChanged($event)\"\n ></yuv-object-form>\n }\n </div>\n </ng-template>\n </yuv-split-view>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" mat-dialog-close [disabled]=\"busySaving() || busyExtracting()\">\n {{ 'yuv.app.invoice.apply-flavor.button.cancel' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n mat-dialog-close\n cdkFocusInitial\n class=\"primary\"\n [ngClass]=\"{ spinning: busySaving() }\"\n [disabled]=\"applyDisabled() || busyExtracting()\"\n (click)=\"applyFlavor()\"\n >\n {{ 'yuv.app.invoice.apply-flavor.button.apply' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{width:90vw;--ymt-dialog-content-display: block}:host .spinning{opacity:.5;pointer-events:none}:host main{height:65vh}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);flex:1}:host .metadata{display:flex;flex-flow:column;height:100%;overflow:hidden}:host .metadata .ai{display:flex;flex:0 0 auto;justify-content:end;padding:0 var(--ymt-spacing-m);border-block-end:1px solid var(--ymt-outline-variant);align-items:center;gap:1em}:host .metadata .ai mat-icon.warning{--icon-size: 18px;color:var(--ymt-warning)}:host .metadata .ai button{display:flex
|
|
257
|
-
}] });
|
|
256
|
+
args: [{ selector: 'yin-apply-flavor', standalone: true, providers: [ApplyFlavorService], imports: [CommonModule, ...COMPONENTS, ...MATERIAL, MatIconModule], template: "<yuv-dialog [headertitel]=\"headline || ('yuv.app.invoice.apply-flavor.headline' | translate: { name: flavorLabel() })\">\n <main>\n <yuv-split-view [gutterSize]=\"1\">\n <ng-template yuvSplitArea [size]=\"60\">\n @if (dmsObject() && dmsObject().content) {\n <yuv-object-preview [objectId]=\"dmsObject().id\"></yuv-object-preview>\n }\n </ng-template>\n\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"metadata\" [yuvBusyOverlay]=\"busyLoading()\">\n <div class=\"ai\">\n @if (supportsExtraction()) {\n @if (error()) {\n <mat-icon class=\"warning\" [matTooltip]=\"'yuv.app.invoice.apply-flavor.button.extract.error' | translate\">warning</mat-icon>\n }\n @if (busyExtracting()) {\n <div class=\"spinner\"></div>\n }\n <button ymtButton=\"secondary\" class=\"ai-extract\" [ngClass]=\"{ spinning: busyExtracting() }\" (click)=\"extract()\">\n <mat-icon>robot_2</mat-icon>\n {{ 'yuv.app.invoice.apply-flavor.button.extract' | translate }}\n </button>\n }\n </div>\n\n @let fo = formOptions();\n @if (fo) {\n <yuv-object-form\n [elementExtensions]=\"extensions()\"\n [inert]=\"busySaving() || busyExtracting()\"\n [formOptions]=\"fo\"\n (statusChanged)=\"onFormStatusChanged($event)\"\n ></yuv-object-form>\n }\n </div>\n </ng-template>\n </yuv-split-view>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" mat-dialog-close [disabled]=\"busySaving() || busyExtracting()\">\n {{ 'yuv.app.invoice.apply-flavor.button.cancel' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n mat-dialog-close\n cdkFocusInitial\n class=\"primary\"\n [ngClass]=\"{ spinning: busySaving() }\"\n [disabled]=\"applyDisabled() || busyExtracting()\"\n (click)=\"applyFlavor()\"\n >\n {{ 'yuv.app.invoice.apply-flavor.button.apply' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{width:90vw;--ymt-dialog-content-display: block}:host .spinning{opacity:.5;pointer-events:none}:host main{height:65vh}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);flex:1}:host .metadata{display:flex;flex-flow:column;height:100%;overflow:hidden}:host .metadata .ai{display:flex;flex:0 0 auto;justify-content:end;padding:0 var(--ymt-spacing-m);border-block-end:1px solid var(--ymt-outline-variant);align-items:center;gap:1em}:host .metadata .ai mat-icon.warning{--icon-size: 18px;color:var(--ymt-warning)}:host .metadata .ai button{display:flex}:host .metadata .ai button mat-icon{--icon-size: 18px;color:var(--ymt-text-color-subtle)}:host .metadata .ai button{margin-block:var(--ymt-spacing-2xs);padding:.25em 1.5em}:host .metadata yuv-object-form{display:block;background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline-variant);max-width:100%;margin-inline:auto;box-sizing:border-box;overflow:auto}:host .spinner{color:var(--mat-sys-primary)}:host .spinner,:host .spinner:after{box-sizing:border-box}:host .spinner{display:inline-block;width:40px;height:40px}:host .spinner:after{content:\" \";display:block;width:32px;height:32px;margin:4px;border-radius:50%;border:6.4px solid currentColor;border-color:currentColor transparent currentColor transparent;animation:spinner 1.2s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}::ng-deep .cdk-overlay-pane.mat-mdc-dialog-panel{max-width:unset!important}\n"] }]
|
|
257
|
+
}], propDecorators: { objectForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ObjectFormComponent), { isSignal: true }] }] } });
|
|
258
258
|
|
|
259
259
|
// use marker to extract the labels for the app schema types
|
|
260
260
|
// make sure to provide a marker for each type/flavor ID
|
|
@@ -310,7 +310,7 @@ class ApplyCreateFlavorComponent extends AbstractApplyCreateFlavorComponent {
|
|
|
310
310
|
untracked(() => {
|
|
311
311
|
this.#setupApplyComponent();
|
|
312
312
|
});
|
|
313
|
-
});
|
|
313
|
+
}, ...(ngDevMode ? [{ debugName: "#dataEffect" }] : /* istanbul ignore next */ []));
|
|
314
314
|
sc;
|
|
315
315
|
#setupApplyComponent() {
|
|
316
316
|
const flavor = APP_FLAVORS.find((f) => f.id === 'io.yuuvis.app.invoice.flavor.invoice');
|
|
@@ -327,10 +327,10 @@ class ApplyCreateFlavorComponent extends AbstractApplyCreateFlavorComponent {
|
|
|
327
327
|
}
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
331
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
330
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ApplyCreateFlavorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
331
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ApplyCreateFlavorComponent, isStandalone: true, selector: "yin-apply-create-flavor", usesInheritance: true, ngImport: i0, template: "@if (sc && sc.cmp) {\n <ng-container *ngComponentOutlet=\"sc.cmp; inputs: sc.inputs\"></ng-container>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }] });
|
|
332
332
|
}
|
|
333
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ApplyCreateFlavorComponent, decorators: [{
|
|
334
334
|
type: Component,
|
|
335
335
|
args: [{ selector: 'yin-apply-create-flavor', standalone: true, imports: [CommonModule], template: "@if (sc && sc.cmp) {\n <ng-container *ngComponentOutlet=\"sc.cmp; inputs: sc.inputs\"></ng-container>\n}\n" }]
|
|
336
336
|
}] });
|
|
@@ -368,10 +368,10 @@ class AppInvoiceExtension {
|
|
|
368
368
|
// register actions
|
|
369
369
|
this.#actionsService.registerActions(this.#actions);
|
|
370
370
|
}
|
|
371
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
372
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AppInvoiceExtension, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
372
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AppInvoiceExtension });
|
|
373
373
|
}
|
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AppInvoiceExtension, decorators: [{
|
|
375
375
|
type: Injectable
|
|
376
376
|
}] });
|
|
377
377
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-app-invoice-extensions.mjs","sources":["../../../../projects/yuuvis/app-invoice/extensions/src/lib/actions/open-email/open-email.action.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/services/apply-flavor.service.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/form-extensions/ai-extracted-property/ai-extracted-property.component.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/form-extensions/ai-extracted-property/ai-extracted-property.component.html","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/apply-flavor/apply-flavor.component.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/apply-flavor/apply-flavor.component.html","../../../../projects/yuuvis/app-invoice/extensions/src/lib/invoice.schema.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/apply-create-flavor/apply-create-flavor.component.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/apply-create-flavor/apply-create-flavor.component.html","../../../../projects/yuuvis/app-invoice/extensions/src/lib/invoice.flavor.create.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/services/extensions.service.ts","../../../../projects/yuuvis/app-invoice/extensions/src/yuuvis-app-invoice-extensions.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { TranslateService } from '@ngx-translate/core';\nimport { DmsObject } from '@yuuvis/client-core';\nimport {\n AbstractContextAction,\n Action,\n ActionSupport,\n SelectionRange,\n} from '@yuuvis/client-framework/actions';\nimport { ShellService } from '@yuuvis/client-shell-core';\nimport { Observable, of } from 'rxjs';\n\nexport class OpenEmailAction extends AbstractContextAction implements Action {\n private translate = inject(TranslateService);\n private router = inject(Router);\n #shell = inject(ShellService);\n\n id = 'app.invoice.open-email';\n label = this.translate.instant('yuv.app.invoice.action.open-email.label');\n description = this.translate.instant(\n 'yuv.app.invoice.action.open-email.description'\n );\n priority = 3;\n icon = 'mail';\n group = 'common';\n range = SelectionRange.SINGLE_SELECT;\n supports: ActionSupport = {};\n\n #app = this.#shell.getApp('io.yuuvis.app.drive');\n\n isExecutable(selection: DmsObject[]) {\n const o = selection[0];\n return of(\n o &&\n o.sots.includes('appSysteminvoice:invoice') &&\n !!o.data['appClassifypro:emailReference']\n );\n }\n\n run(selection: DmsObject[]): Observable<boolean> {\n const o = selection[0];\n const emailReference = o.data['appClassifypro:emailReference'];\n this.router.navigateByUrl(\n `/${this.#app ? this.#app.path : 'drive'}/object/${emailReference}`\n );\n return of(true);\n }\n}\n","import { inject, Injectable, Signal, signal } from '@angular/core';\nimport { PredictionExtractResult, PredictionExtractResultItem, PredictionService } from '@yuuvis/client-core';\nimport { Observable, tap } from 'rxjs';\n\n@Injectable()\nexport class ApplyFlavorService {\n #predict = inject(PredictionService);\n\n #extractedDataSource = signal<Record<string, PredictionExtractResultItem[]> | null>(null);\n extractedData: Signal<Record<string, PredictionExtractResultItem[]> | null> = this.#extractedDataSource.asReadonly();\n\n extract(schemaObjectTypeId: string, objectID: string): Observable<any> {\n return this.#predict\n .extract(schemaObjectTypeId, [objectID])\n .pipe(tap((res: Record<string, PredictionExtractResult>) => this.#extractedDataSource.set(res[objectID].properties)));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, DestroyRef, effect, ElementRef, inject, OnInit, signal, TemplateRef, untracked } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport {PredictionExtractResultItem, SystemService, TranslateModule} from '@yuuvis/client-core';\nimport { ObjectFormElementExtension } from '@yuuvis/client-framework/object-form';\nimport { ApplyFlavorService } from '../../../services/apply-flavor.service';\n\n/**\n * This object form field extension inserts AI-extracted values into an\n * object-form. Once the AI service has extracted a value, this extension\n * will change the form field to display the extracted value and show the\n * value for the probability of the extraction right next to the field.\n *\n * If there are multiple extractions, the extension will insert the value\n * with the highest probability and provide a picker for the other values.\n *\n * This way the user can easily accept the extracted value or choose a\n * different one from the list of extracted values.\n */\n@Component({\n selector: 'yin-ai-extracted-property',\n standalone: true,\n imports: [CommonModule, MatMenuModule, MatIconModule, TranslateModule],\n templateUrl: './ai-extracted-property.component.html',\n styleUrl: './ai-extracted-property.component.scss'\n})\nexport class AiExtractedPropertyComponent extends ObjectFormElementExtension implements OnInit {\n #applyFlavorService = inject(ApplyFlavorService);\n #destroyRef = inject(DestroyRef);\n #system = inject(SystemService);\n #elRef = inject(ElementRef);\n\n predictionValues: PredictionExtractResultItem[] = [];\n currentValueProbability = signal<number | undefined>(undefined);\n #currentValueProbabilityEffect = effect(() => {\n const cp = this.currentValueProbability();\n if (!cp) return;\n // set the probability color\n const color = cp < 30 ? '--ymt-danger' : cp < 60 ? '--ymt-warning' : '--ymt-success';\n (this.#elRef.nativeElement as HTMLElement).style.setProperty('--current-value-probability-color', `var(${color})`);\n });\n\n extractedData = this.#applyFlavorService.extractedData;\n extractedDataEffect = effect(() => {\n const extData = this.extractedData();\n if (extData) {\n untracked(() => {\n const fcn = this.input().formControlName;\n this.predictionValues = extData[fcn] || [];\n this.#applyPredictionValues();\n });\n }\n });\n\n #internalFieldType?: string;\n\n #applyPredictionValues() {\n // set the value of the form field to the extracted value with\n // the highest probability\n const pv = this.predictionValues;\n if (pv.length) {\n pv.sort((a, b) => b.probability - a.probability);\n this.selectOption(pv[0]);\n } else {\n this.currentValueProbability.set(undefined);\n }\n }\n\n // map extracted string to a proper format to be used\n // within the form elements\n #mapValueToType(value: any): unknown {\n if (this.#internalFieldType === 'datetime') {\n // dates will always be returned as german formatted strings (24.12.2024)\n // no matter what the locale of the processed document is. So we need to\n // convert the string to a proper date object\n const dateParts = value.split('.');\n return dateParts.length === 3 ? new Date(+dateParts[2], +dateParts[1] - 1, +dateParts[0]) : value;\n } else {\n return value;\n }\n }\n\n selectOptionByIndex(idx: number) {\n this.selectOption(this.predictionValues[idx]);\n }\n\n selectOption(pr: PredictionExtractResultItem) {\n this.setValue(this.#mapValueToType(pr.value));\n this.currentValueProbability.set(pr.probability);\n }\n\n ngOnInit() {\n this.#internalFieldType = this.#system.getObjectTypeField(this.input().formControlName)?._internalType;\n }\n}\n","@if (predictionValues.length === 1) {\n <span class=\"probability\">\n <mat-icon class=\"ymt-icon--size-s\">robot_2</mat-icon>\n {{ 'yuv.app.invoice.ai.probability' | translate: { probability: currentValueProbability() } }}\n </span\n >\n} @else if (predictionValues.length > 1) {\n <button class=\"probability\" [matMenuTriggerFor]=\"menu\">\n <!-- (click)=\"openValueOptions(options, $event)\"> -->\n <mat-icon class=\"ymt-icon--size-s\">robot_2</mat-icon>\n {{ 'yuv.app.invoice.ai.probability' | translate: { probability: currentValueProbability() } }}\n <mat-icon class=\"ymt-icon--size-s\">arrow_drop_down</mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n @for (pv of predictionValues; track $index) {\n <button mat-menu-item (click)=\"selectOptionByIndex($index)\">{{ pv.value }\n <span>{{ 'yuv.app.invoice.ai.probability' | translate: { probability: pv.probability } }}</span>\n </button>\n }\n </mat-menu>\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, effect, inject, signal, untracked, viewChild } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { Situation, SystemService, TranslateModule, TranslateService, UserService } from '@yuuvis/client-core';\nimport { BusyOverlayDirective, DialogComponent } from '@yuuvis/client-framework/common';\nimport { AbstractApplyObjectFlavorComponent } from '@yuuvis/client-framework/object-flavor';\nimport { FormStatusChangedEvent, IObjectFormElementExtension, ObjectFormComponent, ObjectFormOptions } from '@yuuvis/client-framework/object-form';\nimport { ObjectPreviewComponent } from '@yuuvis/client-framework/object-preview';\nimport { YuvSplitViewModule } from '@yuuvis/client-framework/split-view';\nimport { ObjectFlavor, ShellService } from '@yuuvis/client-shell-core';\nimport { finalize } from 'rxjs';\nimport { ApplyFlavorService } from '../../services/apply-flavor.service';\nimport { AiExtractedPropertyComponent } from '../form-extensions/ai-extracted-property/ai-extracted-property.component';\nimport { YmtButtonDirective } from '@yuuvis/material';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatIconModule } from '@angular/material/icon';\n\nconst COMPONENTS = [\n YuvSplitViewModule,\n TranslateModule,\n BusyOverlayDirective,\n ObjectFormComponent,\n ObjectPreviewComponent,\n DialogComponent,\n YmtButtonDirective\n];\nconst MATERIAL = [MatButtonModule, MatDialogModule, MatTooltipModule];\n\n@Component({\n selector: 'yin-apply-flavor',\n standalone: true,\n providers: [ApplyFlavorService],\n imports: [CommonModule, ...COMPONENTS, ...MATERIAL, MatIconModule],\n templateUrl: './apply-flavor.component.html',\n styleUrl: './apply-flavor.component.scss'\n})\nexport class ApplyFlavorComponent extends AbstractApplyObjectFlavorComponent {\n #system = inject(SystemService);\n #shell = inject(ShellService);\n #applyFlavorService = inject(ApplyFlavorService);\n private translate = inject(TranslateService);\n private userService = inject(UserService);\n\n objectForm = viewChild(ObjectFormComponent);\n flavorLabel = computed(() => this.#shell.getFlavorLabel(this.flavor().id));\n #flavorEffect = effect(() => {\n const f = this.flavor();\n untracked(() => {\n if (f) this.#loadForm(f);\n });\n });\n #dmsObjectEffect = effect(() => {\n const o = this.dmsObject();\n untracked(() => {\n this.supportsExtraction.set(!!o.content && o.content.mimeType === 'application/pdf'\n && this.userService.getCurrentUser().authorities.includes('YUUVIS_AI_PREDICT'));\n });\n });\n\n error = signal<boolean>(false);\n\n applyDisabled = signal<boolean>(true);\n supportsExtraction = signal<boolean>(true);\n busyLoading = signal<boolean>(false);\n busySaving = signal<boolean>(false);\n busyExtracting = signal<boolean>(false);\n formOptions = signal<ObjectFormOptions | null>(null);\n extensions = signal<IObjectFormElementExtension[]>([]);\n immediateExtract = (this.data() && this.data().immediateExtract) || false;\n headline?: string = this.data() && this.data().headline;\n\n #loadForm(f: ObjectFlavor) {\n this.busyLoading.set(true);\n\n if (this.userService.getCurrentUser().authorities.includes('YUUVIS_AI_PREDICT')) {\n const sot = this.#system.getSecondaryObjectType(f.sot);\n this.extensions.set(\n (sot?.fields || []).map((field) => ({\n property: field.id,\n cmp: AiExtractedPropertyComponent\n }))\n );\n }\n\n this.#system\n .getObjectTypeForm(f.sot, Situation.EDIT)\n .pipe(finalize(() => this.busyLoading.set(false)))\n .subscribe({\n next: (form) => {\n this.formOptions.set({\n formModel: form,\n data: {}\n });\n }\n });\n }\n\n extract() {\n this.busyExtracting.set(true);\n this.#applyFlavorService\n .extract(this.flavor().sot, this.dmsObject().id)\n .pipe(finalize(() => this.busyExtracting.set(false)))\n .subscribe({\n next: () => {\n this.error.set(false);\n },\n error: () => {\n this.error.set(true);\n }\n });\n }\n\n onFormStatusChanged(status: FormStatusChangedEvent) {\n this.applyDisabled.set(status.invalid);\n }\n\n applyFlavor() {\n const of = this.objectForm();\n const data: Record<string, unknown> = of ? of.getFormData() : {};\n this.busySaving.set(true);\n this.#shell\n .applyObjectFlavor(this.dmsObject(), this.flavor(), data)\n .pipe(finalize(() => this.busySaving.set(false)))\n .subscribe({\n next: () => this.close()\n // TODO: handle error\n });\n }\n\n close() {\n this.dialogRef.close();\n }\n}\n","<yuv-dialog [headertitel]=\"headline || ('yuv.app.invoice.apply-flavor.headline' | translate: { name: flavorLabel() })\">\n <main>\n <yuv-split-view [gutterSize]=\"1\">\n <ng-template yuvSplitArea [size]=\"60\">\n @if (dmsObject() && dmsObject().content) {\n <yuv-object-preview [objectId]=\"dmsObject().id\"></yuv-object-preview>\n }\n </ng-template>\n\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"metadata\" [yuvBusyOverlay]=\"busyLoading()\">\n <div class=\"ai\">\n @if (supportsExtraction()) {\n @if (error()) {\n <mat-icon class=\"warning\" [matTooltip]=\"'yuv.app.invoice.apply-flavor.button.extract.error' | translate\">warning</mat-icon>\n }\n @if (busyExtracting()) {\n <div class=\"spinner\"></div>\n }\n <button ymtButton=\"secondary\" class=\"ai-extract\" [ngClass]=\"{ spinning: busyExtracting() }\" (click)=\"extract()\">\n <mat-icon>robot_2</mat-icon>\n {{ 'yuv.app.invoice.apply-flavor.button.extract' | translate }}\n </button>\n }\n </div>\n\n @let fo = formOptions();\n @if (fo) {\n <yuv-object-form\n [elementExtensions]=\"extensions()\"\n [inert]=\"busySaving() || busyExtracting()\"\n [formOptions]=\"fo\"\n (statusChanged)=\"onFormStatusChanged($event)\"\n ></yuv-object-form>\n }\n </div>\n </ng-template>\n </yuv-split-view>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" mat-dialog-close [disabled]=\"busySaving() || busyExtracting()\">\n {{ 'yuv.app.invoice.apply-flavor.button.cancel' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n mat-dialog-close\n cdkFocusInitial\n class=\"primary\"\n [ngClass]=\"{ spinning: busySaving() }\"\n [disabled]=\"applyDisabled() || busyExtracting()\"\n (click)=\"applyFlavor()\"\n >\n {{ 'yuv.app.invoice.apply-flavor.button.apply' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n","import { marker } from '@colsen1991/ngx-translate-extract-marker';\nimport { SystemType } from '@yuuvis/client-core';\nimport { AppFlavor } from '@yuuvis/client-shell-core';\nimport { ApplyFlavorComponent } from './components/apply-flavor/apply-flavor.component';\n\n// use marker to extract the labels for the app schema types\n// make sure to provide a marker for each type/flavor ID\nmarker('io.yuuvis.app.invoice.flavor.invoice');\nmarker('io.yuuvis.app.invoice.flavor.invoice.description');\n\nexport const APP_ROLE = 'YM_APP_INVOICE';\nexport const APP_PREFIX = 'appSysteminvoice:';\nexport const APP_CLASSIFY_PRO_PREFIX = 'appClassifypro:';\nexport const APP_ID = 'io.yuuvis.app.invoice';\nexport const RETENTION_PERIOD = 10;\n\nexport const APP_FLAVORS: AppFlavor[] = [\n {\n id: 'io.yuuvis.app.invoice.flavor.invoice',\n descriptionKey: 'io.yuuvis.app.invoice.flavor.invoice.description',\n icon: 'local_atm',\n objectTypeID: SystemType.DOCUMENT,\n sot: `${APP_PREFIX}invoice`,\n applicableTo: {\n mimeTypes: ['*/*']\n },\n applyComponent: ApplyFlavorComponent\n },\n {\n id: 'io.yuuvis.app.invoice.flavor.sotFolderClassifypro',\n descriptionKey: 'io.yuuvis.app.invoice.flavor.sotFolderClassifypro.description',\n icon: 'extension',\n objectTypeID: SystemType.FOLDER,\n sot: `${APP_CLASSIFY_PRO_PREFIX}sotFolderClassifypro`,\n applicableTo: {\n mimeTypes: ['*/*']\n },\n preventRemove: true,\n preventApply: true\n },\n {\n id: 'io.yuuvis.app.invoice.flavor.sotInvClassifypro',\n descriptionKey: 'io.yuuvis.app.invoice.flavor.sotInvClassifypro.description',\n icon: 'extension',\n objectTypeID: SystemType.DOCUMENT,\n sot: `${APP_CLASSIFY_PRO_PREFIX}sotInvClassifypro`,\n applicableTo: {\n mimeTypes: ['*/*']\n },\n preventRemove: true,\n preventApply: true\n }\n];\n","import { CommonModule } from '@angular/common';\nimport { Component, effect, inject, Type, untracked } from '@angular/core';\nimport { DmsService } from '@yuuvis/client-core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { APP_FLAVORS } from '../../invoice.schema';\nimport { AbstractApplyCreateFlavorComponent } from '@yuuvis/client-framework/object-flavor';\n\n@Component({\n selector: 'yin-apply-create-flavor',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './apply-create-flavor.component.html',\n styleUrl: './apply-create-flavor.component.scss'\n})\nexport class ApplyCreateFlavorComponent extends AbstractApplyCreateFlavorComponent {\n #dms = inject(DmsService);\n readonly #dialogRef = inject(MatDialogRef<ApplyCreateFlavorComponent>);\n\n #dataEffect = effect(() => {\n untracked(() => {\n this.#setupApplyComponent();\n });\n });\n\n sc?: { cmp: Type<any>; inputs: any };\n\n #setupApplyComponent() {\n const flavor = APP_FLAVORS.find((f) => f.id === 'io.yuuvis.app.invoice.flavor.invoice')!\n\n this.#dms.getDmsObject(this.createdObjectIDs()[0]).subscribe((dmsObject) => {\n this.sc = {\n inputs: {\n dmsObject,\n flavor: flavor\n },\n cmp: flavor.applyComponent!\n };\n\n if (dmsObject.content?.mimeType === 'application/x-os-invoice-xml') {\n this.#dialogRef.close();\n }\n });\n }\n}\n\n","@if (sc && sc.cmp) {\n <ng-container *ngComponentOutlet=\"sc.cmp; inputs: sc.inputs\"></ng-container>\n}\n","import { ObjectCreateFlavor } from \"@yuuvis/client-core\";\nimport { APP_PREFIX } from \"./invoice.schema\";\nimport { ApplyCreateFlavorComponent } from './components/apply-create-flavor/apply-create-flavor.component';\n\nexport const APP_CREATE_FLAVORS: ObjectCreateFlavor[] = [\n {\n id: 'io.yuuvis.app.invoice.flavor.invoice',\n descriptionKey: 'io.yuuvis.app.invoice.flavor.invoice.description',\n icon: 'local_atm',\n withFileUpload: {\n applicableTo: {\n mimeTypes: ['application/pdf']\n }\n },\n sot: `${APP_PREFIX}invoice`,\n applyComponent: ApplyCreateFlavorComponent\n }\n];\n","import { Injectable, inject } from '@angular/core';\nimport { ActionsService } from '@yuuvis/client-framework/actions';\nimport { ClientShellExtension, ShellService } from '@yuuvis/client-shell-core';\nimport { OpenEmailAction } from '../actions/open-email/open-email.action';\nimport { InvoiceRetentionAction } from '../actions/retention/retention.action';\nimport { APP_CREATE_FLAVORS } from '../invoice.flavor.create';\nimport { APP_FLAVORS } from '../invoice.schema';\n\n@Injectable()\nexport class AppInvoiceExtension implements ClientShellExtension {\n #shell = inject(ShellService);\n #actionsService = inject(ActionsService);\n\n #actions = [\n //{ id: 'app.invoice.retention', action: InvoiceRetentionAction },\n { id: 'app.invoice.open-email', action: OpenEmailAction },\n ];\n\n init(): Promise<any> {\n this.#enableExtension();\n return Promise.resolve();\n }\n\n #enableExtension() {\n // expose flavors\n this.#shell.exposeObjectFlavors(APP_FLAVORS);\n this.#shell.exposeObjectCreateFlavors(APP_CREATE_FLAVORS);\n // register actions\n this.#actionsService.registerActions(this.#actions);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TranslateService","i1","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaM,MAAO,eAAgB,SAAQ,qBAAqB,CAAA;AAChD,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACpC,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/B,IAAA,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;IAE7B,EAAE,GAAG,wBAAwB;IAC7B,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,yCAAyC,CAAC;IACzE,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAClC,+CAA+C,CAChD;IACD,QAAQ,GAAG,CAAC;IACZ,IAAI,GAAG,MAAM;IACb,KAAK,GAAG,QAAQ;AAChB,IAAA,KAAK,GAAG,cAAc,CAAC,aAAa;IACpC,QAAQ,GAAkB,EAAE;IAE5B,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC;AAEhD,IAAA,YAAY,CAAC,SAAsB,EAAA;AACjC,QAAA,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;QACtB,OAAO,EAAE,CACP,CAAC;AACC,YAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,0BAA0B,CAAC;YAC3C,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAC5C;;AAGH,IAAA,GAAG,CAAC,SAAsB,EAAA;AACxB,QAAA,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;QACtB,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,+BAA+B,CAAC;QAC9D,IAAI,CAAC,MAAM,CAAC,aAAa,CACvB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAW,QAAA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kDAAkD;AAClE,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,cAAc,EAAE;AACd,YAAA,YAAY,EAAE;gBACZ,SAAS,EAAE,CAAC,iBAAiB;AAC9B;AACF,SAAA;QACD,GAAG,EAAE,CAAG,EAAA,UAAU,CAAS,OAAA,CAAA;AAC3B,QAAA,cAAc,EAAE;AACjB;CACF;;MCRY,mBAAmB,CAAA;AAC9B,IAAA,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;AAC7B,IAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;AAExC,IAAA,QAAQ,GAAG;;AAET,QAAA,EAAE,EAAE,EAAE,wBAAwB,EAAE,MAAM,EAAE,eAAe,EAAE;KAC1D;IAED,IAAI,GAAA;QACF,IAAI,CAAC,gBAAgB,EAAE;AACvB,QAAA,OAAO,OAAO,CAAC,OAAO,EAAE;;IAG1B,gBAAgB,GAAA;;AAEd,QAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC;AAC5C,QAAA,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;;QAEzD,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC;;wGAnB1C,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;4GAAnB,mBAAmB,EAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"yuuvis-app-invoice-extensions.mjs","sources":["../../../../projects/yuuvis/app-invoice/extensions/src/lib/actions/open-email/open-email.action.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/services/apply-flavor.service.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/form-extensions/ai-extracted-property/ai-extracted-property.component.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/form-extensions/ai-extracted-property/ai-extracted-property.component.html","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/apply-flavor/apply-flavor.component.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/apply-flavor/apply-flavor.component.html","../../../../projects/yuuvis/app-invoice/extensions/src/lib/invoice.schema.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/apply-create-flavor/apply-create-flavor.component.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/components/apply-create-flavor/apply-create-flavor.component.html","../../../../projects/yuuvis/app-invoice/extensions/src/lib/invoice.flavor.create.ts","../../../../projects/yuuvis/app-invoice/extensions/src/lib/services/extensions.service.ts","../../../../projects/yuuvis/app-invoice/extensions/src/yuuvis-app-invoice-extensions.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { TranslateService } from '@ngx-translate/core';\nimport { DmsObject } from '@yuuvis/client-core';\nimport {\n AbstractContextAction,\n Action,\n ActionSupport,\n SelectionRange,\n} from '@yuuvis/client-framework/actions';\nimport { ShellService } from '@yuuvis/client-shell-core';\nimport { Observable, of } from 'rxjs';\n\nexport class OpenEmailAction extends AbstractContextAction implements Action {\n private translate = inject(TranslateService);\n private router = inject(Router);\n #shell = inject(ShellService);\n\n id = 'app.invoice.open-email';\n label = this.translate.instant('yuv.app.invoice.action.open-email.label');\n description = this.translate.instant(\n 'yuv.app.invoice.action.open-email.description'\n );\n priority = 3;\n icon = 'mail';\n group = 'common';\n range = SelectionRange.SINGLE_SELECT;\n supports: ActionSupport = {};\n\n #app = this.#shell.getApp('io.yuuvis.app.drive');\n\n isExecutable(selection: DmsObject[]) {\n const o = selection[0];\n return of(\n o &&\n o.sots.includes('appSysteminvoice:invoice') &&\n !!o.data['appClassifypro:emailReference']\n );\n }\n\n run(selection: DmsObject[]): Observable<boolean> {\n const o = selection[0];\n const emailReference = o.data['appClassifypro:emailReference'];\n this.router.navigateByUrl(\n `/${this.#app ? this.#app.path : 'drive'}/object/${emailReference}`\n );\n return of(true);\n }\n}\n","import { inject, Injectable, Signal, signal } from '@angular/core';\nimport { PredictionExtractResult, PredictionExtractResultItem, PredictionService } from '@yuuvis/client-core';\nimport { Observable, tap } from 'rxjs';\n\n@Injectable()\nexport class ApplyFlavorService {\n #predict = inject(PredictionService);\n\n #extractedDataSource = signal<Record<string, PredictionExtractResultItem[]> | null>(null);\n extractedData: Signal<Record<string, PredictionExtractResultItem[]> | null> = this.#extractedDataSource.asReadonly();\n\n extract(schemaObjectTypeId: string, objectID: string): Observable<any> {\n return this.#predict\n .extract(schemaObjectTypeId, [objectID])\n .pipe(tap((res: Record<string, PredictionExtractResult>) => this.#extractedDataSource.set(res[objectID].properties)));\n }\n}\n","\nimport { Component, DestroyRef, effect, ElementRef, inject, OnInit, signal, TemplateRef, untracked } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport {PredictionExtractResultItem, SystemService, TranslateModule} from '@yuuvis/client-core';\nimport { ObjectFormElementExtension } from '@yuuvis/client-framework/object-form';\nimport { ApplyFlavorService } from '../../../services/apply-flavor.service';\n\n/**\n * This object form field extension inserts AI-extracted values into an\n * object-form. Once the AI service has extracted a value, this extension\n * will change the form field to display the extracted value and show the\n * value for the probability of the extraction right next to the field.\n *\n * If there are multiple extractions, the extension will insert the value\n * with the highest probability and provide a picker for the other values.\n *\n * This way the user can easily accept the extracted value or choose a\n * different one from the list of extracted values.\n */\n@Component({\n selector: 'yin-ai-extracted-property',\n standalone: true,\n imports: [MatMenuModule, MatIconModule, TranslateModule],\n templateUrl: './ai-extracted-property.component.html',\n styleUrl: './ai-extracted-property.component.scss'\n})\nexport class AiExtractedPropertyComponent extends ObjectFormElementExtension implements OnInit {\n #applyFlavorService = inject(ApplyFlavorService);\n #destroyRef = inject(DestroyRef);\n #system = inject(SystemService);\n #elRef = inject(ElementRef);\n\n predictionValues: PredictionExtractResultItem[] = [];\n currentValueProbability = signal<number | undefined>(undefined);\n #currentValueProbabilityEffect = effect(() => {\n const cp = this.currentValueProbability();\n if (!cp) return;\n // set the probability color\n const color = cp < 30 ? '--ymt-danger' : cp < 60 ? '--ymt-warning' : '--ymt-success';\n (this.#elRef.nativeElement as HTMLElement).style.setProperty('--current-value-probability-color', `var(${color})`);\n });\n\n extractedData = this.#applyFlavorService.extractedData;\n extractedDataEffect = effect(() => {\n const extData = this.extractedData();\n if (extData) {\n untracked(() => {\n const fcn = this.input().formControlName;\n this.predictionValues = extData[fcn] || [];\n this.#applyPredictionValues();\n });\n }\n });\n\n #internalFieldType?: string;\n\n #applyPredictionValues() {\n // set the value of the form field to the extracted value with\n // the highest probability\n const pv = this.predictionValues;\n if (pv.length) {\n pv.sort((a, b) => b.probability - a.probability);\n this.selectOption(pv[0]);\n } else {\n this.currentValueProbability.set(undefined);\n }\n }\n\n // map extracted string to a proper format to be used\n // within the form elements\n #mapValueToType(value: any): unknown {\n if (this.#internalFieldType === 'datetime') {\n // dates will always be returned as german formatted strings (24.12.2024)\n // no matter what the locale of the processed document is. So we need to\n // convert the string to a proper date object\n const dateParts = value.split('.');\n return dateParts.length === 3 ? new Date(+dateParts[2], +dateParts[1] - 1, +dateParts[0]) : value;\n } else {\n return value;\n }\n }\n\n selectOptionByIndex(idx: number) {\n this.selectOption(this.predictionValues[idx]);\n }\n\n selectOption(pr: PredictionExtractResultItem) {\n this.setValue(this.#mapValueToType(pr.value));\n this.currentValueProbability.set(pr.probability);\n }\n\n ngOnInit() {\n this.#internalFieldType = this.#system.getObjectTypeField(this.input().formControlName)?._internalType;\n }\n}\n","@if (predictionValues.length === 1) {\n <span class=\"probability\">\n <mat-icon class=\"ymt-icon--size-s\">robot_2</mat-icon>\n {{ 'yuv.app.invoice.ai.probability' | translate: { probability: currentValueProbability() } }}\n </span\n >\n} @else if (predictionValues.length > 1) {\n <button class=\"probability\" [matMenuTriggerFor]=\"menu\">\n <!-- (click)=\"openValueOptions(options, $event)\"> -->\n <mat-icon class=\"ymt-icon--size-s\">robot_2</mat-icon>\n {{ 'yuv.app.invoice.ai.probability' | translate: { probability: currentValueProbability() } }}\n <mat-icon class=\"ymt-icon--size-s\">arrow_drop_down</mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n @for (pv of predictionValues; track $index) {\n <button mat-menu-item (click)=\"selectOptionByIndex($index)\">{{ pv.value }\n <span>{{ 'yuv.app.invoice.ai.probability' | translate: { probability: pv.probability } }}</span>\n </button>\n }\n </mat-menu>\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, effect, inject, signal, untracked, viewChild } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { Situation, SystemService, TranslateModule, TranslateService, UserService } from '@yuuvis/client-core';\nimport { BusyOverlayDirective, DialogComponent } from '@yuuvis/client-framework/common';\nimport { AbstractApplyObjectFlavorComponent } from '@yuuvis/client-framework/object-flavor';\nimport { FormStatusChangedEvent, IObjectFormElementExtension, ObjectFormComponent, ObjectFormOptions } from '@yuuvis/client-framework/object-form';\nimport { ObjectPreviewComponent } from '@yuuvis/client-framework/object-preview';\nimport { YuvSplitViewModule } from '@yuuvis/client-framework/split-view';\nimport { ObjectFlavor, ShellService } from '@yuuvis/client-shell-core';\nimport { finalize } from 'rxjs';\nimport { ApplyFlavorService } from '../../services/apply-flavor.service';\nimport { AiExtractedPropertyComponent } from '../form-extensions/ai-extracted-property/ai-extracted-property.component';\nimport { YmtButtonDirective } from '@yuuvis/material';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatIconModule } from '@angular/material/icon';\n\nconst COMPONENTS = [\n YuvSplitViewModule,\n TranslateModule,\n BusyOverlayDirective,\n ObjectFormComponent,\n ObjectPreviewComponent,\n DialogComponent,\n YmtButtonDirective\n];\nconst MATERIAL = [MatButtonModule, MatDialogModule, MatTooltipModule];\n\n@Component({\n selector: 'yin-apply-flavor',\n standalone: true,\n providers: [ApplyFlavorService],\n imports: [CommonModule, ...COMPONENTS, ...MATERIAL, MatIconModule],\n templateUrl: './apply-flavor.component.html',\n styleUrl: './apply-flavor.component.scss'\n})\nexport class ApplyFlavorComponent extends AbstractApplyObjectFlavorComponent {\n #system = inject(SystemService);\n #shell = inject(ShellService);\n #applyFlavorService = inject(ApplyFlavorService);\n private translate = inject(TranslateService);\n private userService = inject(UserService);\n\n objectForm = viewChild(ObjectFormComponent);\n flavorLabel = computed(() => this.#shell.getFlavorLabel(this.flavor().id));\n #flavorEffect = effect(() => {\n const f = this.flavor();\n untracked(() => {\n if (f) this.#loadForm(f);\n });\n });\n #dmsObjectEffect = effect(() => {\n const o = this.dmsObject();\n untracked(() => {\n this.supportsExtraction.set(!!o.content && o.content.mimeType === 'application/pdf'\n && this.userService.getCurrentUser().authorities.includes('YUUVIS_AI_PREDICT'));\n });\n });\n\n error = signal<boolean>(false);\n\n applyDisabled = signal<boolean>(true);\n supportsExtraction = signal<boolean>(true);\n busyLoading = signal<boolean>(false);\n busySaving = signal<boolean>(false);\n busyExtracting = signal<boolean>(false);\n formOptions = signal<ObjectFormOptions | null>(null);\n extensions = signal<IObjectFormElementExtension[]>([]);\n immediateExtract = (this.data() && this.data().immediateExtract) || false;\n headline?: string = this.data() && this.data().headline;\n\n #loadForm(f: ObjectFlavor) {\n this.busyLoading.set(true);\n\n if (this.userService.getCurrentUser().authorities.includes('YUUVIS_AI_PREDICT')) {\n const sot = this.#system.getSecondaryObjectType(f.sot);\n this.extensions.set(\n (sot?.fields || []).map((field) => ({\n property: field.id,\n cmp: AiExtractedPropertyComponent\n }))\n );\n }\n\n this.#system\n .getObjectTypeForm(f.sot, Situation.EDIT)\n .pipe(finalize(() => this.busyLoading.set(false)))\n .subscribe({\n next: (form) => {\n this.formOptions.set({\n formModel: form,\n data: {}\n });\n }\n });\n }\n\n extract() {\n this.busyExtracting.set(true);\n this.#applyFlavorService\n .extract(this.flavor().sot, this.dmsObject().id)\n .pipe(finalize(() => this.busyExtracting.set(false)))\n .subscribe({\n next: () => {\n this.error.set(false);\n },\n error: () => {\n this.error.set(true);\n }\n });\n }\n\n onFormStatusChanged(status: FormStatusChangedEvent) {\n this.applyDisabled.set(status.invalid);\n }\n\n applyFlavor() {\n const of = this.objectForm();\n const data: Record<string, unknown> = of ? of.getFormData() : {};\n this.busySaving.set(true);\n this.#shell\n .applyObjectFlavor(this.dmsObject(), this.flavor(), data)\n .pipe(finalize(() => this.busySaving.set(false)))\n .subscribe({\n next: () => this.close()\n // TODO: handle error\n });\n }\n\n close() {\n this.dialogRef.close();\n }\n}\n","<yuv-dialog [headertitel]=\"headline || ('yuv.app.invoice.apply-flavor.headline' | translate: { name: flavorLabel() })\">\n <main>\n <yuv-split-view [gutterSize]=\"1\">\n <ng-template yuvSplitArea [size]=\"60\">\n @if (dmsObject() && dmsObject().content) {\n <yuv-object-preview [objectId]=\"dmsObject().id\"></yuv-object-preview>\n }\n </ng-template>\n\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"metadata\" [yuvBusyOverlay]=\"busyLoading()\">\n <div class=\"ai\">\n @if (supportsExtraction()) {\n @if (error()) {\n <mat-icon class=\"warning\" [matTooltip]=\"'yuv.app.invoice.apply-flavor.button.extract.error' | translate\">warning</mat-icon>\n }\n @if (busyExtracting()) {\n <div class=\"spinner\"></div>\n }\n <button ymtButton=\"secondary\" class=\"ai-extract\" [ngClass]=\"{ spinning: busyExtracting() }\" (click)=\"extract()\">\n <mat-icon>robot_2</mat-icon>\n {{ 'yuv.app.invoice.apply-flavor.button.extract' | translate }}\n </button>\n }\n </div>\n\n @let fo = formOptions();\n @if (fo) {\n <yuv-object-form\n [elementExtensions]=\"extensions()\"\n [inert]=\"busySaving() || busyExtracting()\"\n [formOptions]=\"fo\"\n (statusChanged)=\"onFormStatusChanged($event)\"\n ></yuv-object-form>\n }\n </div>\n </ng-template>\n </yuv-split-view>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" mat-dialog-close [disabled]=\"busySaving() || busyExtracting()\">\n {{ 'yuv.app.invoice.apply-flavor.button.cancel' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n mat-dialog-close\n cdkFocusInitial\n class=\"primary\"\n [ngClass]=\"{ spinning: busySaving() }\"\n [disabled]=\"applyDisabled() || busyExtracting()\"\n (click)=\"applyFlavor()\"\n >\n {{ 'yuv.app.invoice.apply-flavor.button.apply' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n","import { marker } from '@colsen1991/ngx-translate-extract-marker';\nimport { SystemType } from '@yuuvis/client-core';\nimport { AppFlavor } from '@yuuvis/client-shell-core';\nimport { ApplyFlavorComponent } from './components/apply-flavor/apply-flavor.component';\n\n// use marker to extract the labels for the app schema types\n// make sure to provide a marker for each type/flavor ID\nmarker('io.yuuvis.app.invoice.flavor.invoice');\nmarker('io.yuuvis.app.invoice.flavor.invoice.description');\n\nexport const APP_ROLE = 'YM_APP_INVOICE';\nexport const APP_PREFIX = 'appSysteminvoice:';\nexport const APP_CLASSIFY_PRO_PREFIX = 'appClassifypro:';\nexport const APP_ID = 'io.yuuvis.app.invoice';\nexport const RETENTION_PERIOD = 10;\n\nexport const APP_FLAVORS: AppFlavor[] = [\n {\n id: 'io.yuuvis.app.invoice.flavor.invoice',\n descriptionKey: 'io.yuuvis.app.invoice.flavor.invoice.description',\n icon: 'local_atm',\n objectTypeID: SystemType.DOCUMENT,\n sot: `${APP_PREFIX}invoice`,\n applicableTo: {\n mimeTypes: ['*/*']\n },\n applyComponent: ApplyFlavorComponent\n },\n {\n id: 'io.yuuvis.app.invoice.flavor.sotFolderClassifypro',\n descriptionKey: 'io.yuuvis.app.invoice.flavor.sotFolderClassifypro.description',\n icon: 'extension',\n objectTypeID: SystemType.FOLDER,\n sot: `${APP_CLASSIFY_PRO_PREFIX}sotFolderClassifypro`,\n applicableTo: {\n mimeTypes: ['*/*']\n },\n preventRemove: true,\n preventApply: true\n },\n {\n id: 'io.yuuvis.app.invoice.flavor.sotInvClassifypro',\n descriptionKey: 'io.yuuvis.app.invoice.flavor.sotInvClassifypro.description',\n icon: 'extension',\n objectTypeID: SystemType.DOCUMENT,\n sot: `${APP_CLASSIFY_PRO_PREFIX}sotInvClassifypro`,\n applicableTo: {\n mimeTypes: ['*/*']\n },\n preventRemove: true,\n preventApply: true\n }\n];\n","import { CommonModule } from '@angular/common';\nimport { Component, effect, inject, Type, untracked } from '@angular/core';\nimport { DmsService } from '@yuuvis/client-core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { APP_FLAVORS } from '../../invoice.schema';\nimport { AbstractApplyCreateFlavorComponent } from '@yuuvis/client-framework/object-flavor';\n\n@Component({\n selector: 'yin-apply-create-flavor',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './apply-create-flavor.component.html',\n styleUrl: './apply-create-flavor.component.scss'\n})\nexport class ApplyCreateFlavorComponent extends AbstractApplyCreateFlavorComponent {\n #dms = inject(DmsService);\n readonly #dialogRef = inject(MatDialogRef<ApplyCreateFlavorComponent>);\n\n #dataEffect = effect(() => {\n untracked(() => {\n this.#setupApplyComponent();\n });\n });\n\n sc?: { cmp: Type<any>; inputs: any };\n\n #setupApplyComponent() {\n const flavor = APP_FLAVORS.find((f) => f.id === 'io.yuuvis.app.invoice.flavor.invoice')!\n\n this.#dms.getDmsObject(this.createdObjectIDs()[0]).subscribe((dmsObject) => {\n this.sc = {\n inputs: {\n dmsObject,\n flavor: flavor\n },\n cmp: flavor.applyComponent!\n };\n\n if (dmsObject.content?.mimeType === 'application/x-os-invoice-xml') {\n this.#dialogRef.close();\n }\n });\n }\n}\n\n","@if (sc && sc.cmp) {\n <ng-container *ngComponentOutlet=\"sc.cmp; inputs: sc.inputs\"></ng-container>\n}\n","import { ObjectCreateFlavor } from \"@yuuvis/client-core\";\nimport { APP_PREFIX } from \"./invoice.schema\";\nimport { ApplyCreateFlavorComponent } from './components/apply-create-flavor/apply-create-flavor.component';\n\nexport const APP_CREATE_FLAVORS: ObjectCreateFlavor[] = [\n {\n id: 'io.yuuvis.app.invoice.flavor.invoice',\n descriptionKey: 'io.yuuvis.app.invoice.flavor.invoice.description',\n icon: 'local_atm',\n withFileUpload: {\n applicableTo: {\n mimeTypes: ['application/pdf']\n }\n },\n sot: `${APP_PREFIX}invoice`,\n applyComponent: ApplyCreateFlavorComponent\n }\n];\n","import { Injectable, inject } from '@angular/core';\nimport { ActionsService } from '@yuuvis/client-framework/actions';\nimport { ClientShellExtension, ShellService } from '@yuuvis/client-shell-core';\nimport { OpenEmailAction } from '../actions/open-email/open-email.action';\nimport { InvoiceRetentionAction } from '../actions/retention/retention.action';\nimport { APP_CREATE_FLAVORS } from '../invoice.flavor.create';\nimport { APP_FLAVORS } from '../invoice.schema';\n\n@Injectable()\nexport class AppInvoiceExtension implements ClientShellExtension {\n #shell = inject(ShellService);\n #actionsService = inject(ActionsService);\n\n #actions = [\n //{ id: 'app.invoice.retention', action: InvoiceRetentionAction },\n { id: 'app.invoice.open-email', action: OpenEmailAction },\n ];\n\n init(): Promise<any> {\n this.#enableExtension();\n return Promise.resolve();\n }\n\n #enableExtension() {\n // expose flavors\n this.#shell.exposeObjectFlavors(APP_FLAVORS);\n this.#shell.exposeObjectCreateFlavors(APP_CREATE_FLAVORS);\n // register actions\n this.#actionsService.registerActions(this.#actions);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TranslateService","i1","i3","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaM,MAAO,eAAgB,SAAQ,qBAAqB,CAAA;AAChD,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACpC,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/B,IAAA,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;IAE7B,EAAE,GAAG,wBAAwB;IAC7B,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,yCAAyC,CAAC;IACzE,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAClC,+CAA+C,CAChD;IACD,QAAQ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AAO,CAAC,OAAO,EAAE;IAC1B;IAEA,gBAAgB,GAAA;;AAEd,QAAA,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC;AAC5C,QAAA,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;;QAEzD,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC;IACrD;wGApBW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;4GAAnB,mBAAmB,EAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;;ACRD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuuvis/app-invoice",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"author": "OPTIMAL SYSTEMS GmbH <npm@optimal-systems.de>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@angular/common": "^
|
|
8
|
-
"@angular/core": "^
|
|
9
|
-
"@yuuvis/client-shell": "^
|
|
10
|
-
"@yuuvis/material": "^
|
|
7
|
+
"@angular/common": "^21.2.11",
|
|
8
|
+
"@angular/core": "^21.2.11",
|
|
9
|
+
"@yuuvis/client-shell": "^3.0.0",
|
|
10
|
+
"@yuuvis/material": "^3.0.0"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"tslib": "^2.3.0"
|
|
14
14
|
},
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"module": "fesm2022/yuuvis-app-invoice.mjs",
|
|
17
|
-
"typings": "
|
|
17
|
+
"typings": "types/yuuvis-app-invoice.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
"./package.json": {
|
|
20
20
|
"default": "./package.json"
|
|
21
21
|
},
|
|
22
22
|
".": {
|
|
23
|
-
"types": "./
|
|
23
|
+
"types": "./types/yuuvis-app-invoice.d.ts",
|
|
24
24
|
"default": "./fesm2022/yuuvis-app-invoice.mjs"
|
|
25
25
|
},
|
|
26
26
|
"./extensions": {
|
|
27
|
-
"types": "./extensions
|
|
27
|
+
"types": "./types/yuuvis-app-invoice-extensions.d.ts",
|
|
28
28
|
"default": "./fesm2022/yuuvis-app-invoice-extensions.mjs"
|
|
29
29
|
}
|
|
30
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"type": "module"
|
|
31
32
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ClientShellExtension } from '@yuuvis/client-shell-core';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { OnInit, Type } from '@angular/core';
|
|
4
|
+
import { AbstractApplyObjectFlavorComponent, AbstractApplyCreateFlavorComponent } from '@yuuvis/client-framework/object-flavor';
|
|
5
|
+
import { ObjectFormComponent, ObjectFormOptions, IObjectFormElementExtension, FormStatusChangedEvent, ObjectFormElementExtension } from '@yuuvis/client-framework/object-form';
|
|
6
|
+
import { PredictionExtractResultItem } from '@yuuvis/client-core';
|
|
7
|
+
|
|
8
|
+
declare class AppInvoiceExtension implements ClientShellExtension {
|
|
9
|
+
#private;
|
|
10
|
+
init(): Promise<any>;
|
|
11
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppInvoiceExtension, never>;
|
|
12
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppInvoiceExtension>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class ApplyFlavorComponent extends AbstractApplyObjectFlavorComponent {
|
|
16
|
+
#private;
|
|
17
|
+
private translate;
|
|
18
|
+
private userService;
|
|
19
|
+
objectForm: _angular_core.Signal<ObjectFormComponent | undefined>;
|
|
20
|
+
flavorLabel: _angular_core.Signal<any>;
|
|
21
|
+
error: _angular_core.WritableSignal<boolean>;
|
|
22
|
+
applyDisabled: _angular_core.WritableSignal<boolean>;
|
|
23
|
+
supportsExtraction: _angular_core.WritableSignal<boolean>;
|
|
24
|
+
busyLoading: _angular_core.WritableSignal<boolean>;
|
|
25
|
+
busySaving: _angular_core.WritableSignal<boolean>;
|
|
26
|
+
busyExtracting: _angular_core.WritableSignal<boolean>;
|
|
27
|
+
formOptions: _angular_core.WritableSignal<ObjectFormOptions | null>;
|
|
28
|
+
extensions: _angular_core.WritableSignal<IObjectFormElementExtension[]>;
|
|
29
|
+
immediateExtract: any;
|
|
30
|
+
headline?: string;
|
|
31
|
+
extract(): void;
|
|
32
|
+
onFormStatusChanged(status: FormStatusChangedEvent): void;
|
|
33
|
+
applyFlavor(): void;
|
|
34
|
+
close(): void;
|
|
35
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ApplyFlavorComponent, never>;
|
|
36
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ApplyFlavorComponent, "yin-apply-flavor", never, {}, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* This object form field extension inserts AI-extracted values into an
|
|
41
|
+
* object-form. Once the AI service has extracted a value, this extension
|
|
42
|
+
* will change the form field to display the extracted value and show the
|
|
43
|
+
* value for the probability of the extraction right next to the field.
|
|
44
|
+
*
|
|
45
|
+
* If there are multiple extractions, the extension will insert the value
|
|
46
|
+
* with the highest probability and provide a picker for the other values.
|
|
47
|
+
*
|
|
48
|
+
* This way the user can easily accept the extracted value or choose a
|
|
49
|
+
* different one from the list of extracted values.
|
|
50
|
+
*/
|
|
51
|
+
declare class AiExtractedPropertyComponent extends ObjectFormElementExtension implements OnInit {
|
|
52
|
+
#private;
|
|
53
|
+
predictionValues: PredictionExtractResultItem[];
|
|
54
|
+
currentValueProbability: _angular_core.WritableSignal<number | undefined>;
|
|
55
|
+
extractedData: _angular_core.Signal<Record<string, PredictionExtractResultItem[]> | null>;
|
|
56
|
+
extractedDataEffect: _angular_core.EffectRef;
|
|
57
|
+
selectOptionByIndex(idx: number): void;
|
|
58
|
+
selectOption(pr: PredictionExtractResultItem): void;
|
|
59
|
+
ngOnInit(): void;
|
|
60
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiExtractedPropertyComponent, never>;
|
|
61
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiExtractedPropertyComponent, "yin-ai-extracted-property", never, {}, {}, never, never, true, never>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare class ApplyCreateFlavorComponent extends AbstractApplyCreateFlavorComponent {
|
|
65
|
+
#private;
|
|
66
|
+
sc?: {
|
|
67
|
+
cmp: Type<any>;
|
|
68
|
+
inputs: any;
|
|
69
|
+
};
|
|
70
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ApplyCreateFlavorComponent, never>;
|
|
71
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ApplyCreateFlavorComponent, "yin-apply-create-flavor", never, {}, {}, never, never, true, never>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { AiExtractedPropertyComponent, AppInvoiceExtension, ApplyCreateFlavorComponent, ApplyFlavorComponent };
|
package/extensions/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export * from './lib/services/extensions.service';
|
|
2
|
-
export * from './lib/components/apply-flavor/apply-flavor.component';
|
|
3
|
-
export * from './lib/components/form-extensions/ai-extracted-property/ai-extracted-property.component';
|
|
4
|
-
export * from './lib/components/apply-create-flavor/apply-create-flavor.component';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DmsObject } from '@yuuvis/client-core';
|
|
2
|
-
import { AbstractContextAction, Action, ActionSupport, SelectionRange } from '@yuuvis/client-framework/actions';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
export declare class OpenEmailAction extends AbstractContextAction implements Action {
|
|
5
|
-
#private;
|
|
6
|
-
private translate;
|
|
7
|
-
private router;
|
|
8
|
-
id: string;
|
|
9
|
-
label: any;
|
|
10
|
-
description: any;
|
|
11
|
-
priority: number;
|
|
12
|
-
icon: string;
|
|
13
|
-
group: string;
|
|
14
|
-
range: SelectionRange;
|
|
15
|
-
supports: ActionSupport;
|
|
16
|
-
isExecutable(selection: DmsObject[]): Observable<boolean>;
|
|
17
|
-
run(selection: DmsObject[]): Observable<boolean>;
|
|
18
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { DmsObject, RetentionState } from '@yuuvis/client-core';
|
|
2
|
-
import { ActionContext } from '@yuuvis/client-framework/actions';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
interface RetentionGroupEntry {
|
|
5
|
-
object: DmsObject;
|
|
6
|
-
objectLabel: string;
|
|
7
|
-
state: RetentionState;
|
|
8
|
-
}
|
|
9
|
-
export declare class ManageRetentionComponent {
|
|
10
|
-
#private;
|
|
11
|
-
private translate;
|
|
12
|
-
actionContext: ActionContext;
|
|
13
|
-
retentionPeriod: import("@angular/core").InputSignal<number>;
|
|
14
|
-
objects: import("@angular/core").InputSignal<DmsObject[]>;
|
|
15
|
-
objectGroups: import("@angular/core").Signal<{
|
|
16
|
-
underRetention: RetentionGroupEntry[];
|
|
17
|
-
notUnderRetention: RetentionGroupEntry[];
|
|
18
|
-
}>;
|
|
19
|
-
busySettingRetention: import("@angular/core").WritableSignal<boolean>;
|
|
20
|
-
error?: string;
|
|
21
|
-
setRetention(): void;
|
|
22
|
-
cancel(): void;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ManageRetentionComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ManageRetentionComponent, "ymxi-manage-retention", never, { "retentionPeriod": { "alias": "retentionPeriod"; "required": false; "isSignal": true; }; "objects": { "alias": "objects"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DmsObject } from '@yuuvis/client-core';
|
|
2
|
-
import { AbstractContextAction, Action, ActionSupport, SelectionRange } from '@yuuvis/client-framework/actions';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
export declare class InvoiceRetentionAction extends AbstractContextAction implements Action {
|
|
5
|
-
#private;
|
|
6
|
-
private translate;
|
|
7
|
-
id: string;
|
|
8
|
-
label: any;
|
|
9
|
-
description: any;
|
|
10
|
-
priority: number;
|
|
11
|
-
icon: string;
|
|
12
|
-
group: string;
|
|
13
|
-
range: SelectionRange;
|
|
14
|
-
supports: ActionSupport;
|
|
15
|
-
isExecutable(selection: DmsObject[]): Observable<boolean>;
|
|
16
|
-
run(selection: DmsObject[]): Observable<boolean>;
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { AbstractApplyCreateFlavorComponent } from '@yuuvis/client-framework/object-flavor';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ApplyCreateFlavorComponent extends AbstractApplyCreateFlavorComponent {
|
|
5
|
-
#private;
|
|
6
|
-
sc?: {
|
|
7
|
-
cmp: Type<any>;
|
|
8
|
-
inputs: any;
|
|
9
|
-
};
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ApplyCreateFlavorComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ApplyCreateFlavorComponent, "yin-apply-create-flavor", never, {}, {}, never, never, true, never>;
|
|
12
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AbstractApplyObjectFlavorComponent } from '@yuuvis/client-framework/object-flavor';
|
|
2
|
-
import { FormStatusChangedEvent, IObjectFormElementExtension, ObjectFormComponent, ObjectFormOptions } from '@yuuvis/client-framework/object-form';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ApplyFlavorComponent extends AbstractApplyObjectFlavorComponent {
|
|
5
|
-
#private;
|
|
6
|
-
private translate;
|
|
7
|
-
private userService;
|
|
8
|
-
objectForm: import("@angular/core").Signal<ObjectFormComponent | undefined>;
|
|
9
|
-
flavorLabel: import("@angular/core").Signal<any>;
|
|
10
|
-
error: import("@angular/core").WritableSignal<boolean>;
|
|
11
|
-
applyDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
12
|
-
supportsExtraction: import("@angular/core").WritableSignal<boolean>;
|
|
13
|
-
busyLoading: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
-
busySaving: import("@angular/core").WritableSignal<boolean>;
|
|
15
|
-
busyExtracting: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
-
formOptions: import("@angular/core").WritableSignal<ObjectFormOptions | null>;
|
|
17
|
-
extensions: import("@angular/core").WritableSignal<IObjectFormElementExtension[]>;
|
|
18
|
-
immediateExtract: any;
|
|
19
|
-
headline?: string;
|
|
20
|
-
extract(): void;
|
|
21
|
-
onFormStatusChanged(status: FormStatusChangedEvent): void;
|
|
22
|
-
applyFlavor(): void;
|
|
23
|
-
close(): void;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ApplyFlavorComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ApplyFlavorComponent, "yin-apply-flavor", never, {}, {}, never, never, true, never>;
|
|
26
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { PredictionExtractResultItem } from '@yuuvis/client-core';
|
|
3
|
-
import { ObjectFormElementExtension } from '@yuuvis/client-framework/object-form';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* This object form field extension inserts AI-extracted values into an
|
|
7
|
-
* object-form. Once the AI service has extracted a value, this extension
|
|
8
|
-
* will change the form field to display the extracted value and show the
|
|
9
|
-
* value for the probability of the extraction right next to the field.
|
|
10
|
-
*
|
|
11
|
-
* If there are multiple extractions, the extension will insert the value
|
|
12
|
-
* with the highest probability and provide a picker for the other values.
|
|
13
|
-
*
|
|
14
|
-
* This way the user can easily accept the extracted value or choose a
|
|
15
|
-
* different one from the list of extracted values.
|
|
16
|
-
*/
|
|
17
|
-
export declare class AiExtractedPropertyComponent extends ObjectFormElementExtension implements OnInit {
|
|
18
|
-
#private;
|
|
19
|
-
predictionValues: PredictionExtractResultItem[];
|
|
20
|
-
currentValueProbability: import("@angular/core").WritableSignal<number | undefined>;
|
|
21
|
-
extractedData: import("@angular/core").Signal<Record<string, PredictionExtractResultItem[]> | null>;
|
|
22
|
-
extractedDataEffect: import("@angular/core").EffectRef;
|
|
23
|
-
selectOptionByIndex(idx: number): void;
|
|
24
|
-
selectOption(pr: PredictionExtractResultItem): void;
|
|
25
|
-
ngOnInit(): void;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AiExtractedPropertyComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AiExtractedPropertyComponent, "yin-ai-extracted-property", never, {}, {}, never, never, true, never>;
|
|
28
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AppFlavor } from '@yuuvis/client-shell-core';
|
|
2
|
-
export declare const APP_ROLE = "YM_APP_INVOICE";
|
|
3
|
-
export declare const APP_PREFIX = "appSysteminvoice:";
|
|
4
|
-
export declare const APP_CLASSIFY_PRO_PREFIX = "appClassifypro:";
|
|
5
|
-
export declare const APP_ID = "io.yuuvis.app.invoice";
|
|
6
|
-
export declare const RETENTION_PERIOD = 10;
|
|
7
|
-
export declare const APP_FLAVORS: AppFlavor[];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Signal } from '@angular/core';
|
|
2
|
-
import { PredictionExtractResultItem } from '@yuuvis/client-core';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ApplyFlavorService {
|
|
6
|
-
#private;
|
|
7
|
-
extractedData: Signal<Record<string, PredictionExtractResultItem[]> | null>;
|
|
8
|
-
extract(schemaObjectTypeId: string, objectID: string): Observable<any>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ApplyFlavorService, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ApplyFlavorService>;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ClientShellExtension } from '@yuuvis/client-shell-core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AppInvoiceExtension implements ClientShellExtension {
|
|
4
|
-
#private;
|
|
5
|
-
init(): Promise<any>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AppInvoiceExtension, never>;
|
|
7
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AppInvoiceExtension>;
|
|
8
|
-
}
|
package/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/lib.routes';
|
package/lib/lib.routes.d.ts
DELETED