@agridea/suibi-module 0.1.0-preview.557ea51 → 0.1.0-preview.5c6858a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/elements/browser/main.js +71 -71
- package/dist/elements/browser/styles.css +1 -1
- package/dist/elements/browser/suibi-module-latest.css +1 -1
- package/dist/elements/browser/suibi-module-latest.js +71 -71
- package/dist/elements/browser/{suibi-module.v0.1.0-preview.557ea51.css → suibi-module.v0.1.0-preview.5c6858a.css} +1 -1
- package/dist/elements/browser/suibi-module.v0.1.0-preview.5c6858a.js +78 -0
- package/dist/elements/browser/version.txt +1 -1
- package/dist/elements/browser/wc-global-utilities.css +1 -1
- package/dist/types/app/components/data-preview/data-preview.component.d.ts +1 -2
- package/dist/types/app/components/{suissebilanz-dashboard → gauge-arc}/gauge-arc.component.d.ts +2 -0
- package/dist/types/app/{header-bar.d.ts → components/header-bar/header-bar.component.d.ts} +2 -2
- package/dist/types/app/components/inline-table/inline-table.component.d.ts +159 -0
- package/dist/types/app/components/inline-table/inline-table.types.d.ts +212 -0
- package/dist/types/app/components/planning-result-row/planning-result-row.component.d.ts +34 -0
- package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-dashboard.component.d.ts +10 -2
- package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-metrics.service.d.ts +1 -1
- package/dist/types/app/components/{suissebilanz-dashboard → suissebilanz-minibar}/suissebilanz-minibar.component.d.ts +2 -2
- package/dist/types/app/components/welcome-page/metadata.types.d.ts +1 -1
- package/dist/types/app/components/welcome-page/welcome-page.component.d.ts +5 -3
- package/dist/types/app/core/data/naebi-data.service.d.ts +22 -34
- package/dist/types/app/core/error/global-error-handler.d.ts +2 -3
- package/dist/types/app/core/i18n/i18n.service.d.ts +5 -3
- package/dist/types/app/core/i18n/locales/fr.d.ts +2 -0
- package/dist/types/app/core/i18n/locales/it.d.ts +2 -0
- package/dist/types/app/core/metadata/suibi-metadata.types.d.ts +11 -1
- package/dist/types/app/core/navigation/navigation.service.d.ts +15 -0
- package/dist/types/app/core/planning/planning-balance.service.d.ts +1 -0
- package/dist/types/app/core/utils/custom-unit.util.d.ts +38 -0
- package/dist/types/app/core/utils/object.util.d.ts +17 -0
- package/dist/types/app/core/validation/ajv-custom.d.ts +1 -0
- package/dist/types/app/core/validation/global-validation.service.d.ts +7 -1
- package/dist/types/app/jsonforms/registry/renderers.registry.d.ts +4 -0
- package/dist/types/app/jsonforms/renderers/controls/selects/animal-category/animal-category-select.renderer.d.ts +1 -1
- package/dist/types/app/jsonforms/renderers/layout/constraint/constraint-layout.renderer.d.ts +1 -0
- package/dist/types/app/jsonforms/renderers/layout/group/base-group.renderer.d.ts +2 -0
- package/dist/types/app/jsonforms/renderers/layout/group/module-toggle-group.renderer.d.ts +38 -0
- package/dist/types/app/nutrient-cycle/animal-stock/animal-stock-detail/animal-stock-detail.component.d.ts +21 -0
- package/dist/types/app/nutrient-cycle/animal-stock/{animal-stock-list.component.d.ts → animal-stock-list/animal-stock-list.component.d.ts} +6 -9
- package/dist/types/app/nutrient-cycle/animal-stock/{animal-stock-master-detail.component.d.ts → animal-stock-master-detail/animal-stock-master-detail.component.d.ts} +2 -2
- package/dist/types/app/nutrient-cycle/animal-stock/index.d.ts +3 -3
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-master-detail/farm-manure-trading-master-detail.component.d.ts +19 -0
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-table/farm-manure-trading-table.component.d.ts +35 -0
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-table/farm-manure-trading-table.config.d.ts +24 -0
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading.types.d.ts +4 -0
- package/dist/types/app/nutrient-cycle/farm-manure-trading/index.d.ts +3 -3
- package/dist/types/app/nutrient-cycle/farm-manure-trading/transaction-unit.util.d.ts +2 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/arable-land-table/arable-land-table.component.d.ts +22 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/arable-land-table/arable-land-table.config.d.ts +9 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/crop-harvest-table/crop-harvest-table.component.d.ts +21 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/crop-harvest-table/crop-harvest-table.config.d.ts +13 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-detail/field-cultivation-detail.component.d.ts +22 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-general/field-cultivation-general.component.d.ts +20 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-list/field-cultivation-list.component.d.ts +17 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-master-detail/field-cultivation-master-detail.component.d.ts +29 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.types.d.ts +44 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.util.d.ts +6 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/fodder-cropland-table/fodder-cropland-table.component.d.ts +28 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/fodder-cropland-table/fodder-cropland-table.config.d.ts +16 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/index.d.ts +9 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/special-crops-table/special-crops-table.component.d.ts +29 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/special-crops-table/special-crops-table.config.d.ts +61 -0
- package/dist/types/app/nutrient-cycle/field-spreading/fertiliser-table/fertiliser-table.component.d.ts +52 -0
- package/dist/types/app/nutrient-cycle/field-spreading/fertiliser-table/fertiliser-table.config.d.ts +20 -0
- package/dist/types/app/nutrient-cycle/field-spreading/field-spreading.component.d.ts +18 -3
- package/dist/types/app/nutrient-cycle/field-spreading/field-spreading.types.d.ts +1 -0
- package/dist/types/app/nutrient-cycle/field-spreading/ingredient.util.d.ts +8 -0
- package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.component.d.ts +32 -0
- package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.config.d.ts +17 -0
- package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-transaction-unit.util.d.ts +4 -0
- package/dist/types/app/nutrient-cycle/fodder/fodder-master-detail/fodder-master-detail.component.d.ts +25 -0
- package/dist/types/app/nutrient-cycle/fodder/fodder-table/fodder-table.component.d.ts +28 -0
- package/dist/types/app/nutrient-cycle/fodder/fodder-table/fodder-table.config.d.ts +9 -0
- package/dist/types/app/nutrient-cycle/fodder/fodder.types.d.ts +7 -0
- package/dist/types/app/nutrient-cycle/fodder/index.d.ts +3 -0
- package/dist/types/app/nutrient-cycle/fodder/ingredient.util.d.ts +8 -0
- package/dist/types/app/nutrient-cycle/lifetime-performance/index.d.ts +2 -0
- package/dist/types/app/nutrient-cycle/storage/index.d.ts +4 -0
- package/dist/types/app/nutrient-cycle/storage/{storage-detail.component.d.ts → storage-detail/storage-detail.component.d.ts} +3 -3
- package/dist/types/app/nutrient-cycle/storage/{storage-general.component.d.ts → storage-general/storage-general.component.d.ts} +5 -5
- package/dist/types/app/nutrient-cycle/storage/{storage-list.component.d.ts → storage-list/storage-list.component.d.ts} +4 -1
- package/dist/types/app/nutrient-cycle/storage/{storage-master-detail.component.d.ts → storage-master-detail/storage-master-detail.component.d.ts} +6 -5
- package/package.json +68 -17
- package/dist/elements/browser/suibi-module.v0.1.0-preview.557ea51.js +0 -78
- package/dist/types/app/nutrient-cycle/animal-stock/animal-stock-detail.component.d.ts +0 -22
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-detail.component.d.ts +0 -27
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-list.component.d.ts +0 -23
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-master-detail.component.d.ts +0 -25
- package/dist/types/app/nutrient-cycle/fodder/fodder-detail.component.d.ts +0 -32
- package/dist/types/app/nutrient-cycle/fodder/fodder-list.component.d.ts +0 -21
- package/dist/types/app/nutrient-cycle/fodder/fodder-master-detail.component.d.ts +0 -37
- /package/dist/types/app/components/{planning-result → planning-trigger}/planning-trigger.component.d.ts +0 -0
- /package/dist/types/app/{core/validation/validation-errors-panel.d.ts → components/validation-errors-panel/validation-errors-panel.component.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.0-preview.
|
|
1
|
+
0.1.0-preview.5c6858a 5c6858a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.cdk-overlay-container{position:fixed;inset:0;z-index:1200;pointer-events:none}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{position:fixed;inset:0;display:flex;align-items:flex-start;justify-content:center;pointer-events:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1200;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1200}.cdk-overlay-backdrop{position:fixed;inset:0;z-index:1199;pointer-events:auto}.cdk-overlay-transparent-backdrop{background:transparent}.cdk-overlay-dark-backdrop{background:#00000052}.mat-mdc-select-panel.mdc-menu-surface{background:#fff;--mdc-theme-surface: #fff;--mdc-menu-container-color: #fff;--mat-select-panel-background-color: #fff;box-shadow:0 4px 16px #00000040;border-radius:4px;outline:0;opacity:1!important;filter:none!important}
|
|
1
|
+
.cdk-overlay-container{position:fixed;inset:0;z-index:1200;pointer-events:none}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{position:fixed;inset:0;display:flex;align-items:flex-start;justify-content:center;pointer-events:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1200;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1200}.cdk-overlay-backdrop{position:fixed;inset:0;z-index:1199;pointer-events:auto}.cdk-overlay-transparent-backdrop{background:transparent}.cdk-overlay-dark-backdrop{background:#00000052}.mat-mdc-select-panel.mdc-menu-surface{background:#fff;--mdc-theme-surface: #fff;--mdc-menu-container-color: #fff;--mat-select-panel-background-color: #fff;box-shadow:0 4px 16px #00000040;border-radius:4px;outline:0;opacity:1!important;filter:none!important}.mat-mdc-option.mdc-list-item{height:auto;min-height:48px}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.35}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { NaebiDataService } from '../../core/data/naebi-data.service';
|
|
2
2
|
import { PlanningBalanceService } from '../../core/planning/planning-balance.service';
|
|
3
3
|
export declare class DataPreviewComponent {
|
|
4
|
-
readonly naebi: NaebiDataService;
|
|
5
4
|
private readonly host;
|
|
6
5
|
private readonly emitter;
|
|
7
6
|
readonly planning: PlanningBalanceService;
|
|
7
|
+
readonly naebi: NaebiDataService;
|
|
8
8
|
readonly metadataPreview: import("@angular/core").Signal<import("../../../public-api").SuibiDataEventMetadata>;
|
|
9
|
-
constructor(naebi: NaebiDataService);
|
|
10
9
|
setPlanningEndpoint(value: string | null): void;
|
|
11
10
|
emitData(): void;
|
|
12
11
|
}
|
package/dist/types/app/components/{suissebilanz-dashboard → gauge-arc}/gauge-arc.component.d.ts
RENAMED
|
@@ -18,6 +18,8 @@ export interface GaugeMetric {
|
|
|
18
18
|
maxGauge: number;
|
|
19
19
|
/** Short range description shown below the arc (e.g. '< 100 %'). */
|
|
20
20
|
rangeLabel: string;
|
|
21
|
+
/** Raw quantity in kg (nutrients) or dt/ha (rendement) to display below the arc. */
|
|
22
|
+
kgValue?: number | null;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Reusable semicircular SVG arc gauge.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Locale } from '
|
|
2
|
-
import { PageId } from '
|
|
1
|
+
import { Locale } from '../../core/i18n/i18n.service';
|
|
2
|
+
import { PageId } from '../../core/navigation/navigation.service';
|
|
3
3
|
/**
|
|
4
4
|
* HeaderBarComponent
|
|
5
5
|
* Footer actions for quick access to data preview and the current save state.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
2
|
+
import { BaseCodeListEntry } from '../../jsonforms/shared/option-sources/code-lists';
|
|
3
|
+
import { InlineColumnDef, InlineTableConfig, InlineCellErrorResolver } from './inline-table.types';
|
|
4
|
+
/**
|
|
5
|
+
* InlineTableComponent — generic inline-editable table for array-of-objects data.
|
|
6
|
+
*
|
|
7
|
+
* This component is intentionally domain-agnostic. All column structure, labels,
|
|
8
|
+
* and section text are driven by an `InlineTableConfig` input (the "uischema").
|
|
9
|
+
* Domain-specific side-effects (e.g. auto-populating fields when a dropdown changes)
|
|
10
|
+
* are injected via the optional `rowTransform` function input.
|
|
11
|
+
*
|
|
12
|
+
* ## Usage
|
|
13
|
+
* ```html
|
|
14
|
+
* <app-inline-table
|
|
15
|
+
* [config]="myTableConfig"
|
|
16
|
+
* [rows]="myRows()"
|
|
17
|
+
* [rowTransform]="myTransform"
|
|
18
|
+
* (rowsChange)="onRowsChange($event)"
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* ## Extending for a new domain
|
|
23
|
+
* 1. Create a new `InlineTableConfig` constant (the column config file).
|
|
24
|
+
* 2. Optionally create a thin wrapper component that provides the config and
|
|
25
|
+
* a `rowTransform` arrow-function.
|
|
26
|
+
* 3. No changes to this component are needed.
|
|
27
|
+
*/
|
|
28
|
+
export declare class InlineTableComponent {
|
|
29
|
+
private readonly i18n;
|
|
30
|
+
private readonly host;
|
|
31
|
+
constructor();
|
|
32
|
+
/** Table configuration — columns, labels, and the row factory. Acts as the "uischema". */
|
|
33
|
+
readonly config: import("@angular/core").InputSignal<InlineTableConfig>;
|
|
34
|
+
/** Current array of row objects. Each key maps to a column's `key` or sub-array path. */
|
|
35
|
+
readonly rows: import("@angular/core").InputSignal<Record<string, unknown>[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Emitted with the complete updated array after any cell change, row add, or row remove.
|
|
38
|
+
* The parent component is responsible for persisting the new value (e.g. via signal).
|
|
39
|
+
*/
|
|
40
|
+
readonly rowsChange: import("@angular/core").OutputEmitterRef<Record<string, unknown>[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Optional business-logic transform applied after every cell edit — before emission.
|
|
43
|
+
*
|
|
44
|
+
* Signature: `(changedKey, newValue, updatedRow, previousRow) => transformedRow`
|
|
45
|
+
*
|
|
46
|
+
* - `changedKey`: the `InlineColumnDef.key` of the edited column.
|
|
47
|
+
* - `newValue`: the raw new value (string, number, or null).
|
|
48
|
+
* - `updatedRow`: the row object already reflecting the edit.
|
|
49
|
+
* - `previousRow`: the row as it was before the edit — needed when the side-effect
|
|
50
|
+
* depends on the replaced value (e.g. converting a quantity on a unit switch).
|
|
51
|
+
* - Return the row (possibly further mutated) that should be stored.
|
|
52
|
+
*
|
|
53
|
+
* Use this for cross-field side-effects such as pre-populating nutrient % columns
|
|
54
|
+
* when a product is selected. For forms without such logic, omit this input.
|
|
55
|
+
*/
|
|
56
|
+
readonly rowTransform: import("@angular/core").InputSignal<((changedKey: string, newValue: unknown, row: Record<string, unknown>, previousRow?: Record<string, unknown>) => Record<string, unknown>) | null>;
|
|
57
|
+
/**
|
|
58
|
+
* Optional per-cell validation resolver — returns a translated error message
|
|
59
|
+
* shown under the cell (cell turns red via `mat-form-field-invalid`), or `null`
|
|
60
|
+
* when valid. Inline tables bypass JSONForms/AJV, so business rules that must
|
|
61
|
+
* be visible while typing (e.g. percentage caps) are surfaced through this hook.
|
|
62
|
+
*/
|
|
63
|
+
readonly cellError: import("@angular/core").InputSignal<InlineCellErrorResolver | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Index of the row to visually highlight (e.g. after a validation-error deep-link).
|
|
66
|
+
* Also triggers a scrollIntoView so the row is on screen.
|
|
67
|
+
*/
|
|
68
|
+
readonly highlightRowIndex: import("@angular/core").InputSignal<number | null>;
|
|
69
|
+
/** Resolves the per-cell error message via the optional `cellError` input (null = valid). */
|
|
70
|
+
errorForCell(row: Record<string, unknown>, col: InlineColumnDef): string | null;
|
|
71
|
+
/** True when any column of the row reports an error — drives the row-level red tint. */
|
|
72
|
+
rowHasError(row: Record<string, unknown>): boolean;
|
|
73
|
+
/** Extracts a px value from a grid-format width string (e.g. 'minmax(120px, 1fr)' → '120px'). */
|
|
74
|
+
colMinWidth(width?: string): string;
|
|
75
|
+
/** Total table width = sum of all column px values + 40px for the delete column. */
|
|
76
|
+
readonly tableWidth: import("@angular/core").Signal<string>;
|
|
77
|
+
/** Grid template columns string for CSS grid layout. */
|
|
78
|
+
readonly gridTemplateColumns: import("@angular/core").Signal<string>;
|
|
79
|
+
readonly sectionTitle: import("@angular/core").Signal<string>;
|
|
80
|
+
readonly sectionDescription: import("@angular/core").Signal<string>;
|
|
81
|
+
readonly addLabel: import("@angular/core").Signal<string>;
|
|
82
|
+
readonly emptyLabel: import("@angular/core").Signal<string>;
|
|
83
|
+
readonly emptyHint: import("@angular/core").Signal<string>;
|
|
84
|
+
/** Returns the option array for a select column from the shared CODE_LISTS map. */
|
|
85
|
+
getOptions(col: InlineColumnDef): BaseCodeListEntry[];
|
|
86
|
+
/** Options for a select column, narrowed per row when the column defines `optionsFilter`. */
|
|
87
|
+
optionsForRow(col: InlineColumnDef, row: Record<string, unknown>): BaseCodeListEntry[];
|
|
88
|
+
/**
|
|
89
|
+
* Returns the localized display label for a code-list option.
|
|
90
|
+
* - `optionLabelKey`: translates the i18n key returned by the column's resolver — for
|
|
91
|
+
* literal option lists whose labels live in the locales rather than in master data.
|
|
92
|
+
* - `optionDisplay: 'id'`: returns `String(entry.id)` (e.g. "kg", "t").
|
|
93
|
+
* - default (`'label'`): uses `descriptor.designation_eng / designation_deu`;
|
|
94
|
+
* falls back to `String(entry.id)` when no descriptor is present.
|
|
95
|
+
*/
|
|
96
|
+
optionLabel(entry: BaseCodeListEntry, col: InlineColumnDef): string;
|
|
97
|
+
/**
|
|
98
|
+
* Reads the current cell value for a column from a row object.
|
|
99
|
+
*
|
|
100
|
+
* - `valueResolver` columns: fully derived value (e.g. from master data).
|
|
101
|
+
* - Simple field: returns `row[col.key]`.
|
|
102
|
+
* - Sub-array field: navigates `row[arrayPath]`, finds the entry matching
|
|
103
|
+
* `arrayKeyField === arrayKeyValue`, and returns `entry[arrayValueField]`.
|
|
104
|
+
*/
|
|
105
|
+
getValue(row: Record<string, unknown>, col: InlineColumnDef): unknown;
|
|
106
|
+
/**
|
|
107
|
+
* Returns a new row with the column's value updated (immutably).
|
|
108
|
+
* Handles both flat field assignment and nested sub-array mutation.
|
|
109
|
+
*/
|
|
110
|
+
private setValue;
|
|
111
|
+
/** Called when a `mat-select` selection changes. */
|
|
112
|
+
onSelectChange(rowIdx: number, col: InlineColumnDef, value: unknown): void;
|
|
113
|
+
/** Called on `(input)` of a number `<input>` — parses the string value and guards NaN.
|
|
114
|
+
* Uses `input` (not `change`) so every keystroke commits immediately: relying on blur
|
|
115
|
+
* meant edits were lost whenever the table was destroyed before the field lost focus
|
|
116
|
+
* (e.g. navigating to another page), even though switching same-page tabs hid the bug
|
|
117
|
+
* since mat-tab-group keeps inactive tab content mounted. */
|
|
118
|
+
onNumberChange(rowIdx: number, col: InlineColumnDef, event: Event): void;
|
|
119
|
+
/** Called on `(input)` of a text `<input>` (see onNumberChange for why not `(change)`). */
|
|
120
|
+
onTextChange(rowIdx: number, col: InlineColumnDef, event: Event): void;
|
|
121
|
+
/** Called when a `mat-checkbox` is toggled. */
|
|
122
|
+
onCheckboxChange(rowIdx: number, col: InlineColumnDef, change: MatCheckboxChange): void;
|
|
123
|
+
/** Whether the cell widget is disabled for this row (per-row constraint hook). */
|
|
124
|
+
isCellDisabled(col: InlineColumnDef, row: Record<string, unknown>): boolean;
|
|
125
|
+
/** Appends a blank row produced by `config.createRow()`. */
|
|
126
|
+
addRow(): void;
|
|
127
|
+
/** Removes the row at `idx` from the array. */
|
|
128
|
+
removeRow(idx: number): void;
|
|
129
|
+
/** Ids of the expanded sub-rows panels, keyed `${rowIdx}:${col.key}` (UI-only state). */
|
|
130
|
+
private readonly expandedSubrows;
|
|
131
|
+
isSubrowsExpanded(rowIdx: number, col: InlineColumnDef): boolean;
|
|
132
|
+
toggleSubrows(rowIdx: number, col: InlineColumnDef): void;
|
|
133
|
+
/** Reads the nested key/value entries of a sub-rows column (never null). */
|
|
134
|
+
getSubEntries(row: Record<string, unknown>, col: InlineColumnDef): Record<string, unknown>[];
|
|
135
|
+
/** Options for the key select of a sub-rows column. */
|
|
136
|
+
getSubrowOptions(col: InlineColumnDef): BaseCodeListEntry[];
|
|
137
|
+
/** Localized label for a sub-entry key (descriptor designation, id as fallback). */
|
|
138
|
+
subrowKeyLabel(col: InlineColumnDef, keyValue: unknown): string;
|
|
139
|
+
/** Collapsed-cell summary, e.g. "Bovins 25 %, Porcs 75 %" ('–' when empty). */
|
|
140
|
+
subrowsSummary(row: Record<string, unknown>, col: InlineColumnDef): string;
|
|
141
|
+
/** Sum of the value fields of all sub-entries. */
|
|
142
|
+
subEntryTotal(row: Record<string, unknown>, col: InlineColumnDef): number;
|
|
143
|
+
/** Whether the sub-entry values sum to the configured expected total. */
|
|
144
|
+
subEntryTotalOk(row: Record<string, unknown>, col: InlineColumnDef): boolean;
|
|
145
|
+
addSubEntry(rowIdx: number, col: InlineColumnDef): void;
|
|
146
|
+
removeSubEntry(rowIdx: number, col: InlineColumnDef, subIdx: number): void;
|
|
147
|
+
onSubEntryKeyChange(rowIdx: number, col: InlineColumnDef, subIdx: number, value: unknown): void;
|
|
148
|
+
/** Commits on every keystroke (not on blur) — same rationale as `onNumberChange`.
|
|
149
|
+
* When `expectedTotal` is set, the value is clamped to the remaining share so the
|
|
150
|
+
* sum can never exceed it; smaller intermediate keystrokes still go through. */
|
|
151
|
+
onSubEntryValueChange(rowIdx: number, col: InlineColumnDef, subIdx: number, event: Event): void;
|
|
152
|
+
/** Writes the sub-entry array back to the row, runs rowTransform, emits rowsChange. */
|
|
153
|
+
private updateSubEntries;
|
|
154
|
+
/**
|
|
155
|
+
* Core change handler: sets the new value on the row, applies the optional
|
|
156
|
+
* `rowTransform` for any cross-field side-effects, then emits the updated array.
|
|
157
|
+
*/
|
|
158
|
+
private _applyChange;
|
|
159
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the generic InlineTableComponent.
|
|
3
|
+
*
|
|
4
|
+
* Usage pattern (the "uischema" concept):
|
|
5
|
+
* 1. Define an `InlineTableConfig` object describing your columns and labels.
|
|
6
|
+
* 2. Pass it to `<app-inline-table [config]="…" [rows]="…">`.
|
|
7
|
+
* 3. For business-logic side-effects (e.g. auto-populating fields on selection),
|
|
8
|
+
* pass an optional `rowTransform` function — the generic component knows nothing
|
|
9
|
+
* about domain rules.
|
|
10
|
+
*
|
|
11
|
+
* To reuse the table for a different domain, create a new config file and a thin
|
|
12
|
+
* wrapper component. Only the config changes; the rendering component stays the same.
|
|
13
|
+
*/
|
|
14
|
+
import type { BaseCodeListEntry } from '../../jsonforms/shared/option-sources/code-lists';
|
|
15
|
+
/** Supported cell widget types. Extend with new literal types as needed.
|
|
16
|
+
* 'readonly' renders the resolved value as plain text (no input) — for columns
|
|
17
|
+
* that are fully derived from other fields and must not be user-editable.
|
|
18
|
+
* 'checkbox' renders a boolean mat-checkbox bound to a true/false row field.
|
|
19
|
+
* 'subrows' renders an expandable editor for a nested list of key/percentage
|
|
20
|
+
* pairs (e.g. manureDerivation[]) — see `InlineSubrowsConfig`. */
|
|
21
|
+
export type InlineCellType = 'select' | 'number' | 'text' | 'readonly' | 'checkbox' | 'subrows';
|
|
22
|
+
/**
|
|
23
|
+
* Per-cell validation resolver — returns a translated error message to display
|
|
24
|
+
* under the cell, or `null` when the cell is valid. Passed as the `cellError`
|
|
25
|
+
* input of InlineTableComponent for domain tables that bypass JSONForms/AJV
|
|
26
|
+
* (inline tables are not schema-validated, so business rules like percentage
|
|
27
|
+
* caps must be surfaced visually through this hook).
|
|
28
|
+
*/
|
|
29
|
+
export type InlineCellErrorResolver = (row: Record<string, unknown>, col: InlineColumnDef) => string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Configuration for a `type: 'subrows'` column — an expandable editor for a nested
|
|
32
|
+
* array of `{ key, value }` entries (e.g. manureDerivation: zoologicalAnimal +
|
|
33
|
+
* percentageAllocation). The collapsed cell shows a joined summary; expanding it
|
|
34
|
+
* opens a floating panel with one select + number input per entry, an add button,
|
|
35
|
+
* and a total indicator (green when the sum matches `expectedTotal`).
|
|
36
|
+
*/
|
|
37
|
+
export interface InlineSubrowsConfig {
|
|
38
|
+
/** Path to the nested array on the row object (e.g. `'manureDerivation'`). */
|
|
39
|
+
arrayPath: string;
|
|
40
|
+
/** Field holding the code-list key in each sub-entry (e.g. `'zoologicalAnimal'`). */
|
|
41
|
+
keyField: string;
|
|
42
|
+
/** Key into the shared `CODE_LISTS` map for the key select options. */
|
|
43
|
+
keyCodeListKey: string;
|
|
44
|
+
/** i18n key for the key sub-column header inside the panel. */
|
|
45
|
+
keyLabelKey: string;
|
|
46
|
+
/** Field holding the numeric share in each sub-entry (e.g. `'percentageAllocation'`). */
|
|
47
|
+
valueField: string;
|
|
48
|
+
/** i18n key for the value sub-column header inside the panel. */
|
|
49
|
+
valueLabelKey: string;
|
|
50
|
+
/** i18n key for the "add sub-entry" button label. */
|
|
51
|
+
addLabelKey: string;
|
|
52
|
+
/** i18n key for the expand toggle label (collapsed state). */
|
|
53
|
+
expandLabelKey: string;
|
|
54
|
+
/** i18n key for the collapse toggle label (expanded state). */
|
|
55
|
+
collapseLabelKey: string;
|
|
56
|
+
/** i18n key for the total indicator label. */
|
|
57
|
+
totalLabelKey: string;
|
|
58
|
+
/** Expected sum of the value fields (e.g. 100) — the indicator turns green on exact
|
|
59
|
+
* match (no more, no less) and entered values are clamped so the sum never exceeds it. */
|
|
60
|
+
expectedTotal?: number;
|
|
61
|
+
/** Min for the value number input (default 0). */
|
|
62
|
+
valueMin?: number;
|
|
63
|
+
/** Max for the value number input (default: none). */
|
|
64
|
+
valueMax?: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Definition for a single column in an inline table.
|
|
68
|
+
*
|
|
69
|
+
* Each definition drives both the column header and the cell widget for that column.
|
|
70
|
+
* This is the per-column equivalent of a JSONForms uischema Control element.
|
|
71
|
+
*/
|
|
72
|
+
export interface InlineColumnDef {
|
|
73
|
+
/**
|
|
74
|
+
* Unique key for this column.
|
|
75
|
+
* - For simple flat fields: also the property path on the row object.
|
|
76
|
+
* - For nested sub-array columns: used as a stable identifier; actual read/write
|
|
77
|
+
* path is determined by `arrayPath` + `arrayKeyField` + `arrayKeyValue`.
|
|
78
|
+
*/
|
|
79
|
+
key: string;
|
|
80
|
+
/**
|
|
81
|
+
* Header label source.
|
|
82
|
+
* - By default treated as an i18n translation key (e.g. `'fieldSpreading.fields.fertiliser.product'`).
|
|
83
|
+
* - Set `labelLiteral: true` to use the value verbatim (e.g. `'Ntot (%)'`).
|
|
84
|
+
*/
|
|
85
|
+
labelKey: string;
|
|
86
|
+
/**
|
|
87
|
+
* When `true`, `labelKey` is rendered as a plain string rather than passed through
|
|
88
|
+
* the translation service. Use this for labels that are already final (e.g. chemical
|
|
89
|
+
* formulas such as "P₂O₅ (%)").
|
|
90
|
+
* Default: `false`.
|
|
91
|
+
*/
|
|
92
|
+
labelLiteral?: boolean;
|
|
93
|
+
/** Widget rendered inside the cell. */
|
|
94
|
+
type: InlineCellType;
|
|
95
|
+
/**
|
|
96
|
+
* For `type: 'select'` — key into the shared `CODE_LISTS` map.
|
|
97
|
+
* The generic component resolves the option list and their localized labels
|
|
98
|
+
* automatically via the `descriptor.designation_eng / designation_deu` convention.
|
|
99
|
+
*/
|
|
100
|
+
codeListKey?: string;
|
|
101
|
+
/**
|
|
102
|
+
* For `type: 'select'` — how to display an option's label in the dropdown.
|
|
103
|
+
* - `'label'` (default): use `descriptor.designation_eng/deu` — best for named products.
|
|
104
|
+
* - `'id'`: use `String(entry.id)` verbatim — best for codes that are already
|
|
105
|
+
* human-readable (e.g. unit codes like "kg", "t", "l").
|
|
106
|
+
*/
|
|
107
|
+
optionDisplay?: 'label' | 'id';
|
|
108
|
+
/**
|
|
109
|
+
* For `type: 'select'` — optional per-row narrowing of the code-list options,
|
|
110
|
+
* e.g. to restrict the product list based on another cell of the same row.
|
|
111
|
+
* Evaluated for every option of every row, so keep it cheap.
|
|
112
|
+
*/
|
|
113
|
+
optionsFilter?: (entry: BaseCodeListEntry, row: Record<string, unknown>) => boolean;
|
|
114
|
+
/**
|
|
115
|
+
* For `type: 'select'` — resolve an option's label through an i18n key instead of the
|
|
116
|
+
* master-data descriptor (for literal option lists whose labels live in the locales,
|
|
117
|
+
* e.g. a row-type selector). Takes precedence over `optionDisplay`.
|
|
118
|
+
*/
|
|
119
|
+
optionLabelKey?: (entry: BaseCodeListEntry) => string;
|
|
120
|
+
/**
|
|
121
|
+
* Optional i18n key for an explanatory tooltip shown via an info icon next to
|
|
122
|
+
* the column header (e.g. to explain a checkbox whose effect is not obvious).
|
|
123
|
+
* Omit for columns that need no extra explanation.
|
|
124
|
+
*/
|
|
125
|
+
tooltipKey?: string;
|
|
126
|
+
/**
|
|
127
|
+
* CSS grid column-sizing token, e.g. `'minmax(140px, 2fr)'` or `'84px'`.
|
|
128
|
+
* These values are joined to build the `grid-template-columns` style on the table.
|
|
129
|
+
* Defaults to `'1fr'` when omitted.
|
|
130
|
+
*/
|
|
131
|
+
width?: string;
|
|
132
|
+
/** Minimum allowed value — sets the `min` attribute (type `'number'` only). */
|
|
133
|
+
min?: number;
|
|
134
|
+
/** Maximum allowed value — sets the `max` attribute (type `'number'` only). */
|
|
135
|
+
max?: number;
|
|
136
|
+
/**
|
|
137
|
+
* `step` attribute value (type `'number'` only).
|
|
138
|
+
* Defaults to `'any'` when omitted, allowing any decimal.
|
|
139
|
+
*/
|
|
140
|
+
step?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Custom cell-value resolver — takes precedence over the default read path.
|
|
143
|
+
* Use this for `type: 'readonly'` columns whose value is derived from master
|
|
144
|
+
* data or other cells (e.g. a standard yield looked up from the selected crop)
|
|
145
|
+
* and therefore does not live on the row object.
|
|
146
|
+
*/
|
|
147
|
+
valueResolver?: (row: Record<string, unknown>) => unknown;
|
|
148
|
+
/**
|
|
149
|
+
* Per-row disabling of the cell widget (e.g. grey out the yield input when the
|
|
150
|
+
* selected crop does not permit yield input). Evaluated per row, keep it cheap.
|
|
151
|
+
*/
|
|
152
|
+
disabledForRow?: (row: Record<string, unknown>) => boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Sub-array navigation config — for columns whose value lives inside a nested array
|
|
155
|
+
* on the row object (e.g. `ingredient[].quantity`).
|
|
156
|
+
*
|
|
157
|
+
* When all four sub-fields are set, the component:
|
|
158
|
+
* - **reads** `row[arrayPath].find(e => e[arrayKeyField] === arrayKeyValue)[arrayValueField]`
|
|
159
|
+
* - **writes** back immutably into that same slot
|
|
160
|
+
*
|
|
161
|
+
* Example — "Ntot %" column that reads `row.ingredient[{molecularFormula:'Ntot'}].quantity`:
|
|
162
|
+
* ```
|
|
163
|
+
* arrayPath: 'ingredient'
|
|
164
|
+
* arrayKeyField: 'molecularFormula'
|
|
165
|
+
* arrayKeyValue: 'Ntot'
|
|
166
|
+
* arrayValueField: 'quantity'
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
arrayPath?: string;
|
|
170
|
+
arrayKeyField?: string;
|
|
171
|
+
arrayKeyValue?: string;
|
|
172
|
+
arrayValueField?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Sub-rows editor config — required when `type: 'subrows'`, ignored otherwise.
|
|
175
|
+
* Drives the expandable key/percentage pair editor (see `InlineSubrowsConfig`).
|
|
176
|
+
*/
|
|
177
|
+
subrows?: InlineSubrowsConfig;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Full configuration for one inline-table instance — the "uischema" equivalent.
|
|
181
|
+
*
|
|
182
|
+
* Creating a table for a new domain means defining one `InlineTableConfig` object
|
|
183
|
+
* (and an optional `rowTransform` for business logic); the generic component handles
|
|
184
|
+
* all layout, rendering, and data binding.
|
|
185
|
+
*/
|
|
186
|
+
export interface InlineTableConfig {
|
|
187
|
+
/** Ordered list of column definitions — determines column count and order. */
|
|
188
|
+
columns: InlineColumnDef[];
|
|
189
|
+
/** i18n key for the section heading (`<h2>`). */
|
|
190
|
+
titleKey: string;
|
|
191
|
+
/**
|
|
192
|
+
* i18n key for the section description paragraph.
|
|
193
|
+
* Omit (or set to `undefined`) to hide the description.
|
|
194
|
+
*/
|
|
195
|
+
descriptionKey?: string;
|
|
196
|
+
/** i18n key for the "Add entry" dashed-button label. */
|
|
197
|
+
addLabelKey: string;
|
|
198
|
+
/** i18n key for the empty-state primary text (shown when `rows` is empty). */
|
|
199
|
+
emptyLabelKey: string;
|
|
200
|
+
/**
|
|
201
|
+
* i18n key for the empty-state hint text (secondary line).
|
|
202
|
+
* Omit to show only the primary text.
|
|
203
|
+
*/
|
|
204
|
+
emptyHintKey?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Factory function invoked when the user clicks "Add entry".
|
|
207
|
+
* Should return a fresh row object with sensible defaults (e.g. pre-initialised
|
|
208
|
+
* sub-arrays such as `ingredient`).
|
|
209
|
+
* Defaults to `() => ({})` when omitted.
|
|
210
|
+
*/
|
|
211
|
+
createRow?: () => Record<string, unknown>;
|
|
212
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SuisseBilanzMetricsService } from '../suissebilanz-dashboard/suissebilanz-metrics.service';
|
|
2
|
+
import { GaugeStatus } from '../gauge-arc/gauge-arc.component';
|
|
3
|
+
/** Compact row + expandable detail for the latest planning-balance result. */
|
|
4
|
+
export declare class PlanningResultRowComponent {
|
|
5
|
+
protected readonly STATUS_ICONS: Record<GaugeStatus, string>;
|
|
6
|
+
private readonly planning;
|
|
7
|
+
private readonly naebi;
|
|
8
|
+
private readonly metadataSvc;
|
|
9
|
+
protected readonly metricsService: SuisseBilanzMetricsService;
|
|
10
|
+
protected readonly expanded: import("@angular/core").WritableSignal<boolean>;
|
|
11
|
+
protected readonly isLoading: import("@angular/core").Signal<boolean>;
|
|
12
|
+
protected readonly hasResult: import("@angular/core").Signal<boolean>;
|
|
13
|
+
protected readonly title: import("@angular/core").Signal<string>;
|
|
14
|
+
private readonly result;
|
|
15
|
+
/** Derived overall status: worst status across all nutrient metrics. */
|
|
16
|
+
protected readonly overallStatus: import("@angular/core").Signal<GaugeStatus>;
|
|
17
|
+
/** Compact chips for the 4 nutrient metrics + rendement, with kg values merged in. */
|
|
18
|
+
protected readonly nutrientChips: import("@angular/core").Signal<{
|
|
19
|
+
key: string;
|
|
20
|
+
label: string;
|
|
21
|
+
pct: number | null;
|
|
22
|
+
kg: number | null;
|
|
23
|
+
dt: number | null;
|
|
24
|
+
status: GaugeStatus;
|
|
25
|
+
}[]>;
|
|
26
|
+
/** Areas in ha (converted from m²). */
|
|
27
|
+
protected readonly areas: import("@angular/core").Signal<{
|
|
28
|
+
sau: number;
|
|
29
|
+
sfe: number;
|
|
30
|
+
to: number;
|
|
31
|
+
} | null>;
|
|
32
|
+
protected refresh(): void;
|
|
33
|
+
protected toggleDetail(): void;
|
|
34
|
+
}
|
package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-dashboard.component.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafeUrl } from '@angular/platform-browser';
|
|
2
2
|
import { PlanningBalanceService } from '../../core/planning/planning-balance.service';
|
|
3
|
-
import { GaugeStatus } from '
|
|
3
|
+
import { GaugeStatus } from '../gauge-arc/gauge-arc.component';
|
|
4
4
|
import { SuisseBilanzMetricsService } from './suissebilanz-metrics.service';
|
|
5
5
|
/**
|
|
6
6
|
* Dashboard card displaying the 5 main SuisseBilanz metrics as semicircular
|
|
@@ -11,11 +11,19 @@ import { SuisseBilanzMetricsService } from './suissebilanz-metrics.service';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class SuisseBilanzDashboardComponent {
|
|
13
13
|
readonly embedded: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
/** Shows the official PDF download link even when `embedded` (header hidden). */
|
|
15
|
+
readonly showPdfButton: import("@angular/core").InputSignal<boolean>;
|
|
14
16
|
protected readonly planning: PlanningBalanceService;
|
|
15
17
|
private readonly sanitizer;
|
|
16
18
|
protected readonly metricsService: SuisseBilanzMetricsService;
|
|
17
19
|
private readonly result;
|
|
18
|
-
protected readonly metrics: import("@angular/core").Signal<import("
|
|
20
|
+
protected readonly metrics: import("@angular/core").Signal<import("../gauge-arc/gauge-arc.component").GaugeMetric[]>;
|
|
21
|
+
/** Surface areas in ha, derived from the latest planning result. */
|
|
22
|
+
protected readonly surfaces: import("@angular/core").Signal<{
|
|
23
|
+
sau: number;
|
|
24
|
+
sfe: number;
|
|
25
|
+
to: number;
|
|
26
|
+
} | null>;
|
|
19
27
|
protected readonly officialPdfUrl: import("@angular/core").Signal<SafeUrl | null>;
|
|
20
28
|
private prevBlobUrl;
|
|
21
29
|
private readonly blobCleanup;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GaugeMetric, GaugeStatus } from '
|
|
2
|
-
import { SuisseBilanzMetricsService } from '
|
|
1
|
+
import { GaugeMetric, GaugeStatus } from '../gauge-arc/gauge-arc.component';
|
|
2
|
+
import { SuisseBilanzMetricsService } from '../suissebilanz-dashboard/suissebilanz-metrics.service';
|
|
3
3
|
/**
|
|
4
4
|
* Slim, always-visible metrics card placed above the workflow stepper.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DEFAULT_SUIBI_METADATA, type SubmissionStatus, type SuibiVersion, type SuibiMetadata } from '../../core/metadata/suibi-metadata.types';
|
|
1
|
+
export { DEFAULT_SUIBI_METADATA, DEFAULT_COMPUTATION_MODULES, type ComputationModules, type SubmissionStatus, type SuibiVersion, type SuibiMetadata } from '../../core/metadata/suibi-metadata.types';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
1
|
import { JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
3
2
|
import { SuibiMetadata } from '../../core/metadata/suibi-metadata.types';
|
|
4
|
-
export declare class WelcomePageComponent
|
|
3
|
+
export declare class WelcomePageComponent {
|
|
5
4
|
private readonly i18n;
|
|
6
5
|
private readonly metadataSvc;
|
|
6
|
+
private readonly naebi;
|
|
7
7
|
startEvent: import("@angular/core").OutputEmitterRef<void>;
|
|
8
8
|
metadataChange: import("@angular/core").OutputEmitterRef<SuibiMetadata>;
|
|
9
9
|
private readonly baseSchema;
|
|
@@ -17,11 +17,13 @@ export declare class WelcomePageComponent implements OnInit {
|
|
|
17
17
|
readonly localizedSchema: import("@angular/core").Signal<JsonSchema>;
|
|
18
18
|
readonly localizedUi: import("@angular/core").Signal<UISchemaElement>;
|
|
19
19
|
readonly jsonFormsData: import("@angular/core").Signal<{}>;
|
|
20
|
-
|
|
20
|
+
constructor();
|
|
21
21
|
start(): void;
|
|
22
|
+
loadExampleData(): void;
|
|
22
23
|
onMetadataChange(newValue: unknown): void;
|
|
23
24
|
private normalizeJsonFormsPayload;
|
|
24
25
|
private toMetadata;
|
|
26
|
+
private extractModules;
|
|
25
27
|
private isSuibiVersion;
|
|
26
28
|
private isSubmissionStatus;
|
|
27
29
|
private isSameMetadata;
|
|
@@ -30,9 +30,7 @@ export declare class NaebiDataService {
|
|
|
30
30
|
};
|
|
31
31
|
stall: {
|
|
32
32
|
stableSystem: string;
|
|
33
|
-
stableCapacity: number;
|
|
34
33
|
stableVentilationType: number;
|
|
35
|
-
stableAirPurification: number;
|
|
36
34
|
hasStableDeepLitter: boolean;
|
|
37
35
|
hasStableManureBeltDrying: boolean;
|
|
38
36
|
stableManureRemovalFrequency: number;
|
|
@@ -41,10 +39,6 @@ export declare class NaebiDataService {
|
|
|
41
39
|
hasStableFeedingStationElevated: boolean;
|
|
42
40
|
hasStableFloorSlopedUrineDrainage: boolean;
|
|
43
41
|
hasYard: boolean;
|
|
44
|
-
yardFeeding: number;
|
|
45
|
-
yardFloorType: number;
|
|
46
|
-
yardDays: number;
|
|
47
|
-
yardHoursPerDay: number;
|
|
48
42
|
};
|
|
49
43
|
};
|
|
50
44
|
hasImpexDerivedExcretion: boolean;
|
|
@@ -52,6 +46,7 @@ export declare class NaebiDataService {
|
|
|
52
46
|
feeding: {
|
|
53
47
|
fodderConsumption: number;
|
|
54
48
|
concentratedFeedstuffConsumption: number;
|
|
49
|
+
concentratedFeedStuffConsumption: number;
|
|
55
50
|
winterFeeding: {
|
|
56
51
|
feedingRoutine: {
|
|
57
52
|
typeOfFeedstuffProduct: string;
|
|
@@ -76,19 +71,12 @@ export declare class NaebiDataService {
|
|
|
76
71
|
}[];
|
|
77
72
|
storage: {
|
|
78
73
|
stableStrawLitter: number;
|
|
79
|
-
manureSupplyProportionStored: number;
|
|
80
74
|
slurrySupplyProportionStored: number;
|
|
81
75
|
createFacilitySpecificManureProduct: boolean;
|
|
82
76
|
createFacilitySpecificSlurryProduct: boolean;
|
|
77
|
+
slurryTankQuantity: number;
|
|
83
78
|
dilutionRatio: number;
|
|
84
|
-
manurePit:
|
|
85
|
-
descriptor: string;
|
|
86
|
-
cover: number;
|
|
87
|
-
manureFromAnimalStockStored: {
|
|
88
|
-
manureDerivation: string;
|
|
89
|
-
proportionStored: number;
|
|
90
|
-
}[];
|
|
91
|
-
}[];
|
|
79
|
+
manurePit: never[];
|
|
92
80
|
slurryTank: {
|
|
93
81
|
descriptor: string;
|
|
94
82
|
volumeInM3: number;
|
|
@@ -99,20 +87,7 @@ export declare class NaebiDataService {
|
|
|
99
87
|
}[];
|
|
100
88
|
};
|
|
101
89
|
farmManureTrading: {
|
|
102
|
-
supply:
|
|
103
|
-
quantity: number;
|
|
104
|
-
typeOfManureRecyclingProduct: string;
|
|
105
|
-
transactionUnit: string;
|
|
106
|
-
manureDerivation: {
|
|
107
|
-
zoologicalAnimal: string;
|
|
108
|
-
percentageAllocation: number;
|
|
109
|
-
}[];
|
|
110
|
-
ingredient: {
|
|
111
|
-
quantity: number;
|
|
112
|
-
molecularFormula: string;
|
|
113
|
-
unit: string;
|
|
114
|
-
}[];
|
|
115
|
-
}[];
|
|
90
|
+
supply: never[];
|
|
116
91
|
dispense: {
|
|
117
92
|
quantity: number;
|
|
118
93
|
typeOfManureRecyclingProduct: string;
|
|
@@ -189,11 +164,7 @@ export declare class NaebiDataService {
|
|
|
189
164
|
typeOfFeedstuffProduct: string;
|
|
190
165
|
quantity: number;
|
|
191
166
|
transactionUnit: string;
|
|
192
|
-
ingredient:
|
|
193
|
-
quantity: number;
|
|
194
|
-
molecularFormula: string;
|
|
195
|
-
unit: string;
|
|
196
|
-
}[];
|
|
167
|
+
ingredient: never[];
|
|
197
168
|
}[];
|
|
198
169
|
};
|
|
199
170
|
cropFromNonFodderCropland: {
|
|
@@ -210,6 +181,17 @@ export declare class NaebiDataService {
|
|
|
210
181
|
totalBalanceErrorMargin: number;
|
|
211
182
|
};
|
|
212
183
|
fieldCultivation: {
|
|
184
|
+
buildingZoneAreaSize: number;
|
|
185
|
+
outdoorVegetableMainCropAreaSize: number;
|
|
186
|
+
indoorVegetableMainCropAreaSize: number;
|
|
187
|
+
feedingOfCropHarvest: {
|
|
188
|
+
agronomicCropCategory: string;
|
|
189
|
+
effectiveYield: number;
|
|
190
|
+
}[];
|
|
191
|
+
dispenseOfCropHarvest: {
|
|
192
|
+
agronomicCropCategory: string;
|
|
193
|
+
effectiveYield: number;
|
|
194
|
+
}[];
|
|
213
195
|
fodderCropland: ({
|
|
214
196
|
agronomicCropCategory: string;
|
|
215
197
|
isMainCrop: boolean;
|
|
@@ -228,12 +210,18 @@ export declare class NaebiDataService {
|
|
|
228
210
|
isMainCrop: boolean;
|
|
229
211
|
areaSize: number;
|
|
230
212
|
yieldPerSquareMeasure: number;
|
|
213
|
+
hasLongTermYieldDivergence: boolean;
|
|
231
214
|
}[];
|
|
232
215
|
special: {
|
|
233
216
|
agronomicCropCategory: string;
|
|
234
217
|
userSpecificPlantName: string;
|
|
235
218
|
isMainCrop: boolean;
|
|
236
219
|
areaSize: number;
|
|
220
|
+
requirementCorrection: {
|
|
221
|
+
quantity: number;
|
|
222
|
+
molecularFormula: string;
|
|
223
|
+
unit: string;
|
|
224
|
+
}[];
|
|
237
225
|
}[];
|
|
238
226
|
};
|
|
239
227
|
generateReport: boolean;
|