@superblocksteam/library 2.0.12-next.15 → 2.0.12-next.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 (40) hide show
  1. package/dist/{allPaths-CuvjOZuB.js → allPaths-DGMrcGYt.js} +2 -2
  2. package/dist/{allPaths-CuvjOZuB.js.map → allPaths-DGMrcGYt.js.map} +1 -1
  3. package/dist/{allPaths-DeuopNXb.js → allPaths-nl-QZWn1.js} +2 -2
  4. package/dist/{allPaths-DeuopNXb.js.map → allPaths-nl-QZWn1.js.map} +1 -1
  5. package/dist/{allPathsLoader-Ba3IUCDK.js → allPathsLoader-BIuTbNcY.js} +3 -3
  6. package/dist/{allPathsLoader-CN9EPq1w.js.map → allPathsLoader-BIuTbNcY.js.map} +1 -1
  7. package/dist/{allPathsLoader-CN9EPq1w.js → allPathsLoader-Tf9x8dtV.js} +3 -3
  8. package/dist/{allPathsLoader-Ba3IUCDK.js.map → allPathsLoader-Tf9x8dtV.js.map} +1 -1
  9. package/dist/{devtools-consolidated-Ced2gZnM.js → devtools-consolidated-Brbj1JeD.js} +2 -2
  10. package/dist/{devtools-consolidated-Ced2gZnM.js.map → devtools-consolidated-Brbj1JeD.js.map} +1 -1
  11. package/dist/{index-_YYxQpwB.js → index-CCewmzC_.js} +622 -687
  12. package/dist/{index-_YYxQpwB.js.map → index-CCewmzC_.js.map} +1 -1
  13. package/dist/index.js +2 -2
  14. package/dist/{splitPathsBySizeLoader-KmNlU_JE.js → splitPathsBySizeLoader-BM6L8m2i.js} +2 -2
  15. package/dist/{splitPathsBySizeLoader-KmNlU_JE.js.map → splitPathsBySizeLoader-BM6L8m2i.js.map} +1 -1
  16. package/dist/{splitPathsBySizeLoader-CZKi68py.js → splitPathsBySizeLoader-C3MBiqmb.js} +2 -2
  17. package/dist/{splitPathsBySizeLoader-CZKi68py.js.map → splitPathsBySizeLoader-C3MBiqmb.js.map} +1 -1
  18. package/dist-types/edit-mode/create-component.d.ts +4 -5
  19. package/dist-types/lib/internal-details/lib/features/api-store.d.ts +1 -1
  20. package/dist-types/lib/internal-details/lib/types.d.ts +2 -7
  21. package/dist-types/lib/internal-details/sb-wrapper.d.ts +2 -37
  22. package/dist-types/lib/user-facing/components/icon/index.d.ts +2 -2
  23. package/dist-types/lib/user-facing/components/icon/props.d.ts +1 -1
  24. package/package.json +2 -2
  25. package/dist-types/lib/user-facing/components/button/editor-template.d.ts +0 -3
  26. package/dist-types/lib/user-facing/components/checkbox/editor-template.d.ts +0 -3
  27. package/dist-types/lib/user-facing/components/column/editor-template.d.ts +0 -3
  28. package/dist-types/lib/user-facing/components/container/editor-template.d.ts +0 -3
  29. package/dist-types/lib/user-facing/components/date-picker/editor-template.d.ts +0 -3
  30. package/dist-types/lib/user-facing/components/dropdown/editor-template.d.ts +0 -3
  31. package/dist-types/lib/user-facing/components/icon/editor-template.d.ts +0 -3
  32. package/dist-types/lib/user-facing/components/image/editor-template.d.ts +0 -3
  33. package/dist-types/lib/user-facing/components/key-value/editor-template.d.ts +0 -3
  34. package/dist-types/lib/user-facing/components/modal/editor-template.d.ts +0 -3
  35. package/dist-types/lib/user-facing/components/section/editor-template.d.ts +0 -3
  36. package/dist-types/lib/user-facing/components/slideout/editor-template.d.ts +0 -3
  37. package/dist-types/lib/user-facing/components/switch/editor-template.d.ts +0 -3
  38. package/dist-types/lib/user-facing/components/table/editor-template.d.ts +0 -3
  39. package/dist-types/lib/user-facing/components/text/editor-template.d.ts +0 -3
  40. /package/dist-types/{lib/user-facing/components/table → edit-mode}/default-table-data.d.ts +0 -0
@@ -89724,7 +89724,7 @@ const StatusIconWrapper = qe$1.div`
89724
89724
  const getCloseIcon = (dataTest) => /* @__PURE__ */ jsxRuntimeExports.jsx(
89725
89725
  CloseIconWrapper,
89726
89726
  {
89727
- "data-test": dataTest ? `${dataTest}-close` : "notification-close",
89727
+ "data-test": `${dataTest}-close`,
89728
89728
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgClose, {})
89729
89729
  }
89730
89730
  );
@@ -89742,7 +89742,7 @@ const DescriptionWrapper = qe$1.div`
89742
89742
  margin-right: -10px;
