@zambon-dev/ui 1.3.0 → 1.4.0

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/CHANGELOG.md CHANGED
@@ -23,6 +23,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
23
 
24
24
  ### ⚠ Breaking Changes / Migration
25
25
 
26
+ ## [1.4.0] - 2026-10-31
27
+
28
+ ### Added
29
+
30
+ - **The audit shows an operation's changes as a diff.** The change details list each field with
31
+ its label and its value before and after. Changed values are marked in red and green, with +/−
32
+ markers and screen-reader text, so the change does not rely on colour alone. Dates, numbers and
33
+ booleans follow the user's locale. The details open on the fields the operation changed; **Show
34
+ all fields** lists the rest of the record, with the key and audit columns grouped apart. That
35
+ needs ZWebAPI 1.17 or later, which rebuilds the whole record; against an older backend the
36
+ changed fields still show and the option is off.
37
+ - **Each operation in the list says how many fields it changed.**
38
+ - **`OPERATIONS_HISTORY_FIELD_LABEL` labels the audited fields.** The default turns `NomeCompleto`
39
+ into "Nome completo". Provide a function to use the application's own field labels or
40
+ translation keys.
41
+
42
+ ### Deprecated
43
+
44
+ - **`shared-operations-history-modal`'s `oldValues` and `newValues` inputs.** Bind `operation`
45
+ instead. The operations list's `selectedOldValues` and `selectedNewValues` give way to
46
+ `selectedOperation` likewise.
47
+
48
+ ### Fixed
49
+
50
+ - **Selecting an operation with no stored values no longer throws.** The operations list parsed an
51
+ empty string as JSON.
52
+
26
53
  ## [1.3.0] - 2026-10-31
27
54
 
28
55
  ### Added
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import { ChangeDetectionStrategy, Component, DOCUMENT, HostListener, Injectable, InjectionToken, Input, NgModule, Pipe, ViewChild, computed, effect, inject, input, model, output, signal, viewChild } from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DOCUMENT, HostListener, Injectable, InjectionToken, Input, LOCALE_ID, NgModule, Pipe, ViewChild, computed, effect, inject, input, model, output, signal, viewChild } from "@angular/core";
3
3
  import * as i1$1 from "@angular/router";
4
4
  import { ActivatedRoute, Router, RouterModule } from "@angular/router";
5
5
  import { APP_CONFIG, AuthService, ButtonComponent, ButtonFiltersComponent, ButtonRefreshComponent, ChildList, DefaultTabViewComponent, FRAMEWORK_VIEW_TYPE, FrameworkViewType, ModalBase, Tab, TabService, TabViewBase, TabsComponent } from "@zambon-dev/ui/framework";
@@ -9,7 +9,7 @@ import { BehaviorSubject, Subject, catchError, finalize, interval, map, mergeMap
9
9
  import { HttpBackend, HttpClient } from "@angular/common/http";
10
10
  import { JwtHelperService, JwtInterceptor } from "@auth0/angular-jwt";
11
11
  import { HubConnectionBuilder, HubConnectionState } from "@microsoft/signalr";
12
- import { AsyncPipe, DatePipe, JsonPipe } from "@angular/common";
12
+ import { AsyncPipe, DatePipe, NgTemplateOutlet, formatDate, formatNumber } from "@angular/common";
13
13
  import { toSignal } from "@angular/core/rxjs-interop";
14
14
  import * as i1 from "@angular/forms";
15
15
  import { FormBuilder, FormsModule, ReactiveFormsModule, Validators } from "@angular/forms";
@@ -86,6 +86,16 @@ const EXTERNAL_CONTENT_CONFIGS = new InjectionToken("Embedded external content c
86
86
  providedIn: "root",
87
87
  factory: () => new ExternalContentConfigs()
88
88
  });
89
+ function humanizeFieldName(fieldName) {
90
+ return (fieldName.match(/[A-Z]{2,}(?=[A-Z][a-z]|\d|$)|[A-Z]?[a-z]+|[A-Z]+|\d+/g) ?? [fieldName]).map((word, index) => {
91
+ if (word.length > 1 && word === word.toUpperCase()) return word;
92
+ return index === 0 ? word.charAt(0).toUpperCase() + word.slice(1) : word.toLowerCase();
93
+ }).join(" ");
94
+ }
95
+ const OPERATIONS_HISTORY_FIELD_LABEL = new InjectionToken("Audited field label", {
96
+ providedIn: "root",
97
+ factory: () => humanizeFieldName
98
+ });
89
99
  var AuthenticationService = class AuthenticationService extends AuthService {
90
100
  adminAction = "AdministrativeMaster";
91
101
  config = inject(APP_CONFIG);
@@ -1920,11 +1930,122 @@ const externalContentRoutes = [{
1920
1930
  }]
1921
1931
  }]
1922
1932
  }];
