@hiver/connector-agent 4.25.0-facets-beta.0 → 4.25.0-prefillAuto-beta.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/app/connector-cards.d.ts.map +1 -1
- package/app/hig-slack/HigSlackSection.d.ts.map +1 -1
- package/app/omni-slack/SlackConnectModalIsland.d.ts.map +1 -1
- package/constants/tracking-events.d.ts +2 -0
- package/constants/tracking-events.d.ts.map +1 -1
- package/features/connector-cards/hooks/useUserAuthFlow.d.ts +10 -2
- package/features/connector-cards/hooks/useUserAuthFlow.d.ts.map +1 -1
- package/features/slack/components/SlackConnectModal.d.ts +4 -3
- package/features/slack/components/SlackConnectModal.d.ts.map +1 -1
- package/features/slack/components/SlackConversationTab.d.ts.map +1 -1
- package/features/slack/components/SlackReauthScreen.d.ts.map +1 -1
- package/features/write-form/api/getFormDefaultValues.d.ts +31 -19
- package/features/write-form/api/getFormDefaultValues.d.ts.map +1 -1
- package/features/write-form/components/write-form/index.d.ts.map +1 -1
- package/features/write-form/hooks/usePrefillPlacement.d.ts +32 -0
- package/features/write-form/hooks/usePrefillPlacement.d.ts.map +1 -0
- package/features/write-form/utils/charLimit.d.ts +11 -0
- package/features/write-form/utils/charLimit.d.ts.map +1 -0
- package/features/write-form/utils/prefillTaskProperties.d.ts +31 -0
- package/features/write-form/utils/prefillTaskProperties.d.ts.map +1 -0
- package/features/write-form/utils/prefillTracking.d.ts +18 -0
- package/features/write-form/utils/prefillTracking.d.ts.map +1 -0
- package/features/write-form/utils/prefillTruncation.d.ts +54 -0
- package/features/write-form/utils/prefillTruncation.d.ts.map +1 -0
- package/features/write-form/utils/response.d.ts.map +1 -1
- package/features/write-form/utils/summaryMaxChars.d.ts +36 -0
- package/features/write-form/utils/summaryMaxChars.d.ts.map +1 -0
- package/index.es.js +8928 -8823
- package/index.umd.js +473 -472
- package/package.json +1 -1
- package/testing/mocks/handlers/write-capability.d.ts.map +1 -1
- package/types/form.d.ts +1 -1
- package/types/form.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector-cards.d.ts","sourceRoot":"","sources":["../../src/app/connector-cards.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAkF,MAAM,OAAO,CAAC;AAqH3G,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"connector-cards.d.ts","sourceRoot":"","sources":["../../src/app/connector-cards.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAkF,MAAM,OAAO,CAAC;AAqH3G,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,SAAS,CAm6BxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HigSlackSection.d.ts","sourceRoot":"","sources":["../../../src/app/hig-slack/HigSlackSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"HigSlackSection.d.ts","sourceRoot":"","sources":["../../../src/app/hig-slack/HigSlackSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAgB9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAWjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AA4BpE,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD;yEACqE;IACrE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;8EAC0E;IAC1E,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;;;;kDAM8C;IAC9C,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAEF,oEAAoE;AACpE,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAua5D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAUpD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAe5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackConnectModalIsland.d.ts","sourceRoot":"","sources":["../../../src/app/omni-slack/SlackConnectModalIsland.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SlackConnectModalIsland.d.ts","sourceRoot":"","sources":["../../../src/app/omni-slack/SlackConnectModalIsland.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGpE,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;sEACkE;IAClE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;8DAC0D;IAC1D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAClE,sDAAsD;IACtD,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA0BpE,CAAC"}
|
|
@@ -56,6 +56,7 @@ export declare const FORM_ATTACHMENTS_SUBMITTED = "connector_form_attachments_su
|
|
|
56
56
|
export declare const CARD_ATTACHMENT_PREVIEW_FAILED = "connector_card_attachment_preview_failed";
|
|
57
57
|
export declare const SLACK_CONNECT_INITIATED = "slack_connect_initiated";
|
|
58
58
|
export declare const SLACK_CONNECT_SUCCESS = "slack_connect_success";
|
|
59
|
+
export declare const SLACK_CONNECT_FAILED = "slack_connect_failed";
|
|
59
60
|
export declare const SLACK_START_CLICKED = "slack_start_clicked";
|
|
60
61
|
export declare const SLACK_START_SUBOPTION_SELECTED = "slack_start_suboption_selected";
|
|
61
62
|
/**
|
|
@@ -80,4 +81,5 @@ export declare const SLACK_LINK_EXISTING_CLICKED = "slack_link_existing_clicked"
|
|
|
80
81
|
export declare const SLACK_EXISTING_THREAD_LINKED = "slack_existing_thread_linked";
|
|
81
82
|
export declare const SLACK_CONVERSATION_UNLINKED = "slack_conversation_unlinked";
|
|
82
83
|
export declare const SLACK_LINK_SWITCHED = "slack_link_switched";
|
|
84
|
+
export declare const PREFILL_VALUE_TRUNCATED = "Prefill Value Truncated";
|
|
83
85
|
//# sourceMappingURL=tracking-events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracking-events.d.ts","sourceRoot":"","sources":["../../src/constants/tracking-events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,gCAAgC,qCAAqC,CAAC;AACnF,eAAO,MAAM,8BAA8B,mCAAmC,CAAC;AAC/E,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AACvE,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,4BAA4B,2CAA2C,CAAC;AACrF,eAAO,MAAM,wBAAwB,kCAAkC,CA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AgC,CAAC;AAEzE,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,eAAO,MAAM,uBAAuB,4BAA4B,CAAC"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { IUserAuthEntry, UserAuthState } from '../store/userAuth';
|
|
2
2
|
interface UseUserAuthFlowOptions {
|
|
3
3
|
/**
|
|
4
|
-
* Called when
|
|
5
|
-
*
|
|
4
|
+
* Called once when a connect started by THIS instance's `connect()` lands
|
|
5
|
+
* in `connected` — even if this instance has unmounted by then. Typically
|
|
6
|
+
* used to retry the original failed API call, or to track the outcome.
|
|
6
7
|
*/
|
|
7
8
|
onConnected?: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Called once when a connect started by THIS instance's `connect()` leaves
|
|
11
|
+
* `in_progress` without connecting, with the failure reason
|
|
12
|
+
* (popup_closed, popup_blocked, in_progress_timeout, …) or the resolved
|
|
13
|
+
* state (reauth_required / workspace_mismatch) when there is no reason.
|
|
14
|
+
*/
|
|
15
|
+
onFailed?: (reason: string) => void;
|
|
8
16
|
}
|
|
9
17
|
interface UseUserAuthFlowReturn {
|
|
10
18
|
entry: IUserAuthEntry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUserAuthFlow.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/hooks/useUserAuthFlow.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"useUserAuthFlow.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/hooks/useUserAuthFlow.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAmC/F,UAAU,sBAAsB;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,UAAU,qBAAqB;IAC7B,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,qBAAqB,CAsPhH;AA8BD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,CASpG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG;IAAE,WAAW,EAAE,OAAO,CAAA;CAAE,CAMzF;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,kBAGd,MAAM,UAKvB"}
|
|
@@ -4,9 +4,10 @@ interface SlackConnectModalProps {
|
|
|
4
4
|
connectorId: string;
|
|
5
5
|
open: boolean;
|
|
6
6
|
onClose: () => void;
|
|
7
|
-
/** Fired once when
|
|
8
|
-
* host (outlook-ui) re-check auth status and swap
|
|
9
|
-
* button for the Slack tab.
|
|
7
|
+
/** Fired once when the connect started from this modal lands in
|
|
8
|
+
* `connected`. Lets a host (outlook-ui) re-check auth status and swap
|
|
9
|
+
* the pre-auth button for the Slack tab. Outcome tracking is the
|
|
10
|
+
* modal's own — hosts don't fire SLACK_CONNECT_SUCCESS. */
|
|
10
11
|
onConnected?: () => void;
|
|
11
12
|
/** Gainsight sink. Passed as a prop (not read from SlackContext)
|
|
12
13
|
* because the host-triggered <SlackConnectModalIsland> mounts this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackConnectModal.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackConnectModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"SlackConnectModal.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackConnectModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAuB,MAAM,OAAO,CAAC;AAUhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAgB/C,UAAU,sBAAsB;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;gEAG4D;IAC5D,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;gDAE4C;IAC5C,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CACnE;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAyGxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackConversationTab.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackConversationTab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA4C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SlackConversationTab.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackConversationTab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA4C,MAAM,OAAO,CAAC;AA+BrE,UAAU,yBAAyB;IACjC;;oDAEgD;IAChD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AA+CD,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAsgB9D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackReauthScreen.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackReauthScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAe,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAO/C,UAAU,sBAAsB;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CACnE;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"SlackReauthScreen.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackReauthScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAe,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAO/C,UAAU,sBAAsB;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CACnE;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAwCxD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -7,10 +7,17 @@ export interface GetFormDefaultQueryProps extends GetFormDefaultProps {
|
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
fetchOnMount?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export interface FormDefaultValuesData {
|
|
11
|
+
/** Resolved default value per field, as placed into the create form. */
|
|
12
|
+
values: Record<string, unknown>;
|
|
13
|
+
/** `system_default_fields` from the response; empty when nothing was injected. */
|
|
14
|
+
systemDefaultFields: string[];
|
|
15
|
+
}
|
|
16
|
+
export declare const fetchFormDefaultValues: ({ formId, conversationId, inboxIds }: GetFormDefaultProps) => Promise<FormDefaultValuesData>;
|
|
11
17
|
export declare const getFormDefaultValuesQuery: ({ formId, conversationId, inboxIds }: GetFormDefaultProps) => (string | number | (string | number)[] | undefined)[];
|
|
12
18
|
export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, inboxIds, enabled, fetchOnMount }: GetFormDefaultQueryProps) => {
|
|
13
|
-
data: Record<string, unknown
|
|
19
|
+
data: Record<string, unknown> | undefined;
|
|
20
|
+
systemDefaultFields: string[] | undefined;
|
|
14
21
|
error: Error;
|
|
15
22
|
isError: true;
|
|
16
23
|
isPending: false;
|
|
@@ -32,13 +39,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
|
|
|
32
39
|
isPaused: boolean;
|
|
33
40
|
isRefetching: boolean;
|
|
34
41
|
isStale: boolean;
|
|
35
|
-
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<
|
|
42
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
|
|
36
43
|
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
|
37
|
-
promise: Promise<
|
|
44
|
+
promise: Promise<FormDefaultValuesData>;
|
|
38
45
|
enabledRef: import('react').MutableRefObject<boolean>;
|
|
39
46
|
isNudgeRequired: boolean | undefined;
|
|
40
47
|
} | {
|
|
41
|
-
data: Record<string, unknown
|
|
48
|
+
data: Record<string, unknown> | undefined;
|
|
49
|
+
systemDefaultFields: string[] | undefined;
|
|
42
50
|
error: null;
|
|
43
51
|
isError: false;
|
|
44
52
|
isPending: false;
|
|
@@ -60,13 +68,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
|
|
|
60
68
|
isPaused: boolean;
|
|
61
69
|
isRefetching: boolean;
|
|
62
70
|
isStale: boolean;
|
|
63
|
-
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<
|
|
71
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
|
|
64
72
|
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
|
65
|
-
promise: Promise<
|
|
73
|
+
promise: Promise<FormDefaultValuesData>;
|
|
66
74
|
enabledRef: import('react').MutableRefObject<boolean>;
|
|
67
75
|
isNudgeRequired: boolean | undefined;
|
|
68
76
|
} | {
|
|
69
|
-
data: undefined;
|
|
77
|
+
data: Record<string, unknown> | undefined;
|
|
78
|
+
systemDefaultFields: string[] | undefined;
|
|
70
79
|
error: Error;
|
|
71
80
|
isError: true;
|
|
72
81
|
isPending: false;
|
|
@@ -88,13 +97,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
|
|
|
88
97
|
isPaused: boolean;
|
|
89
98
|
isRefetching: boolean;
|
|
90
99
|
isStale: boolean;
|
|
91
|
-
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<
|
|
100
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
|
|
92
101
|
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
|
93
|
-
promise: Promise<
|
|
102
|
+
promise: Promise<FormDefaultValuesData>;
|
|
94
103
|
enabledRef: import('react').MutableRefObject<boolean>;
|
|
95
104
|
isNudgeRequired: boolean | undefined;
|
|
96
105
|
} | {
|
|
97
|
-
data: undefined;
|
|
106
|
+
data: Record<string, unknown> | undefined;
|
|
107
|
+
systemDefaultFields: string[] | undefined;
|
|
98
108
|
error: null;
|
|
99
109
|
isError: false;
|
|
100
110
|
isPending: true;
|
|
@@ -116,13 +126,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
|
|
|
116
126
|
isPaused: boolean;
|
|
117
127
|
isRefetching: boolean;
|
|
118
128
|
isStale: boolean;
|
|
119
|
-
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<
|
|
129
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
|
|
120
130
|
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
|
121
|
-
promise: Promise<
|
|
131
|
+
promise: Promise<FormDefaultValuesData>;
|
|
122
132
|
enabledRef: import('react').MutableRefObject<boolean>;
|
|
123
133
|
isNudgeRequired: boolean | undefined;
|
|
124
134
|
} | {
|
|
125
|
-
data: undefined;
|
|
135
|
+
data: Record<string, unknown> | undefined;
|
|
136
|
+
systemDefaultFields: string[] | undefined;
|
|
126
137
|
error: null;
|
|
127
138
|
isError: false;
|
|
128
139
|
isPending: true;
|
|
@@ -144,13 +155,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
|
|
|
144
155
|
isPaused: boolean;
|
|
145
156
|
isRefetching: boolean;
|
|
146
157
|
isStale: boolean;
|
|
147
|
-
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<
|
|
158
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
|
|
148
159
|
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
|
149
|
-
promise: Promise<
|
|
160
|
+
promise: Promise<FormDefaultValuesData>;
|
|
150
161
|
enabledRef: import('react').MutableRefObject<boolean>;
|
|
151
162
|
isNudgeRequired: boolean | undefined;
|
|
152
163
|
} | {
|
|
153
|
-
data: Record<string, unknown
|
|
164
|
+
data: Record<string, unknown> | undefined;
|
|
165
|
+
systemDefaultFields: string[] | undefined;
|
|
154
166
|
isError: false;
|
|
155
167
|
error: null;
|
|
156
168
|
isPending: false;
|
|
@@ -172,9 +184,9 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
|
|
|
172
184
|
isPaused: boolean;
|
|
173
185
|
isRefetching: boolean;
|
|
174
186
|
isStale: boolean;
|
|
175
|
-
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<
|
|
187
|
+
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
|
|
176
188
|
fetchStatus: import('@tanstack/query-core').FetchStatus;
|
|
177
|
-
promise: Promise<
|
|
189
|
+
promise: Promise<FormDefaultValuesData>;
|
|
178
190
|
enabledRef: import('react').MutableRefObject<boolean>;
|
|
179
191
|
isNudgeRequired: boolean | undefined;
|
|
180
192
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFormDefaultValues.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/api/getFormDefaultValues.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"getFormDefaultValues.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/api/getFormDefaultValues.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AASD,MAAM,WAAW,qBAAqB;IACpC,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,kFAAkF;IAClF,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAKD,eAAO,MAAM,sBAAsB,yCAIhC,mBAAmB,KAAG,OAAO,CAAC,qBAAqB,CAyBrD,CAAC;AAEF,eAAO,MAAM,yBAAyB,yCAA0C,mBAAmB,0DAOlG,CAAC;AAEF,eAAO,MAAM,4BAA4B,gEAMtC,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/write-form/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/write-form/index.tsx"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAA+B,UAAU,EAAkB,MAAM,eAAe,CAAC;AAwB7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EAA+B,UAAU,EAAc,MAAM,cAAc,CAAC;AAGxF,eAAO,MAAM,iBAAiB,wCAAwC,CAAC;AAEvE,UAAU,cAAc;IACtB,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC;IACxE,cAAc,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/D,eAAe,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,iBAAiB,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1D;AACD,QAAA,MAAM,SAAS,gJAWZ,cAAc,4CA0+BhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PrefillLimitField } from '../utils/prefillTruncation';
|
|
2
|
+
import { ITrackingData } from '../../../context';
|
|
3
|
+
export interface UsePrefillPlacementProps {
|
|
4
|
+
/** The form's rendered fields; read at call time, so it may change freely. */
|
|
5
|
+
fields?: readonly PrefillLimitField[];
|
|
6
|
+
/** Identifies the form, so "once per truncated field" is scoped per form. */
|
|
7
|
+
formId?: string | number;
|
|
8
|
+
/** App (connector) name sent as `app`. */
|
|
9
|
+
app?: string;
|
|
10
|
+
conversationId?: number;
|
|
11
|
+
smIds?: (string | number)[];
|
|
12
|
+
sendTrackingEvent: (event: string, data?: ITrackingData) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Everything that sits between a resolved prefill value and the form state:
|
|
16
|
+
* title truncation, the "Prefill Value Truncated" event, and a record of the
|
|
17
|
+
* FINAL value placed in each prefilled field.
|
|
18
|
+
*
|
|
19
|
+
* `placedValuesRef.current` maps field name -> the value the form placed there
|
|
20
|
+
* (after variables resolved, truncation ran and, for summary fields, the summary
|
|
21
|
+
* was substituted). Comparing a submitted value with it tells a rep's edit apart
|
|
22
|
+
* from truncation or the summary arriving.
|
|
23
|
+
*
|
|
24
|
+
* `placeDefaults` / `placeValue` are stable (they read props through a ref), so
|
|
25
|
+
* they can sit in effect deps without re-running those effects.
|
|
26
|
+
*/
|
|
27
|
+
export declare const usePrefillPlacement: (props: UsePrefillPlacementProps) => {
|
|
28
|
+
placeDefaults: <T extends Record<string, unknown>>(values: T) => T;
|
|
29
|
+
placeValue: (name: string, value: string) => string;
|
|
30
|
+
placedValuesRef: import('react').MutableRefObject<Record<string, unknown>>;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=usePrefillPlacement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePrefillPlacement.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/hooks/usePrefillPlacement.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,iBAAiB,EAA0B,MAAM,4BAA4B,CAAC;AAGnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,wBAAwB;IACvC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACtC,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC5B,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CAClE;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,UAAW,wBAAwB;oBAwB9D,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,KAAG,CAAC;uBAW1C,MAAM,SAAS,MAAM,KAAG,MAAM;;CAUxC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A template character limit as a positive, finite number, or `undefined`.
|
|
3
|
+
*
|
|
4
|
+
* Templates are not consistent about the type: Jira and Asana declare
|
|
5
|
+
* `validations.maxCharacters` as a string (`"255"`, `"1000"`, `"250"`), while
|
|
6
|
+
* Linear, Trello and Monday use numbers. Both forms mean the same limit, so a
|
|
7
|
+
* numeric string is parsed. Empty / non-numeric strings and zero, negative or
|
|
8
|
+
* non-finite values mean "no limit".
|
|
9
|
+
*/
|
|
10
|
+
export declare const parseCharLimit: (value: unknown) => number | undefined;
|
|
11
|
+
//# sourceMappingURL=charLimit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charLimit.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/charLimit.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,MAAM,GAAG,SAYxD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type YesNo = 'Yes' | 'No';
|
|
2
|
+
export interface PrefillTaskProperties {
|
|
3
|
+
prefilled_fields: YesNo;
|
|
4
|
+
default_prefilled_fields: YesNo;
|
|
5
|
+
edited_prefilled_fields: YesNo;
|
|
6
|
+
}
|
|
7
|
+
export interface GetPrefillTaskPropertiesArgs {
|
|
8
|
+
/**
|
|
9
|
+
* Field name -> FINAL value the form placed (after variables resolved,
|
|
10
|
+
* truncation ran and the summary filled in). `undefined` when no prefill was
|
|
11
|
+
* placed for this form.
|
|
12
|
+
*/
|
|
13
|
+
placedValues?: Record<string, unknown>;
|
|
14
|
+
/** The form values the rep submitted. */
|
|
15
|
+
submittedValues: Record<string, unknown>;
|
|
16
|
+
/** Fields mapped to {{conversation_summary}}; the token itself never counts as an edit. */
|
|
17
|
+
summaryFieldNames?: string[];
|
|
18
|
+
/** `system_default_fields` from the `/default-values` response. */
|
|
19
|
+
systemDefaultFields?: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The prefill properties "PM Task Created" (NEW_OBJECT_CREATED_BY_FORM) carries.
|
|
23
|
+
*
|
|
24
|
+
* - `prefilled_fields`: at least one field was placed from `/default-values`.
|
|
25
|
+
* - `default_prefilled_fields`: that response listed system defaults.
|
|
26
|
+
* - `edited_prefilled_fields`: a submitted value differs from the value placed
|
|
27
|
+
* in the form. Truncation and the summary fill are part of the placed value,
|
|
28
|
+
* so neither counts as an edit.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getPrefillTaskProperties: ({ placedValues, submittedValues, summaryFieldNames, systemDefaultFields }: GetPrefillTaskPropertiesArgs) => PrefillTaskProperties;
|
|
31
|
+
//# sourceMappingURL=prefillTaskProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefillTaskProperties.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/prefillTaskProperties.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;AAEjC,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,KAAK,CAAC;IACxB,wBAAwB,EAAE,KAAK,CAAC;IAChC,uBAAuB,EAAE,KAAK,CAAC;CAChC;AAED,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,yCAAyC;IACzC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AA8BD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,8EAKlC,4BAA4B,KAAG,qBAajC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PrefillTrackingContext {
|
|
2
|
+
tenant?: string;
|
|
3
|
+
UG_Id?: string;
|
|
4
|
+
SM_id?: string[];
|
|
5
|
+
User_id?: string;
|
|
6
|
+
conversation_id?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The standard context every prefill analytics event carries (tenant, UG_Id,
|
|
10
|
+
* SM_id, User_id, conversation_id). Keys whose value is not available are left
|
|
11
|
+
* out rather than sent empty. Shared by "Prefill Value Truncated" and
|
|
12
|
+
* "PM Task Created".
|
|
13
|
+
*/
|
|
14
|
+
export declare const getPrefillTrackingContext: ({ conversationId, smIds }: {
|
|
15
|
+
conversationId?: number;
|
|
16
|
+
smIds?: (string | number)[];
|
|
17
|
+
}) => PrefillTrackingContext;
|
|
18
|
+
//# sourceMappingURL=prefillTracking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefillTracking.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/prefillTracking.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,8BAGnC;IACD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC7B,KAAG,sBASH,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const PREFILL_TRUNCATION_ELLIPSIS = "\u2026";
|
|
2
|
+
/**
|
|
3
|
+
* The slice of a form field the truncation needs. Structural on purpose, so both
|
|
4
|
+
* the raw `FieldListResponse` and the `@connector/ui` field configs satisfy it.
|
|
5
|
+
*/
|
|
6
|
+
export interface PrefillLimitField {
|
|
7
|
+
name: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
multiline?: boolean;
|
|
10
|
+
limit?: number | string | null;
|
|
11
|
+
validations?: {
|
|
12
|
+
maxCharacters?: number | string;
|
|
13
|
+
isUrl?: unknown;
|
|
14
|
+
isEmail?: unknown;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface PrefillTruncation {
|
|
18
|
+
field: string;
|
|
19
|
+
originalLength: number;
|
|
20
|
+
limit: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The field's character limit: `field.limit`, else `validations.maxCharacters`.
|
|
24
|
+
* A numeric string (`"255"`) is parsed; anything else non-positive is no limit.
|
|
25
|
+
*/
|
|
26
|
+
export declare const getPrefillFieldLimit: (field: PrefillLimitField) => number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Title-like = a single-line text input. Multiline (description) fields are not
|
|
29
|
+
* cut here; their summary is sized to fit instead. URL / email inputs are left
|
|
30
|
+
* alone too: a cut value would fail their format validation anyway, and a
|
|
31
|
+
* silently broken link is worse than the visible length error.
|
|
32
|
+
*/
|
|
33
|
+
export declare const isTitleLikeField: (field: PrefillLimitField) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Cuts `value` to exactly `limit` characters ending in "…" when it is longer
|
|
36
|
+
* than `limit`; returns it untouched otherwise. Never splits a surrogate pair
|
|
37
|
+
* (the result is then one character shorter, still within the limit).
|
|
38
|
+
*/
|
|
39
|
+
export declare const truncateToLimit: (value: string, limit: number) => string;
|
|
40
|
+
/**
|
|
41
|
+
* Applies title truncation to resolved prefill values (system defaults and
|
|
42
|
+
* admin-configured alike). Only string values of title-like fields that have a
|
|
43
|
+
* limit are touched. A value still carrying the `{{conversation_summary}}` token
|
|
44
|
+
* is skipped: it is not final yet, and cutting it could break the token. Run it
|
|
45
|
+
* again on that field once the summary has been substituted.
|
|
46
|
+
*
|
|
47
|
+
* Returns a new values object (the input is not mutated) and one entry per
|
|
48
|
+
* field that was shortened.
|
|
49
|
+
*/
|
|
50
|
+
export declare const truncatePrefillValues: <T extends Record<string, unknown>>(values: T, fields: readonly PrefillLimitField[]) => {
|
|
51
|
+
values: T;
|
|
52
|
+
truncations: PrefillTruncation[];
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=prefillTruncation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefillTruncation.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/prefillTruncation.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,2BAA2B,WAAM,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE;QACZ,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAChC,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UAAW,iBAAiB,KAAG,MAAM,GAAG,SACR,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,UAAW,iBAAiB,KAAG,OAC2C,CAAC;AAExG;;;;GAIG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,SAAS,MAAM,KAAG,MAM9D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAC7D,CAAC,UACD,SAAS,iBAAiB,EAAE,KACnC;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,WAAW,EAAE,iBAAiB,EAAE,CAAA;CAe/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAIlE,eAAO,MAAM,gBAAgB,UAAW,iBAAiB,cAAc,OAAO,CAAC,UAAU,CAAC,eA6HzF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const PERMALINK_LINE_PREFIX = "\nLinked Hiver conversation: ";
|
|
2
|
+
export declare const PERMALINK_URL_ALLOWANCE = 100;
|
|
3
|
+
export declare const PERMALINK_LINE_ALLOWANCE: number;
|
|
4
|
+
export declare const MIN_SUMMARY_MAX_CHARS = 50;
|
|
5
|
+
export interface ISummaryFieldConfig {
|
|
6
|
+
name: string;
|
|
7
|
+
limit?: number | string;
|
|
8
|
+
validations?: {
|
|
9
|
+
maxCharacters?: number | string;
|
|
10
|
+
} | Record<string, unknown>;
|
|
11
|
+
meta?: {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The field's character limit, from `limit` or `validations.maxCharacters`.
|
|
17
|
+
* Numeric strings (`"1000"`) are parsed; non-positive or non-numeric values are skipped.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getFieldCharLimit: (field?: ISummaryFieldConfig) => number | undefined;
|
|
20
|
+
export declare const hasAppendPermalink: (field?: ISummaryFieldConfig) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* `max_chars` for one summary field: the field limit, minus the rest of the
|
|
23
|
+
* resolved text around the token, minus the permalink line appended on submit
|
|
24
|
+
* when `appendPermalink` applies. If the token appears more than once, the
|
|
25
|
+
* remaining budget is split between the copies.
|
|
26
|
+
*
|
|
27
|
+
* Returns `undefined` when the field has no limit (no cap, as before), and never
|
|
28
|
+
* less than `MIN_SUMMARY_MAX_CHARS`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getSummaryMaxCharsForField: (field: ISummaryFieldConfig | undefined, value: string) => number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* One summary request feeds every mapped field, so the tightest per-field cap
|
|
33
|
+
* wins. `undefined` when none of the fields has a limit.
|
|
34
|
+
*/
|
|
35
|
+
export declare const getSummaryMaxChars: (fieldNames: string[], fields: ISummaryFieldConfig[] | undefined, defaults: Record<string, unknown> | null | undefined) => number | undefined;
|
|
36
|
+
//# sourceMappingURL=summaryMaxChars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summaryMaxChars.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/summaryMaxChars.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AAOrE,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,eAAO,MAAM,wBAAwB,QAAyD,CAAC;AAM/F,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5E,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACnC;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WAAY,mBAAmB,KAAG,MAAM,GAAG,SAMxE,CAAC;AAEF,eAAO,MAAM,kBAAkB,WAAY,mBAAmB,KAAG,OAGhE,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,UAC9B,mBAAmB,GAAG,SAAS,SAC/B,MAAM,KACZ,MAAM,GAAG,SAWX,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,eACjB,MAAM,EAAE,UACZ,mBAAmB,EAAE,GAAG,SAAS,YAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KACnD,MAAM,GAAG,SASX,CAAC"}
|