twenty-sdk 0.6.0 → 0.6.2
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/README.md +6 -2
- package/dist/{HtmlTagToRemoteComponent-DzQ2I9Lz.js → HtmlTagToRemoteComponent-CgtwxDeH.js} +11 -11
- package/dist/{HtmlTagToRemoteComponent-DBOkvIRB.mjs → HtmlTagToRemoteComponent-D_EW5OLu.mjs} +1743 -1640
- package/dist/cli/utilities/api/api-service.d.ts +4 -0
- package/dist/cli/utilities/build/common/esbuild-watcher.d.ts +5 -2
- package/dist/cli/utilities/build/common/typecheck-plugin.d.ts +1 -1
- package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +2 -0
- package/dist/cli/utilities/client/client-service.d.ts +5 -1
- package/dist/cli/utilities/client/twenty-client-template.d.ts +42 -0
- package/dist/cli/utilities/dev/orchestrator/dev-mode-orchestrator.d.ts +2 -0
- package/dist/cli/utilities/dev/orchestrator/steps/start-watchers-orchestrator-step.d.ts +2 -0
- package/dist/cli.cjs +430 -75
- package/dist/cli.mjs +3175 -2725
- package/dist/front-component-renderer/index.cjs +11 -11
- package/dist/front-component-renderer/index.d.ts +3 -3
- package/dist/front-component-renderer/index.mjs +2186 -1906
- package/dist/front-component-renderer/remote/generated/remote-components.d.ts +44 -0
- package/dist/front-component-renderer/remote/generated/remote-elements.d.ts +93 -0
- package/dist/front-component-renderer/types/FrontComponentHostCommunicationApi.d.ts +2 -1
- package/dist/{get-function-input-schema-BZ7_XyUh-GxSybvDe.js → get-function-input-schema-BZ7_XyUh-CCSi0u_q.js} +1 -1
- package/dist/{get-function-input-schema-BZ7_XyUh-By3UDh4s.mjs → get-function-input-schema-BZ7_XyUh-DAPandzB.mjs} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +122 -89
- package/dist/sdk/application/application-config.d.ts +1 -1
- package/dist/sdk/front-component-api/constants/AllowedHtmlElements.d.ts +1 -0
- package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js +104 -1
- package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js.map +1 -1
- package/dist/sdk/front-component-api/constants/EventToReact.js +22 -3
- package/dist/sdk/front-component-api/constants/EventToReact.js.map +1 -1
- package/dist/sdk/front-component-api/constants/SerializedEventData.d.ts +7 -0
- package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.d.ts +2 -0
- package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.js.map +1 -1
- package/dist/sdk/index.d.ts +3 -0
- package/dist/sdk/index.js +70 -66
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/logic-functions/define-post-install-logic-function.d.ts +6 -0
- package/dist/sdk/logic-functions/define-post-install-logic-function.js +12 -0
- package/dist/sdk/logic-functions/define-post-install-logic-function.js.map +1 -0
- package/dist/sdk/logic-functions/define-pre-install-logic-function.d.ts +6 -0
- package/dist/sdk/logic-functions/define-pre-install-logic-function.js +12 -0
- package/dist/sdk/logic-functions/define-pre-install-logic-function.js.map +1 -0
- package/dist/sdk/logic-functions/install-logic-function-payload-type.d.ts +4 -0
- package/generated/core/index.ts +406 -0
- package/generated/core/runtime/batcher.ts +265 -0
- package/generated/core/runtime/createClient.ts +68 -0
- package/generated/core/runtime/error.ts +29 -0
- package/generated/core/runtime/fetcher.ts +98 -0
- package/generated/core/runtime/generateGraphqlOperation.ts +225 -0
- package/generated/core/runtime/index.ts +13 -0
- package/generated/core/runtime/linkTypeMap.ts +139 -0
- package/generated/core/runtime/typeSelection.ts +98 -0
- package/generated/core/runtime/types.ts +69 -0
- package/generated/core/schema.graphql +36745 -0
- package/generated/core/schema.ts +39341 -0
- package/generated/core/types.ts +45860 -0
- package/generated/index.ts +2 -0
- package/generated/metadata/index.ts +469 -0
- package/generated/metadata/runtime/batcher.ts +265 -0
- package/generated/metadata/runtime/createClient.ts +68 -0
- package/generated/metadata/runtime/error.ts +29 -0
- package/generated/metadata/runtime/fetcher.ts +98 -0
- package/generated/metadata/runtime/generateGraphqlOperation.ts +225 -0
- package/generated/metadata/runtime/index.ts +13 -0
- package/generated/metadata/runtime/linkTypeMap.ts +139 -0
- package/generated/metadata/runtime/typeSelection.ts +98 -0
- package/generated/metadata/runtime/types.ts +69 -0
- package/generated/metadata/schema.graphql +3971 -0
- package/generated/metadata/schema.ts +8357 -0
- package/generated/metadata/types.ts +10044 -0
- package/package.json +17 -1
|
@@ -41,4 +41,48 @@ export declare const HtmlTh: import("@remote-dom/react").RemoteComponentTypeFrom
|
|
|
41
41
|
export declare const HtmlTd: import("@remote-dom/react").RemoteComponentTypeFromElementConstructor<import("@remote-dom/core/elements").RemoteElementConstructor<import("../../../front-component-renderer").HtmlTdProperties, Record<string, never>, Record<string, never>, import("../../../front-component-renderer").HtmlCommonEvents>>;
|
|
42
42
|
export declare const HtmlBr: import("@remote-dom/react").RemoteComponentTypeFromElementConstructor<import("@remote-dom/core/elements").RemoteElementConstructor<import("../../../front-component-renderer").HtmlCommonProperties, Record<string, never>, Record<string, never>, import("../../../front-component-renderer").HtmlCommonEvents>>;
|
|
43
43
|
export declare const HtmlHr: import("@remote-dom/react").RemoteComponentTypeFromElementConstructor<import("@remote-dom/core/elements").RemoteElementConstructor<import("../../../front-component-renderer").HtmlCommonProperties, Record<string, never>, Record<string, never>, import("../../../front-component-renderer").HtmlCommonEvents>>;
|
|
44
|
+
export declare const HtmlIframe: import("@remote-dom/react").RemoteComponentTypeFromElementConstructor<import("@remote-dom/core/elements").RemoteElementConstructor<import("../../../front-component-renderer").HtmlIframeProperties, Record<string, never>, Record<string, never>, import("../../../front-component-renderer").HtmlCommonEvents>>;
|
|
45
|
+
export declare const HtmlVideo: import("@remote-dom/react").RemoteComponentTypeFromElementConstructor<import("@remote-dom/core/elements").RemoteElementConstructor<import("../../../front-component-renderer").HtmlVideoProperties, Record<string, never>, Record<string, never>, import("../../../front-component-renderer").HtmlCommonEvents & {
|
|
46
|
+
timeupdate(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
47
|
+
play(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
48
|
+
pause(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
49
|
+
ended(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
50
|
+
loadedmetadata(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
51
|
+
loadeddata(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
52
|
+
volumechange(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
53
|
+
seeking(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
54
|
+
seeked(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
55
|
+
error(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
56
|
+
canplay(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
57
|
+
canplaythrough(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
58
|
+
waiting(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
59
|
+
progress(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
60
|
+
durationchange(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
61
|
+
ratechange(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
62
|
+
stalled(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
63
|
+
suspend(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
64
|
+
emptied(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
65
|
+
}>>;
|
|
66
|
+
export declare const HtmlAudio: import("@remote-dom/react").RemoteComponentTypeFromElementConstructor<import("@remote-dom/core/elements").RemoteElementConstructor<import("../../../front-component-renderer").HtmlAudioProperties, Record<string, never>, Record<string, never>, import("../../../front-component-renderer").HtmlCommonEvents & {
|
|
67
|
+
timeupdate(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
68
|
+
play(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
69
|
+
pause(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
70
|
+
ended(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
71
|
+
loadedmetadata(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
72
|
+
loadeddata(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
73
|
+
volumechange(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
74
|
+
seeking(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
75
|
+
seeked(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
76
|
+
error(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
77
|
+
canplay(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
78
|
+
canplaythrough(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
79
|
+
waiting(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
80
|
+
progress(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
81
|
+
durationchange(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
82
|
+
ratechange(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
83
|
+
stalled(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
84
|
+
suspend(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
85
|
+
emptied(event: import("@remote-dom/core/elements").RemoteEvent<import("../../../sdk/front-component-api").SerializedEventData, unknown>): void;
|
|
86
|
+
}>>;
|
|
87
|
+
export declare const HtmlSource: import("@remote-dom/react").RemoteComponentTypeFromElementConstructor<import("@remote-dom/core/elements").RemoteElementConstructor<import("../../../front-component-renderer").HtmlSourceProperties, Record<string, never>, Record<string, never>, import("../../../front-component-renderer").HtmlCommonEvents>>;
|
|
44
88
|
export declare const RemoteStyle: import("@remote-dom/react").RemoteComponentTypeFromElementConstructor<import("@remote-dom/core/elements").RemoteElementConstructor<import("./remote-elements").RemoteStyleProperties, Record<string, never>, Record<string, never>, Record<string, never>>>;
|
|
@@ -135,6 +135,95 @@ export type HtmlTdProperties = HtmlCommonProperties & {
|
|
|
135
135
|
export declare const HtmlTdElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlTdProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
|
|
136
136
|
export declare const HtmlBrElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlCommonProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
|
|
137
137
|
export declare const HtmlHrElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlCommonProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
|
|
138
|
+
export type HtmlIframeProperties = HtmlCommonProperties & {
|
|
139
|
+
src?: string;
|
|
140
|
+
name?: string;
|
|
141
|
+
width?: string;
|
|
142
|
+
height?: string;
|
|
143
|
+
allow?: string;
|
|
144
|
+
sandbox?: string;
|
|
145
|
+
allowFullScreen?: boolean;
|
|
146
|
+
loading?: string;
|
|
147
|
+
referrerPolicy?: string;
|
|
148
|
+
srcDoc?: string;
|
|
149
|
+
};
|
|
150
|
+
export declare const HtmlIframeElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlIframeProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
|
|
151
|
+
export type HtmlVideoProperties = HtmlCommonProperties & {
|
|
152
|
+
src?: string;
|
|
153
|
+
poster?: string;
|
|
154
|
+
controls?: boolean;
|
|
155
|
+
autoPlay?: boolean;
|
|
156
|
+
loop?: boolean;
|
|
157
|
+
muted?: boolean;
|
|
158
|
+
preload?: string;
|
|
159
|
+
width?: string;
|
|
160
|
+
height?: string;
|
|
161
|
+
crossOrigin?: string;
|
|
162
|
+
playsInline?: boolean;
|
|
163
|
+
disablePictureInPicture?: boolean;
|
|
164
|
+
disableRemotePlayback?: boolean;
|
|
165
|
+
};
|
|
166
|
+
export declare const HtmlVideoElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlVideoProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents & {
|
|
167
|
+
timeupdate(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
168
|
+
play(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
169
|
+
pause(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
170
|
+
ended(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
171
|
+
loadedmetadata(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
172
|
+
loadeddata(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
173
|
+
volumechange(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
174
|
+
seeking(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
175
|
+
seeked(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
176
|
+
error(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
177
|
+
canplay(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
178
|
+
canplaythrough(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
179
|
+
waiting(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
180
|
+
progress(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
181
|
+
durationchange(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
182
|
+
ratechange(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
183
|
+
stalled(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
184
|
+
suspend(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
185
|
+
emptied(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
186
|
+
}>;
|
|
187
|
+
export type HtmlAudioProperties = HtmlCommonProperties & {
|
|
188
|
+
src?: string;
|
|
189
|
+
controls?: boolean;
|
|
190
|
+
autoPlay?: boolean;
|
|
191
|
+
loop?: boolean;
|
|
192
|
+
muted?: boolean;
|
|
193
|
+
preload?: string;
|
|
194
|
+
crossOrigin?: string;
|
|
195
|
+
};
|
|
196
|
+
export declare const HtmlAudioElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlAudioProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents & {
|
|
197
|
+
timeupdate(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
198
|
+
play(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
199
|
+
pause(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
200
|
+
ended(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
201
|
+
loadedmetadata(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
202
|
+
loadeddata(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
203
|
+
volumechange(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
204
|
+
seeking(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
205
|
+
seeked(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
206
|
+
error(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
207
|
+
canplay(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
208
|
+
canplaythrough(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
209
|
+
waiting(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
210
|
+
progress(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
211
|
+
durationchange(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
212
|
+
ratechange(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
213
|
+
stalled(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
214
|
+
suspend(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
215
|
+
emptied(event: RemoteEvent<SerializedEventData, unknown>): void;
|
|
216
|
+
}>;
|
|
217
|
+
export type HtmlSourceProperties = HtmlCommonProperties & {
|
|
218
|
+
src?: string;
|
|
219
|
+
type?: string;
|
|
220
|
+
media?: string;
|
|
221
|
+
srcSet?: string;
|
|
222
|
+
sizes?: string;
|
|
223
|
+
width?: number;
|
|
224
|
+
height?: number;
|
|
225
|
+
};
|
|
226
|
+
export declare const HtmlSourceElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlSourceProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
|
|
138
227
|
export type RemoteStyleProperties = {
|
|
139
228
|
cssText?: string;
|
|
140
229
|
styleKey?: string;
|
|
@@ -186,6 +275,10 @@ declare global {
|
|
|
186
275
|
'html-td': InstanceType<typeof HtmlTdElement>;
|
|
187
276
|
'html-br': InstanceType<typeof HtmlBrElement>;
|
|
188
277
|
'html-hr': InstanceType<typeof HtmlHrElement>;
|
|
278
|
+
'html-iframe': InstanceType<typeof HtmlIframeElement>;
|
|
279
|
+
'html-video': InstanceType<typeof HtmlVideoElement>;
|
|
280
|
+
'html-audio': InstanceType<typeof HtmlAudioElement>;
|
|
281
|
+
'html-source': InstanceType<typeof HtmlSourceElement>;
|
|
189
282
|
'remote-style': InstanceType<typeof RemoteStyleElement>;
|
|
190
283
|
'remote-root': InstanceType<typeof RemoteRootElement>;
|
|
191
284
|
'remote-fragment': InstanceType<typeof RemoteFragmentElement>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type CloseSidePanelFunction, type EnqueueSnackbarFunction, type NavigateFunction, type OpenSidePanelPageFunction, type UnmountFrontComponentFunction } from '../../sdk/front-component-api/globals/frontComponentHostCommunicationApi';
|
|
1
|
+
import { type CloseSidePanelFunction, type EnqueueSnackbarFunction, type NavigateFunction, type OpenSidePanelPageFunction, type RequestAccessTokenRefreshFunction, type UnmountFrontComponentFunction } from '../../sdk/front-component-api/globals/frontComponentHostCommunicationApi';
|
|
2
2
|
export type FrontComponentHostCommunicationApi = {
|
|
3
3
|
navigate: NavigateFunction;
|
|
4
|
+
requestAccessTokenRefresh: RequestAccessTokenRefreshFunction;
|
|
4
5
|
openSidePanelPage: OpenSidePanelPageFunction;
|
|
5
6
|
unmountFrontComponent: UnmountFrontComponentFunction;
|
|
6
7
|
enqueueSnackbar: EnqueueSnackbarFunction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("typescript"),o=require("./HtmlTagToRemoteComponent-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("typescript"),o=require("./HtmlTagToRemoteComponent-CgtwxDeH.js"),c=n=>{switch(n.kind){case e.SyntaxKind.NumberKeyword:return{type:"number"};case e.SyntaxKind.StringKeyword:return{type:"string"};case e.SyntaxKind.BooleanKeyword:return{type:"boolean"};case e.SyntaxKind.ArrayType:return{type:"array",items:c(n.elementType)};case e.SyntaxKind.ObjectKeyword:return{type:"object"};case e.SyntaxKind.TypeLiteral:{const i={};return n.members.forEach(t=>{if(o.o(t.name)&&o.o(t.type)){const r=t.name.text;i[r]=c(t.type)}}),{type:"object",properties:i}}case e.SyntaxKind.UnionType:{const i=n,t=[];let r=!0;return i.types.forEach(a=>{if(a.kind===e.SyntaxKind.LiteralType){const y=a.literal;y.kind===e.SyntaxKind.StringLiteral?t.push(y.text):r=!1}else r=!1}),r?{type:"string",enum:t}:{}}default:return{}}},d=(n,i)=>n.parameters.reduce((t,r)=>{const a=r.type;return o.o(a)?[...t,c(a)]:[...t,{}]},i),s=n=>n.kind===e.SyntaxKind.FunctionDeclaration?[n]:n.kind===e.SyntaxKind.VariableStatement?n.declarationList.declarations.filter(i=>o.o(i.initializer)&&i.initializer.kind===e.SyntaxKind.ArrowFunction).map(i=>i.initializer):[],l=n=>{const i=e.createSourceFile("temp.ts",n,e.ScriptTarget.ESNext,!0);let t=[];return i.forEachChild(r=>{(r.kind===e.SyntaxKind.FunctionDeclaration||r.kind===e.SyntaxKind.VariableStatement)&&s(r).forEach(a=>{t=d(a,t)})}),t};exports.getFunctionInputSchema=l;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSourceFile as p, ScriptTarget as l, SyntaxKind as t } from "typescript";
|
|
2
|
-
import { o } from "./HtmlTagToRemoteComponent-
|
|
2
|
+
import { o } from "./HtmlTagToRemoteComponent-D_EW5OLu.mjs";
|
|
3
3
|
const c = (r) => {
|
|
4
4
|
switch (r.kind) {
|
|
5
5
|
case t.NumberKeyword:
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@sniptt/guards"),p=require("react"),a=require("./HtmlTagToRemoteComponent-DzQ2I9Lz.js"),c=({config:e,errors:t=[]})=>({success:t.length===0,config:e,errors:t}),G=e=>{const t=[];return e.universalIdentifier||t.push("Application must have a universalIdentifier"),e.defaultRoleUniversalIdentifier||t.push("Application must have a defaultRoleUniversalIdentifier"),(!e.displayName||e.displayName.length===0)&&t.push("Application must have a non empty display name"),c({config:e,errors:t})},q=e=>{const t=[];return e.universalIdentifier||t.push("Front component must have a universalIdentifier"),e.component||t.push("Front component must have a component"),typeof e.component!="function"&&t.push("Front component component must be a React component"),e.command&&(e.command.universalIdentifier||t.push("Command must have a universalIdentifier"),e.command.label||t.push("Command must have a label")),c({config:e,errors:t})};var v=(e=>(e.DAY="DAY",e.MONTH="MONTH",e.QUARTER="QUARTER",e.YEAR="YEAR",e.WEEK="WEEK",e.DAY_OF_THE_WEEK="DAY_OF_THE_WEEK",e.MONTH_OF_THE_YEAR="MONTH_OF_THE_YEAR",e.QUARTER_OF_THE_YEAR="QUARTER_OF_THE_YEAR",e.NONE="NONE",e))(v||{});const g=e=>{if(!e)return[];const t=[];for(const n of e)y.isNonEmptyString(n.label)||t.push("Field must have a label"),y.isNonEmptyString(n.name)||t.push(`Field "${n.label}" must have a name`),y.isNonEmptyString(n.universalIdentifier)||t.push(`Field "${n.label}" must have a universalIdentifier`),(n.type===a.R.SELECT||n.type===a.R.MULTI_SELECT)&&(!Array.isArray(n.options)||n.options.length===0)&&t.push(`Field "${n.label}" is a SELECT/MULTI_SELECT type and must have options`);return t},Q=e=>{const t=[];e.objectUniversalIdentifier||t.push("Field must have an objectUniversalIdentifier");const n=g([e]);return t.push(...n),c({config:e,errors:t})},$=e=>{const t=[];return e.universalIdentifier||t.push("Logic function must have a universalIdentifier"),e.handler||t.push("Logic function must have a handler"),typeof e.handler!="function"&&t.push("Logic function handler must be a function"),e.httpRouteTriggerSettings&&(e.httpRouteTriggerSettings.path||t.push("Route trigger must have a path"),e.httpRouteTriggerSettings.httpMethod||t.push("Route trigger must have an httpMethod")),e.cronTriggerSettings&&(e.cronTriggerSettings.pattern||t.push("Cron trigger must have a pattern")),e.databaseEventTriggerSettings&&(e.databaseEventTriggerSettings.eventName||t.push("Database event trigger must have an eventName")),c({config:e,errors:t})},X=e=>{const t=[];return e.universalIdentifier||t.push("NavigationMenuItem must have a universalIdentifier"),typeof e.position!="number"&&t.push("NavigationMenuItem must have a position"),c({config:e,errors:t})},J=e=>{const t=[];e.universalIdentifier||t.push("Object must have a universalIdentifier"),e.nameSingular||t.push("Object must have a nameSingular"),e.namePlural||t.push("Object must have a namePlural"),e.labelSingular||t.push("Object must have a labelSingular"),e.labelPlural||t.push("Object must have a labelPlural");const n=g(e.fields);return t.push(...n),a.o(e.labelIdentifierFieldMetadataUniversalIdentifier)&&!e.fields.some(s=>s.universalIdentifier===e.labelIdentifierFieldMetadataUniversalIdentifier)&&t.push("labelIdentifierFieldMetadataUniversalIdentifier must reference a field defined in the fields array"),c({config:e,errors:t})},z=e=>{const t=[];if(e.universalIdentifier||t.push("PageLayout must have a universalIdentifier"),e.name||t.push("PageLayout must have a name"),e.tabs){for(const n of e.tabs)if(n.universalIdentifier||t.push("PageLayoutTab must have a universalIdentifier"),n.title||t.push("PageLayoutTab must have a title"),n.widgets)for(const s of n.widgets)s.universalIdentifier||t.push("PageLayoutWidget must have a universalIdentifier"),s.title||t.push("PageLayoutWidget must have a title"),s.type||t.push("PageLayoutWidget must have a type")}return c({config:e,errors:t})},Z=e=>{const t=[];if(e.universalIdentifier||t.push("Role must have a universalIdentifier"),e.label||t.push("Role must have a label"),e.objectPermissions)for(const n of e.objectPermissions)n.objectUniversalIdentifier||t.push("Object permission must have an objectUniversalIdentifier");if(e.fieldPermissions)for(const n of e.fieldPermissions)n.objectUniversalIdentifier||t.push("Field permission must have an objectUniversalIdentifier"),n.fieldUniversalIdentifier||t.push("Field permission must have a fieldUniversalIdentifier");return c({config:e,errors:t})};v.DAY,v.WEEK,v.MONTH,v.QUARTER,v.YEAR;var w=(e=>(e.API_KEYS_AND_WEBHOOKS="API_KEYS_AND_WEBHOOKS",e.WORKSPACE="WORKSPACE",e.WORKSPACE_MEMBERS="WORKSPACE_MEMBERS",e.ROLES="ROLES",e.DATA_MODEL="DATA_MODEL",e.SECURITY="SECURITY",e.WORKFLOWS="WORKFLOWS",e.IMPERSONATE="IMPERSONATE",e.SSO_BYPASS="SSO_BYPASS",e.APPLICATIONS="APPLICATIONS",e.MARKETPLACE_APPS="MARKETPLACE_APPS",e.LAYOUTS="LAYOUTS",e.BILLING="BILLING",e.AI_SETTINGS="AI_SETTINGS",e.AI="AI",e.VIEWS="VIEWS",e.UPLOAD_FILE="UPLOAD_FILE",e.DOWNLOAD_FILE="DOWNLOAD_FILE",e.SEND_EMAIL_TOOL="SEND_EMAIL_TOOL",e.HTTP_REQUEST_TOOL="HTTP_REQUEST_TOOL",e.CODE_INTERPRETER_TOOL="CODE_INTERPRETER_TOOL",e.IMPORT_CSV="IMPORT_CSV",e.EXPORT_CSV="EXPORT_CSV",e.CONNECTED_ACCOUNTS="CONNECTED_ACCOUNTS",e.PROFILE_INFORMATION="PROFILE_INFORMATION",e))(w||{});const ee=e=>{const t=[];return e.universalIdentifier||t.push("Skill must have a universalIdentifier"),e.name||t.push("Skill must have a name"),e.label||t.push("Skill must have a label"),e.content||t.push("Skill must have content"),c({config:e,errors:t})},te=e=>{const t=[];if(e.universalIdentifier||t.push("View must have a universalIdentifier"),e.name||t.push("View must have a name"),e.objectUniversalIdentifier||t.push("View must have an objectUniversalIdentifier"),e.fields)for(const n of e.fields)n.universalIdentifier||t.push("ViewField must have a universalIdentifier"),n.fieldMetadataUniversalIdentifier||t.push("ViewField must have a fieldMetadataUniversalIdentifier");if(e.filters)for(const n of e.filters)n.universalIdentifier||t.push("ViewFilter must have a universalIdentifier"),n.fieldMetadataUniversalIdentifier||t.push("ViewFilter must have a fieldMetadataUniversalIdentifier");if(e.filterGroups)for(const n of e.filterGroups)n.universalIdentifier||t.push("ViewFilterGroup must have a universalIdentifier");if(e.groups)for(const n of e.groups)n.universalIdentifier||t.push("ViewGroup must have a universalIdentifier");if(e.fieldGroups)for(const n of e.fieldGroups)n.universalIdentifier||t.push("ViewFieldGroup must have a universalIdentifier");return c({config:e,errors:t})},ne="__twentySdkExecutionContext__",R="__twentySdkContextListeners__",D=()=>(globalThis[R]||(globalThis[R]=new Set),globalThis[R]),N=()=>globalThis[ne],ie=e=>{D().add(e)},re=e=>{D().delete(e)},se=()=>{const e=a.frontComponentHostCommunicationApi.closeSidePanel;if(!a.o(e))throw new Error("closeSidePanelFunction is not set");return e()},I=e=>{const t=a.frontComponentHostCommunicationApi.enqueueSnackbar;if(!a.o(t))throw new Error("enqueueSnackbarFunction is not set");return t(e)},x=(e,t,n,s)=>{const l=a.frontComponentHostCommunicationApi.navigate;if(!a.o(l))throw new Error("navigateFunction is not set");return l(e,t,n,s)},U=e=>{const t=a.frontComponentHostCommunicationApi.openSidePanelPage;if(!a.o(t))throw new Error("openSidePanelPageFunction is not set");return t(e)},C=()=>{const e=a.frontComponentHostCommunicationApi.unmountFrontComponent;if(!a.o(e))throw new Error("unmountFrontComponentFunction is not set");return e()},P=e=>{const[t,n]=p.useState(()=>e(N())),s=p.useRef(t);return p.useEffect(()=>{const l=()=>{const r=e(N());r!==s.current&&(s.current=r,n(r))};return ie(l),l(),()=>re(l)},[e]),t},oe=e=>e.frontComponentId,b=()=>P(oe),ae=e=>e.userId,ue=()=>P(ae),A=e=>`${e}-action-error`,le=["click","dblclick","mousedown","mouseup","mouseover","mouseout","mouseenter","mouseleave","keydown","keyup","keypress","focus","blur","change","input","submit","scroll","wheel","contextmenu","drag"],ce={click:"onClick",dblclick:"onDoubleClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",keydown:"onKeyDown",keyup:"onKeyUp",keypress:"onKeyPress",focus:"onFocus",blur:"onBlur",change:"onChange",input:"onInput",submit:"onSubmit",scroll:"onScroll",wheel:"onWheel",contextmenu:"onContextMenu",drag:"onDrag"},de={id:{type:"string",optional:!0},className:{type:"string",optional:!0},style:{type:"string",optional:!0},title:{type:"string",optional:!0},tabIndex:{type:"number",optional:!0},role:{type:"string",optional:!0},"aria-label":{type:"string",optional:!0},"aria-hidden":{type:"boolean",optional:!0},"data-testid":{type:"string",optional:!0}},pe=({execute:e})=>{const[t,n]=p.useState(!1),s=b();return p.useEffect(()=>{if(t)return;n(!0),(async()=>{try{await e()}catch(r){r instanceof Error&&await I({message:"Action failed",detailedMessage:r.message,variant:"error",dedupeKey:A(s)})}finally{await C()}})()},[e,t,s]),null},fe=({to:e,params:t,queryParams:n,options:s})=>{const[l,r]=p.useState(!1),h=b();return p.useEffect(()=>{if(l)return;r(!0),(async()=>{try{await x(e,t,n,s)}catch(S){S instanceof Error&&await I({message:"Action failed",detailedMessage:S.message,variant:"error",dedupeKey:A(h)})}finally{await C()}})()},[e,t,n,s,l,h]),null},he=({page:e,pageTitle:t,pageIcon:n,onClick:s,shouldResetSearchState:l=!1})=>{const[r,h]=p.useState(!1),E=b();return p.useEffect(()=>{if(r)return;h(!0),(async()=>{s?.();try{await U({page:e,pageTitle:t,pageIcon:n,shouldResetSearchState:l})}catch(O){O instanceof Error&&await I({message:"Action failed",detailedMessage:O.message,variant:"error",dedupeKey:A(E)})}finally{await C()}})()},[e,t,n,l,s,r,E]),null};class me{constructor(t){this.cssText=t}}class ve extends Array{item(t){return this[t]??null}}class Ee{constructor(t){this.cssRules=new ve,this.onChange=t}insertRule(t,n){const s=n??this.cssRules.length;return this.cssRules.splice(s,0,new me(t)),this.notify(),s}deleteRule(t){this.cssRules.splice(t,1),this.notify()}notify(){const t=this.cssRules.map(n=>n.cssText).join(`
|
|
2
|
-
`);this.onChange(t)}}const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@sniptt/guards"),p=require("react"),a=require("./HtmlTagToRemoteComponent-CgtwxDeH.js"),d=({config:e,errors:t=[]})=>({success:t.length===0,config:e,errors:t}),G=e=>{const t=[];return e.universalIdentifier||t.push("Application must have a universalIdentifier"),e.defaultRoleUniversalIdentifier||t.push("Application must have a defaultRoleUniversalIdentifier"),(!e.displayName||e.displayName.length===0)&&t.push("Application must have a non empty display name"),d({config:e,errors:t})},q=e=>{const t=[];return e.universalIdentifier||t.push("Front component must have a universalIdentifier"),e.component||t.push("Front component must have a component"),typeof e.component!="function"&&t.push("Front component component must be a React component"),e.command&&(e.command.universalIdentifier||t.push("Command must have a universalIdentifier"),e.command.label||t.push("Command must have a label")),d({config:e,errors:t})};var v=(e=>(e.DAY="DAY",e.MONTH="MONTH",e.QUARTER="QUARTER",e.YEAR="YEAR",e.WEEK="WEEK",e.DAY_OF_THE_WEEK="DAY_OF_THE_WEEK",e.MONTH_OF_THE_YEAR="MONTH_OF_THE_YEAR",e.QUARTER_OF_THE_YEAR="QUARTER_OF_THE_YEAR",e.NONE="NONE",e))(v||{});const _=e=>{if(!e)return[];const t=[];for(const n of e)y.isNonEmptyString(n.label)||t.push("Field must have a label"),y.isNonEmptyString(n.name)||t.push(`Field "${n.label}" must have a name`),y.isNonEmptyString(n.universalIdentifier)||t.push(`Field "${n.label}" must have a universalIdentifier`),(n.type===a.R.SELECT||n.type===a.R.MULTI_SELECT)&&(!Array.isArray(n.options)||n.options.length===0)&&t.push(`Field "${n.label}" is a SELECT/MULTI_SELECT type and must have options`);return t},Q=e=>{const t=[];e.objectUniversalIdentifier||t.push("Field must have an objectUniversalIdentifier");const n=_([e]);return t.push(...n),d({config:e,errors:t})},$=e=>{const t=[];return e.universalIdentifier||t.push("Logic function must have a universalIdentifier"),e.handler||t.push("Logic function must have a handler"),typeof e.handler!="function"&&t.push("Logic function handler must be a function"),e.httpRouteTriggerSettings&&(e.httpRouteTriggerSettings.path||t.push("Route trigger must have a path"),e.httpRouteTriggerSettings.httpMethod||t.push("Route trigger must have an httpMethod")),e.cronTriggerSettings&&(e.cronTriggerSettings.pattern||t.push("Cron trigger must have a pattern")),e.databaseEventTriggerSettings&&(e.databaseEventTriggerSettings.eventName||t.push("Database event trigger must have an eventName")),d({config:e,errors:t})},X=e=>{const t=[];return e.universalIdentifier||t.push("Pre install logic function must have a universalIdentifier"),e.handler||t.push("Pre install logic function must have a handler"),typeof e.handler!="function"&&t.push("Pre install logic function handler must be a function"),d({config:e,errors:t})},J=e=>{const t=[];return e.universalIdentifier||t.push("Post install logic function must have a universalIdentifier"),e.handler||t.push("Post install logic function must have a handler"),typeof e.handler!="function"&&t.push("Post install logic function handler must be a function"),d({config:e,errors:t})},z=e=>{const t=[];return e.universalIdentifier||t.push("NavigationMenuItem must have a universalIdentifier"),typeof e.position!="number"&&t.push("NavigationMenuItem must have a position"),d({config:e,errors:t})},Z=e=>{const t=[];e.universalIdentifier||t.push("Object must have a universalIdentifier"),e.nameSingular||t.push("Object must have a nameSingular"),e.namePlural||t.push("Object must have a namePlural"),e.labelSingular||t.push("Object must have a labelSingular"),e.labelPlural||t.push("Object must have a labelPlural");const n=_(e.fields);return t.push(...n),a.o(e.labelIdentifierFieldMetadataUniversalIdentifier)&&!e.fields.some(o=>o.universalIdentifier===e.labelIdentifierFieldMetadataUniversalIdentifier)&&t.push("labelIdentifierFieldMetadataUniversalIdentifier must reference a field defined in the fields array"),d({config:e,errors:t})},ee=e=>{const t=[];if(e.universalIdentifier||t.push("PageLayout must have a universalIdentifier"),e.name||t.push("PageLayout must have a name"),e.tabs){for(const n of e.tabs)if(n.universalIdentifier||t.push("PageLayoutTab must have a universalIdentifier"),n.title||t.push("PageLayoutTab must have a title"),n.widgets)for(const o of n.widgets)o.universalIdentifier||t.push("PageLayoutWidget must have a universalIdentifier"),o.title||t.push("PageLayoutWidget must have a title"),o.type||t.push("PageLayoutWidget must have a type")}return d({config:e,errors:t})},te=e=>{const t=[];if(e.universalIdentifier||t.push("Role must have a universalIdentifier"),e.label||t.push("Role must have a label"),e.objectPermissions)for(const n of e.objectPermissions)n.objectUniversalIdentifier||t.push("Object permission must have an objectUniversalIdentifier");if(e.fieldPermissions)for(const n of e.fieldPermissions)n.objectUniversalIdentifier||t.push("Field permission must have an objectUniversalIdentifier"),n.fieldUniversalIdentifier||t.push("Field permission must have a fieldUniversalIdentifier");return d({config:e,errors:t})};v.DAY,v.WEEK,v.MONTH,v.QUARTER,v.YEAR;var w=(e=>(e.API_KEYS_AND_WEBHOOKS="API_KEYS_AND_WEBHOOKS",e.WORKSPACE="WORKSPACE",e.WORKSPACE_MEMBERS="WORKSPACE_MEMBERS",e.ROLES="ROLES",e.DATA_MODEL="DATA_MODEL",e.SECURITY="SECURITY",e.WORKFLOWS="WORKFLOWS",e.IMPERSONATE="IMPERSONATE",e.SSO_BYPASS="SSO_BYPASS",e.APPLICATIONS="APPLICATIONS",e.MARKETPLACE_APPS="MARKETPLACE_APPS",e.LAYOUTS="LAYOUTS",e.BILLING="BILLING",e.AI_SETTINGS="AI_SETTINGS",e.AI="AI",e.VIEWS="VIEWS",e.UPLOAD_FILE="UPLOAD_FILE",e.DOWNLOAD_FILE="DOWNLOAD_FILE",e.SEND_EMAIL_TOOL="SEND_EMAIL_TOOL",e.HTTP_REQUEST_TOOL="HTTP_REQUEST_TOOL",e.CODE_INTERPRETER_TOOL="CODE_INTERPRETER_TOOL",e.IMPORT_CSV="IMPORT_CSV",e.EXPORT_CSV="EXPORT_CSV",e.CONNECTED_ACCOUNTS="CONNECTED_ACCOUNTS",e.PROFILE_INFORMATION="PROFILE_INFORMATION",e))(w||{});const ne=e=>{const t=[];return e.universalIdentifier||t.push("Skill must have a universalIdentifier"),e.name||t.push("Skill must have a name"),e.label||t.push("Skill must have a label"),e.content||t.push("Skill must have content"),d({config:e,errors:t})},ie=e=>{const t=[];if(e.universalIdentifier||t.push("View must have a universalIdentifier"),e.name||t.push("View must have a name"),e.objectUniversalIdentifier||t.push("View must have an objectUniversalIdentifier"),e.fields)for(const n of e.fields)n.universalIdentifier||t.push("ViewField must have a universalIdentifier"),n.fieldMetadataUniversalIdentifier||t.push("ViewField must have a fieldMetadataUniversalIdentifier");if(e.filters)for(const n of e.filters)n.universalIdentifier||t.push("ViewFilter must have a universalIdentifier"),n.fieldMetadataUniversalIdentifier||t.push("ViewFilter must have a fieldMetadataUniversalIdentifier");if(e.filterGroups)for(const n of e.filterGroups)n.universalIdentifier||t.push("ViewFilterGroup must have a universalIdentifier");if(e.groups)for(const n of e.groups)n.universalIdentifier||t.push("ViewGroup must have a universalIdentifier");if(e.fieldGroups)for(const n of e.fieldGroups)n.universalIdentifier||t.push("ViewFieldGroup must have a universalIdentifier");return d({config:e,errors:t})},re="__twentySdkExecutionContext__",P="__twentySdkContextListeners__",D=()=>(globalThis[P]||(globalThis[P]=new Set),globalThis[P]),N=()=>globalThis[re],oe=e=>{D().add(e)},se=e=>{D().delete(e)},ae=()=>{const e=a.frontComponentHostCommunicationApi.closeSidePanel;if(!a.o(e))throw new Error("closeSidePanelFunction is not set");return e()},T=e=>{const t=a.frontComponentHostCommunicationApi.enqueueSnackbar;if(!a.o(t))throw new Error("enqueueSnackbarFunction is not set");return t(e)},x=(e,t,n,o)=>{const l=a.frontComponentHostCommunicationApi.navigate;if(!a.o(l))throw new Error("navigateFunction is not set");return l(e,t,n,o)},U=e=>{const t=a.frontComponentHostCommunicationApi.openSidePanelPage;if(!a.o(t))throw new Error("openSidePanelPageFunction is not set");return t(e)},C=()=>{const e=a.frontComponentHostCommunicationApi.unmountFrontComponent;if(!a.o(e))throw new Error("unmountFrontComponentFunction is not set");return e()},R=e=>{const[t,n]=p.useState(()=>e(N())),o=p.useRef(t);return p.useEffect(()=>{const l=()=>{const r=e(N());r!==o.current&&(o.current=r,n(r))};return oe(l),l(),()=>se(l)},[e]),t},ue=e=>e.frontComponentId,b=()=>R(ue),le=e=>e.userId,de=()=>R(le),g=e=>`${e}-action-error`,ce=["click","dblclick","mousedown","mouseup","mouseover","mouseout","mouseenter","mouseleave","keydown","keyup","keypress","focus","blur","change","input","submit","scroll","wheel","contextmenu","drag"],pe={click:"onClick",dblclick:"onDoubleClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",keydown:"onKeyDown",keyup:"onKeyUp",keypress:"onKeyPress",focus:"onFocus",blur:"onBlur",change:"onChange",input:"onInput",submit:"onSubmit",scroll:"onScroll",wheel:"onWheel",contextmenu:"onContextMenu",drag:"onDrag",timeupdate:"onTimeUpdate",play:"onPlay",pause:"onPause",ended:"onEnded",loadedmetadata:"onLoadedMetadata",loadeddata:"onLoadedData",volumechange:"onVolumeChange",seeking:"onSeeking",seeked:"onSeeked",error:"onError",canplay:"onCanPlay",canplaythrough:"onCanPlayThrough",waiting:"onWaiting",progress:"onProgress",durationchange:"onDurationChange",ratechange:"onRateChange",stalled:"onStalled",suspend:"onSuspend",emptied:"onEmptied"},fe={id:{type:"string",optional:!0},className:{type:"string",optional:!0},style:{type:"string",optional:!0},title:{type:"string",optional:!0},tabIndex:{type:"number",optional:!0},role:{type:"string",optional:!0},"aria-label":{type:"string",optional:!0},"aria-hidden":{type:"boolean",optional:!0},"data-testid":{type:"string",optional:!0}},he=({execute:e})=>{const[t,n]=p.useState(!1),o=b();return p.useEffect(()=>{if(t)return;n(!0),(async()=>{try{await e()}catch(r){r instanceof Error&&await T({message:"Action failed",detailedMessage:r.message,variant:"error",dedupeKey:g(o)})}finally{await C()}})()},[e,t,o]),null},me=({to:e,params:t,queryParams:n,options:o})=>{const[l,r]=p.useState(!1),h=b();return p.useEffect(()=>{if(l)return;r(!0),(async()=>{try{await x(e,t,n,o)}catch(S){S instanceof Error&&await T({message:"Action failed",detailedMessage:S.message,variant:"error",dedupeKey:g(h)})}finally{await C()}})()},[e,t,n,o,l,h]),null},ve=({page:e,pageTitle:t,pageIcon:n,onClick:o,shouldResetSearchState:l=!1})=>{const[r,h]=p.useState(!1),E=b();return p.useEffect(()=>{if(r)return;h(!0),(async()=>{o?.();try{await U({page:e,pageTitle:t,pageIcon:n,shouldResetSearchState:l})}catch(O){O instanceof Error&&await T({message:"Action failed",detailedMessage:O.message,variant:"error",dedupeKey:g(E)})}finally{await C()}})()},[e,t,n,l,o,r,E]),null};class Ee{constructor(t){this.cssText=t}}class Se extends Array{item(t){return this[t]??null}}class Oe{constructor(t){this.cssRules=new Se,this.onChange=t}insertRule(t,n){const o=n??this.cssRules.length;return this.cssRules.splice(o,0,new Ee(t)),this.notify(),o}deleteRule(t){this.cssRules.splice(t,1),this.notify()}notify(){const t=this.cssRules.map(n=>n.cssText).join(`
|
|
2
|
+
`);this.onChange(t)}}const Ie=e=>{const t=new WeakMap,n=new WeakMap,o=i=>{if(t.has(i))return;const s=document.createElement("remote-style");t.set(i,s);const L=(i.getAttributeNames?.()??[]).filter(u=>u.startsWith("data-")).map(u=>`${u}=${i.getAttribute(u)??""}`).join(";");L.length>0&&(s.styleKey=L);const I=()=>{s.cssText=i.textContent??""},j=new Oe(u=>{s.cssText=u});try{Object.defineProperty(i,"sheet",{get:()=>j,configurable:!0})}catch{}const M=Object.getPrototypeOf(i),A=Object.getOwnPropertyDescriptor(i,"textContent")??Object.getOwnPropertyDescriptor(M,"textContent")??Object.getOwnPropertyDescriptor(Object.getPrototypeOf(M),"textContent");if(A?.set){const u=A.set;try{Object.defineProperty(i,"textContent",{get:A.get,set(f){u.call(this,f),s.cssText=f??""},configurable:!0})}catch{}}const W=i.appendChild.bind(i);try{i.appendChild=u=>{const f=W(u);return I(),f}}catch{}const K=i.insertBefore.bind(i);try{i.insertBefore=(u,f)=>{const B=K(u,f);return I(),B}}catch{}const Y=i.removeChild.bind(i);try{i.removeChild=u=>{const f=Y(u);return I(),f}}catch{}if(typeof MutationObserver=="function")try{const u=new MutationObserver(()=>{I()});typeof u.observe=="function"&&(u.observe(i,{subtree:!0,childList:!0,characterData:!0}),n.set(i,u))}catch{}const F=i.textContent;F&&(s.cssText=F),e.appendChild(s)},l=i=>{const s=n.get(i);s&&(s.disconnect(),n.delete(i));const c=t.get(i);c&&c.parentNode&&(c.parentNode.removeChild(c),t.delete(i))},r=document.head,h=r.appendChild.bind(r),E=r.insertBefore.bind(r),S=r.append.bind(r),O=r.prepend.bind(r),k=r.replaceChild.bind(r),V=r.removeChild.bind(r);r.appendChild=i=>{const s=h(i);return m(i)&&o(i),s},r.insertBefore=(i,s)=>{const c=E(i,s);return m(i)&&o(i),c},r.append=(...i)=>{S(...i);for(const s of i)m(s)&&o(s)},r.prepend=(...i)=>{O(...i);for(const s of i)m(s)&&o(s)},r.replaceChild=(i,s)=>{const c=k(i,s);return m(s)&&l(s),m(i)&&o(i),c},r.removeChild=i=>{const s=V(i);return m(i)&&l(i),s};const H=Array.from(r.querySelectorAll("style"));for(const i of H)o(i);Object.defineProperty(document,"styleSheets",{get:()=>[],configurable:!0})},m=e=>typeof e!="string"&&"localName"in e&&e.localName==="style",Te=e=>{for(const[t,n]of Object.entries(e))globalThis[t]=n};exports.ALLOWED_HTML_ELEMENTS=a.ALLOWED_HTML_ELEMENTS;exports.AggregateOperations=a.n;exports.AppPath=a.s;exports.CommandMenuPages=a.p;exports.FieldType=a.R;exports.HTML_TAG_TO_REMOTE_COMPONENT=a.HTML_TAG_TO_REMOTE_COMPONENT;exports.OnDeleteAction=a.W;exports.PageLayoutTabLayoutMode=a.v;exports.RelationType=a.V;exports.STANDARD_OBJECT=a.y;exports.STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS=a.y;exports.Action=he;exports.ActionLink=me;exports.ActionOpenSidePanelPage=ve;exports.COMMON_HTML_EVENTS=ce;exports.EVENT_TO_REACT=pe;exports.HTML_COMMON_PROPERTIES=fe;exports.ObjectRecordGroupByDateGranularity=v;exports.PermissionFlag=w;exports.closeSidePanel=ae;exports.createValidationResult=d;exports.defineApplication=G;exports.defineField=Q;exports.defineFrontComponent=q;exports.defineLogicFunction=$;exports.defineNavigationMenuItem=z;exports.defineObject=Z;exports.definePageLayout=ee;exports.definePostInstallLogicFunction=J;exports.definePreInstallLogicFunction=X;exports.defineRole=te;exports.defineSkill=ne;exports.defineView=ie;exports.enqueueSnackbar=T;exports.exposeGlobals=Te;exports.getFrontComponentActionErrorDedupeKey=g;exports.installStyleBridge=Ie;exports.navigate=x;exports.openSidePanelPage=U;exports.unmountFrontComponent=C;exports.useFrontComponentExecutionContext=R;exports.useFrontComponentId=b;exports.useUserId=de;exports.validateFields=_;
|