1933
+ const EMPTY_VALUE = {
1934
+ isKey: true,
1935
+ text: "OperationsHistory-Value-Empty"
1936
+ };
1937
+ const ISO_DATE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
1938
+ function getOperationFields(operation) {
1939
+ if (!operation) return [];
1940
+ if (operation.fields && operation.fields.length > 0) return operation.fields;
1941
+ const oldValues = parseValues(operation.oldValues);
1942
+ const newValues = parseValues(operation.newValues);
1943
+ return [.../* @__PURE__ */ new Set([...Object.keys(oldValues), ...Object.keys(newValues)])].map((name) => ({
1944
+ isChanged: true,
1945
+ isSystem: false,
1946
+ name,
1947
+ newValue: name in newValues ? newValues[name] : null,
1948
+ oldValue: name in oldValues ? oldValues[name] : null,
1949
+ type: guessType(name in newValues ? newValues[name] : oldValues[name])
1950
+ }));
1951
+ }
1952
+ function countChangedFields(operation) {
1953
+ return getOperationFields(operation).filter((field) => field.isChanged && !field.isSystem).length;
1954
+ }
1955
+ function formatFieldValue(value, type, locale) {
1956
+ if (value === null || value === void 0 || value === "") return EMPTY_VALUE;
1957
+ if (typeof value === "boolean") return {
1958
+ isKey: true,
1959
+ text: value ? "OperationsHistory-Value-Yes" : "OperationsHistory-Value-No"
1960
+ };
1961
+ if (type === "date" && (typeof value === "string" || typeof value === "number")) {
1962
+ const date = new Date(value);
1963
+ if (!isNaN(date.getTime())) {
1964
+ const isMidnight = date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() === 0;
1965
+ return {
1966
+ isKey: false,
1967
+ text: formatDate(date, isMidnight ? "shortDate" : "short", locale)
1968
+ };
1969
+ }
1970
+ }
1971
+ if (type === "number" && typeof value === "number") return {
1972
+ isKey: false,
1973
+ text: formatNumber(value, locale, "1.0-6")
1974
+ };
1975
+ if (typeof value === "object") return {
1976
+ isKey: false,
1977
+ text: JSON.stringify(value)
1978
+ };
1979
+ return {
1980
+ isKey: false,
1981
+ text: String(value)
1982
+ };
1983
+ }
1984
+ function guessType(value) {
1985
+ switch (typeof value) {
1986
+ case "boolean": return "boolean";
1987
+ case "number": return "number";
1988
+ case "string": return ISO_DATE.test(value) ? "date" : "text";
1989
+ default: return "other";
1990
+ }
1991
+ }
1992
+ function parseValues(json) {
1993
+ if (!json?.trim()) return {};
1994
+ try {
1995
+ const parsed = JSON.parse(json);
1996
+ return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
1997
+ } catch {
1998
+ return {};
1999
+ }
2000
+ }
1923
2001
  var OperationsHistoryModalComponent = class OperationsHistoryModalComponent extends ModalBase {
1924
2002
  modal = viewChild(ModalComponent, ...ngDevMode ? [{ debugName: "modal" }] : /* istanbul ignore next */ []);
1925
2003
  newValues = input(...ngDevMode ? [void 0, { debugName: "newValues" }] : /* istanbul ignore next */ []);
1926
2004
  oldValues = input(...ngDevMode ? [void 0, { debugName: "oldValues" }] : /* istanbul ignore next */ []);
2005
+ operation = input(...ngDevMode ? [void 0, { debugName: "operation" }] : /* istanbul ignore next */ []);
2006
+ showAllFields = signal(false, ...ngDevMode ? [{ debugName: "showAllFields" }] : /* istanbul ignore next */ []);
2007
+ showSystemFields = signal(false, ...ngDevMode ? [{ debugName: "showSystemFields" }] : /* istanbul ignore next */ []);
2008
+ fieldLabel = inject(OPERATIONS_HISTORY_FIELD_LABEL);
2009
+ locale = inject(LOCALE_ID);
1927
2010
  isModalShown = computed(() => this.modal()?.isOpen() ?? false, ...ngDevMode ? [{ debugName: "isModalShown" }] : /* istanbul ignore next */ []);
2011
+ currentOperation = computed(() => {
2012
+ const operation = this.operation();
2013
+ if (operation) return operation;
2014
+ const oldValues = this.oldValues();
2015
+ const newValues = this.newValues();
2016
+ if (!oldValues && !newValues) return null;
2017
+ return {
2018
+ id: 0,
2019
+ newValues: JSON.stringify(newValues ?? {}),
2020
+ oldValues: JSON.stringify(oldValues ?? {})
2021
+ };
2022
+ }, ...ngDevMode ? [{ debugName: "currentOperation" }] : /* istanbul ignore next */ []);
2023
+ hasFullRecord = computed(() => (this.currentOperation()?.fields?.length ?? 0) > 0, ...ngDevMode ? [{ debugName: "hasFullRecord" }] : /* istanbul ignore next */ []);
2024
+ isAdded = computed(() => this.currentOperation()?.operationType === "Added", ...ngDevMode ? [{ debugName: "isAdded" }] : /* istanbul ignore next */ []);
2025
+ isDeleted = computed(() => this.currentOperation()?.operationType === "Deleted", ...ngDevMode ? [{ debugName: "isDeleted" }] : /* istanbul ignore next */ []);
2026
+ operationLabel = computed(() => {
2027
+ const operationType = this.currentOperation()?.operationType;
2028
+ return operationType ? `OperationsHistory-Operation-${operationType}` : "";
2029
+ }, ...ngDevMode ? [{ debugName: "operationLabel" }] : /* istanbul ignore next */ []);
2030
+ dataRows = computed(() => this.rows().filter((row) => !row.isSystem && (row.isChanged || this.showAllFields())), ...ngDevMode ? [{ debugName: "dataRows" }] : /* istanbul ignore next */ []);
2031
+ systemRows = computed(() => this.showAllFields() ? this.rows().filter((row) => row.isSystem) : [], ...ngDevMode ? [{ debugName: "systemRows" }] : /* istanbul ignore next */ []);
2032
+ rows = computed(() => {
2033
+ const operation = this.currentOperation();
2034
+ return getOperationFields(operation).map((field) => ({
2035
+ isChanged: field.isChanged,
2036
+ isSystem: field.isSystem,
2037
+ label: this.fieldLabel(field.name, operation?.entityName),
2038
+ name: field.name,
2039
+ newValue: formatFieldValue(field.newValue, field.type, this.locale),
2040
+ oldValue: formatFieldValue(field.oldValue, field.type, this.locale)
2041
+ }));
2042
+ }, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
2043
+ onShowAllFieldsChanged(event) {
2044
+ this.showAllFields.set(event.target.checked);
2045
+ }
2046
+ onSystemFieldsToggled() {
2047
+ this.showSystemFields.update((isShown) => !isShown);
2048
+ }
1928
2049
  toggle() {
1929
2050
  this.modal()?.toggleModal();
1930
2051
  }
@@ -1937,7 +2058,7 @@ var OperationsHistoryModalComponent = class OperationsHistoryModalComponent exte
1937
2058
  target: i0.ɵɵFactoryTarget.Component
1938
2059
  });
