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.
Files changed (70) hide show
  1. package/README.md +6 -2
  2. package/dist/{HtmlTagToRemoteComponent-DzQ2I9Lz.js → HtmlTagToRemoteComponent-CgtwxDeH.js} +11 -11
  3. package/dist/{HtmlTagToRemoteComponent-DBOkvIRB.mjs → HtmlTagToRemoteComponent-D_EW5OLu.mjs} +1743 -1640
  4. package/dist/cli/utilities/api/api-service.d.ts +4 -0
  5. package/dist/cli/utilities/build/common/esbuild-watcher.d.ts +5 -2
  6. package/dist/cli/utilities/build/common/typecheck-plugin.d.ts +1 -1
  7. package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +2 -0
  8. package/dist/cli/utilities/client/client-service.d.ts +5 -1
  9. package/dist/cli/utilities/client/twenty-client-template.d.ts +42 -0
  10. package/dist/cli/utilities/dev/orchestrator/dev-mode-orchestrator.d.ts +2 -0
  11. package/dist/cli/utilities/dev/orchestrator/steps/start-watchers-orchestrator-step.d.ts +2 -0
  12. package/dist/cli.cjs +430 -75
  13. package/dist/cli.mjs +3175 -2725
  14. package/dist/front-component-renderer/index.cjs +11 -11
  15. package/dist/front-component-renderer/index.d.ts +3 -3
  16. package/dist/front-component-renderer/index.mjs +2186 -1906
  17. package/dist/front-component-renderer/remote/generated/remote-components.d.ts +44 -0
  18. package/dist/front-component-renderer/remote/generated/remote-elements.d.ts +93 -0
  19. package/dist/front-component-renderer/types/FrontComponentHostCommunicationApi.d.ts +2 -1
  20. package/dist/{get-function-input-schema-BZ7_XyUh-GxSybvDe.js → get-function-input-schema-BZ7_XyUh-CCSi0u_q.js} +1 -1
  21. package/dist/{get-function-input-schema-BZ7_XyUh-By3UDh4s.mjs → get-function-input-schema-BZ7_XyUh-DAPandzB.mjs} +1 -1
  22. package/dist/index.cjs +2 -2
  23. package/dist/index.mjs +122 -89
  24. package/dist/sdk/application/application-config.d.ts +1 -1
  25. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.d.ts +1 -0
  26. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js +104 -1
  27. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js.map +1 -1
  28. package/dist/sdk/front-component-api/constants/EventToReact.js +22 -3
  29. package/dist/sdk/front-component-api/constants/EventToReact.js.map +1 -1
  30. package/dist/sdk/front-component-api/constants/SerializedEventData.d.ts +7 -0
  31. package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.d.ts +2 -0
  32. package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.js.map +1 -1
  33. package/dist/sdk/index.d.ts +3 -0
  34. package/dist/sdk/index.js +70 -66
  35. package/dist/sdk/index.js.map +1 -1
  36. package/dist/sdk/logic-functions/define-post-install-logic-function.d.ts +6 -0
  37. package/dist/sdk/logic-functions/define-post-install-logic-function.js +12 -0
  38. package/dist/sdk/logic-functions/define-post-install-logic-function.js.map +1 -0
  39. package/dist/sdk/logic-functions/define-pre-install-logic-function.d.ts +6 -0
  40. package/dist/sdk/logic-functions/define-pre-install-logic-function.js +12 -0
  41. package/dist/sdk/logic-functions/define-pre-install-logic-function.js.map +1 -0
  42. package/dist/sdk/logic-functions/install-logic-function-payload-type.d.ts +4 -0
  43. package/generated/core/index.ts +406 -0
  44. package/generated/core/runtime/batcher.ts +265 -0
  45. package/generated/core/runtime/createClient.ts +68 -0
  46. package/generated/core/runtime/error.ts +29 -0
  47. package/generated/core/runtime/fetcher.ts +98 -0
  48. package/generated/core/runtime/generateGraphqlOperation.ts +225 -0
  49. package/generated/core/runtime/index.ts +13 -0
  50. package/generated/core/runtime/linkTypeMap.ts +139 -0
  51. package/generated/core/runtime/typeSelection.ts +98 -0
  52. package/generated/core/runtime/types.ts +69 -0
  53. package/generated/core/schema.graphql +36745 -0
  54. package/generated/core/schema.ts +39341 -0
  55. package/generated/core/types.ts +45860 -0
  56. package/generated/index.ts +2 -0
  57. package/generated/metadata/index.ts +469 -0
  58. package/generated/metadata/runtime/batcher.ts +265 -0
  59. package/generated/metadata/runtime/createClient.ts +68 -0
  60. package/generated/metadata/runtime/error.ts +29 -0
  61. package/generated/metadata/runtime/fetcher.ts +98 -0
  62. package/generated/metadata/runtime/generateGraphqlOperation.ts +225 -0
  63. package/generated/metadata/runtime/index.ts +13 -0
  64. package/generated/metadata/runtime/linkTypeMap.ts +139 -0
  65. package/generated/metadata/runtime/typeSelection.ts +98 -0
  66. package/generated/metadata/runtime/types.ts +69 -0
  67. package/generated/metadata/schema.graphql +3971 -0
  68. package/generated/metadata/schema.ts +8357 -0
  69. package/generated/metadata/types.ts +10044 -0
  70. package/package.json +17 -1
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { isNonEmptyString as A } from "@sniptt/guards";
1
+ import { isNonEmptyString as y } 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-DBOkvIRB.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-DBOkvIRB.mjs";
3
+ import { R as N, o as m, f as S } from "./HtmlTagToRemoteComponent-D_EW5OLu.mjs";
4
+ import { A as Fe, n as Me, s as Ne, p as we, H as De, W as xe, v as Ue, V as ke, y as je, y as Ve } from "./HtmlTagToRemoteComponent-D_EW5OLu.mjs";
5
5
  const l = ({
6
6
  config: e,
7
7
  errors: t = []
@@ -23,36 +23,48 @@ const l = ({
23
23
  });
24
24
  };
25
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 || {});
26
- const x = (e) => {
26
+ const D = (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
+ y(n.label) || t.push("Field must have a label"), y(n.name) || t.push(`Field "${n.label}" must have a name`), y(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(
32
32
  `Field "${n.label}" is a SELECT/MULTI_SELECT type and must have options`
33
33
  );
34
34
  return t;
35
35
  }, le = (e) => {
36
36
  const t = [];
37
37
  e.objectUniversalIdentifier || t.push("Field must have an objectUniversalIdentifier");
38
- const n = x([e]);
38
+ const n = D([e]);
39
39
  return t.push(...n), l({
40
40
  config: e,
41
41
  errors: t
42
42
  });
43
- }, ce = (e) => {
43
+ }, de = (e) => {
44
44
  const t = [];
45
45
  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")), l({
46
46
  config: e,
47
47
  errors: t
48
48
  });
49
- }, de = (e) => {
49
+ }, ce = (e) => {
50
50
  const t = [];
51
- 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 });
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
+ });
52
55
  }, pe = (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
+ }, fe = (e) => {
62
+ const t = [];
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 });
64
+ }, he = (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
- const n = x(e.fields);
67
+ const n = D(e.fields);
56
68
  return t.push(...n), m(e.labelIdentifierFieldMetadataUniversalIdentifier) && !e.fields.some(
57
69
  (s) => s.universalIdentifier === e.labelIdentifierFieldMetadataUniversalIdentifier
58
70
  ) && t.push(
@@ -61,7 +73,7 @@ const x = (e) => {
61
73
  config: e,
62
74
  errors: t
63
75
  });
64
- }, fe = (e) => {
76
+ }, me = (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
+ }, ve = (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)
@@ -82,10 +94,10 @@ const x = (e) => {
82
94
  };
