@agridea/suibi-module 0.1.0-preview.557ea51 → 0.1.0-preview.5f912f0

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.
Files changed (60) hide show
  1. package/README.md +10 -10
  2. package/dist/elements/browser/main.js +71 -71
  3. package/dist/elements/browser/suibi-module-latest.js +71 -71
  4. package/dist/elements/browser/suibi-module.v0.1.0-preview.5f912f0.js +78 -0
  5. package/dist/elements/browser/version.txt +1 -1
  6. package/dist/types/app/components/data-preview/data-preview.component.d.ts +1 -2
  7. package/dist/types/app/components/{suissebilanz-dashboard → gauge-arc}/gauge-arc.component.d.ts +2 -0
  8. package/dist/types/app/{header-bar.d.ts → components/header-bar/header-bar.component.d.ts} +2 -2
  9. package/dist/types/app/components/inline-table/inline-table.component.d.ts +104 -0
  10. package/dist/types/app/components/inline-table/inline-table.types.d.ts +127 -0
  11. package/dist/types/app/components/planning-result-row/planning-result-row.component.d.ts +34 -0
  12. package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-dashboard.component.d.ts +8 -2
  13. package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-metrics.service.d.ts +1 -1
  14. package/dist/types/app/components/{suissebilanz-dashboard → suissebilanz-minibar}/suissebilanz-minibar.component.d.ts +2 -2
  15. package/dist/types/app/components/welcome-page/metadata.types.d.ts +1 -1
  16. package/dist/types/app/components/welcome-page/welcome-page.component.d.ts +5 -3
  17. package/dist/types/app/core/data/naebi-data.service.d.ts +22 -34
  18. package/dist/types/app/core/error/global-error-handler.d.ts +2 -3
  19. package/dist/types/app/core/i18n/i18n.service.d.ts +4 -3
  20. package/dist/types/app/core/i18n/locales/fr.d.ts +2 -0
  21. package/dist/types/app/core/i18n/locales/it.d.ts +2 -0
  22. package/dist/types/app/core/metadata/suibi-metadata.types.d.ts +11 -1
  23. package/dist/types/app/core/navigation/navigation.service.d.ts +8 -0
  24. package/dist/types/app/core/planning/planning-balance.service.d.ts +1 -0
  25. package/dist/types/app/core/validation/global-validation.service.d.ts +5 -1
  26. package/dist/types/app/jsonforms/registry/renderers.registry.d.ts +4 -0
  27. package/dist/types/app/jsonforms/renderers/controls/selects/animal-category/animal-category-select.renderer.d.ts +1 -1
  28. package/dist/types/app/jsonforms/renderers/layout/constraint/constraint-layout.renderer.d.ts +1 -0
  29. package/dist/types/app/jsonforms/renderers/layout/group/base-group.renderer.d.ts +2 -0
  30. package/dist/types/app/jsonforms/renderers/layout/group/module-toggle-group.renderer.d.ts +36 -0
  31. package/dist/types/app/nutrient-cycle/animal-stock/animal-stock-detail.component.d.ts +7 -8
  32. package/dist/types/app/nutrient-cycle/animal-stock/animal-stock-list.component.d.ts +5 -8
  33. package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-detail.component.d.ts +8 -9
  34. package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-list.component.d.ts +6 -7
  35. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-detail.component.d.ts +22 -0
  36. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-general.component.d.ts +22 -0
  37. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-list.component.d.ts +17 -0
  38. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-master-detail.component.d.ts +37 -0
  39. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.types.d.ts +40 -0
  40. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.util.d.ts +6 -0
  41. package/dist/types/app/nutrient-cycle/field-cultivation/index.d.ts +4 -0
  42. package/dist/types/app/nutrient-cycle/field-spreading/fertiliser-table/fertiliser-table.component.d.ts +38 -0
  43. package/dist/types/app/nutrient-cycle/field-spreading/fertiliser-table/fertiliser-table.config.d.ts +20 -0
  44. package/dist/types/app/nutrient-cycle/field-spreading/field-spreading.component.d.ts +16 -3
  45. package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.component.d.ts +22 -0
  46. package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.config.d.ts +17 -0
  47. package/dist/types/app/nutrient-cycle/fodder/fodder-detail.component.d.ts +8 -9
  48. package/dist/types/app/nutrient-cycle/fodder/fodder-list.component.d.ts +6 -7
  49. package/dist/types/app/nutrient-cycle/fodder/fodder-master-detail.component.d.ts +1 -1
  50. package/dist/types/app/nutrient-cycle/fodder/index.d.ts +4 -0
  51. package/dist/types/app/nutrient-cycle/lifetime-performance/index.d.ts +2 -0
  52. package/dist/types/app/nutrient-cycle/storage/index.d.ts +4 -0
  53. package/dist/types/app/nutrient-cycle/storage/storage-general.component.d.ts +1 -1
  54. package/dist/types/app/nutrient-cycle/storage/storage-list.component.d.ts +3 -0
  55. package/dist/types/app/nutrient-cycle/storage/storage-master-detail.component.d.ts +4 -3
  56. package/package.json +68 -17
  57. package/dist/elements/browser/suibi-module.v0.1.0-preview.557ea51.js +0 -78
  58. /package/dist/elements/browser/{suibi-module.v0.1.0-preview.557ea51.css → suibi-module.v0.1.0-preview.5f912f0.css} +0 -0
  59. /package/dist/types/app/components/{planning-result → planning-trigger}/planning-trigger.component.d.ts +0 -0
  60. /package/dist/types/app/{core/validation/validation-errors-panel.d.ts → components/validation-errors-panel/validation-errors-panel.component.d.ts} +0 -0
