twenty-sdk 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/README.md +1 -1
  2. package/dist/{HtmlTagToRemoteComponent-DBOkvIRB.mjs → HtmlTagToRemoteComponent-CALlgbCB.mjs} +283 -231
  3. package/dist/{HtmlTagToRemoteComponent-DzQ2I9Lz.js → HtmlTagToRemoteComponent-DvFlyCDv.js} +11 -11
  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/client/client-service.d.ts +6 -1
  8. package/dist/cli/utilities/dev/orchestrator/dev-mode-orchestrator.d.ts +2 -0
  9. package/dist/cli/utilities/dev/orchestrator/steps/start-watchers-orchestrator-step.d.ts +2 -0
  10. package/dist/cli.cjs +376 -70
  11. package/dist/cli.mjs +2139 -1769
  12. package/dist/front-component-renderer/index.cjs +10 -10
  13. package/dist/front-component-renderer/index.d.ts +3 -3
  14. package/dist/front-component-renderer/index.mjs +2048 -1877
  15. package/dist/front-component-renderer/remote/generated/remote-components.d.ts +4 -0
  16. package/dist/front-component-renderer/remote/generated/remote-elements.d.ts +43 -0
  17. package/dist/front-component-renderer/types/FrontComponentHostCommunicationApi.d.ts +2 -1
  18. package/dist/{get-function-input-schema-BZ7_XyUh-By3UDh4s.mjs → get-function-input-schema-BZ7_XyUh-C9RBS5oC.mjs} +1 -1
  19. package/dist/{get-function-input-schema-BZ7_XyUh-GxSybvDe.js → get-function-input-schema-BZ7_XyUh-CzwPUwwE.js} +1 -1
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.mjs +2 -2
  22. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js +53 -1
  23. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js.map +1 -1
  24. package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.d.ts +2 -0
  25. package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.js.map +1 -1
  26. package/package.json +17 -1
@@ -41,4 +41,8 @@ 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
+ 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>>;
47
+ 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
48
  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,45 @@ 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
