twenty-sdk 0.6.1 → 0.6.3-alpha

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.
Files changed (46) hide show
  1. package/README.md +5 -1
  2. package/dist/{HtmlTagToRemoteComponent-DvFlyCDv.js → HtmlTagToRemoteComponent-CgtwxDeH.js} +1 -1
  3. package/dist/{HtmlTagToRemoteComponent-CALlgbCB.mjs → HtmlTagToRemoteComponent-D_EW5OLu.mjs} +1498 -1447
  4. package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +2 -0
  5. package/dist/cli/utilities/client/client-service.d.ts +0 -1
  6. package/dist/cli/utilities/client/twenty-client-template.d.ts +42 -0
  7. package/dist/cli.cjs +138 -89
  8. package/dist/cli.mjs +2570 -2490
  9. package/dist/front-component-renderer/index.cjs +8 -8
  10. package/dist/front-component-renderer/index.mjs +588 -479
  11. package/dist/front-component-renderer/remote/generated/remote-components.d.ts +42 -2
  12. package/dist/front-component-renderer/remote/generated/remote-elements.d.ts +52 -2
  13. package/dist/front-component-renderer/types/FrontComponentExecutionContext.d.ts +1 -0
  14. package/dist/front-component-renderer/types/FrontComponentHostCommunicationApi.d.ts +2 -1
  15. package/dist/{get-function-input-schema-BZ7_XyUh-CzwPUwwE.js → get-function-input-schema-BZ7_XyUh-CCSi0u_q.js} +1 -1
  16. package/dist/{get-function-input-schema-BZ7_XyUh-C9RBS5oC.mjs → get-function-input-schema-BZ7_XyUh-DAPandzB.mjs} +1 -1
  17. package/dist/index.cjs +2 -2
  18. package/dist/index.mjs +164 -124
  19. package/dist/sdk/application/application-config.d.ts +1 -1
  20. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.d.ts +1 -0
  21. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js +57 -6
  22. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js.map +1 -1
  23. package/dist/sdk/front-component-api/constants/EventToReact.js +22 -3
  24. package/dist/sdk/front-component-api/constants/EventToReact.js.map +1 -1
  25. package/dist/sdk/front-component-api/constants/SerializedEventData.d.ts +7 -0
  26. package/dist/sdk/front-component-api/functions/openAskAIWithPrompt.d.ts +2 -0
  27. package/dist/sdk/front-component-api/functions/openAskAIWithPrompt.js +12 -0
  28. package/dist/sdk/front-component-api/functions/openAskAIWithPrompt.js.map +1 -0
  29. package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.d.ts +4 -0
  30. package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.js.map +1 -1
  31. package/dist/sdk/front-component-api/hooks/useRecordId.d.ts +1 -0
  32. package/dist/sdk/front-component-api/hooks/useRecordId.js +6 -0
  33. package/dist/sdk/front-component-api/hooks/useRecordId.js.map +1 -0
  34. package/dist/sdk/front-component-api/index.d.ts +2 -0
  35. package/dist/sdk/front-component-api/types/FrontComponentExecutionContext.d.ts +1 -0
  36. package/dist/sdk/index.d.ts +4 -1
  37. package/dist/sdk/index.js +75 -67
  38. package/dist/sdk/index.js.map +1 -1
  39. package/dist/sdk/logic-functions/define-post-install-logic-function.d.ts +6 -0
  40. package/dist/sdk/logic-functions/define-post-install-logic-function.js +12 -0
  41. package/dist/sdk/logic-functions/define-post-install-logic-function.js.map +1 -0
  42. package/dist/sdk/logic-functions/define-pre-install-logic-function.d.ts +6 -0
  43. package/dist/sdk/logic-functions/define-pre-install-logic-function.js +12 -0
  44. package/dist/sdk/logic-functions/define-pre-install-logic-function.js.map +1 -0
  45. package/dist/sdk/logic-functions/install-logic-function-payload-type.d.ts +4 -0
  46. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { isNonEmptyString as A } from "@sniptt/guards";
2
2
  import { useState as T, useRef as G, useEffect as b } from "react";