1939
2060
  static ɵcmp = i0.ɵɵngDeclareComponent({
1940
- minVersion: "17.2.0",
2061
+ minVersion: "17.0.0",
1941
2062
  version: "22.2.0",
1942
2063
  type: OperationsHistoryModalComponent,
1943
2064
  isStandalone: true,
@@ -1956,6 +2077,13 @@ var OperationsHistoryModalComponent = class OperationsHistoryModalComponent exte
1956
2077
  isSignal: true,
1957
2078
  isRequired: false,
1958
2079
  transformFunction: null
2080
+ },
2081
+ operation: {
2082
+ classPropertyName: "operation",
2083
+ publicName: "operation",
2084
+ isSignal: true,
2085
+ isRequired: false,
2086
+ transformFunction: null
1959
2087
  }
1960
2088
  },
1961
2089
  viewQueries: [{
@@ -1967,8 +2095,8 @@ var OperationsHistoryModalComponent = class OperationsHistoryModalComponent exte
1967
2095
  }],
1968
2096
  usesInheritance: true,
1969
2097
  ngImport: i0,
1970
- template: "<lib-modal size=\"6xl\" [title]=\"'OperationsHistory-Modal-Title' | translate\">\n <div body>\n <pre>{{ oldValues() | json }}</pre>\n <pre>{{ newValues() | json }}</pre>\n </div>\n</lib-modal>\n",
1971
- styles: ["div[body]{display:flex;flex-direction:row}div[body] pre{width:50%;flex-grow:1;overflow-x:auto;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
2098
+ template: "<lib-modal size=\"6xl\" [title]=\"'OperationsHistory-Modal-Title' | translate\">\n <div body class=\"changes\">\n @if (currentOperation(); as operation) {\n <div class=\"summary\">\n @if (operationLabel()) {\n <span\n class=\"operation\"\n [class.added]=\"isAdded()\"\n [class.deleted]=\"isDeleted()\"\n [class.modified]=\"operation.operationType === 'Modified'\"\n >\n {{ operationLabel() | translate }}\n </span>\n }\n\n <span class=\"entity\">\n {{ operation.entityName }}\n @if (operation.entityID) {\n <span class=\"record\">#{{ operation.entityID }}</span>\n }\n </span>\n\n <label class=\"show-all\" [class.disabled]=\"!hasFullRecord()\">\n <input\n type=\"checkbox\"\n [checked]=\"showAllFields()\"\n [disabled]=\"!hasFullRecord()\"\n (change)=\"onShowAllFieldsChanged($event)\"\n />\n {{ 'OperationsHistory-Modal-ShowAllFields' | translate }}\n </label>\n </div>\n\n @if (dataRows().length === 0 && systemRows().length === 0) {\n <p class=\"empty\">{{ 'OperationsHistory-Modal-NoChanges' | translate }}</p>\n } @else {\n <div class=\"table-scroller\">\n <table class=\"fields\">\n <thead>\n <tr>\n <th scope=\"col\">{{ 'OperationsHistory-Modal-Field' | translate }}</th>\n @if (!isAdded()) {\n <th scope=\"col\">{{ 'OperationsHistory-Modal-Before' | translate }}</th>\n }\n @if (!isDeleted()) {\n <th scope=\"col\">{{ 'OperationsHistory-Modal-After' | translate }}</th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of dataRows(); track row.name) {\n <ng-container *ngTemplateOutlet=\"fieldRow; context: { $implicit: row }\"></ng-container>\n }\n </tbody>\n\n @if (systemRows().length > 0) {\n <tbody class=\"system\">\n <tr>\n <th scope=\"rowgroup\" [attr.colspan]=\"isAdded() || isDeleted() ? 2 : 3\">\n <button\n type=\"button\"\n class=\"system-toggle\"\n [attr.aria-expanded]=\"showSystemFields()\"\n (click)=\"onSystemFieldsToggled()\"\n >\n <i\n class=\"fa-solid\"\n aria-hidden=\"true\"\n [class.fa-chevron-down]=\"showSystemFields()\"\n [class.fa-chevron-right]=\"!showSystemFields()\"\n ></i>\n {{ 'OperationsHistory-Modal-SystemFields' | translate }} ({{ systemRows().length }})\n </button>\n </th>\n </tr>\n\n @if (showSystemFields()) {\n @for (row of systemRows(); track row.name) {\n <ng-container *ngTemplateOutlet=\"fieldRow; context: { $implicit: row }\"></ng-container>\n }\n }\n </tbody>\n }\n </table>\n </div>\n }\n }\n </div>\n</lib-modal>\n\n<ng-template #fieldRow let-row>\n <tr [class.changed]=\"row.isChanged && !isAdded() && !isDeleted()\">\n <th scope=\"row\">\n {{ row.label | translate }}\n @if (row.isChanged && !isAdded() && !isDeleted()) {\n <span class=\"visually-hidden\">({{ 'OperationsHistory-Modal-Changed' | translate }})</span>\n }\n </th>\n\n @if (!isAdded()) {\n <td class=\"before\">\n @if (row.isChanged && !isDeleted()) {\n <del>\n <span class=\"marker\" aria-hidden=\"true\">−</span>\n {{ row.oldValue.isKey ? (row.oldValue.text | translate) : row.oldValue.text }}\n </del>\n } @else {\n {{ row.oldValue.isKey ? (row.oldValue.text | translate) : row.oldValue.text }}\n }\n </td>\n }\n\n @if (!isDeleted()) {\n <td class=\"after\">\n @if (row.isChanged && !isAdded()) {\n <ins>\n <span class=\"marker\" aria-hidden=\"true\">+</span>\n {{ row.newValue.isKey ? (row.newValue.text | translate) : row.newValue.text }}\n </ins>\n } @else {\n {{ row.newValue.isKey ? (row.newValue.text | translate) : row.newValue.text }}\n }\n </td>\n }\n </tr>\n</ng-template>\n",
2099
+ styles: ["@layer properties;.changes{display:flex;min-width:0px;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3);container-type:inline-size}.summary{display:flex;flex-wrap:wrap;align-items:center;column-gap:calc(var(--spacing, .25rem) * 3);row-gap:calc(var(--spacing, .25rem) * 2)}.summary .operation{border-radius:.25rem;padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * .5);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-tracking: var(--tracking-wide, .025em);letter-spacing:var(--tracking-wide, .025em);text-transform:uppercase;background-color:var(--color-info-surface);color:var(--color-info)}.summary .operation.added{background-color:var(--color-success-surface);color:var(--color-success)}.summary .operation.deleted{background-color:var(--color-danger-surface);color:var(--color-danger)}.summary .entity{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:var(--color-content-primary)}.summary .entity .record{--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);color:var(--color-content-secondary)}.summary .show-all{margin-inline-start:auto;display:inline-flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:var(--color-content-secondary)}.summary .show-all.disabled{cursor:not-allowed;opacity:60%}.summary .show-all input{accent-color:var(--color-accent)}.empty{padding-block:calc(var(--spacing, .25rem) * 6);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:var(--color-content-secondary)}.table-scroller{max-width:100%;overflow-x:auto}.fields{width:100%;border-collapse:collapse;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}.fields th,.fields td{padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);text-align:start;vertical-align:top;border-bottom:1px solid var(--color-line);overflow-wrap:anywhere}.fields thead th{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-tracking: var(--tracking-wide, .025em);letter-spacing:var(--tracking-wide, .025em);text-transform:uppercase;color:var(--color-content-secondary);border-bottom-color:var(--color-line-strong)}.fields tbody th[scope=row]{width:25%;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:var(--color-content-primary)}.fields tbody td{color:var(--color-content-secondary)}.fields tr.changed td{color:var(--color-content-primary)}.fields del,.fields ins{display:inline-flex;gap:calc(var(--spacing, .25rem) * 1.5);border-radius:.25rem;padding-inline:calc(var(--spacing, .25rem) * 1.5);padding-block:calc(var(--spacing, .25rem) * .5);text-decoration-line:none}.fields del{background-color:var(--color-danger-surface);color:var(--color-danger);text-decoration:line-through}.fields ins{background-color:var(--color-success-surface);color:var(--color-success)}.fields .marker{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);text-decoration:none}.fields .system th[scope=rowgroup]{padding-top:calc(var(--spacing, .25rem) * 4)}.fields .system-toggle{display:inline-flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-tracking: var(--tracking-wide, .025em);letter-spacing:var(--tracking-wide, .025em);text-transform:uppercase;color:var(--color-content-secondary)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}@container (max-width: 36rem){.fields thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.fields tr{display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}.fields tbody th[scope=row]{width:auto;padding-bottom:0;border-bottom:none}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-tracking{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-tracking: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
1972
2100
  dependencies: [
1973
2101
  {
1974
2102
  kind: "component",
@@ -1989,9 +2117,14 @@ var OperationsHistoryModalComponent = class OperationsHistoryModalComponent exte
1989
2117
  ]
1990
2118
  },
1991
2119
  {
1992
- kind: "pipe",
1993
- type: JsonPipe,
1994
- name: "json"
2120
+ kind: "directive",
2121
+ type: NgTemplateOutlet,
2122
+ selector: "[ngTemplateOutlet]",
2123
+ inputs: [
2124
+ "ngTemplateOutletContext",
2125
+ "ngTemplateOutlet",
2126
+ "ngTemplateOutletInjector"
2127
+ ]
1995
2128
  },
1996
2129
  {
1997
2130
  kind: "pipe",
@@ -2011,12 +2144,12 @@ i0.ɵɵngDeclareClassMetadata({
2011
2144
  args: [{
2012
2145
  selector: "shared-operations-history-modal",
2013
2146
  imports: [
2014
- JsonPipe,
2015
2147
  ModalComponent,
2148
+ NgTemplateOutlet,
2016
2149
  TranslatePipe
2017
2150
  ],
2018
- template: "<lib-modal size=\"6xl\" [title]=\"'OperationsHistory-Modal-Title' | translate\">\n <div body>\n <pre>{{ oldValues() | json }}</pre>\n <pre>{{ newValues() | json }}</pre>\n </div>\n</lib-modal>\n",
2019
- styles: ["div[body]{display:flex;flex-direction:row}div[body] pre{width:50%;flex-grow:1;overflow-x:auto;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
2151
+ template: "<lib-modal size=\"6xl\" [title]=\"'OperationsHistory-Modal-Title' | translate\">\n <div body class=\"changes\">\n @if (currentOperation(); as operation) {\n <div class=\"summary\">\n @if (operationLabel()) {\n <span\n class=\"operation\"\n [class.added]=\"isAdded()\"\n [class.deleted]=\"isDeleted()\"\n [class.modified]=\"operation.operationType === 'Modified'\"\n >\n {{ operationLabel() | translate }}\n </span>\n }\n\n <span class=\"entity\">\n {{ operation.entityName }}\n @if (operation.entityID) {\n <span class=\"record\">#{{ operation.entityID }}</span>\n }\n </span>\n\n <label class=\"show-all\" [class.disabled]=\"!hasFullRecord()\">\n <input\n type=\"checkbox\"\n [checked]=\"showAllFields()\"\n [disabled]=\"!hasFullRecord()\"\n (change)=\"onShowAllFieldsChanged($event)\"\n />\n {{ 'OperationsHistory-Modal-ShowAllFields' | translate }}\n </label>\n </div>\n\n @if (dataRows().length === 0 && systemRows().length === 0) {\n <p class=\"empty\">{{ 'OperationsHistory-Modal-NoChanges' | translate }}</p>\n } @else {\n <div class=\"table-scroller\">\n <table class=\"fields\">\n <thead>\n <tr>\n <th scope=\"col\">{{ 'OperationsHistory-Modal-Field' | translate }}</th>\n @if (!isAdded()) {\n <th scope=\"col\">{{ 'OperationsHistory-Modal-Before' | translate }}</th>\n }\n @if (!isDeleted()) {\n <th scope=\"col\">{{ 'OperationsHistory-Modal-After' | translate }}</th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of dataRows(); track row.name) {\n <ng-container *ngTemplateOutlet=\"fieldRow; context: { $implicit: row }\"></ng-container>\n }\n </tbody>\n\n @if (systemRows().length > 0) {\n <tbody class=\"system\">\n <tr>\n <th scope=\"rowgroup\" [attr.colspan]=\"isAdded() || isDeleted() ? 2 : 3\">\n <button\n type=\"button\"\n class=\"system-toggle\"\n [attr.aria-expanded]=\"showSystemFields()\"\n (click)=\"onSystemFieldsToggled()\"\n >\n <i\n class=\"fa-solid\"\n aria-hidden=\"true\"\n [class.fa-chevron-down]=\"showSystemFields()\"\n [class.fa-chevron-right]=\"!showSystemFields()\"\n ></i>\n {{ 'OperationsHistory-Modal-SystemFields' | translate }} ({{ systemRows().length }})\n </button>\n </th>\n </tr>\n\n @if (showSystemFields()) {\n @for (row of systemRows(); track row.name) {\n <ng-container *ngTemplateOutlet=\"fieldRow; context: { $implicit: row }\"></ng-container>\n }\n }\n </tbody>\n }\n </table>\n </div>\n }\n }\n </div>\n</lib-modal>\n\n<ng-template #fieldRow let-row>\n <tr [class.changed]=\"row.isChanged && !isAdded() && !isDeleted()\">\n <th scope=\"row\">\n {{ row.label | translate }}\n @if (row.isChanged && !isAdded() && !isDeleted()) {\n <span class=\"visually-hidden\">({{ 'OperationsHistory-Modal-Changed' | translate }})</span>\n }\n </th>\n\n @if (!isAdded()) {\n <td class=\"before\">\n @if (row.isChanged && !isDeleted()) {\n <del>\n <span class=\"marker\" aria-hidden=\"true\">−</span>\n {{ row.oldValue.isKey ? (row.oldValue.text | translate) : row.oldValue.text }}\n </del>\n } @else {\n {{ row.oldValue.isKey ? (row.oldValue.text | translate) : row.oldValue.text }}\n }\n </td>\n }\n\n @if (!isDeleted()) {\n <td class=\"after\">\n @if (row.isChanged && !isAdded()) {\n <ins>\n <span class=\"marker\" aria-hidden=\"true\">+</span>\n {{ row.newValue.isKey ? (row.newValue.text | translate) : row.newValue.text }}\n </ins>\n } @else {\n {{ row.newValue.isKey ? (row.newValue.text | translate) : row.newValue.text }}\n }\n </td>\n }\n </tr>\n</ng-template>\n",
2152
+ styles: ["@layer properties;.changes{display:flex;min-width:0px;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3);container-type:inline-size}.summary{display:flex;flex-wrap:wrap;align-items:center;column-gap:calc(var(--spacing, .25rem) * 3);row-gap:calc(var(--spacing, .25rem) * 2)}.summary .operation{border-radius:.25rem;padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * .5);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-tracking: var(--tracking-wide, .025em);letter-spacing:var(--tracking-wide, .025em);text-transform:uppercase;background-color:var(--color-info-surface);color:var(--color-info)}.summary .operation.added{background-color:var(--color-success-surface);color:var(--color-success)}.summary .operation.deleted{background-color:var(--color-danger-surface);color:var(--color-danger)}.summary .entity{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:var(--color-content-primary)}.summary .entity .record{--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);color:var(--color-content-secondary)}.summary .show-all{margin-inline-start:auto;display:inline-flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:var(--color-content-secondary)}.summary .show-all.disabled{cursor:not-allowed;opacity:60%}.summary .show-all input{accent-color:var(--color-accent)}.empty{padding-block:calc(var(--spacing, .25rem) * 6);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:var(--color-content-secondary)}.table-scroller{max-width:100%;overflow-x:auto}.fields{width:100%;border-collapse:collapse;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}.fields th,.fields td{padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);text-align:start;vertical-align:top;border-bottom:1px solid var(--color-line);overflow-wrap:anywhere}.fields thead th{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-tracking: var(--tracking-wide, .025em);letter-spacing:var(--tracking-wide, .025em);text-transform:uppercase;color:var(--color-content-secondary);border-bottom-color:var(--color-line-strong)}.fields tbody th[scope=row]{width:25%;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:var(--color-content-primary)}.fields tbody td{color:var(--color-content-secondary)}.fields tr.changed td{color:var(--color-content-primary)}.fields del,.fields ins{display:inline-flex;gap:calc(var(--spacing, .25rem) * 1.5);border-radius:.25rem;padding-inline:calc(var(--spacing, .25rem) * 1.5);padding-block:calc(var(--spacing, .25rem) * .5);text-decoration-line:none}.fields del{background-color:var(--color-danger-surface);color:var(--color-danger);text-decoration:line-through}.fields ins{background-color:var(--color-success-surface);color:var(--color-success)}.fields .marker{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);text-decoration:none}.fields .system th[scope=rowgroup]{padding-top:calc(var(--spacing, .25rem) * 4)}.fields .system-toggle{display:inline-flex;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-tracking: var(--tracking-wide, .025em);letter-spacing:var(--tracking-wide, .025em);text-transform:uppercase;color:var(--color-content-secondary)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}@container (max-width: 36rem){.fields thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.fields tr{display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}.fields tbody th[scope=row]{width:auto;padding-bottom:0;border-bottom:none}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-tracking{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-tracking: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
2020
2153
  }]
2021
2154
  }],
2022
2155
  propDecorators: {
@@ -2039,6 +2172,14 @@ i0.ɵɵngDeclareClassMetadata({
2039
2172
  alias: "oldValues",
2040
2173
  required: false
2041
2174
  }]
2175
+ }],
2176
+ operation: [{
2177
+ type: i0.Input,
2178
+ args: [{
2179
+ isSignal: true,
2180
+ alias: "operation",
2181
+ required: false
2182
+ }]
2042
2183
  }]
2043
2184
  }
2044
2185
  });
@@ -2056,9 +2197,13 @@ var OperationsHistoryChildListComponent = class OperationsHistoryChildListCompon
2056
2197
  }
