twenty-sdk 0.4.8 → 0.5.0

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 (48) hide show
  1. package/dist/{HtmlTagToRemoteComponent-_kOtAcK_.mjs → HtmlTagToRemoteComponent-CnoNG9cX.mjs} +1 -1
  2. package/dist/HtmlTagToRemoteComponent-dGw8vtni.js +1 -0
  3. package/dist/cli/utilities/build/common/esbuild-watcher.d.ts +1 -0
  4. package/dist/cli/utilities/build/common/front-component-build/react-globals-plugin.d.ts +1 -2
  5. package/dist/cli/utilities/build/common/front-component-build/strip-comments-plugin.d.ts +2 -0
  6. package/dist/cli/utilities/build/common/front-component-build/twenty-sdk-globals-plugin.d.ts +1 -0
  7. package/dist/cli/utilities/build/common/front-component-build/twenty-sdk-ui-globals-plugin.d.ts +1 -0
  8. package/dist/cli/utilities/build/common/front-component-build/twenty-shared-globals-plugin.d.ts +1 -0
  9. package/dist/cli/utilities/build/common/front-component-build/utils/collect-named-imports.d.ts +4 -0
  10. package/dist/cli/utilities/build/common/front-component-build/utils/create-front-component-build-options.d.ts +1 -2
  11. package/dist/cli/utilities/build/common/front-component-build/utils/create-globals-plugin.d.ts +15 -0
  12. package/dist/cli.cjs +77 -80
  13. package/dist/cli.mjs +2351 -2253
  14. package/dist/front-component/host/components/FrontComponentRenderer.d.ts +4 -1
  15. package/dist/front-component/index.cjs +1 -1
  16. package/dist/front-component/index.d.ts +3 -2
  17. package/dist/front-component/index.mjs +1032 -1004
  18. package/dist/front-component/remote/components/FrontComponentHostCommunicationApiEffect.d.ts +8 -0
  19. package/dist/front-component/remote/components/FrontComponentUpdateContextEffect.d.ts +2 -1
  20. package/dist/front-component/remote/components/FrontComponentWorkerEffect.d.ts +5 -2
  21. package/dist/front-component/remote/generated/remote-elements.d.ts +21 -20
  22. package/dist/front-component/remote/utils/exposeGlobals.d.ts +1 -0
  23. package/dist/front-component/types/FrontComponentHostCommunicationApi.d.ts +4 -0
  24. package/dist/front-component/types/HostToWorkerRenderContext.d.ts +1 -0
  25. package/dist/front-component/types/WorkerExports.d.ts +1 -0
  26. package/dist/index.cjs +2 -2
  27. package/dist/index.mjs +109 -109
  28. package/dist/isValidCountryCode-B7MxBtRC-BdzSztjn.js +25 -0
  29. package/dist/{isValidCountryCode-B7MxBtRC-BsdyqBLg.mjs → isValidCountryCode-B7MxBtRC-Do8IFgFH.mjs} +4216 -3820
  30. package/dist/sdk/front-component-api/context/frontComponentContext.d.ts +7 -0
  31. package/dist/sdk/front-component-api/functions/navigate.d.ts +5 -0
  32. package/dist/sdk/front-component-api/hooks/useFrontComponentExecutionContext.d.ts +1 -1
  33. package/dist/sdk/front-component-api/hooks/useUserId.d.ts +1 -0
  34. package/dist/sdk/front-component-api/index.d.ts +3 -1
  35. package/dist/sdk/front-component-api/types/FrontComponentExecutionContext.d.ts +1 -1
  36. package/dist/sdk/front-component-common/SerializedEventData.d.ts +26 -0
  37. package/dist/sdk/front-component-common/index.d.ts +1 -0
  38. package/dist/sdk/index.d.ts +2 -1
  39. package/dist/sdk/logic-functions/logic-function-config.d.ts +1 -2
  40. package/dist/ui/index.cjs +374 -374
  41. package/dist/ui/index.mjs +1341 -1331
  42. package/package.json +1 -1
  43. package/dist/HtmlTagToRemoteComponent-cjNxtZqX.js +0 -1
  44. package/dist/RatingValues-CT-y6O0b-CsGZSJKO.mjs +0 -402
  45. package/dist/RatingValues-CT-y6O0b-D7JSZAMu.js +0 -1
  46. package/dist/front-component/remote/context/FrontComponentExecutionContextStore.d.ts +0 -11
  47. package/dist/isValidCountryCode-B7MxBtRC-BNPnBggZ.js +0 -25
  48. package/dist/sdk/front-component-api/types/FrontComponentExecutionContextStore.d.ts +0 -5