@@ -21,6 +21,8 @@ export declare class BaseGroupRenderer extends JsonFormsBaseRenderer<GroupLayout
21
21
  registryRenderers(): JsonFormsRendererRegistryEntry[];
22
22
  registryCells(): JsonFormsCellRendererRegistryEntry[] | undefined;
23
23
  private subscription;
24
+ private _destroyed;
25
+ private _prevSig?;
24
26
  ngOnInit(): void;
25
27
  ngOnDestroy(): void;
26
28
  protected resolveHost(): ViewContainerRef | undefined;
@@ -0,0 +1,36 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { JsonFormsBaseRenderer } from '@jsonforms/angular';
3
+ import { GroupLayout, RankedTester } from '@jsonforms/core';
4
+ interface ModuleCard {
5
+ path: string;
6
+ value: boolean;
7
+ label: string;
8
+ description?: string;
9
+ }
10
+ export declare const moduleToggleGroupTester: RankedTester;
11
+ /**
12
+ * Layout renderer for `{ type: 'Group', options: { variant: 'module-toggle' } }`.
13
+ *
14
+ * Renders boolean control children as interactive card-toggles in a horizontal
15
+ * row. Label and description are read from the (already-localised) schema that
16
+ * JSONForms passes into the renderer, so no extra i18n wiring is needed here.
17
+ */
18
+ export declare class ModuleToggleGroupRenderer extends JsonFormsBaseRenderer<GroupLayout> implements OnInit, OnDestroy {
19
+ private readonly service;
20
+ private readonly cdr;
21
+ private subscription?;
22
+ protected readonly _hidden: import("@angular/core").WritableSignal<boolean>;
23
+ protected readonly _label: import("@angular/core").WritableSignal<string | undefined>;
24
+ protected readonly _description: import("@angular/core").WritableSignal<string | undefined>;
25
+ protected readonly _modules: import("@angular/core").WritableSignal<ModuleCard[]>;
26
+ readonly labelId: string;
27
+ hidden: () => boolean;
28
+ label: () => string | undefined;
29
+ description: () => string | undefined;
30
+ modules: () => ModuleCard[];
31
+ ngOnInit(): void;
32
+ ngOnDestroy(): void;
33
+ /** Flip a single module boolean in the JSONForms data store. */
34
+ toggle(dataPath: string): void;
35
+ }
36
+ export {};
@@ -1,17 +1,16 @@
1
- import { EventEmitter, Signal } from '@angular/core';
2
1
  import { JsonSchema, UISchemaElement } from '@jsonforms/core';
3
2
  import { AnimalStockRow } from './animal-stock.types';
4
3
  import { ErrorObject } from 'ajv';