2057
2198
  selectedNewValues = signal(null, ...ngDevMode ? [{ debugName: "selectedNewValues" }] : /* istanbul ignore next */ []);
2058
2199
  selectedOldValues = signal(null, ...ngDevMode ? [{ debugName: "selectedOldValues" }] : /* istanbul ignore next */ []);
2200
+ selectedOperation = signal(null, ...ngDevMode ? [{ debugName: "selectedOperation" }] : /* istanbul ignore next */ []);
2059
2201
  ngAfterViewInit() {
2060
2202
  this.dataGridDataset.columns[0].template = this.operationTemplate();
2061
2203
  }
2204
+ changedFieldsOf(operation) {
2205
+ return countChangedFields(operation);
2206
+ }
2062
2207
  openModal() {
2063
2208
  const modal = this.modal();
2064
2209
  if (modal && !modal.isModalShown()) modal.toggle();
@@ -2068,8 +2213,9 @@ var OperationsHistoryChildListComponent = class OperationsHistoryChildListCompon
2068
2213
  if (this.dataGridDataset.hasSelectedRows) {
2069
2214
  const key = this.dataGridDataset.selectedRowKeys[0];
2070
2215
  const data = this.dataGridDataset.getRowData(key);
2071
- this.selectedOldValues.set(JSON.parse(data.oldValues?.trim() ?? ""));
2072
- this.selectedNewValues.set(JSON.parse(data.newValues?.trim() ?? ""));
2216
+ this.selectedOperation.set(data);
2217
+ this.selectedOldValues.set(parseJson(data.oldValues));
2218
+ this.selectedNewValues.set(parseJson(data.newValues));
2073
2219
  }
2074
2220
  }