89743
89743
  `;
89744
89744
  const styleMessage = (message2, dataTest) => {
89745
- return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageWrapper, { "data-test": dataTest ? dataTest : "notification", children: message2 });
89745
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageWrapper, { "data-test": dataTest, children: message2 });
89746
89746
  };
89747
89747
  const styleDescription = (description) => {
89748
89748
  if (!description) {
@@ -89849,7 +89849,7 @@ function sendNotification({
89849
89849
  }
89850
89850
  },
89851
89851
  props: {
89852
- "data-testid": dataTest ?? attrSafeKey(`notification-${key2}`)
89852
+ "data-testid": dataTest
89853
89853
  }
89854
89854
  });
89855
89855
  }
@@ -94242,7 +94242,7 @@ function mergeRelations(existingRelations, relations) {
94242
94242
  ) : relations;
94243
94243
  return mergedRelations;
94244
94244
  }
94245
- function getChildren$2(input, path2, entity, scopedState) {
94245
+ function getChildren(input, path2, entity, scopedState) {
94246
94246
  function getChildrenFromSection(section) {
94247
94247
  return Object.keys(section.props).reduce(
94248
94248
  (acc, key2) => {
@@ -94653,7 +94653,7 @@ class CompositeProp extends Prop {
94653
94653
  }
94654
94654
  return {
94655
94655
  ...definition,
94656
- children: getChildren$2(
94656
+ children: getChildren(
94657
94657
  this.nestedProps,
94658
94658
  this.prop.path,
94659
94659
  entity,
@@ -94683,7 +94683,7 @@ class RecordProp extends Prop {
94683
94683
  }
94684
94684
  return {
94685
94685
  ...definition,
94686
- children: getChildren$2(
94686
+ children: getChildren(
94687
94687
  this.nestedProps,
94688
94688
  this.prop.path,
94689
94689
  entity,
@@ -95080,7 +95080,7 @@ function registerStores(stores) {
95080
95080
  internalStores = { ...internalStores, ...stores };
95081
95081
  if (SUPPORTED_MODES.includes("production")) {
95082
95082
  if (Object.keys(internalStores).length === Object.keys(stores).length) {
95083
- import("./devtools-consolidated-Ced2gZnM.js").then(({ initializeCustomDevTools, setRegisteredStores }) => {
95083
+ import("./devtools-consolidated-Brbj1JeD.js").then(({ initializeCustomDevTools, setRegisteredStores }) => {
95084
95084
  setRegisteredStores(internalStores);
95085
95085
  initializeCustomDevTools();
95086
95086
  }).catch((error) => {
@@ -95093,7 +95093,7 @@ function registerStores(stores) {
95093
95093
  }
95094
95094
  }
95095
95095
  const DevToolsInternal = React__default.lazy(() => {
95096
- return import("./devtools-consolidated-Ced2gZnM.js").then((module2) => ({
95096
+ return import("./devtools-consolidated-Brbj1JeD.js").then((module2) => ({
95097
95097
  default: module2.CustomDevTools
95098
95098
  }));
95099
95099
  });
@@ -96716,7 +96716,7 @@ _runApi_dec = [action], _cancelApi_dec = [action];
96716
96716
  class ApiManager {
96717
96717
  constructor(rootStore2) {
96718
96718
  __runInitializers(_init2, 5, this);
96719
- __publicField(this, "agentUrls", []);
96719
+ __publicField(this, "baseUrl");
96720
96720
  __publicField(this, "token");
96721
96721
  __publicField(this, "accessToken");
96722
96722
  __publicField(this, "apisByName", {});
@@ -96818,23 +96818,7 @@ class ApiManager {
96818
96818
  scopeId,
96819
96819
  this.apiNameToDepCandidates[apiName] ?? []
96820
96820
  );
96821
- if (!this.agentUrls.length) {
96822
- editorBridge.setApiResponse(apiName, {
96823
- status: "STATUS_COMPLETED",
96824
- execution: null,
96825
- errors: [{ message: "No active agent found" }]
96826
- });
96827
- sendNotification({
96828
- message: "No active agent found",
96829
- type: "error"
96830
- });
96831
- return {
96832
- data: null,
96833
- error: "No active agent found"
96834
- };
96835
- }
96836
- const agentBaseUrl = this.agentUrls[Math.floor(Math.random() * this.agentUrls.length)];
96837
- const orchestratorUrl = new URL("v2/execute", agentBaseUrl).href;
96821
+ const orchestratorUrl = new URL("v2/execute", this.baseUrl).href;
96838
96822
  const events2 = [];
96839
96823
  await ((_a2 = this.rootStore.editStore) == null ? void 0 : _a2.operationManager.ensureFilesSynced());
96840
96824
  const abortController = new AbortController();
@@ -102658,14 +102642,14 @@ function getLoaderFn$1(options) {
102658
102642
  if (!(loader === "all")) return [3, 3];
102659
102643
  return [4, import(
102660
102644
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
102661
- "./allPathsLoader-Ba3IUCDK.js"
102645
+ "./allPathsLoader-Tf9x8dtV.js"
102662
102646
  )];
102663
102647
  case 2:
102664
102648
  return [2, _b2.sent().allPathsLoader];
102665
102649
  case 3:
102666
102650
  return [4, import(
102667
102651
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
102668
- "./splitPathsBySizeLoader-CZKi68py.js"
102652
+ "./splitPathsBySizeLoader-C3MBiqmb.js"
102669
102653
  )];
102670
102654
  case 4:
102671
102655
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -111777,7 +111761,7 @@ function createScope(getInitialEntities, options) {
111777
111761
  scopeId: stableScopeId
111778
111762
  });
111779
111763
  const bindingIds = {};
111780
- const getBinding2 = (key2) => {
111764
+ const getBinding = (key2) => {
111781
111765
  if (bindingIds[key2]) {
111782
111766
  return bindingIds[key2];
111783
111767
  }
@@ -111805,7 +111789,7 @@ function createScope(getInitialEntities, options) {
111805
111789
  useSuspense: true
111806
111790
  }
111807
111791
  ),
111808
- getBinding2(key2)
111792
+ getBinding(key2)
111809
111793
  );
111810
111794
  }
111811
111795
  }
@@ -127981,6 +127965,199 @@ const GridDropPreview = observer(() => {
127981
127965
  }
127982
127966
  );
127983
127967
  });
127968
+ var KeyValuePropertyType = /* @__PURE__ */ ((KeyValuePropertyType2) => {
127969
+ KeyValuePropertyType2["TEXT"] = "text";
127970
+ KeyValuePropertyType2["NUMBER"] = "number";
127971
+ KeyValuePropertyType2["CURRENCY"] = "currency";
127972
+ KeyValuePropertyType2["PERCENTAGE"] = "percentage";
127973
+ KeyValuePropertyType2["IMAGE"] = "image";
127974
+ KeyValuePropertyType2["VIDEO"] = "video";
127975
+ KeyValuePropertyType2["DATE"] = "date";
127976
+ KeyValuePropertyType2["BUTTON"] = "button";
127977
+ KeyValuePropertyType2["LINK"] = "link";
127978
+ KeyValuePropertyType2["BOOLEAN"] = "boolean";
127979
+ KeyValuePropertyType2["TAGS"] = "tags";
127980
+ KeyValuePropertyType2["EMAIL"] = "email";
127981
+ return KeyValuePropertyType2;
127982
+ })(KeyValuePropertyType || {});
127983
+ const DEFAULT_TABLE_DATA = [
127984
+ {
127985
+ photo: "https://cdn.superblocks.com/sample-data/rachel_kim.jpg",
127986
+ name: "Rachel Kim",
127987
+ email: "rachel.kim89@gmail.com",
127988
+ role: "Vendor Partner",
127989
+ company: "Urban Threads Co.",
127990
+ status: "Active",
127991
+ date_joined: "2023-04-12",
127992
+ last_activity: "2025-06-07T16:20:00Z"
127993
+ },
127994
+ {
127995
+ photo: "https://cdn.superblocks.com/sample-data/daniel_vargas.jpg",
127996
+ name: "Daniel Vargas",
127997
+ email: "dvargas1984@yahoo.com",
127998
+ role: "Logistics Contact",
127999
+ company: "Vargas Freight Ltd.",
128000
+ status: "Pending",
128001
+ date_joined: "2024-01-23",
128002
+ last_activity: "2025-05-30T13:45:00Z"
128003
+ },
128004
+ {
128005
+ photo: "https://cdn.superblocks.com/sample-data/sophie_liu.jpg",
128006
+ name: "Sophie Liu",
128007
+ email: "sophie.liu.personal@gmail.com",
128008
+ role: "Retail Manager",
128009
+ company: "Modern Goods",
128010
+ status: "Active",
128011
+ date_joined: "2022-09-10",
128012
+ last_activity: "2025-06-08T09:03:00Z"
128013
+ },
128014
+ {
128015
+ photo: "https://cdn.superblocks.com/sample-data/omar_el-sayed.jpg",
128016
+ name: "Omar El-Sayed",
128017
+ email: "omarsayed78@hotmail.com",
128018
+ role: "Accounts Payable",
128019
+ company: "Sayed Textiles",
128020
+ status: "Inactive",
128021
+ date_joined: "2021-06-05",
128022
+ last_activity: "2024-12-18T11:40:00Z"
128023
+ },
128024
+ {
128025
+ photo: "https://cdn.superblocks.com/sample-data/grace_nguyen.jpg",
128026
+ name: "Grace Nguyen",
128027
+ email: "gracenguyen23@icloud.com",
128028
+ role: "Product Supplier",
128029
+ company: "Green Earth Supplies",
128030
+ status: "Active",
128031
+ date_joined: "2023-11-03",
128032
+ last_activity: "2025-06-08T17:28:00Z"
128033
+ },
128034
+ {
128035
+ photo: "https://cdn.superblocks.com/sample-data/alex_romero.jpg",
128036
+ name: "Alex Romero",
128037
+ email: "alex.romero@gmail.com",
128038
+ role: "Client Account Owner",
128039
+ company: "Romero & Co.",
128040
+ status: "Suspended",
128041
+ date_joined: "2022-02-28",
128042
+ last_activity: "2025-03-11T08:20:00Z"
128043
+ },
128044
+ {
128045
+ photo: "https://cdn.superblocks.com/sample-data/lena_schmidt.jpg",
128046
+ name: "Lena Schmidt",
128047
+ email: "lena_schmidt92@gmx.de",
128048
+ role: "Wholesale Contact",
128049
+ company: "Schmidt Imports",
128050
+ status: "Active",
128051
+ date_joined: "2021-12-01",
128052
+ last_activity: "2025-06-06T21:10:00Z"
128053
+ },
128054
+ {
128055
+ photo: "https://cdn.superblocks.com/sample-data/devon_price.jpg",
128056
+ name: "Devon Price",
128057
+ email: "devon.price22@aol.com",
128058
+ role: "Fulfillment Liaison",
128059
+ company: "DepotLink",
128060
+ status: "Active",
128061
+ date_joined: "2024-05-17",
128062
+ last_activity: "2025-06-08T10:42:00Z"
128063
+ },
128064
+ {
128065
+ photo: "https://cdn.superblocks.com/sample-data/isabella_rossi.jpg",
128066
+ name: "Isabella Rossi",
128067
+ email: "bella.rossi@gmail.com",
128068
+ role: "Procurement Agent",
128069
+ company: "Rossi Global Sourcing",
128070
+ status: "Pending",
128071
+ date_joined: "2023-07-19",
128072
+ last_activity: "2025-05-29T14:05:00Z"
128073
+ },
128074
+ {
128075
+ photo: "https://cdn.superblocks.com/sample-data/tariq_khan.jpg",
128076
+ name: "Tariq Khan",
128077
+ email: "tariq.khan92@protonmail.com",
128078
+ role: "International Ops Lead",
128079
+ company: "CrossPort Trade Inc.",
128080
+ status: "Active",
128081
+ date_joined: "2022-11-08",
128082
+ last_activity: "2025-06-08T16:11:00Z"
128083
+ },
128084
+ {
128085
+ photo: "https://cdn.superblocks.com/sample-data/emily_zhang.jpg",
128086
+ name: "Emily Zhang",
128087
+ email: "emilyzhang.home@gmail.com",
128088
+ role: "Logistics Coordinator",
128089
+ company: "Zhang Export Ltd.",
128090
+ status: "Active",
128091
+ date_joined: "2023-03-12",
128092
+ last_activity: "2025-06-08T19:02:00Z"
128093
+ }
128094
+ ];
128095
+ const DEFAULT_TABLE_COLUMNS = {
128096
+ name: {
128097
+ columnType: "text",
128098
+ label: "Name"
128099
+ },
128100
+ email: {
128101
+ columnType: "email",
128102
+ label: "Email"
128103
+ },
128104
+ role: {
128105
+ columnType: "text",
128106
+ label: "Role"
128107
+ },
128108
+ company: {
128109
+ columnType: "text",
128110
+ label: "Company"
128111
+ },
128112
+ status: {
128113
+ columnType: "tags",
128114
+ tagDisplayConfig: {
128115
+ Active: {
128116
+ color: "#14CDB733"
128117
+ },
128118
+ Pending: {
128119
+ color: "#FF9F3533"
128120
+ },
128121
+ Inactive: {
128122
+ color: "#a6a0a033"
128123
+ },
128124
+ Suspended: {
128125
+ color: "#FF62A433"
128126
+ }
128127
+ },
128128
+ label: "Status"
128129
+ },
128130
+ date_joined: {
128131
+ columnType: "date",
128132
+ inputFormat: "YYYY-MM-DD",
128133
+ outputFormat: "MM-DD-YYYY",
128134
+ label: "Date joined"
128135
+ },
128136
+ last_activity: {
128137
+ columnType: "date",
128138
+ inputFormat: "YYYY-MM-DDTHH:mm:ssZ",
128139
+ outputFormat: "MM-DD-YYYY",
128140
+ label: "Last activity"
128141
+ },
128142
+ photo: {
128143
+ columnType: "image",
128144
+ label: "Photo",
128145
+ imageBorderRadius: {
128146
+ topLeft: Dim.px(16),
128147
+ topRight: Dim.px(16),
128148
+ bottomLeft: Dim.px(16),
128149
+ bottomRight: Dim.px(16)
128150
+ }
128151
+ }
128152
+ };
128153
+ const DEFAULT_TABLE_KEYS = Object.keys(DEFAULT_TABLE_COLUMNS);
128154
+ const CLEARED_TABLE_COLUMNS = DEFAULT_TABLE_KEYS.reduce(
128155
+ (acc, key2) => {
128156
+ acc[key2] = void 0;
128157
+ return acc;
128158
+ },
128159
+ {}
128160
+ );
127984
128161
  function getParentInfo(parent) {
127985
128162
  const parentComponentMeta = getEditStore().runtimeEntitiesManager.getAnyEditorWidgetMeta(parent.id);
127986
128163
  const isParentGridLike = isWidgetGrid(parentComponentMeta);
@@ -127989,60 +128166,316 @@ function getParentInfo(parent) {
127989
128166
  type: parentComponentMeta == null ? void 0 : parentComponentMeta.type
127990
128167
  };
127991
128168
  }
127992
- const generateUniqueName = (componentType) => {
127993
- const baseName = componentType;
127994
- let counter2 = 1;
127995
- let name = `${baseName}${counter2}`;
127996
- while (rootStore.nameManager.hasEntityWithName(name)) {
127997
- counter2++;
127998
- name = `${baseName}${counter2}`;
127999
- }
128000
- return name;
128001
- };
128002
- function getBinding({
128169
+ function getModalChildren(modalName) {
128170
+ return [
128171
+ {
128172
+ tagName: "Container",
128173
+ properties: {
128174
+ variant: Property.Static("none"),
128175
+ width: Property.Dimension(Dim.fill()),
128176
+ layout: Property.Static("horizontal"),
128177
+ horizontalAlign: Property.Static("left")
128178
+ },
128179
+ children: [
128180
+ {
128181
+ tagName: "Text",
128182
+ properties: {
128183
+ text: Property.Static("Modal Title"),
128184
+ textStyle: Property.Static({
128185
+ variant: "heading3"
128186
+ })
128187
+ },
128188
+ children: []
128189
+ }
128190
+ ]
128191
+ },
128192
+ {
128193
+ tagName: "Container",
128194
+ properties: {
128195
+ variant: Property.Static("none"),
128196
+ width: Property.Dimension(Dim.fill()),
128197
+ horizontalAlign: Property.Static("left")
128198
+ },
128199
+ children: []
128200
+ },
128201
+ {
128202
+ tagName: "Container",
128203
+ properties: {
128204
+ spacing: Property.Dimension(Dim.px(8)),
128205
+ width: Property.Dimension(Dim.fill()),
128206
+ variant: Property.Static("none"),
128207
+ layout: Property.Static("horizontal"),
128208
+ horizontalAlign: Property.Static("right")
128209
+ },
128210
+ children: [
128211
+ {
128212
+ tagName: "Button",
128213
+ properties: {
128214
+ label: Property.Static("Cancel"),
128215
+ variant: Property.Static("secondary"),
128216
+ onClick: Property.Event([
128217
+ {
128218
+ id: "closeModal",
128219
+ type: TriggerStepType.CONTROL_MODAL,
128220
+ name: modalName,
128221
+ action: "close"
128222
+ }
128223
+ ])
128224
+ },
128225
+ children: []
128226
+ },
128227
+ {
128228
+ tagName: "Button",
128229
+ properties: {
128230
+ label: Property.Static("Confirm")
128231
+ },
128232
+ children: []
128233
+ }
128234
+ ]
128235
+ }
128236
+ ];
128237
+ }
128238
+ function getSlideoutChildren() {
128239
+ return [
128240
+ {
128241
+ tagName: "Container",
128242
+ properties: {
128243
+ variant: Property.Static("none"),
128244
+ width: Property.Dimension(Dim.fill()),
128245
+ layout: Property.Static("horizontal"),
128246
+ horizontalAlign: Property.Static("left")
128247
+ },
128248
+ children: [
128249
+ {
128250
+ tagName: "Text",
128251
+ properties: {
128252
+ text: Property.Static("Slideout Title"),
128253
+ textStyle: Property.Static({
128254
+ variant: "heading3"
128255
+ })
128256
+ },
128257
+ children: []
128258
+ }
128259
+ ]
128260
+ },
128261
+ {
128262
+ tagName: "Container",
128263
+ properties: {
128264
+ variant: Property.Static("none"),
128265
+ width: Property.Dimension(Dim.fill()),
128266
+ height: Property.Dimension(Dim.fill()),
128267
+ horizontalAlign: Property.Static("left"),
128268
+ layout: Property.Static("vertical")
128269
+ },
128270
+ children: []
128271
+ }
128272
+ ];
128273
+ }
128274
+ function getSectionChildren() {
128275
+ return [
128276
+ {
128277
+ tagName: "Column",
128278
+ properties: {
128279
+ width: Property.Dimension(Dim.fill()),
128280
+ height: Property.Dimension(Dim.fill())
128281
+ },
128282
+ children: []
128283
+ }
128284
+ ];
128285
+ }
128286
+ function getTriggerComponent({
128003
128287
  componentType,
128004
- editorTemplateCreateRequest,
128005
- parentInfo
128288
+ parentElement,
128289
+ primaryComponentName,
128290
+ triggerComponentId
128006
128291
  }) {
128292
+ if (componentType === "Modal") {
128293
+ return {
128294
+ parentElement,
128295
+ tagName: "Button",
128296
+ id: triggerComponentId,
128297
+ properties: {
128298
+ label: Property.Static("Open Modal"),
128299
+ onClick: Property.Event([
128300
+ {
128301
+ id: "openModal",
128302
+ type: TriggerStepType.CONTROL_MODAL,
128303
+ name: primaryComponentName,
128304
+ action: "open"
128305
+ }
128306
+ ])
128307
+ },
128308
+ children: []
128309
+ };
128310
+ } else if (componentType === "Slideout") {
128311
+ return {
128312
+ parentElement,
128313
+ tagName: "Button",
128314
+ id: triggerComponentId,
128315
+ properties: {
128316
+ label: Property.Static("Open Slideout"),
128317
+ onClick: Property.Event([
128318
+ {
128319
+ id: "openSlideout",
128320
+ type: TriggerStepType.CONTROL_SLIDEOUT,
128321
+ name: primaryComponentName,
128322
+ action: "open"
128323
+ }
128324
+ ])
128325
+ },
128326
+ children: []
128327
+ };
128328
+ }
128329
+ throw new Error("Unhandled component type: " + componentType);
128330
+ }
128331
+ function getComponentBaseProperties(componentType, parentInfo) {
128332
+ var _a2, _b2, _c2, _d2;
128007
128333
  const customComponents = rootStore.componentRegistry.customComponentList;
128008
- if ((editorTemplateCreateRequest == null ? void 0 : editorTemplateCreateRequest.generateBinding) === true) {
128009
- return Property.Static(generateUniqueName(componentType));
128010
- } else if (typeof (editorTemplateCreateRequest == null ? void 0 : editorTemplateCreateRequest.generateBinding) === "string") {
128011
- return Property.Static(editorTemplateCreateRequest.generateBinding);
128334
+ let properties2 = {};
128335
+ let children = [];
128336
+ const editorTemplates = rootStore.componentRegistry.getEditorTemplates(componentType);
128337
+ if (editorTemplates && editorTemplates.length > 1) {
128338
+ throw new Error(
128339
+ `Multiple editor templates are not supported yet. Found ${editorTemplates.length} for component type: ${componentType}.`
128340
+ );
128341
+ }
128342
+ const context2 = {
128343
+ generateUniqueName: getUniqueName
128344
+ };
128345
+ const editorTemplateOnCreate = (_b2 = (_a2 = editorTemplates == null ? void 0 : editorTemplates[0]) == null ? void 0 : _a2.create) == null ? void 0 : _b2.call(_a2, context2);
128346
+ if (editorTemplateOnCreate && Array.isArray(editorTemplateOnCreate)) {
128347
+ throw new Error(
128348
+ `Multiple creates for on editor template are not supported yet. Found ${editorTemplateOnCreate.length} for component type: ${componentType}.`
128349
+ );
128350
+ }
128351
+ if (editorTemplateOnCreate && editorTemplateOnCreate.bind) {
128352
+ properties2.name = Property.Static(editorTemplateOnCreate.bind);
128012
128353
  } else {
128013
128354
  const shouldProvideAName = (
128014
- // All components dropped in a grid
128355
+ // TODO: migrate these components
128356
+ componentType === "Dropdown" || componentType === "DatePicker" || componentType === "Checkbox" || componentType === "Switch" || componentType === "Modal" || componentType === "Slideout" || componentType === "Table" || // All components dropped in a grid
128015
128357
  parentInfo.isGridLike || // All custom components
128016
128358
  customComponents.includes(componentType)
128017
128359
  );
128018
128360
  if (shouldProvideAName) {
128019
- return Property.Static(generateUniqueName(componentType));
128361
+ properties2.name = Property.Static(getUniqueName(componentType));
128020
128362
  }
128021
- return void 0;
128022
128363
  }
128023
- }
128024
- function getComponentBaseProperties(componentType, parentInfo, editorTemplateCreateRequest) {
128025
- let properties2 = {};
128026
- const editorTemplates = rootStore.componentRegistry.getEditorTemplates(componentType);
128027
- if (editorTemplates && editorTemplates.length > 1) {
128028
- throw new Error(
128029
- `Multiple editor templates are not supported yet. Found ${editorTemplates.length} for component type: ${componentType}.`
128030
- );
128364
+ const isContainer = componentType === "Section" || componentType === "Column" || componentType === "Container" || componentType === "Modal" || componentType === "Slideout";
128365
+ if (isContainer && componentType !== "Modal" && componentType !== "Slideout") {
128366
+ properties2.width = Property.Dimension(Dim.fill());
128031
128367
  }
128032
- if (editorTemplateCreateRequest == null ? void 0 : editorTemplateCreateRequest.properties) {
128368
+ switch (componentType) {
128369
+ case "Text":
128370
+ properties2.text = Property.Static("Hello, world!");
128371
+ break;
128372
+ case "Button":
128373
+ properties2.label = Property.Static("Submit");
128374
+ properties2.onClick = Property.Event([
128375
+ {
128376
+ type: TriggerStepType.RUN_JS,
128377
+ code: "() => console.log('Button clicked')",
128378
+ id: "buttonClick"
128379
+ }
128380
+ ]);
128381
+ break;
128382
+ case "Image":
128383
+ properties2.src = Property.Static(
128384
+ "https://lowcode.s3.us-west-2.amazonaws.com/eilish-billie.jpeg"
128385
+ );
128386
+ properties2.fillContainer = Property.Static(true);
128387
+ properties2.width = parentInfo.isGridLike ? Property.Dimension(Dim.col(4)) : Property.Dimension(Dim.px(300));
128388
+ properties2.height = Property.Dimension(Dim.fit());
128389
+ break;
128390
+ case "KeyValue":
128391
+ properties2.sourceData = Property.Static({
128392
+ id: 123,
128393
+ name: "John Smith",
128394
+ description: "John has been cardholder for 3 years",
128395
+ createdDate: "10-23-2012"
128396
+ });
128397
+ properties2.propertiesOrder = Property.Static([
128398
+ "id",
128399
+ "name",
128400
+ "description",
128401
+ "createdDate"
128402
+ ]);
128403
+ properties2.properties = Property.Static({
128404
+ id: {
128405
+ id: "id",
128406
+ key: "id",
128407
+ type: KeyValuePropertyType.NUMBER,
128408
+ isVisible: true,
128409
+ isDerived: false
128410
+ },
128411
+ name: {
128412
+ id: "name",
128413
+ key: "name",
128414
+ type: KeyValuePropertyType.TEXT,
128415
+ isVisible: true,
128416
+ isDerived: false
128417
+ },
128418
+ description: {
128419
+ id: "description",
128420
+ key: "description",
128421
+ type: KeyValuePropertyType.TEXT,
128422
+ isVisible: true,
128423
+ isDerived: false
128424
+ },
128425
+ createdDate: {
128426
+ id: "createdDate",
128427
+ key: "createdDate",
128428
+ type: KeyValuePropertyType.DATE,
128429
+ isVisible: true,
128430
+ isDerived: false
128431
+ }
128432
+ });
128433
+ break;
128434
+ case "Dropdown":
128435
+ properties2.label = Property.Static("Label");
128436
+ properties2.options = Property.Computed([
128437
+ { label: "All statuses", value: "all" },
128438
+ { label: "Pending", value: "pending" },
128439
+ { label: "Processing", value: "processing" },
128440
+ { label: "Completed", value: "completed" },
128441
+ { label: "Failed", value: "failed" },
128442
+ { label: "Cancelled", value: "cancelled" },
128443
+ { label: "Rejected", value: "rejected" },
128444
+ { label: "On hold", value: "on_hold" }
128445
+ ]);
128446
+ break;
128447
+ case "Modal":
128448
+ children = getModalChildren((_c2 = properties2.name) == null ? void 0 : _c2.value);
128449
+ break;
128450
+ case "Slideout":
128451
+ children = getSlideoutChildren();
128452
+ break;
128453
+ case "Checkbox":
128454
+ properties2.label = Property.Static("Label");
128455
+ break;
128456
+ case "DatePicker":
128457
+ properties2.label = Property.Static("Label");
128458
+ properties2.defaultDate = Property.Static((/* @__PURE__ */ new Date()).toISOString());
128459
+ break;
128460
+ case "Switch":
128461
+ properties2.label = Property.Static("Label");
128462
+ break;
128463
+ case "Section":
128464
+ children = getSectionChildren();
128465
+ break;
128466
+ case "Table":
128467
+ properties2.tableData = Property.Static(DEFAULT_TABLE_DATA);
128468
+ properties2.columns = Property.Static(DEFAULT_TABLE_COLUMNS);
128469
+ properties2.header = Property.Static("Customers");
128470
+ properties2.searchPlaceholder = Property.Static("Search...");
128471
+ break;
128472
+ }
128473
+ if (editorTemplateOnCreate == null ? void 0 : editorTemplateOnCreate.properties) {
128033
128474
  properties2 = {
128034
128475
  ...properties2,
128035
- ...editorTemplateCreateRequest.properties
128476
+ ...editorTemplateOnCreate.properties
128036
128477
  };
128037
128478
  }
128038
- const binding = getBinding({
128039
- componentType,
128040
- editorTemplateCreateRequest,
128041
- parentInfo
128042
- });
128043
- if (binding) {
128044
- properties2.name = binding;
128045
- }
128046
128479
  const { width, height, ...restProperties } = properties2;
128047
128480
  const safeDimensions = parentInfo.isGridLike ? filterSafeGridDimensionProperties({
128048
128481
  width: width == null ? void 0 : width.value,
@@ -128056,9 +128489,20 @@ function getComponentBaseProperties(componentType, parentInfo, editorTemplateCre
128056
128489
  ...restProperties,
128057
128490
  ...safeDimensions
128058
128491
  },
128059
- children: (editorTemplateCreateRequest == null ? void 0 : editorTemplateCreateRequest.children) ?? []
128492
+ children,
128493
+ name: (_d2 = properties2.name) == null ? void 0 : _d2.value
128060
128494
  };
128061
128495
  }
128496
+ const getUniqueName = (componentType) => {
128497
+ const baseName = componentType;
128498
+ let counter2 = 1;
128499
+ let name = `${baseName}${counter2}`;
128500
+ while (rootStore.nameManager.hasEntityWithName(name)) {
128501
+ counter2++;
128502
+ name = `${baseName}${counter2}`;
128503
+ }
128504
+ return name;
128505
+ };
128062
128506
  function checkComponentForParentTypeBeforeCreating(componentType, parentType) {
128063
128507
  if (componentType === "Section" && parentType !== "Page") {
128064
128508
  return false;
@@ -128068,35 +128512,14 @@ function checkComponentForParentTypeBeforeCreating(componentType, parentType) {
128068
128512
  }
128069
128513
  return true;
128070
128514
  }
128071
- function getCreateAtParentElement(relativeParent, createAt) {
128072
- if (createAt === "root") {
128073
- const parentInstanceId = getEditStore().runtimeEntitiesManager.widgets.getAnyInstanceIdForSourceId(
128074
- relativeParent.id
128075
- );
128076
- const pageComponent = getEditStore().runtimeEntitiesManager.getClosestAncestorByType(
128077
- parentInstanceId,
128078
- "Page"
128079
- );
128080
- if (!pageComponent) {
128081
- throw new Error(
128082
- `Page component not found for parent: ${relativeParent.id}`
128083
- );
128084
- }
128085
- return { source: { id: pageComponent.sourceId } };
128086
- } else {
128087
- return { source: relativeParent };
128088
- }
128089
- }
128090
128515
  async function createComponent({
128091
128516
  componentType,
128092
128517
  parent,
128093
128518
  scopeName,
128094
128519
  baseProperties = {},
128095
- skipSecondaryComponentsCreation,
128096
- // will only create the primary component. Secondary components are usually trigger components (e.g: Button that triggers the modal)
128520
+ skipTriggerCreation,
128097
128521
  otherComponentsUpdates
128098
128522
  }) {
128099
- var _a2, _b2;
128100
128523
  const parentInfo = getParentInfo(parent);
128101
128524
  if (!checkComponentForParentTypeBeforeCreating(componentType, parentInfo.type)) {
128102
128525
  console.error(
@@ -128104,106 +128527,88 @@ async function createComponent({
128104
128527
  );
128105
128528
  return;
128106
128529
  }
128107
- const editorTemplates = rootStore.componentRegistry.getEditorTemplates(componentType);
128108
- if (editorTemplates && editorTemplates.length > 1) {
128109
- throw new Error(
128110
- `Multiple editor templates are not supported yet. Found ${editorTemplates.length} for component type: ${componentType}.`
128111
- );
128112
- }
128113
- const context2 = {
128114
- generateUniqueName,
128115
- parentInfo
128116
- };
128117
- const editorTemplateCreateRequest = (_b2 = (_a2 = editorTemplates == null ? void 0 : editorTemplates[0]) == null ? void 0 : _a2.create) == null ? void 0 : _b2.call(_a2, context2);
128118
- const primaryEditorTemplateCreateRequest = Array.isArray(
128119
- editorTemplateCreateRequest
128120
- ) ? editorTemplateCreateRequest[0] : editorTemplateCreateRequest;
128121
- if (editorTemplateCreateRequest && (primaryEditorTemplateCreateRequest == null ? void 0 : primaryEditorTemplateCreateRequest.type) !== componentType) {
128122
- throw new Error(
128123
- `When defining a ${Array.isArray(editorTemplateCreateRequest) ? "multiple" : "single"} component to be created on an EditorTemplate, the type must match with the component being created. got: ${primaryEditorTemplateCreateRequest == null ? void 0 : primaryEditorTemplateCreateRequest.type} when it should have been ${componentType}`
128124
- );
128125
- }
128126
- const editorTemplateCreateRequests = Array.isArray(
128127
- editorTemplateCreateRequest
128128
- ) ? editorTemplateCreateRequest : [editorTemplateCreateRequest];
128530
+ const willWrapInSectionAndColumn = shouldWrapInSectionAndColumn(
128531
+ componentType,
128532
+ parentInfo.type
128533
+ );
128534
+ const isGridLike = willWrapInSectionAndColumn && componentType !== "Column" ? true : parentInfo.isGridLike;
128535
+ const tagName = componentType;
128536
+ const {
128537
+ properties: propertiesFromType,
128538
+ children,
128539
+ name
128540
+ } = getComponentBaseProperties(componentType, {
128541
+ // will wrap in a column with grid layout if dropping on a page or section directly
128542
+ isGridLike
128543
+ });
128544
+ const properties2 = {
128545
+ ...propertiesFromType,
128546
+ ...baseProperties
128547
+ };
128548
+ const parentElement = { source: parent };
128549
+ const isDetachedComponent = DetachedComponentTypes.has(componentType);
128550
+ const needTriggerComponent = isDetachedComponent && !skipTriggerCreation;
128129
128551
  const editStore2 = getEditStore();
128130
- function editorTemplateCreateRequestToInternalCreateRequest({
128131
- editorTemplateCreateRequest: editorTemplateCreateRequest2,
128132
- baseProperties: baseProperties2
128133
- }) {
128134
- const type5 = (editorTemplateCreateRequest2 == null ? void 0 : editorTemplateCreateRequest2.type) ?? componentType;
128135
- const willWrapInSectionAndColumn = shouldWrapInSectionAndColumn(
128136
- type5,
128552
+ const parentInstanceId = editStore2.runtimeEntitiesManager.widgets.getAnyInstanceIdForSourceId(
128553
+ parent.id
128554
+ );
128555
+ const pageComponent = editStore2.runtimeEntitiesManager.getClosestAncestorByType(
128556
+ parentInstanceId,
128557
+ "Page"
128558
+ );
128559
+ const pageSource = {
128560
+ source: {
128561
+ id: pageComponent == null ? void 0 : pageComponent.sourceId
128562
+ }
128563
+ };
128564
+ let primaryComponent = {
128565
+ parentElement: isDetachedComponent ? pageSource : parentElement,
128566
+ tagName,
128567
+ properties: properties2,
128568
+ children,
128569
+ scopeName,
128570
+ id: editStore2.operationManager.generateSourceId()
128571
+ };
128572
+ if (willWrapInSectionAndColumn) {
128573
+ primaryComponent = wrapInSectionColumnIfDroppingOnPage(
128574
+ primaryComponent,
128137
128575
  parentInfo.type
128138
128576
  );
128139
- const isGridLike = willWrapInSectionAndColumn && type5 !== "Column" ? true : parentInfo.isGridLike;
128140
- const { properties: propertiesFromType, children } = getComponentBaseProperties(
128141
- type5,
128142
- {
128143
- // will wrap in a column with grid layout if dropping on a page or section directly
128144
- isGridLike
128145
- },
128146
- editorTemplateCreateRequest2
128147
- );
128148
- const properties2 = {
128149
- ...propertiesFromType,
128150
- ...baseProperties2
128151
- };
128152
- const createAtParentElement = getCreateAtParentElement(
128153
- parent,
128154
- editorTemplateCreateRequest2 == null ? void 0 : editorTemplateCreateRequest2.createAt
128155
- );
128156
- let primaryComponent = {
128157
- parentElement: createAtParentElement,
128158
- tagName: type5,
128159
- properties: properties2,
128160
- children,
128161
- scopeName,
128162
- id: editStore2.operationManager.generateSourceId()
128163
- };
128164
- if (willWrapInSectionAndColumn) {
128165
- primaryComponent = wrapInSectionColumnIfDroppingOnPage(
128166
- primaryComponent,
128167
- parentInfo.type
128168
- );
128169
- }
128170
- return primaryComponent;
128171
128577
  }
128172
- const createRequests = editorTemplateCreateRequests.map(
128173
- (editorTemplateCreateRequest2, index2) => editorTemplateCreateRequestToInternalCreateRequest({
128174
- editorTemplateCreateRequest: editorTemplateCreateRequest2,
128175
- baseProperties: index2 === 0 ? baseProperties : {}
128176
- // baseProperties are only applied to the primary component
128177
- })
128178
- );
128179
- const hasOtherComponentsUpdates = otherComponentsUpdates && Object.keys(otherComponentsUpdates).length > 0;
128180
- const hasMultipleCreateComponents = editorTemplateCreateRequests.length > 1 && !skipSecondaryComponentsCreation;
128181
- const isBatchOperation = hasOtherComponentsUpdates || hasMultipleCreateComponents;
128182
- if (isBatchOperation) {
128183
- const performOtherComponentsUpdates = (otherComponentsUpdates2) => {
128184
- Object.entries(otherComponentsUpdates2).forEach(([sourceId, updates]) => {
128185
- editStore2.operationManager.setWidgetProperties({
128186
- sourceId,
128187
- properties: updates
128188
- });
128578
+ const performOtherComponentsUpdates = (otherComponentsUpdates2) => {
128579
+ Object.entries(otherComponentsUpdates2).forEach(([sourceId, updates]) => {
128580
+ editStore2.operationManager.setWidgetProperties({
128581
+ sourceId,
128582
+ properties: updates
128189
128583
  });
128190
- };
128584
+ });
128585
+ };
128586
+ if (needTriggerComponent) {
128587
+ const triggerComponent = getTriggerComponent({
128588
+ componentType,
128589
+ parentElement,
128590
+ primaryComponentName: name,
128591
+ triggerComponentId: editStore2.operationManager.generateSourceId()
128592
+ });
128191
128593
  editStore2.operationManager.batchUpdate(() => {
128192
- if (skipSecondaryComponentsCreation) {
128193
- editStore2.operationManager.createComponent(createRequests[0]);
128194
- } else {
128195
- createRequests.forEach((createRequest) => {
128196
- editStore2.operationManager.createComponent(createRequest);
128197
- });
128198
- }
128199
- if (hasOtherComponentsUpdates) {
128594
+ editStore2.operationManager.createComponent(triggerComponent);
128595
+ editStore2.operationManager.createComponent(primaryComponent);
128596
+ if (otherComponentsUpdates) {
128200
128597
  performOtherComponentsUpdates(otherComponentsUpdates);
128201
128598
  }
128202
128599
  });
128600
+ return triggerComponent.id;
128203
128601
  } else {
128204
- editStore2.operationManager.createComponent(createRequests[0]);
128602
+ if (otherComponentsUpdates) {
128603
+ editStore2.operationManager.batchUpdate(() => {
128604
+ editStore2.operationManager.createComponent(primaryComponent);
128605
+ performOtherComponentsUpdates(otherComponentsUpdates);
128606
+ });
128607
+ } else {
128608
+ editStore2.operationManager.createComponent(primaryComponent);
128609
+ }
128610
+ return primaryComponent.id;
128205
128611
  }
128206
- return createRequests.at(-1).id;
128207
128612
  }
128208
128613
  function wrapInSectionColumnIfDroppingOnPage(primaryComponent, parentType) {
128209
128614
  const { properties: sectionProperties } = getComponentBaseProperties(
@@ -130429,21 +130834,6 @@ function useTypographyStyling({
130429
130834
  style: style2
130430
130835
  };
130431
130836
  }
130432
- const editorTemplate$c = {
130433
- create: () => ({
130434
- type: "Button",
130435
- properties: {
130436
- label: Property.Static("Button"),
130437
- onClick: Property.Event([
130438
- {
130439
- type: TriggerStepType.RUN_JS,
130440
- code: "() => console.log('Button clicked')",
130441
- id: "buttonClick"
130442
- }
130443
- ])
130444
- }
130445
- })
130446
- };
130447
130837
  const DEFAULT_ICON_SPACING = 8;
130448
130838
  const DEFAULT_ICON_SIZE = 16;
130449
130839
  const ICON_POSITION_OPTIONS = [
@@ -130994,7 +131384,7 @@ const Button$3 = registerComponent$1(
130994
131384
  }
130995
131385
  ) });
130996
131386
  }
130997
- ).addEditorTemplate(editorTemplate$c);
131387
+ );
130998
131388
  const useAlignmentStyles = ({
130999
131389
  layout,
131000
131390
  verticalAlign,
@@ -131396,29 +131786,6 @@ const InternalVStack = (props2) => {
131396
131786
  const InternalHStack = (props2) => {
131397
131787
  return /* @__PURE__ */ jsxRuntimeExports.jsx(InternalStack, { direction: "row", ...props2 });
131398
131788
  };
131399
- function getSectionChildren() {
131400
- return [
131401
- {
131402
- tagName: "Column",
131403
- properties: {
131404
- width: Property.Dimension(Dim.fill()),
131405
- height: Property.Dimension(Dim.fill())
131406
- },
131407
- children: []
131408
- }
131409
- ];
131410
- }
131411
- const editorTemplate$b = {
131412
- create: () => {
131413
- return {
131414
- type: "Section",
131415
- children: getSectionChildren(),
131416
- properties: {
131417
- width: Property.Dimension(Dim.fill())
131418
- }
131419
- };
131420
- }
131421
- };
131422
131789
  const DEFAULT_SECTION_PADDING = {
131423
131790
  left: Dim.px(0),
131424
131791
  right: Dim.px(0),
@@ -131495,7 +131862,7 @@ const Section2 = registerComponent$1(
131495
131862
  }
131496
131863
  );
131497
131864
  }
131498
- ).addEditorTemplate(editorTemplate$b);
131865
+ );
131499
131866
  const generateClassName = (seed2) => {
131500
131867
  return `superblocks_widget_${seed2}`;
131501
131868
  };
@@ -131805,14 +132172,6 @@ const StaticComponent = ({
131805
132172
  }, [staticHeight]);
131806
132173
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...style2, width: "100%", height: "100%" }, children });
131807
132174
  };
131808
- const editorTemplate$a = {
131809
- create: () => ({
131810
- type: "Container",
131811
- properties: {
131812
- width: Property.Dimension(Dim.fill())
131813
- }
131814
- })
131815
- };
131816
132175
  const propertiesDefinition$g = {
131817
132176
  layout: Section$1.category(PropsPanelCategory.Layout).add(
131818
132177
  containerLayout({
@@ -131975,15 +132334,7 @@ const Container = registerComponent$1(
131975
132334
  propertiesDefinition: propertiesDefinition$g
131976
132335
  },
131977
132336
  InternalContainer
131978
- ).addEditorTemplate(editorTemplate$a);
131979
- const editorTemplate$9 = {
131980
- create: () => ({
131981
- type: "Container",
131982
- properties: {
131983
- width: Property.Dimension(Dim.fill())
131984
- }
131985
- })
131986
- };
132337
+ );
131987
132338
  const propertiesDefinition$f = {
131988
132339
  layout: Section$1.category(PropsPanelCategory.Layout).add(
131989
132340
  containerLayout({
@@ -132049,11 +132400,11 @@ const Column = registerComponent$1(
132049
132400
  }
132050
132401
  );
132051
132402
  }
132052
- ).addEditorTemplate(editorTemplate$9);
132053
- const editorTemplate$8 = {
132054
- create: () => ({
132403
+ );
132404
+ const editorTemplate = {
132405
+ create: (context2) => ({
132055
132406
  type: "Input",
132056
- generateBinding: true,
132407
+ bind: context2.generateUniqueName("Input"),
132057
132408
  properties: {
132058
132409
  label: Property.Static("Label")
132059
132410
  }
@@ -139723,7 +140074,7 @@ const Input2 = registerComponent$1(
139723
140074
  }
139724
140075
  ) });
139725
140076
  }
139726
- ).addEditorTemplate(editorTemplate$8);
140077
+ ).addEditorTemplate(editorTemplate);
139727
140078
  const propertiesDefinition$d = {
139728
140079
  contents: Section$1.category(PropsPanelCategory.Content).children({
139729
140080
  columns: Prop.array().readAndWrite().propertiesPanel({
@@ -141592,14 +141943,6 @@ const AutolinkedText = (props2) => {
141592
141943
  }
141593
141944
  );
141594
141945
  };
141595
- const editorTemplate$7 = {
141596
- create: () => ({
141597
- type: "Text",
141598
- properties: {
141599
- text: Property.Static("Hello, world!")
141600
- }
141601
- })
141602
- };
141603
141946
  var button$1 = {};
141604
141947
  var interopRequireDefault = { exports: {} };
141605
141948
  var hasRequiredInteropRequireDefault;
@@ -146797,7 +147140,7 @@ const Text$1 = registerComponent$1(
146797
147140
  }
146798
147141
  ) });
146799
147142
  }
146800
- ).addEditorTemplate(editorTemplate$7);
147143
+ );
146801
147144
  function useDialogEditing(props2) {
146802
147145
  const { isOpen, instanceId } = props2;
146803
147146
  const { features, isEditing } = useEditor();
@@ -146861,102 +147204,6 @@ function useDialogEditing(props2) {
146861
147204
  prevIsOpenRef.current = isOpen;
146862
147205
  }, [isOpen]);
146863
147206
  }
146864
- function getChildren$1(modalName) {
146865
- return [
146866
- {
146867
- tagName: "Container",
146868
- properties: {
146869
- variant: Property.Static("none"),
146870
- width: Property.Dimension(Dim.fill()),
146871
- layout: Property.Static("horizontal"),
146872
- horizontalAlign: Property.Static("left")
146873
- },
146874
- children: [
146875
- {
146876
- tagName: "Text",
146877
- properties: {
146878
- text: Property.Static("Modal Title"),
146879
- textStyle: Property.Static({
146880
- variant: "heading3"
146881
- })
146882
- },
146883
- children: []
146884
- }
146885
- ]
146886
- },
146887
- {
146888
- tagName: "Container",
146889
- properties: {
146890
- variant: Property.Static("none"),
146891
- width: Property.Dimension(Dim.fill()),
146892
- horizontalAlign: Property.Static("left")
146893
- },
146894
- children: []
146895
- },
146896
- {
146897
- tagName: "Container",
146898
- properties: {
146899
- spacing: Property.Dimension(Dim.px(8)),
146900
- width: Property.Dimension(Dim.fill()),
146901
- variant: Property.Static("none"),
146902
- layout: Property.Static("horizontal"),
146903
- horizontalAlign: Property.Static("right")
146904
- },
146905
- children: [
146906
- {
146907
- tagName: "Button",
146908
- properties: {
146909
- label: Property.Static("Cancel"),
146910
- variant: Property.Static("secondary"),
146911
- onClick: Property.Event([
146912
- {
146913
- id: "closeModal",
146914
- type: TriggerStepType.CONTROL_MODAL,
146915
- name: modalName,
146916
- action: "close"
146917
- }
146918
- ])
146919
- },
146920
- children: []
146921
- },
146922
- {
146923
- tagName: "Button",
146924
- properties: {
146925
- label: Property.Static("Confirm")
146926
- },
146927
- children: []
146928
- }
146929
- ]
146930
- }
146931
- ];
146932
- }
146933
- const editorTemplate$6 = {
146934
- create: (context2) => {
146935
- const modalName = context2.generateUniqueName("Modal");
146936
- return [
146937
- {
146938
- type: "Modal",
146939
- generateBinding: modalName,
146940
- children: getChildren$1(modalName),
146941
- createAt: "root"
146942
- },
146943
- {
146944
- type: "Button",
146945
- properties: {
146946
- label: Property.Static("Open Modal"),
146947
- onClick: Property.Event([
146948
- {
146949
- id: "openModal",
146950
- type: TriggerStepType.CONTROL_MODAL,
146951
- name: modalName,
146952
- action: "open"
146953
- }
146954
- ])
146955
- }
146956
- }
146957
- ];
146958
- }
146959
- };
146960
147207
  const MODAL_BORDER_RADIUS = 4;
146961
147208
  const MODAL_WIDTH_PRESETS = {
146962
147209
  // in percentages
@@ -147302,70 +147549,7 @@ const Modal = registerComponent$1(
147302
147549
  }
147303
147550
  );
147304
147551
  }
147305
- ).addEditorTemplate(editorTemplate$6);
147306
- function getChildren() {
147307
- return [
147308
- {
147309
- tagName: "Container",
147310
- properties: {
147311
- variant: Property.Static("none"),
147312
- width: Property.Dimension(Dim.fill()),
147313
- layout: Property.Static("horizontal"),
147314
- horizontalAlign: Property.Static("left")
147315
- },
147316
- children: [
147317
- {
147318
- tagName: "Text",
147319
- properties: {
147320
- text: Property.Static("Slideout Title"),
147321
- textStyle: Property.Static({
147322
- variant: "heading3"
147323
- })
147324
- },
147325
- children: []
147326
- }
147327
- ]
147328
- },
147329
- {
147330
- tagName: "Container",
147331
- properties: {
147332
- variant: Property.Static("none"),
147333
- width: Property.Dimension(Dim.fill()),
147334
- height: Property.Dimension(Dim.fill()),
147335
- horizontalAlign: Property.Static("left"),
147336
- layout: Property.Static("vertical")
147337
- },
147338
- children: []
147339
- }
147340
- ];
147341
- }
147342
- const editorTemplate$5 = {
147343
- create: (context2) => {
147344
- const slideoutName = context2.generateUniqueName("Slideout");
147345
- return [
147346
- {
147347
- type: "Slideout",
147348
- generateBinding: slideoutName,
147349
- children: getChildren(),
147350
- createAt: "root"
147351
- },
147352
- {
147353
- type: "Button",
147354
- properties: {
147355
- label: Property.Static("Open Slideout"),
147356
- onClick: Property.Event([
147357
- {
147358
- id: "openSlideout",
147359
- type: TriggerStepType.CONTROL_SLIDEOUT,
147360
- name: slideoutName,
147361
- action: "open"
147362
- }
147363
- ])
147364
- }
147365
- }
147366
- ];
147367
- }
147368
- };
147552
+ );
147369
147553
  const SlideoutSize = {
147370
147554
  xsmall: "xsmall",
147371
147555
  small: "small",
@@ -149719,7 +149903,7 @@ const Slideout = registerComponent$1(
149719
149903
  }
149720
149904
  );
149721
149905
  }
149722
- ).addEditorTemplate(editorTemplate$5);
149906
+ );
149723
149907
  const RowDensity = {
149724
149908
  "extra-small": "extra-small",
149725
149909
  small: "small",
@@ -149896,196 +150080,6 @@ const tagColorPalette = [
149896
150080
  "#9D585833",
149897
150081
  "#FF484833"
149898
150082
  ];
149899
- const DEFAULT_TABLE_DATA = [
149900
- {
149901
- photo: "https://cdn.superblocks.com/sample-data/rachel_kim.jpg",
149902
- name: "Rachel Kim",
149903
- email: "rachel.kim89@gmail.com",
149904
- role: "Vendor Partner",
149905
- company: "Urban Threads Co.",
149906
- status: "Active",
149907
- date_joined: "2023-04-12",
149908
- last_activity: "2025-06-07T16:20:00Z"
149909
- },
149910
- {
149911
- photo: "https://cdn.superblocks.com/sample-data/daniel_vargas.jpg",
149912
- name: "Daniel Vargas",
149913
- email: "dvargas1984@yahoo.com",
149914
- role: "Logistics Contact",
149915
- company: "Vargas Freight Ltd.",
149916
- status: "Pending",
149917
- date_joined: "2024-01-23",
149918
- last_activity: "2025-05-30T13:45:00Z"
149919
- },
149920
- {
149921
- photo: "https://cdn.superblocks.com/sample-data/sophie_liu.jpg",
149922
- name: "Sophie Liu",
149923
- email: "sophie.liu.personal@gmail.com",
149924
- role: "Retail Manager",
149925
- company: "Modern Goods",
149926
- status: "Active",
149927
- date_joined: "2022-09-10",
149928
- last_activity: "2025-06-08T09:03:00Z"
149929
- },
149930
- {
149931
- photo: "https://cdn.superblocks.com/sample-data/omar_el-sayed.jpg",
149932
- name: "Omar El-Sayed",
149933
- email: "omarsayed78@hotmail.com",
149934
- role: "Accounts Payable",
149935
- company: "Sayed Textiles",
149936
- status: "Inactive",
149937
- date_joined: "2021-06-05",
149938
- last_activity: "2024-12-18T11:40:00Z"
149939
- },
149940
- {
149941
- photo: "https://cdn.superblocks.com/sample-data/grace_nguyen.jpg",
149942
- name: "Grace Nguyen",
149943
- email: "gracenguyen23@icloud.com",
149944
- role: "Product Supplier",
149945
- company: "Green Earth Supplies",
149946
- status: "Active",
149947
- date_joined: "2023-11-03",
149948
- last_activity: "2025-06-08T17:28:00Z"
149949
- },
149950
- {
149951
- photo: "https://cdn.superblocks.com/sample-data/alex_romero.jpg",
149952
- name: "Alex Romero",
149953
- email: "alex.romero@gmail.com",
149954
- role: "Client Account Owner",
149955
- company: "Romero & Co.",
149956
- status: "Suspended",
149957
- date_joined: "2022-02-28",
149958
- last_activity: "2025-03-11T08:20:00Z"
149959
- },
149960
- {
149961
- photo: "https://cdn.superblocks.com/sample-data/lena_schmidt.jpg",
149962
- name: "Lena Schmidt",
149963
- email: "lena_schmidt92@gmx.de",
149964
- role: "Wholesale Contact",
149965
- company: "Schmidt Imports",
149966
- status: "Active",
149967
- date_joined: "2021-12-01",
149968
- last_activity: "2025-06-06T21:10:00Z"
149969
- },
149970
- {
149971
- photo: "https://cdn.superblocks.com/sample-data/devon_price.jpg",
149972
- name: "Devon Price",
149973
- email: "devon.price22@aol.com",
149974
- role: "Fulfillment Liaison",
149975
- company: "DepotLink",
149976
- status: "Active",
149977
- date_joined: "2024-05-17",
149978
- last_activity: "2025-06-08T10:42:00Z"
149979
- },
149980
- {
149981
- photo: "https://cdn.superblocks.com/sample-data/isabella_rossi.jpg",
149982
- name: "Isabella Rossi",
149983
- email: "bella.rossi@gmail.com",
149984
- role: "Procurement Agent",
149985
- company: "Rossi Global Sourcing",
149986
- status: "Pending",
149987
- date_joined: "2023-07-19",
149988
- last_activity: "2025-05-29T14:05:00Z"
149989
- },
149990
- {
149991
- photo: "https://cdn.superblocks.com/sample-data/tariq_khan.jpg",
149992
- name: "Tariq Khan",
149993
- email: "tariq.khan92@protonmail.com",
149994
- role: "International Ops Lead",
149995
- company: "CrossPort Trade Inc.",
149996
- status: "Active",
149997
- date_joined: "2022-11-08",
149998
- last_activity: "2025-06-08T16:11:00Z"
149999
- },
150000
- {
150001
- photo: "https://cdn.superblocks.com/sample-data/emily_zhang.jpg",
150002
- name: "Emily Zhang",
150003
- email: "emilyzhang.home@gmail.com",
150004
- role: "Logistics Coordinator",
150005
- company: "Zhang Export Ltd.",
150006
- status: "Active",
150007
- date_joined: "2023-03-12",
150008
- last_activity: "2025-06-08T19:02:00Z"
150009
- }
150010
- ];
150011
- const DEFAULT_TABLE_COLUMNS = {
150012
- name: {
150013
- columnType: "text",
150014
- label: "Name"
150015
- },
150016
- email: {
150017
- columnType: "email",
150018
- label: "Email"
150019
- },
150020
- role: {
150021
- columnType: "text",
150022
- label: "Role"
150023
- },
150024
- company: {
150025
- columnType: "text",
150026
- label: "Company"
150027
- },
150028
- status: {
150029
- columnType: "tags",
150030
- tagDisplayConfig: {
150031
- Active: {
150032
- color: "#14CDB733"
150033
- },
150034
- Pending: {
150035
- color: "#FF9F3533"
150036
- },
150037
- Inactive: {
150038
- color: "#a6a0a033"
150039
- },
150040
- Suspended: {
150041
- color: "#FF62A433"
150042
- }
150043
- },
150044
- label: "Status"
150045
- },
150046
- date_joined: {
150047
- columnType: "date",
150048
- inputFormat: "YYYY-MM-DD",
150049
- outputFormat: "MM-DD-YYYY",
150050
- label: "Date joined"
150051
- },
150052
- last_activity: {
150053
- columnType: "date",
150054
- inputFormat: "YYYY-MM-DDTHH:mm:ssZ",
150055
- outputFormat: "MM-DD-YYYY",
150056
- label: "Last activity"
150057
- },
150058
- photo: {
150059
- columnType: "image",
150060
- label: "Photo",
150061
- imageBorderRadius: {
150062
- topLeft: Dim.px(16),
150063
- topRight: Dim.px(16),
150064
- bottomLeft: Dim.px(16),
150065
- bottomRight: Dim.px(16)
150066
- }
150067
- }
150068
- };
150069
- const DEFAULT_TABLE_KEYS = Object.keys(DEFAULT_TABLE_COLUMNS);
150070
- const CLEARED_TABLE_COLUMNS = DEFAULT_TABLE_KEYS.reduce(
150071
- (acc, key2) => {
150072
- acc[key2] = void 0;
150073
- return acc;
150074
- },
150075
- {}
150076
- );
150077
- const editorTemplate$4 = {
150078
- create: () => ({
150079
- type: "Table",
150080
- generateBinding: true,
150081
- properties: {
150082
- tableData: Property.Static(DEFAULT_TABLE_DATA),
150083
- columns: Property.Static(DEFAULT_TABLE_COLUMNS),
150084
- header: Property.Static("Customers"),
150085
- searchPlaceholder: Property.Static("Search...")
150086
- }
150087
- })
150088
- };
150089
150083
  const CurrencyList = CC.getCodes();
150090
150084
  const tableColumnTypes = [
150091
150085
  {
@@ -159777,14 +159771,14 @@ function getLoaderFn(options) {
159777
159771
  if (!(loader === "all")) return [3, 3];
159778
159772
  return [4, import(
159779
159773
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
159780
- "./allPathsLoader-CN9EPq1w.js"
159774
+ "./allPathsLoader-BIuTbNcY.js"
159781
159775
  )];
159782
159776
  case 2:
159783
159777
  return [2, _b2.sent().allPathsLoader];
159784
159778
  case 3:
159785
159779
  return [4, import(
159786
159780
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
159787
- "./splitPathsBySizeLoader-KmNlU_JE.js"
159781
+ "./splitPathsBySizeLoader-BM6L8m2i.js"
159788
159782
  )];
159789
159783
  case 4:
159790
159784
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -190958,14 +190952,13 @@ const _TableWidget = class _TableWidget extends React__default.Component {
190958
190952
  }
190959
190953
  createTableCell(columnProperties, isHidden2) {
190960
190954
  return (props2) => {
190961
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i;
190955
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
190962
190956
  const currentRowIndex = props2.cell.row.index;
190963
- const originalRowIndex = ((_a2 = this.props.filteredOrderMap) == null ? void 0 : _a2[currentRowIndex]) ?? currentRowIndex;
190964
- const currentRow = ((_b2 = this.props.tableData) == null ? void 0 : _b2[originalRowIndex]) ?? props2.cell.row.original;
190957
+ ((_a2 = this.props.filteredOrderMap) == null ? void 0 : _a2[currentRowIndex]) ?? currentRowIndex;
190965
190958
  const cellProperties = getCellProperties(
190966
- (_d2 = (_c2 = this.props) == null ? void 0 : _c2.cellProps) == null ? void 0 : _d2.textStyle,
190959
+ (_c2 = (_b2 = this.props) == null ? void 0 : _b2.cellProps) == null ? void 0 : _c2.textStyle,
190967
190960
  columnProperties,
190968
- currentRow
190961
+ props2.cell.row.original
190969
190962
  );
190970
190963
  if (columnProperties.columnType === ColumnType.BUTTON) {
190971
190964
  const buttonProps = {
@@ -190980,7 +190973,10 @@ const _TableWidget = class _TableWidget extends React__default.Component {
190980
190973
  buttonBorder: cellProperties.buttonBorder,
190981
190974
  buttonVariant: cellProperties.buttonVariant ?? "primary",
190982
190975
  buttonTextStyle: cellProperties.buttonTextStyle,
190983
- cellIcon: getPropertyValue(columnProperties.buttonIcon, currentRow),
190976
+ cellIcon: getPropertyValue(
190977
+ columnProperties.buttonIcon,
190978
+ props2.cell.row.original
190979
+ ),
190984
190980
  cellIconPosition: cellProperties.cellIconPosition ?? "left",
190985
190981
  rowDensity: this.props.rowDensity,
190986
190982
  id: columnProperties.id,
@@ -190998,7 +190994,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
190998
190994
  columnId: columnProperties.id
190999
190995
  },
191000
190996
  maxLinesPerRow: this.props.maxLinesPerRow,
191001
- tableCellTextStyle: (_e2 = this.props.cellProps) == null ? void 0 : _e2.textStyle,
190997
+ tableCellTextStyle: (_d2 = this.props.cellProps) == null ? void 0 : _d2.textStyle,
191002
190998
  value: props2.cell.value
191003
190999
  });
191004
191000
  } else {
@@ -191008,19 +191004,19 @@ const _TableWidget = class _TableWidget extends React__default.Component {
191008
191004
  columnType: columnProperties.columnType,
191009
191005
  editInputType: columnProperties.editInputType,
191010
191006
  maxLinesPerRow: this.props.maxLinesPerRow,
191011
- tableCellTextStyle: (_f2 = this.props.cellProps) == null ? void 0 : _f2.textStyle,
191007
+ tableCellTextStyle: (_e2 = this.props.cellProps) == null ? void 0 : _e2.textStyle,
191012
191008
  typographies: this.props.theme.typographies,
191013
191009
  cellProps: {
191014
191010
  // since these are overridden by the cellProperties
191015
191011
  ...columnProperties,
191016
191012
  ...getCellProperties(
191017
- (_h2 = (_g2 = this.props) == null ? void 0 : _g2.cellProps) == null ? void 0 : _h2.textStyle,
191013
+ (_g2 = (_f2 = this.props) == null ? void 0 : _f2.cellProps) == null ? void 0 : _g2.textStyle,
191018
191014
  columnProperties,
191019
- currentRow
191015
+ props2.cell.row.original
191020
191016
  ),
191021
191017
  isHidden: isHidden2,
191022
191018
  cellProperties,
191023
- tagsColorAssignment: (_i = this.cachedTagColorAssignment) == null ? void 0 : _i[columnProperties.id],
191019
+ tagsColorAssignment: (_h2 = this.cachedTagColorAssignment) == null ? void 0 : _h2[columnProperties.id],
191024
191020
  booleanStyleFalse: columnProperties.booleanStyleFalse,
191025
191021
  rowDensity: this.props.rowDensity,
191026
191022
  isFocused: props2.isFocused,
@@ -191476,7 +191472,7 @@ const Table = registerComponent$1(
191476
191472
  }
191477
191473
  ) });
191478
191474
  }
191479
- ).addEditorTemplate(editorTemplate$4);
191475
+ );
191480
191476
  var NS = getClassNamespace$1();
191481
191477
  var MULTISELECT = "".concat(NS, "-multi-select");
191482
191478
  var MULTISELECT_POPOVER = "".concat(MULTISELECT, "-popover");
@@ -195098,25 +195094,6 @@ const ListItemRenderer = (itemProps) => {
195098
195094
  ) }, itemProps.index);
195099
195095
  };
195100
195096
  ListItemRenderer.displayName = "SelectListItemRenderer";
195101
- const editorTemplate$3 = {
195102
- create: () => ({
195103
- type: "Dropdown",
195104
- generateBinding: true,
195105
- properties: {
195106
- label: Property.Static("Label"),
195107
- options: Property.Computed([
195108
- { label: "All statuses", value: "all" },
195109
- { label: "Pending", value: "pending" },
195110
- { label: "Processing", value: "processing" },
195111
- { label: "Completed", value: "completed" },
195112
- { label: "Failed", value: "failed" },
195113
- { label: "Cancelled", value: "cancelled" },
195114
- { label: "Rejected", value: "rejected" },
195115
- { label: "On hold", value: "on_hold" }
195116
- ])
195117
- }
195118
- })
195119
- };
195120
195097
  const DropdownEntireObjectOption = "$$ENTIRE_OBJECT";
195121
195098
  const normalizeFunction$1 = (val, transformationValue) => {
195122
195099
  if (transformationValue === DropdownEntireObjectOption) {
@@ -195678,7 +195655,7 @@ const Dropdown = registerComponent$1(
195678
195655
  }
195679
195656
  ) }) });
195680
195657
  }
195681
- ).addEditorTemplate(editorTemplate$3);
195658
+ );
195682
195659
  const CustomComponent = registerComponent$1(
195683
195660
  "CustomComponent",
195684
195661
  {
@@ -195852,15 +195829,6 @@ class CheckboxComponent extends React__default.PureComponent {
195852
195829
  );
195853
195830
  }
195854
195831
  }
195855
- const editorTemplate$2 = {
195856
- create: () => ({
195857
- type: "Checkbox",
195858
- generateBinding: true,
195859
- properties: {
195860
- label: Property.Static("Label")
195861
- }
195862
- })
195863
- };
195864
195832
  const propertiesDefinition$7 = {
195865
195833
  general: Section$1.category(PropsPanelCategory.Content).children({
195866
195834
  label: Prop.string().readAndWrite().default("").propertiesPanel({
@@ -195988,7 +195956,7 @@ const Checkbox = registerComponent$1(
195988
195956
  }
195989
195957
  ) });
195990
195958
  }
195991
- ).addEditorTemplate(editorTemplate$2);
195959
+ );
195992
195960
  const adjustDateFormatSideEffect = (params) => {
195993
195961
  const widgetMeta = params.widgetMeta;
195994
195962
  const widgetState = params.widgetState;
@@ -196362,15 +196330,6 @@ const DatePicker = registerComponent$1(
196362
196330
  ) });
196363
196331
  }
196364
196332
  );
196365
- const editorTemplate$1 = {
196366
- create: () => ({
196367
- type: "Switch",
196368
- generateBinding: true,
196369
- properties: {
196370
- label: Property.Static("Label")
196371
- }
196372
- })
196373
- };
196374
196333
  const propertiesDefinition$5 = {
196375
196334
  general: Section$1.category(PropsPanelCategory.Content).children({
196376
196335
  label: Prop.string().readAndWrite().default("").propertiesPanel({
@@ -196656,10 +196615,10 @@ const Switch = registerComponent$1(
196656
196615
  props2.sourceId
196657
196616
  ) });
196658
196617
  }
196659
- ).addEditorTemplate(editorTemplate$1);
196618
+ );
196660
196619
  const propertiesDefinition$4 = {
196661
196620
  general: Section$1.category(PropsPanelCategory.Content).children({
196662
- icon: Prop.string().readAndWrite().propertiesPanel({
196621
+ icon: Prop.string().readAndWrite().default("info").propertiesPanel({
196663
196622
  label: "Icon",
196664
196623
  helpText: "Select an icon",
196665
196624
  controlType: "ICON_SELECTOR"
@@ -196747,19 +196706,6 @@ const Icon = registerComponent$1(
196747
196706
  );
196748
196707
  }
196749
196708
  );
196750
- const editorTemplate = {
196751
- create: (context2) => ({
196752
- type: "Image",
196753
- properties: {
196754
- src: Property.Static(
196755
- "https://lowcode.s3.us-west-2.amazonaws.com/eilish-billie.jpeg"
196756
- ),
196757
- fillContainer: Property.Static(true),
196758
- width: context2.parentInfo.isGridLike ? Property.Dimension(Dim.col(4)) : Property.Dimension(Dim.px(300)),
196759
- height: Property.Dimension(Dim.fit())
196760
- }
196761
- })
196762
- };
196763
196709
  const StyledImage = qe$1.img`