83
95
  h.DAY, h.WEEK, h.MONTH, h.QUARTER, h.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,16 +115,16 @@ 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__", g = "__twentySdkContextListeners__", x = () => (globalThis[g] || (globalThis[g] = /* @__PURE__ */ new Set()), globalThis[g]), w = () => globalThis[$], q = (e) => {
119
+ x().add(e);
108
120
  }, X = (e) => {
109
- D().delete(e);
110
- }, Ee = () => {
121
+ x().delete(e);
122
+ }, Ie = () => {
111
123
  const e = S.closeSidePanel;
112
124
  if (!m(e))
113
125
  throw new Error("closeSidePanelFunction is not set");
114
126
  return e();
115
- }, _ = (e) => {
127
+ }, A = (e) => {
116
128
  const t = S.enqueueSnackbar;
117
129
  if (!m(t))
118
130
  throw new Error("enqueueSnackbarFunction is not set");
@@ -127,7 +139,7 @@ const me = (e) => {
127
139
  if (!m(t))
128
140
  throw new Error("openSidePanelPageFunction is not set");
129
141
  return t(e);
130
- }, R = () => {
142
+ }, P = () => {
131
143
  const e = S.unmountFrontComponent;
132
144
  if (!m(e))
133
145
  throw new Error("unmountFrontComponentFunction is not set");
@@ -143,7 +155,7 @@ const me = (e) => {
143
155
  };
144
156
  return q(u), u(), () => X(u);
145
157
  }, [e]), t;