2075
2221
  static ɵfac = i0.ɵɵngDeclareFactory({
@@ -2081,7 +2227,7 @@ var OperationsHistoryChildListComponent = class OperationsHistoryChildListCompon
2081
2227
  target: i0.ɵɵFactoryTarget.Component
2082
2228
  });
2083
2229
  static ɵcmp = i0.ɵɵngDeclareComponent({
2084
- minVersion: "17.2.0",
2230
+ minVersion: "17.0.0",
2085
2231
  version: "22.2.0",
2086
2232
  type: OperationsHistoryChildListComponent,
2087
2233
  isStandalone: true,
@@ -2110,23 +2256,35 @@ var OperationsHistoryChildListComponent = class OperationsHistoryChildListCompon
2110
2256
  }],
2111
2257
  usesInheritance: true,
2112
2258
  ngImport: i0,
2113
- template: "<lib-data-grid [lazyLoadRows]=\"true\"> </lib-data-grid>\n\n<ng-template #operationTemplate let-rowData=\"rowData\">\n <div\n class=\"operation-content\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"openModal()\"\n (keydown.enter)=\"openModal()\"\n (keydown.space)=\"openModal(); $event.preventDefault()\"\n >\n <span\n class=\"operation\"\n [class.added]=\"rowData.operationType === 'Added'\"\n [class.deleted]=\"rowData.operationType === 'Deleted'\"\n [class.modified]=\"rowData.operationType === 'Modified'\"\n [class.unchanged]=\"rowData.operationType === 'Unchanged'\"\n >\n {{ rowData.operationType }}\n </span>\n {{ rowData.entityName }}\n </div>\n</ng-template>\n\n<shared-operations-history-modal [newValues]=\"selectedNewValues()\" [oldValues]=\"selectedOldValues()\">\n</shared-operations-history-modal>\n",
2114
- styles: ["@layer properties;:host{width:100%;max-width:100%;min-width:100%}lib-data-grid{height:100%}lib-data-grid ::ng-deep .body lib-data-grid-row{padding:0!important}.operation-content{padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.operation-content .operation{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.operation-content .operation.added{color:var(--color-success)}.operation-content .operation.deleted{color:var(--color-danger)}.operation-content .operation.modified{color:var(--color-info)}.operation-content .operation.unchanged{color:var(--color-content-secondary)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
2115
- dependencies: [{
2116
- kind: "component",
2117
- type: DataGridComponent,
2118
- selector: "lib-data-grid",
2119
- inputs: [
2120
- "disabled",
2121
- "lazyLoadRows",
2122
- "showButtons"
2123
- ]
2124
- }, {
2125
- kind: "component",
2126
- type: OperationsHistoryModalComponent,
2127
- selector: "shared-operations-history-modal",
2128
- inputs: ["newValues", "oldValues"]
2129
- }]
2259
+ template: "<lib-data-grid [lazyLoadRows]=\"true\"> </lib-data-grid>\n\n<ng-template #operationTemplate let-rowData=\"rowData\">\n <div\n class=\"operation-content\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"openModal()\"\n (keydown.enter)=\"openModal()\"\n (keydown.space)=\"openModal(); $event.preventDefault()\"\n >\n <span\n class=\"operation\"\n [class.added]=\"rowData.operationType === 'Added'\"\n [class.deleted]=\"rowData.operationType === 'Deleted'\"\n [class.modified]=\"rowData.operationType === 'Modified'\"\n [class.unchanged]=\"rowData.operationType === 'Unchanged'\"\n >\n {{ 'OperationsHistory-Operation-' + rowData.operationType | translate }}\n </span>\n {{ rowData.entityName }}\n @if (rowData.operationType === 'Modified') {\n <span class=\"changed-count\">\n {{ 'OperationsHistory-List-ChangedFields' | translate: { count: changedFieldsOf(rowData) } }}\n </span>\n }\n </div>\n</ng-template>\n\n<shared-operations-history-modal [operation]=\"selectedOperation()\"> </shared-operations-history-modal>\n",
2260
+ styles: ["@layer properties;:host{width:100%;max-width:100%;min-width:100%}lib-data-grid{height:100%}lib-data-grid ::ng-deep .body lib-data-grid-row{padding:0!important}.operation-content{padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.operation-content .operation{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.operation-content .operation.added{color:var(--color-success)}.operation-content .operation.deleted{color:var(--color-danger)}.operation-content .operation.modified{color:var(--color-info)}.operation-content .operation.unchanged{color:var(--color-content-secondary)}.operation-content .changed-count{margin-inline-start:var(--spacing, .25rem);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:var(--color-content-secondary)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
2261
+ dependencies: [
2262
+ {
2263
+ kind: "component",
2264
+ type: DataGridComponent,
2265
+ selector: "lib-data-grid",
2266
+ inputs: [
2267
+ "disabled",
2268
+ "lazyLoadRows",
2269
+ "showButtons"
2270
+ ]
2271
+ },
2272
+ {
2273
+ kind: "component",
2274
+ type: OperationsHistoryModalComponent,
2275
+ selector: "shared-operations-history-modal",
2276
+ inputs: [
2277
+ "newValues",
2278
+ "oldValues",
2279
+ "operation"
2280
+ ]
2281
+ },
2282
+ {
2283
+ kind: "pipe",
2284
+ type: TranslatePipe,
2285
+ name: "translate"
2286
+ }
2287
+ ]
2130
2288
  });
