@agridea/suibi-module 0.1.0-preview.2f7b6e2 → 0.1.0-preview.3b0cded
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 -72
- package/dist/elements/browser/suibi-module-latest.js +71 -72
- package/dist/elements/browser/suibi-module.v0.1.0-preview.3b0cded.js +78 -0
- package/dist/elements/browser/suibi-theme-dark.css +1 -1
- package/dist/elements/browser/version.txt +1 -1
- package/dist/types/app/components/data-preview/data-preview.component.d.ts +2 -2
- package/dist/types/app/components/empty-state/empty-state.component.d.ts +2 -0
- package/dist/types/app/components/gauge-arc/gauge-arc.component.d.ts +49 -0
- package/dist/types/app/{header-bar.d.ts → components/header-bar/header-bar.component.d.ts} +3 -4
- package/dist/types/app/components/inline-table/inline-table.component.d.ts +100 -0
- package/dist/types/app/components/inline-table/inline-table.types.d.ts +127 -0
- package/dist/types/app/components/module-placeholder-page/module-placeholder-page.component.d.ts +6 -0
- package/dist/types/app/components/planning-result/planning-result.component.d.ts +3 -26
- package/dist/types/app/components/planning-result-row/planning-result-row.component.d.ts +34 -0
- package/dist/types/app/components/planning-trigger/planning-trigger.component.d.ts +13 -0
- package/dist/types/app/components/results-page/results-page.component.d.ts +13 -0
- package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-dashboard.component.d.ts +30 -0
- package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-metrics.service.d.ts +21 -0
- package/dist/types/app/components/suissebilanz-minibar/suissebilanz-minibar.component.d.ts +19 -0
- package/dist/types/app/components/validation-page/validation-page.component.d.ts +18 -0
- 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/components/workflow-stepper/workflow-stepper.component.d.ts +1 -0
- package/dist/types/app/core/data/naebi-data.service.d.ts +28 -28
- package/dist/types/app/core/error/global-error-handler.d.ts +2 -3
- package/dist/types/app/core/i18n/i18n.service.d.ts +4 -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/master-data/master-data.service.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 +27 -1
- package/dist/types/app/core/planning/planning-balance.service.d.ts +23 -3
- package/dist/types/app/core/planning/planning-balance.utils.d.ts +10 -0
- package/dist/types/app/core/validation/global-validation.service.d.ts +19 -1
- package/dist/types/app/jsonforms/filters/code-list-filter-resolvers.d.ts +3 -0
- 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/controls/selects/code-list/code-list-select.renderer.d.ts +10 -4
- 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 +36 -0
- package/dist/types/app/nutrient-cycle/animal-stock/animal-stock-detail.component.d.ts +7 -8
- package/dist/types/app/nutrient-cycle/animal-stock/animal-stock-list.component.d.ts +5 -8
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-detail.component.d.ts +8 -9
- package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-list.component.d.ts +6 -7
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-detail.component.d.ts +22 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-general.component.d.ts +22 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-list.component.d.ts +17 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-master-detail.component.d.ts +37 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.types.d.ts +40 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.util.d.ts +6 -0
- package/dist/types/app/nutrient-cycle/field-cultivation/index.d.ts +4 -0
- package/dist/types/app/nutrient-cycle/field-spreading/fertiliser-table/fertiliser-table.component.d.ts +38 -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 +16 -3
- package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.component.d.ts +22 -0
- package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.config.d.ts +16 -0
- package/dist/types/app/nutrient-cycle/fodder/fodder-detail.component.d.ts +31 -0
- package/dist/types/app/nutrient-cycle/fodder/fodder-list.component.d.ts +20 -0
- package/dist/types/app/nutrient-cycle/fodder/fodder-master-detail.component.d.ts +37 -0
- package/dist/types/app/nutrient-cycle/fodder/fodder.types.d.ts +27 -0
- package/dist/types/app/nutrient-cycle/fodder/index.d.ts +4 -0
- package/dist/types/app/nutrient-cycle/fodder/transaction-unit.util.d.ts +2 -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 +30 -0
- package/dist/types/app/nutrient-cycle/storage/storage-general.component.d.ts +29 -0
- package/dist/types/app/nutrient-cycle/storage/storage-list.component.d.ts +20 -0
- package/dist/types/app/nutrient-cycle/storage/storage-master-detail.component.d.ts +29 -0
- package/dist/types/app/nutrient-cycle/storage/storage.types.d.ts +40 -0
- package/dist/types/shared/material-icons.d.ts +3 -3
- package/package.json +68 -17
- package/dist/elements/browser/suibi-module.v0.1.0-preview.2f7b6e2.js +0 -79
- /package/dist/elements/browser/{suibi-module.v0.1.0-preview.2f7b6e2.css → suibi-module.v0.1.0-preview.3b0cded.css} +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
|
@@ -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,14 @@ 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
|
-
cover: number;
|
|
86
|
-
manureFromAnimalStockStored: {
|
|
87
|
-
manureDerivation: string;
|
|
88
|
-
proportionStored: number;
|
|
89
|
-
}[];
|
|
90
|
-
}[];
|
|
79
|
+
manurePit: never[];
|
|
91
80
|
slurryTank: {
|
|
81
|
+
descriptor: string;
|
|
92
82
|
volumeInM3: number;
|
|
93
83
|
depthInM: number;
|
|
94
84
|
cover: number;
|
|
@@ -97,20 +87,7 @@ export declare class NaebiDataService {
|
|
|
97
87
|
}[];
|
|
98
88
|
};
|
|
99
89
|
farmManureTrading: {
|
|
100
|
-
supply:
|
|
101
|
-
quantity: number;
|
|
102
|
-
typeOfManureRecyclingProduct: string;
|
|
103
|
-
transactionUnit: string;
|
|
104
|
-
manureDerivation: {
|
|
105
|
-
zoologicalAnimal: string;
|
|
106
|
-
percentageAllocation: number;
|
|
107
|
-
}[];
|
|
108
|
-
ingredient: {
|
|
109
|
-
quantity: number;
|
|
110
|
-
molecularFormula: string;
|
|
111
|
-
unit: string;
|
|
112
|
-
}[];
|
|
113
|
-
}[];
|
|
90
|
+
supply: never[];
|
|
114
91
|
dispense: {
|
|
115
92
|
quantity: number;
|
|
116
93
|
typeOfManureRecyclingProduct: string;
|
|
@@ -183,6 +160,12 @@ export declare class NaebiDataService {
|
|
|
183
160
|
unit: string;
|
|
184
161
|
}[];
|
|
185
162
|
}[];
|
|
163
|
+
dispense: {
|
|
164
|
+
typeOfFeedstuffProduct: string;
|
|
165
|
+
quantity: number;
|
|
166
|
+
transactionUnit: string;
|
|
167
|
+
ingredient: never[];
|
|
168
|
+
}[];
|
|
186
169
|
};
|
|
187
170
|
cropFromNonFodderCropland: {
|
|
188
171
|
typeOfFeedstuffProduct: string;
|
|
@@ -198,6 +181,17 @@ export declare class NaebiDataService {
|
|
|
198
181
|
totalBalanceErrorMargin: number;
|
|
199
182
|
};
|
|
200
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
|
+
}[];
|
|
201
195
|
fodderCropland: ({
|
|
202
196
|
agronomicCropCategory: string;
|
|
203
197
|
isMainCrop: boolean;
|
|
@@ -216,12 +210,18 @@ export declare class NaebiDataService {
|
|
|
216
210
|
isMainCrop: boolean;
|
|
217
211
|
areaSize: number;
|
|
218
212
|
yieldPerSquareMeasure: number;
|
|
213
|
+
hasLongTermYieldDivergence: boolean;
|
|
219
214
|
}[];
|
|
220
215
|
special: {
|
|
221
216
|
agronomicCropCategory: string;
|
|
222
217
|
userSpecificPlantName: string;
|
|
223
218
|
isMainCrop: boolean;
|
|
224
219
|
areaSize: number;
|
|
220
|
+
requirementCorrection: {
|
|
221
|
+
quantity: number;
|
|
222
|
+
molecularFormula: string;
|
|
223
|
+
unit: string;
|
|
224
|
+
}[];
|
|
225
225
|
}[];
|
|
226
226
|
};
|
|
227
227
|
generateReport: boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ErrorHandler
|
|
1
|
+
import { ErrorHandler } from '@angular/core';
|
|
2
2
|
export declare class GlobalErrorHandler implements ErrorHandler {
|
|
3
|
-
private injector;
|
|
4
|
-
constructor(injector: Injector);
|
|
3
|
+
private readonly injector;
|
|
5
4
|
handleError(error: any): void;
|
|
6
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PipeTransform, Signal } from '@angular/core';
|
|
2
|
-
export type Locale = 'en' | 'de';
|
|
2
|
+
export type Locale = 'en' | 'de' | 'fr' | 'it';
|
|
3
3
|
export type JsonFormsTranslator = (key: string, defaultMessage: string | undefined, context: unknown) => string;
|
|
4
4
|
export declare class I18nService {
|
|
5
5
|
private readonly _locale;
|
|
@@ -10,11 +10,12 @@ export declare class I18nService {
|
|
|
10
10
|
translate: JsonFormsTranslator;
|
|
11
11
|
}>;
|
|
12
12
|
setLocale(locale: Locale): void;
|
|
13
|
+
/** Returns true if the given string is a supported locale key. */
|
|
14
|
+
isValidLocale(value: string): value is Locale;
|
|
13
15
|
t(key: string, defaultMessage?: string): string;
|
|
14
16
|
}
|
|
15
17
|
export declare class TranslatePipe implements PipeTransform {
|
|
16
|
-
private readonly i18n;
|
|
17
18
|
private readonly cache;
|
|
18
|
-
|
|
19
|
+
private readonly i18n;
|
|
19
20
|
transform(key: string, defaultMessage?: string): Signal<string>;
|
|
20
21
|
}
|
|
@@ -26,5 +26,7 @@ export declare class MasterDataService {
|
|
|
26
26
|
resolveCultivationCategory(code: string | null | undefined, locale?: Locale): string;
|
|
27
27
|
resolveAgronomicCropCategory(code: string | null | undefined, locale?: Locale): string;
|
|
28
28
|
resolveFeedstuffProduct(code: string | null | undefined, locale?: Locale): string;
|
|
29
|
+
resolveCover(id: number | string | null | undefined, locale?: Locale): string;
|
|
30
|
+
resolveMixingFrequency(id: number | string | null | undefined, locale?: Locale): string;
|
|
29
31
|
}
|
|
30
32
|
export {};
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
export type SuibiVersion = '
|
|
1
|
+
export type SuibiVersion = 'v2.0';
|
|
2
2
|
export type SubmissionStatus = 'draft' | 'submitted' | 'final';
|
|
3
|
+
/** Which computation modules are active for this dossier. */
|
|
4
|
+
export interface ComputationModules {
|
|
5
|
+
suisseBilanz: boolean;
|
|
6
|
+
gmf: boolean;
|
|
7
|
+
nh3: boolean;
|
|
8
|
+
impex: boolean;
|
|
9
|
+
linear: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_COMPUTATION_MODULES: ComputationModules;
|
|
3
12
|
export interface SuibiMetadata {
|
|
4
13
|
title: string;
|
|
5
14
|
suibiVersion: SuibiVersion;
|
|
6
15
|
status: SubmissionStatus;
|
|
16
|
+
modules: ComputationModules;
|
|
7
17
|
}
|
|
8
18
|
export declare const DEFAULT_SUIBI_METADATA: SuibiMetadata;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
export type PageId = 'welcome' | 'animal_stock' | 'data_preview' | 'storage' | 'field_spreading' | 'farm_manure_trading';
|
|
1
|
+
export type PageId = 'welcome' | 'animal_stock' | 'data_preview' | 'storage' | 'field_spreading' | 'farm_manure_trading' | 'fodder' | 'field_cultivation' | 'validation' | 'results';
|
|
2
2
|
export type AnimalStockCategory = 'base' | 'formOfDetention' | 'feeding';
|
|
3
3
|
export type FarmManureTradingMode = 'supply' | 'dispense';
|
|
4
4
|
export type FarmManureTradingCategory = 'general' | 'derivation' | 'ingredients';
|
|
5
|
+
export type FodderMode = 'supply' | 'dispense' | 'non_fodder_cropland';
|
|
6
|
+
export type FodderCategory = 'general' | 'ingredients';
|
|
5
7
|
export type FieldSpreadingCategory = 'general' | 'fertiliser' | 'recycling';
|
|
8
|
+
export type FieldCultivationTab = 'general' | 'fodderCropland' | 'arableLand' | 'special';
|
|
9
|
+
export type StorageTab = 'manure' | 'slurry';
|
|
10
|
+
export type StorageEntryType = 'manure_pit' | 'slurry_tank';
|
|
6
11
|
/**
|
|
7
12
|
* NavigationService
|
|
8
13
|
* Global reactive store for application routing and deep-link state.
|
|
@@ -38,6 +43,21 @@ export declare class NavigationService {
|
|
|
38
43
|
mode: FarmManureTradingMode;
|
|
39
44
|
index: number;
|
|
40
45
|
} | null>;
|
|
46
|
+
/** Selected fodder detail context (mode + index) */
|
|
47
|
+
readonly selectedFodderDetail: import("@angular/core").WritableSignal<{
|
|
48
|
+
mode: FodderMode;
|
|
49
|
+
index: number;
|
|
50
|
+
} | null>;
|
|
51
|
+
/** Selected field cultivation detail context (tab + index) */
|
|
52
|
+
readonly selectedFieldCultivationDetail: import("@angular/core").WritableSignal<{
|
|
53
|
+
tab: Exclude<FieldCultivationTab, "general">;
|
|
54
|
+
index: number;
|
|
55
|
+
} | null>;
|
|
56
|
+
/** Selected storage detail context (type + index) */
|
|
57
|
+
readonly selectedStorageDetail: import("@angular/core").WritableSignal<{
|
|
58
|
+
type: StorageEntryType;
|
|
59
|
+
index: number;
|
|
60
|
+
} | null>;
|
|
41
61
|
/** True if currently viewing animal stock detail (not list) */
|
|
42
62
|
readonly isAnimalStockDetailView: import("@angular/core").Signal<boolean>;
|
|
43
63
|
/** True if currently on animal stock page (list or detail) */
|
|
@@ -58,7 +78,13 @@ export declare class NavigationService {
|
|
|
58
78
|
navigateToAnimalStockDetail(index: number, category?: AnimalStockCategory): void;
|
|
59
79
|
navigateToFarmManureTradingDetail(mode: FarmManureTradingMode, index: number, category?: FarmManureTradingCategory): void;
|
|
60
80
|
navigateToFarmManureTradingList(): void;
|
|
81
|
+
navigateToFodderDetail(mode: FodderMode, index: number, category?: FodderCategory): void;
|
|
82
|
+
navigateToFodderList(): void;
|
|
61
83
|
navigateToFieldSpreading(category?: FieldSpreadingCategory): void;
|
|
84
|
+
navigateToFieldCultivationDetail(tab: Exclude<FieldCultivationTab, 'general'>, index: number): void;
|
|
85
|
+
navigateToFieldCultivationList(tab?: FieldCultivationTab): void;
|
|
86
|
+
navigateToStorageDetail(type: StorageEntryType, index: number): void;
|
|
87
|
+
navigateToStorageList(tab?: StorageTab): void;
|
|
62
88
|
/**
|
|
63
89
|
* Set active category/tab for current page (without changing page/entry).
|
|
64
90
|
* Generic method supporting any page's categorization navigation.
|
|
@@ -10,9 +10,29 @@ export type PlanningEndpoint = 'ebilanz' | 'blw';
|
|
|
10
10
|
* The ID counter ensures each call re-fetches even if the payload hasn't changed.
|
|
11
11
|
*/
|
|
12
12
|
export declare class PlanningBalanceService {
|
|
13
|
-
private readonly
|
|
13
|
+
private readonly http;
|
|
14
|
+
private readonly metadataSvc;
|
|
15
|
+
private readonly _value;
|
|
16
|
+
private readonly _error;
|
|
17
|
+
private readonly _isLoading;
|
|
18
|
+
private readonly _selectedEndpoint;
|
|
19
|
+
private readonly _lastStartedRequestId;
|
|
20
|
+
private readonly _lastCompletedRequestId;
|
|
21
|
+
private readonly _lastSuccessfulRequestId;
|
|
14
22
|
private _nextId;
|
|
15
|
-
|
|
23
|
+
private activeRequestId;
|
|
24
|
+
private activeRequestSub;
|
|
25
|
+
readonly planningResource: {
|
|
26
|
+
value: import("@angular/core").Signal<PlanningBalanceResponse | undefined>;
|
|
27
|
+
error: import("@angular/core").Signal<unknown>;
|
|
28
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
29
|
+
hasValue: import("@angular/core").Signal<boolean>;
|
|
30
|
+
lastStartedRequestId: import("@angular/core").Signal<number>;
|
|
31
|
+
lastCompletedRequestId: import("@angular/core").Signal<number>;
|
|
32
|
+
lastSuccessfulRequestId: import("@angular/core").Signal<number>;
|
|
33
|
+
};
|
|
34
|
+
readonly selectedEndpoint: import("@angular/core").Signal<PlanningEndpoint>;
|
|
35
|
+
setSelectedEndpoint(endpoint: PlanningEndpoint): void;
|
|
16
36
|
/** Fire a new planning-balance request with the current NAEBI data payload. */
|
|
17
|
-
runPlanning(data: NaebiData, endpoint
|
|
37
|
+
runPlanning(data: NaebiData, endpoint?: PlanningEndpoint): void;
|
|
18
38
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BalanceRow, NutrientEntry } from './planning-balance.types';
|
|
2
|
+
/**
|
|
3
|
+
* Merges the interleaved kg / % rows from `totalBalance` into one `BalanceRow`
|
|
4
|
+
* per nutrient formula, preserving the canonical KEY_NUTRIENTS display order.
|
|
5
|
+
*
|
|
6
|
+
* The planning-balance API returns two `NutrientEntry` objects per formula
|
|
7
|
+
* (one with `unit === 'kg'`, one with `unit === '%'`). This function coalesces
|
|
8
|
+
* them so callers work with a single, normalised row.
|
|
9
|
+
*/
|
|
10
|
+
export declare function mergeBalanceRows(totalBalance: NutrientEntry[]): BalanceRow[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorObject } from 'ajv';
|
|
2
|
-
import { AnimalStockCategory, FarmManureTradingCategory, FarmManureTradingMode, FieldSpreadingCategory, PageId } from '../navigation/navigation.service';
|
|
2
|
+
import { AnimalStockCategory, FarmManureTradingCategory, FarmManureTradingMode, FieldCultivationTab, FieldSpreadingCategory, FodderCategory, FodderMode, PageId, StorageEntryType, StorageTab } from '../navigation/navigation.service';
|
|
3
3
|
export interface EnrichedValidationError extends ErrorObject {
|
|
4
4
|
/** Human-friendly field label (e.g., "Animal Category") */
|
|
5
5
|
fieldLabel?: string;
|
|
@@ -17,8 +17,24 @@ export interface EnrichedValidationError extends ErrorObject {
|
|
|
17
17
|
targetFarmManureTradingIndex?: number;
|
|
18
18
|
/** Category tab inside farm manure trading detail */
|
|
19
19
|
targetFarmManureTradingCategory?: FarmManureTradingCategory;
|
|
20
|
+
/** Navigation target: fodder mode */
|
|
21
|
+
targetFodderMode?: FodderMode;
|
|
22
|
+
/** Navigation target: fodder entry index */
|
|
23
|
+
targetFodderIndex?: number;
|
|
24
|
+
/** Category tab inside fodder detail */
|
|
25
|
+
targetFodderCategory?: FodderCategory;
|
|
20
26
|
/** Category tab inside field spreading */
|
|
21
27
|
targetFieldSpreadingCategory?: FieldSpreadingCategory;
|
|
28
|
+
/** Category tab inside field cultivation */
|
|
29
|
+
targetFieldCultivationTab?: FieldCultivationTab;
|
|
30
|
+
/** Field cultivation detail index */
|
|
31
|
+
targetFieldCultivationIndex?: number;
|
|
32
|
+
/** Storage detail type */
|
|
33
|
+
targetStorageType?: StorageEntryType;
|
|
34
|
+
/** Storage detail index */
|
|
35
|
+
targetStorageIndex?: number;
|
|
36
|
+
/** Storage tab for list-level or scalar navigation */
|
|
37
|
+
targetStorageTab?: StorageTab;
|
|
22
38
|
}
|
|
23
39
|
/**
|
|
24
40
|
* GlobalValidationService
|
|
@@ -37,5 +53,7 @@ export declare class GlobalValidationService {
|
|
|
37
53
|
private inferCategory;
|
|
38
54
|
private inferFarmTradingCategory;
|
|
39
55
|
private inferFieldSpreadingCategory;
|
|
56
|
+
private inferFodderCategory;
|
|
57
|
+
private inferStorageTab;
|
|
40
58
|
private inferFieldLabel;
|
|
41
59
|
}
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { MasterDataService } from '../../core/master-data/master-data.service';
|
|
22
22
|
import { I18nService } from '../../core/i18n/i18n.service';
|
|
23
|
+
import { NaebiDataService } from '../../core/data/naebi-data.service';
|
|
23
24
|
import { BaseCodeListEntry } from '../shared/option-sources/code-lists';
|
|
24
25
|
export interface FilterContext {
|
|
25
26
|
data: unknown;
|
|
27
|
+
rootData: unknown;
|
|
26
28
|
get<T = unknown>(pointer: string): T | undefined;
|
|
27
29
|
masterData: MasterDataService;
|
|
28
30
|
locale: string;
|
|
@@ -57,4 +59,5 @@ export declare function registerCodeListFilter(name: string, fn: CodeListFilterR
|
|
|
57
59
|
export declare function evaluateFilter(list: BaseCodeListEntry[], cfg: FilterConfig | undefined, services: {
|
|
58
60
|
masterData: MasterDataService;
|
|
59
61
|
i18n: I18nService;
|
|
62
|
+
naebiData?: NaebiDataService;
|
|
60
63
|
}, data: unknown): BaseCodeListEntry[];
|
|
@@ -3,6 +3,7 @@ import { CodeListSelectRenderer } from '../renderers/controls/selects/code-list/
|
|
|
3
3
|
import { CardGroupRenderer } from '../renderers/layout/group/card-group.renderer';
|
|
4
4
|
import { PlainGroupRenderer } from '../renderers/layout/group/plain-group.renderer';
|
|
5
5
|
import { LogicalGroupRenderer } from '../renderers/layout/group/logical-group.renderer';
|
|
6
|
+
import { ModuleToggleGroupRenderer } from '../renderers/layout/group/module-toggle-group.renderer';
|
|
6
7
|
import { RankedTester } from '@jsonforms/core';
|
|
7
8
|
import { ConstraintLayoutRenderer } from '../renderers/layout/constraint/constraint-layout.renderer';
|
|
8
9
|
import { SelectedCategoryCategorizationRenderer } from '../renderers/layout/categorization/selected-category-categorization.renderer';
|
|
@@ -22,6 +23,9 @@ export declare const CUSTOM_JSONFORMS_RENDERERS: ({
|
|
|
22
23
|
} | {
|
|
23
24
|
tester: RankedTester;
|
|
24
25
|
renderer: typeof LogicalGroupRenderer;
|
|
26
|
+
} | {
|
|
27
|
+
tester: RankedTester;
|
|
28
|
+
renderer: typeof ModuleToggleGroupRenderer;
|
|
25
29
|
} | {
|
|
26
30
|
tester: RankedTester;
|
|
27
31
|
renderer: typeof AnimalCategorySelectRenderer;
|
|
@@ -10,7 +10,7 @@ interface AnimalCategoryPrifEntry {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
export declare class AnimalCategorySelectRenderer extends BaseSelectControl<number> {
|
|
13
|
-
options: AnimalCategoryPrifEntry[]
|
|
13
|
+
options: import("@angular/core").InputSignal<AnimalCategoryPrifEntry[]>;
|
|
14
14
|
private readonly masterData;
|
|
15
15
|
constructor(jsonFormsService: JsonFormsAngularService);
|
|
16
16
|
getEventValue: (event: any) => any;
|
package/dist/types/app/jsonforms/renderers/controls/selects/code-list/code-list-select.renderer.d.ts
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
import { Signal } from '@angular/core';
|
|
2
2
|
import { JsonFormsAngularService } from '@jsonforms/angular';
|
|
3
|
-
import { RankedTester } from '@jsonforms/core';
|
|
3
|
+
import { ControlElement, RankedTester } from '@jsonforms/core';
|
|
4
4
|
import { BaseSelectControl } from '../../../../shared/base-control/base-select-control';
|
|
5
5
|
import { BaseCodeListEntry } from '../../../../shared/option-sources/code-lists';
|
|
6
|
+
export declare function replaceDataPathLeaf(path: string | null | undefined, replacement: string): string | null;
|
|
7
|
+
export declare function deriveSiblingDependencyPath(uischema: ControlElement | null | undefined, path: string | null | undefined, replacement: string): string | null;
|
|
6
8
|
export declare class CodeListSelectRenderer extends BaseSelectControl<number | string> {
|
|
7
9
|
private readonly masterData;
|
|
8
10
|
private readonly i18n;
|
|
11
|
+
private readonly naebiData;
|
|
9
12
|
private readonly formData;
|
|
10
13
|
private readonly controlScope;
|
|
11
14
|
private explicitCodeListKey;
|
|
12
15
|
private controlKey;
|
|
13
16
|
private listKey;
|
|
14
17
|
readonly options: Signal<BaseCodeListEntry[]>;
|
|
18
|
+
readonly isMultiSelect: Signal<boolean>;
|
|
15
19
|
private readonly filterConfig;
|
|
20
|
+
private readonly emptyHintKey;
|
|
16
21
|
private readonly dependsOnDataPath;
|
|
17
|
-
private readonly
|
|
22
|
+
private readonly autoDependsOnDataPath;
|
|
18
23
|
private scopePointerToDataPath;
|
|
19
|
-
private replacePointerLeaf;
|
|
20
24
|
private inferListKeyFromScope;
|
|
21
25
|
private readValueAtPath;
|
|
22
26
|
readonly filteredOptions: Signal<BaseCodeListEntry[]>;
|
|
23
27
|
constructor(jsonFormsService: JsonFormsAngularService);
|
|
24
28
|
getEventValue: (event: any) => any;
|
|
25
29
|
optionLabel(opt: BaseCodeListEntry): string;
|
|
26
|
-
|
|
30
|
+
emptyHint(): string;
|
|
31
|
+
shouldShowEmptyHint(): boolean;
|
|
32
|
+
onSelectionChange(value: number | string | Array<number | string>): void;
|
|
27
33
|
}
|
|
28
34
|
export declare const codeListSelectTester: RankedTester;
|
|
@@ -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:
|
|
8
|
-
index:
|
|
9
|
-
rowChange:
|
|
10
|
-
close:
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
}>;
|
package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-detail.component.d.ts
CHANGED
|
@@ -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:
|
|
9
|
-
index:
|
|
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:
|
|
12
|
-
close:
|
|
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
|
}
|
package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-list.component.d.ts
CHANGED
|
@@ -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:
|
|
10
|
-
selectedIndex:
|
|
11
|
-
mode:
|
|
12
|
-
select:
|
|
13
|
-
add:
|
|
14
|
-
delete:
|
|
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;
|
package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-detail.component.d.ts
ADDED
|
@@ -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
|
+
}
|
package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-general.component.d.ts
ADDED
|
@@ -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
|
+
}
|