@temboplus/frontend-core 1.0.2 → 1.0.3-beta.3
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/LICENSE +21 -0
- package/README.md +143 -17
- package/dist/coverage/coverage.types.d.ts +1 -0
- package/dist/coverage/coverage.types.d.ts.map +1 -0
- package/dist/coverage/index.d.ts +1 -0
- package/dist/coverage/index.d.ts.map +1 -0
- package/dist/coverage/tembo-coverage.d.ts +1 -0
- package/dist/coverage/tembo-coverage.d.ts.map +1 -0
- package/dist/domain/amount/amount.d.ts +5 -4
- package/dist/domain/amount/amount.d.ts.map +1 -0
- package/dist/domain/amount/amount.helpers.d.ts +1 -0
- package/dist/domain/amount/amount.helpers.d.ts.map +1 -0
- package/dist/domain/amount/amount.schema.d.ts +3 -2
- package/dist/domain/amount/amount.schema.d.ts.map +1 -0
- package/dist/domain/amount/index.d.ts +3 -2
- package/dist/domain/amount/index.d.ts.map +1 -0
- package/dist/domain/bank/bank.d.ts +3 -2
- package/dist/domain/bank/bank.d.ts.map +1 -0
- package/dist/domain/bank/bank.helpers.d.ts +2 -1
- package/dist/domain/bank/bank.helpers.d.ts.map +1 -0
- package/dist/domain/bank/bank.schema.d.ts +8 -7
- package/dist/domain/bank/bank.schema.d.ts.map +1 -0
- package/dist/domain/bank/bank.types.d.ts +1 -0
- package/dist/domain/bank/bank.types.d.ts.map +1 -0
- package/dist/domain/bank/index.d.ts +3 -2
- package/dist/domain/bank/index.d.ts.map +1 -0
- package/dist/domain/channel/channel.d.ts +2 -1
- package/dist/domain/channel/channel.d.ts.map +1 -0
- package/dist/domain/channel/channel.enums.d.ts +1 -0
- package/dist/domain/channel/channel.enums.d.ts.map +1 -0
- package/dist/domain/channel/channel.types.d.ts +2 -1
- package/dist/domain/channel/channel.types.d.ts.map +1 -0
- package/dist/domain/channel/index.d.ts +2 -1
- package/dist/domain/channel/index.d.ts.map +1 -0
- package/dist/domain/country/country.d.ts +4 -3
- package/dist/domain/country/country.d.ts.map +1 -0
- package/dist/domain/country/country.enums.d.ts +1 -0
- package/dist/domain/country/country.enums.d.ts.map +1 -0
- package/dist/domain/country/country.helpers.d.ts +1 -0
- package/dist/domain/country/country.helpers.d.ts.map +1 -0
- package/dist/domain/country/country.schema.d.ts +1 -0
- package/dist/domain/country/country.schema.d.ts.map +1 -0
- package/dist/domain/country/country.types.d.ts +1 -0
- package/dist/domain/country/country.types.d.ts.map +1 -0
- package/dist/domain/country/index.d.ts +3 -2
- package/dist/domain/country/index.d.ts.map +1 -0
- package/dist/domain/currency/currency.d.ts +3 -2
- package/dist/domain/currency/currency.d.ts.map +1 -0
- package/dist/domain/currency/currency.helpers.d.ts +1 -0
- package/dist/domain/currency/currency.helpers.d.ts.map +1 -0
- package/dist/domain/currency/currency.schema.d.ts +1 -0
- package/dist/domain/currency/currency.schema.d.ts.map +1 -0
- package/dist/domain/currency/currency.types.d.ts +1 -0
- package/dist/domain/currency/currency.types.d.ts.map +1 -0
- package/dist/domain/currency/index.d.ts +3 -2
- package/dist/domain/currency/index.d.ts.map +1 -0
- package/dist/domain/index.d.ts +2 -1
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/mobile-money-provider/index.d.ts +3 -2
- package/dist/domain/mobile-money-provider/index.d.ts.map +1 -0
- package/dist/domain/mobile-money-provider/mobile-money-provider.d.ts +3 -2
- package/dist/domain/mobile-money-provider/mobile-money-provider.d.ts.map +1 -0
- package/dist/domain/mobile-money-provider/mobile-money-provider.helpers.d.ts +1 -0
- package/dist/domain/mobile-money-provider/mobile-money-provider.helpers.d.ts.map +1 -0
- package/dist/domain/mobile-money-provider/mobile-money-provider.schema.d.ts +3 -2
- package/dist/domain/mobile-money-provider/mobile-money-provider.schema.d.ts.map +1 -0
- package/dist/domain/mobile-money-provider/mobile-money-provider.types.d.ts +2 -1
- package/dist/domain/mobile-money-provider/mobile-money-provider.types.d.ts.map +1 -0
- package/dist/domain/phone-number/index.d.ts +3 -2
- package/dist/domain/phone-number/index.d.ts.map +1 -0
- package/dist/domain/phone-number/phone-number.d.ts +2 -1
- package/dist/domain/phone-number/phone-number.d.ts.map +1 -0
- package/dist/domain/phone-number/phone-number.helpers.d.ts +1 -1
- package/dist/domain/phone-number/phone-number.helpers.d.ts.map +1 -0
- package/dist/domain/phone-number/phone-number.parser.d.ts +3 -2
- package/dist/domain/phone-number/phone-number.parser.d.ts.map +1 -0
- package/dist/domain/phone-number/phone-number.schema.d.ts +1 -0
- package/dist/domain/phone-number/phone-number.schema.d.ts.map +1 -0
- package/dist/domain/phone-number/phone-number.types.d.ts +2 -1
- package/dist/domain/phone-number/phone-number.types.d.ts.map +1 -0
- package/dist/factories/amount.factory.d.ts +1 -0
- package/dist/factories/amount.factory.d.ts.map +1 -0
- package/dist/factories/bank.factory.d.ts +1 -0
- package/dist/factories/bank.factory.d.ts.map +1 -0
- package/dist/factories/country.factory.d.ts +2 -1
- package/dist/factories/country.factory.d.ts.map +1 -0
- package/dist/factories/currency.factory.d.ts +2 -1
- package/dist/factories/currency.factory.d.ts.map +1 -0
- package/dist/factories/index.d.ts +1 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/mobile-money-provider.factory.d.ts +1 -0
- package/dist/factories/mobile-money-provider.factory.d.ts.map +1 -0
- package/dist/factories/phone-number.factory.d.ts +1 -0
- package/dist/factories/phone-number.factory.d.ts.map +1 -0
- package/dist/factories/transaction-limit.factory.d.ts +2 -1
- package/dist/factories/transaction-limit.factory.d.ts.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/registries/bank.registry.d.ts +1 -0
- package/dist/registries/bank.registry.d.ts.map +1 -0
- package/dist/registries/country.registry.d.ts +1 -0
- package/dist/registries/country.registry.d.ts.map +1 -0
- package/dist/registries/currency.registry.d.ts +1 -0
- package/dist/registries/currency.registry.d.ts.map +1 -0
- package/dist/registries/index.d.ts +1 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/mobile-money-provider.registry.d.ts +2 -1
- package/dist/registries/mobile-money-provider.registry.d.ts.map +1 -0
- package/dist/registries/transaction-limit.registry.d.ts +1 -0
- package/dist/registries/transaction-limit.registry.d.ts.map +1 -0
- package/dist/repositories/bank.repository.d.ts +1 -0
- package/dist/repositories/bank.repository.d.ts.map +1 -0
- package/dist/repositories/country.repository.d.ts +1 -0
- package/dist/repositories/country.repository.d.ts.map +1 -0
- package/dist/repositories/currency.repository.d.ts +1 -0
- package/dist/repositories/currency.repository.d.ts.map +1 -0
- package/dist/repositories/index.d.ts +1 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/mobile-money-provider.repository.d.ts +1 -0
- package/dist/repositories/mobile-money-provider.repository.d.ts.map +1 -0
- package/dist/repositories/transaction-limit.repository.d.ts +1 -0
- package/dist/repositories/transaction-limit.repository.d.ts.map +1 -0
- package/dist/utilities/index.d.ts +3 -0
- package/dist/utilities/index.d.ts.map +1 -0
- package/dist/utilities/text/index.d.ts +2 -0
- package/dist/utilities/text/index.d.ts.map +1 -0
- package/dist/{utils → utilities/text}/text.d.ts +2 -47
- package/dist/utilities/text/text.d.ts.map +1 -0
- package/dist/utilities/timezone/boundaries.d.ts +50 -0
- package/dist/utilities/timezone/boundaries.d.ts.map +1 -0
- package/dist/utilities/timezone/format.d.ts +9 -0
- package/dist/utilities/timezone/format.d.ts.map +1 -0
- package/dist/utilities/timezone/index.d.ts +7 -0
- package/dist/utilities/timezone/index.d.ts.map +1 -0
- package/dist/utilities/timezone/markets.d.ts +18 -0
- package/dist/utilities/timezone/markets.d.ts.map +1 -0
- package/dist/utilities/timezone/options.d.ts +37 -0
- package/dist/utilities/timezone/options.d.ts.map +1 -0
- package/dist/utilities/timezone/plain-date.d.ts +58 -0
- package/dist/utilities/timezone/plain-date.d.ts.map +1 -0
- package/dist/utilities/timezone/validate.d.ts +29 -0
- package/dist/utilities/timezone/validate.d.ts.map +1 -0
- package/package.json +26 -14
- package/dist/utils/id.d.ts +0 -16
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/logger.d.ts +0 -2
- package/dist/utils/time.d.ts +0 -26
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bank.registry.d.ts","sourceRoot":"","sources":["../../src/registries/bank.registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AASxE;;;;GAIG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;IAC3D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiD;IAEvE,OAAO;IAEP,MAAM,CAAC,WAAW,IAAI,YAAY;IAOlC,OAAO,CAAC,eAAe;IAuBvB,mDAAmD;IACnD,MAAM,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,EAAE;IAK5C,oEAAoE;IACpE,oBAAoB,IAAI,IAAI,EAAE;IAQ9B;;;OAGG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAUzC,sEAAsE;IACtE,WAAW,CAAC,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,IAAI,EAAE;IASzF,uEAAuE;IACvE,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,IAAI,EAAE;IAW9D;;;;OAIG;IACH,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe,GA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+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registries/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransactionDirection } from "@domain/channel/channel.enums.js";
|
|
1
|
+
import type { TransactionDirection } from "@domain/channel/channel.enums.js";
|
|
2
2
|
import type { ISO2CountryCode } from "@domain/country/country.types.js";
|
|
3
3
|
import type { MobileMoneyProvider } from "@domain/mobile-money-provider/mobile-money-provider.js";
|
|
4
4
|
import type { MobileMoneyProviderId } from "@domain/mobile-money-provider/mobile-money-provider.types.js";
|
|
@@ -47,3 +47,4 @@ export declare class MobileMoneyProviderRegistry {
|
|
|
47
47
|
*/
|
|
48
48
|
private toCompactNumber;
|
|
49
49
|
}
|
|
50
|
+
//# sourceMappingURL=mobile-money-provider.registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-money-provider.registry.d.ts","sourceRoot":"","sources":["../../src/registries/mobile-money-provider.registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAElG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;AAC1G,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAcnE;;;;;GAKG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA8B;IACrD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+C;IAC1E,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4C;IACpE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqD;IAE3E,OAAO;IAEP,MAAM,CAAC,WAAW,IAAI,2BAA2B;IAOjD,OAAO,CAAC,mBAAmB;IAqB3B,sEAAsE;IACtE,YAAY,CAAC,WAAW,EAAE,eAAe,GAAG,mBAAmB,EAAE;IAKjE,gEAAgE;IAChE,uBAAuB,CACrB,WAAW,EAAE,eAAe,EAC5B,SAAS,EAAE,oBAAoB,GAC9B,mBAAmB,EAAE;IAMxB,0DAA0D;IAC1D,YAAY,CACV,WAAW,EAAE,eAAe,EAC5B,UAAU,EAAE,qBAAqB,GAAG,MAAM,GACzC,mBAAmB,GAAG,SAAS;IAIlC,wEAAwE;IACxE,mBAAmB,CACjB,WAAW,EAAE,eAAe,EAC5B,UAAU,EAAE,qBAAqB,GAAG,MAAM,EAC1C,SAAS,CAAC,EAAE,oBAAoB,GAC/B,OAAO;IAMV,oEAAoE;IACpE,wBAAwB,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO;IAI/D;;;OAGG;IACH,6BAA6B,CAC3B,WAAW,EAAE,eAAe,EAC5B,aAAa,EAAE,MAAM,GACpB,mBAAmB,GAAG,SAAS;IAOlC,6EAA6E;IAC7E,2BAA2B,CACzB,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,MAAM,GAClB,mBAAmB,GAAG,SAAS;IAMlC;;;;;OAKG;IACH,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,mBAAmB,GAAG,SAAS;IAM3F;;;OAGG;IACH,OAAO,CAAC,eAAe;CAcxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-limit.registry.d.ts","sourceRoot":"","sources":["../../src/registries/transaction-limit.registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE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,wBAAwB,IAAI,eAAe,EAAE;IAI7C,mDAAmD;IACnD,OAAO,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,EAAE;IAKhD,yEAAyE;IACzE,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CAe9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/country.repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEzF;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkC;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkC;IAEzD,OAAO;IASP,MAAM,CAAC,WAAW,IAAI,iBAAiB;IAOvC,wCAAwC;IACxC,OAAO,IAAI,UAAU,EAAE;IAIvB,yEAAyE;IACzE,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;CAKpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currency.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/currency.repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAE1C,OAAO;IASP,MAAM,CAAC,WAAW,IAAI,kBAAkB;IAOxC,yCAAyC;IACzC,OAAO,IAAI,WAAW,EAAE;IAIxB,sEAAsE;IACtE,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;CAGrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-money-provider.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/mobile-money-provider.repository.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,wBAAwB,EAAE,OAAO,CAAC;IAClC,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,eAAe,CAAC;IAC7B,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,sBAAsB,EAAE,CAAC;CACrC;AAOD;;;;GAIG;AACH,qBAAa,6BAA6B;IACxC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAgC;IAEvD,OAAO;IAEP,MAAM,CAAC,WAAW,IAAI,6BAA6B;IAOnD,mEAAmE;IACnE,wBAAwB,IAAI,eAAe,EAAE;IAI7C,0EAA0E;IAC1E,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,qBAAqB,GAAG,SAAS;IAI/E,uDAAuD;IACvD,OAAO,CAAC,WAAW,EAAE,eAAe,GAAG,sBAAsB,EAAE;IAI/D;;;;OAIG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,eAAe,GAE3B;QACE,QAAQ,EAAE,sBAAsB,CAAC;QACjC,IAAI,EAAE;YACJ,WAAW,EAAE,eAAe,CAAC;YAC7B,YAAY,EAAE,YAAY,CAAC;SAC5B,CAAC;KACH,GACD,SAAS;CAsCd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-limit.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/transaction-limit.repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,eAAe,CAAC;IAC7B,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,oBAAoB,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAOD;;;;;GAKG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA6B;IACpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8C;IAErE,OAAO;IAEP,MAAM,CAAC,WAAW,IAAI,0BAA0B;IAOhD;;;OAGG;IACH,SAAS,CAAC,KAAK,EAAE,wBAAwB,GAAG,mBAAmB,GAAG,SAAS;CA0B5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/text/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -32,62 +32,16 @@ declare function getInitialsFrom(fullName: string): string;
|
|
|
32
32
|
/**
|
|
33
33
|
* Validates a personal name (account holder name, wallet owner name, etc.)
|
|
34
34
|
* Used across bank accounts and mobile-money wallets for consistent validation.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} name - The name to validate
|
|
37
|
-
* @returns {boolean} True if the name meets all validation criteria, false otherwise
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* // Returns true
|
|
41
|
-
* validatePersonalName("John Smith");
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* // Returns false (too short)
|
|
45
|
-
* validatePersonalName("Jo");
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* // Returns false (invalid characters)
|
|
49
|
-
* validatePersonalName("User123");
|
|
50
35
|
*/
|
|
51
36
|
declare function validatePersonalName(name: string): boolean;
|
|
52
37
|
/**
|
|
53
38
|
* Validates a business name (company, organization, etc.)
|
|
54
39
|
* More lenient than personal name validation.
|
|
55
|
-
*
|
|
56
|
-
* @param {string} name - The business name to validate
|
|
57
|
-
* @returns {boolean} True if the name meets business name criteria, false otherwise
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* // Returns true
|
|
61
|
-
* validateBusinessName("ABC Corporation Ltd");
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* // Returns true
|
|
65
|
-
* validateBusinessName("Smith & Sons Inc.");
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* // Returns true
|
|
69
|
-
* validateBusinessName("M-Pesa");
|
|
70
40
|
*/
|
|
71
41
|
declare function validateBusinessName(name: string): boolean;
|
|
72
42
|
/**
|
|
73
43
|
* Validates any name (personal or business) with automatic detection.
|
|
74
|
-
* First tries
|
|
75
|
-
* If detection fails, tries both validation methods.
|
|
76
|
-
*
|
|
77
|
-
* @param {string} name - The name to validate (personal or business)
|
|
78
|
-
* @returns {boolean} True if the name is valid as either personal or business name
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* // Returns true (personal name)
|
|
82
|
-
* validateName("John Smith");
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* // Returns true (business name)
|
|
86
|
-
* validateName("CRDB Bank PLC");
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* // Returns true (could be either)
|
|
90
|
-
* validateName("Smith Solutions");
|
|
44
|
+
* First tries personal name validation; if that fails, falls back to business name validation.
|
|
91
45
|
*/
|
|
92
46
|
declare function validateName(name: string): boolean;
|
|
93
47
|
export declare const TextUtils: {
|
|
@@ -101,3 +55,4 @@ export declare const TextUtils: {
|
|
|
101
55
|
validateName: typeof validateName;
|
|
102
56
|
};
|
|
103
57
|
export {};
|
|
58
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/utilities/text/text.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,iBAAS,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED;;;;;GAKG;AACH,iBAAS,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO1C;AAED;;;;GAIG;AACH,iBAAS,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUhD;AAED;;;;GAIG;AACH,iBAAS,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAWjD;AAyBD;;;GAGG;AACH,iBAAS,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAYnD;AAED;;;GAGG;AACH,iBAAS,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAUnD;AAED;;;GAGG;AACH,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAU3C;AAED,eAAO,MAAM,SAAS;;;;;;;;;CAUrB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { TZDate } from "@date-fns/tz";
|
|
2
|
+
/**
|
|
3
|
+
* Timezone-aware day-boundary helpers.
|
|
4
|
+
*
|
|
5
|
+
* `react-day-picker` and most form widgets hand us `Date` objects whose
|
|
6
|
+
* year/month/day come from the **browser's** local clock. When the user
|
|
7
|
+
* has chosen a different timezone in Settings, that's wrong: picking
|
|
8
|
+
* "May 25" from London should map to "midnight 25 May in Africa/Nairobi"
|
|
9
|
+
* (i.e. 21:00 UTC on the 24th), not "midnight 25 May BST" (23:00 UTC).
|
|
10
|
+
*
|
|
11
|
+
* Two distinct directions:
|
|
12
|
+
*
|
|
13
|
+
* - **Picker → API**: `startOfDayInTimezone` / `endOfDayInTimezone` take
|
|
14
|
+
* a picker `Date` and return a plain `Date` anchored at the right UTC
|
|
15
|
+
* instant for the wall-clock day boundary in `tz`. We deliberately
|
|
16
|
+
* return a plain `Date` (not `TZDate`) so `.toISOString()` produces
|
|
17
|
+
* UTC-`Z` format — every value reaching the server / SDK must be
|
|
18
|
+
* UTC-`Z`, never the `+HH:MM` offset form that `TZDate.toISOString()`
|
|
19
|
+
* emits by default.
|
|
20
|
+
*
|
|
21
|
+
* - **API → Picker**: `parseInTimezone` parses a server ISO string into
|
|
22
|
+
* a `TZDate` so `getDate()`/`getMonth()`/`getFullYear()` report the
|
|
23
|
+
* wall-clock day in `tz` — which is what react-day-picker uses to
|
|
24
|
+
* highlight a cell. Do NOT `.toISOString()` the result without going
|
|
25
|
+
* through `toUtcInstant` first.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Strip timezone identity from any `Date` subclass, returning the bare
|
|
29
|
+
* UTC instant. `.toISOString()` on the result is guaranteed `Z` form.
|
|
30
|
+
*/
|
|
31
|
+
export declare function toUtcInstant(date: Date): Date;
|
|
32
|
+
/**
|
|
33
|
+
* UTC instant of midnight on `date`'s wall-clock day in `tz`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function startOfDayInTimezone(date: Date, tz: string): Date;
|
|
36
|
+
/**
|
|
37
|
+
* UTC instant of 23:59:59.999 on `date`'s wall-clock day in `tz`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function endOfDayInTimezone(date: Date, tz: string): Date;
|
|
40
|
+
/**
|
|
41
|
+
* Parse an ISO string as a `TZDate` so its Y/M/D/h getters report the
|
|
42
|
+
* wall-clock value in `tz`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function parseInTimezone(iso: string, tz: string): TZDate;
|
|
45
|
+
/**
|
|
46
|
+
* True when two dates fall on the same wall-clock day in `tz`. Accepts
|
|
47
|
+
* either a real `Date` or a `TZDate`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function sameDayInTimezone(a: Date, b: Date, tz: string): boolean;
|
|
50
|
+
//# sourceMappingURL=boundaries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundaries.d.ts","sourceRoot":"","sources":["../../../src/utilities/timezone/boundaries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAE7C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAGjE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAY/D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAQvE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** `25 MAY 2026` */
|
|
2
|
+
export declare function formatDate(date: Date, tz?: string): string;
|
|
3
|
+
/** `25 MAY 2026, 02:30 PM` */
|
|
4
|
+
export declare function formatDateTime(date: Date, tz?: string): string;
|
|
5
|
+
/** `25 MAY 2026, 02:30:45 PM` — audit rows where seconds matter. */
|
|
6
|
+
export declare function formatDateTimeWithSeconds(date: Date, tz?: string): string;
|
|
7
|
+
/** `02:30 PM` */
|
|
8
|
+
export declare function formatTime(date: Date, tz?: string): string;
|
|
9
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/utilities/timezone/format.ts"],"names":[],"mappings":"AA+CA,oBAAoB;AACpB,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,GAAE,MAAyB,GAAG,MAAM,CAE5E;AAED,8BAA8B;AAC9B,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,GAAE,MAAyB,GAAG,MAAM,CAEhF;AAED,oEAAoE;AACpE,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,GAAE,MAAyB,GAAG,MAAM,CAE3F;AAED,iBAAiB;AACjB,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,GAAE,MAAyB,GAAG,MAAM,CAE5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/timezone/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zones for the markets TemboPlus operates in. Always visible at the top
|
|
3
|
+
* of a timezone picker. Each entry pairs the canonical IANA id with the
|
|
4
|
+
* market-oriented label shown in that group (e.g. "Tanzania & Kenya"
|
|
5
|
+
* rather than "Africa / Nairobi") — operating rows read as markets, not
|
|
6
|
+
* zones. Editorial order, not alphabetical.
|
|
7
|
+
*/
|
|
8
|
+
export declare const OPERATING_TIMEZONES: ReadonlyArray<{
|
|
9
|
+
value: string;
|
|
10
|
+
market: string;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Reference / anchor zones that are useful even when you don't operate
|
|
14
|
+
* there — UTC is universal, GMT/London/NY/Paris are how the rest of the
|
|
15
|
+
* world spells time. Kept deliberately short.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ANCHOR_TIMEZONES: ReadonlyArray<string>;
|
|
18
|
+
//# sourceMappingURL=markets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markets.d.ts","sourceRoot":"","sources":["../../../src/utilities/timezone/markets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAA6D,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAKlD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type TimezoneGroup = "operating" | "anchors" | "others";
|
|
2
|
+
export interface TimezoneOption {
|
|
3
|
+
/**
|
|
4
|
+
* IANA id, e.g. `"Africa/Nairobi"`. This is what's persisted and what
|
|
5
|
+
* `Intl.DateTimeFormat` consumes.
|
|
6
|
+
*/
|
|
7
|
+
value: string;
|
|
8
|
+
/**
|
|
9
|
+
* Friendly label for a dropdown, e.g. `"Africa / Nairobi (GMT+03:00)"`.
|
|
10
|
+
* The offset reflects the current moment — it shifts across DST
|
|
11
|
+
* boundaries for affected zones, which is acceptable for a picker.
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Market-oriented label rendered only for operating zones, e.g.
|
|
16
|
+
* `"Tanzania & Kenya (GMT+03:00)"`. Other groups render `label`.
|
|
17
|
+
*/
|
|
18
|
+
marketLabel?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Which dropdown section this option belongs to. Pickers typically hide
|
|
21
|
+
* the `others` section until the user starts typing.
|
|
22
|
+
*/
|
|
23
|
+
group: TimezoneGroup;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Returns the current offset for `timeZone` as a `GMT±HH:MM` string, or
|
|
27
|
+
* an empty string if `Intl` can't resolve it.
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatOffset(timeZone: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Friendly dropdown label for an IANA id, e.g.
|
|
32
|
+
* `"Africa / Nairobi (GMT+03:00)"`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatLabel(timeZone: string): string;
|
|
35
|
+
/** Frozen list of every selectable timezone option, in display order. */
|
|
36
|
+
export declare const TIMEZONE_OPTIONS: ReadonlyArray<TimezoneOption>;
|
|
37
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/utilities/timezone/options.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,EAAE,aAAa,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUrD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIpD;AAoCD,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,cAAc,CAE1D,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* A calendar day expressed as `YYYY-MM-DD`. No time, no timezone — just
|
|
4
|
+
* the digits a date picker hands you. Use this for any "what calendar
|
|
5
|
+
* day did the user pick?" boundary; convert to a `Date` only when you
|
|
6
|
+
* need to do timezone-aware arithmetic.
|
|
7
|
+
*/
|
|
8
|
+
export type PlainDate = string;
|
|
9
|
+
/** Regex matching a valid `YYYY-MM-DD` string. */
|
|
10
|
+
export declare const PLAIN_DATE_PATTERN: RegExp;
|
|
11
|
+
/** Zod schema validating a {@link PlainDate}. */
|
|
12
|
+
export declare const plainDateSchema: z.ZodString;
|
|
13
|
+
/**
|
|
14
|
+
* Add or subtract whole calendar days from a `YYYY-MM-DD` string. Pure
|
|
15
|
+
* string-in/string-out, no dependency on the JS runtime's local
|
|
16
|
+
* timezone — we pin to UTC noon so DST cliffs and ±1s rounding can't
|
|
17
|
+
* tip the result onto an adjacent day.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* shiftPlainDate("2026-05-15", 1); // → "2026-05-16"
|
|
21
|
+
* shiftPlainDate("2026-05-15", -1); // → "2026-05-14"
|
|
22
|
+
* shiftPlainDate("2026-05-31", 1); // → "2026-06-01" (month wrap)
|
|
23
|
+
* shiftPlainDate("2026-01-01", -1); // → "2025-12-31" (year wrap)
|
|
24
|
+
* shiftPlainDate("2026-03-08", 1); // → "2026-03-09" (DST-safe; US "spring forward" day)
|
|
25
|
+
*/
|
|
26
|
+
export declare function shiftPlainDate(date: PlainDate, days: number): PlainDate;
|
|
27
|
+
/**
|
|
28
|
+
* Pad an EAT date range by ±1 day on each side. Used to ensure that an
|
|
29
|
+
* upstream EAT-anchored query returns every transaction that falls on
|
|
30
|
+
* the caller's local-zone window, regardless of timezone offset (±1 is
|
|
31
|
+
* sufficient because the maximum delta from EAT (UTC+3) to any timezone
|
|
32
|
+
* on earth is 15 hours, comfortably under 24h).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* padEatRange({ startDate: "2026-05-15", endDate: "2026-05-16" });
|
|
36
|
+
* // → { startDate: "2026-05-14", endDate: "2026-05-17" }
|
|
37
|
+
*/
|
|
38
|
+
export declare function padEatRange(range: {
|
|
39
|
+
startDate: PlainDate;
|
|
40
|
+
endDate: PlainDate;
|
|
41
|
+
}): {
|
|
42
|
+
startDate: PlainDate;
|
|
43
|
+
endDate: PlainDate;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Format an absolute instant as a `YYYY-MM-DD` string in the given IANA
|
|
47
|
+
* timezone. Uses `en-CA` locale because that's the one major locale
|
|
48
|
+
* whose default date format is already ISO-like — no stitching parts.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const instant = new Date("2026-05-15T01:30:00+03:00");
|
|
52
|
+
* localDateInZone(instant, "Africa/Nairobi"); // → "2026-05-15"
|
|
53
|
+
* localDateInZone(instant, "UTC"); // → "2026-05-14"
|
|
54
|
+
* localDateInZone(instant, "America/New_York"); // → "2026-05-14"
|
|
55
|
+
* localDateInZone(instant, "Pacific/Auckland"); // → "2026-05-15"
|
|
56
|
+
*/
|
|
57
|
+
export declare function localDateInZone(instant: Date, timezone: string): PlainDate;
|
|
58
|
+
//# sourceMappingURL=plain-date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plain-date.d.ts","sourceRoot":"","sources":["../../../src/utilities/timezone/plain-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,kDAAkD;AAClD,eAAO,MAAM,kBAAkB,QAAwB,CAAC;AAExD,iDAAiD;AACjD,eAAO,MAAM,eAAe,aAE1B,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAUvE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,SAAS,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,GAAG;IAChF,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,SAAS,CAAC;CACpB,CAKA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CAQ1E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IANA id for East Africa Time. The TemboPlus database is anchored to
|
|
3
|
+
* this zone, so it's the natural default for any report or statement
|
|
4
|
+
* whose data originates there.
|
|
5
|
+
*/
|
|
6
|
+
export declare const EAT_TIMEZONE = "Africa/Nairobi";
|
|
7
|
+
/**
|
|
8
|
+
* Default for callers that don't pin a specific timezone. Currently EAT;
|
|
9
|
+
* may change if/when TemboPlus operates in more markets.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_TIMEZONE = "Africa/Nairobi";
|
|
12
|
+
/**
|
|
13
|
+
* Validate that a value is a known IANA timezone. The known set comes
|
|
14
|
+
* from `Intl.supportedValuesOf("timeZone")` plus pinned operating and
|
|
15
|
+
* anchor zones.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isValidTimezone(value: unknown): value is string;
|
|
18
|
+
/**
|
|
19
|
+
* True when the caller's selected timezone is effectively EAT. Useful
|
|
20
|
+
* for short-circuiting EAT-anchored padding / post-filtering so callers
|
|
21
|
+
* who haven't migrated see byte-identical behaviour.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* isEatTimezone(undefined); // → true (no zone = legacy EAT behaviour)
|
|
25
|
+
* isEatTimezone("Africa/Nairobi"); // → true (canonical EAT id)
|
|
26
|
+
* isEatTimezone("UTC"); // → false
|
|
27
|
+
*/
|
|
28
|
+
export declare function isEatTimezone(timezone: string | undefined): boolean;
|
|
29
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/utilities/timezone/validate.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,mBAAe,CAAC;AAkB7C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEnE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temboplus/frontend-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-beta.3",
|
|
4
4
|
"description": "A JavaScript/TypeScript package providing common utilities and logic shared across front-end TemboPlus projects.",
|
|
5
5
|
"author": "Okello Gerald",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"frontend-core"
|
|
10
10
|
],
|
|
11
11
|
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
12
13
|
"main": "./dist/index.cjs.js",
|
|
13
14
|
"module": "./dist/index.esm.js",
|
|
14
15
|
"types": "./dist/index.d.ts",
|
|
@@ -22,38 +23,49 @@
|
|
|
22
23
|
"files": [
|
|
23
24
|
"dist"
|
|
24
25
|
],
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20",
|
|
28
|
+
"bun": ">=1.1"
|
|
29
|
+
},
|
|
25
30
|
"scripts": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
31
|
+
"dev": "bun x rollup -c rollup.config.js --watch",
|
|
32
|
+
"build": "bun x rollup -c rollup.config.js",
|
|
33
|
+
"test": "bun test",
|
|
34
|
+
"lint": "bun x @biomejs/biome check src",
|
|
35
|
+
"format": "bun x @biomejs/biome check --write src",
|
|
36
|
+
"typecheck": "bun x tsc --noEmit",
|
|
37
|
+
"release": "echo 'Releases are tag-driven. Update CHANGELOG.md, bump version in package.json, then: git tag vX.Y.Z && git push origin main --tags'",
|
|
38
|
+
"prepublishOnly": "bun run typecheck && bun test && bun run build"
|
|
30
39
|
},
|
|
31
40
|
"repository": {
|
|
32
41
|
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/TemboPlus-Frontend/frontend-core
|
|
42
|
+
"url": "git+https://github.com/TemboPlus-Frontend/temboplus-frontend-core.git"
|
|
34
43
|
},
|
|
35
44
|
"bugs": {
|
|
36
|
-
"url": "https://github.com/TemboPlus-Frontend/frontend-core
|
|
45
|
+
"url": "https://github.com/TemboPlus-Frontend/temboplus-frontend-core/issues"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/TemboPlus-Frontend/temboplus-frontend-core#readme",
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public",
|
|
50
|
+
"registry": "https://registry.npmjs.org"
|
|
37
51
|
},
|
|
38
|
-
"homepage": "https://github.com/TemboPlus-Frontend/frontend-core-js#readme",
|
|
39
52
|
"dependencies": {
|
|
53
|
+
"@date-fns/tz": "^1.4.1",
|
|
54
|
+
"date-fns": "^4.2.1",
|
|
40
55
|
"libphonenumber-js": "^1.12.6",
|
|
41
|
-
"pino": "^9.13.1",
|
|
42
56
|
"tslib": "^2.8.1",
|
|
43
|
-
"uuid": "^11.1.0",
|
|
44
57
|
"zod": "^3.24.2"
|
|
45
58
|
},
|
|
46
59
|
"devDependencies": {
|
|
60
|
+
"@biomejs/biome": "^2.4.16",
|
|
47
61
|
"@rollup/plugin-alias": "^5.1.1",
|
|
48
62
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
49
63
|
"@rollup/plugin-json": "^6.1.0",
|
|
50
64
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
51
65
|
"@rollup/plugin-terser": "^0.4.4",
|
|
52
66
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
53
|
-
"
|
|
67
|
+
"@types/bun": "^1.3.14",
|
|
54
68
|
"rollup": "^4.39.0",
|
|
55
|
-
"
|
|
56
|
-
"typescript": "^5.9.3",
|
|
57
|
-
"vitest": "^3.2.4"
|
|
69
|
+
"typescript": "^5.9.3"
|
|
58
70
|
}
|
|
59
71
|
}
|
package/dist/utils/id.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generates a unique UUID (version 4).
|
|
3
|
-
* @returns {string} - A randomly generated UUID string.
|
|
4
|
-
*/
|
|
5
|
-
declare function generateUniqueUUID(): string;
|
|
6
|
-
/**
|
|
7
|
-
* Generates a UUID (version 5) based on the input string and a predefined namespace.
|
|
8
|
-
* @param {string} data - The input string to generate the UUID from.
|
|
9
|
-
* @returns {string} - A UUID string generated from the input string.
|
|
10
|
-
*/
|
|
11
|
-
declare function generateUuidBasedOn(data: string): string;
|
|
12
|
-
export declare const IdUtils: {
|
|
13
|
-
generateUniqueUUID: typeof generateUniqueUUID;
|
|
14
|
-
generateUuidBasedOn: typeof generateUuidBasedOn;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
package/dist/utils/index.d.ts
DELETED
package/dist/utils/logger.d.ts
DELETED
package/dist/utils/time.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compares two dates (years, months, and days only) without considering the time.
|
|
3
|
-
* @param {Date} a - The first Date object.
|
|
4
|
-
* @param {Date} b - The second Date object.
|
|
5
|
-
* @returns {boolean} - Returns true if the dates are equal in terms of year, month, and day; otherwise, false.
|
|
6
|
-
*/
|
|
7
|
-
declare function compareDates(a: Date, b: Date): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Sorts two dates in descending order (latest date first).
|
|
10
|
-
* @param {Date} a - The first Date object.
|
|
11
|
-
* @param {Date} b - The second Date object.
|
|
12
|
-
* @returns {number} - Returns a positive value if `b` is after `a`, a negative value if `a` is after `b`, and 0 if they are equal.
|
|
13
|
-
*/
|
|
14
|
-
declare function sortDates(a: Date, b: Date): number;
|
|
15
|
-
/**
|
|
16
|
-
* Creates a delay for a given number of milliseconds.
|
|
17
|
-
* @param {number} milliseconds - The delay duration in milliseconds.
|
|
18
|
-
* @returns {Promise<void>} - A promise that resolves after the specified delay.
|
|
19
|
-
*/
|
|
20
|
-
declare function delay(milliseconds: number): Promise<void>;
|
|
21
|
-
export declare const TimeUtils: {
|
|
22
|
-
compareDates: typeof compareDates;
|
|
23
|
-
sortDates: typeof sortDates;
|
|
24
|
-
delay: typeof delay;
|
|
25
|
-
};
|
|
26
|
-
export {};
|