@superblocksteam/library 2.0.6-next.29 → 2.0.6-next.3
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-VmgoxOQN.js → allPaths-BtYOw5Ru.js} +2 -2
- package/dist/{allPaths-VmgoxOQN.js.map → allPaths-BtYOw5Ru.js.map} +1 -1
- package/dist/{allPaths-DdKKbEZs.js → allPaths-CO-aWzss.js} +2 -2
- package/dist/{allPaths-DdKKbEZs.js.map → allPaths-CO-aWzss.js.map} +1 -1
- package/dist/{allPathsLoader-Q25KonUl.js → allPathsLoader-B3Ii4JGL.js} +3 -3
- package/dist/{allPathsLoader-Q25KonUl.js.map → allPathsLoader-B3Ii4JGL.js.map} +1 -1
- package/dist/{allPathsLoader-sYb2uQpL.js → allPathsLoader-KDCEbuYo.js} +3 -3
- package/dist/{allPathsLoader-sYb2uQpL.js.map → allPathsLoader-KDCEbuYo.js.map} +1 -1
- package/dist/{devtools-consolidated-DERQEse1.js → devtools-consolidated-B1B3uBW_.js} +2 -2
- package/dist/{devtools-consolidated-DERQEse1.js.map → devtools-consolidated-B1B3uBW_.js.map} +1 -1
- package/dist/{index-CQC86xX4.js → index-kjgG33Rg.js} +152 -257
- package/dist/{index-CQC86xX4.js.map → index-kjgG33Rg.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-0bQrmlhP.js → splitPathsBySizeLoader-Btq5cpt-.js} +2 -2
- package/dist/{splitPathsBySizeLoader-0bQrmlhP.js.map → splitPathsBySizeLoader-Btq5cpt-.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-DgExy-KV.js → splitPathsBySizeLoader-VThmaq3t.js} +2 -2
- package/dist/{splitPathsBySizeLoader-DgExy-KV.js.map → splitPathsBySizeLoader-VThmaq3t.js.map} +1 -1
- package/dist-types/edit-mode/iframe-wrappers.d.ts +0 -1
- package/dist-types/lib/internal-details/is-sb-component.d.ts +1 -5
- package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +3 -3
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +3 -3
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +3 -4
- package/dist-types/lib/triggers/registry.d.ts +6 -6
- package/dist-types/lib/user-facing/components/grid/index.d.ts +5 -7
- package/dist-types/lib/user-facing/components/grid/utils.d.ts +1 -0
- package/dist-types/lib/user-facing/sb-event-flow.d.ts +2 -2
- package/package.json +3 -3
- package/dist-types/lib/user-facing/build-manifest.d.ts +0 -2
|
@@ -6005,7 +6005,7 @@ const Property = {
|
|
|
6005
6005
|
Expression: (value) => PropertyInfo(value, "EXPRESSION"),
|
|
6006
6006
|
Event: (value) => PropertyInfo(value, "EVENT"),
|
|
6007
6007
|
Dimension: (value) => PropertyInfo(value, "DIMENSION"),
|
|
6008
|
-
Computed: (value, args) => PropertyInfo(value, "COMPUTED", Array.isArray(args) && args.length > 0
|
|
6008
|
+
Computed: (value, args) => PropertyInfo(value, "COMPUTED", Array.isArray(args) && args.length > 0 ? { args } : {}),
|
|
6009
6009
|
Any: (value, type5 = "STATIC") => PropertyInfo(value, type5)
|
|
6010
6010
|
};
|
|
6011
6011
|
function isPropertyInfo(value) {
|
|
@@ -78418,7 +78418,7 @@ const ShowAlertTrigger = {
|
|
|
78418
78418
|
const ResetStateVarTrigger = {
|
|
78419
78419
|
type: TriggerStepType.RESET_STATE_VAR,
|
|
78420
78420
|
async execute(context2, step) {
|
|
78421
|
-
if (step.
|
|
78421
|
+
if (step.state === void 0) {
|
|
78422
78422
|
return;
|
|
78423
78423
|
}
|
|
78424
78424
|
context2.rootStore.entityManager.runCode({
|
|
@@ -78426,22 +78426,22 @@ const ResetStateVarTrigger = {
|
|
|
78426
78426
|
name: context2.name,
|
|
78427
78427
|
func: () => {
|
|
78428
78428
|
var _a2;
|
|
78429
|
-
return (_a2 = step.
|
|
78429
|
+
return (_a2 = step.state) == null ? void 0 : _a2.set(step.state.defaultValue);
|
|
78430
78430
|
},
|
|
78431
78431
|
args: []
|
|
78432
78432
|
});
|
|
78433
78433
|
},
|
|
78434
|
-
create(
|
|
78434
|
+
create(stateVar) {
|
|
78435
78435
|
return {
|
|
78436
78436
|
type: TriggerStepType.RESET_STATE_VAR,
|
|
78437
|
-
|
|
78437
|
+
state: stateVar
|
|
78438
78438
|
};
|
|
78439
78439
|
}
|
|
78440
78440
|
};
|
|
78441
78441
|
const SetStateVarTrigger = {
|
|
78442
78442
|
type: TriggerStepType.SET_STATE_VAR,
|
|
78443
78443
|
async execute(context2, step) {
|
|
78444
|
-
if (step.
|
|
78444
|
+
if (step.state === void 0) {
|
|
78445
78445
|
return;
|
|
78446
78446
|
}
|
|
78447
78447
|
const value = context2.rootStore.entityManager.computeValue({
|
|
@@ -78455,15 +78455,15 @@ const SetStateVarTrigger = {
|
|
|
78455
78455
|
func: (state, value2) => {
|
|
78456
78456
|
var _a2;
|
|
78457
78457
|
if (!state) return;
|
|
78458
|
-
(_a2 = step.
|
|
78458
|
+
(_a2 = step.state) == null ? void 0 : _a2.set(value2);
|
|
78459
78459
|
},
|
|
78460
78460
|
args: [value]
|
|
78461
78461
|
});
|
|
78462
78462
|
},
|
|
78463
|
-
create(
|
|
78463
|
+
create(stateVar, value) {
|
|
78464
78464
|
return {
|
|
78465
78465
|
type: TriggerStepType.SET_STATE_VAR,
|
|
78466
|
-
|
|
78466
|
+
state: stateVar,
|
|
78467
78467
|
value
|
|
78468
78468
|
};
|
|
78469
78469
|
}
|
|
@@ -78471,14 +78471,12 @@ const SetStateVarTrigger = {
|
|
|
78471
78471
|
const ControlTimerTrigger = {
|
|
78472
78472
|
type: TriggerStepType.CONTROL_TIMER,
|
|
78473
78473
|
async execute(_context, step) {
|
|
78474
|
-
|
|
78475
|
-
step.timer[step.action]();
|
|
78476
|
-
}
|
|
78474
|
+
console.log("ControlTimerTrigger", step);
|
|
78477
78475
|
},
|
|
78478
|
-
create(
|
|
78476
|
+
create(timerId, action2) {
|
|
78479
78477
|
return {
|
|
78480
78478
|
type: TriggerStepType.CONTROL_TIMER,
|
|
78481
|
-
|
|
78479
|
+
timerId,
|
|
78482
78480
|
action: action2
|
|
78483
78481
|
};
|
|
78484
78482
|
}
|
|
@@ -83506,7 +83504,7 @@ function registerStores(stores) {
|
|
|
83506
83504
|
internalStores = { ...internalStores, ...stores };
|
|
83507
83505
|
if (SUPPORTED_MODES.includes("production")) {
|
|
83508
83506
|
if (Object.keys(internalStores).length === Object.keys(stores).length) {
|
|
83509
|
-
import("./devtools-consolidated-
|
|
83507
|
+
import("./devtools-consolidated-B1B3uBW_.js").then(({ initializeCustomDevTools, setRegisteredStores }) => {
|
|
83510
83508
|
setRegisteredStores(internalStores);
|
|
83511
83509
|
initializeCustomDevTools();
|
|
83512
83510
|
}).catch((error) => {
|
|
@@ -83519,7 +83517,7 @@ function registerStores(stores) {
|
|
|
83519
83517
|
}
|
|
83520
83518
|
}
|
|
83521
83519
|
const DevToolsInternal = React__default.lazy(() => {
|
|
83522
|
-
return import("./devtools-consolidated-
|
|
83520
|
+
return import("./devtools-consolidated-B1B3uBW_.js").then((module2) => ({
|
|
83523
83521
|
default: module2.CustomDevTools
|
|
83524
83522
|
}));
|
|
83525
83523
|
});
|
|
@@ -83876,11 +83874,11 @@ class SbEventFlow {
|
|
|
83876
83874
|
controlModal(modal, action2) {
|
|
83877
83875
|
return this.addStep(EventRegistry.controlModal.create(modal, action2));
|
|
83878
83876
|
}
|
|
83879
|
-
static controlTimer(
|
|
83880
|
-
return SbEventFlow.start().controlTimer(
|
|
83877
|
+
static controlTimer(timerId, action2) {
|
|
83878
|
+
return SbEventFlow.start().controlTimer(timerId, action2);
|
|
83881
83879
|
}
|
|
83882
|
-
controlTimer(
|
|
83883
|
-
return this.addStep(EventRegistry.controlTimer.create(
|
|
83880
|
+
controlTimer(timerId, action2) {
|
|
83881
|
+
return this.addStep(EventRegistry.controlTimer.create(timerId, action2));
|
|
83884
83882
|
}
|
|
83885
83883
|
static runApis(apis, onSuccess, onError2) {
|
|
83886
83884
|
return SbEventFlow.start().runApis(apis, onSuccess, onError2);
|
|
@@ -85450,7 +85448,7 @@ class ApiManager {
|
|
|
85450
85448
|
scopeId,
|
|
85451
85449
|
this.apiNameToDepCandidates[apiName] ?? []
|
|
85452
85450
|
);
|
|
85453
|
-
const orchestratorUrl =
|
|
85451
|
+
const orchestratorUrl = `${this.baseUrl}v2/execute`;
|
|
85454
85452
|
const events2 = [];
|
|
85455
85453
|
await ((_a2 = this.rootStore.editStore) == null ? void 0 : _a2.operationManager.ensureFilesSynced());
|
|
85456
85454
|
const abortController = new AbortController();
|
|
@@ -86954,7 +86952,7 @@ function getPropertyValue$1({
|
|
|
86954
86952
|
return property.value;
|
|
86955
86953
|
}
|
|
86956
86954
|
function getSbEventFlow(step, scopeId) {
|
|
86957
|
-
var _a2, _b2, _c2, _d2, _e2, _f2
|
|
86955
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
86958
86956
|
if (!isValidStepDef(step)) {
|
|
86959
86957
|
return void 0;
|
|
86960
86958
|
}
|
|
@@ -87027,33 +87025,27 @@ function getSbEventFlow(step, scopeId) {
|
|
|
87027
87025
|
return SbEventFlow.controlModal(modalEntity, step.direction);
|
|
87028
87026
|
}
|
|
87029
87027
|
case "controlTimer": {
|
|
87030
|
-
const
|
|
87031
|
-
if (!((_a2 = timerStep.timer) == null ? void 0 : _a2.name)) {
|
|
87032
|
-
return void 0;
|
|
87033
|
-
}
|
|
87034
|
-
const timerEntity = getEntity(timerStep.timer.name);
|
|
87028
|
+
const timerEntity = getEntity(step.name);
|
|
87035
87029
|
if (!timerEntity) return void 0;
|
|
87036
|
-
return SbEventFlow.controlTimer(
|
|
87030
|
+
return SbEventFlow.controlTimer(step.name, step.command);
|
|
87037
87031
|
}
|
|
87038
87032
|
case "setStateVar": {
|
|
87039
|
-
const
|
|
87040
|
-
const stateEntity = getEntity((_b2 = variableStep.variable) == null ? void 0 : _b2.name);
|
|
87033
|
+
const stateEntity = getEntity((_a2 = step.state) == null ? void 0 : _a2.name);
|
|
87041
87034
|
if (!stateEntity) return void 0;
|
|
87042
|
-
const value = isPropertyInfo(
|
|
87043
|
-
property:
|
|
87035
|
+
const value = isPropertyInfo(step.value) ? getPropertyValue$1({
|
|
87036
|
+
property: step.value,
|
|
87044
87037
|
scopeId,
|
|
87045
|
-
name: getName((
|
|
87038
|
+
name: getName((_b2 = step.state) == null ? void 0 : _b2.name)
|
|
87046
87039
|
}) : step.value;
|
|
87047
87040
|
return SbEventFlow.setStateVar(stateEntity, value);
|
|
87048
87041
|
}
|
|
87049
87042
|
case "resetStateVar": {
|
|
87050
|
-
const
|
|
87051
|
-
const resetStateEntity = getEntity((_d2 = variableStep.variable) == null ? void 0 : _d2.name);
|
|
87043
|
+
const resetStateEntity = getEntity((_c2 = step.state) == null ? void 0 : _c2.name);
|
|
87052
87044
|
if (!resetStateEntity) return void 0;
|
|
87053
87045
|
return SbEventFlow.resetStateVar(resetStateEntity);
|
|
87054
87046
|
}
|
|
87055
87047
|
case "resetComponent": {
|
|
87056
|
-
const resetWidgetEntity = getEntity((
|
|
87048
|
+
const resetWidgetEntity = getEntity((_d2 = step.widget) == null ? void 0 : _d2.name);
|
|
87057
87049
|
if (!resetWidgetEntity) return void 0;
|
|
87058
87050
|
return SbEventFlow.resetComponent(
|
|
87059
87051
|
step.widget,
|
|
@@ -87062,7 +87054,7 @@ function getSbEventFlow(step, scopeId) {
|
|
|
87062
87054
|
);
|
|
87063
87055
|
}
|
|
87064
87056
|
case "setComponentProperty": {
|
|
87065
|
-
const setWidgetEntity = getEntity((
|
|
87057
|
+
const setWidgetEntity = getEntity((_e2 = step.widget) == null ? void 0 : _e2.name);
|
|
87066
87058
|
if (!setWidgetEntity) return void 0;
|
|
87067
87059
|
return SbEventFlow.setComponentProperty(
|
|
87068
87060
|
step.widget,
|
|
@@ -87080,7 +87072,7 @@ function getSbEventFlow(step, scopeId) {
|
|
|
87080
87072
|
case "setProfile":
|
|
87081
87073
|
return SbEventFlow.setProfile(step.profileId, step.profileAction);
|
|
87082
87074
|
case "triggerEvent":
|
|
87083
|
-
return SbEventFlow.triggerEvent((
|
|
87075
|
+
return SbEventFlow.triggerEvent((_f2 = step.event) == null ? void 0 : _f2.name, step.eventPayload);
|
|
87084
87076
|
default:
|
|
87085
87077
|
console.warn("Unhandled runtime step type", step.type);
|
|
87086
87078
|
return void 0;
|
|
@@ -91047,14 +91039,14 @@ function getLoaderFn$1(options) {
|
|
|
91047
91039
|
if (!(loader === "all")) return [3, 3];
|
|
91048
91040
|
return [4, import(
|
|
91049
91041
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
91050
|
-
"./allPathsLoader-
|
|
91042
|
+
"./allPathsLoader-KDCEbuYo.js"
|
|
91051
91043
|
)];
|
|
91052
91044
|
case 2:
|
|
91053
91045
|
return [2, _b2.sent().allPathsLoader];
|
|
91054
91046
|
case 3:
|
|
91055
91047
|
return [4, import(
|
|
91056
91048
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
91057
|
-
"./splitPathsBySizeLoader-
|
|
91049
|
+
"./splitPathsBySizeLoader-VThmaq3t.js"
|
|
91058
91050
|
)];
|
|
91059
91051
|
case 4:
|
|
91060
91052
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -111689,18 +111681,14 @@ const ReactiveComponent = observer(function Component2({
|
|
|
111689
111681
|
const reactiveProps = useShallowMobxObserver(safeProps);
|
|
111690
111682
|
const stylePropWithSize = useStyleWithSize(reactiveProps);
|
|
111691
111683
|
const styleProp = useMemo$2(() => {
|
|
111692
|
-
const styleWithOverflow = {
|
|
111693
|
-
overflow: "auto",
|
|
111694
|
-
...stylePropWithSize
|
|
111695
|
-
};
|
|
111696
111684
|
if (reactiveProps.isVisible === false) {
|
|
111697
111685
|
const existingOpacity = lodashExports.isNumber(stylePropWithSize.opacity) ? stylePropWithSize.opacity : 1;
|
|
111698
111686
|
return {
|
|
111699
|
-
...
|
|
111687
|
+
...stylePropWithSize,
|
|
111700
111688
|
opacity: existingOpacity * INVISIBLE_OPACITY
|
|
111701
111689
|
};
|
|
111702
111690
|
}
|
|
111703
|
-
return
|
|
111691
|
+
return stylePropWithSize;
|
|
111704
111692
|
}, [reactiveProps.isVisible, stylePropWithSize]);
|
|
111705
111693
|
const { setStyle, getFallbackStyle } = useComponentSuspenseStyle();
|
|
111706
111694
|
useEffect(() => {
|
|
@@ -111860,52 +111848,28 @@ const size$2 = ({
|
|
|
111860
111848
|
controlType: "WIDTH_DROPDOWN",
|
|
111861
111849
|
defaultValue: defaults2 == null ? void 0 : defaults2.minWidth,
|
|
111862
111850
|
defaultOnAdd: defaultsOnAdd == null ? void 0 : defaultsOnAdd.minWidth,
|
|
111863
|
-
isVisible:
|
|
111864
|
-
var _a2;
|
|
111865
|
-
const hideWidth = ((_a2 = this == null ? void 0 : this.width) == null ? void 0 : _a2.mode) === "px";
|
|
111866
|
-
return Boolean(
|
|
111867
|
-
(showMinWidth ? showMinWidth == null ? void 0 : showMinWidth.call(this, s3) : true) && !hideWidth
|
|
111868
|
-
);
|
|
111869
|
-
}
|
|
111851
|
+
isVisible: showMinWidth
|
|
111870
111852
|
});
|
|
111871
111853
|
const maxWidthProperty = getSizeProp({
|
|
111872
111854
|
label: "Max width",
|
|
111873
111855
|
controlType: "WIDTH_DROPDOWN",
|
|
111874
111856
|
defaultValue: defaults2 == null ? void 0 : defaults2.maxWidth,
|
|
111875
111857
|
defaultOnAdd: defaultsOnAdd == null ? void 0 : defaultsOnAdd.maxWidth,
|
|
111876
|
-
isVisible:
|
|
111877
|
-
var _a2;
|
|
111878
|
-
const hideWidth = ((_a2 = this == null ? void 0 : this.width) == null ? void 0 : _a2.mode) === "px";
|
|
111879
|
-
return Boolean(
|
|
111880
|
-
(showMaxWidth ? showMaxWidth == null ? void 0 : showMaxWidth.call(this, s3) : true) && !hideWidth
|
|
111881
|
-
);
|
|
111882
|
-
}
|
|
111858
|
+
isVisible: showMaxWidth
|
|
111883
111859
|
});
|
|
111884
111860
|
const minHeightProperty = getSizeProp({
|
|
111885
111861
|
label: "Min height",
|
|
111886
111862
|
controlType: "HEIGHT_DROPDOWN",
|
|
111887
111863
|
defaultValue: defaults2 == null ? void 0 : defaults2.minHeight,
|
|
111888
111864
|
defaultOnAdd: defaultsOnAdd == null ? void 0 : defaultsOnAdd.minHeight,
|
|
111889
|
-
isVisible:
|
|
111890
|
-
var _a2;
|
|
111891
|
-
const hideHeight = ((_a2 = this == null ? void 0 : this.height) == null ? void 0 : _a2.mode) === "px";
|
|
111892
|
-
return Boolean(
|
|
111893
|
-
(showMinHeight ? showMinHeight == null ? void 0 : showMinHeight.call(this, s3) : true) && !hideHeight
|
|
111894
|
-
);
|
|
111895
|
-
}
|
|
111865
|
+
isVisible: showMinHeight
|
|
111896
111866
|
});
|
|
111897
111867
|
const maxHeightProperty = getSizeProp({
|
|
111898
111868
|
label: "Max height",
|
|
111899
111869
|
controlType: "HEIGHT_DROPDOWN",
|
|
111900
111870
|
defaultValue: defaults2 == null ? void 0 : defaults2.maxHeight,
|
|
111901
111871
|
defaultOnAdd: defaultsOnAdd == null ? void 0 : defaultsOnAdd.maxHeight,
|
|
111902
|
-
isVisible:
|
|
111903
|
-
var _a2;
|
|
111904
|
-
const hideHeight = ((_a2 = this == null ? void 0 : this.height) == null ? void 0 : _a2.mode) === "px";
|
|
111905
|
-
return Boolean(
|
|
111906
|
-
(showMaxHeight ? showMaxHeight == null ? void 0 : showMaxHeight.call(this, s3) : true) && !hideHeight
|
|
111907
|
-
);
|
|
111908
|
-
}
|
|
111872
|
+
isVisible: showMaxHeight
|
|
111909
111873
|
});
|
|
111910
111874
|
let heightProperty = Prop.dimension().readAndWrite().propertiesPanel({
|
|
111911
111875
|
label: "Height",
|
|
@@ -117566,18 +117530,12 @@ const AddSectionButton = ({
|
|
|
117566
117530
|
sectionInstanceId
|
|
117567
117531
|
}) => {
|
|
117568
117532
|
const indexForNewSection = placement === "above" ? indexForBaseSection : indexForBaseSection + 1;
|
|
117569
|
-
const createSection = useCallback(
|
|
117570
|
-
|
|
117533
|
+
const createSection = useCallback(() => {
|
|
117534
|
+
createComponent({
|
|
117571
117535
|
componentType: "SbSection",
|
|
117572
117536
|
parent: { id: sectionParentSourceId, index: indexForNewSection },
|
|
117573
117537
|
scopeName: sectionParentScopeName
|
|
117574
117538
|
});
|
|
117575
|
-
if (newSectionSourceId) {
|
|
117576
|
-
const newSectionInstanceId = getEditStore().runtimeEntitiesManager.widgets.getAnyInstanceIdForSourceId(
|
|
117577
|
-
newSectionSourceId
|
|
117578
|
-
);
|
|
117579
|
-
getEditStore().ui.selectWidget(newSectionInstanceId);
|
|
117580
|
-
}
|
|
117581
117539
|
}, [sectionParentSourceId, indexForNewSection, sectionParentScopeName]);
|
|
117582
117540
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
117583
117541
|
Wrapper$2,
|
|
@@ -119865,13 +119823,22 @@ const getStackChildStyle = ({
|
|
|
119865
119823
|
(childProps == null ? void 0 : childProps.type) ?? ""
|
|
119866
119824
|
) ? Dim.fit() : Dim.fill());
|
|
119867
119825
|
const widthCss = childCount === 1 && (width == null ? void 0 : width.mode) === "fill" && (parentWidth == null ? void 0 : parentWidth.mode) !== "fit" ? { width: "100%" } : dimToCSS(width, "width", primary === "width");
|
|
119868
|
-
const
|
|
119869
|
-
|
|
119870
|
-
|
|
119871
|
-
|
|
119872
|
-
const maxWidthCss =
|
|
119873
|
-
|
|
119874
|
-
|
|
119826
|
+
const minWidthCss = getMinMaxCss(
|
|
119827
|
+
childProps == null ? void 0 : childProps.minWidth,
|
|
119828
|
+
"minWidth"
|
|
119829
|
+
);
|
|
119830
|
+
const maxWidthCss = getMinMaxCss(
|
|
119831
|
+
childProps == null ? void 0 : childProps.maxWidth,
|
|
119832
|
+
"maxWidth"
|
|
119833
|
+
);
|
|
119834
|
+
const minHeightCss = getMinMaxCss(
|
|
119835
|
+
childProps == null ? void 0 : childProps.minHeight,
|
|
119836
|
+
"minHeight"
|
|
119837
|
+
);
|
|
119838
|
+
const maxHeightCss = getMinMaxCss(
|
|
119839
|
+
childProps == null ? void 0 : childProps.maxHeight,
|
|
119840
|
+
"maxHeight"
|
|
119841
|
+
);
|
|
119875
119842
|
const margin2 = (childProps == null ? void 0 : childProps.margin) ?? {
|
|
119876
119843
|
top: Dim.px(0),
|
|
119877
119844
|
bottom: Dim.px(0),
|
|
@@ -119881,7 +119848,6 @@ const getStackChildStyle = ({
|
|
|
119881
119848
|
const marginCss = { margin: generatePaddingStyle(margin2) };
|
|
119882
119849
|
const stickyCss = (childProps == null ? void 0 : childProps.sticky) ? { position: "sticky", top: "0px", zIndex: Layers$1.stickySections } : {};
|
|
119883
119850
|
const style2 = {
|
|
119884
|
-
...shouldNotShrink ? { flexShrink: 0 } : {},
|
|
119885
119851
|
...heightCss,
|
|
119886
119852
|
...widthCss,
|
|
119887
119853
|
...minHeightCss,
|
|
@@ -120092,16 +120058,20 @@ const generateClassName = (seed2) => {
|
|
|
120092
120058
|
return `superblocks_widget_${seed2}`;
|
|
120093
120059
|
};
|
|
120094
120060
|
const getCanvasClassName = () => "canvas";
|
|
120061
|
+
const getChildName = (child) => {
|
|
120062
|
+
var _a2;
|
|
120063
|
+
return ((_a2 = getBindingIdentifier(child.props.bind)) == null ? void 0 : _a2.entityName) ?? child.props[WIDGET_SOURCE_ID_ATTRIBUTE];
|
|
120064
|
+
};
|
|
120095
120065
|
const calculateRowPositions = (orderedNames, childrenArray, rowHeight, pxHeights) => {
|
|
120096
120066
|
return orderedNames.reduce(
|
|
120097
120067
|
(acc, name) => {
|
|
120098
120068
|
var _a2;
|
|
120099
|
-
const child = childrenArray.find((child2) => child2
|
|
120069
|
+
const child = childrenArray.find((child2) => getChildName(child2) === name);
|
|
120100
120070
|
if (!child) {
|
|
120101
120071
|
return acc;
|
|
120102
120072
|
}
|
|
120103
|
-
const marginTopPx = (((_a2 = child.marginTop) == null ? void 0 : _a2.value) ?? 0) * rowHeight;
|
|
120104
|
-
const constraintTop = child.constraintTop;
|
|
120073
|
+
const marginTopPx = (((_a2 = child.props.marginTop) == null ? void 0 : _a2.value) ?? 0) * rowHeight;
|
|
120074
|
+
const constraintTop = child.props.constraintTop;
|
|
120105
120075
|
const bottomFunc = (name2) => {
|
|
120106
120076
|
const topRow = acc[name2];
|
|
120107
120077
|
const pxHeight = pxHeights[name2];
|
|
@@ -120126,16 +120096,16 @@ const calculateRowPositions = (orderedNames, childrenArray, rowHeight, pxHeights
|
|
|
120126
120096
|
const orderConstraints = (children) => {
|
|
120127
120097
|
const childrenMap = children.reduce(
|
|
120128
120098
|
(acc, child) => {
|
|
120129
|
-
acc[child
|
|
120099
|
+
acc[getChildName(child)] = child;
|
|
120130
120100
|
return acc;
|
|
120131
120101
|
},
|
|
120132
120102
|
{}
|
|
120133
120103
|
);
|
|
120134
120104
|
const constraintsMap = children.reduce(
|
|
120135
120105
|
(acc, child) => {
|
|
120136
|
-
if (child.constraintTop) {
|
|
120137
|
-
const constraints = Array.isArray(child.constraintTop) ? child.constraintTop : [child.constraintTop];
|
|
120138
|
-
acc[child
|
|
120106
|
+
if (child.props.constraintTop) {
|
|
120107
|
+
const constraints = Array.isArray(child.props.constraintTop) ? child.props.constraintTop : [child.props.constraintTop];
|
|
120108
|
+
acc[getChildName(child)] = constraints.filter(
|
|
120139
120109
|
(constraint) => !!childrenMap[constraint]
|
|
120140
120110
|
);
|
|
120141
120111
|
}
|
|
@@ -120147,24 +120117,24 @@ const orderConstraints = (children) => {
|
|
|
120147
120117
|
const foundItems = /* @__PURE__ */ new Set();
|
|
120148
120118
|
const itemsLeft = /* @__PURE__ */ new Set();
|
|
120149
120119
|
children.forEach((child) => {
|
|
120150
|
-
const constraints = constraintsMap[child
|
|
120120
|
+
const constraints = constraintsMap[getChildName(child)] ?? [];
|
|
120151
120121
|
const hasNoConstraints = constraints.length === 0;
|
|
120152
120122
|
if (hasNoConstraints) {
|
|
120153
|
-
foundItems.add(child
|
|
120154
|
-
orderedNames.push(child
|
|
120123
|
+
foundItems.add(getChildName(child));
|
|
120124
|
+
orderedNames.push(getChildName(child));
|
|
120155
120125
|
} else {
|
|
120156
120126
|
itemsLeft.add(child);
|
|
120157
120127
|
}
|
|
120158
120128
|
});
|
|
120159
120129
|
while (itemsLeft.size > 0) {
|
|
120160
120130
|
itemsLeft.forEach((child) => {
|
|
120161
|
-
const constraints = constraintsMap[child
|
|
120131
|
+
const constraints = constraintsMap[getChildName(child)] ?? [];
|
|
120162
120132
|
const constraintsLeft = constraints.filter(
|
|
120163
120133
|
(constraint) => !foundItems.has(constraint)
|
|
120164
120134
|
);
|
|
120165
120135
|
if (constraintsLeft.length === 0) {
|
|
120166
|
-
foundItems.add(child
|
|
120167
|
-
orderedNames.push(child
|
|
120136
|
+
foundItems.add(getChildName(child));
|
|
120137
|
+
orderedNames.push(getChildName(child));
|
|
120168
120138
|
itemsLeft.delete(child);
|
|
120169
120139
|
}
|
|
120170
120140
|
});
|
|
@@ -120215,141 +120185,99 @@ const heightReducer = (state, action2) => {
|
|
|
120215
120185
|
}
|
|
120216
120186
|
};
|
|
120217
120187
|
const EMPTY_ARRAY$1 = [];
|
|
120218
|
-
const
|
|
120219
|
-
|
|
120220
|
-
|
|
120221
|
-
|
|
120222
|
-
|
|
120223
|
-
|
|
120224
|
-
|
|
120225
|
-
|
|
120226
|
-
|
|
120227
|
-
|
|
120228
|
-
|
|
120229
|
-
|
|
120230
|
-
|
|
120231
|
-
|
|
120188
|
+
const InternalGrid = ({
|
|
120189
|
+
children = EMPTY_ARRAY$1,
|
|
120190
|
+
...props2
|
|
120191
|
+
}) => {
|
|
120192
|
+
var _a2, _b2;
|
|
120193
|
+
const isEditing = Boolean((_a2 = rootStore.editStore) == null ? void 0 : _a2.isInitialized);
|
|
120194
|
+
const { style: style2, ...passThroughProps } = usePassthroughProps(props2);
|
|
120195
|
+
const rowHeight = ((_b2 = props2.rowHeight) == null ? void 0 : _b2.value) ?? 12;
|
|
120196
|
+
const childrenArray = useMemo$2(() => {
|
|
120197
|
+
let childrenArray2 = Array.isArray(children) ? children : [children];
|
|
120198
|
+
if (!isEditing) {
|
|
120199
|
+
childrenArray2 = childrenArray2.filter(
|
|
120200
|
+
(child) => child.props.isVisible !== false
|
|
120201
|
+
);
|
|
120202
|
+
}
|
|
120203
|
+
return childrenArray2;
|
|
120204
|
+
}, [children, isEditing]);
|
|
120205
|
+
const columns = props2.columns ?? 12;
|
|
120206
|
+
const [pxHeights, dispatchHeight] = React__default.useReducer(heightReducer, {});
|
|
120207
|
+
const gridPositions = useMemo$2(() => {
|
|
120208
|
+
const orderedNames = orderConstraints(childrenArray);
|
|
120209
|
+
const rowPos = calculateRowPositions(
|
|
120210
|
+
orderedNames,
|
|
120211
|
+
childrenArray,
|
|
120212
|
+
rowHeight,
|
|
120213
|
+
pxHeights
|
|
120214
|
+
);
|
|
120215
|
+
const positions = childrenArray.reduce(
|
|
120216
|
+
(acc, child) => {
|
|
120217
|
+
var _a3, _b3, _c2;
|
|
120218
|
+
let width = ((_a3 = child.props.width) == null ? void 0 : _a3.value) ?? (child.type.sbType === "SbTable" || child.type.sbType === "SbContainer" ? 6 : 2);
|
|
120219
|
+
if (((_b3 = child.props.width) == null ? void 0 : _b3.mode) === "fill") {
|
|
120220
|
+
width = columns;
|
|
120221
|
+
}
|
|
120222
|
+
acc[getChildName(child)] = {
|
|
120223
|
+
top: rowPos[getChildName(child)],
|
|
120224
|
+
left: ((_c2 = child.props.marginLeft) == null ? void 0 : _c2.value) ?? 0,
|
|
120225
|
+
width,
|
|
120226
|
+
height: Math.ceil(pxHeights[getChildName(child)] / rowHeight)
|
|
120227
|
+
};
|
|
120228
|
+
return acc;
|
|
120229
|
+
},
|
|
120230
|
+
{}
|
|
120231
|
+
);
|
|
120232
|
+
return positions;
|
|
120233
|
+
}, [columns, childrenArray, rowHeight, pxHeights]);
|
|
120234
|
+
const gridStyle = React__default.useMemo(() => {
|
|
120235
|
+
const spacingValue = 0;
|
|
120236
|
+
const columnsSize = `calc(${100 / columns}% - ${(columns - 1) * spacingValue / columns}px)`;
|
|
120237
|
+
return {
|
|
120238
|
+
display: "grid",
|
|
120239
|
+
gridAutoRows: `${rowHeight}px`,
|
|
120240
|
+
gap: `${spacingValue}px`,
|
|
120241
|
+
gridTemplateColumns: `repeat(${columns}, ${columnsSize})`,
|
|
120242
|
+
...style2
|
|
120243
|
+
};
|
|
120244
|
+
}, [columns, rowHeight, style2]);
|
|
120245
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(DragDisplay, { passThroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: gridStyle, className: props2.className, children: childrenArray.map((child) => {
|
|
120246
|
+
var _a3, _b3;
|
|
120247
|
+
const heightMode = ((_a3 = child.props.height) == null ? void 0 : _a3.mode) ?? "fit";
|
|
120248
|
+
const top2 = gridPositions[getChildName(child)].top;
|
|
120249
|
+
const left2 = gridPositions[getChildName(child)].left;
|
|
120250
|
+
const rows = gridPositions[getChildName(child)].height;
|
|
120251
|
+
const columns2 = gridPositions[getChildName(child)].width;
|
|
120232
120252
|
const Component3 = heightMode === "fit" ? MeasuredComponent : StaticComponent;
|
|
120233
120253
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
120234
120254
|
"div",
|
|
120235
120255
|
{
|
|
120236
120256
|
style: {
|
|
120237
120257
|
gridRow: `${top2 + 1} / span ${Math.max(1, rows)}`,
|
|
120238
|
-
gridColumn: `${left2 + 1} / span ${Math.max(1,
|
|
120258
|
+
gridColumn: `${left2 + 1} / span ${Math.max(1, columns2)}`,
|
|
120239
120259
|
width: "100%",
|
|
120240
120260
|
maxWidth: "100%"
|
|
120241
120261
|
},
|
|
120242
120262
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
120243
120263
|
Component3,
|
|
120244
120264
|
{
|
|
120245
|
-
staticHeight: (((
|
|
120265
|
+
staticHeight: (((_b3 = child.props.height) == null ? void 0 : _b3.value) ?? 0) * rowHeight,
|
|
120246
120266
|
onHeightChanged: (height) => {
|
|
120247
120267
|
dispatchHeight({
|
|
120248
120268
|
type: "SET_HEIGHT",
|
|
120249
|
-
name:
|
|
120269
|
+
name: getChildName(child),
|
|
120250
120270
|
height
|
|
120251
120271
|
});
|
|
120252
120272
|
},
|
|
120253
|
-
children:
|
|
120273
|
+
children: child
|
|
120254
120274
|
}
|
|
120255
120275
|
)
|
|
120256
120276
|
},
|
|
120257
|
-
|
|
120277
|
+
getChildName(child)
|
|
120258
120278
|
);
|
|
120259
|
-
}
|
|
120260
|
-
|
|
120261
|
-
const InternalGrid = observer(
|
|
120262
|
-
({ children = EMPTY_ARRAY$1, ...props2 }) => {
|
|
120263
|
-
var _a2;
|
|
120264
|
-
const { style: style2, ...passThroughProps } = usePassthroughProps(props2);
|
|
120265
|
-
const rowHeight = ((_a2 = props2.rowHeight) == null ? void 0 : _a2.value) ?? 12;
|
|
120266
|
-
const childrenArray = useObserverMemo(() => {
|
|
120267
|
-
var _a3;
|
|
120268
|
-
const childrenArray2 = Array.isArray(children) ? children : [children];
|
|
120269
|
-
const isEditing = Boolean((_a3 = rootStore.editStore) == null ? void 0 : _a3.isInitialized);
|
|
120270
|
-
const withEvaluatedProps = childrenArray2.reduce((acc, child) => {
|
|
120271
|
-
const bindingIdentifier = getBindingIdentifier(child.props.bind);
|
|
120272
|
-
const entity = bindingIdentifier ? rootStore.entityManager.getEntity(bindingIdentifier.scopeId, {
|
|
120273
|
-
value: bindingIdentifier.entityName,
|
|
120274
|
-
isAnonymous: false
|
|
120275
|
-
}) : null;
|
|
120276
|
-
const marginTop = (entity == null ? void 0 : entity.marginTop) ?? (isDimension(child.props.marginTop) ? child.props.marginTop : void 0);
|
|
120277
|
-
const marginLeft = (entity == null ? void 0 : entity.marginLeft) ?? (isDimension(child.props.marginLeft) ? child.props.marginLeft : void 0);
|
|
120278
|
-
const width = (entity == null ? void 0 : entity.width) ?? (isDimension(child.props.width) ? child.props.width : void 0);
|
|
120279
|
-
const height = (entity == null ? void 0 : entity.height) ?? (isDimension(child.props.height) ? child.props.height : void 0);
|
|
120280
|
-
const constraintTop = (entity == null ? void 0 : entity.constraintTop) ?? child.props.constraintTop;
|
|
120281
|
-
const isVisible2 = (entity == null ? void 0 : entity.isVisible) ?? child.props.isVisible;
|
|
120282
|
-
const gridChild = {
|
|
120283
|
-
marginTop,
|
|
120284
|
-
marginLeft,
|
|
120285
|
-
width,
|
|
120286
|
-
height,
|
|
120287
|
-
constraintTop,
|
|
120288
|
-
name: (bindingIdentifier == null ? void 0 : bindingIdentifier.entityName) ?? child.props[WIDGET_SOURCE_ID_ATTRIBUTE],
|
|
120289
|
-
// source ID as a fallback
|
|
120290
|
-
sbType: isSbComponent(child) ? child.type.sbType : void 0,
|
|
120291
|
-
element: child
|
|
120292
|
-
};
|
|
120293
|
-
if (isVisible2 !== false || isEditing) {
|
|
120294
|
-
acc.push(gridChild);
|
|
120295
|
-
}
|
|
120296
|
-
return acc;
|
|
120297
|
-
}, []);
|
|
120298
|
-
return withEvaluatedProps;
|
|
120299
|
-
}, [children]);
|
|
120300
|
-
const columns = props2.columns ?? 12;
|
|
120301
|
-
const [pxHeights, dispatchHeight] = React__default.useReducer(heightReducer, {});
|
|
120302
|
-
const gridPositions = useMemo$2(() => {
|
|
120303
|
-
const orderedNames = orderConstraints(childrenArray);
|
|
120304
|
-
const rowPos = calculateRowPositions(
|
|
120305
|
-
orderedNames,
|
|
120306
|
-
childrenArray,
|
|
120307
|
-
rowHeight,
|
|
120308
|
-
pxHeights
|
|
120309
|
-
);
|
|
120310
|
-
const positions = childrenArray.reduce(
|
|
120311
|
-
(acc, child) => {
|
|
120312
|
-
var _a3, _b2, _c2;
|
|
120313
|
-
let width = ((_a3 = child.width) == null ? void 0 : _a3.value) ?? (child.sbType === "SbTable" || child.sbType === "SbContainer" ? 6 : 2);
|
|
120314
|
-
if (((_b2 = child.width) == null ? void 0 : _b2.mode) === "fill") {
|
|
120315
|
-
width = columns;
|
|
120316
|
-
}
|
|
120317
|
-
acc[child.name] = {
|
|
120318
|
-
top: rowPos[child.name],
|
|
120319
|
-
left: ((_c2 = child.marginLeft) == null ? void 0 : _c2.value) ?? 0,
|
|
120320
|
-
width,
|
|
120321
|
-
height: Math.ceil(pxHeights[child.name] / rowHeight)
|
|
120322
|
-
};
|
|
120323
|
-
return acc;
|
|
120324
|
-
},
|
|
120325
|
-
{}
|
|
120326
|
-
);
|
|
120327
|
-
return positions;
|
|
120328
|
-
}, [columns, childrenArray, rowHeight, pxHeights]);
|
|
120329
|
-
const gridStyle = React__default.useMemo(() => {
|
|
120330
|
-
const spacingValue = 0;
|
|
120331
|
-
const columnsSize = `calc(${100 / columns}% - ${(columns - 1) * spacingValue / columns}px)`;
|
|
120332
|
-
return {
|
|
120333
|
-
display: "grid",
|
|
120334
|
-
gridAutoRows: `${rowHeight}px`,
|
|
120335
|
-
gap: `${spacingValue}px`,
|
|
120336
|
-
gridTemplateColumns: `repeat(${columns}, ${columnsSize})`,
|
|
120337
|
-
...style2
|
|
120338
|
-
};
|
|
120339
|
-
}, [columns, rowHeight, style2]);
|
|
120340
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(DragDisplay, { passThroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: gridStyle, className: props2.className, children: childrenArray.map((child) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
120341
|
-
GridChild,
|
|
120342
|
-
{
|
|
120343
|
-
childProps: child,
|
|
120344
|
-
childElement: child.element,
|
|
120345
|
-
gridPositions,
|
|
120346
|
-
rowHeight,
|
|
120347
|
-
dispatchHeight
|
|
120348
|
-
},
|
|
120349
|
-
child.name
|
|
120350
|
-
)) }) });
|
|
120351
|
-
}
|
|
120352
|
-
);
|
|
120279
|
+
}) }) });
|
|
120280
|
+
};
|
|
120353
120281
|
const DragDisplay = (props2) => {
|
|
120354
120282
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
120355
120283
|
"div",
|
|
@@ -145584,14 +145512,14 @@ function getLoaderFn(options) {
|
|
|
145584
145512
|
if (!(loader === "all")) return [3, 3];
|
|
145585
145513
|
return [4, import(
|
|
145586
145514
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
145587
|
-
"./allPathsLoader-
|
|
145515
|
+
"./allPathsLoader-B3Ii4JGL.js"
|
|
145588
145516
|
)];
|
|
145589
145517
|
case 2:
|
|
145590
145518
|
return [2, _b2.sent().allPathsLoader];
|
|
145591
145519
|
case 3:
|
|
145592
145520
|
return [4, import(
|
|
145593
145521
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
145594
|
-
"./splitPathsBySizeLoader-
|
|
145522
|
+
"./splitPathsBySizeLoader-Btq5cpt-.js"
|
|
145595
145523
|
)];
|
|
145596
145524
|
case 4:
|
|
145597
145525
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -162787,7 +162715,7 @@ const propertiesDefinition$9 = {
|
|
|
162787
162715
|
placeholder: '[{ "col1": "val1" }]',
|
|
162788
162716
|
isJSConvertible: false,
|
|
162789
162717
|
helpText: "Takes in an array of objects to display rows in the table. Bind data from an API using {{}}",
|
|
162790
|
-
controlType: "
|
|
162718
|
+
controlType: "COMPUTED_CODE_EDITOR"
|
|
162791
162719
|
}),
|
|
162792
162720
|
// do not let users set the id property
|
|
162793
162721
|
// id is managed internally by the table (it's always the key of the column)
|
|
@@ -162824,12 +162752,11 @@ const propertiesDefinition$9 = {
|
|
|
162824
162752
|
helpText: "Enable per column filtering"
|
|
162825
162753
|
}),
|
|
162826
162754
|
defaultFilters: Prop.any().readAndWrite().propertiesPanel({
|
|
162827
|
-
controlType: "
|
|
162755
|
+
controlType: "COMPUTED_CODE_EDITOR",
|
|
162828
162756
|
label: "Default filters",
|
|
162829
162757
|
visibility: "SHOW_NAME",
|
|
162830
162758
|
isJSConvertible: false,
|
|
162831
162759
|
isRemovable: true,
|
|
162832
|
-
defaultOnAdd: () => Property.Computed(""),
|
|
162833
162760
|
helpText: "Allows specifying the filters that will be used on page load",
|
|
162834
162761
|
isVisible: function() {
|
|
162835
162762
|
return this.isFilterable && this.pageType !== "server-side";
|
|
@@ -162906,8 +162833,6 @@ const propertiesDefinition$9 = {
|
|
|
162906
162833
|
label: "Default sort",
|
|
162907
162834
|
helpText: "Allows specifying the sort options that will be used on page load",
|
|
162908
162835
|
controlType: "DEFAULT_TABLE_SORT",
|
|
162909
|
-
isRemovable: true,
|
|
162910
|
-
visibility: "SHOW_NAME",
|
|
162911
162836
|
childrenDisplayMode: {
|
|
162912
162837
|
type: "popover",
|
|
162913
162838
|
title: "Default sort"
|
|
@@ -162916,8 +162841,6 @@ const propertiesDefinition$9 = {
|
|
|
162916
162841
|
defaultSearchText: Prop.string().readAndWrite().propertiesPanel({
|
|
162917
162842
|
label: "Default search",
|
|
162918
162843
|
helpText: "Sets the default search text",
|
|
162919
|
-
isRemovable: true,
|
|
162920
|
-
visibility: "SHOW_NAME",
|
|
162921
162844
|
isVisible: function() {
|
|
162922
162845
|
return this.enableClientSideSearch !== false;
|
|
162923
162846
|
}
|
|
@@ -182078,7 +182001,7 @@ const propertiesDefinition$8 = {
|
|
|
182078
182001
|
isJSConvertible: false,
|
|
182079
182002
|
helpText: "Allows users to select either a single option or multiple options. Values must be unique.",
|
|
182080
182003
|
placeholder: "[{label: 'Option 1', value: 'option1'}]",
|
|
182081
|
-
controlType: "
|
|
182004
|
+
controlType: "COMPUTED_CODE_EDITOR"
|
|
182082
182005
|
}),
|
|
182083
182006
|
defaultOptionValue: Prop.string().propertiesPanel({
|
|
182084
182007
|
label: "Default selected value",
|
|
@@ -183922,8 +183845,8 @@ const SbVariable = registerSbEntity(
|
|
|
183922
183845
|
);
|
|
183923
183846
|
const propertiesDefinition$1 = {
|
|
183924
183847
|
general: Section.category(PropsPanelCategory.Uncategorized).propertiesPanel({ showHeader: false }).children({
|
|
183925
|
-
intervalMs: Prop.number().default(
|
|
183926
|
-
label: "Interval",
|
|
183848
|
+
intervalMs: Prop.number().default(3e5).readAndWrite().propertiesPanel({
|
|
183849
|
+
label: "Interval (ms)",
|
|
183927
183850
|
helpText: "Sets the interval of the timer",
|
|
183928
183851
|
placeholder: "1000",
|
|
183929
183852
|
isJSConvertible: false,
|
|
@@ -186782,23 +186705,6 @@ console.log = (...args) => {
|
|
|
186782
186705
|
} catch {
|
|
186783
186706
|
}
|
|
186784
186707
|
};
|
|
186785
|
-
const loadApisIntoLibrary = async function loadApisIntoLibrary2() {
|
|
186786
|
-
var _a2, _b2;
|
|
186787
|
-
{
|
|
186788
|
-
try {
|
|
186789
|
-
const mod2 = await import("./user-facing/build-manifest.js");
|
|
186790
|
-
const apis = ((_a2 = mod2.default) == null ? void 0 : _a2.apis) ?? {};
|
|
186791
|
-
const apiDependencies = ((_b2 = mod2.default) == null ? void 0 : _b2.apiDependencies) ?? [];
|
|
186792
|
-
rootStore.apis.setAllApis(apis);
|
|
186793
|
-
apiDependencies.forEach((dep) => {
|
|
186794
|
-
rootStore.apis.setApiDepCandidates(dep.apiName, dep.params);
|
|
186795
|
-
rootStore.apis.setApiReferences(dep.apiName, dep.dependencies);
|
|
186796
|
-
});
|
|
186797
|
-
} catch (error) {
|
|
186798
|
-
console.error("Error loading apis into library", error);
|
|
186799
|
-
}
|
|
186800
|
-
}
|
|
186801
|
-
};
|
|
186802
186708
|
const SbProvider = function SbProvider2({
|
|
186803
186709
|
name = "codemode",
|
|
186804
186710
|
settings,
|
|
@@ -186807,14 +186713,6 @@ const SbProvider = function SbProvider2({
|
|
|
186807
186713
|
}) {
|
|
186808
186714
|
var _a2, _b2;
|
|
186809
186715
|
const isEmbedded = typeof window !== "undefined" && window.parent !== window.self;
|
|
186810
|
-
const [isApisInitialized, setIsApisInitialized] = useState(false);
|
|
186811
|
-
const runApiInitialization = useCallback(async () => {
|
|
186812
|
-
await loadApisIntoLibrary();
|
|
186813
|
-
setIsApisInitialized(true);
|
|
186814
|
-
}, []);
|
|
186815
|
-
useEffect(() => {
|
|
186816
|
-
runApiInitialization();
|
|
186817
|
-
}, [runApiInitialization]);
|
|
186818
186716
|
const [userAccessibleTheme, setUserAccessibleTheme] = useState(DEFAULT_THEME);
|
|
186819
186717
|
useEffect(() => {
|
|
186820
186718
|
const mergedTheme = lodashExports.merge(BASE_THEME_V5, settings == null ? void 0 : settings.theme);
|
|
@@ -186827,9 +186725,6 @@ const SbProvider = function SbProvider2({
|
|
|
186827
186725
|
useEffect(() => {
|
|
186828
186726
|
initializeStyles(name);
|
|
186829
186727
|
}, [preloadedData, name]);
|
|
186830
|
-
if (!isApisInitialized) {
|
|
186831
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(FullPageSpinner, {});
|
|
186832
|
-
}
|
|
186833
186728
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
186834
186729
|
"div",
|
|
186835
186730
|
{
|
|
@@ -198438,4 +198333,4 @@ export {
|
|
|
198438
198333
|
SbTimer as y,
|
|
198439
198334
|
SbApi as z
|
|
198440
198335
|
};
|
|
198441
|
-
//# sourceMappingURL=index-
|
|
198336
|
+
//# sourceMappingURL=index-kjgG33Rg.js.map
|