146
- }, Z = (e) => e.frontComponentId, g = () => U(Z), ee = (e) => e.userId, Se = () => U(ee), P = (e) => `${e}-action-error`, Ie = [
158
+ }, Z = (e) => e.frontComponentId, R = () => U(Z), ee = (e) => e.userId, Oe = () => U(ee), _ = (e) => `${e}-action-error`, Te = [
147
159
  "click",
148
160
  "dblclick",
149
161
  "mousedown",
@@ -164,7 +176,7 @@ const me = (e) => {
164
176
  "wheel",
165
177
  "contextmenu",
166
178
  "drag"
167
- ], Oe = {
179
+ ], be = {
168
180
  click: "onClick",
169
181
  dblclick: "onDoubleClick",
170
182
  mousedown: "onMouseDown",
@@ -184,8 +196,27 @@ const me = (e) => {
184
196
  scroll: "onScroll",
185
197
  wheel: "onWheel",
186
198
  contextmenu: "onContextMenu",
187
- drag: "onDrag"
188
- }, Te = {
199
+ drag: "onDrag",
200
+ timeupdate: "onTimeUpdate",
201
+ play: "onPlay",
202
+ pause: "onPause",
203
+ ended: "onEnded",
204
+ loadedmetadata: "onLoadedMetadata",
205
+ loadeddata: "onLoadedData",
206
+ volumechange: "onVolumeChange",
207
+ seeking: "onSeeking",
208
+ seeked: "onSeeked",
209
+ error: "onError",
210
+ canplay: "onCanPlay",
211
+ canplaythrough: "onCanPlayThrough",
212
+ waiting: "onWaiting",
213
+ progress: "onProgress",
214
+ durationchange: "onDurationChange",
215
+ ratechange: "onRateChange",
216
+ stalled: "onStalled",
217
+ suspend: "onSuspend",
218
+ emptied: "onEmptied"
219
+ }, Ce = {
189
220
  id: { type: "string", optional: !0 },
190
221
  className: { type: "string", optional: !0 },
191
222
  style: { type: "string", optional: !0 },
@@ -195,8 +226,8 @@ const me = (e) => {
195
226
  "aria-label": { type: "string", optional: !0 },
196
227
  "aria-hidden": { type: "boolean", optional: !0 },
197
228
  "data-testid": { type: "string", optional: !0 }
198
- }, be = ({ execute: e }) => {
199
- const [t, n] = T(!1), s = g();
229
+ }, ye = ({ execute: e }) => {
230
+ const [t, n] = T(!1), s = R();
200
231
  return b(() => {
201
232
  if (t)
202
233
  return;
@@ -204,24 +235,24 @@ const me = (e) => {
204
235
  try {
205
236
  await e();
206
237
  } catch (i) {
207
- i instanceof Error && await _({
238
+ i instanceof Error && await A({
208
239
  message: "Action failed",
209
240
  detailedMessage: i.message,
210
241
  variant: "error",
211
- dedupeKey: P(s)
242
+ dedupeKey: _(s)
212
243
  });
213
244
  } finally {
214
- await R();
245
+ await P();
215
246
  }
216
247
  })();
217
248
  }, [e, t, s]), null;
218
- }, Ce = ({
249
+ }, ge = ({
219
250
  to: e,
220
251
  params: t,
221
252
  queryParams: n,
222
253
  options: s
223
254
  }) => {
224
- const [u, i] = T(!1), p = g();
255
+ const [u, i] = T(!1), p = R();
225
256
  return b(() => {
226
257
  if (u)
227
258
  return;
@@ -229,14 +260,14 @@ const me = (e) => {
229
260
  try {
230
261
  await J(e, t, n, s);
231
262
  } catch (E) {
232
- E instanceof Error && await _({
263
+ E instanceof Error && await A({
233
264
  message: "Action failed",
234
265
  detailedMessage: E.message,
235
266
  variant: "error",
236
- dedupeKey: P(p)
267
+ dedupeKey: _(p)
237
268
  });
238
269
  } finally {
239
- await R();
270
+ await P();
240
271
  }
241
272
  })();
242
273
  }, [e, t, n, s, u, p]), null;
@@ -247,7 +278,7 @@ const me = (e) => {
247
278
  onClick: s,
248
279
  shouldResetSearchState: u = !1
249
280
  }) => {
250
- const [i, p] = T(!1), v = g();
281
+ const [i, p] = T(!1), v = R();
251
282
  return b(() => {
252
283
  if (i)
253
284
  return;
@@ -261,14 +292,14 @@ const me = (e) => {
261
292
  shouldResetSearchState: u
262
293
  });
263
294
  } catch (I) {
264
- I instanceof Error && await _({
295
+ I instanceof Error && await A({
265
296
  message: "Action failed",
266
297
  detailedMessage: I.message,
267
298
  variant: "error",
268
- dedupeKey: P(v)
299
+ dedupeKey: _(v)
269
300
  });
270
301
  } finally {
271
- await R();
302
+ await P();
272
303
  }
273
304
  })();
274
305
  }, [
@@ -308,7 +339,7 @@ class re {
308
339
  this.onChange(t);
309
340
  }
310
341
  }
311
- const ye = (e) => {
342
+ const Pe = (e) => {
312
343
  const t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), s = (r) => {
313
344
  if (t.has(r))
314
345
  return;
@@ -332,8 +363,8 @@ const ye = (e) => {
332
363
  });
333
364
  } catch {
334
365
  }
335
- const M = Object.getPrototypeOf(r), C = Object.getOwnPropertyDescriptor(r, "textContent") ?? Object.getOwnPropertyDescriptor(M, "textContent") ?? Object.getOwnPropertyDescriptor(
336
- Object.getPrototypeOf(M),
366
+ const F = Object.getPrototypeOf(r), C = Object.getOwnPropertyDescriptor(r, "textContent") ?? Object.getOwnPropertyDescriptor(F, "textContent") ?? Object.getOwnPropertyDescriptor(
367
+ Object.getPrototypeOf(F),
337
368
  "textContent"
338
369
  );
339
370
  if (C?.set) {
@@ -341,8 +372,8 @@ const ye = (e) => {
341
372
  try {
342
373
  Object.defineProperty(r, "textContent", {
343
374
  get: C.get,
344
- set(d) {
345
- a.call(this, d), o.cssText = d ?? "";
375
+ set(c) {
376
+ a.call(this, c), o.cssText = c ?? "";
346
377
  },
347
378
  configurable: !0
348
379
  });
@@ -352,15 +383,15 @@ const ye = (e) => {
352
383
  const K = r.appendChild.bind(r);
353
384
  try {
354
385
  r.appendChild = (a) => {
355
- const d = K(a);
356
- return O(), d;
386
+ const c = K(a);
387
+ return O(), c;
357
388
  };
358
389
  } catch {
359
390
  }
360
391
  const H = r.insertBefore.bind(r);
361
392
  try {
362
- r.insertBefore = (a, d) => {
363
- const B = H(a, d);
393
+ r.insertBefore = (a, c) => {
394
+ const B = H(a, c);
364
395
  return O(), B;
365
396
  };
366
397
  } catch {
@@ -368,8 +399,8 @@ const ye = (e) => {
368
399
  const Y = r.removeChild.bind(r);
369
400
  try {
370
401
  r.removeChild = (a) => {
371
- const d = Y(a);
372
- return O(), d;
402
+ const c = Y(a);
403
+ return O(), c;
373
404
  };
374
405
  } catch {
375
406
  }
@@ -385,20 +416,20 @@ const ye = (e) => {
385
416
  }), n.set(r, a));
386
417
  } catch {
387
418
  }
388
- const F = r.textContent;
389
- F && (o.cssText = F), e.appendChild(o);
419
+ const M = r.textContent;
420
+ M && (o.cssText = M), e.appendChild(o);
390
421
  }, u = (r) => {
391
422
  const o = n.get(r);
392
423
  o && (o.disconnect(), n.delete(r));
393
- const c = t.get(r);
394
- c && c.parentNode && (c.parentNode.removeChild(c), t.delete(r));
424
+ const d = t.get(r);
425
+ d && d.parentNode && (d.parentNode.removeChild(d), t.delete(r));
395
426
  }, 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);
396
427
  i.appendChild = (r) => {
397
428
  const o = p(r);
398
429
  return f(r) && s(r), o;
399
430
  }, i.insertBefore = (r, o) => {
400
- const c = v(r, o);
401
- return f(r) && s(r), c;
431
+ const d = v(r, o);
432
+ return f(r) && s(r), d;
402
433
  }, i.append = (...r) => {
403
434
  E(...r);
404
435
  for (const o of r)
@@ -408,8 +439,8 @@ const ye = (e) => {
408
439
  for (const o of r)
409
440
  f(o) && s(o);
410
441
  }, i.replaceChild = (r, o) => {
411
- const c = k(r, o);
412
- return f(o) && u(o), f(r) && s(r), c;
442
+ const d = k(r, o);
443
+ return f(o) && u(o), f(r) && s(r), d;
413
444
  }, i.removeChild = (r) => {
414
445
  const o = j(r);
415
446
  return f(r) && u(r), o;
@@ -423,51 +454,53 @@ const ye = (e) => {
423
454
  get: () => [],
424
455
  configurable: !0
425
456
  });
426
- }, f = (e) => typeof e != "string" && "localName" in e && e.localName === "style", _e = (e) => {
457
+ }, f = (e) => typeof e != "string" && "localName" in e && e.localName === "style", Re = (e) => {
427
458
  for (const [t, n] of Object.entries(e))
428
459
  globalThis[t] = n;
429
460
  };
430
461
  export {
431
- Pe as ALLOWED_HTML_ELEMENTS,
432
- be as Action,
433
- Ce as ActionLink,
462
+ Fe as ALLOWED_HTML_ELEMENTS,
463
+ ye as Action,
464
+ ge as ActionLink,
434
465
  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,
466
+ Me as AggregateOperations,
467
+ Ne as AppPath,
468
+ Te as COMMON_HTML_EVENTS,
469
+ we as CommandMenuPages,
470
+ be as EVENT_TO_REACT,
440
471
  N as FieldType,
441
- Te as HTML_COMMON_PROPERTIES,
442
- Ne as HTML_TAG_TO_REMOTE_COMPONENT,
472
+ Ce as HTML_COMMON_PROPERTIES,
473
+ De as HTML_TAG_TO_REMOTE_COMPONENT,
443
474
  h as ObjectRecordGroupByDateGranularity,
444
- we as OnDeleteAction,
445
- xe as PageLayoutTabLayoutMode,
475
+ xe as OnDeleteAction,
476
+ Ue as PageLayoutTabLayoutMode,
446
477
  Q as PermissionFlag,
447
- De as RelationType,
448
- Ue as STANDARD_OBJECT,
449
- ke as STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
450
- Ee as closeSidePanel,
478
+ ke as RelationType,
479
+ je as STANDARD_OBJECT,
480
+ Ve as STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
481
+ Ie as closeSidePanel,
451
482
  l as createValidationResult,
452
483
  ae as defineApplication,
453
484
  le as defineField,
454
485
  ue as defineFrontComponent,
455
- 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,
486
+ de as defineLogicFunction,
487
+ fe as defineNavigationMenuItem,
488
+ he as defineObject,
489
+ me as definePageLayout,
490
+ pe as definePostInstallLogicFunction,
491
+ ce as definePreInstallLogicFunction,
492
+ ve as defineRole,
493
+ Ee as defineSkill,
494
+ Se as defineView,
495
+ A as enqueueSnackbar,
496
+ Re as exposeGlobals,
497
+ _ as getFrontComponentActionErrorDedupeKey,
498
+ Pe as installStyleBridge,
466
499
  J as navigate,
467
500
  z as openSidePanelPage,
468
- R as unmountFrontComponent,
501
+ P as unmountFrontComponent,
469
502
  U as useFrontComponentExecutionContext,
470
- g as useFrontComponentId,
471
- Se as useUserId,
472
- x as validateFields
503
+ R as useFrontComponentId,
504
+ Oe as useUserId,
505
+ D as validateFields
473
506
  };
@@ -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 {};
@@ -133,7 +133,110 @@ const t = [
133
133
  }
134
134
  },
135
135
  { tag: "html-br", name: "HtmlBr", properties: {} },
136
- { tag: "html-hr", name: "HtmlHr", properties: {} }
136
+ { tag: "html-hr", name: "HtmlHr", properties: {} },
137
+ {
138
+ tag: "html-iframe",
139
+ name: "HtmlIframe",
140
+ properties: {
141
+ src: { type: "string", optional: !0 },
142
+ name: { type: "string", optional: !0 },
143
+ width: { type: "string", optional: !0 },
144
+ height: { type: "string", optional: !0 },
145
+ allow: { type: "string", optional: !0 },
146
+ sandbox: { type: "string", 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 }
151
+ }
152
+ },
153
+ {
154
+ tag: "html-video",
155
+ name: "HtmlVideo",
156
+ properties: {
157
+ src: { type: "string", optional: !0 },
158
+ poster: { type: "string", optional: !0 },
159
+ controls: { type: "boolean", optional: !0 },
160
+ autoPlay: { type: "boolean", optional: !0 },
161
+ loop: { type: "boolean", optional: !0 },
162
+ muted: { type: "boolean", optional: !0 },
163
+ preload: { type: "string", optional: !0 },
164
+ width: { type: "string", optional: !0 },
165
+ height: { type: "string", optional: !0 },
166
+ crossOrigin: { type: "string", optional: !0 },
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
+ ]
192
+ },
193
+ {
194
+ tag: "html-audio",
195
+ name: "HtmlAudio",
196
+ properties: {
197
+ src: { type: "string", optional: !0 },
198
+ controls: { type: "boolean", optional: !0 },
199
+ autoPlay: { type: "boolean", optional: !0 },
200
+ loop: { type: "boolean", optional: !0 },
201
+ muted: { type: "boolean", optional: !0 },
202
+ preload: { type: "string", optional: !0 },
203
+ crossOrigin: { type: "string", optional: !0 }
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
+ ]
226
+ },
227
+ {
228
+ tag: "html-source",
229
+ name: "HtmlSource",
230
+ properties: {
231
+ src: { type: "string", optional: !0 },
232
+ type: { 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 }
238
+ }
239
+ }
137
240
  ];
138
241
  export {
139
242
  t as ALLOWED_HTML_ELEMENTS
@@ -1 +1 @@
1
- {"version":3,"file":"AllowedHtmlElements.js","sources":["../../../../src/sdk/front-component-api/constants/AllowedHtmlElements.ts"],"sourcesContent":["type PropertySchema = {\n type: 'string' | 'number' | 'boolean';\n optional: boolean;\n};\n\nexport type AllowedHtmlElement = {\n tag: string;\n name: string;\n properties: Record<string, PropertySchema>;\n};\n\nexport const ALLOWED_HTML_ELEMENTS: AllowedHtmlElement[] = [\n { tag: 'html-div', name: 'HtmlDiv', properties: {} },\n { tag: 'html-span', name: 'HtmlSpan', properties: {} },\n { tag: 'html-section', name: 'HtmlSection', properties: {} },\n { tag: 'html-article', name: 'HtmlArticle', properties: {} },\n { tag: 'html-header', name: 'HtmlHeader', properties: {} },\n { tag: 'html-footer', name: 'HtmlFooter', properties: {} },\n { tag: 'html-main', name: 'HtmlMain', properties: {} },\n { tag: 'html-nav', name: 'HtmlNav', properties: {} },\n { tag: 'html-aside', name: 'HtmlAside', properties: {} },\n { tag: 'html-p', name: 'HtmlP', properties: {} },\n { tag: 'html-h1', name: 'HtmlH1', properties: {} },\n { tag: 'html-h2', name: 'HtmlH2', properties: {} },\n { tag: 'html-h3', name: 'HtmlH3', properties: {} },\n { tag: 'html-h4', name: 'HtmlH4', properties: {} },\n { tag: 'html-h5', name: 'HtmlH5', properties: {} },\n { tag: 'html-h6', name: 'HtmlH6', properties: {} },\n { tag: 'html-strong', name: 'HtmlStrong', properties: {} },\n { tag: 'html-em', name: 'HtmlEm', properties: {} },\n { tag: 'html-small', name: 'HtmlSmall', properties: {} },\n { tag: 'html-code', name: 'HtmlCode', properties: {} },\n { tag: 'html-pre', name: 'HtmlPre', properties: {} },\n { tag: 'html-blockquote', name: 'HtmlBlockquote', properties: {} },\n {\n tag: 'html-a',\n name: 'HtmlA',\n properties: {\n href: { type: 'string', optional: true },\n target: { type: 'string', optional: true },\n rel: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-img',\n name: 'HtmlImg',\n properties: {\n src: { type: 'string', optional: true },\n alt: { type: 'string', optional: true },\n width: { type: 'number', optional: true },\n height: { type: 'number', optional: true },\n },\n },\n { tag: 'html-ul', name: 'HtmlUl', properties: {} },\n { tag: 'html-ol', name: 'HtmlOl', properties: {} },\n { tag: 'html-li', name: 'HtmlLi', properties: {} },\n {\n tag: 'html-form',\n name: 'HtmlForm',\n properties: {\n action: { type: 'string', optional: true },\n method: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-label',\n name: 'HtmlLabel',\n properties: {\n htmlFor: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-input',\n name: 'HtmlInput',\n properties: {\n type: { type: 'string', optional: true },\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n placeholder: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n checked: { type: 'boolean', optional: true },\n readOnly: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-textarea',\n name: 'HtmlTextarea',\n properties: {\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n placeholder: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n readOnly: { type: 'boolean', optional: true },\n rows: { type: 'number', optional: true },\n cols: { type: 'number', optional: true },\n },\n },\n {\n tag: 'html-select',\n name: 'HtmlSelect',\n properties: {\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n multiple: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-option',\n name: 'HtmlOption',\n properties: {\n value: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n selected: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-button',\n name: 'HtmlButton',\n properties: {\n type: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n },\n },\n { tag: 'html-table', name: 'HtmlTable', properties: {} },\n { tag: 'html-thead', name: 'HtmlThead', properties: {} },\n { tag: 'html-tbody', name: 'HtmlTbody', properties: {} },\n { tag: 'html-tfoot', name: 'HtmlTfoot', properties: {} },\n { tag: 'html-tr', name: 'HtmlTr', properties: {} },\n {\n tag: 'html-th',\n name: 'HtmlTh',\n properties: {\n colSpan: { type: 'number', optional: true },\n rowSpan: { type: 'number', optional: true },\n },\n },\n {\n tag: 'html-td',\n name: 'HtmlTd',\n properties: {\n colSpan: { type: 'number', optional: true },\n rowSpan: { type: 'number', optional: true },\n },\n },\n { tag: 'html-br', name: 'HtmlBr', properties: {} },\n { tag: 'html-hr', name: 'HtmlHr', properties: {} },\n];\n"],"names":["ALLOWED_HTML_ELEMENTS"],"mappings":"AAWO,MAAMA,IAA8C;AAAA,EACzD,EAAE,KAAK,YAAY,MAAM,WAAW,YAAY,CAAA,EAAC;AAAA,EACjD,EAAE,KAAK,aAAa,MAAM,YAAY,YAAY,CAAA,EAAC;AAAA,EACnD,EAAE,KAAK,gBAAgB,MAAM,eAAe,YAAY,CAAA,EAAC;AAAA,EACzD,EAAE,KAAK,gBAAgB,MAAM,eAAe,YAAY,CAAA,EAAC;AAAA,EACzD,EAAE,KAAK,eAAe,MAAM,cAAc,YAAY,CAAA,EAAC;AAAA,EACvD,EAAE,KAAK,eAAe,MAAM,cAAc,YAAY,CAAA,EAAC;AAAA,EACvD,EAAE,KAAK,aAAa,MAAM,YAAY,YAAY,CAAA,EAAC;AAAA,EACnD,EAAE,KAAK,YAAY,MAAM,WAAW,YAAY,CAAA,EAAC;AAAA,EACjD,EAAE,KAAK,cAAc,MAAM,aAAa,YAAY,CAAA,EAAC;AAAA,EACrD,EAAE,KAAK,UAAU,MAAM,SAAS,YAAY,CAAA,EAAC;AAAA,EAC7C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AAAA,EAC/C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AAAA,EAC/C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AAAA,EAC/C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AAAA,EAC/C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AAAA,EAC/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EAAC;AAAA,EAC/C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AACjD;"}
1
+ {"version":3,"file":"AllowedHtmlElements.js","sources":["../../../../src/sdk/front-component-api/constants/AllowedHtmlElements.ts"],"sourcesContent":["type PropertySchema = {\n type: 'string' | 'number' | 'boolean';\n optional: boolean;\n};\n\nexport type AllowedHtmlElement = {\n tag: string;\n name: string;\n properties: Record<string, PropertySchema>;\n events?: string[];\n};\n\nexport const ALLOWED_HTML_ELEMENTS: AllowedHtmlElement[] = [\n { tag: 'html-div', name: 'HtmlDiv', properties: {} },\n { tag: 'html-span', name: 'HtmlSpan', properties: {} },\n { tag: 'html-section', name: 'HtmlSection', properties: {} },\n { tag: 'html-article', name: 'HtmlArticle', properties: {} },\n { tag: 'html-header', name: 'HtmlHeader', properties: {} },\n { tag: 'html-footer', name: 'HtmlFooter', properties: {} },\n { tag: 'html-main', name: 'HtmlMain', properties: {} },\n { tag: 'html-nav', name: 'HtmlNav', properties: {} },\n { tag: 'html-aside', name: 'HtmlAside', properties: {} },\n { tag: 'html-p', name: 'HtmlP', properties: {} },\n { tag: 'html-h1', name: 'HtmlH1', properties: {} },\n { tag: 'html-h2', name: 'HtmlH2', properties: {} },\n { tag: 'html-h3', name: 'HtmlH3', properties: {} },\n { tag: 'html-h4', name: 'HtmlH4', properties: {} },\n { tag: 'html-h5', name: 'HtmlH5', properties: {} },\n { tag: 'html-h6', name: 'HtmlH6', properties: {} },\n { tag: 'html-strong', name: 'HtmlStrong', properties: {} },\n { tag: 'html-em', name: 'HtmlEm', properties: {} },\n { tag: 'html-small', name: 'HtmlSmall', properties: {} },\n { tag: 'html-code', name: 'HtmlCode', properties: {} },\n { tag: 'html-pre', name: 'HtmlPre', properties: {} },\n { tag: 'html-blockquote', name: 'HtmlBlockquote', properties: {} },\n {\n tag: 'html-a',\n name: 'HtmlA',\n properties: {\n href: { type: 'string', optional: true },\n target: { type: 'string', optional: true },\n rel: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-img',\n name: 'HtmlImg',\n properties: {\n src: { type: 'string', optional: true },\n alt: { type: 'string', optional: true },\n width: { type: 'number', optional: true },\n height: { type: 'number', optional: true },\n },\n },\n { tag: 'html-ul', name: 'HtmlUl', properties: {} },\n { tag: 'html-ol', name: 'HtmlOl', properties: {} },\n { tag: 'html-li', name: 'HtmlLi', properties: {} },\n {\n tag: 'html-form',\n name: 'HtmlForm',\n properties: {\n action: { type: 'string', optional: true },\n method: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-label',\n name: 'HtmlLabel',\n properties: {\n htmlFor: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-input',\n name: 'HtmlInput',\n properties: {\n type: { type: 'string', optional: true },\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n placeholder: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n checked: { type: 'boolean', optional: true },\n readOnly: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-textarea',\n name: 'HtmlTextarea',\n properties: {\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n placeholder: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n readOnly: { type: 'boolean', optional: true },\n rows: { type: 'number', optional: true },\n cols: { type: 'number', optional: true },\n },\n },\n {\n tag: 'html-select',\n name: 'HtmlSelect',\n properties: {\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n multiple: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-option',\n name: 'HtmlOption',\n properties: {\n value: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n selected: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-button',\n name: 'HtmlButton',\n properties: {\n type: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n },\n },\n { tag: 'html-table', name: 'HtmlTable', properties: {} },\n { tag: 'html-thead', name: 'HtmlThead', properties: {} },\n { tag: 'html-tbody', name: 'HtmlTbody', properties: {} },\n { tag: 'html-tfoot', name: 'HtmlTfoot', properties: {} },\n { tag: 'html-tr', name: 'HtmlTr', properties: {} },\n {\n tag: 'html-th',\n name: 'HtmlTh',\n properties: {\n colSpan: { type: 'number', optional: true },\n rowSpan: { type: 'number', optional: true },\n },\n },\n {\n tag: 'html-td',\n name: 'HtmlTd',\n properties: {\n colSpan: { type: 'number', optional: true },\n rowSpan: { type: 'number', optional: true },\n },\n },\n { tag: 'html-br', name: 'HtmlBr', properties: {} },\n { tag: 'html-hr', name: 'HtmlHr', properties: {} },\n {\n tag: 'html-iframe',\n name: 'HtmlIframe',\n properties: {\n src: { type: 'string', optional: true },\n name: { type: 'string', optional: true },\n width: { type: 'string', optional: true },\n height: { type: 'string', optional: true },\n allow: { type: 'string', optional: true },\n sandbox: { type: 'string', optional: true },\n allowFullScreen: { type: 'boolean', optional: true },\n loading: { type: 'string', optional: true },\n referrerPolicy: { type: 'string', optional: true },\n srcDoc: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-video',\n name: 'HtmlVideo',\n properties: {\n src: { type: 'string', optional: true },\n poster: { type: 'string', optional: true },\n controls: { type: 'boolean', optional: true },\n autoPlay: { type: 'boolean', optional: true },\n loop: { type: 'boolean', optional: true },\n muted: { type: 'boolean', optional: true },\n preload: { type: 'string', optional: true },\n width: { type: 'string', optional: true },\n height: { type: 'string', optional: true },\n crossOrigin: { type: 'string', optional: true },\n playsInline: { type: 'boolean', optional: true },\n disablePictureInPicture: { type: 'boolean', optional: true },\n disableRemotePlayback: { type: 'boolean', optional: true },\n },\n events: [\n 'timeupdate',\n 'play',\n 'pause',\n 'ended',\n 'loadedmetadata',\n 'loadeddata',\n 'volumechange',\n 'seeking',\n 'seeked',\n 'error',\n 'canplay',\n 'canplaythrough',\n 'waiting',\n 'progress',\n 'durationchange',\n 'ratechange',\n 'stalled',\n 'suspend',\n 'emptied',\n ],\n },\n {\n tag: 'html-audio',\n name: 'HtmlAudio',\n properties: {\n src: { type: 'string', optional: true },\n controls: { type: 'boolean', optional: true },\n autoPlay: { type: 'boolean', optional: true },\n loop: { type: 'boolean', optional: true },\n muted: { type: 'boolean', optional: true },\n preload: { type: 'string', optional: true },\n crossOrigin: { type: 'string', optional: true },\n },\n events: [\n 'timeupdate',\n 'play',\n 'pause',\n 'ended',\n 'loadedmetadata',\n 'loadeddata',\n 'volumechange',\n 'seeking',\n 'seeked',\n 'error',\n 'canplay',\n 'canplaythrough',\n 'waiting',\n 'progress',\n 'durationchange',\n 'ratechange',\n 'stalled',\n 'suspend',\n 'emptied',\n ],\n },\n {\n tag: 'html-source',\n name: 'HtmlSource',\n properties: {\n src: { type: 'string', optional: true },\n type: { type: 'string', optional: true },\n media: { type: 'string', optional: true },\n srcSet: { type: 'string', optional: true },\n sizes: { type: 'string', optional: true },\n width: { type: 'number', optional: true },\n height: { type: 'number', optional: true },\n },\n },\n];\n"],"names":["ALLOWED_HTML_ELEMENTS"],"mappings":"AAYO,MAAMA,IAA8C;AAAA,EACzD,EAAE,KAAK,YAAY,MAAM,WAAW,YAAY,CAAA,EAAC;AAAA,EACjD,EAAE,KAAK,aAAa,MAAM,YAAY,YAAY,CAAA,EAAC;AAAA,EACnD,EAAE,KAAK,gBAAgB,MAAM,eAAe,YAAY,CAAA,EAAC;AAAA,EACzD,EAAE,KAAK,gBAAgB,MAAM,eAAe,YAAY,CAAA,EAAC;AAAA,EACzD,EAAE,KAAK,eAAe,MAAM,cAAc,YAAY,CAAA,EAAC;AAAA,EACvD,EAAE,KAAK,eAAe,MAAM,cAAc,YAAY,CAAA,EAAC;AAAA,EACvD,EAAE,KAAK,aAAa,MAAM,YAAY,YAAY,CAAA,EAAC;AAAA,EACnD,EAAE,KAAK,YAAY,MAAM,WAAW,YAAY,CAAA,EAAC;AAAA,EACjD,EAAE,KAAK,cAAc,MAAM,aAAa,YAAY,CAAA,EAAC;AAAA,EACrD,EAAE,KAAK,UAAU,MAAM,SAAS,YAAY,CAAA,EAAC;AAAA,EAC7C,EAA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