@@ -1,4 +1,4 @@
1
- import "./RatingValues-CT-y6O0b-CsGZSJKO.mjs";
1
+ import "./isValidCountryCode-B7MxBtRC-Do8IFgFH.mjs";
2
2
  var e = /* @__PURE__ */ ((t) => (t.ProfilePicture = "profile-picture", t.WorkspaceLogo = "workspace-logo", t.Attachment = "attachment", t.PersonPicture = "person-picture", t.File = "file", t.AgentChat = "agent-chat", t.BuiltLogicFunction = "built-logic-function", t.BuiltFrontComponent = "built-front-component", t.PublicAsset = "public-asset", t.Source = "source", t.FilesField = "files-field", t.Dependencies = "dependencies", t))(e || {}), o = /* @__PURE__ */ ((t) => (t.CASCADE = "CASCADE", t.RESTRICT = "RESTRICT", t.SET_NULL = "SET_NULL", t.NO_ACTION = "NO_ACTION", t))(o || {}), r = /* @__PURE__ */ ((t) => (t.MANY_TO_ONE = "MANY_TO_ONE", t.ONE_TO_MANY = "ONE_TO_MANY", t))(r || {});
3
3
  const l = [
4
4
  { tag: "html-div", name: "HtmlDiv", properties: {} },
@@ -0,0 +1 @@
1
+ "use strict";require("./isValidCountryCode-B7MxBtRC-BdzSztjn.js");var e=(t=>(t.ProfilePicture="profile-picture",t.WorkspaceLogo="workspace-logo",t.Attachment="attachment",t.PersonPicture="person-picture",t.File="file",t.AgentChat="agent-chat",t.BuiltLogicFunction="built-logic-function",t.BuiltFrontComponent="built-front-component",t.PublicAsset="public-asset",t.Source="source",t.FilesField="files-field",t.Dependencies="dependencies",t))(e||{}),r=(t=>(t.CASCADE="CASCADE",t.RESTRICT="RESTRICT",t.SET_NULL="SET_NULL",t.NO_ACTION="NO_ACTION",t))(r||{}),o=(t=>(t.MANY_TO_ONE="MANY_TO_ONE",t.ONE_TO_MANY="ONE_TO_MANY",t))(o||{});const l=[{tag:"html-div",name:"HtmlDiv",properties:{}},{tag:"html-span",name:"HtmlSpan",properties:{}},{tag:"html-section",name:"HtmlSection",properties:{}},{tag:"html-article",name:"HtmlArticle",properties:{}},{tag:"html-header",name:"HtmlHeader",properties:{}},{tag:"html-footer",name:"HtmlFooter",properties:{}},{tag:"html-main",name:"HtmlMain",properties:{}},{tag:"html-nav",name:"HtmlNav",properties:{}},{tag:"html-aside",name:"HtmlAside",properties:{}},{tag:"html-p",name:"HtmlP",properties:{}},{tag:"html-h1",name:"HtmlH1",properties:{}},{tag:"html-h2",name:"HtmlH2",properties:{}},{tag:"html-h3",name:"HtmlH3",properties:{}},{tag:"html-h4",name:"HtmlH4",properties:{}},{tag:"html-h5",name:"HtmlH5",properties:{}},{tag:"html-h6",name:"HtmlH6",properties:{}},{tag:"html-strong",name:"HtmlStrong",properties:{}},{tag:"html-em",name:"HtmlEm",properties:{}},{tag:"html-small",name:"HtmlSmall",properties:{}},{tag:"html-code",name:"HtmlCode",properties:{}},{tag:"html-pre",name:"HtmlPre",properties:{}},{tag:"html-blockquote",name:"HtmlBlockquote",properties:{}},{tag:"html-a",name:"HtmlA",properties:{href:{type:"string",optional:!0},target:{type:"string",optional:!0},rel:{type:"string",optional:!0}}},{tag:"html-img",name:"HtmlImg",properties:{src:{type:"string",optional:!0},alt:{type:"string",optional:!0},width:{type:"number",optional:!0},height:{type:"number",optional:!0}}},{tag:"html-ul",name:"HtmlUl",properties:{}},{tag:"html-ol",name:"HtmlOl",properties:{}},{tag:"html-li",name:"HtmlLi",properties:{}},{tag:"html-form",name:"HtmlForm",properties:{action:{type:"string",optional:!0},method:{type:"string",optional:!0}}},{tag:"html-label",name:"HtmlLabel",properties:{htmlFor:{type:"string",optional:!0}}},{tag:"html-input",name:"HtmlInput",properties:{type:{type:"string",optional:!0},name:{type:"string",optional:!0},value:{type:"string",optional:!0},placeholder:{type:"string",optional:!0},disabled:{type:"boolean",optional:!0},checked:{type:"boolean",optional:!0},readOnly:{type:"boolean",optional:!0}}},{tag:"html-textarea",name:"HtmlTextarea",properties:{name:{type:"string",optional:!0},value:{type:"string",optional:!0},placeholder:{type:"string",optional:!0},disabled:{type:"boolean",optional:!0},readOnly:{type:"boolean",optional:!0},rows:{type:"number",optional:!0},cols:{type:"number",optional:!0}}},{tag:"html-select",name:"HtmlSelect",properties:{name:{type:"string",optional:!0},value:{type:"string",optional:!0},disabled:{type:"boolean",optional:!0},multiple:{type:"boolean",optional:!0}}},{tag:"html-option",name:"HtmlOption",properties:{value:{type:"string",optional:!0},disabled:{type:"boolean",optional:!0},selected:{type:"boolean",optional:!0}}},{tag:"html-button",name:"HtmlButton",properties:{type:{type:"string",optional:!0},disabled:{type:"boolean",optional:!0}}},{tag:"html-table",name:"HtmlTable",properties:{}},{tag:"html-thead",name:"HtmlThead",properties:{}},{tag:"html-tbody",name:"HtmlTbody",properties:{}},{tag:"html-tfoot",name:"HtmlTfoot",properties:{}},{tag:"html-tr",name:"HtmlTr",properties:{}},{tag:"html-th",name:"HtmlTh",properties:{colSpan:{type:"number",optional:!0},rowSpan:{type:"number",optional:!0}}},{tag:"html-td",name:"HtmlTd",properties:{colSpan:{type:"number",optional:!0},rowSpan:{type:"number",optional:!0}}},{tag:"html-br",name:"HtmlBr",properties:{}},{tag:"html-hr",name:"HtmlHr",properties:{}}],p=Object.fromEntries(l.map(t=>[t.tag.startsWith("html-")?t.tag.slice(5):t.tag,t.name]));exports.ALLOWED_HTML_ELEMENTS=l;exports.C=r;exports.HTML_TAG_TO_REMOTE_COMPONENT=p;exports.N=e;exports.d=o;
@@ -9,6 +9,7 @@ export type EsbuildWatcherConfig = {
9
9
  jsx?: 'automatic';
10
10
  extraPlugins?: esbuild.Plugin[];
11
11
  minify?: boolean;
12
+ banner?: esbuild.BuildOptions['banner'];
12
13
  };
13
14
  export type EsbuildWatcherOptions = RestartableWatcherOptions & {
14
15
  config: EsbuildWatcherConfig;
@@ -1,2 +1 @@
1
- import type * as esbuild from 'esbuild';
2
- export declare const reactGlobalsPlugin: esbuild.Plugin;
1
+ export declare const reactGlobalsPlugin: import('esbuild').Plugin;
@@ -0,0 +1,2 @@
1
+ import type * as esbuild from 'esbuild';
2
+ export declare const stripCommentsPlugin: esbuild.Plugin;
@@ -0,0 +1 @@
1
+ export declare const twentySdkGlobalsPlugin: import('esbuild').Plugin;
@@ -0,0 +1 @@
1
+ export declare const twentySdkUiGlobalsPlugin: import('esbuild').Plugin;
@@ -0,0 +1 @@
1
+ export declare const twentySharedGlobalsPlugin: import('esbuild').Plugin;
@@ -0,0 +1,4 @@
1
+ export declare const collectNamedImports: ({ sourceContent, pattern, }: {
2
+ sourceContent: string;
3
+ pattern: RegExp;
4
+ }) => Map<string, Set<string>>;
@@ -1,5 +1,5 @@
1
1
  import type * as esbuild from 'esbuild';
2
- type FrontComponentBuildOptions = {
2
+ export type FrontComponentBuildOptions = {
3
3
  entryPoints: esbuild.BuildOptions['entryPoints'];
4
4
  outdir: string;
5
5
  tsconfigPath?: string;
@@ -11,4 +11,3 @@ type FrontComponentBuildOptions = {
11
11
  sourcemap?: boolean;
12
12
  };
13
13
  export declare const createFrontComponentBuildOptions: ({ entryPoints, outdir, tsconfigPath, externalModules, logLevel, platform, minify, metafile, sourcemap, }: FrontComponentBuildOptions) => esbuild.BuildOptions;
14
- export {};
@@ -0,0 +1,15 @@
1
+ import type * as esbuild from 'esbuild';
2
+ type GlobalsPluginConfig = {
3
+ pluginName: string;
4
+ moduleName: string;
5
+ moduleFilter: RegExp;
6
+ collectImports: (sourceContent: string) => Map<string, Set<string>>;
7
+ generateExports: (params: {
8
+ namedImports: Set<string>;
9
+ moduleSubPath: string;
10
+ }) => string;
11
+ namespace?: string;
12
+ staticContents?: Record<string, string>;
13
+ };
14
+ export declare const createGlobalsPlugin: (config: GlobalsPluginConfig) => esbuild.Plugin;
15
+ export {};