2131
2289
  };
2132
2290
  i0.ɵɵngDeclareClassMetadata({
@@ -2138,13 +2296,17 @@ i0.ɵɵngDeclareClassMetadata({
2138
2296
  type: Component,
2139
2297
  args: [{
2140
2298
  selector: "shared-operations-history-child-list",
2141
- imports: [DataGridComponent, OperationsHistoryModalComponent],
2299
+ imports: [
2300
+ DataGridComponent,
2301
+ OperationsHistoryModalComponent,
2302
+ TranslatePipe
2303
+ ],
2142
2304
  providers: [{
2143
2305
  provide: DataGridDataset,
2144
2306
  useClass: OperationsHistoryDataset
2145
2307
  }],
2146
- template: "<lib-data-grid [lazyLoadRows]=\"true\"> </lib-data-grid>\n\n<ng-template #operationTemplate let-rowData=\"rowData\">\n <div\n class=\"operation-content\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"openModal()\"\n (keydown.enter)=\"openModal()\"\n (keydown.space)=\"openModal(); $event.preventDefault()\"\n >\n <span\n class=\"operation\"\n [class.added]=\"rowData.operationType === 'Added'\"\n [class.deleted]=\"rowData.operationType === 'Deleted'\"\n [class.modified]=\"rowData.operationType === 'Modified'\"\n [class.unchanged]=\"rowData.operationType === 'Unchanged'\"\n >\n {{ rowData.operationType }}\n </span>\n {{ rowData.entityName }}\n </div>\n</ng-template>\n\n<shared-operations-history-modal [newValues]=\"selectedNewValues()\" [oldValues]=\"selectedOldValues()\">\n</shared-operations-history-modal>\n",
2147
- styles: ["@layer properties;:host{width:100%;max-width:100%;min-width:100%}lib-data-grid{height:100%}lib-data-grid ::ng-deep .body lib-data-grid-row{padding:0!important}.operation-content{padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.operation-content .operation{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.operation-content .operation.added{color:var(--color-success)}.operation-content .operation.deleted{color:var(--color-danger)}.operation-content .operation.modified{color:var(--color-info)}.operation-content .operation.unchanged{color:var(--color-content-secondary)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
2308
+ template: "<lib-data-grid [lazyLoadRows]=\"true\"> </lib-data-grid>\n\n<ng-template #operationTemplate let-rowData=\"rowData\">\n <div\n class=\"operation-content\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"openModal()\"\n (keydown.enter)=\"openModal()\"\n (keydown.space)=\"openModal(); $event.preventDefault()\"\n >\n <span\n class=\"operation\"\n [class.added]=\"rowData.operationType === 'Added'\"\n [class.deleted]=\"rowData.operationType === 'Deleted'\"\n [class.modified]=\"rowData.operationType === 'Modified'\"\n [class.unchanged]=\"rowData.operationType === 'Unchanged'\"\n >\n {{ 'OperationsHistory-Operation-' + rowData.operationType | translate }}\n </span>\n {{ rowData.entityName }}\n @if (rowData.operationType === 'Modified') {\n <span class=\"changed-count\">\n {{ 'OperationsHistory-List-ChangedFields' | translate: { count: changedFieldsOf(rowData) } }}\n </span>\n }\n </div>\n</ng-template>\n\n<shared-operations-history-modal [operation]=\"selectedOperation()\"> </shared-operations-history-modal>\n",
2309
+ styles: ["@layer properties;:host{width:100%;max-width:100%;min-width:100%}lib-data-grid{height:100%}lib-data-grid ::ng-deep .body lib-data-grid-row{padding:0!important}.operation-content{padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.operation-content .operation{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.operation-content .operation.added{color:var(--color-success)}.operation-content .operation.deleted{color:var(--color-danger)}.operation-content .operation.modified{color:var(--color-info)}.operation-content .operation.unchanged{color:var(--color-content-secondary)}.operation-content .changed-count{margin-inline-start:var(--spacing, .25rem);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:var(--color-content-secondary)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
2148
2310
  }]
2149
2311
  }],
2150
2312
  propDecorators: {
@@ -2161,6 +2323,14 @@ i0.ɵɵngDeclareClassMetadata({
2161
2323
  serviceID: [{ type: Input }]
2162
2324
  }
2163
2325
  });
2326
+ function parseJson(json) {
2327
+ if (!json?.trim()) return null;
2328
+ try {
2329
+ return JSON.parse(json);
2330
+ } catch {
2331
+ return null;
2332
+ }
2333
+ }
2164
2334
  var BypassHtmlSanitizerPipe = class BypassHtmlSanitizerPipe {
2165
2335
  sanitizer = inject(DomSanitizer);
2166
2336
  transform(html) {
@@ -2767,6 +2937,6 @@ function provideZambonSharedTranslateService(config = {}) {
2767
2937
  loader: provideZambonSharedTranslateLoader(config.appResources)
2768
2938
  });
2769
2939
  }
2770
- export { AuthGuard, AuthInterceptor, AuthenticationService, BrandComponent, BypassHtmlSanitizerPipe, EXTERNAL_CONTENT_CONFIGS, EXTERNAL_CONTENT_ROUTE_PATH, EnumLabelPipe, EnvironmentBadgeComponent, ExternalContentComponent, ExternalContentConfigs, ExternalContentService, ExternalUrlResolverService, FiltersBase, LoginLayoutComponent, MainLayoutComponent, NotificationsComponent, NotificationsService, OperationsHistoryChildListComponent, OperationsHistoryDataset, OperationsHistoryModalComponent, OperationsHistoryService, ServicesHistoryChildListComponent, ServicesHistoryDataset, ServicesHistoryFilterComponent, ServicesHistoryService, ServicesHistoryViewComponent, SharedAuthModule, THEME_STORAGE_KEY, ThemeService, ThemeSwitchComponent, TopBarComponent, UserProfileComponent, UtcDatePipe, ZAMBON_SHARED_I18N_ASSET, ZAMBON_SHARED_I18N_ASSET_PATH, ZAMBON_SHARED_I18N_RESOURCES, createZambonSharedTranslateLoader, externalContentRoutes, provideZambonSharedTranslateLoader, provideZambonSharedTranslateService };
2940
+ export { AuthGuard, AuthInterceptor, AuthenticationService, BrandComponent, BypassHtmlSanitizerPipe, EXTERNAL_CONTENT_CONFIGS, EXTERNAL_CONTENT_ROUTE_PATH, EnumLabelPipe, EnvironmentBadgeComponent, ExternalContentComponent, ExternalContentConfigs, ExternalContentService, ExternalUrlResolverService, FiltersBase, LoginLayoutComponent, MainLayoutComponent, NotificationsComponent, NotificationsService, OPERATIONS_HISTORY_FIELD_LABEL, OperationsHistoryChildListComponent, OperationsHistoryDataset, OperationsHistoryModalComponent, OperationsHistoryService, ServicesHistoryChildListComponent, ServicesHistoryDataset, ServicesHistoryFilterComponent, ServicesHistoryService, ServicesHistoryViewComponent, SharedAuthModule, THEME_STORAGE_KEY, ThemeService, ThemeSwitchComponent, TopBarComponent, UserProfileComponent, UtcDatePipe, ZAMBON_SHARED_I18N_ASSET, ZAMBON_SHARED_I18N_ASSET_PATH, ZAMBON_SHARED_I18N_RESOURCES, createZambonSharedTranslateLoader, externalContentRoutes, humanizeFieldName, provideZambonSharedTranslateLoader, provideZambonSharedTranslateService };
2771
2941
 
2772
2942
  //# sourceMappingURL=zambon-dev-ui-shared.mjs.map