3
- import { R as N, o as m, f as S } from "./HtmlTagToRemoteComponent-CALlgbCB.mjs";
4
- import { A as Pe, n as Le, s as Me, p as Fe, H as Ne, W as we, v as xe, V as De, y as Ue, y as ke } from "./HtmlTagToRemoteComponent-CALlgbCB.mjs";
3
+ import { R as w, o as h, f as v } from "./HtmlTagToRemoteComponent-D_EW5OLu.mjs";
4
+ import { A as we, n as De, s as xe, p as Ue, H as ke, W as We, v as je, V as Ve, y as Ke, y as He } from "./HtmlTagToRemoteComponent-D_EW5OLu.mjs";
5
5
  const l = ({
6
6
  config: e,
7
7
  errors: t = []
@@ -9,30 +9,30 @@ const l = ({
9
9
  success: t.length === 0,
10
10
  config: e,
11
11
  errors: t
12
- }), ae = (e) => {
12
+ }), ue = (e) => {
13
13
  const t = [];
14
14
  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"), l({
15
15
  config: e,
16
16
  errors: t
17
17
  });
18
- }, ue = (e) => {
18
+ }, le = (e) => {
19
19
  const t = [];
20
20
  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")), l({
21
21
  config: e,
22
22
  errors: t
23
23
  });
24
24
  };
