@agridea/suibi-module 0.1.0-preview.387f5dc → 0.1.0-preview.3e5b741
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/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.387f5dc.css → suibi-module.v0.1.0-preview.3e5b741.css} +1 -1
- package/dist/elements/browser/suibi-module.v0.1.0-preview.3e5b741.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 +222 -0
- package/dist/types/app/components/inline-table/inline-table.component.d.ts +67 -4
- package/dist/types/app/components/inline-table/inline-table.types.d.ts +87 -4
- package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-dashboard.component.d.ts +2 -0
- package/dist/types/app/core/i18n/i18n.service.d.ts +3 -0
- package/dist/types/app/core/navigation/navigation.service.d.ts +7 -0
- package/dist/types/app/core/planning/planning-balance.service.d.ts +8 -0
- package/dist/types/app/core/utils/custom-unit.util.d.ts +39 -0
- package/dist/types/app/core/utils/object.util.d.ts +19 -7
- package/dist/types/app/core/validation/ajv-custom.d.ts +1 -0
- package/dist/types/app/core/validation/capabilities.d.ts +6 -0
- package/dist/types/app/core/validation/global-validation.service.d.ts +2 -0
- package/dist/types/app/jsonforms/renderers/controls/selects/animal-category/animal-category-select.renderer.d.ts +4 -1
- package/dist/types/app/jsonforms/renderers/controls/selects/code-list/code-list-select.renderer.d.ts +4 -1
- package/dist/types/app/jsonforms/renderers/layout/group/module-toggle-group.renderer.d.ts +3 -1
- package/dist/types/app/jsonforms/shared/searchable-select/search-highlight.d.ts +18 -0
- package/dist/types/app/jsonforms/shared/searchable-select/searchable-select.component.d.ts +63 -0
- package/dist/types/app/nutrient-cycle/animal-stock/{animal-stock-detail.component.d.ts → animal-stock-detail/animal-stock-detail.component.d.ts} +3 -2
- package/dist/types/app/nutrient-cycle/animal-stock/{animal-stock-list.component.d.ts → animal-stock-list/animal-stock-list.component.d.ts} +1 -1
- 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 +37 -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 +23 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/arable-land-table/arable-land-table.config.d.ts +16 -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.component.d.ts → field-cultivation-detail/field-cultivation-detail.component.d.ts} +2 -2
- package/dist/types/app/nutrient-cycle/field-cultivation/{field-cultivation-general.component.d.ts → field-cultivation-general/field-cultivation-general.component.d.ts} +2 -4
- package/dist/types/app/nutrient-cycle/field-cultivation/{field-cultivation-list.component.d.ts → field-cultivation-list/field-cultivation-list.component.d.ts} +1 -1
- 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 +6 -1
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.util.d.ts +4 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/fodder-cropland-table/fodder-cropland-table.component.d.ts +29 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/fodder-cropland-table/fodder-cropland-table.config.d.ts +21 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/index.d.ts +8 -3
- 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 +51 -0
- package/dist/types/app/nutrient-cycle/field-spreading/fertiliser-table/fertiliser-table.component.d.ts +24 -9
- package/dist/types/app/nutrient-cycle/field-spreading/field-spreading.component.d.ts +2 -0
- package/dist/types/app/nutrient-cycle/field-spreading/field-spreading.types.d.ts +2 -0
- package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.component.d.ts +10 -9
- 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 +2 -3
- package/dist/types/app/nutrient-cycle/fodder/ingredient.util.d.ts +8 -0
- package/dist/types/app/nutrient-cycle/storage/index.d.ts +3 -3
- 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} +4 -4
- package/dist/types/app/nutrient-cycle/storage/{storage-list.component.d.ts → storage-list/storage-list.component.d.ts} +1 -1
- package/dist/types/app/nutrient-cycle/storage/{storage-master-detail.component.d.ts → storage-master-detail/storage-master-detail.component.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/elements/browser/suibi-module.v0.1.0-preview.387f5dc.js +0 -78
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-detail.component.d.ts +0 -26
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-list.component.d.ts +0 -22
- 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/field-cultivation/field-cultivation-master-detail.component.d.ts +0 -37
- package/dist/types/app/nutrient-cycle/fodder/fodder-detail.component.d.ts +0 -31
- package/dist/types/app/nutrient-cycle/fodder/fodder-list.component.d.ts +0 -20
- package/dist/types/app/nutrient-cycle/fodder/fodder-master-detail.component.d.ts +0 -37
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column and section configuration for the special-crops inline table
|
|
3
|
+
* ("Cultures spéciales" tab).
|
|
4
|
+
*
|
|
5
|
+
* ONE table for the whole CULT_SPECIAL category: the crop dropdown reuses the
|
|
6
|
+
* `agronomicCropCategorySpecial` code list, which is already filtered on
|
|
7
|
+
* cultivationCategory === 'CULT_SPECIAL'. The nutrient columns are the three
|
|
8
|
+
* corrections (P2O5/K2O/Mg slots in %) living in the row's
|
|
9
|
+
* `requirementCorrection[]` sub-array.
|
|
10
|
+
*/
|
|
11
|
+
import type { InlineTableConfig } from '../../../components/inline-table/inline-table.types';
|
|
12
|
+
/** Correction slots managed by the table, always expressed in % (100 % = no correction). */
|
|
13
|
+
export declare const CORRECTION_FORMULAS: readonly ["P2O5", "K2O", "Mg"];
|
|
14
|
+
export declare const CORRECTION_UNIT = "%";
|
|
15
|
+
export declare const CORRECTION_DEFAULT = 100;
|
|
16
|
+
/** Code list feeding the crop dropdown — the whole CULT_SPECIAL category. */
|
|
17
|
+
export declare const SPECIAL_CROPS_CODE_LIST = "agronomicCropCategorySpecial";
|
|
18
|
+
/** Crop ids permitted in the table — every CULT_SPECIAL entry of the master data. */
|
|
19
|
+
export declare const SPECIAL_CROPS_IDS: Set<string>;
|
|
20
|
+
/** Looks up a crop entry in the table's code list. */
|
|
21
|
+
export declare function specialCropEntry(id: unknown): Record<string, unknown> | undefined;
|
|
22
|
+
/** True when the row's crop belongs to the outdoor-vegetable subcategory (CSC_OUTVG). */
|
|
23
|
+
export declare function isOutdoorVegetableRow(row: Record<string, unknown>): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Enforces the isMainCrop rule: null for CSC_OUTVG crops (the main-crop concept does
|
|
26
|
+
* not apply), restored to false when switching back to a crop where the flag applies.
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeIsMainCrop(row: Record<string, unknown>): Record<string, unknown>;
|
|
29
|
+
/** Corrections (P2O5/K2O/Mg) apply to every special crop; locked only without a crop. */
|
|
30
|
+
export declare function correctionColumnsLocked(crop: Record<string, unknown> | undefined): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Applies the crop's defaults to the requirement-correction slots:
|
|
33
|
+
* - No crop selected: the managed slots are removed entirely — nothing is editable
|
|
34
|
+
* and nothing is sent to the API.
|
|
35
|
+
* - Crop selected: the three corrections (P2O5/K2O/Mg) are reset to 100 % and
|
|
36
|
+
* stay user-editable.
|
|
37
|
+
*/
|
|
38
|
+
export declare function applyCropDefaults(row: Record<string, unknown>, crop: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* Normalizes the managed requirement-correction slots on every edit: fixed unit
|
|
41
|
+
* (%) and removal of managed entries left without a quantity (the API rejects
|
|
42
|
+
* present-but-null quantities).
|
|
43
|
+
*/
|
|
44
|
+
export declare function normalizeManagedCorrections(row: Record<string, unknown>): Record<string, unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* Shared column definitions for the requirement-correction sub-array (P2O5/K2O/Mg),
|
|
47
|
+
* reusable across fodder, arable and special tables. `lockCorrections` disables
|
|
48
|
+
* editing per row.
|
|
49
|
+
*/
|
|
50
|
+
export declare function requirementCorrectionColumns(lockCorrections: (row: Record<string, unknown>) => boolean): InlineTableConfig['columns'];
|
|
51
|
+
export declare const SPECIAL_CROPS_TABLE_CONFIG: InlineTableConfig;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InlineColumnDef } from '../../../components/inline-table/inline-table.types';
|
|
1
2
|
import { FieldSpreadingFertiliserEntry } from '../field-spreading.types';
|
|
2
3
|
/**
|
|
3
4
|
* FertiliserTableComponent — thin wrapper around InlineTableComponent.
|
|
@@ -17,8 +18,11 @@ import { FieldSpreadingFertiliserEntry } from '../field-spreading.types';
|
|
|
17
18
|
* 3. The generic InlineTableComponent requires no changes.
|
|
18
19
|
*/
|
|
19
20
|
export declare class FertiliserTableComponent {
|
|
21
|
+
private readonly i18n;
|
|
20
22
|
readonly entries: import("@angular/core").InputSignal<FieldSpreadingFertiliserEntry[]>;
|
|
21
23
|
readonly entriesChange: import("@angular/core").OutputEmitterRef<FieldSpreadingFertiliserEntry[]>;
|
|
24
|
+
/** Row index to highlight after a validation-error deep-link (forwarded to the table). */
|
|
25
|
+
readonly highlightRowIndex: import("@angular/core").InputSignal<number | null>;
|
|
22
26
|
/** Column/section config exposed to the template (constant — no signal needed). */
|
|
23
27
|
protected readonly config: import("../../../components/inline-table/inline-table.types").InlineTableConfig;
|
|
24
28
|
/** Cast typed entries to the generic Record[] expected by InlineTableComponent. */
|
|
@@ -29,15 +33,26 @@ export declare class FertiliserTableComponent {
|
|
|
29
33
|
/**
|
|
30
34
|
* Row transform for auto-populating nutrient columns when a product is selected.
|
|
31
35
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
36
|
+
* Unit handling: `transactionUnit` is user-selectable between kg and its custom units
|
|
37
|
+
* (t, dt). Switching the unit converts the already-entered quantity so the amount is
|
|
38
|
+
* preserved; legacy/imported rows without a unit default to kg.
|
|
35
39
|
*
|
|
36
|
-
* Defined as an arrow-function property so
|
|
37
|
-
*
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
* Defined as an arrow-function property so it can be passed as a value to
|
|
41
|
+
* InlineTableComponent without losing its context.
|
|
42
|
+
*/
|
|
43
|
+
readonly autoPopulateNutrients: (changedKey: string, newValue: unknown, row: Record<string, unknown>, previousRow?: Record<string, unknown>) => Record<string, unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* Applies a preconfigured product to the row: designation (current locale), product
|
|
46
|
+
* category and the four nutrient contents. Clearing the selection only removes the
|
|
47
|
+
* host-only productNumber link — values already entered stay untouched.
|
|
48
|
+
*/
|
|
49
|
+
private applyPreconfiguredProduct;
|
|
50
|
+
/**
|
|
51
|
+
* Per-cell validation for the nutrient % columns: each value capped at 100 %
|
|
52
|
+
* and the sum of the four ingredients capped at 100 % per row.
|
|
53
|
+
* The inline table bypasses JSONForms/AJV, so these rules (mirroring the
|
|
54
|
+
* `maximum` / `proportionSum` keywords in schema.json) must be surfaced
|
|
55
|
+
* visually here — the global validation panel alone is not visible while typing.
|
|
41
56
|
*/
|
|
42
|
-
readonly
|
|
57
|
+
readonly nutrientCellError: (row: Record<string, unknown>, col: InlineColumnDef) => string | null;
|
|
43
58
|
}
|
|
@@ -5,6 +5,8 @@ export declare class FieldSpreadingComponent {
|
|
|
5
5
|
private readonly navigationSvc;
|
|
6
6
|
private readonly i18n;
|
|
7
7
|
constructor();
|
|
8
|
+
/** Fertiliser row to highlight (set by validation deep-links, cleared by the next one). */
|
|
9
|
+
readonly highlightedFertiliserIndex: import("@angular/core").WritableSignal<number | null>;
|
|
8
10
|
readonly schema: import("@angular/core").Signal<JsonSchema>;
|
|
9
11
|
readonly localizedGeneralUi: import("@angular/core").Signal<import("@jsonforms/core").UISchemaElement>;
|
|
10
12
|
readonly renderers: {
|
|
@@ -23,7 +23,9 @@ export interface FieldSpreadingIngredient {
|
|
|
23
23
|
unit?: string | null;
|
|
24
24
|
}
|
|
25
25
|
export interface FieldSpreadingFertiliserEntry {
|
|
26
|
+
descriptor?: string | null;
|
|
26
27
|
fertiliserProductCategory?: string | null;
|
|
28
|
+
productNumber?: number | null;
|
|
27
29
|
quantity?: number | null;
|
|
28
30
|
transactionUnit?: string | null;
|
|
29
31
|
ingredient?: FieldSpreadingIngredient[];
|
package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.component.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import { FieldSpreadingRecyclingEntry } from '../field-spreading.types';
|
|
|
6
6
|
* 1. Provides `RECYCLING_TABLE_CONFIG` (the column/section "uischema").
|
|
7
7
|
* 2. Bridges typed `FieldSpreadingRecyclingEntry[]` to/from the generic
|
|
8
8
|
* `Record<string, unknown>[]` API of InlineTableComponent.
|
|
9
|
-
* 3. Supplies `deriveUnits` as a `rowTransform` — `transactionUnit` ('kg'/'m3')
|
|
10
|
-
* ingredient's `unit` ('kg/t'/'kg/m3') are
|
|
11
|
-
* matterState
|
|
12
|
-
*
|
|
9
|
+
* 3. Supplies `deriveUnits` as a `rowTransform` — the base `transactionUnit` ('kg'/'m3')
|
|
10
|
+
* and every ingredient's `unit` ('kg/t'/'kg/m3') are derived from the selected
|
|
11
|
+
* product's matterState; the user may switch to a custom unit sharing the same base
|
|
12
|
+
* (t, dt for kg), which converts the entered quantity on the fly.
|
|
13
13
|
*/
|
|
14
14
|
export declare class RecyclingTableComponent {
|
|
15
15
|
readonly entries: import("@angular/core").InputSignal<FieldSpreadingRecyclingEntry[]>;
|
|
@@ -22,10 +22,11 @@ export declare class RecyclingTableComponent {
|
|
|
22
22
|
* ingredient with a 0 quantity so it never reaches the final JSON. */
|
|
23
23
|
onRowsChange(rows: Record<string, unknown>[]): void;
|
|
24
24
|
/**
|
|
25
|
-
* Row transform
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* Row transform deriving the ingredient units from the product's matterState on each
|
|
26
|
+
* edit, and handling `transactionUnit`:
|
|
27
|
+
* - product change (or missing unit on legacy rows): reset to the derived base unit,
|
|
28
|
+
* - unit switch: convert the entered quantity from the previous to the new unit
|
|
29
|
+
* (both share the same base), so the transacted amount is preserved.
|
|
29
30
|
*/
|
|
30
|
-
readonly deriveUnits: (
|
|
31
|
+
readonly deriveUnits: (changedKey: string, newValue: unknown, row: Record<string, unknown>, previousRow?: Record<string, unknown>) => Record<string, unknown>;
|
|
31
32
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FodderCropFromNonFodderCropland, FodderDispense, FodderSupply, FodderTableRow } from '../fodder.types';
|
|
2
|
+
export declare class FodderMasterDetailComponent {
|
|
3
|
+
private readonly dataSvc;
|
|
4
|
+
private readonly navigationSvc;
|
|
5
|
+
constructor();
|
|
6
|
+
readonly supplyRows: import("@angular/core").Signal<FodderSupply[]>;
|
|
7
|
+
readonly dispenseRows: import("@angular/core").Signal<FodderDispense[]>;
|
|
8
|
+
readonly nonFodderCroplandRows: import("@angular/core").Signal<FodderCropFromNonFodderCropland[]>;
|
|
9
|
+
readonly proportionStorageLoss: import("@angular/core").Signal<number | undefined>;
|
|
10
|
+
readonly totalBalanceErrorMargin: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
/** Rows in the order last produced by the table (local UI order); null = follow the data. */
|
|
12
|
+
private readonly uiRows;
|
|
13
|
+
/** Data-derived merged list: supply block, then dispense, then non-fodder cropland. */
|
|
14
|
+
private readonly dataRows;
|
|
15
|
+
/** Rows shown in the table. The local UI order wins so that adding a row or changing its
|
|
16
|
+
* type never reshuffles the list under the user's hands. */
|
|
17
|
+
readonly rows: import("@angular/core").Signal<FodderTableRow[]>;
|
|
18
|
+
/** Persists the edited rows (split back into their three collections) while keeping the
|
|
19
|
+
* emitted order as the local UI order. */
|
|
20
|
+
onRowsChange(rows: FodderTableRow[]): void;
|
|
21
|
+
onScalarInput(field: 'proportionStorageLoss' | 'totalBalanceErrorMargin', event: Event): void;
|
|
22
|
+
scalarInputValue(value: number | undefined): string;
|
|
23
|
+
private cloneFodder;
|
|
24
|
+
private cloneTrading;
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FodderTableRow } from '../fodder.types';
|
|
2
|
+
/**
|
|
3
|
+
* FodderTableComponent — thin wrapper around InlineTableComponent for the merged fodder table
|
|
4
|
+
* (supply / dispense / non-fodder cropland in one table, distinguished per row via `rowKind`).
|
|
5
|
+
* The config provides the columns; the rowTransform imposes the fixed units (transactionUnit
|
|
6
|
+
* 'kg', dry-matter ingredient T/S in '%') and keeps the product compatible with the row kind.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FodderTableComponent {
|
|
9
|
+
readonly entries: import("@angular/core").InputSignal<FodderTableRow[]>;
|
|
10
|
+
readonly entriesChange: import("@angular/core").OutputEmitterRef<FodderTableRow[]>;
|
|
11
|
+
/** Column/section config (constant — no signal needed). */
|
|
12
|
+
protected readonly config: import("../../../components/inline-table/inline-table.types").InlineTableConfig;
|
|
13
|
+
/** Cast typed entries to the generic Record[] expected by InlineTableComponent. */
|
|
14
|
+
readonly rowsForTable: import("@angular/core").Signal<Record<string, unknown>[]>;
|
|
15
|
+
onRowsChange(rows: Record<string, unknown>[]): void;
|
|
16
|
+
/**
|
|
17
|
+
* Domain rules applied on every edit:
|
|
18
|
+
* - `rowKind` change: normalize unknown/cleared values to 'supply' and clear the product
|
|
19
|
+
* when it is not permitted for the new kind.
|
|
20
|
+
* - Product change: pre-fill the dry matter share (T/S %) with the product's
|
|
21
|
+
* `standardDryMatterContent` (stays editable afterwards; null when none is defined).
|
|
22
|
+
* - `transactionUnit` is selectable between kg and its custom units (t, dt): switching
|
|
23
|
+
* converts the entered quantity so the amount is preserved; rows without a unit
|
|
24
|
+
* default to kg. The only permitted ingredient is dry matter (T/S) in % — re-appended
|
|
25
|
+
* when missing.
|
|
26
|
+
*/
|
|
27
|
+
readonly enforceFodderRules: (changedKey: string, newValue: unknown, row: Record<string, unknown>, previousRow?: Record<string, unknown>) => Record<string, unknown>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column and section configuration for the single fodder inline table.
|
|
3
|
+
*
|
|
4
|
+
* The three former mode tabs (supply / dispense / non-fodder cropland) are merged into one
|
|
5
|
+
* table: each row picks its kind via the `rowKind` select column, and the product dropdown
|
|
6
|
+
* is narrowed per row to the products permitted for that kind.
|
|
7
|
+
*/
|
|
8
|
+
import type { InlineTableConfig } from '../../../components/inline-table/inline-table.types';
|
|
9
|
+
export declare const FODDER_TABLE_CONFIG: InlineTableConfig;
|
|
@@ -25,3 +25,10 @@ export interface FodderData {
|
|
|
25
25
|
proportionStorageLoss?: number;
|
|
26
26
|
totalBalanceErrorMargin?: number;
|
|
27
27
|
}
|
|
28
|
+
/** UI-only discriminator telling which fodder collection a table row belongs to. */
|
|
29
|
+
export type FodderRowKind = 'supply' | 'dispense' | 'non_fodder_cropland';
|
|
30
|
+
/** Row shape used by the inline fodder table: a trading entry tagged with its row kind.
|
|
31
|
+
* `rowKind` is stripped again when the rows are written back to the data model. */
|
|
32
|
+
export type FodderTableRow = FodderTradingEntry & {
|
|
33
|
+
rowKind: FodderRowKind;
|
|
34
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './fodder-
|
|
2
|
-
export * from './fodder-detail.component';
|
|
3
|
-
export * from './fodder-master-detail.component';
|
|
1
|
+
export * from './fodder-table/fodder-table.component';
|
|
2
|
+
export * from './fodder-master-detail/fodder-master-detail.component';
|
|
4
3
|
export * from './fodder.types';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dry matter (Trockensubstanz, T/S) is the only ingredient formula permitted for fodder
|
|
3
|
+
* entries (see `fodderMolecularFormula` in code-lists.ts) and its only allowed unit is '%'
|
|
4
|
+
* (assets/master-data/substances.json → S.1007.1). Both are imposed, never user-picked.
|
|
5
|
+
*/
|
|
6
|
+
export declare const FODDER_INGREDIENT_FORMULA = "T/S";
|
|
7
|
+
export declare const FODDER_INGREDIENT_UNIT = "%";
|
|
8
|
+
export declare function deriveFodderIngredientUnit(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './storage-list.component';
|
|
2
|
-
export * from './storage-detail.component';
|
|
3
|
-
export * from './storage-master-detail.component';
|
|
1
|
+
export * from './storage-list/storage-list.component';
|
|
2
|
+
export * from './storage-detail/storage-detail.component';
|
|
3
|
+
export * from './storage-master-detail/storage-master-detail.component';
|
|
4
4
|
export * from './storage.types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
2
|
-
import { ManurePitEntry, SlurryTankEntry, StorageEntryType } from '
|
|
2
|
+
import { ManurePitEntry, SlurryTankEntry, StorageEntryType } from '../storage.types';
|
|
3
3
|
export declare class StorageDetailComponent {
|
|
4
4
|
private readonly i18n;
|
|
5
5
|
readonly type: import("@angular/core").InputSignal<StorageEntryType>;
|
|
@@ -17,7 +17,7 @@ export declare class StorageDetailComponent {
|
|
|
17
17
|
readonly jsonFormsData: import("@angular/core").Signal<(({
|
|
18
18
|
descriptor?: string;
|
|
19
19
|
cover?: number | null;
|
|
20
|
-
manureFromAnimalStockStored?: import("
|
|
20
|
+
manureFromAnimalStockStored?: import("..").ManureFromAnimalStockStored[];
|
|
21
21
|
} | {
|
|
22
22
|
descriptor?: string;
|
|
23
23
|
volumeInM3?: number | null;
|
|
@@ -25,6 +25,6 @@ export declare class StorageDetailComponent {
|
|
|
25
25
|
cover?: number | null;
|
|
26
26
|
mixingFrequency?: number | null;
|
|
27
27
|
manureDerivation?: string[];
|
|
28
|
-
}) & import("
|
|
28
|
+
}) & import("../../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
|
|
29
29
|
onDataChange(event: unknown): void;
|
|
30
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
2
|
-
import { StorageNormalized } from '
|
|
2
|
+
import { StorageNormalized } from '../storage.types';
|
|
3
3
|
type StorageSection = 'manure' | 'slurry' | 'slurryFacilityToggle' | 'general';
|
|
4
4
|
export declare class StorageGeneralComponent {
|
|
5
5
|
private readonly i18n;
|
|
@@ -17,13 +17,13 @@ export declare class StorageGeneralComponent {
|
|
|
17
17
|
stableStrawLitter: number | null;
|
|
18
18
|
manureSupplyProportionStored: number | null;
|
|
19
19
|
createFacilitySpecificManureProduct: boolean;
|
|
20
|
-
} & import("
|
|
20
|
+
} & import("../../../core/schemas/ui-helper-registry").UiHelperDefinitions) | ({
|
|
21
21
|
createFacilitySpecificSlurryProduct: boolean;
|
|
22
|
-
} & import("
|
|
22
|
+
} & import("../../../core/schemas/ui-helper-registry").UiHelperDefinitions) | ({
|
|
23
23
|
slurrySupplyProportionStored: number | null;
|
|
24
24
|
slurryTankQuantity: number | null;
|
|
25
25
|
dilutionRatio: number | null;
|
|
26
|
-
} & import("
|
|
26
|
+
} & import("../../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
|
|
27
27
|
onDataChange(event: unknown): void;
|
|
28
28
|
}
|
|
29
29
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ManurePitEntry, SlurryTankEntry, StorageEntryType } from '
|
|
1
|
+
import { ManurePitEntry, SlurryTankEntry, StorageEntryType } from '../storage.types';
|
|
2
2
|
export declare class StorageListComponent {
|
|
3
3
|
private readonly i18n;
|
|
4
4
|
private readonly masterData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StorageTab } from '
|
|
2
|
-
import { ManurePitEntry, SlurryTankEntry, StorageEntryType, StorageNormalized } from '
|
|
1
|
+
import { StorageTab } from '../../../core/navigation/navigation.service';
|
|
2
|
+
import { ManurePitEntry, SlurryTankEntry, StorageEntryType, StorageNormalized } from '../storage.types';
|
|
3
3
|
export declare class StorageMasterDetailComponent {
|
|
4
4
|
private readonly dataSvc;
|
|
5
5
|
private readonly navigationSvc;
|