@superblocksteam/library 2.0.0-next.100 → 2.0.0-next.102
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-D2hMUe-Q.js → allPaths-BUVDrPil.js} +2 -2
- package/dist/{allPaths-D2hMUe-Q.js.map → allPaths-BUVDrPil.js.map} +1 -1
- package/dist/{allPaths-CcZmxiOk.js → allPaths-Cysz2HPx.js} +2 -2
- package/dist/{allPaths-CcZmxiOk.js.map → allPaths-Cysz2HPx.js.map} +1 -1
- package/dist/{allPathsLoader-BGIPBdhf.js → allPathsLoader-D63PfmgF.js} +3 -3
- package/dist/{allPathsLoader-CPzLM5jS.js.map → allPathsLoader-D63PfmgF.js.map} +1 -1
- package/dist/{allPathsLoader-CPzLM5jS.js → allPathsLoader-Dpac_env.js} +3 -3
- package/dist/{allPathsLoader-BGIPBdhf.js.map → allPathsLoader-Dpac_env.js.map} +1 -1
- package/dist/{index-jWufYPVw.js → index-nH86EJN2.js} +174 -74
- package/dist/{index-jWufYPVw.js.map → index-nH86EJN2.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-B1uNPKcc.js → splitPathsBySizeLoader-AU3QEoy4.js} +2 -2
- package/dist/{splitPathsBySizeLoader-B1uNPKcc.js.map → splitPathsBySizeLoader-AU3QEoy4.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-BbdcQ6go.js → splitPathsBySizeLoader-qHkbKq6Z.js} +2 -2
- package/dist/{splitPathsBySizeLoader-BbdcQ6go.js.map → splitPathsBySizeLoader-qHkbKq6Z.js.map} +1 -1
- package/dist-types/edit-mode/features/operation-store.d.ts +1 -0
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +3 -3
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as IconSvgPaths16 } from "./index-DIJYif9G.js";
|
|
2
2
|
import { I as IconSvgPaths20 } from "./index-LHtbj0-V.js";
|
|
3
|
-
import { p as pascalCase, I as IconSize } from "./index-
|
|
3
|
+
import { p as pascalCase, I as IconSize } from "./index-nH86EJN2.js";
|
|
4
4
|
function getIconPaths(name, size) {
|
|
5
5
|
var key = pascalCase(name);
|
|
6
6
|
return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getIconPaths,
|
|
15
15
|
iconNameToPathsRecordKey
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=allPaths-
|
|
17
|
+
//# sourceMappingURL=allPaths-BUVDrPil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-BUVDrPil.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":[],"mappings":";;;AA6BO,SAAS,aAAa,MAAM,MAAM;AACrC,MAAI,MAAM,WAAW,IAAI;AACzB,SAAO,SAAS,SAAS,WAAW,eAAe,GAAG,IAAI,eAAe,GAAG;AAChF;AAOO,SAAS,yBAAyB,MAAM;AAC3C,SAAO,WAAW,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as IconSvgPaths16 } from "./index-BxzKdlqH.js";
|
|
2
2
|
import { I as IconSvgPaths20 } from "./index-DIn-fanT.js";
|
|
3
|
-
import { p as pascalCase, b as IconSize } from "./index-
|
|
3
|
+
import { p as pascalCase, b as IconSize } from "./index-nH86EJN2.js";
|
|
4
4
|
function getIconPaths(name, size) {
|
|
5
5
|
var key = pascalCase(name);
|
|
6
6
|
return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getIconPaths,
|
|
15
15
|
iconNameToPathsRecordKey
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=allPaths-
|
|
17
|
+
//# sourceMappingURL=allPaths-Cysz2HPx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-Cysz2HPx.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":[],"mappings":";;;AA6BO,SAAS,aAAa,MAAM,MAAM;AACrC,MAAI,MAAM,WAAW,IAAI;AACzB,SAAO,SAAS,SAAS,WAAW,eAAe,GAAG,IAAI,eAAe,GAAG;AAChF;AAOO,SAAS,yBAAyB,MAAM;AAC3C,SAAO,WAAW,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-nH86EJN2.js";
|
|
2
2
|
var allPathsLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var getIconPaths;
|
|
@@ -7,7 +7,7 @@ var allPathsLoader = function(name, size) {
|
|
|
7
7
|
case 0:
|
|
8
8
|
return [4, import(
|
|
9
9
|
/* webpackChunkName: "blueprint-icons-all-paths" */
|
|
10
|
-
"./allPaths-
|
|
10
|
+
"./allPaths-BUVDrPil.js"
|
|
11
11
|
)];
|
|
12
12
|
case 1:
|
|
13
13
|
getIconPaths = _a.sent().getIconPaths;
|
|
@@ -19,4 +19,4 @@ var allPathsLoader = function(name, size) {
|
|
|
19
19
|
export {
|
|
20
20
|
allPathsLoader
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=allPathsLoader-
|
|
22
|
+
//# sourceMappingURL=allPathsLoader-D63PfmgF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-D63PfmgF.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":[],"mappings":";AAmBU,IAAC,iBAAiB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAI;AACJ,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,yBAAgB,GAAG,KAAI,EAAI;AAC3B,iBAAO,CAAC,GAAc,aAAa,MAAM,IAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-nH86EJN2.js";
|
|
2
2
|
var allPathsLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var getIconPaths;
|
|
@@ -7,7 +7,7 @@ var allPathsLoader = function(name, size) {
|
|
|
7
7
|
case 0:
|
|
8
8
|
return [4, import(
|
|
9
9
|
/* webpackChunkName: "blueprint-icons-all-paths" */
|
|
10
|
-
"./allPaths-
|
|
10
|
+
"./allPaths-Cysz2HPx.js"
|
|
11
11
|
)];
|
|
12
12
|
case 1:
|
|
13
13
|
getIconPaths = _a.sent().getIconPaths;
|
|
@@ -19,4 +19,4 @@ var allPathsLoader = function(name, size) {
|
|
|
19
19
|
export {
|
|
20
20
|
allPathsLoader
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=allPathsLoader-
|
|
22
|
+
//# sourceMappingURL=allPathsLoader-Dpac_env.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-Dpac_env.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":[],"mappings":";AAmBU,IAAC,iBAAiB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAI;AACJ,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,yBAAgB,GAAG,KAAI,EAAI;AAC3B,iBAAO,CAAC,GAAc,aAAa,MAAM,IAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -2684,14 +2684,14 @@ function getLoaderFn$1(options) {
|
|
|
2684
2684
|
if (!(loader === "all")) return [3, 3];
|
|
2685
2685
|
return [4, import(
|
|
2686
2686
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
2687
|
-
"./allPathsLoader-
|
|
2687
|
+
"./allPathsLoader-D63PfmgF.js"
|
|
2688
2688
|
)];
|
|
2689
2689
|
case 2:
|
|
2690
2690
|
return [2, _b2.sent().allPathsLoader];
|
|
2691
2691
|
case 3:
|
|
2692
2692
|
return [4, import(
|
|
2693
2693
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
2694
|
-
"./splitPathsBySizeLoader-
|
|
2694
|
+
"./splitPathsBySizeLoader-AU3QEoy4.js"
|
|
2695
2695
|
)];
|
|
2696
2696
|
case 4:
|
|
2697
2697
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -10226,6 +10226,9 @@ const Property = {
|
|
|
10226
10226
|
function isPropertyInfo(value) {
|
|
10227
10227
|
return typeof value === "object" && value !== null && "__info" in value && value.__info === true;
|
|
10228
10228
|
}
|
|
10229
|
+
function isStaticPropertyInfo(value) {
|
|
10230
|
+
return isPropertyInfo(value) && value.type === "STATIC";
|
|
10231
|
+
}
|
|
10229
10232
|
const generateSourceId = () => `SB-${Math.random().toString(36).substring(2, 15)}`;
|
|
10230
10233
|
const BindingMetaSymbol = Symbol("binding-meta");
|
|
10231
10234
|
function getBindingIdentifier(binding) {
|
|
@@ -94532,41 +94535,46 @@ class EntityManager {
|
|
|
94532
94535
|
}
|
|
94533
94536
|
const getValue2 = computed(() => {
|
|
94534
94537
|
let ret = null;
|
|
94535
|
-
|
|
94536
|
-
|
|
94537
|
-
|
|
94538
|
-
|
|
94539
|
-
if (isComputed) {
|
|
94540
|
-
ret = computeEngine.compute({
|
|
94541
|
-
snapshot: snapshot(scope.id),
|
|
94542
|
-
entityName: name,
|
|
94543
|
-
func: eov.value,
|
|
94544
|
-
path: prop
|
|
94545
|
-
});
|
|
94538
|
+
try {
|
|
94539
|
+
const metaParent = getMetaParent();
|
|
94540
|
+
if (metaParent && finalSegment in metaParent) {
|
|
94541
|
+
ret = metaParent[finalSegment];
|
|
94546
94542
|
} else {
|
|
94547
|
-
|
|
94548
|
-
|
|
94549
|
-
|
|
94550
|
-
|
|
94551
|
-
|
|
94552
|
-
|
|
94553
|
-
|
|
94554
|
-
|
|
94555
|
-
|
|
94556
|
-
|
|
94557
|
-
|
|
94558
|
-
|
|
94559
|
-
|
|
94560
|
-
|
|
94561
|
-
|
|
94562
|
-
|
|
94563
|
-
|
|
94564
|
-
|
|
94565
|
-
|
|
94566
|
-
|
|
94567
|
-
|
|
94543
|
+
if (isComputed) {
|
|
94544
|
+
ret = computeEngine.compute({
|
|
94545
|
+
snapshot: snapshot(scope.id),
|
|
94546
|
+
entityName: name,
|
|
94547
|
+
func: eov.value,
|
|
94548
|
+
path: prop
|
|
94549
|
+
});
|
|
94550
|
+
} else {
|
|
94551
|
+
ret = eov.value;
|
|
94552
|
+
}
|
|
94553
|
+
}
|
|
94554
|
+
const managedProp = this.componentRegistry.getManagedProps(entityType).find((p) => p.path === prop);
|
|
94555
|
+
if (managedProp == null ? void 0 : managedProp.validate) {
|
|
94556
|
+
const currentState = snapshot(scope.id);
|
|
94557
|
+
const entity2 = currentState[name.value];
|
|
94558
|
+
const validationResult = managedProp.validate(ret, entity2);
|
|
94559
|
+
if (entity2[WIDGET_SOURCE_ID_ATTRIBUTE]) {
|
|
94560
|
+
this.setValidationState(
|
|
94561
|
+
entity2[WIDGET_SOURCE_ID_ATTRIBUTE],
|
|
94562
|
+
prop,
|
|
94563
|
+
{
|
|
94564
|
+
isValid: validationResult.valid,
|
|
94565
|
+
message: validationResult.valid ? "" : validationResult.message,
|
|
94566
|
+
invalidValue: validationResult.valid ? void 0 : validationResult.invalidValue
|
|
94567
|
+
}
|
|
94568
|
+
);
|
|
94569
|
+
}
|
|
94570
|
+
if (!validationResult.valid) {
|
|
94571
|
+
return void 0;
|
|
94572
|
+
}
|
|
94573
|
+
return validationResult.result;
|
|
94568
94574
|
}
|
|
94569
|
-
|
|
94575
|
+
} catch (_e2) {
|
|
94576
|
+
console.log("Could not compute property value");
|
|
94577
|
+
return void 0;
|
|
94570
94578
|
}
|
|
94571
94579
|
return ret;
|
|
94572
94580
|
});
|
|
@@ -98494,7 +98502,7 @@ class OperationManager {
|
|
|
98494
98502
|
get allNames() {
|
|
98495
98503
|
return [];
|
|
98496
98504
|
}
|
|
98497
|
-
executeOrAddToBatch(operation) {
|
|
98505
|
+
executeOrAddToBatch(operation, addTransaction = true) {
|
|
98498
98506
|
const transactionId = this.batchOperationTransactionId ?? generateId();
|
|
98499
98507
|
const payload = this.waitingForBatch ? operation.payload : {
|
|
98500
98508
|
...operation.payload,
|
|
@@ -98508,7 +98516,9 @@ class OperationManager {
|
|
|
98508
98516
|
id: transactionId,
|
|
98509
98517
|
payload
|
|
98510
98518
|
};
|
|
98511
|
-
|
|
98519
|
+
if (addTransaction) {
|
|
98520
|
+
this.addPendingTransaction(opWithId);
|
|
98521
|
+
}
|
|
98512
98522
|
if (this.waitingForBatch) {
|
|
98513
98523
|
this.batchOperations.push(opWithId);
|
|
98514
98524
|
} else {
|
|
@@ -98611,10 +98621,13 @@ class OperationManager {
|
|
|
98611
98621
|
source: { id: sourceId }
|
|
98612
98622
|
}))
|
|
98613
98623
|
};
|
|
98614
|
-
this.executeOrAddToBatch(
|
|
98615
|
-
|
|
98616
|
-
|
|
98617
|
-
|
|
98624
|
+
this.executeOrAddToBatch(
|
|
98625
|
+
{
|
|
98626
|
+
type: "editor:deleteComponents",
|
|
98627
|
+
payload
|
|
98628
|
+
},
|
|
98629
|
+
this.canDeleteComponents(sourceIds)
|
|
98630
|
+
);
|
|
98618
98631
|
}
|
|
98619
98632
|
acknowledgeEditOperation(operation) {
|
|
98620
98633
|
var _a2, _b2;
|
|
@@ -98755,6 +98768,53 @@ class OperationManager {
|
|
|
98755
98768
|
generateSourceId() {
|
|
98756
98769
|
return generateSourceId();
|
|
98757
98770
|
}
|
|
98771
|
+
canDeleteComponents(sourceIds) {
|
|
98772
|
+
const editStore2 = getEditStore();
|
|
98773
|
+
const widgets = sourceIds.map(
|
|
98774
|
+
(id2) => editStore2.runtimeEntitiesManager.getAnyEditorWidgetMeta(id2)
|
|
98775
|
+
);
|
|
98776
|
+
if (!widgets.some(
|
|
98777
|
+
(widget) => (widget == null ? void 0 : widget.type) === "SbSection" || (widget == null ? void 0 : widget.type) === "SbColumn"
|
|
98778
|
+
)) {
|
|
98779
|
+
return true;
|
|
98780
|
+
}
|
|
98781
|
+
const sectionsToDelete = widgets.filter(
|
|
98782
|
+
(widget) => (widget == null ? void 0 : widget.type) === "SbSection"
|
|
98783
|
+
);
|
|
98784
|
+
const sectionInstanceIds = new Set(
|
|
98785
|
+
sectionsToDelete.filter((section) => section == null ? void 0 : section.instanceId).map((section) => section == null ? void 0 : section.instanceId)
|
|
98786
|
+
);
|
|
98787
|
+
const columnsToDelete = widgets.filter(
|
|
98788
|
+
(widget) => (widget == null ? void 0 : widget.type) === "SbColumn"
|
|
98789
|
+
);
|
|
98790
|
+
const columnInstanceIds = new Set(
|
|
98791
|
+
columnsToDelete.filter((column2) => column2 == null ? void 0 : column2.instanceId).map((column2) => column2 == null ? void 0 : column2.instanceId)
|
|
98792
|
+
);
|
|
98793
|
+
const isDeletingAllSections = sectionsToDelete.length >= 1 && sectionsToDelete.every((section) => {
|
|
98794
|
+
const parentId = section == null ? void 0 : section.parentInstanceId;
|
|
98795
|
+
if (!parentId) {
|
|
98796
|
+
return false;
|
|
98797
|
+
}
|
|
98798
|
+
const allParentChildren = editStore2.runtimeEntitiesManager.getEditorWidgetChildren(parentId);
|
|
98799
|
+
return allParentChildren.every(
|
|
98800
|
+
(child) => child.isSbComponent && sectionInstanceIds.has(child.value)
|
|
98801
|
+
);
|
|
98802
|
+
});
|
|
98803
|
+
if (isDeletingAllSections) {
|
|
98804
|
+
return false;
|
|
98805
|
+
}
|
|
98806
|
+
const isDeletingAllColumns = columnsToDelete.length >= 1 && columnsToDelete.every((column2) => {
|
|
98807
|
+
const parentId = column2 == null ? void 0 : column2.parentInstanceId;
|
|
98808
|
+
if (!parentId) {
|
|
98809
|
+
return false;
|
|
98810
|
+
}
|
|
98811
|
+
const allParentChildren = editStore2.runtimeEntitiesManager.getEditorWidgetChildren(parentId);
|
|
98812
|
+
return allParentChildren.every(
|
|
98813
|
+
(child) => child.isSbComponent && columnInstanceIds.has(child.value)
|
|
98814
|
+
);
|
|
98815
|
+
});
|
|
98816
|
+
return !isDeletingAllColumns;
|
|
98817
|
+
}
|
|
98758
98818
|
}
|
|
98759
98819
|
_init3 = __decoratorStart(null);
|
|
98760
98820
|
__decorateElement(_init3, 1, "executeOrAddToBatch", _executeOrAddToBatch_dec, OperationManager);
|
|
@@ -98777,7 +98837,9 @@ class PropertiesPanelManager {
|
|
|
98777
98837
|
__publicField(this, "_propertyLookupCache", /* @__PURE__ */ new Map());
|
|
98778
98838
|
this.runtimeEntitiesManager = runtimeEntitiesManager;
|
|
98779
98839
|
this.entityManager = entityManager;
|
|
98780
|
-
makeAutoObservable(this
|
|
98840
|
+
makeAutoObservable(this, {
|
|
98841
|
+
_propertyLookupCache: false
|
|
98842
|
+
});
|
|
98781
98843
|
registerStores({
|
|
98782
98844
|
PropertiesPanelManager: this
|
|
98783
98845
|
});
|
|
@@ -98823,32 +98885,7 @@ class PropertiesPanelManager {
|
|
|
98823
98885
|
getNonDynamicPropertiesPanels() {
|
|
98824
98886
|
return Object.fromEntries(this.nonDynamicPropertyPanels.entries());
|
|
98825
98887
|
}
|
|
98826
|
-
// TODO (alex): handle
|
|
98827
|
-
cachedPropertyLookupForType(widgetType) {
|
|
98828
|
-
if (this._propertyLookupCache.has(widgetType)) {
|
|
98829
|
-
return this._propertyLookupCache.get(widgetType);
|
|
98830
|
-
}
|
|
98831
|
-
const propsDefinition = this.getPropertiesDefinition(widgetType);
|
|
98832
|
-
if (!propsDefinition) {
|
|
98833
|
-
return null;
|
|
98834
|
-
}
|
|
98835
|
-
const lookup = {};
|
|
98836
|
-
for (const [_category, categoryDef] of Object.entries(propsDefinition)) {
|
|
98837
|
-
for (const propDef of Object.values(categoryDef.props)) {
|
|
98838
|
-
const propPath = propDef.path;
|
|
98839
|
-
lookup[propPath] = propDef;
|
|
98840
|
-
}
|
|
98841
|
-
}
|
|
98842
|
-
this._propertyLookupCache.set(widgetType, lookup);
|
|
98843
|
-
return lookup;
|
|
98844
|
-
}
|
|
98845
|
-
getPropertyForPath(widgetType, path2) {
|
|
98846
|
-
const lookup = this.cachedPropertyLookupForType(widgetType);
|
|
98847
|
-
if (!lookup) {
|
|
98848
|
-
return null;
|
|
98849
|
-
}
|
|
98850
|
-
return lookup[path2];
|
|
98851
|
-
}
|
|
98888
|
+
// TODO (alex): needs to handle returning updates for multiple widgets at a time
|
|
98852
98889
|
computeSideEffectsForPropertyUpdate(payload) {
|
|
98853
98890
|
const { sourceId, updates } = payload;
|
|
98854
98891
|
const allUpdates = {
|
|
@@ -98875,7 +98912,8 @@ class PropertiesPanelManager {
|
|
|
98875
98912
|
sourceId,
|
|
98876
98913
|
updates,
|
|
98877
98914
|
widgetMeta: widget,
|
|
98878
|
-
widgetState
|
|
98915
|
+
widgetState,
|
|
98916
|
+
propertiesDefinition: this.getPropertiesDefinition(widget.type) ?? {}
|
|
98879
98917
|
});
|
|
98880
98918
|
Object.keys(sideEffects).forEach((changeSourceId) => {
|
|
98881
98919
|
var _a2, _b2;
|
|
@@ -98900,6 +98938,34 @@ class PropertiesPanelManager {
|
|
|
98900
98938
|
}
|
|
98901
98939
|
return allUpdates;
|
|
98902
98940
|
}
|
|
98941
|
+
// TODO (alex): handle nested paths
|
|
98942
|
+
cachedPropertyLookupForType(widgetType) {
|
|
98943
|
+
if (this._propertyLookupCache.has(widgetType)) {
|
|
98944
|
+
return this._propertyLookupCache.get(widgetType);
|
|
98945
|
+
}
|
|
98946
|
+
const propsDefinition = this.getPropertiesDefinition(widgetType);
|
|
98947
|
+
if (!propsDefinition) {
|
|
98948
|
+
return null;
|
|
98949
|
+
}
|
|
98950
|
+
const lookup = {};
|
|
98951
|
+
for (const [_category, categoryDef] of Object.entries(propsDefinition)) {
|
|
98952
|
+
for (const propDef of Object.values(categoryDef.props)) {
|
|
98953
|
+
const propPath = propDef.path;
|
|
98954
|
+
if (!(propPath in lookup)) {
|
|
98955
|
+
lookup[propPath] = propDef;
|
|
98956
|
+
}
|
|
98957
|
+
}
|
|
98958
|
+
}
|
|
98959
|
+
this._propertyLookupCache.set(widgetType, lookup);
|
|
98960
|
+
return lookup;
|
|
98961
|
+
}
|
|
98962
|
+
getPropertyForPath(widgetType, path2) {
|
|
98963
|
+
const lookup = this.cachedPropertyLookupForType(widgetType);
|
|
98964
|
+
if (!lookup) {
|
|
98965
|
+
return null;
|
|
98966
|
+
}
|
|
98967
|
+
return lookup[path2];
|
|
98968
|
+
}
|
|
98903
98969
|
}
|
|
98904
98970
|
const makeMobxCachedGetter = (getter) => {
|
|
98905
98971
|
const cachedGetters = {};
|
|
@@ -98936,7 +99002,7 @@ function getPropertyValue$1({
|
|
|
98936
99002
|
} catch (e3) {
|
|
98937
99003
|
console.error("Error making template string", e3);
|
|
98938
99004
|
const entity = rootStore.entityManager.getEntity(scopeId, name);
|
|
98939
|
-
return entityKey ? entity[entityKey] ?? property.value : property.value;
|
|
99005
|
+
return entityKey && entity ? entity[entityKey] ?? property.value : property.value;
|
|
98940
99006
|
}
|
|
98941
99007
|
}
|
|
98942
99008
|
if (property.type === "COMPUTED" && typeof property.value === "string" && scopeId && name) {
|
|
@@ -98945,7 +99011,7 @@ function getPropertyValue$1({
|
|
|
98945
99011
|
} catch (e3) {
|
|
98946
99012
|
console.error("Error generating computed value", e3);
|
|
98947
99013
|
const entity = rootStore.entityManager.getEntity(scopeId, name);
|
|
98948
|
-
return entityKey ? entity[entityKey] ?? property.value : property.value;
|
|
99014
|
+
return entityKey && entity ? entity[entityKey] ?? property.value : property.value;
|
|
98949
99015
|
}
|
|
98950
99016
|
}
|
|
98951
99017
|
if (property.type === "EXPRESSION" && typeof property.value === "string") {
|
|
@@ -126938,6 +127004,40 @@ const propertiesDefinition$d = {
|
|
|
126938
127004
|
label: "Data type",
|
|
126939
127005
|
controlType: "DROP_DOWN",
|
|
126940
127006
|
options: INPUT_TYPE_OPTIONS
|
|
127007
|
+
}).onEdit(({ sourceId, updates, propertiesDefinition: propertiesDefinition2 }) => {
|
|
127008
|
+
const baseUpdate = {
|
|
127009
|
+
[sourceId]: {
|
|
127010
|
+
props: updates,
|
|
127011
|
+
meta: {}
|
|
127012
|
+
}
|
|
127013
|
+
};
|
|
127014
|
+
if (!isStaticPropertyInfo(updates.inputType)) {
|
|
127015
|
+
return baseUpdate;
|
|
127016
|
+
}
|
|
127017
|
+
const inputType = updates.inputType.value;
|
|
127018
|
+
const validRelationProps = /* @__PURE__ */ new Set();
|
|
127019
|
+
const invalidRelationProps = /* @__PURE__ */ new Set();
|
|
127020
|
+
for (const section of Object.values(propertiesDefinition2)) {
|
|
127021
|
+
for (const prop of Object.values(section.props)) {
|
|
127022
|
+
const inputTypeRelations = prop.getRelations().flatMap((relation) => relation).filter((relation) => relation.key === "inputType");
|
|
127023
|
+
if (inputTypeRelations.length === 0) {
|
|
127024
|
+
continue;
|
|
127025
|
+
}
|
|
127026
|
+
inputTypeRelations.forEach((relation) => {
|
|
127027
|
+
if (relation.value === inputType) {
|
|
127028
|
+
validRelationProps.add(prop.path);
|
|
127029
|
+
} else {
|
|
127030
|
+
invalidRelationProps.add(prop.path);
|
|
127031
|
+
}
|
|
127032
|
+
});
|
|
127033
|
+
}
|
|
127034
|
+
}
|
|
127035
|
+
invalidRelationProps.forEach((prop) => {
|
|
127036
|
+
if (!validRelationProps.has(prop)) {
|
|
127037
|
+
baseUpdate[sourceId].props[prop] = Property.Static("");
|
|
127038
|
+
}
|
|
127039
|
+
});
|
|
127040
|
+
return baseUpdate;
|
|
126941
127041
|
})
|
|
126942
127042
|
},
|
|
126943
127043
|
variants: [
|
|
@@ -144555,14 +144655,14 @@ function getLoaderFn(options) {
|
|
|
144555
144655
|
if (!(loader === "all")) return [3, 3];
|
|
144556
144656
|
return [4, import(
|
|
144557
144657
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
144558
|
-
"./allPathsLoader-
|
|
144658
|
+
"./allPathsLoader-Dpac_env.js"
|
|
144559
144659
|
)];
|
|
144560
144660
|
case 2:
|
|
144561
144661
|
return [2, _b2.sent().allPathsLoader];
|
|
144562
144662
|
case 3:
|
|
144563
144663
|
return [4, import(
|
|
144564
144664
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
144565
|
-
"./splitPathsBySizeLoader-
|
|
144665
|
+
"./splitPathsBySizeLoader-qHkbKq6Z.js"
|
|
144566
144666
|
)];
|
|
144567
144667
|
case 4:
|
|
144568
144668
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -196797,4 +196897,4 @@ export {
|
|
|
196797
196897
|
copyToClipboard as y,
|
|
196798
196898
|
navigateTo as z
|
|
196799
196899
|
};
|
|
196800
|
-
//# sourceMappingURL=index-
|
|
196900
|
+
//# sourceMappingURL=index-nH86EJN2.js.map
|