+ width?: string;
141
+ height?: string;
142
+ allow?: string;
143
+ sandbox?: string;
144
+ allowFullScreen?: boolean;
145
+ };
146
+ export declare const HtmlIframeElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlIframeProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
147
+ export type HtmlVideoProperties = HtmlCommonProperties & {
148
+ src?: string;
149
+ poster?: string;
150
+ controls?: boolean;
151
+ autoPlay?: boolean;
152
+ loop?: boolean;
153
+ muted?: boolean;
154
+ preload?: string;
155
+ width?: string;
156
+ height?: string;
157
+ crossOrigin?: string;
158
+ playsInline?: boolean;
159
+ };
160
+ export declare const HtmlVideoElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlVideoProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
161
+ export type HtmlAudioProperties = HtmlCommonProperties & {
162
+ src?: string;
163
+ controls?: boolean;
164
+ autoPlay?: boolean;
165
+ loop?: boolean;
166
+ muted?: boolean;
167
+ preload?: string;
168
+ crossOrigin?: string;
169
+ };
170
+ export declare const HtmlAudioElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlAudioProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
171
+ export type HtmlSourceProperties = HtmlCommonProperties & {
172
+ src?: string;
173
+ type?: string;
174
+ media?: string;
175
+ };
176
+ export declare const HtmlSourceElement: import("@remote-dom/core/elements").RemoteElementConstructor<HtmlSourceProperties, Record<string, never>, Record<string, never>, HtmlCommonEvents>;
138
177
  export type RemoteStyleProperties = {
139
178
  cssText?: string;
140
179
  styleKey?: string;
@@ -186,6 +225,10 @@ declare global {
186
225
  'html-td': InstanceType<typeof HtmlTdElement>;
187
226
  'html-br': InstanceType<typeof HtmlBrElement>;
188
227
  'html-hr': InstanceType<typeof HtmlHrElement>;
228
+ 'html-iframe': InstanceType<typeof HtmlIframeElement>;
229
+ 'html-video': InstanceType<typeof HtmlVideoElement>;
230
+ 'html-audio': InstanceType<typeof HtmlAudioElement>;
231
+ 'html-source': InstanceType<typeof HtmlSourceElement>;
189
232
  'remote-style': InstanceType<typeof RemoteStyleElement>;
190
233
  'remote-root': InstanceType<typeof RemoteRootElement>;
191
234
  '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,5 +1,5 @@
1
1
  import { createSourceFile as p, ScriptTarget as l, SyntaxKind as t } from "typescript";
2
- import { o } from "./HtmlTagToRemoteComponent-DBOkvIRB.mjs";
2
+ import { o } from "./HtmlTagToRemoteComponent-CALlgbCB.mjs";
3
3
  const c = (r) => {
4
4
  switch (r.kind) {
5
5
  case t.NumberKeyword:
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("typescript"),o=require("./HtmlTagToRemoteComponent-DzQ2I9Lz.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("typescript"),o=require("./HtmlTagToRemoteComponent-DvFlyCDv.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;
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(`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@sniptt/guards"),p=require("react"),a=require("./HtmlTagToRemoteComponent-DvFlyCDv.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
2
  `);this.onChange(t)}}const Se=e=>{const t=new WeakMap,n=new WeakMap,s=i=>{if(t.has(i))return;const o=document.createElement("remote-style");t.set(i,o);const M=(i.getAttributeNames?.()??[]).filter(u=>u.startsWith("data-")).map(u=>`${u}=${i.getAttribute(u)??""}`).join(";");M.length>0&&(o.styleKey=M);const T=()=>{o.cssText=i.textContent??""},j=new Ee(u=>{o.cssText=u});try{Object.defineProperty(i,"sheet",{get:()=>j,configurable:!0})}catch{}const L=Object.getPrototypeOf(i),_=Object.getOwnPropertyDescriptor(i,"textContent")??Object.getOwnPropertyDescriptor(L,"textContent")??Object.getOwnPropertyDescriptor(Object.getPrototypeOf(L),"textContent");if(_?.set){const u=_.set;try{Object.defineProperty(i,"textContent",{get:_.get,set(f){u.call(this,f),o.cssText=f??""},configurable:!0})}catch{}}const W=i.appendChild.bind(i);try{i.appendChild=u=>{const f=W(u);return T(),f}}catch{}const K=i.insertBefore.bind(i);try{i.insertBefore=(u,f)=>{const B=K(u,f);return T(),B}}catch{}const Y=i.removeChild.bind(i);try{i.removeChild=u=>{const f=Y(u);return T(),f}}catch{}if(typeof MutationObserver=="function")try{const u=new MutationObserver(()=>{T()});typeof u.observe=="function"&&(u.observe(i,{subtree:!0,childList:!0,characterData:!0}),n.set(i,u))}catch{}const F=i.textContent;F&&(o.cssText=F),e.appendChild(o)},l=i=>{const o=n.get(i);o&&(o.disconnect(),n.delete(i));const d=t.get(i);d&&d.parentNode&&(d.parentNode.removeChild(d),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),H=r.removeChild.bind(r);r.appendChild=i=>{const o=h(i);return m(i)&&s(i),o},r.insertBefore=(i,o)=>{const d=E(i,o);return m(i)&&s(i),d},r.append=(...i)=>{S(...i);for(const o of i)m(o)&&s(o)},r.prepend=(...i)=>{O(...i);for(const o of i)m(o)&&s(o)},r.replaceChild=(i,o)=>{const d=k(i,o);return m(o)&&l(o),m(i)&&s(i),d},r.removeChild=i=>{const o=H(i);return m(i)&&l(i),o};const V=Array.from(r.querySelectorAll("style"));for(const i of V)s(i);Object.defineProperty(document,"styleSheets",{get:()=>[],configurable:!0})},m=e=>typeof e!="string"&&"localName"in e&&e.localName==="style",Oe=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=pe;exports.ActionLink=fe;exports.ActionOpenSidePanelPage=he;exports.COMMON_HTML_EVENTS=le;exports.EVENT_TO_REACT=ce;exports.HTML_COMMON_PROPERTIES=de;exports.ObjectRecordGroupByDateGranularity=v;exports.PermissionFlag=w;exports.closeSidePanel=se;exports.createValidationResult=c;exports.defineApplication=G;exports.defineField=Q;exports.defineFrontComponent=q;exports.defineLogicFunction=$;exports.defineNavigationMenuItem=X;exports.defineObject=J;exports.definePageLayout=z;exports.defineRole=Z;exports.defineSkill=ee;exports.defineView=te;exports.enqueueSnackbar=I;exports.exposeGlobals=Oe;exports.getFrontComponentActionErrorDedupeKey=A;exports.installStyleBridge=Se;exports.navigate=x;exports.openSidePanelPage=U;exports.unmountFrontComponent=C;exports.useFrontComponentExecutionContext=P;exports.useFrontComponentId=b;exports.useUserId=ue;exports.validateFields=g;
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-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-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";
5
5
  const l = ({
6
6
  config: e,
7
7
  errors: t = []
@@ -133,7 +133,59 @@ 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
+ title: { 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
+ }
149
+ },
150
+ {
151
+ tag: "html-video",
152
+ name: "HtmlVideo",
153
+ properties: {
154
+ src: { type: "string", optional: !0 },
155
+ poster: { type: "string", optional: !0 },
156
+ controls: { type: "boolean", optional: !0 },
157
+ autoPlay: { type: "boolean", optional: !0 },
158
+ loop: { type: "boolean", optional: !0 },
159
+ muted: { type: "boolean", optional: !0 },
160
+ preload: { type: "string", optional: !0 },
161
+ width: { type: "string", optional: !0 },
162
+ height: { type: "string", optional: !0 },
163
+ crossOrigin: { type: "string", optional: !0 },
164
+ playsInline: { type: "boolean", optional: !0 }
165
+ }
166
+ },
167
+ {
168
+ tag: "html-audio",
169
+ name: "HtmlAudio",
170
+ properties: {
171
+ src: { type: "string", optional: !0 },
172
+ controls: { type: "boolean", optional: !0 },
173
+ autoPlay: { type: "boolean", optional: !0 },
174
+ loop: { type: "boolean", optional: !0 },
175
+ muted: { type: "boolean", optional: !0 },
176
+ preload: { type: "string", optional: !0 },
177
+ crossOrigin: { type: "string", optional: !0 }
178
+ }
179
+ },
180
+ {
181
+ tag: "html-source",
182
+ name: "HtmlSource",
183
+ properties: {
184
+ src: { type: "string", optional: !0 },
185
+ type: { type: "string", optional: !0 },
186
+ media: { type: "string", optional: !0 }
187
+ }
188
+ }
137
189
  ];
138
190
  export {
139
191
  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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EAEF,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,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};\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 title: { 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 },\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 },\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 },\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 },\n },\n];\n"],"names":["ALLOWED_HTML_ELEMENTS"],"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A,IAAK;AAAA,EAChD;AAAA,EAEF;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,IACN,YAAY;AAAA,MACV,KAAK,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACjC,MAAM,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MAClC,OAAO,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,IAAK;AAAA,EAC1C;AAEJ;"}