5
4
  export declare class AnimalStockDetailComponent {
6
5
  private readonly i18n;
7
- row: Signal<AnimalStockRow | null>;
8
- index: Signal<number | null>;
9
- rowChange: EventEmitter<AnimalStockRow>;
10
- close: EventEmitter<void>;
11
- itemSchema: Signal<JsonSchema>;
6
+ row: import("@angular/core").InputSignal<AnimalStockRow | null>;
7
+ index: import("@angular/core").InputSignal<number | null>;
8
+ rowChange: import("@angular/core").OutputEmitterRef<AnimalStockRow>;
9
+ close: import("@angular/core").OutputEmitterRef<void>;
10
+ itemSchema: import("@angular/core").Signal<JsonSchema>;
12
11
  private readonly baseUi;
13
- localizedUi: Signal<UISchemaElement>;
14
- jsonFormsData: Signal<(AnimalStockRow & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
12
+ localizedUi: import("@angular/core").Signal<UISchemaElement>;
13
+ jsonFormsData: import("@angular/core").Signal<(AnimalStockRow & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
15
14
  readonly renderers: {
16
15
  tester: import("@jsonforms/core").RankedTester;
17
16
  renderer: any;
@@ -1,15 +1,12 @@
1
- import { EventEmitter, Signal } from '@angular/core';
2
- import { MatTable } from '@angular/material/table';
3
1
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
4
2
  import { AnimalStockRow } from './animal-stock.types';
5
3
  export declare class AnimalStockListComponent {
6
4
  private readonly masterData;
7
- table: MatTable<AnimalStockRow>;
8
- rows: Signal<AnimalStockRow[]>;
9
- select: EventEmitter<number>;
10
- add: EventEmitter<void>;
11
- delete: EventEmitter<number>;
12
- reorder: EventEmitter<{
5
+ rows: import("@angular/core").InputSignal<AnimalStockRow[]>;
6
+ select: import("@angular/core").OutputEmitterRef<number>;
7
+ add: import("@angular/core").OutputEmitterRef<void>;
8
+ delete: import("@angular/core").OutputEmitterRef<number>;
9
+ reorder: import("@angular/core").OutputEmitterRef<{
13
10
  previousIndex: number;
14
11
  currentIndex: number;
15
12
  }>;
@@ -1,15 +1,14 @@
1
- import { EventEmitter, Signal } from '@angular/core';
2
1
  import { JsonSchema, UISchemaElement } from '@jsonforms/core';
3
2
  import { FarmManureTradingSupply, FarmManureTradingDispense } from './farm-manure-trading.types';
4
3
  type Mode = 'supply' | 'dispense';
5
4
  type TradingRow = FarmManureTradingSupply | FarmManureTradingDispense;
6
5
  export declare class FarmManureTradingDetailComponent {
7
6
  private readonly i18n;
8
- row: Signal<TradingRow | null>;
9
- index: Signal<number | null>;
7
+ row: import("@angular/core").InputSignal<TradingRow | null>;
8
+ index: import("@angular/core").InputSignal<number | null>;
10
9
  mode: import("@angular/core").InputSignal<Mode>;
11
- rowChange: EventEmitter<TradingRow>;
12
- close: EventEmitter<void>;
10
+ rowChange: import("@angular/core").OutputEmitterRef<TradingRow>;
11
+ close: import("@angular/core").OutputEmitterRef<void>;
13
12
  readonly renderers: {
14
13
  tester: import("@jsonforms/core").RankedTester;
15
14
  renderer: any;
@@ -17,10 +16,10 @@ export declare class FarmManureTradingDetailComponent {
17
16
  readonly suibiAjv: import("ajv").Ajv;
18
17
  private readonly baseSchemas;
19
18
  private readonly baseUis;
20
- itemSchema: Signal<JsonSchema>;
21
- localizedUi: Signal<UISchemaElement>;
22
- detailTitle: Signal<string>;
23
- jsonFormsData: Signal<(FarmManureTradingSupply & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
19
+ itemSchema: import("@angular/core").Signal<JsonSchema>;
20
+ localizedUi: import("@angular/core").Signal<UISchemaElement>;
21
+ detailTitle: import("@angular/core").Signal<string>;
22
+ jsonFormsData: import("@angular/core").Signal<(FarmManureTradingSupply & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
24
23
  onDataChange(event: any): void;
25
24
  private applyDerivedFields;
26
25
  }
@@ -1,4 +1,3 @@
1
- import { EventEmitter, Signal } from '@angular/core';
2
1
  import { FarmManureTradingSupply, FarmManureTradingDispense } from './farm-manure-trading.types';
3
2
  import { FarmManureTradingMode } from '../../core/navigation/navigation.service';
4
3
  export type TradingMode = FarmManureTradingMode;
@@ -6,12 +5,12 @@ type TradingRow = FarmManureTradingSupply | FarmManureTradingDispense;
6
5
  export declare class FarmManureTradingListComponent {
7
6
  private readonly masterData;
8
7
  private readonly i18n;
9
- rows: Signal<TradingRow[]>;
10
- selectedIndex: Signal<number | null>;
11
- mode: TradingMode;
12
- select: EventEmitter<number>;
13
- add: EventEmitter<void>;
14
- delete: EventEmitter<number>;
8
+ rows: import("@angular/core").InputSignal<TradingRow[]>;
9
+ selectedIndex: import("@angular/core").InputSignal<number | null>;
10
+ mode: import("@angular/core").InputSignal<FarmManureTradingMode>;
11
+ select: import("@angular/core").OutputEmitterRef<number>;
12
+ add: import("@angular/core").OutputEmitterRef<void>;
13
+ delete: import("@angular/core").OutputEmitterRef<number>;
15
14
  readonly displayedColumns: string[];
16
15
  resolveProduct(code: string | null | undefined): string;
17
16
  emptyLabel(): string;
@@ -0,0 +1,22 @@
1
+ import { JsonSchema, UISchemaElement } from '@jsonforms/core';
2
+ import { FieldCultivationDetailEntry, FieldCultivationDetailMode } from './field-cultivation.types';
3
+ export declare class FieldCultivationDetailComponent {
4
+ private readonly i18n;
5
+ readonly row: import("@angular/core").InputSignal<FieldCultivationDetailEntry | null>;
6
+ readonly index: import("@angular/core").InputSignal<number | null>;
7
+ readonly mode: import("@angular/core").InputSignal<FieldCultivationDetailMode>;
8
+ readonly rowChange: import("@angular/core").OutputEmitterRef<FieldCultivationDetailEntry>;
9
+ readonly close: import("@angular/core").OutputEmitterRef<void>;
10
+ readonly renderers: {
11
+ tester: import("@jsonforms/core").RankedTester;
12
+ renderer: any;
13
+ }[];
14
+ readonly suibiAjv: import("ajv").Ajv;
15
+ private readonly baseSchemas;
16
+ private readonly baseUis;
17
+ readonly itemSchema: import("@angular/core").Signal<JsonSchema>;
18
+ readonly localizedUi: import("@angular/core").Signal<UISchemaElement>;
19
+ readonly detailTitle: import("@angular/core").Signal<string>;
20
+ readonly jsonFormsData: import("@angular/core").Signal<(import("./field-cultivation.types").FieldCultivationFodderCropland & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions) | (import("./field-cultivation.types").FieldCultivationSpecial & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
21
+ onDataChange(event: unknown): void;
22
+ }
@@ -0,0 +1,22 @@
1
+ import { JsonSchema } from '@jsonforms/core';
2
+ import { FieldCultivationCropHarvest, FieldCultivationData } from './field-cultivation.types';
3
+ export declare class FieldCultivationGeneralComponent {
4
+ private readonly i18n;
5
+ readonly value: import("@angular/core").InputSignal<FieldCultivationData>;
6
+ readonly valueChange: import("@angular/core").OutputEmitterRef<FieldCultivationData>;
7
+ readonly renderers: {
8
+ tester: import("@jsonforms/core").RankedTester;
9
+ renderer: any;
10
+ }[];
11
+ readonly ajv: import("ajv").Ajv;
12
+ readonly schema: import("@angular/core").Signal<JsonSchema>;
13
+ readonly localizedUi: import("@angular/core").Signal<import("@jsonforms/core").UISchemaElement>;
14
+ readonly jsonFormsData: import("@angular/core").Signal<({
15
+ buildingZoneAreaSize: number | null | undefined;
16
+ outdoorVegetableMainCropAreaSize: number | null | undefined;
17
+ indoorVegetableMainCropAreaSize: number | null | undefined;
18
+ feedingOfCropHarvest: FieldCultivationCropHarvest[] | undefined;
19
+ dispenseOfCropHarvest: FieldCultivationCropHarvest[] | undefined;
20
+ } & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
21
+ onDataChange(event: unknown): void;
22
+ }
@@ -0,0 +1,17 @@
1
+ import { FieldCultivationDetailEntry, FieldCultivationDetailMode } from './field-cultivation.types';
2
+ export declare class FieldCultivationListComponent {
3
+ private readonly masterData;
4
+ private readonly i18n;
5
+ readonly rows: import("@angular/core").InputSignal<FieldCultivationDetailEntry[]>;
6
+ readonly selectedIndex: import("@angular/core").InputSignal<number | null>;
7
+ readonly mode: import("@angular/core").InputSignal<FieldCultivationDetailMode>;
8
+ readonly select: import("@angular/core").OutputEmitterRef<number>;
9
+ readonly add: import("@angular/core").OutputEmitterRef<void>;
10
+ readonly delete: import("@angular/core").OutputEmitterRef<number>;
11
+ readonly displayedColumns: string[];
12
+ resolveCrop(code: string | null | undefined): string;
13
+ emptyLabel(): string;
14
+ emptyHintLabel(): string;
15
+ addLabel(): string;
16
+ onDelete(index: number, event: Event): void;
17
+ }
@@ -0,0 +1,37 @@
1
+ import { FieldCultivationTab } from '../../core/navigation/navigation.service';
2
+ import { FieldCultivationArableLand, FieldCultivationData, FieldCultivationDetailEntry, FieldCultivationDetailMode, FieldCultivationFodderCropland, FieldCultivationSpecial } from './field-cultivation.types';
3
+ export declare class FieldCultivationMasterDetailComponent {
4
+ private readonly dataSvc;
5
+ private readonly navigationSvc;
6
+ constructor();
7
+ readonly fieldCultivation: import("@angular/core").Signal<FieldCultivationData>;
8
+ readonly fodderCroplandRows: import("@angular/core").Signal<FieldCultivationFodderCropland[]>;
9
+ readonly arableLandRows: import("@angular/core").Signal<FieldCultivationArableLand[]>;
10
+ readonly specialRows: import("@angular/core").Signal<FieldCultivationSpecial[]>;
11
+ readonly activeTab: import("@angular/core").WritableSignal<FieldCultivationTab>;
12
+ readonly selectedFodderCroplandIndex: import("@angular/core").WritableSignal<number | null>;
13
+ readonly selectedArableLandIndex: import("@angular/core").WritableSignal<number | null>;
14
+ readonly selectedSpecialIndex: import("@angular/core").WritableSignal<number | null>;
15
+ readonly detailOpen: import("@angular/core").Signal<boolean>;
16
+ readonly currentIndex: import("@angular/core").Signal<number | null>;
17
+ readonly currentDetail: import("@angular/core").Signal<FieldCultivationDetailEntry | null>;
18
+ readonly selectedFodderCroplandListIndex: import("@angular/core").Signal<number | null>;
19
+ readonly selectedArableLandListIndex: import("@angular/core").Signal<number | null>;
20
+ readonly selectedSpecialListIndex: import("@angular/core").Signal<number | null>;
21
+ readonly activeDetailMode: import("@angular/core").Signal<FieldCultivationDetailMode>;
22
+ readonly activeTabIndex: import("@angular/core").Signal<0 | 1 | 2 | 3>;
23
+ onTabChange(index: number): void;
24
+ openDetail(mode: FieldCultivationDetailMode, index: number): void;
25
+ closeDetail(): void;
26
+ addEntry(mode: FieldCultivationDetailMode): void;
27
+ deleteEntry(mode: FieldCultivationDetailMode, index: number): void;
28
+ onGeneralChange(value: FieldCultivationData): void;
29
+ onDetailChange(value: FieldCultivationDetailEntry): void;
30
+ private patchRows;
31
+ private patchFieldCultivation;
32
+ private rowsForMode;
33
+ private selectedIndexSignal;
34
+ private clearSelections;
35
+ private clearInvalidSelection;
36
+ private parseTab;
37
+ }
@@ -0,0 +1,40 @@
1
+ export interface FieldCultivationRequirementCorrection {
2
+ quantity?: number | null;
3
+ molecularFormula?: string | null;
4
+ unit?: string | null;
5
+ }
6
+ export interface FieldCultivationCropHarvest {
7
+ agronomicCropCategory?: string | null;
8
+ userSpecificPlantName?: string | null;
9
+ effectiveYield?: number | null;
10
+ }
11
+ export interface FieldCultivationBaseEntry {
12
+ agronomicCropCategory?: string | null;
13
+ userSpecificPlantName?: string | null;
14
+ isMainCrop?: boolean;
15
+ areaSize?: number | null;
16
+ yieldPerSquareMeasure?: number | null;
17
+ }
18
+ export interface FieldCultivationFodderCropland extends FieldCultivationBaseEntry {
19
+ fieldName?: string | null;
20
+ calculateYieldThroughFodderBalance?: boolean;
21
+ }
22
+ export interface FieldCultivationArableLand extends FieldCultivationBaseEntry {
23
+ hasLongTermYieldDivergence?: boolean;
24
+ requirementCorrection?: FieldCultivationRequirementCorrection[];
25
+ }
26
+ export interface FieldCultivationSpecial extends FieldCultivationBaseEntry {
27
+ requirementCorrection?: FieldCultivationRequirementCorrection[];
28
+ }
29
+ export interface FieldCultivationData {
30
+ buildingZoneAreaSize?: number | null;
31
+ outdoorVegetableMainCropAreaSize?: number | null;
32
+ indoorVegetableMainCropAreaSize?: number | null;
33
+ feedingOfCropHarvest?: FieldCultivationCropHarvest[];
34
+ dispenseOfCropHarvest?: FieldCultivationCropHarvest[];
35
+ fodderCropland?: FieldCultivationFodderCropland[];
36
+ arableLand?: FieldCultivationArableLand[];
37
+ special?: FieldCultivationSpecial[];
38
+ }
39
+ export type FieldCultivationDetailMode = 'fodderCropland' | 'arableLand' | 'special';
40
+ export type FieldCultivationDetailEntry = FieldCultivationFodderCropland | FieldCultivationArableLand | FieldCultivationSpecial;
@@ -0,0 +1,6 @@
1
+ import { FieldCultivationCropHarvest, FieldCultivationData, FieldCultivationDetailEntry, FieldCultivationDetailMode, FieldCultivationRequirementCorrection } from './field-cultivation.types';
2
+ export declare function normalizeRequirementCorrection(source: Partial<FieldCultivationRequirementCorrection> | undefined): FieldCultivationRequirementCorrection;
3
+ export declare function normalizeCropHarvestEntry(source: Partial<FieldCultivationCropHarvest> | undefined): FieldCultivationCropHarvest;
4
+ export declare function normalizeFieldCultivationDetailEntry(mode: FieldCultivationDetailMode, source: Partial<FieldCultivationDetailEntry> | undefined): FieldCultivationDetailEntry;
5
+ export declare function createEmptyFieldCultivationDetailEntry(mode: FieldCultivationDetailMode): FieldCultivationDetailEntry;
6
+ export declare function normalizeFieldCultivation(source: Partial<FieldCultivationData> | undefined): FieldCultivationData;
@@ -0,0 +1,4 @@
1
+ export * from './field-cultivation-list.component';
2
+ export * from './field-cultivation-detail.component';
3
+ export * from './field-cultivation-master-detail.component';
4
+ export * from './field-cultivation.types';
@@ -0,0 +1,38 @@
1
+ import { FieldSpreadingFertiliserEntry } from '../field-spreading.types';
2
+ /**
3
+ * FertiliserTableComponent — thin wrapper around InlineTableComponent.
4
+ *
5
+ * Responsibilities:
6
+ * 1. Provides `FERTILISER_TABLE_CONFIG` (the column/section "uischema") to the
7
+ * generic table component.
8
+ * 2. Bridges the typed `FieldSpreadingFertiliserEntry[]` inputs/outputs to the
9
+ * generic `Record<string, unknown>[]` API expected by InlineTableComponent.
10
+ * 3. Supplies `autoPopulateNutrients` as a `rowTransform` — domain logic that
11
+ * pre-fills Ntot/P₂O₅/K₂O/Mg from the product's max values on product selection.
12
+ *
13
+ * To create a similar table for another domain:
14
+ * 1. Copy `fertiliser-table.config.ts` and define new columns there.
15
+ * 2. Create a new thin wrapper component (like this one) that wires the config
16
+ * and an optional rowTransform.
17
+ * 3. The generic InlineTableComponent requires no changes.
18
+ */
19
+ export declare class FertiliserTableComponent {
20
+ readonly entries: import("@angular/core").InputSignal<FieldSpreadingFertiliserEntry[]>;
21
+ readonly entriesChange: import("@angular/core").OutputEmitterRef<FieldSpreadingFertiliserEntry[]>;
22
+ /** Column/section config exposed to the template (constant — no signal needed). */
23
+ protected readonly config: import("../../../components/inline-table/inline-table.types").InlineTableConfig;
24
+ /** Cast typed entries to the generic Record[] expected by InlineTableComponent. */
25
+ readonly rowsForTable: import("@angular/core").Signal<Record<string, unknown>[]>;
26
+ /** Cast the generic output back to the typed FieldSpreadingFertiliserEntry[]. */
27
+ onRowsChange(rows: Record<string, unknown>[]): void;
28
+ /**
29
+ * Row transform for auto-populating nutrient columns when a product is selected.
30
+ *
31
+ * Defined as an arrow-function property so `this` is never needed and the function
32
+ * can be passed as a value to InlineTableComponent without losing its context.
33
+ *
34
+ * Only reacts to changes on the `fertiliserProductCategory` column key; all other
35
+ * edits pass through unchanged.
36
+ */
37
+ readonly autoPopulateNutrients: (changedKey: string, newValue: unknown, row: Record<string, unknown>) => Record<string, unknown>;
38
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Column and section configuration for the Mineral Fertiliser inline table.
3
+ *
4
+ * This is the "uischema" for the Mineral fertilisers tab — it is the ONLY file
5
+ * that needs to be created/modified when adapting the inline table pattern for
6
+ * a different domain (e.g. recycling entries).
7
+ *
8
+ * Relationship to InlineTableComponent:
9
+ * - `columns` → drives header labels, cell widgets, grid widths, and code-list sources
10
+ * - `createRow` → produces a blank row with the ingredient sub-array pre-initialised
11
+ * - Labels reference i18n keys; chemical formula headers use `labelLiteral: true`
12
+ *
13
+ * Auto-population of nutrient columns on product selection is NOT configured here —
14
+ * that business logic lives in FertiliserTableComponent as a `rowTransform` function.
15
+ */
16
+ import type { InlineTableConfig } from '../../../components/inline-table/inline-table.types';
17
+ /** The four nutrient formulas tracked per fertiliser entry, in display order. */
18
+ export declare const NUTRIENT_COLUMNS: readonly ["Ntot", "P2O5", "K2O", "Mg"];
19
+ export type NutrientFormula = (typeof NUTRIENT_COLUMNS)[number];
20
+ export declare const FERTILISER_TABLE_CONFIG: InlineTableConfig;
@@ -1,12 +1,12 @@
1
- import { JsonSchema, UISchemaElement } from '@jsonforms/core';
2
- import { FieldSpreadingData } from './field-spreading.types';
1
+ import { JsonSchema } from '@jsonforms/core';
2
+ import { FieldSpreadingData, FieldSpreadingFertiliserEntry, FieldSpreadingRecyclingEntry } from './field-spreading.types';
3
3
  export declare class FieldSpreadingComponent {
4
4
  private readonly dataSvc;
5
5
  private readonly navigationSvc;
6
6
  private readonly i18n;
7
7
  constructor();
8
8
  readonly schema: import("@angular/core").Signal<JsonSchema>;
9
- readonly localizedUi: import("@angular/core").Signal<UISchemaElement>;
9
+ readonly localizedGeneralUi: import("@angular/core").Signal<import("@jsonforms/core").UISchemaElement>;
10
10
  readonly renderers: {
11
11
  tester: import("@jsonforms/core").RankedTester;
12
12
  renderer: any;
@@ -14,7 +14,20 @@ export declare class FieldSpreadingComponent {
14
14
  readonly ajv: import("ajv").Ajv;
15
15
  private readonly normalizedFieldSpreading;
16
16
  readonly jsonFormsData: import("@angular/core").Signal<(FieldSpreadingData & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
17
+ /** Fertiliser entries exposed to the custom table component. */
18
+ readonly fertiliserEntries: import("@angular/core").Signal<FieldSpreadingFertiliserEntry[]>;
19
+ /** Recycling entries exposed to the custom table component. */
20
+ readonly recyclingEntries: import("@angular/core").Signal<FieldSpreadingRecyclingEntry[]>;
21
+ /** Drives mat-tab-group [selectedIndex] from NavigationService state. */
22
+ readonly activeTabIndex: import("@angular/core").Signal<number>;
23
+ onTabChange(index: number): void;
24
+ /** Called by both general JSONForms instances on data change.
25
+ * Preserves fertiliser and recycling entries managed by their custom table components. */
17
26
  onDataChange(event: unknown): void;
27
+ /** Called by FertiliserTableComponent when entries are added/edited/removed. */
28
+ onFertiliserChange(fertiliser: FieldSpreadingFertiliserEntry[]): void;
29
+ /** Called by RecyclingTableComponent when entries are added/edited/removed. */
30
+ onRecyclingChange(recycling: FieldSpreadingRecyclingEntry[]): void;
18
31
  private patchFieldSpreading;
19
32
  private normalizeFieldSpreading;
20
33
  private areFieldSpreadingEqual;
@@ -0,0 +1,22 @@
1
+ import { FieldSpreadingRecyclingEntry } from '../field-spreading.types';
2
+ /**
3
+ * RecyclingTableComponent — thin wrapper around InlineTableComponent.
4
+ *
5
+ * Responsibilities:
6
+ * 1. Provides `RECYCLING_TABLE_CONFIG` (the column/section "uischema").
7
+ * 2. Bridges typed `FieldSpreadingRecyclingEntry[]` to/from the generic
8
+ * `Record<string, unknown>[]` API of InlineTableComponent.
9
+ *
10
+ * Unlike FertiliserTableComponent, no `rowTransform` is needed here — recycling
11
+ * products have no auto-population logic; all nutrient values are entered manually.
12
+ */
13
+ export declare class RecyclingTableComponent {
14
+ readonly entries: import("@angular/core").InputSignal<FieldSpreadingRecyclingEntry[]>;
15
+ readonly entriesChange: import("@angular/core").OutputEmitterRef<FieldSpreadingRecyclingEntry[]>;
16
+ /** Column/section config (constant — no signal needed). */
17
+ protected readonly config: import("../../../components/inline-table/inline-table.types").InlineTableConfig;
18
+ /** Cast typed entries to generic Record[] for InlineTableComponent. */
19
+ readonly rowsForTable: import("@angular/core").Signal<Record<string, unknown>[]>;
20
+ /** Cast generic output back to typed FieldSpreadingRecyclingEntry[]. */
21
+ onRowsChange(rows: Record<string, unknown>[]): void;
22
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Column and section configuration for the Recycling Fertiliser inline table.
3
+ *
4
+ * This is the "uischema" for the Recycling fertilisers tab.
5
+ * The structure mirrors fertiliser-table.config.ts — only the columns differ:
6
+ * - Product field: typeOfManureRecyclingProduct (different code list)
7
+ * - Nutrient columns: Ntot, Nlos, P₂O₅, K₂O, Mg expressed in kg/unit (not %)
8
+ * — 5 nutrients vs 4 for mineral fertilisers, no auto-population on product select.
9
+ *
10
+ * To adapt again for a new domain, copy this file and adjust columns + i18n keys.
11
+ */
12
+ import type { InlineTableConfig } from '../../../components/inline-table/inline-table.types';
13
+ /** Nutrient formulas tracked per recycling entry, in display order. 'Nlos' = soluble nitrogen (matches the
14
+ * `molecularFormula` enum from assets/master-data/substances.json — NOT 'NSol', which the API rejects). */
15
+ export declare const RECYCLING_NUTRIENT_COLUMNS: readonly ["Ntot", "Nlos", "P2O5", "K2O", "Mg"];
16
+ export type RecyclingNutrientFormula = (typeof RECYCLING_NUTRIENT_COLUMNS)[number];
17
+ export declare const RECYCLING_TABLE_CONFIG: InlineTableConfig;
@@ -1,15 +1,14 @@
1
- import { EventEmitter, Signal } from '@angular/core';
2
1
  import { JsonSchema, UISchemaElement } from '@jsonforms/core';
3
2
  import { FodderMode } from '../../core/navigation/navigation.service';
4
3
  import { FodderCropFromNonFodderCropland, FodderDispense, FodderSupply } from './fodder.types';
5
4
  type FodderRow = FodderSupply | FodderDispense | FodderCropFromNonFodderCropland;
6
5
  export declare class FodderDetailComponent {
7
6
  private readonly i18n;
8
- row: Signal<FodderRow | null>;
9
- index: Signal<number | null>;
7
+ row: import("@angular/core").InputSignal<FodderRow | null>;
8
+ index: import("@angular/core").InputSignal<number | null>;
10
9
  mode: import("@angular/core").InputSignal<FodderMode>;
11
- rowChange: EventEmitter<FodderRow>;
12
- close: EventEmitter<void>;
10
+ rowChange: import("@angular/core").OutputEmitterRef<FodderRow>;
11
+ close: import("@angular/core").OutputEmitterRef<void>;
13
12
  readonly renderers: {
14
13
  tester: import("@jsonforms/core").RankedTester;
15
14
  renderer: any;
@@ -17,10 +16,10 @@ export declare class FodderDetailComponent {
17
16
  readonly suibiAjv: import("ajv").Ajv;
18
17
  private readonly baseSchemas;
19
18
  private readonly baseUis;
20
- readonly itemSchema: Signal<JsonSchema>;
21
- readonly localizedUi: Signal<UISchemaElement>;
22
- readonly detailTitle: Signal<string>;
23
- readonly jsonFormsData: Signal<({
19
+ readonly itemSchema: import("@angular/core").Signal<JsonSchema>;
20
+ readonly localizedUi: import("@angular/core").Signal<UISchemaElement>;
21
+ readonly detailTitle: import("@angular/core").Signal<string>;
22
+ readonly jsonFormsData: import("@angular/core").Signal<({
24
23
  quantity?: number;
25
24
  typeOfFeedstuffProduct?: string;
26
25
  transactionUnit?: string;
@@ -1,16 +1,15 @@
1
- import { EventEmitter, Signal } from '@angular/core';
2
1
  import { FodderCropFromNonFodderCropland, FodderDispense, FodderSupply } from './fodder.types';
3
2
  import { FodderMode } from '../../core/navigation/navigation.service';
4
3
  type FodderRow = FodderSupply | FodderDispense | FodderCropFromNonFodderCropland;
5
4
  export declare class FodderListComponent {
6
5
  private readonly masterData;
7
6
  private readonly i18n;
8
- rows: Signal<FodderRow[]>;
9
- selectedIndex: Signal<number | null>;
10
- mode: FodderMode;
11
- select: EventEmitter<number>;
12
- add: EventEmitter<void>;
13
- delete: EventEmitter<number>;
7
+ rows: import("@angular/core").InputSignal<FodderRow[]>;
8
+ selectedIndex: import("@angular/core").InputSignal<number | null>;
9
+ mode: import("@angular/core").InputSignal<FodderMode>;
10
+ select: import("@angular/core").OutputEmitterRef<number>;
11
+ add: import("@angular/core").OutputEmitterRef<void>;
12
+ delete: import("@angular/core").OutputEmitterRef<number>;
14
13
  readonly displayedColumns: string[];
15
14
  resolveProduct(code: string | null | undefined): string;
16
15
  emptyLabel(): string;
@@ -24,7 +24,7 @@ export declare class FodderMasterDetailComponent {
24
24
  addEntry(mode: FodderMode): void;
25
25
  deleteEntry(mode: FodderMode, index: number): void;
26
26
  onDetailChange(payload: FodderRow): void;
27
- onScalarInput(field: 'proportionStorageLoss' | 'totalBalanceErrorMargin', rawValue: string): void;
27
+ onScalarInput(field: 'proportionStorageLoss' | 'totalBalanceErrorMargin', event: Event): void;
28
28
  scalarInputValue(value: number | undefined): string;
29
29
  private clearInvalidSelection;
30
30
  private selectedIndexSignal;
@@ -0,0 +1,4 @@
1
+ export * from './fodder-list.component';
2
+ export * from './fodder-detail.component';
3
+ export * from './fodder-master-detail.component';
4
+ export * from './fodder.types';
@@ -0,0 +1,2 @@
1
+ export * from './lifetime-performance-form.component';
2
+ export * from './lifetime-performance.types';
@@ -0,0 +1,4 @@
1
+ export * from './storage-list.component';
2
+ export * from './storage-detail.component';
3
+ export * from './storage-master-detail.component';
4
+ export * from './storage.types';
@@ -1,6 +1,6 @@
1
1
  import { JsonSchema, UISchemaElement } from '@jsonforms/core';
2
2
  import { StorageNormalized } from './storage.types';
3
- type StorageSection = 'manure' | 'slurry' | 'slurryFacilityToggle';
3
+ type StorageSection = 'manure' | 'slurry' | 'slurryFacilityToggle' | 'general';
4
4
  export declare class StorageGeneralComponent {
5
5
  private readonly i18n;
6
6
  readonly section: import("@angular/core").InputSignal<StorageSection>;
@@ -5,6 +5,7 @@ export declare class StorageListComponent {
5
5
  readonly rows: import("@angular/core").InputSignal<(ManurePitEntry | SlurryTankEntry)[]>;
6
6
  readonly selectedIndex: import("@angular/core").InputSignal<number | null>;
7
7
  readonly type: import("@angular/core").InputSignal<StorageEntryType>;
8
+ readonly errorIndices: import("@angular/core").InputSignal<ReadonlySet<number>>;
8
9
  readonly select: import("@angular/core").OutputEmitterRef<number>;
9
10
  readonly add: import("@angular/core").OutputEmitterRef<void>;
10
11
  readonly delete: import("@angular/core").OutputEmitterRef<number>;
@@ -12,6 +13,8 @@ export declare class StorageListComponent {
12
13
  readonly headerName: import("@angular/core").Signal<string>;
13
14
  readonly headerMeta: import("@angular/core").Signal<string>;
14
15
  resolveName(row: ManurePitEntry | SlurryTankEntry, index: number): string;
16
+ rowHasError(index: number): boolean;
17
+ rowErrorLabel(): string;
15
18
  resolveMeta(row: ManurePitEntry | SlurryTankEntry): string;
16
19
  emptyLabel(): string;
17
20
  emptyHintLabel(): string;
@@ -3,20 +3,21 @@ import { ManurePitEntry, SlurryTankEntry, StorageEntryType, StorageNormalized }
3
3
  export declare class StorageMasterDetailComponent {
4
4
  private readonly dataSvc;
5
5
  private readonly navigationSvc;
6
+ private readonly globalValidation;
6
7
  constructor();
7
8
  readonly storage: import("@angular/core").Signal<StorageNormalized>;
8
9
  readonly manurePitRows: import("@angular/core").Signal<ManurePitEntry[]>;
9
10
  readonly slurryTankRows: import("@angular/core").Signal<SlurryTankEntry[]>;
10
- readonly activeTab: import("@angular/core").WritableSignal<StorageTab>;
11
11
  readonly selectedDetailType: import("@angular/core").WritableSignal<StorageEntryType | null>;
12
12
  readonly selectedIndex: import("@angular/core").WritableSignal<number | null>;
13
13
  readonly manureFacilitySpecificEnabled: import("@angular/core").Signal<boolean>;
14
14
  readonly slurryFacilitySpecificEnabled: import("@angular/core").Signal<boolean>;
15
+ readonly manurePitErrorIndices: import("@angular/core").Signal<Set<number>>;
16
+ readonly slurryTankErrorIndices: import("@angular/core").Signal<Set<number>>;
15
17
  readonly detailOpen: import("@angular/core").Signal<boolean>;
16
18
  readonly detailType: import("@angular/core").Signal<StorageEntryType>;
17
19
  readonly currentDetail: import("@angular/core").Signal<ManurePitEntry | SlurryTankEntry | null>;
18
- readonly activeTabIndex: import("@angular/core").Signal<0 | 1>;
19
- onTabChange(index: number): void;
20
+ readonly activeTab: import("@angular/core").Signal<StorageTab>;
20
21
  openDetail(type: StorageEntryType, index: number): void;
21
22
  closeDetail(): void;
22
23
  addEntry(type: StorageEntryType): void;