@incodetech/web 2.1.1 → 2.2.0-rc.1
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/ae-signature/ae-signature.es.js +7 -4
- package/dist/antifraud/antifraud.es.js +6 -6
- package/dist/authentication/authentication.es.js +7 -7
- package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-D7VzaZ2P.js} +6 -3
- package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
- package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
- package/dist/base.css +425 -3290
- package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
- package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
- package/dist/certificate-issuance/styles.css +0 -41
- package/dist/{checkbox-1wUHSoaK.js → checkbox-Jgwh943i.js} +5 -5
- package/dist/connectionError-Bl5E35Qm.js +45 -0
- package/dist/consent/consent.es.js +10 -12
- package/dist/consent/styles.css +5 -4
- package/dist/{countrySelector-SvUOyPo0.js → countrySelector-Sd-u1WGf.js} +3 -3
- package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
- package/dist/curp-validation/curp-validation.es.js +28 -29
- package/dist/curp-validation/styles.css +47 -0
- package/dist/{customFields-BDsXR7A-.js → customFields-CiEguXX9.js} +13 -14
- package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-BSAW87qq.js} +9 -9
- package/dist/dashboardTheme-FtPiizV0.js +223 -0
- package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-D0WEYWkS.js} +5 -5
- package/dist/dateInputComposed-DKQJz0kJ.js +1 -0
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +85 -70
- package/dist/{documentCapture-DhbO-A-V.js → documentCapture-GFNkI1ly.js} +218 -136
- package/dist/documentCapture-sB2_X-we.js +2 -0
- package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-BXleSN7n.js} +18 -11
- package/dist/dropdownComposed-DE-VJgcR.js +1 -0
- package/dist/dynamic-forms/styles.css +58 -6
- package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-DU5fT72-.js} +53 -45
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +1 -28
- package/dist/{ekybModule-DGnTw5UV.js → ekybModule-CMcpoTgh.js} +51 -27
- package/dist/ekybModule-CR9A6Fqb.js +2 -0
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +2 -2
- package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-BTO8iIwh.js} +45 -19
- package/dist/ekycModule-CewwzYvk.js +2 -0
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
- package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-COBKJBjU.js} +31 -23
- package/dist/email/email.es.js +10 -11
- package/dist/{emailInput-DsLkDtER.js → emailInput-mPPvterQ.js} +4 -4
- package/dist/{expiredId-BZXLrLk-.js → expiredId-CD5ETLV9.js} +6 -6
- package/dist/{extensibility-7sRIN0JC.js → extensibility-DBilbbhC.js} +440 -374
- package/dist/extensibility.es.js +24 -28
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +9 -609
- package/dist/faceMatch-2pfSeXeA.js +2 -0
- package/dist/{faceMatch-DyTBoMDm.js → faceMatch-CwDBO9Is.js} +71 -79
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/fieldComparison-DUYp39WI.js +2 -0
- package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-dDvSYYQP.js} +11 -12
- package/dist/finalSuccessScreen-B9kb72WR.js +500 -0
- package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
- package/dist/flip-animation-CvN8FLNc.js +6996 -0
- package/dist/flow/flow.es.js +84 -48
- package/dist/flow/styles.css +908 -5423
- package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
- package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
- package/dist/geolocation/geolocation.es.js +36 -13
- package/dist/geolocation/styles.css +1 -1
- package/dist/government-validation/government-validation.es.js +11 -12
- package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Dycy1yhN.js} +7 -9
- package/dist/{icons-CJJbIpBq.js → icons-D0cfSCBM.js} +92 -7
- package/dist/id/id.es.js +222 -52
- package/dist/id/styles.css +290 -10
- package/dist/id-back-of-card-DO593HH8.js +83 -0
- package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
- package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
- package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
- package/dist/id-laser-h-BaUHzX-d.js +480 -0
- package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
- package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
- package/dist/id-selfie-flow/styles.css +749 -0
- package/dist/id-verification/id-verification.es.js +13 -9
- package/dist/{idOcr-WFBvqy3b.js → idOcr-riTHUOlr.js} +14 -15
- package/dist/identity-reuse/identity-reuse.es.js +6 -8
- package/dist/identity-reuse/styles.css +1 -1
- package/dist/{incode-logo-57XFniXU.js → incode-logo-cGsd55rc.js} +64 -1
- package/dist/incodeComponent-B-daxouV.js +713 -0
- package/dist/incodeModule-uyUrSSUM.js +25 -0
- package/dist/index.es.js +16 -5
- package/dist/inputComposed-CABc288U.js +1 -0
- package/dist/{inputComposed-C1R2LAa3.js → inputComposed-Pp_XN1-h.js} +9 -9
- package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-DSAjFc0h.js} +9 -11
- package/dist/manualCaptureButton-BY8dRhGA.js +300 -0
- package/dist/{capture-CkGvdDNH.js → manualCaptureButton-BldgUGso.js} +68 -198
- package/dist/{modal-OxkFuuiR.js → modal-BlczH_pL.js} +4 -4
- package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
- package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
- package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-Dmz3eRsO.js} +6 -6
- package/dist/{otpInput-CnDc6pQm.js → otpInput-B3vUjmBF.js} +72 -36
- package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
- package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
- package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
- package/dist/pdfViewer-4xNYiBI1.js +2 -0
- package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-BGFFFvmi.js} +5 -7
- package/dist/phone/phone.es.js +13 -12
- package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-D1ZBsd4S.js} +7 -6
- package/dist/{processing-BeUMfdJJ.js → processing-vGhs5Gvb.js} +2 -2
- package/dist/qe-signature/qe-signature.es.js +7 -4
- package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-CYPHpI6a.js} +16 -15
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
- package/dist/redirect-to-mobile/styles.css +20 -10
- package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
- package/dist/{richText-CB1fmegc.js → richText-2OnIN9ff.js} +3 -1607
- package/dist/selfie/selfie.es.js +10 -10
- package/dist/selfie/styles.css +16 -949
- package/dist/signature/signature.es.js +27 -19
- package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
- package/dist/{snackbar-DS7Mv62v.js → snackbar-BzyWgQ7J.js} +2 -2
- package/dist/spacer-Bnmh-DfR.js +2344 -0
- package/dist/{spinner-BMeIEK1d.js → spinner-HP_c74K-.js} +45 -4
- package/dist/statusPage-C0vTVW0Q.js +36 -0
- package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
- package/dist/{tabs-C__chW-u.js → tabs-B_TxQ9ZQ.js} +4 -3
- package/dist/themes/dark.css +35 -0
- package/dist/themes/light.css +35 -0
- package/dist/{tutorial-CCfPuVKX.js → tutorial-Cuy2ZEG9.js} +222 -180
- package/dist/types/ae-signature.d.ts +91 -5
- package/dist/types/antifraud.d.ts +86 -3
- package/dist/types/authentication.d.ts +86 -3
- package/dist/types/certificate-issuance.d.ts +86 -3
- package/dist/types/consent.d.ts +86 -3
- package/dist/types/cross-document-data-match.d.ts +88 -4
- package/dist/types/curp-validation.d.ts +86 -3
- package/dist/types/document-capture.d.ts +88 -4
- package/dist/types/ekyb.d.ts +88 -4
- package/dist/types/ekyc.d.ts +88 -4
- package/dist/types/electronic-signature.d.ts +87 -4
- package/dist/types/email.d.ts +82 -22
- package/dist/types/extensibility.d.ts +160 -5
- package/dist/types/face-match.d.ts +84 -22
- package/dist/types/field-comparison.d.ts +86 -3
- package/dist/types/fiscal-qr.d.ts +89 -5
- package/dist/types/flow.d.ts +92 -2
- package/dist/types/geolocation.d.ts +86 -3
- package/dist/types/government-validation.d.ts +86 -3
- package/dist/types/id-selfie-flow.d.ts +161 -0
- package/dist/types/id-verification.d.ts +87 -4
- package/dist/types/id.d.ts +88 -5
- package/dist/types/identity-reuse.d.ts +82 -2
- package/dist/types/index.d.ts +109 -1
- package/dist/types/phone.d.ts +83 -24
- package/dist/types/qe-signature.d.ts +91 -5
- package/dist/types/redirect-to-mobile.d.ts +4 -1
- package/dist/types/selfie.d.ts +86 -3
- package/dist/types/signature.d.ts +91 -5
- package/dist/types/video-selfie.d.ts +83 -6
- package/dist/types/watchlist.d.ts +91 -5
- package/dist/types/workflow.d.ts +85 -2
- package/dist/{i18n-CU4xq8qC.js → uiConfig-D7ezQeZ7.js} +63 -3
- package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-BImpfi_R.js} +37 -248
- package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
- package/dist/{verificationResult-BWWkmeiA.js → verificationResult-IUf0w1aR.js} +26 -15
- package/dist/video-selfie/styles.css +349 -1202
- package/dist/video-selfie/video-selfie.es.js +120 -381
- package/dist/watchlist/watchlist.es.js +16 -13
- package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-zT9gCfTc.js} +12 -13
- package/dist/workflow/styles.css +501 -3977
- package/dist/workflow/workflow.es.js +26 -19
- package/package.json +22 -20
- package/dist/button-Dz6AsbmF.js +0 -40
- package/dist/cameraView-DIEzM5ru.js +0 -47
- package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
- package/dist/cpf-ocr/styles.css +0 -45
- package/dist/cpfOcr-B79245-3.js +0 -2
- package/dist/cpfOcr-BhxT-lRN.js +0 -92
- package/dist/dateInputComposed-DRzZi6uy.js +0 -1
- package/dist/documentCapture-DXYYyxZl.js +0 -2
- package/dist/dropdownComposed-BAoxIIsE.js +0 -1
- package/dist/ekybModule-C6Nttked.js +0 -2
- package/dist/ekycModule-CDIEjI6V.js +0 -2
- package/dist/errorIcon-BA4T6iy-.js +0 -26
- package/dist/faceMatch-B_HvxLm_.js +0 -2
- package/dist/fieldComparison-DfNEuEE5.js +0 -2
- package/dist/flip-animation-CZYSUtMm.js +0 -6983
- package/dist/hooks-CNu7o-v8.js +0 -186
- package/dist/id-laser-h-CzPegPMn.js +0 -467
- package/dist/incodeComponent-CfzJGETt.js +0 -64
- package/dist/incodeModule-B-4_3JrK.js +0 -13
- package/dist/inputComposed-BaY5q9WM.js +0 -1
- package/dist/loadingIcon-B0ysgiNq.js +0 -148
- package/dist/page-DidH_RkX.js +0 -171
- package/dist/spinner-BCDCoi9C.js +0 -1
- package/dist/statusPage-Bk8nJwXV.js +0 -28
- package/dist/transitionSpinner-CuNCqHNi.js +0 -30
- package/dist/types/cpf-ocr.d.ts +0 -12
- package/dist/typography-BZIpjo97.js +0 -45
- package/dist/uiConfig-D2_wawvr.js +0 -25
- /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
- /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
- /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
- /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
- /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
- /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
- /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
- /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
- /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
- /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
- /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
- /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
- /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as d, v as u } from "./vendor-preact-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { r as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as registerIncodeModuleElement } from "./incodeModule-B-4_3JrK.js";
|
|
13
|
-
import { t as StatusPage } from "./statusPage-Bk8nJwXV.js";
|
|
1
|
+
import { a as useTranslation } from "./uiConfig-D7ezQeZ7.js";
|
|
2
|
+
import { p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
3
|
+
import { _ as useModuleTerminalCallbacks, o as Page, r as withStandaloneModuleBootstrap, t as IncodeComponent, y as useManager } from "./incodeComponent-B-daxouV.js";
|
|
4
|
+
import { n as LoadingIcon, t as Spacer } from "./spacer-Bnmh-DfR.js";
|
|
5
|
+
import { r as Button } from "./incode-logo-cGsd55rc.js";
|
|
6
|
+
import { t as SuccessIcon } from "./successIcon-Bj8Y9CuI.js";
|
|
7
|
+
import { t as StatusPage } from "./statusPage-C0vTVW0Q.js";
|
|
8
|
+
import { t as InputComposed } from "./inputComposed-Pp_XN1-h.js";
|
|
9
|
+
import { t as Checkbox } from "./checkbox-Jgwh943i.js";
|
|
10
|
+
import { t as DateInputComposed } from "./dateInputComposed-D0WEYWkS.js";
|
|
11
|
+
import { t as registerIncodeModuleElement } from "./incodeModule-uyUrSSUM.js";
|
|
14
12
|
import { createCustomFieldsManager } from "@incodetech/core/custom-fields";
|
|
15
13
|
//#region src/modules/custom-fields/customFields.tsx
|
|
16
14
|
var INPUT_TYPE_MAP = {
|
|
@@ -127,7 +125,7 @@ var CustomFieldsContent = ({ config, manager: externalManager, onFinish, onError
|
|
|
127
125
|
})
|
|
128
126
|
});
|
|
129
127
|
};
|
|
130
|
-
var
|
|
128
|
+
var CustomFieldsWithLocalConfig = ({ config, manager, onFinish, onError }) => {
|
|
131
129
|
return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(CustomFieldsContent, {
|
|
132
130
|
config,
|
|
133
131
|
manager,
|
|
@@ -135,6 +133,7 @@ var CustomFields = ({ config, manager, onFinish, onError }) => {
|
|
|
135
133
|
onError
|
|
136
134
|
}) : null });
|
|
137
135
|
};
|
|
136
|
+
var CustomFields = withStandaloneModuleBootstrap(CustomFieldsWithLocalConfig, "CUSTOM_FIELDS", { supportsExternalManager: true });
|
|
138
137
|
registerIncodeModuleElement(CustomFields, "incode-custom-fields");
|
|
139
138
|
//#endregion
|
|
140
139
|
export { CustomFields };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as y, v as u } from "./vendor-preact-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as registerIncodeModuleElement } from "./incodeModule-
|
|
8
|
-
import { t as StatusPage } from "./statusPage-Bk8nJwXV.js";
|
|
1
|
+
import { a as useTranslation } from "./uiConfig-D7ezQeZ7.js";
|
|
2
|
+
import { _ as y, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
3
|
+
import { _ as useModuleTerminalCallbacks, r as withStandaloneModuleBootstrap, t as IncodeComponent, y as useManager } from "./incodeComponent-B-daxouV.js";
|
|
4
|
+
import { n as LoadingIcon } from "./spacer-Bnmh-DfR.js";
|
|
5
|
+
import { t as SuccessIcon } from "./successIcon-Bj8Y9CuI.js";
|
|
6
|
+
import { t as StatusPage } from "./statusPage-C0vTVW0Q.js";
|
|
7
|
+
import { t as registerIncodeModuleElement } from "./incodeModule-uyUrSSUM.js";
|
|
9
8
|
import { createCustomWatchlistManager } from "@incodetech/core/custom-watchlist";
|
|
10
9
|
//#region src/modules/custom-watchlist/customWatchlist.tsx
|
|
11
10
|
var CustomWatchlistContent = ({ onFinish }) => {
|
|
@@ -30,7 +29,8 @@ var CustomWatchlistContent = ({ onFinish }) => {
|
|
|
30
29
|
subtitle: t("customWatchlist.wontTake")
|
|
31
30
|
});
|
|
32
31
|
};
|
|
33
|
-
var
|
|
32
|
+
var CustomWatchlistWithLocalConfig = ({ onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u(CustomWatchlistContent, { onFinish }) });
|
|
33
|
+
var CustomWatchlist = withStandaloneModuleBootstrap(CustomWatchlistWithLocalConfig, "INCODE_WATCHLIST");
|
|
34
34
|
registerIncodeModuleElement(CustomWatchlist, "incode-custom-watchlist");
|
|
35
35
|
//#endregion
|
|
36
36
|
export { CustomWatchlist };
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { t as setThemeUiConfig } from "./uiConfig-D7ezQeZ7.js";
|
|
2
|
+
import { api } from "@incodetech/core/http";
|
|
3
|
+
//#region src/shared/dashboard/dashboardPolicy.ts
|
|
4
|
+
var standaloneSetupPolicy = Object.freeze({
|
|
5
|
+
flow: Object.freeze({
|
|
6
|
+
enabled: true,
|
|
7
|
+
preload: false,
|
|
8
|
+
mergeConfig: false
|
|
9
|
+
}),
|
|
10
|
+
theme: Object.freeze({
|
|
11
|
+
enabled: true,
|
|
12
|
+
preload: false
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
function resolveStandaloneSetupPolicy(flow, theme, token) {
|
|
16
|
+
const flowEnabled = flow !== false;
|
|
17
|
+
const themeEnabled = theme !== false;
|
|
18
|
+
const flowOptions = typeof flow === "object" ? flow : {};
|
|
19
|
+
const themeOptions = typeof theme === "object" ? theme : {};
|
|
20
|
+
return Object.freeze({
|
|
21
|
+
flow: Object.freeze({
|
|
22
|
+
enabled: flowEnabled,
|
|
23
|
+
preload: flowEnabled && flowOptions.preload === true,
|
|
24
|
+
mergeConfig: flowEnabled && flowOptions.mergeConfig === true
|
|
25
|
+
}),
|
|
26
|
+
theme: Object.freeze({
|
|
27
|
+
enabled: themeEnabled,
|
|
28
|
+
preload: themeEnabled && themeOptions.preload === true
|
|
29
|
+
}),
|
|
30
|
+
token
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function setStandaloneSetupPolicy(policy) {
|
|
34
|
+
standaloneSetupPolicy = policy;
|
|
35
|
+
}
|
|
36
|
+
function getStandaloneSetupPolicy() {
|
|
37
|
+
return standaloneSetupPolicy;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/styles/generatePalette.ts
|
|
41
|
+
function hexToHsl(hex) {
|
|
42
|
+
let normalizedHex = hex.replace("#", "");
|
|
43
|
+
if (normalizedHex.length === 3) normalizedHex = normalizedHex.split("").map((char) => char + char).join("");
|
|
44
|
+
const result = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(normalizedHex);
|
|
45
|
+
if (!result) return null;
|
|
46
|
+
const r = Number.parseInt(result[1], 16) / 255;
|
|
47
|
+
const g = Number.parseInt(result[2], 16) / 255;
|
|
48
|
+
const b = Number.parseInt(result[3], 16) / 255;
|
|
49
|
+
const max = Math.max(r, g, b);
|
|
50
|
+
const min = Math.min(r, g, b);
|
|
51
|
+
let h = 0;
|
|
52
|
+
let s = 0;
|
|
53
|
+
const l = (max + min) / 2;
|
|
54
|
+
if (max !== min) {
|
|
55
|
+
const d = max - min;
|
|
56
|
+
s = l > .5 ? d / (2 - max - min) : d / (max + min);
|
|
57
|
+
switch (max) {
|
|
58
|
+
case r:
|
|
59
|
+
h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
60
|
+
break;
|
|
61
|
+
case g:
|
|
62
|
+
h = ((b - r) / d + 2) / 6;
|
|
63
|
+
break;
|
|
64
|
+
case b:
|
|
65
|
+
h = ((r - g) / d + 4) / 6;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
h: h * 360,
|
|
71
|
+
s: s * 100,
|
|
72
|
+
l: l * 100
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function hslToHex(h, s, l) {
|
|
76
|
+
const hNorm = h / 360;
|
|
77
|
+
const sNorm = s / 100;
|
|
78
|
+
const lNorm = l / 100;
|
|
79
|
+
let r;
|
|
80
|
+
let g;
|
|
81
|
+
let b;
|
|
82
|
+
if (sNorm === 0) r = g = b = lNorm;
|
|
83
|
+
else {
|
|
84
|
+
const hue2rgb = (p, q, t) => {
|
|
85
|
+
if (t < 0) t += 1;
|
|
86
|
+
if (t > 1) t -= 1;
|
|
87
|
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
88
|
+
if (t < 1 / 2) return q;
|
|
89
|
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
90
|
+
return p;
|
|
91
|
+
};
|
|
92
|
+
const q = lNorm < .5 ? lNorm * (1 + sNorm) : lNorm + sNorm - lNorm * sNorm;
|
|
93
|
+
const p = 2 * lNorm - q;
|
|
94
|
+
r = hue2rgb(p, q, hNorm + 1 / 3);
|
|
95
|
+
g = hue2rgb(p, q, hNorm);
|
|
96
|
+
b = hue2rgb(p, q, hNorm - 1 / 3);
|
|
97
|
+
}
|
|
98
|
+
const toHex = (n) => {
|
|
99
|
+
const hex = Math.round(n * 255).toString(16);
|
|
100
|
+
return hex.length === 1 ? `0${hex}` : hex;
|
|
101
|
+
};
|
|
102
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
103
|
+
}
|
|
104
|
+
function generateBrandPalette(mainColor) {
|
|
105
|
+
const hsl = hexToHsl(mainColor);
|
|
106
|
+
if (!hsl) throw new Error(`Invalid color format: ${mainColor}`);
|
|
107
|
+
return {
|
|
108
|
+
"50": hslToHex(hsl.h, hsl.s, 95),
|
|
109
|
+
"200": hslToHex(hsl.h, hsl.s, 80),
|
|
110
|
+
"300": hslToHex(hsl.h, hsl.s, 65),
|
|
111
|
+
"400": hslToHex(hsl.h, hsl.s, Math.min(100, hsl.l + 10)),
|
|
112
|
+
"500": mainColor,
|
|
113
|
+
"600": hslToHex(hsl.h, hsl.s, Math.max(0, hsl.l - 10)),
|
|
114
|
+
"900": hslToHex(hsl.h, hsl.s, 20)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/styles/applyTheme.ts
|
|
119
|
+
function applyTheme(mainColor, buttonColor) {
|
|
120
|
+
if (typeof document === "undefined") return;
|
|
121
|
+
const palette = generateBrandPalette(mainColor);
|
|
122
|
+
let styleElement = document.getElementById("incode-theme");
|
|
123
|
+
if (!styleElement) {
|
|
124
|
+
styleElement = document.createElement("style");
|
|
125
|
+
styleElement.id = "incode-theme";
|
|
126
|
+
document.head.appendChild(styleElement);
|
|
127
|
+
}
|
|
128
|
+
const buttonTextColor = buttonColor || "#ffffff";
|
|
129
|
+
const css = `
|
|
130
|
+
:root,
|
|
131
|
+
:host {
|
|
132
|
+
--primitive-color-brand-50: ${palette["50"]};
|
|
133
|
+
--primitive-color-brand-200: ${palette["200"]};
|
|
134
|
+
--primitive-color-brand-300: ${palette["300"]};
|
|
135
|
+
--primitive-color-brand-400: ${palette["400"]};
|
|
136
|
+
--primitive-color-brand-500: ${palette["500"]};
|
|
137
|
+
--primitive-color-brand-600: ${palette["600"]};
|
|
138
|
+
--primitive-color-brand-900: ${palette["900"]};
|
|
139
|
+
--button-primary-text-default: ${buttonTextColor};
|
|
140
|
+
}
|
|
141
|
+
`;
|
|
142
|
+
styleElement.textContent = css;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/styles/fetchTheme.ts
|
|
146
|
+
async function fetchAssets() {
|
|
147
|
+
return (await api.get("/omni/asset/fetch-all")).data;
|
|
148
|
+
}
|
|
149
|
+
var dataUrlCache = /* @__PURE__ */ new Map();
|
|
150
|
+
async function urlToDataUrl(url) {
|
|
151
|
+
if (url.startsWith("data:")) return url;
|
|
152
|
+
const cached = dataUrlCache.get(url);
|
|
153
|
+
if (cached) return cached;
|
|
154
|
+
const blob = await (await fetch(url)).blob();
|
|
155
|
+
const dataUrl = await new Promise((resolve, reject) => {
|
|
156
|
+
const reader = new FileReader();
|
|
157
|
+
reader.onloadend = () => resolve(reader.result);
|
|
158
|
+
reader.onerror = reject;
|
|
159
|
+
reader.readAsDataURL(blob);
|
|
160
|
+
});
|
|
161
|
+
dataUrlCache.set(url, dataUrl);
|
|
162
|
+
return dataUrl;
|
|
163
|
+
}
|
|
164
|
+
async function fetchTheme() {
|
|
165
|
+
const assets = await fetchAssets();
|
|
166
|
+
if (!assets.theme) throw new Error("Theme URL not found in assets response");
|
|
167
|
+
const themeUrl = assets.theme;
|
|
168
|
+
const isAbsoluteUrl = themeUrl.startsWith("http://") || themeUrl.startsWith("https://");
|
|
169
|
+
let theme;
|
|
170
|
+
if (isAbsoluteUrl) {
|
|
171
|
+
const themeResponse = await fetch(themeUrl);
|
|
172
|
+
if (!themeResponse.ok) throw new Error(`Failed to fetch theme: ${themeResponse.statusText}`);
|
|
173
|
+
theme = await themeResponse.json();
|
|
174
|
+
} else theme = (await api.get(themeUrl)).data;
|
|
175
|
+
const logoUrl = assets["logo.png"] || assets["logo.svg"] || assets["logo.jpg"] || assets["logo.jpeg"] || assets["logo.webp"] || theme.logo;
|
|
176
|
+
let cachedLogoUrl = logoUrl;
|
|
177
|
+
if (logoUrl) cachedLogoUrl = await urlToDataUrl(logoUrl);
|
|
178
|
+
return {
|
|
179
|
+
...theme,
|
|
180
|
+
logo: cachedLogoUrl
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
async function fetchAndApplyTheme() {
|
|
184
|
+
const theme = await fetchTheme();
|
|
185
|
+
if (theme.main) applyTheme(theme.main, theme.buttonColor);
|
|
186
|
+
return theme;
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/shared/dashboard/dashboardTheme.ts
|
|
190
|
+
var dashboardThemeCache;
|
|
191
|
+
function preloadDashboardTheme(token) {
|
|
192
|
+
if (dashboardThemeCache?.token === token) return dashboardThemeCache.promise;
|
|
193
|
+
const request = fetchTheme();
|
|
194
|
+
const cache = {
|
|
195
|
+
token,
|
|
196
|
+
promise: request
|
|
197
|
+
};
|
|
198
|
+
const promise = request.then((theme) => {
|
|
199
|
+
if (dashboardThemeCache !== cache) return theme;
|
|
200
|
+
if (theme.main) applyTheme(theme.main, theme.buttonColor);
|
|
201
|
+
setThemeUiConfig({
|
|
202
|
+
logoSrc: theme.logo,
|
|
203
|
+
subtitle: theme.subtitle,
|
|
204
|
+
hideFooterBranding: theme.hideFooterBranding
|
|
205
|
+
});
|
|
206
|
+
return theme;
|
|
207
|
+
}).catch((error) => {
|
|
208
|
+
if (dashboardThemeCache === cache) dashboardThemeCache = void 0;
|
|
209
|
+
throw error;
|
|
210
|
+
});
|
|
211
|
+
cache.promise = promise;
|
|
212
|
+
dashboardThemeCache = cache;
|
|
213
|
+
return promise;
|
|
214
|
+
}
|
|
215
|
+
function getDashboardTheme(token) {
|
|
216
|
+
if (dashboardThemeCache?.token !== token) return;
|
|
217
|
+
return dashboardThemeCache.promise;
|
|
218
|
+
}
|
|
219
|
+
function resetDashboardThemeCache() {
|
|
220
|
+
dashboardThemeCache = void 0;
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
export { getStandaloneSetupPolicy as a, fetchAndApplyTheme as i, preloadDashboardTheme as n, resolveStandaloneSetupPolicy as o, resetDashboardThemeCache as r, setStandaloneSetupPolicy as s, getDashboardTheme as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as D, l as A, v as u } from "./vendor-preact-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as InputComposed } from "./inputComposed-
|
|
5
|
-
import "./inputComposed-
|
|
1
|
+
import { a as D, l as A, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
2
|
+
import { u as cn } from "./spacer-Bnmh-DfR.js";
|
|
3
|
+
import { _ as CalendarIcon } from "./icons-D0cfSCBM.js";
|
|
4
|
+
import { t as InputComposed } from "./inputComposed-Pp_XN1-h.js";
|
|
5
|
+
import "./inputComposed-CABc288U.js";
|
|
6
6
|
//#region src/shared/dateInputComposed/dateInputComposed.tsx
|
|
7
7
|
var DateInputComposed = D(({ id, label, disabled, class: className, onInput, onBlur, ...restProps }, ref) => {
|
|
8
8
|
const tryShowPicker = (input) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./dateInputComposed-D0WEYWkS.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DocumentCapture } from "../documentCapture-
|
|
1
|
+
import { t as DocumentCapture } from "../documentCapture-GFNkI1ly.js";
|
|
2
2
|
export { DocumentCapture };
|