@superblocksteam/library 2.0.12-next.2 → 2.0.12-next.21
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.
- package/dist/{allPaths-nl-QZWn1.js → allPaths-BjzQkMjc.js} +2 -2
- package/dist/{allPaths-nl-QZWn1.js.map → allPaths-BjzQkMjc.js.map} +1 -1
- package/dist/{allPaths-DGMrcGYt.js → allPaths-CQOhjpXk.js} +2 -2
- package/dist/{allPaths-DGMrcGYt.js.map → allPaths-CQOhjpXk.js.map} +1 -1
- package/dist/{allPathsLoader-BIuTbNcY.js → allPathsLoader-BYewEWVh.js} +3 -3
- package/dist/{allPathsLoader-BIuTbNcY.js.map → allPathsLoader-BYewEWVh.js.map} +1 -1
- package/dist/{allPathsLoader-Tf9x8dtV.js → allPathsLoader-BYj7sg41.js} +3 -3
- package/dist/{allPathsLoader-Tf9x8dtV.js.map → allPathsLoader-BYj7sg41.js.map} +1 -1
- package/dist/{devtools-consolidated-Brbj1JeD.js → devtools-consolidated-CHfJX3eH.js} +2 -2
- package/dist/{devtools-consolidated-Brbj1JeD.js.map → devtools-consolidated-CHfJX3eH.js.map} +1 -1
- package/dist/{index-CCewmzC_.js → index-CH4jAtWn.js} +831 -743
- package/dist/{index-CCewmzC_.js.map → index-CH4jAtWn.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-BM6L8m2i.js → splitPathsBySizeLoader-2oYHBTYy.js} +2 -2
- package/dist/{splitPathsBySizeLoader-BM6L8m2i.js.map → splitPathsBySizeLoader-2oYHBTYy.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-C3MBiqmb.js → splitPathsBySizeLoader-go6FZrRw.js} +2 -2
- package/dist/{splitPathsBySizeLoader-C3MBiqmb.js.map → splitPathsBySizeLoader-go6FZrRw.js.map} +1 -1
- package/dist-types/edit-mode/create-component.d.ts +5 -4
- package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +5 -2
- package/dist-types/lib/internal-details/lib/features/api-store.d.ts +1 -1
- package/dist-types/lib/internal-details/lib/types.d.ts +7 -2
- package/dist-types/lib/internal-details/sb-wrapper.d.ts +37 -2
- package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +3 -1
- package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +3 -1
- package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +1 -2
- package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +4 -2
- package/dist-types/lib/triggers/implementations/navigate/utils.d.ts +1 -0
- package/dist-types/lib/triggers/implementations/set-profile.d.ts +3 -1
- package/dist-types/lib/triggers/implementations/show-alert.d.ts +5 -1
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +4 -2
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +3 -1
- package/dist-types/lib/triggers/implementations/trigger-event.d.ts +4 -2
- package/dist-types/lib/user-facing/components/button/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/checkbox/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/column/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/container/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/date-picker/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/dropdown/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/icon/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/icon/index.d.ts +2 -2
- package/dist-types/lib/user-facing/components/icon/props.d.ts +1 -1
- package/dist-types/lib/user-facing/components/image/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/key-value/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/modal/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/section/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/slideout/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/switch/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/table/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/text/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/event-flow.d.ts +66 -22
- package/package.json +2 -2
- /package/dist-types/{edit-mode → lib/user-facing/components/table}/default-table-data.d.ts +0 -0
|
@@ -54595,12 +54595,12 @@ const RunApisTrigger = {
|
|
|
54595
54595
|
onFinish == null ? void 0 : onFinish(responses);
|
|
54596
54596
|
});
|
|
54597
54597
|
},
|
|
54598
|
-
create(apis,
|
|
54598
|
+
create(apis, opts) {
|
|
54599
54599
|
return {
|
|
54600
54600
|
type: TriggerStepType.RUN_APIS,
|
|
54601
54601
|
apis,
|
|
54602
|
-
onSuccess,
|
|
54603
|
-
onError:
|
|
54602
|
+
onSuccess: opts == null ? void 0 : opts.onSuccess,
|
|
54603
|
+
onError: opts == null ? void 0 : opts.onError
|
|
54604
54604
|
};
|
|
54605
54605
|
}
|
|
54606
54606
|
};
|
|
@@ -54624,12 +54624,12 @@ const ControlModalTrigger = {
|
|
|
54624
54624
|
args: [step]
|
|
54625
54625
|
});
|
|
54626
54626
|
},
|
|
54627
|
-
create(modal,
|
|
54627
|
+
create(modal, opts) {
|
|
54628
54628
|
const meta = getBindingIdentifier(modal);
|
|
54629
54629
|
return {
|
|
54630
54630
|
type: TriggerStepType.CONTROL_MODAL,
|
|
54631
54631
|
name: meta == null ? void 0 : meta.entityName,
|
|
54632
|
-
action:
|
|
54632
|
+
action: opts.action
|
|
54633
54633
|
};
|
|
54634
54634
|
}
|
|
54635
54635
|
};
|
|
@@ -54648,12 +54648,12 @@ const ControlSlideoutTrigger = {
|
|
|
54648
54648
|
args: [step]
|
|
54649
54649
|
});
|
|
54650
54650
|
},
|
|
54651
|
-
create(slideout,
|
|
54651
|
+
create(slideout, opts) {
|
|
54652
54652
|
const meta = getBindingIdentifier(slideout);
|
|
54653
54653
|
return {
|
|
54654
54654
|
type: TriggerStepType.CONTROL_SLIDEOUT,
|
|
54655
54655
|
name: meta == null ? void 0 : meta.entityName,
|
|
54656
|
-
action:
|
|
54656
|
+
action: opts.action
|
|
54657
54657
|
};
|
|
54658
54658
|
}
|
|
54659
54659
|
};
|
|
@@ -54775,18 +54775,37 @@ const NavigateToRouteTrigger = {
|
|
|
54775
54775
|
};
|
|
54776
54776
|
}
|
|
54777
54777
|
};
|
|
54778
|
+
const isValidUrlScheme = (url2) => {
|
|
54779
|
+
return (
|
|
54780
|
+
// Standard http call
|
|
54781
|
+
url2.startsWith("http://") || // Secure http call
|
|
54782
|
+
url2.startsWith("https://") || // Mail url to directly open email app prefilled
|
|
54783
|
+
url2.startsWith("mailto:") || // Tel url to directly open phone app prefilled
|
|
54784
|
+
url2.startsWith("tel:")
|
|
54785
|
+
);
|
|
54786
|
+
};
|
|
54778
54787
|
const NavigateToTrigger = {
|
|
54779
54788
|
type: TriggerStepType.NAVIGATE_TO,
|
|
54780
54789
|
async execute(_context, step) {
|
|
54781
|
-
|
|
54790
|
+
let url2 = step.url;
|
|
54791
|
+
if (!isValidUrlScheme(url2)) {
|
|
54792
|
+
url2 = "https://" + url2;
|
|
54793
|
+
}
|
|
54794
|
+
if (step.newWindow) {
|
|
54795
|
+
window.open(url2, "_blank");
|
|
54796
|
+
} else if (window.top) {
|
|
54797
|
+
window.top.location.href = url2;
|
|
54798
|
+
} else {
|
|
54799
|
+
window.location.href = url2;
|
|
54800
|
+
}
|
|
54782
54801
|
},
|
|
54783
|
-
create(
|
|
54802
|
+
create(url2, opts) {
|
|
54784
54803
|
return {
|
|
54785
54804
|
type: TriggerStepType.NAVIGATE_TO,
|
|
54786
|
-
url:
|
|
54787
|
-
newWindow:
|
|
54788
|
-
replaceHistory:
|
|
54789
|
-
arguments:
|
|
54805
|
+
url: url2,
|
|
54806
|
+
newWindow: (opts == null ? void 0 : opts.newWindow) ?? false,
|
|
54807
|
+
replaceHistory: opts == null ? void 0 : opts.replaceHistory,
|
|
54808
|
+
arguments: opts == null ? void 0 : opts.arguments
|
|
54790
54809
|
};
|
|
54791
54810
|
}
|
|
54792
54811
|
};
|
|
@@ -54795,16 +54814,17 @@ const SetQueryParamsTrigger = {
|
|
|
54795
54814
|
async execute(_context, step) {
|
|
54796
54815
|
console.log("SetQueryParamsTrigger", step);
|
|
54797
54816
|
},
|
|
54798
|
-
create(queryParams,
|
|
54817
|
+
create(queryParams, opts) {
|
|
54799
54818
|
return {
|
|
54800
54819
|
type: TriggerStepType.SET_QUERY_PARAMS,
|
|
54801
54820
|
queryParams,
|
|
54802
|
-
keepQueryParams
|
|
54821
|
+
keepQueryParams: (opts == null ? void 0 : opts.keep) ?? false
|
|
54803
54822
|
};
|
|
54804
54823
|
}
|
|
54805
54824
|
};
|
|
54806
54825
|
const RunJsTrigger = {
|
|
54807
54826
|
type: TriggerStepType.RUN_JS,
|
|
54827
|
+
// TODO: implement opts?: { defer?: number }
|
|
54808
54828
|
create(handler) {
|
|
54809
54829
|
return {
|
|
54810
54830
|
type: TriggerStepType.RUN_JS,
|
|
@@ -54829,11 +54849,11 @@ const SetProfileTrigger = {
|
|
|
54829
54849
|
async execute(_context, step) {
|
|
54830
54850
|
console.log("SetProfileTrigger", step);
|
|
54831
54851
|
},
|
|
54832
|
-
create(profileId,
|
|
54852
|
+
create(profileId, opts) {
|
|
54833
54853
|
return {
|
|
54834
54854
|
type: TriggerStepType.SET_PROFILE,
|
|
54835
54855
|
profileId,
|
|
54836
|
-
action:
|
|
54856
|
+
action: opts.action ?? "set"
|
|
54837
54857
|
};
|
|
54838
54858
|
}
|
|
54839
54859
|
};
|
|
@@ -89724,7 +89744,7 @@ const StatusIconWrapper = qe$1.div`
|
|
|
89724
89744
|
const getCloseIcon = (dataTest) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
89725
89745
|
CloseIconWrapper,
|
|
89726
89746
|
{
|
|
89727
|
-
"data-test": `${dataTest}-close
|
|
89747
|
+
"data-test": dataTest ? `${dataTest}-close` : "notification-close",
|
|
89728
89748
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgClose, {})
|
|
89729
89749
|
}
|
|
89730
89750
|
);
|
|
@@ -89742,7 +89762,7 @@ const DescriptionWrapper = qe$1.div`
|
|
|
89742
89762
|
margin-right: -10px;
|
|
89743
89763
|
`;
|
|
89744
89764
|
const styleMessage = (message2, dataTest) => {
|
|
89745
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageWrapper, { "data-test": dataTest, children: message2 });
|
|
89765
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageWrapper, { "data-test": dataTest ? dataTest : "notification", children: message2 });
|
|
89746
89766
|
};
|
|
89747
89767
|
const styleDescription = (description) => {
|
|
89748
89768
|
if (!description) {
|
|
@@ -89849,7 +89869,7 @@ function sendNotification({
|
|
|
89849
89869
|
}
|
|
89850
89870
|
},
|
|
89851
89871
|
props: {
|
|
89852
|
-
"data-testid": dataTest
|
|
89872
|
+
"data-testid": dataTest ?? attrSafeKey(`notification-${key2}`)
|
|
89853
89873
|
}
|
|
89854
89874
|
});
|
|
89855
89875
|
}
|
|
@@ -89864,19 +89884,19 @@ const ShowAlertTrigger = {
|
|
|
89864
89884
|
});
|
|
89865
89885
|
sendNotification({
|
|
89866
89886
|
message: computedMessage,
|
|
89867
|
-
type: step.style,
|
|
89887
|
+
type: step.style ?? "success",
|
|
89868
89888
|
duration: step.alertDuration ?? 4,
|
|
89869
89889
|
placement: step.alertPosition ?? NotificationPosition.bottomRight,
|
|
89870
89890
|
dataTest: "alert-notification"
|
|
89871
89891
|
});
|
|
89872
89892
|
},
|
|
89873
|
-
create(message2,
|
|
89893
|
+
create(message2, opts) {
|
|
89874
89894
|
return {
|
|
89875
89895
|
type: TriggerStepType.SHOW_ALERT,
|
|
89876
89896
|
message: message2,
|
|
89877
|
-
style:
|
|
89878
|
-
alertDuration,
|
|
89879
|
-
alertPosition
|
|
89897
|
+
style: (opts == null ? void 0 : opts.type) ?? "success",
|
|
89898
|
+
alertDuration: opts == null ? void 0 : opts.durationMs,
|
|
89899
|
+
alertPosition: opts == null ? void 0 : opts.position
|
|
89880
89900
|
};
|
|
89881
89901
|
}
|
|
89882
89902
|
};
|
|
@@ -89926,11 +89946,11 @@ const SetStateVarTrigger = {
|
|
|
89926
89946
|
args: [value]
|
|
89927
89947
|
});
|
|
89928
89948
|
},
|
|
89929
|
-
create(variable,
|
|
89949
|
+
create(variable, opts) {
|
|
89930
89950
|
return {
|
|
89931
89951
|
type: TriggerStepType.SET_STATE_VAR,
|
|
89932
89952
|
variable,
|
|
89933
|
-
value
|
|
89953
|
+
value: opts.value
|
|
89934
89954
|
};
|
|
89935
89955
|
}
|
|
89936
89956
|
};
|
|
@@ -89941,11 +89961,11 @@ const ControlTimerTrigger = {
|
|
|
89941
89961
|
step.timer[step.action]();
|
|
89942
89962
|
}
|
|
89943
89963
|
},
|
|
89944
|
-
create(timer,
|
|
89964
|
+
create(timer, opts) {
|
|
89945
89965
|
return {
|
|
89946
89966
|
type: TriggerStepType.CONTROL_TIMER,
|
|
89947
89967
|
timer,
|
|
89948
|
-
action:
|
|
89968
|
+
action: opts.action
|
|
89949
89969
|
};
|
|
89950
89970
|
}
|
|
89951
89971
|
};
|
|
@@ -89954,12 +89974,12 @@ const TriggerEventTrigger = {
|
|
|
89954
89974
|
async execute(_context, step) {
|
|
89955
89975
|
console.log("TriggerEventTrigger", step);
|
|
89956
89976
|
},
|
|
89957
|
-
create(eventName,
|
|
89977
|
+
create(eventName, opts) {
|
|
89958
89978
|
return {
|
|
89959
89979
|
type: TriggerStepType.TRIGGER_EVENT,
|
|
89960
89980
|
event: { name: eventName },
|
|
89961
89981
|
//TODO(code-mode): this is a hack to get the name
|
|
89962
|
-
eventPayload
|
|
89982
|
+
eventPayload: opts == null ? void 0 : opts.data
|
|
89963
89983
|
};
|
|
89964
89984
|
}
|
|
89965
89985
|
};
|
|
@@ -94242,7 +94262,7 @@ function mergeRelations(existingRelations, relations) {
|
|
|
94242
94262
|
) : relations;
|
|
94243
94263
|
return mergedRelations;
|
|
94244
94264
|
}
|
|
94245
|
-
function getChildren(input, path2, entity, scopedState) {
|
|
94265
|
+
function getChildren$2(input, path2, entity, scopedState) {
|
|
94246
94266
|
function getChildrenFromSection(section) {
|
|
94247
94267
|
return Object.keys(section.props).reduce(
|
|
94248
94268
|
(acc, key2) => {
|
|
@@ -94653,7 +94673,7 @@ class CompositeProp extends Prop {
|
|
|
94653
94673
|
}
|
|
94654
94674
|
return {
|
|
94655
94675
|
...definition,
|
|
94656
|
-
children: getChildren(
|
|
94676
|
+
children: getChildren$2(
|
|
94657
94677
|
this.nestedProps,
|
|
94658
94678
|
this.prop.path,
|
|
94659
94679
|
entity,
|
|
@@ -94683,7 +94703,7 @@ class RecordProp extends Prop {
|
|
|
94683
94703
|
}
|
|
94684
94704
|
return {
|
|
94685
94705
|
...definition,
|
|
94686
|
-
children: getChildren(
|
|
94706
|
+
children: getChildren$2(
|
|
94687
94707
|
this.nestedProps,
|
|
94688
94708
|
this.prop.path,
|
|
94689
94709
|
entity,
|
|
@@ -95080,7 +95100,7 @@ function registerStores(stores) {
|
|
|
95080
95100
|
internalStores = { ...internalStores, ...stores };
|
|
95081
95101
|
if (SUPPORTED_MODES.includes("production")) {
|
|
95082
95102
|
if (Object.keys(internalStores).length === Object.keys(stores).length) {
|
|
95083
|
-
import("./devtools-consolidated-
|
|
95103
|
+
import("./devtools-consolidated-CHfJX3eH.js").then(({ initializeCustomDevTools, setRegisteredStores }) => {
|
|
95084
95104
|
setRegisteredStores(internalStores);
|
|
95085
95105
|
initializeCustomDevTools();
|
|
95086
95106
|
}).catch((error) => {
|
|
@@ -95093,7 +95113,7 @@ function registerStores(stores) {
|
|
|
95093
95113
|
}
|
|
95094
95114
|
}
|
|
95095
95115
|
const DevToolsInternal = React__default.lazy(() => {
|
|
95096
|
-
return import("./devtools-consolidated-
|
|
95116
|
+
return import("./devtools-consolidated-CHfJX3eH.js").then((module2) => ({
|
|
95097
95117
|
default: module2.CustomDevTools
|
|
95098
95118
|
}));
|
|
95099
95119
|
});
|
|
@@ -95390,11 +95410,11 @@ class EventFlow {
|
|
|
95390
95410
|
runJS(handler) {
|
|
95391
95411
|
return this.addStep(EventRegistry.runJs.create(handler));
|
|
95392
95412
|
}
|
|
95393
|
-
static navigateTo(
|
|
95394
|
-
return EventFlow.start().navigateTo(
|
|
95413
|
+
static navigateTo(url2, opts) {
|
|
95414
|
+
return EventFlow.start().navigateTo(url2, opts);
|
|
95395
95415
|
}
|
|
95396
|
-
navigateTo(
|
|
95397
|
-
return this.addStep(EventRegistry.navigateTo.create(
|
|
95416
|
+
navigateTo(url2, opts) {
|
|
95417
|
+
return this.addStep(EventRegistry.navigateTo.create(url2, opts));
|
|
95398
95418
|
}
|
|
95399
95419
|
static navigateToApp(appId) {
|
|
95400
95420
|
return EventFlow.start().navigateToApp(appId);
|
|
@@ -95408,42 +95428,36 @@ class EventFlow {
|
|
|
95408
95428
|
navigateToRoute(route) {
|
|
95409
95429
|
return this.addStep(EventRegistry.navigateToRoute.create(route));
|
|
95410
95430
|
}
|
|
95411
|
-
static setQueryParams(params,
|
|
95412
|
-
return EventFlow.start().setQueryParams(params,
|
|
95431
|
+
static setQueryParams(params, opts) {
|
|
95432
|
+
return EventFlow.start().setQueryParams(params, opts);
|
|
95413
95433
|
}
|
|
95414
|
-
setQueryParams(params,
|
|
95415
|
-
return this.addStep(
|
|
95416
|
-
EventRegistry.setQueryParams.create(params, keepQueryParams)
|
|
95417
|
-
);
|
|
95434
|
+
setQueryParams(params, opts) {
|
|
95435
|
+
return this.addStep(EventRegistry.setQueryParams.create(params, opts));
|
|
95418
95436
|
}
|
|
95419
|
-
static controlSlideout(slideout,
|
|
95420
|
-
return EventFlow.start().controlSlideout(slideout,
|
|
95437
|
+
static controlSlideout(slideout, opts) {
|
|
95438
|
+
return EventFlow.start().controlSlideout(slideout, opts);
|
|
95421
95439
|
}
|
|
95422
|
-
controlSlideout(slideout,
|
|
95423
|
-
return this.addStep(EventRegistry.controlSlideout.create(slideout,
|
|
95440
|
+
controlSlideout(slideout, opts) {
|
|
95441
|
+
return this.addStep(EventRegistry.controlSlideout.create(slideout, opts));
|
|
95424
95442
|
}
|
|
95425
|
-
static controlModal(modal,
|
|
95426
|
-
return EventFlow.start().controlModal(modal,
|
|
95443
|
+
static controlModal(modal, opts) {
|
|
95444
|
+
return EventFlow.start().controlModal(modal, opts);
|
|
95427
95445
|
}
|
|
95428
|
-
controlModal(modal,
|
|
95429
|
-
return this.addStep(EventRegistry.controlModal.create(modal,
|
|
95446
|
+
controlModal(modal, opts) {
|
|
95447
|
+
return this.addStep(EventRegistry.controlModal.create(modal, opts));
|
|
95430
95448
|
}
|
|
95431
|
-
static controlTimer(stateTimer,
|
|
95432
|
-
return EventFlow.start().controlTimer(stateTimer,
|
|
95449
|
+
static controlTimer(stateTimer, opts) {
|
|
95450
|
+
return EventFlow.start().controlTimer(stateTimer, opts);
|
|
95433
95451
|
}
|
|
95434
|
-
controlTimer(stateTimer,
|
|
95435
|
-
return this.addStep(EventRegistry.controlTimer.create(stateTimer,
|
|
95452
|
+
controlTimer(stateTimer, opts) {
|
|
95453
|
+
return this.addStep(EventRegistry.controlTimer.create(stateTimer, opts));
|
|
95436
95454
|
}
|
|
95437
|
-
static runApis(apis,
|
|
95438
|
-
return EventFlow.start().runApis(apis,
|
|
95455
|
+
static runApis(apis, opts) {
|
|
95456
|
+
return EventFlow.start().runApis(apis, opts);
|
|
95439
95457
|
}
|
|
95440
|
-
runApis(apis,
|
|
95458
|
+
runApis(apis, opts) {
|
|
95441
95459
|
return this.addStep(
|
|
95442
|
-
EventRegistry.executeApi.create(
|
|
95443
|
-
apis,
|
|
95444
|
-
onSuccess,
|
|
95445
|
-
onError2
|
|
95446
|
-
)
|
|
95460
|
+
EventRegistry.executeApi.create(apis, opts)
|
|
95447
95461
|
);
|
|
95448
95462
|
}
|
|
95449
95463
|
static cancelApis(apis, onCancel) {
|
|
@@ -95466,11 +95480,11 @@ class EventFlow {
|
|
|
95466
95480
|
resetStateVar(state) {
|
|
95467
95481
|
return this.addStep(EventRegistry.resetStateVar.create(state));
|
|
95468
95482
|
}
|
|
95469
|
-
static setStateVar(stateVarName,
|
|
95470
|
-
return EventFlow.start().setStateVar(stateVarName,
|
|
95483
|
+
static setStateVar(stateVarName, opts) {
|
|
95484
|
+
return EventFlow.start().setStateVar(stateVarName, opts);
|
|
95471
95485
|
}
|
|
95472
|
-
setStateVar(stateVar,
|
|
95473
|
-
return this.addStep(EventRegistry.setStateVar.create(stateVar,
|
|
95486
|
+
setStateVar(stateVar, opts) {
|
|
95487
|
+
return this.addStep(EventRegistry.setStateVar.create(stateVar, opts));
|
|
95474
95488
|
}
|
|
95475
95489
|
static setComponentProperty(component, opts) {
|
|
95476
95490
|
return EventFlow.start().setComponentProperty(component, opts);
|
|
@@ -95480,37 +95494,23 @@ class EventFlow {
|
|
|
95480
95494
|
EventRegistry.setComponentProperty.create(component, opts)
|
|
95481
95495
|
);
|
|
95482
95496
|
}
|
|
95483
|
-
static showAlert(message2,
|
|
95484
|
-
return EventFlow.start().showAlert(
|
|
95485
|
-
message2,
|
|
95486
|
-
alertType,
|
|
95487
|
-
alertDuration,
|
|
95488
|
-
alertPosition
|
|
95489
|
-
);
|
|
95497
|
+
static showAlert(message2, opts) {
|
|
95498
|
+
return EventFlow.start().showAlert(message2, opts);
|
|
95490
95499
|
}
|
|
95491
|
-
showAlert(message2,
|
|
95492
|
-
return this.addStep(
|
|
95493
|
-
EventRegistry.showAlert.create(
|
|
95494
|
-
message2,
|
|
95495
|
-
alertType,
|
|
95496
|
-
alertDuration,
|
|
95497
|
-
alertPosition
|
|
95498
|
-
)
|
|
95499
|
-
);
|
|
95500
|
+
showAlert(message2, opts) {
|
|
95501
|
+
return this.addStep(EventRegistry.showAlert.create(message2, opts));
|
|
95500
95502
|
}
|
|
95501
|
-
static setProfile(profileId,
|
|
95502
|
-
return EventFlow.start().setProfile(profileId,
|
|
95503
|
+
static setProfile(profileId, opts) {
|
|
95504
|
+
return EventFlow.start().setProfile(profileId, opts);
|
|
95503
95505
|
}
|
|
95504
|
-
setProfile(profileId,
|
|
95505
|
-
return this.addStep(EventRegistry.setProfile.create(profileId,
|
|
95506
|
+
setProfile(profileId, opts) {
|
|
95507
|
+
return this.addStep(EventRegistry.setProfile.create(profileId, opts));
|
|
95506
95508
|
}
|
|
95507
|
-
static triggerEvent(eventName,
|
|
95508
|
-
return EventFlow.start().triggerEvent(eventName,
|
|
95509
|
+
static triggerEvent(eventName, opts) {
|
|
95510
|
+
return EventFlow.start().triggerEvent(eventName, opts);
|
|
95509
95511
|
}
|
|
95510
|
-
triggerEvent(eventName,
|
|
95511
|
-
return this.addStep(
|
|
95512
|
-
EventRegistry.triggerEvent.create(eventName, eventData)
|
|
95513
|
-
);
|
|
95512
|
+
triggerEvent(eventName, opts) {
|
|
95513
|
+
return this.addStep(EventRegistry.triggerEvent.create(eventName, opts));
|
|
95514
95514
|
}
|
|
95515
95515
|
static sequence(eventFlows) {
|
|
95516
95516
|
return EventFlow.start().sequence(eventFlows);
|
|
@@ -95634,7 +95634,7 @@ const toExecutableOrValue = (path2, value, isAnExternalFunction = false) => {
|
|
|
95634
95634
|
};
|
|
95635
95635
|
}
|
|
95636
95636
|
} else if (isFunctionProp(value)) {
|
|
95637
|
-
return { value, type: "
|
|
95637
|
+
return { value, type: "function" };
|
|
95638
95638
|
} else if (isDerivedProp(value)) {
|
|
95639
95639
|
return {
|
|
95640
95640
|
value: toEvalFunc([path2, value])[1],
|
|
@@ -95951,7 +95951,7 @@ class EntityManager {
|
|
|
95951
95951
|
}
|
|
95952
95952
|
const getMetaParent = () => isNested ? lodashExports.get(entityMeta, parentSegments) : entityMeta;
|
|
95953
95953
|
const snapshot = this.getState.bind(this);
|
|
95954
|
-
const isComputed = typeof eov.value === "function";
|
|
95954
|
+
const isComputed = typeof eov.value === "function" && eov.type !== "function";
|
|
95955
95955
|
const computeEngine = eov.type === "mustache-bindings" || eov.type === "lazy-function" ? this.evalComputeEngine : this.dirComputeEngine;
|
|
95956
95956
|
const entityType = entity.type;
|
|
95957
95957
|
if (eov.type === "external-function") {
|
|
@@ -96233,19 +96233,28 @@ class EntityManager {
|
|
|
96233
96233
|
addMissingProps(managedProps, addedProperties, scopeId, name) {
|
|
96234
96234
|
const entity = this.getScope(scopeId).getEntity(name);
|
|
96235
96235
|
for (const prop of managedProps) {
|
|
96236
|
+
const isComputed = typeof prop.default === "function" && prop.dataType !== "function";
|
|
96236
96237
|
if (lodashExports.get(entity, prop.path) == null && !addedProperties.has(prop.path) && // for nested properties, only set if the default is defined
|
|
96237
96238
|
// for top-level properties, we should always add the property
|
|
96238
96239
|
(!isNestedPath(prop.path) || prop.default !== void 0)) {
|
|
96239
|
-
|
|
96240
|
-
scopeId,
|
|
96241
|
-
|
|
96242
|
-
|
|
96243
|
-
|
|
96240
|
+
if (isComputed) {
|
|
96241
|
+
this.addProperty(scopeId, name, prop.path, {
|
|
96242
|
+
value: prop.default,
|
|
96243
|
+
type: "normal"
|
|
96244
|
+
// This will be treated as a computed function
|
|
96245
|
+
});
|
|
96246
|
+
} else {
|
|
96247
|
+
this.addProperty(
|
|
96248
|
+
scopeId,
|
|
96249
|
+
name,
|
|
96244
96250
|
prop.path,
|
|
96245
|
-
|
|
96246
|
-
|
|
96247
|
-
|
|
96248
|
-
|
|
96251
|
+
toExecutableOrValue(
|
|
96252
|
+
prop.path,
|
|
96253
|
+
prop.default !== void 0 ? fastClone$1(prop.default) : void 0,
|
|
96254
|
+
prop.dataType === "function" || prop.dataType === "event"
|
|
96255
|
+
)
|
|
96256
|
+
);
|
|
96257
|
+
}
|
|
96249
96258
|
}
|
|
96250
96259
|
}
|
|
96251
96260
|
}
|
|
@@ -96277,7 +96286,7 @@ class EntityManager {
|
|
|
96277
96286
|
name.value,
|
|
96278
96287
|
value
|
|
96279
96288
|
);
|
|
96280
|
-
const isComputed = typeof transformedValue === "function";
|
|
96289
|
+
const isComputed = typeof transformedValue === "function" && type5 !== "function";
|
|
96281
96290
|
const computeEngine = type5 === "mustache-bindings" || type5 === "lazy-function" ? this.evalComputeEngine : this.dirComputeEngine;
|
|
96282
96291
|
const result = isComputed ? computeEngine.compute({
|
|
96283
96292
|
snapshot: this.getState(scopeId),
|
|
@@ -96716,7 +96725,7 @@ _runApi_dec = [action], _cancelApi_dec = [action];
|
|
|
96716
96725
|
class ApiManager {
|
|
96717
96726
|
constructor(rootStore2) {
|
|
96718
96727
|
__runInitializers(_init2, 5, this);
|
|
96719
|
-
__publicField(this, "
|
|
96728
|
+
__publicField(this, "agentUrls", []);
|
|
96720
96729
|
__publicField(this, "token");
|
|
96721
96730
|
__publicField(this, "accessToken");
|
|
96722
96731
|
__publicField(this, "apisByName", {});
|
|
@@ -96818,7 +96827,23 @@ class ApiManager {
|
|
|
96818
96827
|
scopeId,
|
|
96819
96828
|
this.apiNameToDepCandidates[apiName] ?? []
|
|
96820
96829
|
);
|
|
96821
|
-
|
|
96830
|
+
if (!this.agentUrls.length) {
|
|
96831
|
+
editorBridge.setApiResponse(apiName, {
|
|
96832
|
+
status: "STATUS_COMPLETED",
|
|
96833
|
+
execution: null,
|
|
96834
|
+
errors: [{ message: "No active agent found" }]
|
|
96835
|
+
});
|
|
96836
|
+
sendNotification({
|
|
96837
|
+
message: "No active agent found",
|
|
96838
|
+
type: "error"
|
|
96839
|
+
});
|
|
96840
|
+
return {
|
|
96841
|
+
data: null,
|
|
96842
|
+
error: "No active agent found"
|
|
96843
|
+
};
|
|
96844
|
+
}
|
|
96845
|
+
const agentBaseUrl = this.agentUrls[Math.floor(Math.random() * this.agentUrls.length)];
|
|
96846
|
+
const orchestratorUrl = new URL("v2/execute", agentBaseUrl).href;
|
|
96822
96847
|
const events2 = [];
|
|
96823
96848
|
await ((_a2 = this.rootStore.editStore) == null ? void 0 : _a2.operationManager.ensureFilesSynced());
|
|
96824
96849
|
const abortController = new AbortController();
|
|
@@ -98689,11 +98714,10 @@ function getEventFlow(step, scopeId) {
|
|
|
98689
98714
|
};
|
|
98690
98715
|
switch (step.type) {
|
|
98691
98716
|
case "executeApi":
|
|
98692
|
-
return EventFlow.runApis(
|
|
98693
|
-
|
|
98694
|
-
createNestedEventFlow(step.
|
|
98695
|
-
|
|
98696
|
-
);
|
|
98717
|
+
return EventFlow.runApis(step.apis.map((api2) => api2.name), {
|
|
98718
|
+
onSuccess: createNestedEventFlow(step.onSuccess ?? []),
|
|
98719
|
+
onError: createNestedEventFlow(step.onError ?? [])
|
|
98720
|
+
});
|
|
98697
98721
|
case "cancelApi":
|
|
98698
98722
|
return EventFlow.cancelApis(
|
|
98699
98723
|
getEntities(step.apis.map((api2) => api2.name)),
|
|
@@ -98711,9 +98735,10 @@ function getEventFlow(step, scopeId) {
|
|
|
98711
98735
|
}
|
|
98712
98736
|
});
|
|
98713
98737
|
case "navigateTo":
|
|
98714
|
-
return EventFlow.navigateTo({
|
|
98715
|
-
|
|
98716
|
-
|
|
98738
|
+
return EventFlow.navigateTo(step.url, {
|
|
98739
|
+
newWindow: step.newWindow,
|
|
98740
|
+
replaceHistory: step.replaceHistory,
|
|
98741
|
+
arguments: step.arguments
|
|
98717
98742
|
});
|
|
98718
98743
|
case "navigateToApp":
|
|
98719
98744
|
return EventFlow.navigateToApp(step.targetApp.id);
|
|
@@ -98722,17 +98747,23 @@ function getEventFlow(step, scopeId) {
|
|
|
98722
98747
|
case "setQueryParams":
|
|
98723
98748
|
return EventFlow.setQueryParams(
|
|
98724
98749
|
step.queryParams ? JSON.parse(step.queryParams) : {},
|
|
98725
|
-
|
|
98750
|
+
{
|
|
98751
|
+
keep: step.keepQueryParams
|
|
98752
|
+
}
|
|
98726
98753
|
);
|
|
98727
98754
|
case "controlSlideout": {
|
|
98728
98755
|
const slideoutEntity = getEntity(step.name);
|
|
98729
98756
|
if (!slideoutEntity) return void 0;
|
|
98730
|
-
return EventFlow.controlSlideout(slideoutEntity,
|
|
98757
|
+
return EventFlow.controlSlideout(slideoutEntity, {
|
|
98758
|
+
action: step.action
|
|
98759
|
+
});
|
|
98731
98760
|
}
|
|
98732
98761
|
case "controlModal": {
|
|
98733
98762
|
const modalEntity = getEntity(step.name);
|
|
98734
98763
|
if (!modalEntity) return void 0;
|
|
98735
|
-
return EventFlow.controlModal(modalEntity,
|
|
98764
|
+
return EventFlow.controlModal(modalEntity, {
|
|
98765
|
+
action: step.action
|
|
98766
|
+
});
|
|
98736
98767
|
}
|
|
98737
98768
|
case "controlTimer": {
|
|
98738
98769
|
const timerStep = step;
|
|
@@ -98741,7 +98772,9 @@ function getEventFlow(step, scopeId) {
|
|
|
98741
98772
|
}
|
|
98742
98773
|
const timerEntity = getEntity(timerStep.timer.name);
|
|
98743
98774
|
if (!timerEntity) return void 0;
|
|
98744
|
-
return EventFlow.controlTimer(timerEntity,
|
|
98775
|
+
return EventFlow.controlTimer(timerEntity, {
|
|
98776
|
+
action: step.action ?? "start"
|
|
98777
|
+
});
|
|
98745
98778
|
}
|
|
98746
98779
|
case "setStateVar": {
|
|
98747
98780
|
const variableStep = step;
|
|
@@ -98752,7 +98785,7 @@ function getEventFlow(step, scopeId) {
|
|
|
98752
98785
|
scopeId,
|
|
98753
98786
|
name: getName((_c2 = variableStep.variable) == null ? void 0 : _c2.name)
|
|
98754
98787
|
}) : step.value;
|
|
98755
|
-
return EventFlow.setStateVar(stateEntity, value);
|
|
98788
|
+
return EventFlow.setStateVar(stateEntity, { value });
|
|
98756
98789
|
}
|
|
98757
98790
|
case "resetStateVar": {
|
|
98758
98791
|
const variableStep = step;
|
|
@@ -98779,16 +98812,22 @@ function getEventFlow(step, scopeId) {
|
|
|
98779
98812
|
});
|
|
98780
98813
|
}
|
|
98781
98814
|
case "showAlert":
|
|
98782
|
-
return EventFlow.showAlert(
|
|
98783
|
-
step.
|
|
98784
|
-
step.
|
|
98785
|
-
step.
|
|
98786
|
-
|
|
98787
|
-
);
|
|
98815
|
+
return EventFlow.showAlert(step.message, {
|
|
98816
|
+
type: step.style,
|
|
98817
|
+
durationMs: step.alertDuration,
|
|
98818
|
+
position: step.alertPosition
|
|
98819
|
+
});
|
|
98788
98820
|
case "setProfile":
|
|
98789
|
-
return EventFlow.setProfile(step.profileId,
|
|
98821
|
+
return EventFlow.setProfile(step.profileId, {
|
|
98822
|
+
action: step.action
|
|
98823
|
+
});
|
|
98790
98824
|
case "triggerEvent":
|
|
98791
|
-
return EventFlow.triggerEvent(
|
|
98825
|
+
return EventFlow.triggerEvent(
|
|
98826
|
+
(_g2 = step.event) == null ? void 0 : _g2.name,
|
|
98827
|
+
step.eventPayload ? {
|
|
98828
|
+
data: step.eventPayload
|
|
98829
|
+
} : void 0
|
|
98830
|
+
);
|
|
98792
98831
|
default:
|
|
98793
98832
|
console.warn("Unhandled runtime step type", step.type);
|
|
98794
98833
|
return void 0;
|
|
@@ -102642,14 +102681,14 @@ function getLoaderFn$1(options) {
|
|
|
102642
102681
|
if (!(loader === "all")) return [3, 3];
|
|
102643
102682
|
return [4, import(
|
|
102644
102683
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
102645
|
-
"./allPathsLoader-
|
|
102684
|
+
"./allPathsLoader-BYj7sg41.js"
|
|
102646
102685
|
)];
|
|
102647
102686
|
case 2:
|
|
102648
102687
|
return [2, _b2.sent().allPathsLoader];
|
|
102649
102688
|
case 3:
|
|
102650
102689
|
return [4, import(
|
|
102651
102690
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
102652
|
-
"./splitPathsBySizeLoader-
|
|
102691
|
+
"./splitPathsBySizeLoader-go6FZrRw.js"
|
|
102653
102692
|
)];
|
|
102654
102693
|
case 4:
|
|
102655
102694
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -111761,7 +111800,7 @@ function createScope(getInitialEntities, options) {
|
|
|
111761
111800
|
scopeId: stableScopeId
|
|
111762
111801
|
});
|
|
111763
111802
|
const bindingIds = {};
|
|
111764
|
-
const
|
|
111803
|
+
const getBinding2 = (key2) => {
|
|
111765
111804
|
if (bindingIds[key2]) {
|
|
111766
111805
|
return bindingIds[key2];
|
|
111767
111806
|
}
|
|
@@ -111789,7 +111828,7 @@ function createScope(getInitialEntities, options) {
|
|
|
111789
111828
|
useSuspense: true
|
|
111790
111829
|
}
|
|
111791
111830
|
),
|
|
111792
|
-
|
|
111831
|
+
getBinding2(key2)
|
|
111793
111832
|
);
|
|
111794
111833
|
}
|
|
111795
111834
|
}
|
|
@@ -127965,199 +128004,6 @@ const GridDropPreview = observer(() => {
|
|
|
127965
128004
|
}
|
|
127966
128005
|
);
|
|
127967
128006
|
});
|
|
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
|
-
);
|
|
128161
128007
|
function getParentInfo(parent) {
|
|
128162
128008
|
const parentComponentMeta = getEditStore().runtimeEntitiesManager.getAnyEditorWidgetMeta(parent.id);
|
|
128163
128009
|
const isParentGridLike = isWidgetGrid(parentComponentMeta);
|
|
@@ -128166,316 +128012,60 @@ function getParentInfo(parent) {
|
|
|
128166
128012
|
type: parentComponentMeta == null ? void 0 : parentComponentMeta.type
|
|
128167
128013
|
};
|
|
128168
128014
|
}
|
|
128169
|
-
|
|
128170
|
-
|
|
128171
|
-
|
|
128172
|
-
|
|
128173
|
-
|
|
128174
|
-
|
|
128175
|
-
|
|
128176
|
-
|
|
128177
|
-
|
|
128178
|
-
|
|
128179
|
-
|
|
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({
|
|
128015
|
+
const generateUniqueName = (componentType) => {
|
|
128016
|
+
const baseName = componentType;
|
|
128017
|
+
let counter2 = 1;
|
|
128018
|
+
let name = `${baseName}${counter2}`;
|
|
128019
|
+
while (rootStore.nameManager.hasEntityWithName(name)) {
|
|
128020
|
+
counter2++;
|
|
128021
|
+
name = `${baseName}${counter2}`;
|
|
128022
|
+
}
|
|
128023
|
+
return name;
|
|
128024
|
+
};
|
|
128025
|
+
function getBinding({
|
|
128287
128026
|
componentType,
|
|
128288
|
-
|
|
128289
|
-
|
|
128290
|
-
triggerComponentId
|
|
128027
|
+
editorTemplateCreateRequest,
|
|
128028
|
+
parentInfo
|
|
128291
128029
|
}) {
|
|
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;
|
|
128333
128030
|
const customComponents = rootStore.componentRegistry.customComponentList;
|
|
128334
|
-
|
|
128335
|
-
|
|
128336
|
-
|
|
128337
|
-
|
|
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);
|
|
128031
|
+
if ((editorTemplateCreateRequest == null ? void 0 : editorTemplateCreateRequest.generateBinding) === true) {
|
|
128032
|
+
return Property.Static(generateUniqueName(componentType));
|
|
128033
|
+
} else if (typeof (editorTemplateCreateRequest == null ? void 0 : editorTemplateCreateRequest.generateBinding) === "string") {
|
|
128034
|
+
return Property.Static(editorTemplateCreateRequest.generateBinding);
|
|
128353
128035
|
} else {
|
|
128354
128036
|
const shouldProvideAName = (
|
|
128355
|
-
//
|
|
128356
|
-
componentType === "Dropdown" || componentType === "DatePicker" || componentType === "Checkbox" || componentType === "Switch" || componentType === "Modal" || componentType === "Slideout" || componentType === "Table" || // All components dropped in a grid
|
|
128037
|
+
// All components dropped in a grid
|
|
128357
128038
|
parentInfo.isGridLike || // All custom components
|
|
128358
128039
|
customComponents.includes(componentType)
|
|
128359
128040
|
);
|
|
128360
128041
|
if (shouldProvideAName) {
|
|
128361
|
-
|
|
128042
|
+
return Property.Static(generateUniqueName(componentType));
|
|
128362
128043
|
}
|
|
128044
|
+
return void 0;
|
|
128363
128045
|
}
|
|
128364
|
-
|
|
128365
|
-
|
|
128366
|
-
|
|
128367
|
-
|
|
128368
|
-
|
|
128369
|
-
|
|
128370
|
-
|
|
128371
|
-
|
|
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;
|
|
128046
|
+
}
|
|
128047
|
+
function getComponentBaseProperties(componentType, parentInfo, editorTemplateCreateRequest) {
|
|
128048
|
+
let properties2 = {};
|
|
128049
|
+
const editorTemplates = rootStore.componentRegistry.getEditorTemplates(componentType);
|
|
128050
|
+
if (editorTemplates && editorTemplates.length > 1) {
|
|
128051
|
+
throw new Error(
|
|
128052
|
+
`Multiple editor templates are not supported yet. Found ${editorTemplates.length} for component type: ${componentType}.`
|
|
128053
|
+
);
|
|
128472
128054
|
}
|
|
128473
|
-
if (
|
|
128055
|
+
if (editorTemplateCreateRequest == null ? void 0 : editorTemplateCreateRequest.properties) {
|
|
128474
128056
|
properties2 = {
|
|
128475
128057
|
...properties2,
|
|
128476
|
-
...
|
|
128058
|
+
...editorTemplateCreateRequest.properties
|
|
128477
128059
|
};
|
|
128478
128060
|
}
|
|
128061
|
+
const binding = getBinding({
|
|
128062
|
+
componentType,
|
|
128063
|
+
editorTemplateCreateRequest,
|
|
128064
|
+
parentInfo
|
|
128065
|
+
});
|
|
128066
|
+
if (binding) {
|
|
128067
|
+
properties2.name = binding;
|
|
128068
|
+
}
|
|
128479
128069
|
const { width, height, ...restProperties } = properties2;
|
|
128480
128070
|
const safeDimensions = parentInfo.isGridLike ? filterSafeGridDimensionProperties({
|
|
128481
128071
|
width: width == null ? void 0 : width.value,
|
|
@@ -128489,20 +128079,9 @@ function getComponentBaseProperties(componentType, parentInfo) {
|
|
|
128489
128079
|
...restProperties,
|
|
128490
128080
|
...safeDimensions
|
|
128491
128081
|
},
|
|
128492
|
-
children
|
|
128493
|
-
name: (_d2 = properties2.name) == null ? void 0 : _d2.value
|
|
128082
|
+
children: (editorTemplateCreateRequest == null ? void 0 : editorTemplateCreateRequest.children) ?? []
|
|
128494
128083
|
};
|
|
128495
128084
|
}
|
|
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
|
-
};
|
|
128506
128085
|
function checkComponentForParentTypeBeforeCreating(componentType, parentType) {
|
|
128507
128086
|
if (componentType === "Section" && parentType !== "Page") {
|
|
128508
128087
|
return false;
|
|
@@ -128512,14 +128091,35 @@ function checkComponentForParentTypeBeforeCreating(componentType, parentType) {
|
|
|
128512
128091
|
}
|
|
128513
128092
|
return true;
|
|
128514
128093
|
}
|
|
128094
|
+
function getCreateAtParentElement(relativeParent, createAt) {
|
|
128095
|
+
if (createAt === "root") {
|
|
128096
|
+
const parentInstanceId = getEditStore().runtimeEntitiesManager.widgets.getAnyInstanceIdForSourceId(
|
|
128097
|
+
relativeParent.id
|
|
128098
|
+
);
|
|
128099
|
+
const pageComponent = getEditStore().runtimeEntitiesManager.getClosestAncestorByType(
|
|
128100
|
+
parentInstanceId,
|
|
128101
|
+
"Page"
|
|
128102
|
+
);
|
|
128103
|
+
if (!pageComponent) {
|
|
128104
|
+
throw new Error(
|
|
128105
|
+
`Page component not found for parent: ${relativeParent.id}`
|
|
128106
|
+
);
|
|
128107
|
+
}
|
|
128108
|
+
return { source: { id: pageComponent.sourceId } };
|
|
128109
|
+
} else {
|
|
128110
|
+
return { source: relativeParent };
|
|
128111
|
+
}
|
|
128112
|
+
}
|
|
128515
128113
|
async function createComponent({
|
|
128516
128114
|
componentType,
|
|
128517
128115
|
parent,
|
|
128518
128116
|
scopeName,
|
|
128519
128117
|
baseProperties = {},
|
|
128520
|
-
|
|
128118
|
+
skipSecondaryComponentsCreation,
|
|
128119
|
+
// will only create the primary component. Secondary components are usually trigger components (e.g: Button that triggers the modal)
|
|
128521
128120
|
otherComponentsUpdates
|
|
128522
128121
|
}) {
|
|
128122
|
+
var _a2, _b2;
|
|
128523
128123
|
const parentInfo = getParentInfo(parent);
|
|
128524
128124
|
if (!checkComponentForParentTypeBeforeCreating(componentType, parentInfo.type)) {
|
|
128525
128125
|
console.error(
|
|
@@ -128527,88 +128127,106 @@ async function createComponent({
|
|
|
128527
128127
|
);
|
|
128528
128128
|
return;
|
|
128529
128129
|
}
|
|
128530
|
-
const
|
|
128531
|
-
|
|
128532
|
-
|
|
128533
|
-
|
|
128534
|
-
|
|
128535
|
-
|
|
128536
|
-
const {
|
|
128537
|
-
|
|
128538
|
-
|
|
128539
|
-
|
|
128540
|
-
|
|
128541
|
-
|
|
128542
|
-
|
|
128543
|
-
|
|
128544
|
-
|
|
128545
|
-
|
|
128546
|
-
|
|
128547
|
-
|
|
128548
|
-
|
|
128549
|
-
const
|
|
128550
|
-
|
|
128130
|
+
const editorTemplates = rootStore.componentRegistry.getEditorTemplates(componentType);
|
|
128131
|
+
if (editorTemplates && editorTemplates.length > 1) {
|
|
128132
|
+
throw new Error(
|
|
128133
|
+
`Multiple editor templates are not supported yet. Found ${editorTemplates.length} for component type: ${componentType}.`
|
|
128134
|
+
);
|
|
128135
|
+
}
|
|
128136
|
+
const context2 = {
|
|
128137
|
+
generateUniqueName,
|
|
128138
|
+
parentInfo
|
|
128139
|
+
};
|
|
128140
|
+
const editorTemplateCreateRequest = (_b2 = (_a2 = editorTemplates == null ? void 0 : editorTemplates[0]) == null ? void 0 : _a2.create) == null ? void 0 : _b2.call(_a2, context2);
|
|
128141
|
+
const primaryEditorTemplateCreateRequest = Array.isArray(
|
|
128142
|
+
editorTemplateCreateRequest
|
|
128143
|
+
) ? editorTemplateCreateRequest[0] : editorTemplateCreateRequest;
|
|
128144
|
+
if (editorTemplateCreateRequest && (primaryEditorTemplateCreateRequest == null ? void 0 : primaryEditorTemplateCreateRequest.type) !== componentType) {
|
|
128145
|
+
throw new Error(
|
|
128146
|
+
`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}`
|
|
128147
|
+
);
|
|
128148
|
+
}
|
|
128149
|
+
const editorTemplateCreateRequests = Array.isArray(
|
|
128150
|
+
editorTemplateCreateRequest
|
|
128151
|
+
) ? editorTemplateCreateRequest : [editorTemplateCreateRequest];
|
|
128551
128152
|
const editStore2 = getEditStore();
|
|
128552
|
-
|
|
128553
|
-
|
|
128554
|
-
|
|
128555
|
-
|
|
128556
|
-
|
|
128557
|
-
|
|
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,
|
|
128153
|
+
function editorTemplateCreateRequestToInternalCreateRequest({
|
|
128154
|
+
editorTemplateCreateRequest: editorTemplateCreateRequest2,
|
|
128155
|
+
baseProperties: baseProperties2
|
|
128156
|
+
}) {
|
|
128157
|
+
const type5 = (editorTemplateCreateRequest2 == null ? void 0 : editorTemplateCreateRequest2.type) ?? componentType;
|
|
128158
|
+
const willWrapInSectionAndColumn = shouldWrapInSectionAndColumn(
|
|
128159
|
+
type5,
|
|
128575
128160
|
parentInfo.type
|
|
128576
128161
|
);
|
|
128162
|
+
const isGridLike = willWrapInSectionAndColumn && type5 !== "Column" ? true : parentInfo.isGridLike;
|
|
128163
|
+
const { properties: propertiesFromType, children } = getComponentBaseProperties(
|
|
128164
|
+
type5,
|
|
128165
|
+
{
|
|
128166
|
+
// will wrap in a column with grid layout if dropping on a page or section directly
|
|
128167
|
+
isGridLike
|
|
128168
|
+
},
|
|
128169
|
+
editorTemplateCreateRequest2
|
|
128170
|
+
);
|
|
128171
|
+
const properties2 = {
|
|
128172
|
+
...propertiesFromType,
|
|
128173
|
+
...baseProperties2
|
|
128174
|
+
};
|
|
128175
|
+
const createAtParentElement = getCreateAtParentElement(
|
|
128176
|
+
parent,
|
|
128177
|
+
editorTemplateCreateRequest2 == null ? void 0 : editorTemplateCreateRequest2.createAt
|
|
128178
|
+
);
|
|
128179
|
+
let primaryComponent = {
|
|
128180
|
+
parentElement: createAtParentElement,
|
|
128181
|
+
tagName: type5,
|
|
128182
|
+
properties: properties2,
|
|
128183
|
+
children,
|
|
128184
|
+
scopeName,
|
|
128185
|
+
id: editStore2.operationManager.generateSourceId()
|
|
128186
|
+
};
|
|
128187
|
+
if (willWrapInSectionAndColumn) {
|
|
128188
|
+
primaryComponent = wrapInSectionColumnIfDroppingOnPage(
|
|
128189
|
+
primaryComponent,
|
|
128190
|
+
parentInfo.type
|
|
128191
|
+
);
|
|
128192
|
+
}
|
|
128193
|
+
return primaryComponent;
|
|
128577
128194
|
}
|
|
128578
|
-
const
|
|
128579
|
-
|
|
128580
|
-
|
|
128581
|
-
|
|
128582
|
-
|
|
128195
|
+
const createRequests = editorTemplateCreateRequests.map(
|
|
128196
|
+
(editorTemplateCreateRequest2, index2) => editorTemplateCreateRequestToInternalCreateRequest({
|
|
128197
|
+
editorTemplateCreateRequest: editorTemplateCreateRequest2,
|
|
128198
|
+
baseProperties: index2 === 0 ? baseProperties : {}
|
|
128199
|
+
// baseProperties are only applied to the primary component
|
|
128200
|
+
})
|
|
128201
|
+
);
|
|
128202
|
+
const hasOtherComponentsUpdates = otherComponentsUpdates && Object.keys(otherComponentsUpdates).length > 0;
|
|
128203
|
+
const hasMultipleCreateComponents = editorTemplateCreateRequests.length > 1 && !skipSecondaryComponentsCreation;
|
|
128204
|
+
const isBatchOperation = hasOtherComponentsUpdates || hasMultipleCreateComponents;
|
|
128205
|
+
if (isBatchOperation) {
|
|
128206
|
+
const performOtherComponentsUpdates = (otherComponentsUpdates2) => {
|
|
128207
|
+
Object.entries(otherComponentsUpdates2).forEach(([sourceId, updates]) => {
|
|
128208
|
+
editStore2.operationManager.setWidgetProperties({
|
|
128209
|
+
sourceId,
|
|
128210
|
+
properties: updates
|
|
128211
|
+
});
|
|
128583
128212
|
});
|
|
128584
|
-
}
|
|
128585
|
-
};
|
|
128586
|
-
if (needTriggerComponent) {
|
|
128587
|
-
const triggerComponent = getTriggerComponent({
|
|
128588
|
-
componentType,
|
|
128589
|
-
parentElement,
|
|
128590
|
-
primaryComponentName: name,
|
|
128591
|
-
triggerComponentId: editStore2.operationManager.generateSourceId()
|
|
128592
|
-
});
|
|
128213
|
+
};
|
|
128593
128214
|
editStore2.operationManager.batchUpdate(() => {
|
|
128594
|
-
|
|
128595
|
-
|
|
128596
|
-
|
|
128215
|
+
if (skipSecondaryComponentsCreation) {
|
|
128216
|
+
editStore2.operationManager.createComponent(createRequests[0]);
|
|
128217
|
+
} else {
|
|
128218
|
+
createRequests.forEach((createRequest) => {
|
|
128219
|
+
editStore2.operationManager.createComponent(createRequest);
|
|
128220
|
+
});
|
|
128221
|
+
}
|
|
128222
|
+
if (hasOtherComponentsUpdates) {
|
|
128597
128223
|
performOtherComponentsUpdates(otherComponentsUpdates);
|
|
128598
128224
|
}
|
|
128599
128225
|
});
|
|
128600
|
-
return triggerComponent.id;
|
|
128601
128226
|
} else {
|
|
128602
|
-
|
|
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;
|
|
128227
|
+
editStore2.operationManager.createComponent(createRequests[0]);
|
|
128611
128228
|
}
|
|
128229
|
+
return createRequests.at(-1).id;
|
|
128612
128230
|
}
|
|
128613
128231
|
function wrapInSectionColumnIfDroppingOnPage(primaryComponent, parentType) {
|
|
128614
128232
|
const { properties: sectionProperties } = getComponentBaseProperties(
|
|
@@ -130834,6 +130452,21 @@ function useTypographyStyling({
|
|
|
130834
130452
|
style: style2
|
|
130835
130453
|
};
|
|
130836
130454
|
}
|
|
130455
|
+
const editorTemplate$c = {
|
|
130456
|
+
create: () => ({
|
|
130457
|
+
type: "Button",
|
|
130458
|
+
properties: {
|
|
130459
|
+
label: Property.Static("Button"),
|
|
130460
|
+
onClick: Property.Event([
|
|
130461
|
+
{
|
|
130462
|
+
type: TriggerStepType.RUN_JS,
|
|
130463
|
+
code: "() => console.log('Button clicked')",
|
|
130464
|
+
id: "buttonClick"
|
|
130465
|
+
}
|
|
130466
|
+
])
|
|
130467
|
+
}
|
|
130468
|
+
})
|
|
130469
|
+
};
|
|
130837
130470
|
const DEFAULT_ICON_SPACING = 8;
|
|
130838
130471
|
const DEFAULT_ICON_SIZE = 16;
|
|
130839
130472
|
const ICON_POSITION_OPTIONS = [
|
|
@@ -131384,7 +131017,7 @@ const Button$3 = registerComponent$1(
|
|
|
131384
131017
|
}
|
|
131385
131018
|
) });
|
|
131386
131019
|
}
|
|
131387
|
-
);
|
|
131020
|
+
).addEditorTemplate(editorTemplate$c);
|
|
131388
131021
|
const useAlignmentStyles = ({
|
|
131389
131022
|
layout,
|
|
131390
131023
|
verticalAlign,
|
|
@@ -131786,6 +131419,29 @@ const InternalVStack = (props2) => {
|
|
|
131786
131419
|
const InternalHStack = (props2) => {
|
|
131787
131420
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(InternalStack, { direction: "row", ...props2 });
|
|
131788
131421
|
};
|
|
131422
|
+
function getSectionChildren() {
|
|
131423
|
+
return [
|
|
131424
|
+
{
|
|
131425
|
+
tagName: "Column",
|
|
131426
|
+
properties: {
|
|
131427
|
+
width: Property.Dimension(Dim.fill()),
|
|
131428
|
+
height: Property.Dimension(Dim.fill())
|
|
131429
|
+
},
|
|
131430
|
+
children: []
|
|
131431
|
+
}
|
|
131432
|
+
];
|
|
131433
|
+
}
|
|
131434
|
+
const editorTemplate$b = {
|
|
131435
|
+
create: () => {
|
|
131436
|
+
return {
|
|
131437
|
+
type: "Section",
|
|
131438
|
+
children: getSectionChildren(),
|
|
131439
|
+
properties: {
|
|
131440
|
+
width: Property.Dimension(Dim.fill())
|
|
131441
|
+
}
|
|
131442
|
+
};
|
|
131443
|
+
}
|
|
131444
|
+
};
|
|
131789
131445
|
const DEFAULT_SECTION_PADDING = {
|
|
131790
131446
|
left: Dim.px(0),
|
|
131791
131447
|
right: Dim.px(0),
|
|
@@ -131862,7 +131518,7 @@ const Section2 = registerComponent$1(
|
|
|
131862
131518
|
}
|
|
131863
131519
|
);
|
|
131864
131520
|
}
|
|
131865
|
-
);
|
|
131521
|
+
).addEditorTemplate(editorTemplate$b);
|
|
131866
131522
|
const generateClassName = (seed2) => {
|
|
131867
131523
|
return `superblocks_widget_${seed2}`;
|
|
131868
131524
|
};
|
|
@@ -132172,6 +131828,14 @@ const StaticComponent = ({
|
|
|
132172
131828
|
}, [staticHeight]);
|
|
132173
131829
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...style2, width: "100%", height: "100%" }, children });
|
|
132174
131830
|
};
|
|
131831
|
+
const editorTemplate$a = {
|
|
131832
|
+
create: () => ({
|
|
131833
|
+
type: "Container",
|
|
131834
|
+
properties: {
|
|
131835
|
+
width: Property.Dimension(Dim.fill())
|
|
131836
|
+
}
|
|
131837
|
+
})
|
|
131838
|
+
};
|
|
132175
131839
|
const propertiesDefinition$g = {
|
|
132176
131840
|
layout: Section$1.category(PropsPanelCategory.Layout).add(
|
|
132177
131841
|
containerLayout({
|
|
@@ -132334,7 +131998,15 @@ const Container = registerComponent$1(
|
|
|
132334
131998
|
propertiesDefinition: propertiesDefinition$g
|
|
132335
131999
|
},
|
|
132336
132000
|
InternalContainer
|
|
132337
|
-
);
|
|
132001
|
+
).addEditorTemplate(editorTemplate$a);
|
|
132002
|
+
const editorTemplate$9 = {
|
|
132003
|
+
create: () => ({
|
|
132004
|
+
type: "Container",
|
|
132005
|
+
properties: {
|
|
132006
|
+
width: Property.Dimension(Dim.fill())
|
|
132007
|
+
}
|
|
132008
|
+
})
|
|
132009
|
+
};
|
|
132338
132010
|
const propertiesDefinition$f = {
|
|
132339
132011
|
layout: Section$1.category(PropsPanelCategory.Layout).add(
|
|
132340
132012
|
containerLayout({
|
|
@@ -132400,11 +132072,11 @@ const Column = registerComponent$1(
|
|
|
132400
132072
|
}
|
|
132401
132073
|
);
|
|
132402
132074
|
}
|
|
132403
|
-
);
|
|
132404
|
-
const editorTemplate = {
|
|
132405
|
-
create: (
|
|
132075
|
+
).addEditorTemplate(editorTemplate$9);
|
|
132076
|
+
const editorTemplate$8 = {
|
|
132077
|
+
create: () => ({
|
|
132406
132078
|
type: "Input",
|
|
132407
|
-
|
|
132079
|
+
generateBinding: true,
|
|
132408
132080
|
properties: {
|
|
132409
132081
|
label: Property.Static("Label")
|
|
132410
132082
|
}
|
|
@@ -140074,7 +139746,7 @@ const Input2 = registerComponent$1(
|
|
|
140074
139746
|
}
|
|
140075
139747
|
) });
|
|
140076
139748
|
}
|
|
140077
|
-
).addEditorTemplate(editorTemplate);
|
|
139749
|
+
).addEditorTemplate(editorTemplate$8);
|
|
140078
139750
|
const propertiesDefinition$d = {
|
|
140079
139751
|
contents: Section$1.category(PropsPanelCategory.Content).children({
|
|
140080
139752
|
columns: Prop.array().readAndWrite().propertiesPanel({
|
|
@@ -141943,6 +141615,14 @@ const AutolinkedText = (props2) => {
|
|
|
141943
141615
|
}
|
|
141944
141616
|
);
|
|
141945
141617
|
};
|
|
141618
|
+
const editorTemplate$7 = {
|
|
141619
|
+
create: () => ({
|
|
141620
|
+
type: "Text",
|
|
141621
|
+
properties: {
|
|
141622
|
+
text: Property.Static("Hello, world!")
|
|
141623
|
+
}
|
|
141624
|
+
})
|
|
141625
|
+
};
|
|
141946
141626
|
var button$1 = {};
|
|
141947
141627
|
var interopRequireDefault = { exports: {} };
|
|
141948
141628
|
var hasRequiredInteropRequireDefault;
|
|
@@ -147140,7 +146820,7 @@ const Text$1 = registerComponent$1(
|
|
|
147140
146820
|
}
|
|
147141
146821
|
) });
|
|
147142
146822
|
}
|
|
147143
|
-
);
|
|
146823
|
+
).addEditorTemplate(editorTemplate$7);
|
|
147144
146824
|
function useDialogEditing(props2) {
|
|
147145
146825
|
const { isOpen, instanceId } = props2;
|
|
147146
146826
|
const { features, isEditing } = useEditor();
|
|
@@ -147204,6 +146884,102 @@ function useDialogEditing(props2) {
|
|
|
147204
146884
|
prevIsOpenRef.current = isOpen;
|
|
147205
146885
|
}, [isOpen]);
|
|
147206
146886
|
}
|
|
146887
|
+
function getChildren$1(modalName) {
|
|
146888
|
+
return [
|
|
146889
|
+
{
|
|
146890
|
+
tagName: "Container",
|
|
146891
|
+
properties: {
|
|
146892
|
+
variant: Property.Static("none"),
|
|
146893
|
+
width: Property.Dimension(Dim.fill()),
|
|
146894
|
+
layout: Property.Static("horizontal"),
|
|
146895
|
+
horizontalAlign: Property.Static("left")
|
|
146896
|
+
},
|
|
146897
|
+
children: [
|
|
146898
|
+
{
|
|
146899
|
+
tagName: "Text",
|
|
146900
|
+
properties: {
|
|
146901
|
+
text: Property.Static("Modal Title"),
|
|
146902
|
+
textStyle: Property.Static({
|
|
146903
|
+
variant: "heading3"
|
|
146904
|
+
})
|
|
146905
|
+
},
|
|
146906
|
+
children: []
|
|
146907
|
+
}
|
|
146908
|
+
]
|
|
146909
|
+
},
|
|
146910
|
+
{
|
|
146911
|
+
tagName: "Container",
|
|
146912
|
+
properties: {
|
|
146913
|
+
variant: Property.Static("none"),
|
|
146914
|
+
width: Property.Dimension(Dim.fill()),
|
|
146915
|
+
horizontalAlign: Property.Static("left")
|
|
146916
|
+
},
|
|
146917
|
+
children: []
|
|
146918
|
+
},
|
|
146919
|
+
{
|
|
146920
|
+
tagName: "Container",
|
|
146921
|
+
properties: {
|
|
146922
|
+
spacing: Property.Dimension(Dim.px(8)),
|
|
146923
|
+
width: Property.Dimension(Dim.fill()),
|
|
146924
|
+
variant: Property.Static("none"),
|
|
146925
|
+
layout: Property.Static("horizontal"),
|
|
146926
|
+
horizontalAlign: Property.Static("right")
|
|
146927
|
+
},
|
|
146928
|
+
children: [
|
|
146929
|
+
{
|
|
146930
|
+
tagName: "Button",
|
|
146931
|
+
properties: {
|
|
146932
|
+
label: Property.Static("Cancel"),
|
|
146933
|
+
variant: Property.Static("secondary"),
|
|
146934
|
+
onClick: Property.Event([
|
|
146935
|
+
{
|
|
146936
|
+
id: "closeModal",
|
|
146937
|
+
type: TriggerStepType.CONTROL_MODAL,
|
|
146938
|
+
name: modalName,
|
|
146939
|
+
action: "close"
|
|
146940
|
+
}
|
|
146941
|
+
])
|
|
146942
|
+
},
|
|
146943
|
+
children: []
|
|
146944
|
+
},
|
|
146945
|
+
{
|
|
146946
|
+
tagName: "Button",
|
|
146947
|
+
properties: {
|
|
146948
|
+
label: Property.Static("Confirm")
|
|
146949
|
+
},
|
|
146950
|
+
children: []
|
|
146951
|
+
}
|
|
146952
|
+
]
|
|
146953
|
+
}
|
|
146954
|
+
];
|
|
146955
|
+
}
|
|
146956
|
+
const editorTemplate$6 = {
|
|
146957
|
+
create: (context2) => {
|
|
146958
|
+
const modalName = context2.generateUniqueName("Modal");
|
|
146959
|
+
return [
|
|
146960
|
+
{
|
|
146961
|
+
type: "Modal",
|
|
146962
|
+
generateBinding: modalName,
|
|
146963
|
+
children: getChildren$1(modalName),
|
|
146964
|
+
createAt: "root"
|
|
146965
|
+
},
|
|
146966
|
+
{
|
|
146967
|
+
type: "Button",
|
|
146968
|
+
properties: {
|
|
146969
|
+
label: Property.Static("Open Modal"),
|
|
146970
|
+
onClick: Property.Event([
|
|
146971
|
+
{
|
|
146972
|
+
id: "openModal",
|
|
146973
|
+
type: TriggerStepType.CONTROL_MODAL,
|
|
146974
|
+
name: modalName,
|
|
146975
|
+
action: "open"
|
|
146976
|
+
}
|
|
146977
|
+
])
|
|
146978
|
+
}
|
|
146979
|
+
}
|
|
146980
|
+
];
|
|
146981
|
+
}
|
|
146982
|
+
};
|
|
147207
146983
|
const MODAL_BORDER_RADIUS = 4;
|
|
147208
146984
|
const MODAL_WIDTH_PRESETS = {
|
|
147209
146985
|
// in percentages
|
|
@@ -147549,7 +147325,70 @@ const Modal = registerComponent$1(
|
|
|
147549
147325
|
}
|
|
147550
147326
|
);
|
|
147551
147327
|
}
|
|
147552
|
-
);
|
|
147328
|
+
).addEditorTemplate(editorTemplate$6);
|
|
147329
|
+
function getChildren() {
|
|
147330
|
+
return [
|
|
147331
|
+
{
|
|
147332
|
+
tagName: "Container",
|
|
147333
|
+
properties: {
|
|
147334
|
+
variant: Property.Static("none"),
|
|
147335
|
+
width: Property.Dimension(Dim.fill()),
|
|
147336
|
+
layout: Property.Static("horizontal"),
|
|
147337
|
+
horizontalAlign: Property.Static("left")
|
|
147338
|
+
},
|
|
147339
|
+
children: [
|
|
147340
|
+
{
|
|
147341
|
+
tagName: "Text",
|
|
147342
|
+
properties: {
|
|
147343
|
+
text: Property.Static("Slideout Title"),
|
|
147344
|
+
textStyle: Property.Static({
|
|
147345
|
+
variant: "heading3"
|
|
147346
|
+
})
|
|
147347
|
+
},
|
|
147348
|
+
children: []
|
|
147349
|
+
}
|
|
147350
|
+
]
|
|
147351
|
+
},
|
|
147352
|
+
{
|
|
147353
|
+
tagName: "Container",
|
|
147354
|
+
properties: {
|
|
147355
|
+
variant: Property.Static("none"),
|
|
147356
|
+
width: Property.Dimension(Dim.fill()),
|
|
147357
|
+
height: Property.Dimension(Dim.fill()),
|
|
147358
|
+
horizontalAlign: Property.Static("left"),
|
|
147359
|
+
layout: Property.Static("vertical")
|
|
147360
|
+
},
|
|
147361
|
+
children: []
|
|
147362
|
+
}
|
|
147363
|
+
];
|
|
147364
|
+
}
|
|
147365
|
+
const editorTemplate$5 = {
|
|
147366
|
+
create: (context2) => {
|
|
147367
|
+
const slideoutName = context2.generateUniqueName("Slideout");
|
|
147368
|
+
return [
|
|
147369
|
+
{
|
|
147370
|
+
type: "Slideout",
|
|
147371
|
+
generateBinding: slideoutName,
|
|
147372
|
+
children: getChildren(),
|
|
147373
|
+
createAt: "root"
|
|
147374
|
+
},
|
|
147375
|
+
{
|
|
147376
|
+
type: "Button",
|
|
147377
|
+
properties: {
|
|
147378
|
+
label: Property.Static("Open Slideout"),
|
|
147379
|
+
onClick: Property.Event([
|
|
147380
|
+
{
|
|
147381
|
+
id: "openSlideout",
|
|
147382
|
+
type: TriggerStepType.CONTROL_SLIDEOUT,
|
|
147383
|
+
name: slideoutName,
|
|
147384
|
+
action: "open"
|
|
147385
|
+
}
|
|
147386
|
+
])
|
|
147387
|
+
}
|
|
147388
|
+
}
|
|
147389
|
+
];
|
|
147390
|
+
}
|
|
147391
|
+
};
|
|
147553
147392
|
const SlideoutSize = {
|
|
147554
147393
|
xsmall: "xsmall",
|
|
147555
147394
|
small: "small",
|
|
@@ -149903,7 +149742,7 @@ const Slideout = registerComponent$1(
|
|
|
149903
149742
|
}
|
|
149904
149743
|
);
|
|
149905
149744
|
}
|
|
149906
|
-
);
|
|
149745
|
+
).addEditorTemplate(editorTemplate$5);
|
|
149907
149746
|
const RowDensity = {
|
|
149908
149747
|
"extra-small": "extra-small",
|
|
149909
149748
|
small: "small",
|
|
@@ -150080,6 +149919,196 @@ const tagColorPalette = [
|
|
|
150080
149919
|
"#9D585833",
|
|
150081
149920
|
"#FF484833"
|
|
150082
149921
|
];
|
|
149922
|
+
const DEFAULT_TABLE_DATA = [
|
|
149923
|
+
{
|
|
149924
|
+
photo: "https://cdn.superblocks.com/sample-data/rachel_kim.jpg",
|
|
149925
|
+
name: "Rachel Kim",
|
|
149926
|
+
email: "rachel.kim89@gmail.com",
|
|
149927
|
+
role: "Vendor Partner",
|
|
149928
|
+
company: "Urban Threads Co.",
|
|
149929
|
+
status: "Active",
|
|
149930
|
+
date_joined: "2023-04-12",
|
|
149931
|
+
last_activity: "2025-06-07T16:20:00Z"
|
|
149932
|
+
},
|
|
149933
|
+
{
|
|
149934
|
+
photo: "https://cdn.superblocks.com/sample-data/daniel_vargas.jpg",
|
|
149935
|
+
name: "Daniel Vargas",
|
|
149936
|
+
email: "dvargas1984@yahoo.com",
|
|
149937
|
+
role: "Logistics Contact",
|
|
149938
|
+
company: "Vargas Freight Ltd.",
|
|
149939
|
+
status: "Pending",
|
|
149940
|
+
date_joined: "2024-01-23",
|
|
149941
|
+
last_activity: "2025-05-30T13:45:00Z"
|
|
149942
|
+
},
|
|
149943
|
+
{
|
|
149944
|
+
photo: "https://cdn.superblocks.com/sample-data/sophie_liu.jpg",
|
|
149945
|
+
name: "Sophie Liu",
|
|
149946
|
+
email: "sophie.liu.personal@gmail.com",
|
|
149947
|
+
role: "Retail Manager",
|
|
149948
|
+
company: "Modern Goods",
|
|
149949
|
+
status: "Active",
|
|
149950
|
+
date_joined: "2022-09-10",
|
|
149951
|
+
last_activity: "2025-06-08T09:03:00Z"
|
|
149952
|
+
},
|
|
149953
|
+
{
|
|
149954
|
+
photo: "https://cdn.superblocks.com/sample-data/omar_el-sayed.jpg",
|
|
149955
|
+
name: "Omar El-Sayed",
|
|
149956
|
+
email: "omarsayed78@hotmail.com",
|
|
149957
|
+
role: "Accounts Payable",
|
|
149958
|
+
company: "Sayed Textiles",
|
|
149959
|
+
status: "Inactive",
|
|
149960
|
+
date_joined: "2021-06-05",
|
|
149961
|
+
last_activity: "2024-12-18T11:40:00Z"
|
|
149962
|
+
},
|
|
149963
|
+
{
|
|
149964
|
+
photo: "https://cdn.superblocks.com/sample-data/grace_nguyen.jpg",
|
|
149965
|
+
name: "Grace Nguyen",
|
|
149966
|
+
email: "gracenguyen23@icloud.com",
|
|
149967
|
+
role: "Product Supplier",
|
|
149968
|
+
company: "Green Earth Supplies",
|
|
149969
|
+
status: "Active",
|
|
149970
|
+
date_joined: "2023-11-03",
|
|
149971
|
+
last_activity: "2025-06-08T17:28:00Z"
|
|
149972
|
+
},
|
|
149973
|
+
{
|
|
149974
|
+
photo: "https://cdn.superblocks.com/sample-data/alex_romero.jpg",
|
|
149975
|
+
name: "Alex Romero",
|
|
149976
|
+
email: "alex.romero@gmail.com",
|
|
149977
|
+
role: "Client Account Owner",
|
|
149978
|
+
company: "Romero & Co.",
|
|
149979
|
+
status: "Suspended",
|
|
149980
|
+
date_joined: "2022-02-28",
|
|
149981
|
+
last_activity: "2025-03-11T08:20:00Z"
|
|
149982
|
+
},
|
|
149983
|
+
{
|
|
149984
|
+
photo: "https://cdn.superblocks.com/sample-data/lena_schmidt.jpg",
|
|
149985
|
+
name: "Lena Schmidt",
|
|
149986
|
+
email: "lena_schmidt92@gmx.de",
|
|
149987
|
+
role: "Wholesale Contact",
|
|
149988
|
+
company: "Schmidt Imports",
|
|
149989
|
+
status: "Active",
|
|
149990
|
+
date_joined: "2021-12-01",
|
|
149991
|
+
last_activity: "2025-06-06T21:10:00Z"
|
|
149992
|
+
},
|
|
149993
|
+
{
|
|
149994
|
+
photo: "https://cdn.superblocks.com/sample-data/devon_price.jpg",
|
|
149995
|
+
name: "Devon Price",
|
|
149996
|
+
email: "devon.price22@aol.com",
|
|
149997
|
+
role: "Fulfillment Liaison",
|
|
149998
|
+
company: "DepotLink",
|
|
149999
|
+
status: "Active",
|
|
150000
|
+
date_joined: "2024-05-17",
|
|
150001
|
+
last_activity: "2025-06-08T10:42:00Z"
|
|
150002
|
+
},
|
|
150003
|
+
{
|
|
150004
|
+
photo: "https://cdn.superblocks.com/sample-data/isabella_rossi.jpg",
|
|
150005
|
+
name: "Isabella Rossi",
|
|
150006
|
+
email: "bella.rossi@gmail.com",
|
|
150007
|
+
role: "Procurement Agent",
|
|
150008
|
+
company: "Rossi Global Sourcing",
|
|
150009
|
+
status: "Pending",
|
|
150010
|
+
date_joined: "2023-07-19",
|
|
150011
|
+
last_activity: "2025-05-29T14:05:00Z"
|
|
150012
|
+
},
|
|
150013
|
+
{
|
|
150014
|
+
photo: "https://cdn.superblocks.com/sample-data/tariq_khan.jpg",
|
|
150015
|
+
name: "Tariq Khan",
|
|
150016
|
+
email: "tariq.khan92@protonmail.com",
|
|
150017
|
+
role: "International Ops Lead",
|
|
150018
|
+
company: "CrossPort Trade Inc.",
|
|
150019
|
+
status: "Active",
|
|
150020
|
+
date_joined: "2022-11-08",
|
|
150021
|
+
last_activity: "2025-06-08T16:11:00Z"
|
|
150022
|
+
},
|
|
150023
|
+
{
|
|
150024
|
+
photo: "https://cdn.superblocks.com/sample-data/emily_zhang.jpg",
|
|
150025
|
+
name: "Emily Zhang",
|
|
150026
|
+
email: "emilyzhang.home@gmail.com",
|
|
150027
|
+
role: "Logistics Coordinator",
|
|
150028
|
+
company: "Zhang Export Ltd.",
|
|
150029
|
+
status: "Active",
|
|
150030
|
+
date_joined: "2023-03-12",
|
|
150031
|
+
last_activity: "2025-06-08T19:02:00Z"
|
|
150032
|
+
}
|
|
150033
|
+
];
|
|
150034
|
+
const DEFAULT_TABLE_COLUMNS = {
|
|
150035
|
+
name: {
|
|
150036
|
+
columnType: "text",
|
|
150037
|
+
label: "Name"
|
|
150038
|
+
},
|
|
150039
|
+
email: {
|
|
150040
|
+
columnType: "email",
|
|
150041
|
+
label: "Email"
|
|
150042
|
+
},
|
|
150043
|
+
role: {
|
|
150044
|
+
columnType: "text",
|
|
150045
|
+
label: "Role"
|
|
150046
|
+
},
|
|
150047
|
+
company: {
|
|
150048
|
+
columnType: "text",
|
|
150049
|
+
label: "Company"
|
|
150050
|
+
},
|
|
150051
|
+
status: {
|
|
150052
|
+
columnType: "tags",
|
|
150053
|
+
tagDisplayConfig: {
|
|
150054
|
+
Active: {
|
|
150055
|
+
color: "#14CDB733"
|
|
150056
|
+
},
|
|
150057
|
+
Pending: {
|
|
150058
|
+
color: "#FF9F3533"
|
|
150059
|
+
},
|
|
150060
|
+
Inactive: {
|
|
150061
|
+
color: "#a6a0a033"
|
|
150062
|
+
},
|
|
150063
|
+
Suspended: {
|
|
150064
|
+
color: "#FF62A433"
|
|
150065
|
+
}
|
|
150066
|
+
},
|
|
150067
|
+
label: "Status"
|
|
150068
|
+
},
|
|
150069
|
+
date_joined: {
|
|
150070
|
+
columnType: "date",
|
|
150071
|
+
inputFormat: "YYYY-MM-DD",
|
|
150072
|
+
outputFormat: "MM-DD-YYYY",
|
|
150073
|
+
label: "Date joined"
|
|
150074
|
+
},
|
|
150075
|
+
last_activity: {
|
|
150076
|
+
columnType: "date",
|
|
150077
|
+
inputFormat: "YYYY-MM-DDTHH:mm:ssZ",
|
|
150078
|
+
outputFormat: "MM-DD-YYYY",
|
|
150079
|
+
label: "Last activity"
|
|
150080
|
+
},
|
|
150081
|
+
photo: {
|
|
150082
|
+
columnType: "image",
|
|
150083
|
+
label: "Photo",
|
|
150084
|
+
imageBorderRadius: {
|
|
150085
|
+
topLeft: Dim.px(16),
|
|
150086
|
+
topRight: Dim.px(16),
|
|
150087
|
+
bottomLeft: Dim.px(16),
|
|
150088
|
+
bottomRight: Dim.px(16)
|
|
150089
|
+
}
|
|
150090
|
+
}
|
|
150091
|
+
};
|
|
150092
|
+
const DEFAULT_TABLE_KEYS = Object.keys(DEFAULT_TABLE_COLUMNS);
|
|
150093
|
+
const CLEARED_TABLE_COLUMNS = DEFAULT_TABLE_KEYS.reduce(
|
|
150094
|
+
(acc, key2) => {
|
|
150095
|
+
acc[key2] = void 0;
|
|
150096
|
+
return acc;
|
|
150097
|
+
},
|
|
150098
|
+
{}
|
|
150099
|
+
);
|
|
150100
|
+
const editorTemplate$4 = {
|
|
150101
|
+
create: () => ({
|
|
150102
|
+
type: "Table",
|
|
150103
|
+
generateBinding: true,
|
|
150104
|
+
properties: {
|
|
150105
|
+
tableData: Property.Static(DEFAULT_TABLE_DATA),
|
|
150106
|
+
columns: Property.Static(DEFAULT_TABLE_COLUMNS),
|
|
150107
|
+
header: Property.Static("Customers"),
|
|
150108
|
+
searchPlaceholder: Property.Static("Search...")
|
|
150109
|
+
}
|
|
150110
|
+
})
|
|
150111
|
+
};
|
|
150083
150112
|
const CurrencyList = CC.getCodes();
|
|
150084
150113
|
const tableColumnTypes = [
|
|
150085
150114
|
{
|
|
@@ -159771,14 +159800,14 @@ function getLoaderFn(options) {
|
|
|
159771
159800
|
if (!(loader === "all")) return [3, 3];
|
|
159772
159801
|
return [4, import(
|
|
159773
159802
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
159774
|
-
"./allPathsLoader-
|
|
159803
|
+
"./allPathsLoader-BYewEWVh.js"
|
|
159775
159804
|
)];
|
|
159776
159805
|
case 2:
|
|
159777
159806
|
return [2, _b2.sent().allPathsLoader];
|
|
159778
159807
|
case 3:
|
|
159779
159808
|
return [4, import(
|
|
159780
159809
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
159781
|
-
"./splitPathsBySizeLoader-
|
|
159810
|
+
"./splitPathsBySizeLoader-2oYHBTYy.js"
|
|
159782
159811
|
)];
|
|
159783
159812
|
case 4:
|
|
159784
159813
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -190952,13 +190981,14 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
190952
190981
|
}
|
|
190953
190982
|
createTableCell(columnProperties, isHidden2) {
|
|
190954
190983
|
return (props2) => {
|
|
190955
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
190984
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i;
|
|
190956
190985
|
const currentRowIndex = props2.cell.row.index;
|
|
190957
|
-
((_a2 = this.props.filteredOrderMap) == null ? void 0 : _a2[currentRowIndex]) ?? currentRowIndex;
|
|
190986
|
+
const originalRowIndex = ((_a2 = this.props.filteredOrderMap) == null ? void 0 : _a2[currentRowIndex]) ?? currentRowIndex;
|
|
190987
|
+
const currentRow = ((_b2 = this.props.tableData) == null ? void 0 : _b2[originalRowIndex]) ?? props2.cell.row.original;
|
|
190958
190988
|
const cellProperties = getCellProperties(
|
|
190959
|
-
(
|
|
190989
|
+
(_d2 = (_c2 = this.props) == null ? void 0 : _c2.cellProps) == null ? void 0 : _d2.textStyle,
|
|
190960
190990
|
columnProperties,
|
|
190961
|
-
|
|
190991
|
+
currentRow
|
|
190962
190992
|
);
|
|
190963
190993
|
if (columnProperties.columnType === ColumnType.BUTTON) {
|
|
190964
190994
|
const buttonProps = {
|
|
@@ -190973,10 +191003,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
190973
191003
|
buttonBorder: cellProperties.buttonBorder,
|
|
190974
191004
|
buttonVariant: cellProperties.buttonVariant ?? "primary",
|
|
190975
191005
|
buttonTextStyle: cellProperties.buttonTextStyle,
|
|
190976
|
-
cellIcon: getPropertyValue(
|
|
190977
|
-
columnProperties.buttonIcon,
|
|
190978
|
-
props2.cell.row.original
|
|
190979
|
-
),
|
|
191006
|
+
cellIcon: getPropertyValue(columnProperties.buttonIcon, currentRow),
|
|
190980
191007
|
cellIconPosition: cellProperties.cellIconPosition ?? "left",
|
|
190981
191008
|
rowDensity: this.props.rowDensity,
|
|
190982
191009
|
id: columnProperties.id,
|
|
@@ -190994,7 +191021,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
190994
191021
|
columnId: columnProperties.id
|
|
190995
191022
|
},
|
|
190996
191023
|
maxLinesPerRow: this.props.maxLinesPerRow,
|
|
190997
|
-
tableCellTextStyle: (
|
|
191024
|
+
tableCellTextStyle: (_e2 = this.props.cellProps) == null ? void 0 : _e2.textStyle,
|
|
190998
191025
|
value: props2.cell.value
|
|
190999
191026
|
});
|
|
191000
191027
|
} else {
|
|
@@ -191004,19 +191031,19 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
191004
191031
|
columnType: columnProperties.columnType,
|
|
191005
191032
|
editInputType: columnProperties.editInputType,
|
|
191006
191033
|
maxLinesPerRow: this.props.maxLinesPerRow,
|
|
191007
|
-
tableCellTextStyle: (
|
|
191034
|
+
tableCellTextStyle: (_f2 = this.props.cellProps) == null ? void 0 : _f2.textStyle,
|
|
191008
191035
|
typographies: this.props.theme.typographies,
|
|
191009
191036
|
cellProps: {
|
|
191010
191037
|
// since these are overridden by the cellProperties
|
|
191011
191038
|
...columnProperties,
|
|
191012
191039
|
...getCellProperties(
|
|
191013
|
-
(
|
|
191040
|
+
(_h2 = (_g2 = this.props) == null ? void 0 : _g2.cellProps) == null ? void 0 : _h2.textStyle,
|
|
191014
191041
|
columnProperties,
|
|
191015
|
-
|
|
191042
|
+
currentRow
|
|
191016
191043
|
),
|
|
191017
191044
|
isHidden: isHidden2,
|
|
191018
191045
|
cellProperties,
|
|
191019
|
-
tagsColorAssignment: (
|
|
191046
|
+
tagsColorAssignment: (_i = this.cachedTagColorAssignment) == null ? void 0 : _i[columnProperties.id],
|
|
191020
191047
|
booleanStyleFalse: columnProperties.booleanStyleFalse,
|
|
191021
191048
|
rowDensity: this.props.rowDensity,
|
|
191022
191049
|
isFocused: props2.isFocused,
|
|
@@ -191472,7 +191499,7 @@ const Table = registerComponent$1(
|
|
|
191472
191499
|
}
|
|
191473
191500
|
) });
|
|
191474
191501
|
}
|
|
191475
|
-
);
|
|
191502
|
+
).addEditorTemplate(editorTemplate$4);
|
|
191476
191503
|
var NS = getClassNamespace$1();
|
|
191477
191504
|
var MULTISELECT = "".concat(NS, "-multi-select");
|
|
191478
191505
|
var MULTISELECT_POPOVER = "".concat(MULTISELECT, "-popover");
|
|
@@ -195094,6 +195121,25 @@ const ListItemRenderer = (itemProps) => {
|
|
|
195094
195121
|
) }, itemProps.index);
|
|
195095
195122
|
};
|
|
195096
195123
|
ListItemRenderer.displayName = "SelectListItemRenderer";
|
|
195124
|
+
const editorTemplate$3 = {
|
|
195125
|
+
create: () => ({
|
|
195126
|
+
type: "Dropdown",
|
|
195127
|
+
generateBinding: true,
|
|
195128
|
+
properties: {
|
|
195129
|
+
label: Property.Static("Label"),
|
|
195130
|
+
options: Property.Computed([
|
|
195131
|
+
{ label: "All statuses", value: "all" },
|
|
195132
|
+
{ label: "Pending", value: "pending" },
|
|
195133
|
+
{ label: "Processing", value: "processing" },
|
|
195134
|
+
{ label: "Completed", value: "completed" },
|
|
195135
|
+
{ label: "Failed", value: "failed" },
|
|
195136
|
+
{ label: "Cancelled", value: "cancelled" },
|
|
195137
|
+
{ label: "Rejected", value: "rejected" },
|
|
195138
|
+
{ label: "On hold", value: "on_hold" }
|
|
195139
|
+
])
|
|
195140
|
+
}
|
|
195141
|
+
})
|
|
195142
|
+
};
|
|
195097
195143
|
const DropdownEntireObjectOption = "$$ENTIRE_OBJECT";
|
|
195098
195144
|
const normalizeFunction$1 = (val, transformationValue) => {
|
|
195099
195145
|
if (transformationValue === DropdownEntireObjectOption) {
|
|
@@ -195655,7 +195701,7 @@ const Dropdown = registerComponent$1(
|
|
|
195655
195701
|
}
|
|
195656
195702
|
) }) });
|
|
195657
195703
|
}
|
|
195658
|
-
);
|
|
195704
|
+
).addEditorTemplate(editorTemplate$3);
|
|
195659
195705
|
const CustomComponent = registerComponent$1(
|
|
195660
195706
|
"CustomComponent",
|
|
195661
195707
|
{
|
|
@@ -195829,6 +195875,15 @@ class CheckboxComponent extends React__default.PureComponent {
|
|
|
195829
195875
|
);
|
|
195830
195876
|
}
|
|
195831
195877
|
}
|
|
195878
|
+
const editorTemplate$2 = {
|
|
195879
|
+
create: () => ({
|
|
195880
|
+
type: "Checkbox",
|
|
195881
|
+
generateBinding: true,
|
|
195882
|
+
properties: {
|
|
195883
|
+
label: Property.Static("Label")
|
|
195884
|
+
}
|
|
195885
|
+
})
|
|
195886
|
+
};
|
|
195832
195887
|
const propertiesDefinition$7 = {
|
|
195833
195888
|
general: Section$1.category(PropsPanelCategory.Content).children({
|
|
195834
195889
|
label: Prop.string().readAndWrite().default("").propertiesPanel({
|
|
@@ -195956,7 +196011,7 @@ const Checkbox = registerComponent$1(
|
|
|
195956
196011
|
}
|
|
195957
196012
|
) });
|
|
195958
196013
|
}
|
|
195959
|
-
);
|
|
196014
|
+
).addEditorTemplate(editorTemplate$2);
|
|
195960
196015
|
const adjustDateFormatSideEffect = (params) => {
|
|
195961
196016
|
const widgetMeta = params.widgetMeta;
|
|
195962
196017
|
const widgetState = params.widgetState;
|
|
@@ -196330,6 +196385,15 @@ const DatePicker = registerComponent$1(
|
|
|
196330
196385
|
) });
|
|
196331
196386
|
}
|
|
196332
196387
|
);
|
|
196388
|
+
const editorTemplate$1 = {
|
|
196389
|
+
create: () => ({
|
|
196390
|
+
type: "Switch",
|
|
196391
|
+
generateBinding: true,
|
|
196392
|
+
properties: {
|
|
196393
|
+
label: Property.Static("Label")
|
|
196394
|
+
}
|
|
196395
|
+
})
|
|
196396
|
+
};
|
|
196333
196397
|
const propertiesDefinition$5 = {
|
|
196334
196398
|
general: Section$1.category(PropsPanelCategory.Content).children({
|
|
196335
196399
|
label: Prop.string().readAndWrite().default("").propertiesPanel({
|
|
@@ -196615,10 +196679,10 @@ const Switch = registerComponent$1(
|
|
|
196615
196679
|
props2.sourceId
|
|
196616
196680
|
) });
|
|
196617
196681
|
}
|
|
196618
|
-
);
|
|
196682
|
+
).addEditorTemplate(editorTemplate$1);
|
|
196619
196683
|
const propertiesDefinition$4 = {
|
|
196620
196684
|
general: Section$1.category(PropsPanelCategory.Content).children({
|
|
196621
|
-
icon: Prop.string().readAndWrite().
|
|
196685
|
+
icon: Prop.string().readAndWrite().propertiesPanel({
|
|
196622
196686
|
label: "Icon",
|
|
196623
196687
|
helpText: "Select an icon",
|
|
196624
196688
|
controlType: "ICON_SELECTOR"
|
|
@@ -196706,6 +196770,19 @@ const Icon = registerComponent$1(
|
|
|
196706
196770
|
);
|
|
196707
196771
|
}
|
|
196708
196772
|
);
|
|
196773
|
+
const editorTemplate = {
|
|
196774
|
+
create: (context2) => ({
|
|
196775
|
+
type: "Image",
|
|
196776
|
+
properties: {
|
|
196777
|
+
src: Property.Static(
|
|
196778
|
+
"https://lowcode.s3.us-west-2.amazonaws.com/eilish-billie.jpeg"
|
|
196779
|
+
),
|
|
196780
|
+
fillContainer: Property.Static(true),
|
|
196781
|
+
width: context2.parentInfo.isGridLike ? Property.Dimension(Dim.col(4)) : Property.Dimension(Dim.px(300)),
|
|
196782
|
+
height: Property.Dimension(Dim.fit())
|
|
196783
|
+
}
|
|
196784
|
+
})
|
|
196785
|
+
};
|
|
196709
196786
|
const StyledImage = qe$1.img`
|
|
196710
196787
|
opacity: 0;
|
|
196711
196788
|
pointer-events: none;
|
|
@@ -196937,7 +197014,7 @@ const Image = registerComponent$1(
|
|
|
196937
197014
|
}
|
|
196938
197015
|
) });
|
|
196939
197016
|
}
|
|
196940
|
-
);
|
|
197017
|
+
).addEditorTemplate(editorTemplate);
|
|
196941
197018
|
const propertiesDefinition$2 = {
|
|
196942
197019
|
general: Section$1.category(PropsPanelCategory.Uncategorized).propertiesPanel({ showHeader: false }).children({
|
|
196943
197020
|
defaultValue: Prop.any().readAndWrite().propertiesPanel({
|
|
@@ -197947,7 +198024,7 @@ const EmbedWrapper$2 = (props2) => {
|
|
|
197947
198024
|
useEffect(() => {
|
|
197948
198025
|
const bootstrapResponseListener = (event) => {
|
|
197949
198026
|
try {
|
|
197950
|
-
rootStore.apis.
|
|
198027
|
+
rootStore.apis.agentUrls = event.data.payload.agentUrls ?? (event.data.payload.agentUrl ? [event.data.payload.agentUrl] : []);
|
|
197951
198028
|
rootStore.apis.setTokens(
|
|
197952
198029
|
event.data.payload.token,
|
|
197953
198030
|
event.data.payload.accessToken
|
|
@@ -197965,6 +198042,13 @@ const EmbedWrapper$2 = (props2) => {
|
|
|
197965
198042
|
"sb-bootstrap-response",
|
|
197966
198043
|
bootstrapResponseListener
|
|
197967
198044
|
);
|
|
198045
|
+
const updateActiveAgentsListener = (event) => {
|
|
198046
|
+
rootStore.apis.agentUrls = event.data.payload.agentUrls;
|
|
198047
|
+
};
|
|
198048
|
+
iframeMessageHandler.addEventListener(
|
|
198049
|
+
"sb-update-active-agents",
|
|
198050
|
+
updateActiveAgentsListener
|
|
198051
|
+
);
|
|
197968
198052
|
const retrievePropertyPanelPropsListener = (event) => {
|
|
197969
198053
|
const sourceId = event.data.payload.sourceId;
|
|
197970
198054
|
const instanceId = getEditStore().runtimeEntitiesManager.widgets.getAnyInstanceIdForSourceId(
|
|
@@ -198052,7 +198136,7 @@ const EmbedWrapper$2 = (props2) => {
|
|
|
198052
198136
|
parent,
|
|
198053
198137
|
scopeName,
|
|
198054
198138
|
baseProperties,
|
|
198055
|
-
|
|
198139
|
+
skipSecondaryComponentsCreation,
|
|
198056
198140
|
otherComponentsUpdates
|
|
198057
198141
|
} = event.data.payload;
|
|
198058
198142
|
try {
|
|
@@ -198061,7 +198145,7 @@ const EmbedWrapper$2 = (props2) => {
|
|
|
198061
198145
|
parent,
|
|
198062
198146
|
scopeName,
|
|
198063
198147
|
baseProperties,
|
|
198064
|
-
|
|
198148
|
+
skipSecondaryComponentsCreation,
|
|
198065
198149
|
otherComponentsUpdates
|
|
198066
198150
|
});
|
|
198067
198151
|
} catch (error2) {
|
|
@@ -198095,6 +198179,10 @@ const EmbedWrapper$2 = (props2) => {
|
|
|
198095
198179
|
"sb-bootstrap-response",
|
|
198096
198180
|
bootstrapResponseListener
|
|
198097
198181
|
);
|
|
198182
|
+
iframeMessageHandler.removeEventListener(
|
|
198183
|
+
"sb-update-active-agents",
|
|
198184
|
+
updateActiveAgentsListener
|
|
198185
|
+
);
|
|
198098
198186
|
iframeMessageHandler.removeEventListener(
|
|
198099
198187
|
"sb-edit-operation-acknowledge",
|
|
198100
198188
|
editOperationAcknowledgeListener
|
|
@@ -198244,7 +198332,7 @@ const EmbedWrapper$1 = (props2) => {
|
|
|
198244
198332
|
useEffect(() => {
|
|
198245
198333
|
const bootstrapResponseListener = (event) => {
|
|
198246
198334
|
try {
|
|
198247
|
-
rootStore.apis.
|
|
198335
|
+
rootStore.apis.agentUrls = event.data.payload.agentUrls ?? (event.data.payload.agentUrl ? [event.data.payload.agentUrl] : []);
|
|
198248
198336
|
rootStore.apis.setTokens(
|
|
198249
198337
|
event.data.payload.token,
|
|
198250
198338
|
event.data.payload.accessToken
|
|
@@ -200682,4 +200770,4 @@ export {
|
|
|
200682
200770
|
setQueryParams as y,
|
|
200683
200771
|
download as z
|
|
200684
200772
|
};
|
|
200685
|
-
//# sourceMappingURL=index-
|
|
200773
|
+
//# sourceMappingURL=index-CH4jAtWn.js.map
|