@signiphi/page-assembly 0.2.0-beta.11 → 0.2.0-beta.12
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/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles/index.css +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1441,11 +1441,17 @@ function getBaseFieldName(encodedName) {
|
|
|
1441
1441
|
}
|
|
1442
1442
|
return baseName;
|
|
1443
1443
|
}
|
|
1444
|
+
function stripFieldTypeSuffix(value) {
|
|
1445
|
+
const stripped = value.replace(/_(signature|initials|date)$/i, "");
|
|
1446
|
+
return stripped || value;
|
|
1447
|
+
}
|
|
1444
1448
|
function getSignerFromFieldName(encodedName) {
|
|
1445
1449
|
if (encodedName.includes("__SIGNER__")) {
|
|
1446
1450
|
const parts = encodedName.split("__SIGNER__");
|
|
1447
1451
|
if (parts[1]) {
|
|
1448
|
-
|
|
1452
|
+
const segment = parts[1].split("__")[0] || parts[1];
|
|
1453
|
+
const isTerminal = segment === parts[1];
|
|
1454
|
+
return isTerminal ? stripFieldTypeSuffix(segment) : segment;
|
|
1449
1455
|
}
|
|
1450
1456
|
}
|
|
1451
1457
|
return void 0;
|