@agridea/suibi-module 0.1.0-preview.8 → 0.1.0-preview.87cac2d

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 (121) hide show
  1. package/README.md +10 -10
  2. package/dist/elements/browser/main.js +75 -64
  3. package/dist/elements/browser/styles.css +1 -1
  4. package/dist/elements/browser/suibi-module-latest.css +1 -1
  5. package/dist/elements/browser/suibi-module-latest.js +75 -64
  6. package/dist/elements/browser/{suibi-module.v0.1.0-preview.8.css → suibi-module.v0.1.0-preview.87cac2d.css} +1 -1
  7. package/dist/elements/browser/suibi-module.v0.1.0-preview.87cac2d.js +78 -0
  8. package/dist/elements/browser/suibi-theme-dark.css +1 -1
  9. package/dist/elements/browser/version.txt +1 -1
  10. package/dist/elements/browser/wc-global-utilities.css +1 -0
  11. package/dist/types/app/app.d.ts +14 -6
  12. package/dist/types/app/components/add-dashed-button/add-dashed-button.component.d.ts +9 -0
  13. package/dist/types/app/components/data-preview/data-preview.component.d.ts +233 -0
  14. package/dist/types/app/components/empty-state/empty-state.component.d.ts +12 -0
  15. package/dist/types/app/components/gauge-arc/gauge-arc.component.d.ts +49 -0
  16. package/dist/types/app/components/header-bar/header-bar.component.d.ts +14 -0
  17. package/dist/types/app/components/inline-table/inline-table.component.d.ts +159 -0
  18. package/dist/types/app/components/inline-table/inline-table.types.d.ts +212 -0
  19. package/dist/types/app/components/module-placeholder-page/module-placeholder-page.component.d.ts +6 -0
  20. package/dist/types/app/components/planning-result/planning-result.component.d.ts +46 -0
  21. package/dist/types/app/components/planning-result-row/planning-result-row.component.d.ts +34 -0
  22. package/dist/types/app/components/planning-trigger/planning-trigger.component.d.ts +13 -0
  23. package/dist/types/app/components/results-page/results-page.component.d.ts +13 -0
  24. package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-dashboard.component.d.ts +32 -0
  25. package/dist/types/app/components/suissebilanz-dashboard/suissebilanz-metrics.service.d.ts +21 -0
  26. package/dist/types/app/components/suissebilanz-minibar/suissebilanz-minibar.component.d.ts +19 -0
  27. package/dist/types/app/components/validation-page/validation-page.component.d.ts +18 -0
  28. package/dist/types/app/components/welcome-page/metadata.types.d.ts +1 -0
  29. package/dist/types/app/components/welcome-page/welcome-page.component.d.ts +30 -0
  30. package/dist/types/app/components/workflow-stepper/workflow-stepper.component.d.ts +49 -0
  31. package/dist/types/app/core/data/naebi-data.service.d.ts +52 -31
  32. package/dist/types/app/core/error/global-error-handler.d.ts +5 -0
  33. package/dist/types/app/core/events/suibi-data-emitter.service.d.ts +13 -0
  34. package/dist/types/app/core/events/suibi-data-event.d.ts +26 -0
  35. package/dist/types/app/core/i18n/i18n.service.d.ts +5 -3
  36. package/dist/types/app/core/i18n/locales/fr.d.ts +2 -0
  37. package/dist/types/app/core/i18n/locales/it.d.ts +2 -0
  38. package/dist/types/app/core/master-data/master-data.service.d.ts +15 -1
  39. package/dist/types/app/core/metadata/suibi-metadata.service.d.ts +6 -0
  40. package/dist/types/app/core/metadata/suibi-metadata.types.d.ts +18 -0
  41. package/dist/types/app/core/navigation/navigation.service.d.ts +59 -5
  42. package/dist/types/app/core/planning/planning-balance.service.d.ts +46 -0
  43. package/dist/types/app/core/planning/planning-balance.types.d.ts +206 -0
  44. package/dist/types/app/core/planning/planning-balance.utils.d.ts +10 -0
  45. package/dist/types/app/core/schemas/schema-localization.util.d.ts +18 -0
  46. package/dist/types/app/core/telemetry/telemetry.service.d.ts +12 -0
  47. package/dist/types/app/core/utils/custom-unit.util.d.ts +39 -0
  48. package/dist/types/app/core/utils/object.util.d.ts +46 -0
  49. package/dist/types/app/core/validation/ajv-custom.d.ts +1 -0
  50. package/dist/types/app/core/validation/capabilities.d.ts +11 -5
  51. package/dist/types/app/core/validation/global-validation.service.d.ts +33 -4
  52. package/dist/types/app/jsonforms/filters/code-list-filter-resolvers.d.ts +3 -0
  53. package/dist/types/app/jsonforms/registry/renderers.registry.d.ts +12 -0
  54. package/dist/types/app/jsonforms/renderers/controls/selects/animal-category/animal-category-select.renderer.d.ts +1 -1
  55. package/dist/types/app/jsonforms/renderers/controls/selects/code-list/code-list-select.renderer.d.ts +16 -2
  56. package/dist/types/app/jsonforms/renderers/layout/array/array-layout.renderer.d.ts +43 -0
  57. package/dist/types/app/jsonforms/renderers/layout/categorization/selected-category-categorization.renderer.d.ts +34 -0
  58. package/dist/types/app/jsonforms/renderers/layout/constraint/constraint-layout.renderer.d.ts +1 -0
  59. package/dist/types/app/jsonforms/renderers/layout/group/base-group.renderer.d.ts +2 -0
  60. package/dist/types/app/jsonforms/renderers/layout/group/module-toggle-group.renderer.d.ts +38 -0
  61. package/dist/types/app/nutrient-cycle/animal-stock/animal-stock-detail/animal-stock-detail.component.d.ts +21 -0
  62. package/dist/types/app/{animal-stock → nutrient-cycle/animal-stock/animal-stock-list}/animal-stock-list.component.d.ts +6 -9
  63. package/dist/types/app/{animal-stock → nutrient-cycle/animal-stock/animal-stock-master-detail}/animal-stock-master-detail.component.d.ts +5 -2
  64. package/dist/types/app/{animal-stock → nutrient-cycle/animal-stock}/animal-stock.types.d.ts +6 -6
  65. package/dist/types/app/nutrient-cycle/animal-stock/index.d.ts +4 -0
  66. package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-master-detail/farm-manure-trading-master-detail.component.d.ts +19 -0
  67. package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-table/farm-manure-trading-table.component.d.ts +37 -0
  68. package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading-table/farm-manure-trading-table.config.d.ts +24 -0
  69. package/dist/types/app/nutrient-cycle/farm-manure-trading/farm-manure-trading.types.d.ts +31 -0
  70. package/dist/types/app/nutrient-cycle/farm-manure-trading/index.d.ts +4 -0
  71. package/dist/types/app/nutrient-cycle/farm-manure-trading/transaction-unit.util.d.ts +3 -0
  72. package/dist/types/app/nutrient-cycle/field-cultivation/arable-land-table/arable-land-table.component.d.ts +23 -0
  73. package/dist/types/app/nutrient-cycle/field-cultivation/arable-land-table/arable-land-table.config.d.ts +16 -0
  74. package/dist/types/app/nutrient-cycle/field-cultivation/crop-harvest-table/crop-harvest-table.component.d.ts +21 -0
  75. package/dist/types/app/nutrient-cycle/field-cultivation/crop-harvest-table/crop-harvest-table.config.d.ts +13 -0
  76. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-detail/field-cultivation-detail.component.d.ts +22 -0
  77. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-general/field-cultivation-general.component.d.ts +20 -0
  78. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-list/field-cultivation-list.component.d.ts +17 -0
  79. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation-master-detail/field-cultivation-master-detail.component.d.ts +29 -0
  80. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.types.d.ts +45 -0
  81. package/dist/types/app/nutrient-cycle/field-cultivation/field-cultivation.util.d.ts +10 -0
  82. package/dist/types/app/nutrient-cycle/field-cultivation/fodder-cropland-table/fodder-cropland-table.component.d.ts +29 -0
  83. package/dist/types/app/nutrient-cycle/field-cultivation/fodder-cropland-table/fodder-cropland-table.config.d.ts +21 -0
  84. package/dist/types/app/nutrient-cycle/field-cultivation/index.d.ts +9 -0
  85. package/dist/types/app/nutrient-cycle/field-cultivation/special-crops-table/special-crops-table.component.d.ts +29 -0
  86. package/dist/types/app/nutrient-cycle/field-cultivation/special-crops-table/special-crops-table.config.d.ts +54 -0
  87. package/dist/types/app/nutrient-cycle/field-spreading/fertiliser-table/fertiliser-table.component.d.ts +52 -0
  88. package/dist/types/app/nutrient-cycle/field-spreading/fertiliser-table/fertiliser-table.config.d.ts +20 -0
  89. package/dist/types/app/nutrient-cycle/field-spreading/field-spreading.component.d.ts +36 -0
  90. package/dist/types/app/nutrient-cycle/field-spreading/field-spreading.types.d.ts +44 -0
  91. package/dist/types/app/nutrient-cycle/field-spreading/index.d.ts +2 -0
  92. package/dist/types/app/nutrient-cycle/field-spreading/ingredient.util.d.ts +8 -0
  93. package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.component.d.ts +32 -0
  94. package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-table.config.d.ts +17 -0
  95. package/dist/types/app/nutrient-cycle/field-spreading/recycling-table/recycling-transaction-unit.util.d.ts +4 -0
  96. package/dist/types/app/nutrient-cycle/fodder/fodder-master-detail/fodder-master-detail.component.d.ts +25 -0
  97. package/dist/types/app/nutrient-cycle/fodder/fodder-table/fodder-table.component.d.ts +28 -0
  98. package/dist/types/app/nutrient-cycle/fodder/fodder-table/fodder-table.config.d.ts +9 -0
  99. package/dist/types/app/nutrient-cycle/fodder/fodder.types.d.ts +34 -0
  100. package/dist/types/app/nutrient-cycle/fodder/index.d.ts +3 -0
  101. package/dist/types/app/nutrient-cycle/fodder/ingredient.util.d.ts +8 -0
  102. package/dist/types/app/nutrient-cycle/fodder/transaction-unit.util.d.ts +2 -0
  103. package/dist/types/app/nutrient-cycle/lifetime-performance/index.d.ts +2 -0
  104. package/dist/types/app/nutrient-cycle/lifetime-performance/lifetime-performance-form.component.d.ts +27 -0
  105. package/dist/types/app/nutrient-cycle/lifetime-performance/lifetime-performance.types.d.ts +5 -0
  106. package/dist/types/app/nutrient-cycle/storage/index.d.ts +4 -0
  107. package/dist/types/app/nutrient-cycle/storage/storage-detail/storage-detail.component.d.ts +30 -0
  108. package/dist/types/app/nutrient-cycle/storage/storage-general/storage-general.component.d.ts +29 -0
  109. package/dist/types/app/nutrient-cycle/storage/storage-list/storage-list.component.d.ts +23 -0
  110. package/dist/types/app/nutrient-cycle/storage/storage-master-detail/storage-master-detail.component.d.ts +32 -0
  111. package/dist/types/app/nutrient-cycle/storage/storage.types.d.ts +40 -0
  112. package/dist/types/environments/environment.d.ts +11 -0
  113. package/dist/types/public-api.d.ts +2 -0
  114. package/dist/types/shared/material-icons.d.ts +3 -3
  115. package/package.json +69 -17
  116. package/dist/elements/browser/suibi-module.v0.1.0-preview.8.js +0 -67
  117. package/dist/types/app/animal-stock/animal-stock-detail.component.d.ts +0 -22
  118. package/dist/types/app/data-preview.d.ts +0 -7
  119. package/dist/types/app/header-bar.d.ts +0 -19
  120. package/dist/types/app/welcome-page.d.ts +0 -4
  121. /package/dist/types/app/{core/validation/validation-errors-panel.d.ts → components/validation-errors-panel/validation-errors-panel.component.d.ts} +0 -0
