@timardex/cluemart-shared 1.5.809 → 1.5.810
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/{chunk-MFJDMZFJ.mjs → chunk-KKLZDCVX.mjs} +10 -1
- package/dist/{chunk-MFJDMZFJ.mjs.map → chunk-KKLZDCVX.mjs.map} +1 -1
- package/dist/formFields/index.mjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.cjs +10 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +6 -1
- package/dist/utils/index.d.ts +6 -1
- package/dist/utils/index.mjs +3 -1
- package/package.json +1 -1
package/dist/hooks/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -185,6 +185,7 @@ __export(index_exports, {
|
|
|
185
185
|
foodFlavourOptions: () => foodFlavourOptions,
|
|
186
186
|
formatCategoryLabel: () => formatCategoryLabel,
|
|
187
187
|
formatDate: () => formatDate,
|
|
188
|
+
formatIrdNumber: () => formatIrdNumber,
|
|
188
189
|
formatNZBankAccount: () => formatNZBankAccount,
|
|
189
190
|
formatShareApplicationCategoriesSection: () => formatShareApplicationCategoriesSection,
|
|
190
191
|
formatShareApplicationComplianceSection: () => formatShareApplicationComplianceSection,
|
|
@@ -2853,6 +2854,14 @@ function calculateCheckDigit(baseDigits, weights) {
|
|
|
2853
2854
|
function normalizeIrdNumber(value) {
|
|
2854
2855
|
return value.replace(/\D/g, "");
|
|
2855
2856
|
}
|
|
2857
|
+
function formatIrdNumber(input) {
|
|
2858
|
+
const digitsOnly = normalizeIrdNumber(input).slice(0, 9);
|
|
2859
|
+
const parts = [];
|
|
2860
|
+
if (digitsOnly.length > 0) parts.push(digitsOnly.slice(0, 3));
|
|
2861
|
+
if (digitsOnly.length > 3) parts.push(digitsOnly.slice(3, 6));
|
|
2862
|
+
if (digitsOnly.length > 6) parts.push(digitsOnly.slice(6, 9));
|
|
2863
|
+
return parts.join("-");
|
|
2864
|
+
}
|
|
2856
2865
|
function isValidIrdNumber(value) {
|
|
2857
2866
|
const digits = normalizeIrdNumber(value);
|
|
2858
2867
|
if (!/^\d{8,9}$/.test(digits)) {
|
|
@@ -9325,6 +9334,7 @@ var fonts = {
|
|
|
9325
9334
|
foodFlavourOptions,
|
|
9326
9335
|
formatCategoryLabel,
|
|
9327
9336
|
formatDate,
|
|
9337
|
+
formatIrdNumber,
|
|
9328
9338
|
formatNZBankAccount,
|
|
9329
9339
|
formatShareApplicationCategoriesSection,
|
|
9330
9340
|
formatShareApplicationComplianceSection,
|