From a60d79fa81d53b0a6f9d7a029be8ba45a3d12889 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Sun, 27 Oct 2024 13:42:16 +0700 Subject: [PATCH 1/2] feat: add TE render template 0.5.0 --- packages/mock-app/src/templates/v0.5.0/te.hbs | 2930 +++++++++++++++++ 1 file changed, 2930 insertions(+) create mode 100644 packages/mock-app/src/templates/v0.5.0/te.hbs diff --git a/packages/mock-app/src/templates/v0.5.0/te.hbs b/packages/mock-app/src/templates/v0.5.0/te.hbs new file mode 100644 index 00000000..3a3c8420 --- /dev/null +++ b/packages/mock-app/src/templates/v0.5.0/te.hbs @@ -0,0 +1,2930 @@ + + + + + + + + + + + + +
+
+
+
DIGITAL TRACEABILITY EVENT
+
+ +
+ {{#each credentialSubject}} +
+
+
{{processType}}
+
{{bizStep}} {{eventTime}}
+
+
+
+
Transformation
+
+ +
+ +
+
Output
+
+ {{#each outputEPCList}} +
+
{{name}}
+ +
View
+
+
+ {{/each}} + {{#each outputQuantityList}} +
+
{{quantity}}{{uom}} {{productName}}
+ +
View
+
+
+ {{/each}} +
+
+ +
+
+ + + +
+

Transformed

+
+ +
+
Input
+
+ {{#each inputEPCList}} +
+
{{name}}
+ +
View
+
+
+ {{/each}} + {{#each inputQuantityList}} +
+
{{quantity}}{{uom}} {{productName}}
+ +
View
+
+
+ {{/each}} +
+
+ +
+
+ +
+
+
Event sensor information
+
+ + {{#each sensorElementList}} +
+
+
{{sensorMetadata.device.name}}
+ +
+ {{#each sensorReport}} +
+
+
Captured at
+
+
{{time}}
+
+
+
+
Sensor type
+ +
+
+
Reading
+
+
{{value}}{{uom}}
+
+
+
+ {{/each}} + +
+ + + +
+
Integrity proof
+
+
+ + + +
+
+ {{/each}} +
+ +
+
+ {{!-- TODO: to be confirmed, since the SensorElementList.sensorIntegrityProof duplicate --}} + {{!-- being assumed --}} + Event location information +
+
+
+ +
+
+
{{processType}}
+
{{bizStep}} {{eventTime}}
+
+
+
+
Transaction
+
+ +
+
+
+
+
Source
+ {{!-- TODO: to be confirmed, since the navigation link wasn't provided --}} + {{!-- being assumed --}} + +
View
+
+
+
+
Destination
+ {{!-- TODO: to be confirmed, since the navigation link wasn't provided --}} + {{!-- being assumed --}} + +
View
+
+
+
+
+
+ +
+
Object list
+
+ {{#each epcList}} +
+
{{name}}
+ +
View
+
+
+ {{/each}} + {{#each quantityList}} +
+
{{quantity}}{{uom}} {{productName}}
+ +
View
+
+
+ {{/each}} +
+
+
+ +
+
+
Event sensor information
+
+ + {{#each sensorElementList}} +
+
+
{{sensorMetadata.device.name}}
+ +
+ {{#each sensorReport}} +
+
+
Captured at
+
+
{{time}}
+
+
+
+
Sensor type
+ +
+
+
Reading
+
+
{{value}}{{uom}}
+
+
+
+ {{/each}} + +
+ + + +
+
Integrity proof
+
+
+ + + +
+
+ {{/each}} +
+ +
+
+ {{!-- TODO: to be confirmed, since the SensorElementList.sensorIntegrityProof duplicate --}} + {{!-- being assumed --}} + Event location information +
+
+
+ +
+
+
{{processType}}
+
{{bizStep}} {{eventTime}}
+
+ +
+
+
Object event
+
+ +
+
Object list
+
+ {{#each epcList}} +
+
{{name}}
+ +
View
+
+
+ {{/each}} + {{#each quantityList}} +
+
{{quantity}}{{uom}} {{productName}}
+ +
View
+
+
+ {{/each}} +
+
+ +
+ +
+
+
Event sensor information
+
+ + {{#each sensorElementList}} +
+
+
{{sensorMetadata.device.name}}
+ +
+ {{#each sensorReport}} +
+
+
Captured at
+
+
{{time}}
+
+
+
+
Sensor type
+ +
+
+
Reading
+
+
{{value}}{{uom}}
+
+
+
+ {{/each}} + +
+ + + +
+
Integrity proof
+
+
+ + + +
+
+ {{/each}} +
+ +
+
+ {{!-- TODO: to be confirmed, since the SensorElementList.sensorIntegrityProof duplicate --}} + {{!-- being assumed --}} + Event location information +
+
+
+ +
+
+
{{processType}}
+
{{bizStep}} {{eventTime}}
+
+ +
+
+
Aggregation
+
+
+ +
+
+
+
{{parentEPC.name}}
+ +
View
+
+
+
+
+ +
+
+ + + +
+

Aggregated

+
+ +
+
Child list
+
+ {{#each childEPCList}} +
+
{{name}}
+ +
View
+
+
+ {{/each}} + {{#each childQuantityList}} +
+
{{quantity}}{{uom}} {{productName}}
+ +
View
+
+
+ {{/each}} +
+
+ +
+
+ +
+
+
Event sensor information
+
+ + {{#each sensorElementList}} +
+
+
{{sensorMetadata.device.name}}
+ +
+ {{#each sensorReport}} +
+
+
Captured at
+
+
{{time}}
+
+
+
+
Sensor type
+ +
+
+
Reading
+
+
{{value}}{{uom}}
+
+
+
+ {{/each}} + +
+ + + +
+
Integrity proof
+
+
+ + + +
+
+ {{/each}} +
+ +
+
+ {{!-- TODO: to be confirmed, since the SensorElementList.sensorIntegrityProof duplicate --}} + {{!-- being assumed --}} + Event location information +
+
+
+ +
+
+
{{processType}}
+
{{bizStep}} {{eventTime}}
+
+ +
+
+
Association
+
+
+ +
+
+
+
{{parentEPC.name}}
+ +
View
+
+
+
+
+ +
+
+ + + +
+

Assembled

+
+ +
+
Child list
+
+ {{#each childEPCList}} +
+
{{name}}
+ +
View
+
+
+ {{/each}} + {{#each childQuantityList}} +
+
{{quantity}}{{uom}} {{productName}}
+ +
View
+
+
+ {{/each}} +
+
+ +
+
+ +
+
+
Event sensor information
+
+ + {{#each sensorElementList}} +
+
+
{{sensorMetadata.device.name}}
+ +
+ {{#each sensorReport}} +
+
+
Captured at
+
+
{{time}}
+
+
+
+
Sensor type
+ +
+
+
Reading
+
+
{{value}}{{uom}}
+
+
+
+ {{/each}} + +
+ + + +
+
Integrity proof
+
+
+ + + +
+
+ {{/each}} +
+ +
+
+ {{!-- TODO: to be confirmed, since the SensorElementList.sensorIntegrityProof duplicate --}} + {{!-- being assumed --}} + Event location information +
+
+ +
+ {{/each}} +
+ +
+ +
+
+
Issuing details
+
+
+
+
Issued by
+ +
+
+
Valid from
+
+
{{validFrom}}
+
+
+
+
+
+ + + \ No newline at end of file From fe385763a470508e87c8c6694c1f4bb903593e81 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Tue, 29 Oct 2024 14:26:52 +0700 Subject: [PATCH 2/2] fix: update style for hyperlinks --- packages/mock-app/src/templates/v0.5.0/te.hbs | 167 ++---------------- 1 file changed, 13 insertions(+), 154 deletions(-) diff --git a/packages/mock-app/src/templates/v0.5.0/te.hbs b/packages/mock-app/src/templates/v0.5.0/te.hbs index 3a3c8420..36cef60b 100644 --- a/packages/mock-app/src/templates/v0.5.0/te.hbs +++ b/packages/mock-app/src/templates/v0.5.0/te.hbs @@ -83,21 +83,6 @@ width: 100%; } - .event-object .data-two-columns { - display: grid; - grid-template-columns: 1fr 2fr; - gap: 16px; - - padding: 10px 0px 12px; - width: 100%; - border-bottom-width: 1px; - border-bottom-style: solid; - } - - .div .data-two-columns:last-child { - border-bottom: none; - } - .event-object .data-two-columns-2 { display: grid; grid-template-columns: 1.4fr 3fr; @@ -175,12 +160,14 @@ .event-object .line-wrapper { flex-wrap: wrap; gap: 10px 10px; - border-color: var(--primary-colorsblue-100); display: inline-flex; align-items: flex-start; padding: 0px 0px 3px; - border-bottom-width: 2px; - border-bottom-style: solid; + + text-decoration: underline; + text-decoration-thickness: 2px; + text-decoration-color: var(--primary-colorsblue-100); + text-underline-offset: 3px; } .event-object .frame-2 { @@ -337,11 +324,13 @@ } .event-object .div-wrapper { - border-color: var(--primary-colorsblue-400); display: inline-flex; align-items: flex-start; - border-bottom-width: 2px; - border-bottom-style: solid; + + text-decoration: underline; + text-decoration-thickness: 2px; + text-decoration-color: var(--primary-colorsblue-400); + text-underline-offset: 3px; } .event-object .text-wrapper-5 { @@ -381,7 +370,7 @@ font-weight: 500; color: var(--primary-colorsgray-700); font-size: 16px; - line-height: 17.4px; + line-height: 22px; } .event-object .data-wrapper { @@ -669,21 +658,6 @@ width: 100%; } - .aggregation .data-two-columns { - display: grid; - grid-template-columns: 1fr 2fr; - gap: 16px; - - padding: 10px 0px 12px; - width: 100%; - border-bottom-width: 1px; - border-bottom-style: solid; - } - - .div .data-two-columns:last-child { - border-bottom: none; - } - .aggregation .data-two-columns-2 { display: grid; grid-template-columns: 1.4fr 3fr; @@ -749,17 +723,6 @@ line-height: 17.4px; } - .aggregation .line-wrapper { - flex-wrap: wrap; - gap: 10px 10px; - border-color: var(--primary-colorsblue-100); - display: inline-flex; - align-items: flex-start; - padding: 0px 0px 3px; - border-bottom-width: 2px; - border-bottom-style: solid; - } - .aggregation .frame-2 { display: flex; flex-direction: column; @@ -827,7 +790,7 @@ font-weight: 400; color: var(--primary-colorsgray-600); font-size: 16px; - line-height: 17.4px; + line-height: 22px; } .aggregation .data-2 { @@ -1009,21 +972,6 @@ width: 100%; } - .transformation .data-two-columns { - display: grid; - grid-template-columns: 1fr 2fr; - gap: 16px; - - padding: 10px 0px 12px; - width: 100%; - border-bottom-width: 1px; - border-bottom-style: solid; - } - - .div .data-two-columns:last-child { - border-bottom: none; - } - .transformation .data-two-columns-2 { display: grid; grid-template-columns: 1.4fr 3fr; @@ -1089,17 +1037,6 @@ line-height: 17.4px; } - .transformation .line-wrapper { - flex-wrap: wrap; - gap: 10px 10px; - border-color: var(--primary-colorsblue-100); - display: inline-flex; - align-items: flex-start; - padding: 0px 0px 3px; - border-bottom-width: 2px; - border-bottom-style: solid; - } - .transformation .frame-2 { display: flex; flex-direction: column; @@ -1349,21 +1286,6 @@ width: 100%; } - .association .data-two-columns { - display: grid; - grid-template-columns: 1fr 2fr; - gap: 16px; - - padding: 10px 0px 12px; - width: 100%; - border-bottom-width: 1px; - border-bottom-style: solid; - } - - .div .data-two-columns:last-child { - border-bottom: none; - } - .association .data-two-columns-2 { display: grid; grid-template-columns: 1.4fr 3fr; @@ -1429,17 +1351,6 @@ line-height: 17.4px; } - .association .line-wrapper { - flex-wrap: wrap; - gap: 10px 10px; - border-color: var(--primary-colorsblue-100); - display: inline-flex; - align-items: flex-start; - padding: 0px 0px 3px; - border-bottom-width: 2px; - border-bottom-style: solid; - } - .association .frame-2 { display: flex; flex-direction: column; @@ -1689,21 +1600,6 @@ width: 100%; } - .transaction .data-two-columns { - display: grid; - grid-template-columns: 1fr 2fr; - gap: 16px; - - padding: 10px 0px 12px; - width: 100%; - border-bottom-width: 1px; - border-bottom-style: solid; - } - - .div .data-two-columns:last-child { - border-bottom: none; - } - .transaction .data-two-columns-2 { display: grid; grid-template-columns: 1.4fr 3fr; @@ -1769,17 +1665,6 @@ line-height: 17.4px; } - .transaction .line-wrapper { - flex-wrap: wrap; - gap: 10px 10px; - border-color: var(--primary-colorsblue-100); - display: inline-flex; - align-items: flex-start; - padding: 0px 0px 3px; - border-bottom-width: 2px; - border-bottom-style: solid; - } - .transaction .frame-2 { display: flex; flex-direction: column; @@ -2021,21 +1906,6 @@ width: 100%; } - .object .data-two-columns { - display: grid; - grid-template-columns: 1fr 2fr; - gap: 16px; - - padding: 10px 0px 12px; - width: 100%; - border-bottom-width: 1px; - border-bottom-style: solid; - } - - .div .data-two-columns:last-child { - border-bottom: none; - } - .object .data-two-columns-2 { display: grid; grid-template-columns: 1.4fr 3fr; @@ -2101,17 +1971,6 @@ line-height: 17.4px; } - .object .line-wrapper { - flex-wrap: wrap; - gap: 10px 10px; - border-color: var(--primary-colorsblue-100); - display: inline-flex; - align-items: flex-start; - padding: 0px 0px 3px; - border-bottom-width: 2px; - border-bottom-style: solid; - } - .object .frame-2 { display: flex; flex-direction: column; @@ -2255,7 +2114,7 @@ /* Media Queries for Mobiles */ @media (min-width: 50px) { .event-object { - min-width: 390px; + min-width: 375px; } }