@@ -0,0 +1,32 @@
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
+ * 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
+ */
14
+ export declare class RecyclingTableComponent {
15
+ readonly entries: import("@angular/core").InputSignal<FieldSpreadingRecyclingEntry[]>;
16
+ readonly entriesChange: import("@angular/core").OutputEmitterRef<FieldSpreadingRecyclingEntry[]>;
17
+ /** Column/section config (constant — no signal needed). */
18
+ protected readonly config: import("../../../components/inline-table/inline-table.types").InlineTableConfig;
19
+ /** Cast typed entries to generic Record[] for InlineTableComponent. */
20
+ readonly rowsForTable: import("@angular/core").Signal<Record<string, unknown>[]>;
21
+ /** Cast generic output back to typed FieldSpreadingRecyclingEntry[], stripping any
22
+ * ingredient with a 0 quantity so it never reaches the final JSON. */
23
+ onRowsChange(rows: Record<string, unknown>[]): void;
24
+ /**
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.
30
+ */
31
+ readonly deriveUnits: (changedKey: string, newValue: unknown, row: Record<string, unknown>, previousRow?: Record<string, unknown>) => Record<string, unknown>;
32
+ }
@@ -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;
@@ -0,0 +1,4 @@
1
+ /** Derives the mandatory transaction unit ('kg' or 'm3') from the product's matterState. */
2
+ export declare function deriveRecyclingTransactionUnit(productCode: string | null | undefined): string | null;
3
+ /** Derives the mandatory ingredient unit ('kg/t' or 'kg/m3') from the product's matterState. */
4
+ export declare function deriveRecyclingIngredientUnit(productCode: string | null | undefined): string | null;
@@ -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;
@@ -0,0 +1,34 @@
1
+ export interface FodderIngredient {
2
+ quantity?: number;
3
+ molecularFormula?: string;
4
+ unit?: string;
5
+ }
6
+ export interface FodderTradingEntry {
7
+ quantity?: number;
8
+ typeOfFeedstuffProduct?: string;
9
+ transactionUnit?: string;
10
+ ingredient?: FodderIngredient[];
11
+ }
12
+ export interface FodderSupply extends FodderTradingEntry {
13
+ }
14
+ export interface FodderDispense extends FodderTradingEntry {
15
+ }
16
+ export interface FodderCropFromNonFodderCropland extends FodderTradingEntry {
17
+ }
18
+ export interface FodderTradingData {
19
+ supply?: FodderSupply[];
20
+ dispense?: FodderDispense[];
21
+ }
22
+ export interface FodderData {
23
+ trading?: FodderTradingData;
24
+ cropFromNonFodderCropland?: FodderCropFromNonFodderCropland[];
25
+ proportionStorageLoss?: number;
26
+ totalBalanceErrorMargin?: number;
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
+ };
@@ -0,0 +1,3 @@
1
+ export * from './fodder-table/fodder-table.component';
2
+ export * from './fodder-master-detail/fodder-master-detail.component';
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;
@@ -0,0 +1,2 @@
1
+ export declare const FODDER_TRANSACTION_UNIT = "kg";
2
+ export declare function deriveFodderTransactionUnit(): string;
@@ -0,0 +1,2 @@
1
+ export * from './lifetime-performance-form.component';
2
+ export * from './lifetime-performance.types';
@@ -0,0 +1,27 @@
1
+ import { JsonSchema, UISchemaElement } from '@jsonforms/core';
2
+ import { AnimalStockRow } from '../animal-stock/animal-stock.types';
3
+ import { LifetimePerformance } from './lifetime-performance.types';
4
+ export declare class LifetimePerformanceFormComponent {
5
+ private readonly i18n;
6
+ private readonly masterData;
7
+ rows: import("@angular/core").InputSignal<AnimalStockRow[]>;
8
+ lifetimePerformance: import("@angular/core").InputSignal<LifetimePerformance | null | undefined>;
9
+ dataChange: import("@angular/core").OutputEmitterRef<LifetimePerformance>;
10
+ readonly renderers: {
11
+ tester: import("@jsonforms/core").RankedTester;
12
+ renderer: any;
13
+ }[];
14
+ readonly suibiAjv: import("ajv").Ajv;
15
+ private readonly beefFields;
16
+ private readonly dairyFields;
17
+ private readonly hasBeefRows;
18
+ private readonly hasDairyRows;
19
+ private readonly activeFields;
20
+ readonly shouldRender: import("@angular/core").Signal<boolean>;
21
+ readonly schema: import("@angular/core").Signal<JsonSchema>;
22
+ readonly localizedUi: import("@angular/core").Signal<UISchemaElement>;
23
+ readonly jsonFormsData: import("@angular/core").Signal<LifetimePerformance & import("../../core/schemas/ui-helper-registry").UiHelperDefinitions>;
24
+ private readonly pruneDisallowedEffect;
25
+ onDataChange(newValue: unknown): void;
26
+ private hasFlag;
27
+ }
@@ -0,0 +1,5 @@
1
+ export interface LifetimePerformance {
2
+ dailyGain?: number;
3
+ liveWeight?: number;
4
+ milkProductionReport?: number;
5
+ }
@@ -0,0 +1,4 @@
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
+ export * from './storage.types';
@@ -0,0 +1,30 @@
1
+ import { JsonSchema, UISchemaElement } from '@jsonforms/core';
2
+ import { ManurePitEntry, SlurryTankEntry, StorageEntryType } from '../storage.types';
3
+ export declare class StorageDetailComponent {
4
+ private readonly i18n;
5
+ readonly type: import("@angular/core").InputSignal<StorageEntryType>;
6
+ readonly row: import("@angular/core").InputSignal<ManurePitEntry | SlurryTankEntry | null>;
7
+ readonly rowChange: import("@angular/core").OutputEmitterRef<ManurePitEntry | SlurryTankEntry>;
8
+ readonly close: import("@angular/core").OutputEmitterRef<void>;
9
+ readonly renderers: {
10
+ tester: import("@jsonforms/core").RankedTester;
11
+ renderer: any;
12
+ }[];
13
+ readonly ajv: import("ajv").Ajv;
14
+ readonly schema: import("@angular/core").Signal<JsonSchema>;
15
+ readonly localizedUi: import("@angular/core").Signal<UISchemaElement>;
16
+ readonly detailTitle: import("@angular/core").Signal<string>;
17
+ readonly jsonFormsData: import("@angular/core").Signal<(({
18
+ descriptor?: string;
19
+ cover?: number | null;
20
+ manureFromAnimalStockStored?: import("..").ManureFromAnimalStockStored[];
21
+ } | {
22
+ descriptor?: string;
23
+ volumeInM3?: number | null;
24
+ depthInM?: number | null;
25
+ cover?: number | null;
26
+ mixingFrequency?: number | null;
27
+ manureDerivation?: string[];
28
+ }) & import("../../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
29
+ onDataChange(event: unknown): void;
30
+ }
@@ -0,0 +1,29 @@
1
+ import { JsonSchema, UISchemaElement } from '@jsonforms/core';
2
+ import { StorageNormalized } from '../storage.types';
3
+ type StorageSection = 'manure' | 'slurry' | 'slurryFacilityToggle' | 'general';
4
+ export declare class StorageGeneralComponent {
5
+ private readonly i18n;
6
+ readonly section: import("@angular/core").InputSignal<StorageSection>;
7
+ readonly value: import("@angular/core").InputSignal<StorageNormalized>;
8
+ readonly valueChange: import("@angular/core").OutputEmitterRef<StorageNormalized>;
9
+ readonly renderers: {
10
+ tester: import("@jsonforms/core").RankedTester;
11
+ renderer: any;
12
+ }[];
13
+ readonly ajv: import("ajv").Ajv;
14
+ readonly schema: import("@angular/core").Signal<JsonSchema>;
15
+ readonly localizedUi: import("@angular/core").Signal<UISchemaElement>;
16
+ readonly jsonFormsData: import("@angular/core").Signal<({
17
+ stableStrawLitter: number | null;
18
+ manureSupplyProportionStored: number | null;
19
+ createFacilitySpecificManureProduct: boolean;
20
+ } & import("../../../core/schemas/ui-helper-registry").UiHelperDefinitions) | ({
21
+ createFacilitySpecificSlurryProduct: boolean;
22
+ } & import("../../../core/schemas/ui-helper-registry").UiHelperDefinitions) | ({
23
+ slurrySupplyProportionStored: number | null;
24
+ slurryTankQuantity: number | null;
25
+ dilutionRatio: number | null;
26
+ } & import("../../../core/schemas/ui-helper-registry").UiHelperDefinitions) | null>;
27
+ onDataChange(event: unknown): void;
28
+ }
29
+ export {};
@@ -0,0 +1,23 @@
1
+ import { ManurePitEntry, SlurryTankEntry, StorageEntryType } from '../storage.types';
2
+ export declare class StorageListComponent {
3
+ private readonly i18n;
4
+ private readonly masterData;
5
+ readonly rows: import("@angular/core").InputSignal<(ManurePitEntry | SlurryTankEntry)[]>;
6
+ readonly selectedIndex: import("@angular/core").InputSignal<number | null>;
7
+ readonly type: import("@angular/core").InputSignal<StorageEntryType>;
8
+ readonly errorIndices: import("@angular/core").InputSignal<ReadonlySet<number>>;
9
+ readonly select: import("@angular/core").OutputEmitterRef<number>;
10
+ readonly add: import("@angular/core").OutputEmitterRef<void>;
11
+ readonly delete: import("@angular/core").OutputEmitterRef<number>;
12
+ readonly displayedColumns: string[];
13
+ readonly headerName: import("@angular/core").Signal<string>;
14
+ readonly headerMeta: import("@angular/core").Signal<string>;
15
+ resolveName(row: ManurePitEntry | SlurryTankEntry, index: number): string;
16
+ rowHasError(index: number): boolean;
17
+ rowErrorLabel(): string;
18
+ resolveMeta(row: ManurePitEntry | SlurryTankEntry): string;
19
+ emptyLabel(): string;
20
+ emptyHintLabel(): string;
21
+ addLabel(): string;
22
+ onDelete(index: number, event: Event): void;
23
+ }
@@ -0,0 +1,32 @@
1
+ import { StorageTab } from '../../../core/navigation/navigation.service';
2
+ import { ManurePitEntry, SlurryTankEntry, StorageEntryType, StorageNormalized } from '../storage.types';
3
+ export declare class StorageMasterDetailComponent {
4
+ private readonly dataSvc;
5
+ private readonly navigationSvc;
6
+ private readonly globalValidation;
7
+ constructor();
8
+ readonly storage: import("@angular/core").Signal<StorageNormalized>;
9
+ readonly manurePitRows: import("@angular/core").Signal<ManurePitEntry[]>;
10
+ readonly slurryTankRows: import("@angular/core").Signal<SlurryTankEntry[]>;
11
+ readonly selectedDetailType: import("@angular/core").WritableSignal<StorageEntryType | null>;
12
+ readonly selectedIndex: import("@angular/core").WritableSignal<number | null>;
13
+ readonly manureFacilitySpecificEnabled: import("@angular/core").Signal<boolean>;
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>>;
17
+ readonly detailOpen: import("@angular/core").Signal<boolean>;
18
+ readonly detailType: import("@angular/core").Signal<StorageEntryType>;
19
+ readonly currentDetail: import("@angular/core").Signal<ManurePitEntry | SlurryTankEntry | null>;
20
+ readonly activeTab: import("@angular/core").Signal<StorageTab>;
21
+ openDetail(type: StorageEntryType, index: number): void;
22
+ closeDetail(): void;
23
+ addEntry(type: StorageEntryType): void;
24
+ deleteEntry(type: StorageEntryType, index: number): void;
25
+ onGeneralChange(value: StorageNormalized): void;
26
+ onDetailChange(value: ManurePitEntry | SlurryTankEntry): void;
27
+ private patchRows;
28
+ private patchStorage;
29
+ private normalizeStorage;
30
+ private createEmptyManurePit;
31
+ private createEmptySlurryTank;
32
+ }
@@ -0,0 +1,40 @@
1
+ export interface ManureFromAnimalStockStored {
2
+ manureDerivation?: string;
3
+ proportionStored?: number | null;
4
+ }
5
+ export interface ManurePitEntry {
6
+ descriptor?: string;
7
+ cover?: number | null;
8
+ manureFromAnimalStockStored?: ManureFromAnimalStockStored[];
9
+ }
10
+ export interface SlurryTankEntry {
11
+ descriptor?: string;
12
+ volumeInM3?: number | null;
13
+ depthInM?: number | null;
14
+ cover?: number | null;
15
+ mixingFrequency?: number | null;
16
+ manureDerivation?: string[];
17
+ }
18
+ export interface StorageData {
19
+ stableStrawLitter?: number | null;
20
+ manureSupplyProportionStored?: number | null;
21
+ slurrySupplyProportionStored?: number | null;
22
+ createFacilitySpecificManureProduct?: boolean;
23
+ createFacilitySpecificSlurryProduct?: boolean;
24
+ slurryTankQuantity?: number | null;
25
+ dilutionRatio?: number | null;
26
+ manurePit?: ManurePitEntry[];
27
+ slurryTank?: SlurryTankEntry[];
28
+ }
29
+ export interface StorageNormalized {
30
+ stableStrawLitter: number | null;
31
+ manureSupplyProportionStored: number | null;
32
+ slurrySupplyProportionStored: number | null;
33
+ createFacilitySpecificManureProduct: boolean;
34
+ createFacilitySpecificSlurryProduct: boolean;
35
+ slurryTankQuantity: number | null;
36
+ dilutionRatio: number | null;
37
+ manurePit: ManurePitEntry[];
38
+ slurryTank: SlurryTankEntry[];
39
+ }
40
+ export type StorageEntryType = 'manure_pit' | 'slurry_tank';
@@ -0,0 +1,11 @@
1
+ export declare const environment: {
2
+ production: boolean;
3
+ planningApiKey: string;
4
+ planningEndpoints: {
5
+ ebilanz: string;
6
+ blw: string;
7
+ };
8
+ appInsights: {
9
+ connectionString: string;
10
+ };
11
+ };
@@ -2,3 +2,5 @@ export type { NaebiData } from './app/core/data/naebi-data.service';
2
2
  export type { Locale } from './app/core/i18n/i18n.service';
3
3
  export type { PageId, AnimalStockCategory } from './app/core/navigation/navigation.service';
4
4
  export type { EnrichedValidationError } from './app/core/validation/global-validation.service';
5
+ export type { SuibiDataEventDetail, SuibiDataEventPayload, SuibiDataEventMetadata } from './app/core/events/suibi-data-event';
6
+ export { SUIBI_DATA_EVENT_VERSION } from './app/core/events/suibi-data-event';
@@ -1,15 +1,15 @@
1
1
  /**
2
- * Ensure the Material Icons stylesheet exists in the document <head> (SPA / non-shadow usage).
2
+ * Ensure the Material icon stylesheets exist in the document <head> (SPA / non-shadow usage).
3
3
  * Idempotent: returns immediately if DOM unavailable (SSR) or link already present.
4
4
  *
5
5
  * @param doc Optional document for testing / dependency injection.
6
6
  */
7
7
  export declare function ensureMaterialIconsInHead(doc?: Document): void;
8
8
  /**
9
- * Ensure the Material Icons stylesheet is available inside a ShadowRoot so that
9
+ * Ensure the Material icon stylesheets are available inside a ShadowRoot so that
10
10
  * icon ligatures render when the component is embedded as a Web Component.
11
11
  * We prepend so icons load early without disturbing existing adopted stylesheets.
12
- * Idempotent: guarded by a custom attribute selector.
12
+ * Idempotent: each font link is guarded by its own custom attribute selector.
13
13
  *
14
14
  * @param shadow Target ShadowRoot; silently no-ops if null/undefined or DOM unavailable.
15
15
  */
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@agridea/suibi-module",
3
- "version": "0.1.0-preview.8",
3
+ "version": "0.1.0-preview.87cac2d",
4
4
  "scripts": {
5
5
  "ng": "ng",
6
- "start": "ng serve --host 0.0.0.0",
6
+ "start": "ng serve",
7
7
  "build": "ng build",
8
8
  "watch": "ng build --watch --configuration development",
9
- "test": "CHROME_BIN=${CHROME_BIN:-/usr/bin/chromium} ng test --browsers=ChromeHeadless --watch=false",
9
+ "test": "CHROME_BIN=${CHROME_BIN:-/usr/bin/chromium} ng test --browsers=ChromeHeadlessNoSandbox --watch=false",
10
10
  "test:chrome": "CHROME_BIN=${CHROME_BIN:-/usr/bin/chromium} ng test --browsers=Chrome --watch=false",
11
- "test:headless": "CHROME_BIN=${CHROME_BIN:-/usr/bin/chromium} ng test --browsers=ChromeHeadless --watch=false --no-progress",
12
- "test:ci": "CI=true CHROME_BIN=${CHROME_BIN:-/usr/bin/chromium} ng test --browsers=ChromeHeadless --watch=false --no-progress",
11
+ "test:headless": "CHROME_BIN=${CHROME_BIN:-/usr/bin/chromium} ng test --browsers=ChromeHeadlessNoSandbox --watch=false --no-progress",
12
+ "test:ci": "CI=true CHROME_BIN=${CHROME_BIN:-/usr/bin/chromium} ng test --browsers=ChromeHeadlessNoSandbox --watch=false --no-progress",
13
13
  "build:wc": "ng build --configuration elements && node scripts/alias-wc-bundle.mjs && npm run build:types",
14
14
  "build:wc:dev": "ng build --configuration elements-dev",
15
15
  "watch:wc": "bash -c 'node scripts/alias-wc-watch.mjs & ng build --configuration elements --watch'",
@@ -56,25 +56,29 @@
56
56
  "access": "public"
57
57
  },
58
58
  "dependencies": {
59
- "@angular/common": "^20.2.4",
60
- "@angular/compiler": "^20.2.4",
61
- "@angular/core": "^20.2.4",
62
- "@angular/elements": "^20.2.4",
63
- "@angular/forms": "^20.2.4",
64
- "@angular/localize": "^20.2.4",
65
- "@angular/material": "20.2.2",
66
- "@angular/platform-browser": "^20.2.4",
67
- "@angular/router": "^20.2.4",
59
+ "@angular/animations": "^20.3.17",
60
+ "@angular/cdk": "20.2.14",
61
+ "@angular/common": "^20.3.25",
62
+ "@angular/compiler": "^20.3.25",
63
+ "@angular/core": "^20.3.25",
64
+ "@angular/elements": "^20.3.17",
65
+ "@angular/forms": "^20.3.25",
66
+ "@angular/localize": "^20.3.26",
67
+ "@angular/material": "^20.2.14",
68
+ "@angular/platform-browser": "^20.3.17",
69
+ "@angular/router": "^20.3.17",
68
70
  "@jsonforms/angular": "^3.6.0",
69
71
  "@jsonforms/angular-material": "^3.6.0",
70
72
  "@jsonforms/core": "^3.6.0",
73
+ "@microsoft/applicationinsights-web": "^3.3.10",
74
+ "dayjs": "^1.11.10",
71
75
  "rxjs": "~7.8.0",
72
76
  "tslib": "^2.3.0"
73
77
  },
74
78
  "devDependencies": {
75
- "@angular/build": "^20.2.2",
76
- "@angular/cli": "^20.2.2",
77
- "@angular/compiler-cli": "^20.2.4",
79
+ "@angular/build": "^20.3.30",
80
+ "@angular/cli": "^20.3.18",
81
+ "@angular/compiler-cli": "^20.3.26",
78
82
  "@types/jasmine": "~5.1.0",
79
83
  "http-server": "^14.1.1",
80
84
  "jasmine-core": "~5.9.0",
@@ -86,5 +90,53 @@
86
90
  "ts-node": "^10.9.2",
87
91
  "tsx": "^4.20.5",
88
92
  "typescript": "~5.9.2"
93
+ },
94
+ "overrides": {
95
+ "@hono/node-server": "^2.0.5",
96
+ "@isaacs/brace-expansion": "^5.0.1",
97
+ "@modelcontextprotocol/sdk": "^1.30.0",
98
+ "@nevware21/ts-utils": "^0.14.0",
99
+ "body-parser": "^1.20.6",
100
+ "brace-expansion": "^2.0.1",
101
+ "diff": "^4.0.4",
102
+ "engine.io": "^6.6.8",
103
+ "fast-uri": "^3.1.4",
104
+ "flatted": "^3.4.2",
105
+ "follow-redirects": "^1.15.12",
106
+ "immutable": "^5.1.8",
107
+ "ip-address": "^10.1.1",
108
+ "lodash": "^4.18.0",
109
+ "path-to-regexp": "^8.4.0",
110
+ "postcss": "^8.5.18",
111
+ "qs": "^6.15.2",
112
+ "rollup": "4.59.0",
113
+ "sigstore": "^4.1.1",
114
+ "socket.io-adapter": "^2.5.7",
115
+ "socket.io-parser": "^4.2.6",
116
+ "tar": "^7.5.21",
117
+ "tmp": "^0.2.6",
118
+ "ws": "^8.20.2",
119
+ "anymatch": {
120
+ "picomatch": "^2.3.2"
121
+ },
122
+ "micromatch": {
123
+ "picomatch": "^2.3.2"
124
+ },
125
+ "karma": {
126
+ "minimatch": "^3.1.4",
127
+ "picomatch": "^2.3.2",
128
+ "brace-expansion": "^2.0.1"
129
+ },
130
+ "@npmcli/package-json": {
131
+ "brace-expansion": "^2.0.1",
132
+ "glob": "^10.5.0"
133
+ },
134
+ "@tufjs/models": {
135
+ "brace-expansion": "^2.0.1"
136
+ },
137
+ "cacache": {
138
+ "brace-expansion": "^2.0.1",
139
+ "glob": "^10.5.0"
140
+ }
89
141
  }
90
142
  }