196764
196710
  opacity: 0;
196765
196711
  pointer-events: none;
@@ -196991,7 +196937,7 @@ const Image = registerComponent$1(
196991
196937
  }
196992
196938
  ) });
196993
196939
  }
196994
- ).addEditorTemplate(editorTemplate);
196940
+ );
196995
196941
  const propertiesDefinition$2 = {
196996
196942
  general: Section$1.category(PropsPanelCategory.Uncategorized).propertiesPanel({ showHeader: false }).children({
196997
196943
  defaultValue: Prop.any().readAndWrite().propertiesPanel({
@@ -198001,7 +197947,7 @@ const EmbedWrapper$2 = (props2) => {
198001
197947
  useEffect(() => {
198002
197948
  const bootstrapResponseListener = (event) => {
198003
197949
  try {
198004
- rootStore.apis.agentUrls = event.data.payload.agentUrls ?? (event.data.payload.agentUrl ? [event.data.payload.agentUrl] : []);
197950
+ rootStore.apis.baseUrl = event.data.payload.agentUrl;
198005
197951
  rootStore.apis.setTokens(
198006
197952
  event.data.payload.token,
198007
197953
  event.data.payload.accessToken
@@ -198019,13 +197965,6 @@ const EmbedWrapper$2 = (props2) => {
198019
197965
  "sb-bootstrap-response",
198020
197966
  bootstrapResponseListener
198021
197967
  );
198022
- const updateActiveAgentsListener = (event) => {
198023
- rootStore.apis.agentUrls = event.data.payload.agentUrls;
198024
- };
198025
- iframeMessageHandler.addEventListener(
198026
- "sb-update-active-agents",
198027
- updateActiveAgentsListener
198028
- );
198029
197968
  const retrievePropertyPanelPropsListener = (event) => {
198030
197969
  const sourceId = event.data.payload.sourceId;
198031
197970
  const instanceId = getEditStore().runtimeEntitiesManager.widgets.getAnyInstanceIdForSourceId(
@@ -198113,7 +198052,7 @@ const EmbedWrapper$2 = (props2) => {
198113
198052
  parent,
198114
198053
  scopeName,
198115
198054
  baseProperties,
198116
- skipSecondaryComponentsCreation,
198055
+ skipTriggerCreation,
198117
198056
  otherComponentsUpdates
198118
198057
  } = event.data.payload;
198119
198058
  try {
@@ -198122,7 +198061,7 @@ const EmbedWrapper$2 = (props2) => {
198122
198061
  parent,
198123
198062
  scopeName,
198124
198063
  baseProperties,
198125
- skipSecondaryComponentsCreation,
198064
+ skipTriggerCreation,
198126
198065
  otherComponentsUpdates
198127
198066
  });
198128
198067
  } catch (error2) {
@@ -198156,10 +198095,6 @@ const EmbedWrapper$2 = (props2) => {
198156
198095
  "sb-bootstrap-response",
198157
198096
  bootstrapResponseListener
198158
198097
  );
198159
- iframeMessageHandler.removeEventListener(
198160
- "sb-update-active-agents",
198161
- updateActiveAgentsListener
198162
- );
198163
198098
  iframeMessageHandler.removeEventListener(
198164
198099
  "sb-edit-operation-acknowledge",
198165
198100
  editOperationAcknowledgeListener
@@ -198309,7 +198244,7 @@ const EmbedWrapper$1 = (props2) => {
198309
198244
  useEffect(() => {
198310
198245
  const bootstrapResponseListener = (event) => {
198311
198246
  try {
198312
- rootStore.apis.agentUrls = event.data.payload.agentUrls ?? (event.data.payload.agentUrl ? [event.data.payload.agentUrl] : []);
198247
+ rootStore.apis.baseUrl = event.data.payload.agentUrl;
198313
198248
  rootStore.apis.setTokens(
198314
198249
  event.data.payload.token,
198315
198250
  event.data.payload.accessToken
@@ -200747,4 +200682,4 @@ export {
200747
200682
  setQueryParams as y,
200748
200683
  download as z
200749
200684
  };
200750
- //# sourceMappingURL=index-_YYxQpwB.js.map
200685
+ //# sourceMappingURL=index-CCewmzC_.js.map