@kapaai/support-form-deflector 0.1.10 → 0.2.0
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/answer/answer-renderer.d.ts +6 -0
- package/dist/answer/answer-renderer.d.ts.map +1 -0
- package/dist/answer/error-indicator.d.ts +3 -0
- package/dist/answer/error-indicator.d.ts.map +1 -0
- package/dist/answer/index.d.ts +3 -0
- package/dist/answer/index.d.ts.map +1 -0
- package/dist/answer/info-texts.d.ts +4 -0
- package/dist/answer/info-texts.d.ts.map +1 -0
- package/dist/answer/loading-indicator.d.ts +3 -0
- package/dist/answer/loading-indicator.d.ts.map +1 -0
- package/dist/answer/use-submit-button-text-override.d.ts +8 -0
- package/dist/answer/use-submit-button-text-override.d.ts.map +1 -0
- package/dist/config-provider.d.ts +33 -0
- package/dist/config-provider.d.ts.map +1 -0
- package/dist/icons/sparkles.d.ts +3 -0
- package/dist/icons/sparkles.d.ts.map +1 -0
- package/dist/icons/types.d.ts +9 -0
- package/dist/icons/types.d.ts.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.html +1 -1
- package/dist/kapa-support-form-deflector.bundle.js +2 -0
- package/dist/kapa-support-form-deflector.bundle.js.LICENSE.txt +61 -0
- package/dist/state.d.ts +19 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/utils/errors.d.ts +7 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/wait-for-elements.d.ts +24 -0
- package/dist/utils/wait-for-elements.d.ts.map +1 -0
- package/package.json +2 -3
- package/dist/__tests__/example.test.d.ts +0 -2
- package/dist/__tests__/example.test.d.ts.map +0 -1
- package/dist/kapa-deflector.bundle.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answer-renderer.d.ts","sourceRoot":"","sources":["../../src/answer/answer-renderer.tsx"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyBF,QAAA,MAAM,cAAc,eAAgB,KAAK,4CA2CxC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-indicator.d.ts","sourceRoot":"","sources":["../../src/answer/error-indicator.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,cAAc,+CAsBnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/answer/index.tsx"],"names":[],"mappings":"AA4BA,QAAA,MAAM,aAAa,+CAiElB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const PreSubmitInfo: () => import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare const LoadingInfo: () => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
export declare const PostSubmitInfo: () => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
//# sourceMappingURL=info-texts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info-texts.d.ts","sourceRoot":"","sources":["../../src/answer/info-texts.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,sDAUzB,CAAC;AAEF,eAAO,MAAM,WAAW,sDAYvB,CAAC;AAEF,eAAO,MAAM,cAAc,sDAU1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-indicator.d.ts","sourceRoot":"","sources":["../../src/answer/loading-indicator.tsx"],"names":[],"mappings":"AA+EA,QAAA,MAAM,gBAAgB,+CAkErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This hook overwrites the default submit button text if the
|
|
3
|
+
* submitButtonTextQuerySelector and submitButtonTextOverride
|
|
4
|
+
* config options have been set. It resets the button text to
|
|
5
|
+
* the original text once the deflector has been triggered.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useSubmitButtonTextOverride: () => void;
|
|
8
|
+
//# sourceMappingURL=use-submit-button-text-override.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-submit-button-text-override.d.ts","sourceRoot":"","sources":["../../src/answer/use-submit-button-text-override.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,YA2CvC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Styles = {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
textColor: string;
|
|
5
|
+
borderRadius?: number;
|
|
6
|
+
border?: string;
|
|
7
|
+
answerBoxTitle: string;
|
|
8
|
+
loadingTexts?: string[];
|
|
9
|
+
loadingInfoText: string;
|
|
10
|
+
postSubmitInfoText?: string;
|
|
11
|
+
preSubmitInfoText?: string;
|
|
12
|
+
};
|
|
13
|
+
type DeflectorConfig = {
|
|
14
|
+
mainInputQuerySelector: string;
|
|
15
|
+
extraInputQuerySelectors: string[];
|
|
16
|
+
integrationId: string;
|
|
17
|
+
submitElementQuerySelector: string;
|
|
18
|
+
submitElementEventType: "onSubmit" | "onClick";
|
|
19
|
+
runsOriginalEventAutomatically?: boolean;
|
|
20
|
+
submitButtonTextQuerySelector?: string;
|
|
21
|
+
submitButtonTextOverride?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const ConfigProvider: React.FC<{
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
styles: Styles;
|
|
26
|
+
config: DeflectorConfig;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const useConfig: () => {
|
|
29
|
+
styles: Styles;
|
|
30
|
+
config: DeflectorConfig;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=config-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-provider.d.ts","sourceRoot":"","sources":["../src/config-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,KAAK,MAAM,GAAG;IAEZ,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,0BAA0B,EAAE,MAAM,CAAC;IACnC,sBAAsB,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/C,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC;AAWF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,eAAe,CAAC;CACzB,CAIA,CAAC;AAEF,eAAO,MAAM,SAAS;YAjBR,MAAM;YACN,eAAe;CAsB5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sparkles.d.ts","sourceRoot":"","sources":["../../src/icons/sparkles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,YAAY,qDAOtB,SAAS,4CAiBX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/icons/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
1
|
+
export declare const matchesDeflectorScript: (script: HTMLScriptElement) => boolean;
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
_KAPA_SFD_RENDERED?: boolean;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
3
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,sBAAsB,WAAY,iBAAiB,KAAG,OAIlE,CAAC;AACF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B;CACF"}
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="%PUBLIC_URL%/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png"/><link rel="manifest" href="%PUBLIC_URL%/manifest.json"/><title>React App</title><script defer="defer" src="kapa-deflector.bundle.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="%PUBLIC_URL%/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png"/><link rel="manifest" href="%PUBLIC_URL%/manifest.json"/><title>React App</title><script defer="defer" src="kapa-support-form-deflector.bundle.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|