@hestia-earth/ui-components 0.31.13 → 0.31.15

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.
@@ -8443,7 +8443,7 @@ const customErrorMessage = {
8443
8443
  'invalid water salinity': ({ params }) => `The water type ${params?.current} is not consistent with the Water salinity you specified.
8444
8444
  Make sure the Water salinity value is correct and either fix it or update the water type accordingly.`,
8445
8445
  'must add substrate inputs': () => 'The substrate must be specified when a substrate-based protected cropping system has been added.',
8446
- 'should not be equal to cycleDuration for crop': ({ params }) => `For crop production Cycles, siteDuration must represent the period from harvest of the previous crop to harvest of the current crop.
8446
+ 'should not be equal to cycleDuration for crop': ({ params }) => `For temporary crop production Cycles, siteDuration must represent the period from harvest of the previous crop to harvest of the current crop.
8447
8447
  Here, you have stated that ${schemaLink('Cycle#cycleDuration', 'cycleDuration')} represents the period from
8448
8448
  ${code(params?.current)} to harvest of the current crop, and set ${schemaLink('Cycle#cycleDuration', 'cycleDuration')} as equal to ${schemaLink('Cycle#siteDuration', 'siteDuration')}.
8449
8449
  Please check the affected fields for errors.`,
@@ -8457,7 +8457,10 @@ const customErrorMessage = {
8457
8457
  'must be below maximum cycleDuration': ({ params }) => `The maximum duration for this crop production cycle is ${params.limit} days,
8458
8458
  but the calculated duration from the end date and start date provided is ${params.current}.`,
8459
8459
  'should add the term pastureGrass': () => `For Cycles with ${code('siteType=permanent pasture')} we recommend specifying the type(s) of ${code('Pasture grass')} grown.
8460
- This is particularly important for ruminants and will allow for a more accurate estimate of the amount of grass grazed.`
8460
+ This is particularly important for ruminants and will allow for a more accurate estimate of the amount of grass grazed.`,
8461
+ 'should add the fields for a relative cycle': ({ params }) => `We strongly recommend setting ${params?.expected
8462
+ ?.map((param) => code(param))
8463
+ .join('and')} on all other sites for any uploads with a ${code('relative')} functional unit. This will allow calculation of land occupation and land transformation.`
8461
8464
  };
8462
8465
  const requiredPropertyError = (message, error) => {
8463
8466
  const field = message.split("'")[1].replace("'", '');
@@ -9954,6 +9957,10 @@ class FilesErrorSummaryComponent {
9954
9957
  this.summaries = computed(() => sortSummaries(this.summaryData(), this.resolvedByIndex()));
9955
9958
  this.selectedIndex = signal(undefined);
9956
9959
  this.selectedIndex$ = toObservable(this.selectedIndex);
9960
+ /**
9961
+ * Index of the error that is currently being focused on.
9962
+ */
9963
+ this.focusIndex = output();
9957
9964
  this.resolvedErrors = toSignal(combineLatest([this.itemData$, this.selectedIndex$]).pipe(distinctUntilChangedDeep(), filter(([items]) => items?.length > 0), map(([items, selectedIndex]) => items
9958
9965
  .filter(item => (typeof selectedIndex === 'undefined' ? item.resolved : selectedIndex !== item.summary.index))
9959
9966
  .flatMap(item => item.summary.errors)), startWith([])));
@@ -9974,12 +9981,13 @@ class FilesErrorSummaryComponent {
9974
9981
  toggleSummary(summary) {
9975
9982
  const index = this.isSelected(summary) ? undefined : summary.index;
9976
9983
  this.selectedIndex.set(index);
9984
+ this.focusIndex.emit(index);
9977
9985
  }
9978
9986
  isSelected({ index }) {
9979
9987
  return this.selectedIndex() === index;
9980
9988
  }
9981
9989
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: FilesErrorSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9982
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: FilesErrorSummaryComponent, isStandalone: true, selector: "he-files-error-summary", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: true, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: true, transformFunction: null }, showErrorsOnAutogenerated: { classPropertyName: "showErrorsOnAutogenerated", publicName: "showErrorsOnAutogenerated", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resolvedErrorsChange: "resolvedErrorsChange", unresolvedIndexesChange: "unresolvedIndexesChange" }, viewQueries: [{ propertyName: "items", predicate: FilesErrorSummaryItemComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (summaries().length) {\n <div class=\"table-container\">\n <table class=\"table is-fullwidth is-striped\">\n <tbody>\n @for (summary of summaries(); track summary.index) {\n <tr>\n <he-files-error-summary-item\n class=\"is-block is-p-2 pointer\"\n [summary]=\"summary\"\n [class.is-selected]=\"isSelected(summary)\"\n (click)=\"toggleSummary(summary)\" />\n </tr>\n }\n </tbody>\n </table>\n </div>\n}\n", styles: [".table.is-striped tbody tr:nth-child(2n){background-color:#fff}.table.is-striped tbody tr:nth-child(odd){background-color:#fefaf0!important}.table tbody tr:last-child td{border-bottom-width:thin}he-files-error-summary-item{border:2px solid transparent;border-radius:3px}he-files-error-summary-item.is-selected{border-color:#ffce38;background:#fefcf7}\n"], dependencies: [{ kind: "component", type: FilesErrorSummaryItemComponent, selector: "he-files-error-summary-item", inputs: ["summary", "resolved"], outputs: ["resolvedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9990
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: FilesErrorSummaryComponent, isStandalone: true, selector: "he-files-error-summary", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: true, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: true, transformFunction: null }, showErrorsOnAutogenerated: { classPropertyName: "showErrorsOnAutogenerated", publicName: "showErrorsOnAutogenerated", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focusIndex: "focusIndex", resolvedErrorsChange: "resolvedErrorsChange", unresolvedIndexesChange: "unresolvedIndexesChange" }, viewQueries: [{ propertyName: "items", predicate: FilesErrorSummaryItemComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (summaries().length) {\n <div class=\"table-container\">\n <table class=\"table is-fullwidth is-striped\">\n <tbody>\n @for (summary of summaries(); track summary.index) {\n <tr>\n <he-files-error-summary-item\n class=\"is-block is-p-2 pointer\"\n [summary]=\"summary\"\n [class.is-selected]=\"isSelected(summary)\"\n (click)=\"toggleSummary(summary)\" />\n </tr>\n }\n </tbody>\n </table>\n </div>\n}\n", styles: [".table.is-striped tbody tr:nth-child(2n){background-color:#fff}.table.is-striped tbody tr:nth-child(odd){background-color:#fefaf0!important}.table tbody tr:last-child td{border-bottom-width:thin}he-files-error-summary-item{border:2px solid transparent;border-radius:3px}he-files-error-summary-item.is-selected{border-color:#ffce38;background:#fefcf7}\n"], dependencies: [{ kind: "component", type: FilesErrorSummaryItemComponent, selector: "he-files-error-summary-item", inputs: ["summary", "resolved"], outputs: ["resolvedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9983
9991
  }
9984
9992
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: FilesErrorSummaryComponent, decorators: [{
9985
9993
  type: Component$1,