25
- var h = /* @__PURE__ */ ((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))(h || {});
25
+ var m = /* @__PURE__ */ ((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))(m || {});
26
26
  const x = (e) => {
27
27
  if (!e)
28
28
  return [];
29
29
  const t = [];
30
30
  for (const n of e)
31
- A(n.label) || t.push("Field must have a label"), A(n.name) || t.push(`Field "${n.label}" must have a name`), A(n.universalIdentifier) || t.push(`Field "${n.label}" must have a universalIdentifier`), (n.type === N.SELECT || n.type === N.MULTI_SELECT) && (!Array.isArray(n.options) || n.options.length === 0) && t.push(
31
+ A(n.label) || t.push("Field must have a label"), A(n.name) || t.push(`Field "${n.label}" must have a name`), A(n.universalIdentifier) || t.push(`Field "${n.label}" must have a universalIdentifier`), (n.type === w.SELECT || n.type === w.MULTI_SELECT) && (!Array.isArray(n.options) || n.options.length === 0) && t.push(
32
32
  `Field "${n.label}" is a SELECT/MULTI_SELECT type and must have options`
33
33
  );
34
34
  return t;
35
- }, le = (e) => {
35
+ }, de = (e) => {
36
36
  const t = [];
37
37
  e.objectUniversalIdentifier || t.push("Field must have an objectUniversalIdentifier");
38
38
  const n = x([e]);
@@ -46,14 +46,26 @@ const x = (e) => {
46
46
  config: e,
47
47
  errors: t
48
48
  });
49
- }, de = (e) => {
49
+ }, pe = (e) => {
50
+ const t = [];
51
+ 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"), l({
52
+ config: e,
53
+ errors: t
54
+ });
55
+ }, fe = (e) => {
56
+ const t = [];
57
+ 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"), l({
58
+ config: e,
59
+ errors: t
60
+ });
61
+ }, he = (e) => {
50
62
  const t = [];
51
63
  return e.universalIdentifier || t.push("NavigationMenuItem must have a universalIdentifier"), typeof e.position != "number" && t.push("NavigationMenuItem must have a position"), l({ config: e, errors: t });
52
- }, pe = (e) => {
64
+ }, me = (e) => {
53
65
  const t = [];
54
66
  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");
55
67
  const n = x(e.fields);
56
- return t.push(...n), m(e.labelIdentifierFieldMetadataUniversalIdentifier) && !e.fields.some(
68
+ return t.push(...n), h(e.labelIdentifierFieldMetadataUniversalIdentifier) && !e.fields.some(
57
69
  (s) => s.universalIdentifier === e.labelIdentifierFieldMetadataUniversalIdentifier
58
70
  ) && t.push(
59
71
  "labelIdentifierFieldMetadataUniversalIdentifier must reference a field defined in the fields array"
@@ -61,7 +73,7 @@ const x = (e) => {
61
73
  config: e,
62
74
  errors: t
63
75
  });
64
- }, fe = (e) => {
76
+ }, ve = (e) => {
65
77
  const t = [];
66
78
  if (e.universalIdentifier || t.push("PageLayout must have a universalIdentifier"), e.name || t.push("PageLayout must have a name"), e.tabs) {
67
79
  for (const n of e.tabs)
@@ -70,7 +82,7 @@ const x = (e) => {
70
82
  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");
71
83
  }
72
84
  return l({ config: e, errors: t });
73
- }, he = (e) => {
85
+ }, Ie = (e) => {
74
86
  const t = [];
75
87
  if (e.universalIdentifier || t.push("Role must have a universalIdentifier"), e.label || t.push("Role must have a label"), e.objectPermissions)
76
88
  for (const n of e.objectPermissions)
@@ -80,12 +92,12 @@ const x = (e) => {
80
92
  n.objectUniversalIdentifier || t.push("Field permission must have an objectUniversalIdentifier"), n.fieldUniversalIdentifier || t.push("Field permission must have a fieldUniversalIdentifier");
81
93
  return l({ config: e, errors: t });
82
94
  };
83
- h.DAY, h.WEEK, h.MONTH, h.QUARTER, h.YEAR;
95
+ m.DAY, m.WEEK, m.MONTH, m.QUARTER, m.YEAR;
84
96
  var Q = /* @__PURE__ */ ((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))(Q || {});
85
- const me = (e) => {
97
+ const Ee = (e) => {
86
98
  const t = [];
87
99
  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"), l({ config: e, errors: t });
88
- }, ve = (e) => {
100
+ }, Se = (e) => {
89
101
  const t = [];
90
102
  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)
91
103
  for (const n of e.fields)
@@ -103,47 +115,52 @@ const me = (e) => {
103
115
  for (const n of e.fieldGroups)
104
116
  n.universalIdentifier || t.push("ViewFieldGroup must have a universalIdentifier");
105
117
  return l({ config: e, errors: t });
106
- }, $ = "__twentySdkExecutionContext__", y = "__twentySdkContextListeners__", D = () => (globalThis[y] || (globalThis[y] = /* @__PURE__ */ new Set()), globalThis[y]), w = () => globalThis[$], q = (e) => {
107
- D().add(e);
118
+ }, $ = "__twentySdkExecutionContext__", y = "__twentySdkContextListeners__", U = () => (globalThis[y] || (globalThis[y] = /* @__PURE__ */ new Set()), globalThis[y]), D = () => globalThis[$], q = (e) => {
119
+ U().add(e);
108
120
  }, X = (e) => {
109
- D().delete(e);
110
- }, Ee = () => {
111
- const e = S.closeSidePanel;
112
- if (!m(e))
121
+ U().delete(e);
122
+ }, Oe = () => {
123
+ const e = v.closeSidePanel;
124
+ if (!h(e))
113
125
  throw new Error("closeSidePanelFunction is not set");
114
126
  return e();
115
- }, _ = (e) => {
116
- const t = S.enqueueSnackbar;
117
- if (!m(t))
127
+ }, g = (e) => {
128
+ const t = v.enqueueSnackbar;
129
+ if (!h(t))
118
130
  throw new Error("enqueueSnackbarFunction is not set");
119
131
  return t(e);
120
132
  }, J = (e, t, n, s) => {
121
- const u = S.navigate;
122
- if (!m(u))
133
+ const u = v.navigate;
134
+ if (!h(u))
123
135
  throw new Error("navigateFunction is not set");
124
136
  return u(e, t, n, s);
137
+ }, Te = (e) => {
138
+ const t = v.openAskAIWithPrompt;
139
+ if (!h(t))
140
+ throw new Error("openAskAIWithPromptFunction is not set");
141
+ return t(e);
125
142
  }, z = (e) => {
126
- const t = S.openSidePanelPage;
127
- if (!m(t))
143
+ const t = v.openSidePanelPage;
144
+ if (!h(t))
128
145
  throw new Error("openSidePanelPageFunction is not set");
129
146
  return t(e);
130
- }, R = () => {
131
- const e = S.unmountFrontComponent;
132
- if (!m(e))
147
+ }, P = () => {
148
+ const e = v.unmountFrontComponent;
149
+ if (!h(e))
133
150
  throw new Error("unmountFrontComponentFunction is not set");
134
151
  return e();
135
- }, U = (e) => {
152
+ }, R = (e) => {
136
153
  const [t, n] = T(
137
- () => e(w())
154
+ () => e(D())
138
155
  ), s = G(t);
139
156
  return b(() => {
140
157
  const u = () => {
141
- const i = e(w());
158
+ const i = e(D());
142
159
  i !== s.current && (s.current = i, n(i));
143
160
  };
144
161
  return q(u), u(), () => X(u);
145
162
  }, [e]), t;
146
- }, Z = (e) => e.frontComponentId, g = () => U(Z), ee = (e) => e.userId, Se = () => U(ee), P = (e) => `${e}-action-error`, Ie = [
163
+ }, Z = (e) => e.frontComponentId, _ = () => R(Z), ee = (e) => e.recordId, be = () => R(ee), te = (e) => e.userId, Ce = () => R(te), L = (e) => `${e}-action-error`, Ae = [
147
164
  "click",
148
165
  "dblclick",
149
166
  "mousedown",
@@ -164,7 +181,7 @@ const me = (e) => {
164
181
  "wheel",
165
182
  "contextmenu",
166
183
  "drag"
167
- ], Oe = {
184
+ ], ye = {
168
185
  click: "onClick",
169
186
  dblclick: "onDoubleClick",
170
187
  mousedown: "onMouseDown",
@@ -184,8 +201,27 @@ const me = (e) => {
184
201
  scroll: "onScroll",
185
202
  wheel: "onWheel",
186
203
  contextmenu: "onContextMenu",
187
- drag: "onDrag"
188
- }, Te = {
204
+ drag: "onDrag",
205
+ timeupdate: "onTimeUpdate",
206
+ play: "onPlay",
207
+ pause: "onPause",
208
+ ended: "onEnded",
209
+ loadedmetadata: "onLoadedMetadata",
210
+ loadeddata: "onLoadedData",
211
+ volumechange: "onVolumeChange",
212
+ seeking: "onSeeking",
213
+ seeked: "onSeeked",
214
+ error: "onError",
215
+ canplay: "onCanPlay",
216
+ canplaythrough: "onCanPlayThrough",
217
+ waiting: "onWaiting",
218
+ progress: "onProgress",
219
+ durationchange: "onDurationChange",
220
+ ratechange: "onRateChange",
221
+ stalled: "onStalled",
222
+ suspend: "onSuspend",
223
+ emptied: "onEmptied"
224
+ }, ge = {
189
225
  id: { type: "string", optional: !0 },
190
226
  className: { type: "string", optional: !0 },
191
227
  style: { type: "string", optional: !0 },
@@ -195,8 +231,8 @@ const me = (e) => {
195
231
  "aria-label": { type: "string", optional: !0 },
196
232
  "aria-hidden": { type: "boolean", optional: !0 },
197
233
  "data-testid": { type: "string", optional: !0 }
198
- }, be = ({ execute: e }) => {
199
- const [t, n] = T(!1), s = g();
234
+ }, Pe = ({ execute: e }) => {
235
+ const [t, n] = T(!1), s = _();
200
236
  return b(() => {
201
237
  if (t)
202
238
  return;
@@ -204,24 +240,24 @@ const me = (e) => {
204
240
  try {
205
241
  await e();
206
242
  } catch (i) {
207
- i instanceof Error && await _({
243
+ i instanceof Error && await g({
208
244
  message: "Action failed",
209
245
  detailedMessage: i.message,
210
246
  variant: "error",
211
- dedupeKey: P(s)
247
+ dedupeKey: L(s)
212
248
  });
213
249
  } finally {
214
- await R();
250
+ await P();
215
251
  }
216
252
  })();
217
253
  }, [e, t, s]), null;
218
- }, Ce = ({
254
+ }, Re = ({
219
255
  to: e,
220
256
  params: t,
221
257
  queryParams: n,
222
258
  options: s
223
259
  }) => {
224
- const [u, i] = T(!1), p = g();
260
+ const [u, i] = T(!1), p = _();
225
261
  return b(() => {
226
262
  if (u)
227
263
  return;
@@ -229,25 +265,25 @@ const me = (e) => {
229
265
  try {
230
266
  await J(e, t, n, s);
231
267
  } catch (E) {
232
- E instanceof Error && await _({
268
+ E instanceof Error && await g({
233
269
  message: "Action failed",
234
270
  detailedMessage: E.message,
235
271
  variant: "error",
236
- dedupeKey: P(p)
272
+ dedupeKey: L(p)
237
273
  });
238
274
  } finally {
239
- await R();
275
+ await P();
240
276
  }
241
277
  })();
242
278
  }, [e, t, n, s, u, p]), null;
243
- }, Ae = ({
279
+ }, _e = ({
244
280
  page: e,
245
281
  pageTitle: t,
246
282
  pageIcon: n,
247
283
  onClick: s,
248
284
  shouldResetSearchState: u = !1
249
285
  }) => {
250
- const [i, p] = T(!1), v = g();
286
+ const [i, p] = T(!1), I = _();
251
287
  return b(() => {
252
288
  if (i)
253
289
  return;
@@ -260,15 +296,15 @@ const me = (e) => {
260
296
  pageIcon: n,
261
297
  shouldResetSearchState: u
262
298
  });
263
- } catch (I) {
264
- I instanceof Error && await _({
299
+ } catch (S) {
300
+ S instanceof Error && await g({
265
301
  message: "Action failed",
266
- detailedMessage: I.message,
302
+ detailedMessage: S.message,
267
303
  variant: "error",
268
- dedupeKey: P(v)
304
+ dedupeKey: L(I)
269
305
  });
270
306
  } finally {
271
- await R();
307
+ await P();
272
308
  }
273
309
  })();
274
310
  }, [
@@ -278,26 +314,26 @@ const me = (e) => {
278
314
  u,
279
315
  s,
280
316
  i,
281
- v
317
+ I
282
318
  ]), null;
283
319
  };
284
- class te {
320
+ class ne {
285
321
  constructor(t) {
286
322
  this.cssText = t;
287
323
  }
288
324
  }
289
- class ne extends Array {
325
+ class re extends Array {
290
326
  item(t) {
291
327
  return this[t] ?? null;
292
328
  }
293
329
  }
294
- class re {
330
+ class ie {
295
331
  constructor(t) {
296
- this.cssRules = new ne(), this.onChange = t;
332
+ this.cssRules = new re(), this.onChange = t;
297
333
  }
298
334
  insertRule(t, n) {
299
335
  const s = n ?? this.cssRules.length;
300
- return this.cssRules.splice(s, 0, new te(t)), this.notify(), s;
336
+ return this.cssRules.splice(s, 0, new ne(t)), this.notify(), s;
301
337
  }
302
338
  deleteRule(t) {
303
339
  this.cssRules.splice(t, 1), this.notify();
@@ -308,7 +344,7 @@ class re {
308
344
  this.onChange(t);
309
345
  }
310
346
  }
311
- const ye = (e) => {
347
+ const Le = (e) => {
312
348
  const t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), s = (r) => {
313
349
  if (t.has(r))
314
350
  return;
@@ -316,18 +352,18 @@ const ye = (e) => {
316
352
  "remote-style"
317
353
  );
318
354
  t.set(r, o);
319
- const L = (r.getAttributeNames?.() ?? []).filter((a) => a.startsWith("data-")).map(
355
+ const F = (r.getAttributeNames?.() ?? []).filter((a) => a.startsWith("data-")).map(
320
356
  (a) => `${a}=${r.getAttribute(a) ?? ""}`
321
357
  ).join(";");
322
- L.length > 0 && (o.styleKey = L);
358
+ F.length > 0 && (o.styleKey = F);
323
359
  const O = () => {
324
360
  o.cssText = r.textContent ?? "";
325
- }, W = new re((a) => {
361
+ }, V = new ie((a) => {
326
362
  o.cssText = a;
327
363
  });
328
364
  try {
329
365
  Object.defineProperty(r, "sheet", {
330
- get: () => W,
366
+ get: () => V,
331
367
  configurable: !0
332
368
  });
333
369
  } catch {
@@ -341,8 +377,8 @@ const ye = (e) => {
341
377
  try {
342
378
  Object.defineProperty(r, "textContent", {
343
379
  get: C.get,
344
- set(d) {
345
- a.call(this, d), o.cssText = d ?? "";
380
+ set(c) {
381
+ a.call(this, c), o.cssText = c ?? "";
346
382
  },
347
383
  configurable: !0
348
384
  });
@@ -352,15 +388,15 @@ const ye = (e) => {
352
388
  const K = r.appendChild.bind(r);
353
389
  try {
354
390
  r.appendChild = (a) => {
355
- const d = K(a);
356
- return O(), d;
391
+ const c = K(a);
392
+ return O(), c;
357
393
  };
358
394
  } catch {
359
395
  }
360
396
  const H = r.insertBefore.bind(r);
361
397
  try {
362
- r.insertBefore = (a, d) => {
363
- const B = H(a, d);
398
+ r.insertBefore = (a, c) => {
399
+ const B = H(a, c);
364
400
  return O(), B;
365
401
  };
366
402
  } catch {
@@ -368,8 +404,8 @@ const ye = (e) => {
368
404
  const Y = r.removeChild.bind(r);
369
405
  try {
370
406
  r.removeChild = (a) => {
371
- const d = Y(a);
372
- return O(), d;
407
+ const c = Y(a);
408
+ return O(), c;
373
409
  };
374
410
  } catch {
375
411
  }
@@ -385,89 +421,93 @@ const ye = (e) => {
385
421
  }), n.set(r, a));
386
422
  } catch {
387
423
  }
388
- const F = r.textContent;
389
- F && (o.cssText = F), e.appendChild(o);
424
+ const N = r.textContent;
425
+ N && (o.cssText = N), e.appendChild(o);
390
426
  }, u = (r) => {
391
427
  const o = n.get(r);
392
428
  o && (o.disconnect(), n.delete(r));
393
- const c = t.get(r);
394
- c && c.parentNode && (c.parentNode.removeChild(c), t.delete(r));
395
- }, i = document.head, p = i.appendChild.bind(i), v = i.insertBefore.bind(i), E = i.append.bind(i), I = i.prepend.bind(i), k = i.replaceChild.bind(i), j = i.removeChild.bind(i);
429
+ const d = t.get(r);
430
+ d && d.parentNode && (d.parentNode.removeChild(d), t.delete(r));
431
+ }, i = document.head, p = i.appendChild.bind(i), I = i.insertBefore.bind(i), E = i.append.bind(i), S = i.prepend.bind(i), k = i.replaceChild.bind(i), W = i.removeChild.bind(i);
396
432
  i.appendChild = (r) => {
397
433
  const o = p(r);
398
434
  return f(r) && s(r), o;
399
435
  }, i.insertBefore = (r, o) => {
400
- const c = v(r, o);
401
- return f(r) && s(r), c;
436
+ const d = I(r, o);
437
+ return f(r) && s(r), d;
402
438
  }, i.append = (...r) => {
403
439
  E(...r);
404
440
  for (const o of r)
405
441
  f(o) && s(o);
406
442
  }, i.prepend = (...r) => {
407
- I(...r);
443
+ S(...r);
408
444
  for (const o of r)
409
445
  f(o) && s(o);
410
446
  }, i.replaceChild = (r, o) => {
411
- const c = k(r, o);
412
- return f(o) && u(o), f(r) && s(r), c;
447
+ const d = k(r, o);
448
+ return f(o) && u(o), f(r) && s(r), d;
413
449
  }, i.removeChild = (r) => {
414
- const o = j(r);
450
+ const o = W(r);
415
451
  return f(r) && u(r), o;
416
452
  };
417
- const V = Array.from(
453
+ const j = Array.from(
418
454
  i.querySelectorAll("style")
419
455
  );
420
- for (const r of V)
456
+ for (const r of j)
421
457
  s(r);
422
458
  Object.defineProperty(document, "styleSheets", {
423
459
  get: () => [],
424
460
  configurable: !0
425
461
  });
426
- }, f = (e) => typeof e != "string" && "localName" in e && e.localName === "style", _e = (e) => {
462
+ }, f = (e) => typeof e != "string" && "localName" in e && e.localName === "style", Fe = (e) => {
427
463
  for (const [t, n] of Object.entries(e))
428
464
  globalThis[t] = n;
429
465
  };
430
466
  export {
431
- Pe as ALLOWED_HTML_ELEMENTS,
432
- be as Action,
433
- Ce as ActionLink,
434
- Ae as ActionOpenSidePanelPage,
435
- Le as AggregateOperations,
436
- Me as AppPath,
437
- Ie as COMMON_HTML_EVENTS,
438
- Fe as CommandMenuPages,
439
- Oe as EVENT_TO_REACT,
440
- N as FieldType,
441
- Te as HTML_COMMON_PROPERTIES,
442
- Ne as HTML_TAG_TO_REMOTE_COMPONENT,
443
- h as ObjectRecordGroupByDateGranularity,
444
- we as OnDeleteAction,
445
- xe as PageLayoutTabLayoutMode,
467
+ we as ALLOWED_HTML_ELEMENTS,
468
+ Pe as Action,
469
+ Re as ActionLink,
470
+ _e as ActionOpenSidePanelPage,
471
+ De as AggregateOperations,
472
+ xe as AppPath,
473
+ Ae as COMMON_HTML_EVENTS,
474
+ Ue as CommandMenuPages,
475
+ ye as EVENT_TO_REACT,
476
+ w as FieldType,
477
+ ge as HTML_COMMON_PROPERTIES,
478
+ ke as HTML_TAG_TO_REMOTE_COMPONENT,
479
+ m as ObjectRecordGroupByDateGranularity,
480
+ We as OnDeleteAction,
481
+ je as PageLayoutTabLayoutMode,
446
482
  Q as PermissionFlag,
447
- De as RelationType,
448
- Ue as STANDARD_OBJECT,
449
- ke as STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
450
- Ee as closeSidePanel,
483
+ Ve as RelationType,
484
+ Ke as STANDARD_OBJECT,
485
+ He as STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
486
+ Oe as closeSidePanel,
451
487
  l as createValidationResult,
452
- ae as defineApplication,
453
- le as defineField,
454
- ue as defineFrontComponent,
488
+ ue as defineApplication,
489
+ de as defineField,
490
+ le as defineFrontComponent,
455
491
  ce as defineLogicFunction,
456
- de as defineNavigationMenuItem,
457
- pe as defineObject,
458
- fe as definePageLayout,
459
- he as defineRole,
460
- me as defineSkill,
461
- ve as defineView,
462
- _ as enqueueSnackbar,
463
- _e as exposeGlobals,
464
- P as getFrontComponentActionErrorDedupeKey,
465
- ye as installStyleBridge,
492
+ he as defineNavigationMenuItem,
493
+ me as defineObject,
494
+ ve as definePageLayout,
495
+ fe as definePostInstallLogicFunction,
496
+ pe as definePreInstallLogicFunction,
497
+ Ie as defineRole,
498
+ Ee as defineSkill,
499
+ Se as defineView,
500
+ g as enqueueSnackbar,
501
+ Fe as exposeGlobals,
502
+ L as getFrontComponentActionErrorDedupeKey,
503
+ Le as installStyleBridge,
466
504
  J as navigate,
505
+ Te as openAskAIWithPrompt,
467
506
  z as openSidePanelPage,
468
- R as unmountFrontComponent,
469
- U as useFrontComponentExecutionContext,
470
- g as useFrontComponentId,
471
- Se as useUserId,
507
+ P as unmountFrontComponent,
508
+ R as useFrontComponentExecutionContext,
509
+ _ as useFrontComponentId,
510
+ be as useRecordId,
511
+ Ce as useUserId,
472
512
  x as validateFields
473
513
  };
@@ -1,2 +1,2 @@
1
1
  import { type ApplicationManifest } from 'twenty-shared/application';
2
- export type ApplicationConfig = Omit<ApplicationManifest, 'packageJsonChecksum' | 'yarnLockChecksum' | 'apiClientChecksum'>;
2
+ export type ApplicationConfig = Omit<ApplicationManifest, 'packageJsonChecksum' | 'yarnLockChecksum' | 'apiClientChecksum' | 'postInstallLogicFunctionUniversalIdentifier'>;
@@ -6,6 +6,7 @@ export type AllowedHtmlElement = {
6
6
  tag: string;
7
7
  name: string;
8
8
  properties: Record<string, PropertySchema>;
9
+ events?: string[];
9
10
  };
10
11
  export declare const ALLOWED_HTML_ELEMENTS: AllowedHtmlElement[];
11
12
  export {};
@@ -139,12 +139,15 @@ const t = [
139
139
  name: "HtmlIframe",
140
140
  properties: {
141
141
  src: { type: "string", optional: !0 },
142
- title: { type: "string", optional: !0 },
142
+ name: { type: "string", optional: !0 },
143
143
  width: { type: "string", optional: !0 },
144
144
  height: { type: "string", optional: !0 },
145
145
  allow: { type: "string", optional: !0 },
146
146
  sandbox: { type: "string", optional: !0 },
147
- allowFullScreen: { type: "boolean", optional: !0 }
147
+ allowFullScreen: { type: "boolean", optional: !0 },
148
+ loading: { type: "string", optional: !0 },
149
+ referrerPolicy: { type: "string", optional: !0 },
150
+ srcDoc: { type: "string", optional: !0 }
148
151
  }
149
152
  },
150
153
  {
@@ -161,8 +164,31 @@ const t = [
161
164
  width: { type: "string", optional: !0 },
162
165
  height: { type: "string", optional: !0 },
163
166
  crossOrigin: { type: "string", optional: !0 },
164
- playsInline: { type: "boolean", optional: !0 }
165
- }
167
+ playsInline: { type: "boolean", optional: !0 },
168
+ disablePictureInPicture: { type: "boolean", optional: !0 },
169
+ disableRemotePlayback: { type: "boolean", optional: !0 }
170
+ },
171
+ events: [
172
+ "timeupdate",
173
+ "play",
174
+ "pause",
175
+ "ended",
176
+ "loadedmetadata",
177
+ "loadeddata",
178
+ "volumechange",
179
+ "seeking",
180
+ "seeked",
181
+ "error",
182
+ "canplay",
183
+ "canplaythrough",
184
+ "waiting",
185
+ "progress",
186
+ "durationchange",
187
+ "ratechange",
188
+ "stalled",
189
+ "suspend",
190
+ "emptied"
191
+ ]
166
192
  },
167
193
  {
168
194
  tag: "html-audio",
@@ -175,7 +201,28 @@ const t = [
175
201
  muted: { type: "boolean", optional: !0 },
176
202
  preload: { type: "string", optional: !0 },
177
203
  crossOrigin: { type: "string", optional: !0 }
178
- }
204
+ },
205
+ events: [
206
+ "timeupdate",
207
+ "play",
208
+ "pause",
209
+ "ended",
210
+ "loadedmetadata",
211
+ "loadeddata",
212
+ "volumechange",
213
+ "seeking",
214
+ "seeked",
215
+ "error",
216
+ "canplay",
217
+ "canplaythrough",
218
+ "waiting",
219
+ "progress",
220
+ "durationchange",
221
+ "ratechange",
222
+ "stalled",
223
+ "suspend",
224
+ "emptied"
225
+ ]
179
226
  },
180
227
  {
181
228
  tag: "html-source",
@@ -183,7 +230,11 @@ const t = [
183
230
  properties: {
184
231
  src: { type: "string", optional: !0 },
185
232
  type: { type: "string", optional: !0 },
186
- media: { type: "string", optional: !0 }
233
+ media: { type: "string", optional: !0 },
234
+ srcSet: { type: "string", optional: !0 },
235
+ sizes: { type: "string", optional: !0 },
236
+ width: { type: "number", optional: !0 },
237
+ height: { type: "number", optional: !0 }
187
238
  }
188
239
  }
189
240
  ];