@@ -10,8 +10,10 @@ export type OpenSidePanelPageFunction = (params: {
10
10
  export type UnmountFrontComponentFunction = () => Promise<void>;
11
11
  export type EnqueueSnackbarFunction = (params: EnqueueSnackbarParams) => Promise<void>;
12
12
  export type CloseSidePanelFunction = () => Promise<void>;
13
+ export type RequestAccessTokenRefreshFunction = () => Promise<string>;
13
14
  export type FrontComponentHostCommunicationApiStore = {
14
15
  navigate?: NavigateFunction;
16
+ requestAccessTokenRefresh?: RequestAccessTokenRefreshFunction;
15
17
  openSidePanelPage?: OpenSidePanelPageFunction;
16
18
  unmountFrontComponent?: UnmountFrontComponentFunction;
17
19
  enqueueSnackbar?: EnqueueSnackbarFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"frontComponentHostCommunicationApi.js","sources":["../../../../src/sdk/front-component-api/globals/frontComponentHostCommunicationApi.ts"],"sourcesContent":["import {\n type AppPath,\n type CommandMenuPages,\n type EnqueueSnackbarParams,\n type NavigateOptions,\n} from 'twenty-shared/types';\nimport { type getAppPath } from 'twenty-shared/utils';\n\nexport type NavigateFunction = <T extends AppPath>(\n to: T,\n params?: Parameters<typeof getAppPath<T>>[1],\n queryParams?: Record<string, any>,\n options?: NavigateOptions,\n) => Promise<void>;\n\nexport type OpenSidePanelPageFunction = (params: {\n page: CommandMenuPages;\n pageTitle: string;\n pageIcon?: string;\n shouldResetSearchState?: boolean;\n}) => Promise<void>;\n\nexport type UnmountFrontComponentFunction = () => Promise<void>;\n\nexport type EnqueueSnackbarFunction = (\n params: EnqueueSnackbarParams,\n) => Promise<void>;\n\nexport type CloseSidePanelFunction = () => Promise<void>;\n\nexport type FrontComponentHostCommunicationApiStore = {\n navigate?: NavigateFunction;\n openSidePanelPage?: OpenSidePanelPageFunction;\n unmountFrontComponent?: UnmountFrontComponentFunction;\n enqueueSnackbar?: EnqueueSnackbarFunction;\n closeSidePanel?: CloseSidePanelFunction;\n};\n\ndeclare global {\n var frontComponentHostCommunicationApi: FrontComponentHostCommunicationApiStore;\n}\n\nglobalThis.frontComponentHostCommunicationApi ??= {};\n\nexport const frontComponentHostCommunicationApi =\n globalThis.frontComponentHostCommunicationApi;\n"],"names":["frontComponentHostCommunicationApi"],"mappings":"AA0CA,WAAW,uCAAuC,CAAA;AAE3C,MAAMA,IACX,WAAW;"}
1
+ {"version":3,"file":"frontComponentHostCommunicationApi.js","sources":["../../../../src/sdk/front-component-api/globals/frontComponentHostCommunicationApi.ts"],"sourcesContent":["import {\n type AppPath,\n type CommandMenuPages,\n type EnqueueSnackbarParams,\n type NavigateOptions,\n} from 'twenty-shared/types';\nimport { type getAppPath } from 'twenty-shared/utils';\n\nexport type NavigateFunction = <T extends AppPath>(\n to: T,\n params?: Parameters<typeof getAppPath<T>>[1],\n queryParams?: Record<string, any>,\n options?: NavigateOptions,\n) => Promise<void>;\n\nexport type OpenSidePanelPageFunction = (params: {\n page: CommandMenuPages;\n pageTitle: string;\n pageIcon?: string;\n shouldResetSearchState?: boolean;\n}) => Promise<void>;\n\nexport type UnmountFrontComponentFunction = () => Promise<void>;\n\nexport type EnqueueSnackbarFunction = (\n params: EnqueueSnackbarParams,\n) => Promise<void>;\n\nexport type CloseSidePanelFunction = () => Promise<void>;\n\nexport type RequestAccessTokenRefreshFunction = () => Promise<string>;\n\nexport type FrontComponentHostCommunicationApiStore = {\n navigate?: NavigateFunction;\n requestAccessTokenRefresh?: RequestAccessTokenRefreshFunction;\n openSidePanelPage?: OpenSidePanelPageFunction;\n unmountFrontComponent?: UnmountFrontComponentFunction;\n enqueueSnackbar?: EnqueueSnackbarFunction;\n closeSidePanel?: CloseSidePanelFunction;\n};\n\ndeclare global {\n var frontComponentHostCommunicationApi: FrontComponentHostCommunicationApiStore;\n}\n\nglobalThis.frontComponentHostCommunicationApi ??= {};\n\nexport const frontComponentHostCommunicationApi =\n globalThis.frontComponentHostCommunicationApi;\n"],"names":["frontComponentHostCommunicationApi"],"mappings":"AA6CA,WAAW,uCAAuC,CAAA;AAE3C,MAAMA,IACX,WAAW;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twenty-sdk",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/sdk/index.d.ts",
@@ -44,6 +44,16 @@
44
44
  "types": "./generated/index.ts",
45
45
  "import": "./generated/index.ts",
46
46
  "require": "./generated/index.ts"
47
+ },
48
+ "./generated/core": {
49
+ "types": "./generated/core/index.ts",
50
+ "import": "./generated/core/index.ts",
51
+ "require": "./generated/core/index.ts"
52
+ },
53
+ "./generated/metadata": {
54
+ "types": "./generated/metadata/index.ts",
55
+ "import": "./generated/metadata/index.ts",
56
+ "require": "./generated/metadata/index.ts"
47
57
  }
48
58
  },
49
59
  "license": "AGPL-3.0",
@@ -118,6 +128,12 @@
118
128
  ],
119
129
  "generated": [
120
130
  "generated/index.ts"
131
+ ],
132
+ "generated/core": [
133
+ "generated/core/index.ts"
134
+ ],
135
+ "generated/metadata": [
136
+ "generated/metadata/index.ts"
121
137
  ]
122
138
  }
123
139
  }