@platforma-sdk/model 1.58.5 → 1.58.11
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/_virtual/_rolldown/runtime.cjs +43 -0
- package/dist/_virtual/_rolldown/runtime.js +18 -0
- package/dist/annotations/converter.cjs +15 -20
- package/dist/annotations/converter.cjs.map +1 -1
- package/dist/annotations/converter.d.ts +6 -2
- package/dist/annotations/converter.js +14 -18
- package/dist/annotations/converter.js.map +1 -1
- package/dist/annotations/index.cjs +1 -0
- package/dist/annotations/index.d.ts +2 -3
- package/dist/annotations/index.js +1 -0
- package/dist/annotations/types.d.ts +21 -16
- package/dist/bconfig/index.cjs +2 -0
- package/dist/bconfig/index.d.ts +5 -6
- package/dist/bconfig/index.js +2 -0
- package/dist/bconfig/lambdas.d.ts +52 -52
- package/dist/bconfig/normalization.cjs +13 -18
- package/dist/bconfig/normalization.cjs.map +1 -1
- package/dist/bconfig/normalization.d.ts +10 -6
- package/dist/bconfig/normalization.js +12 -16
- package/dist/bconfig/normalization.js.map +1 -1
- package/dist/bconfig/types.cjs +4 -3
- package/dist/bconfig/types.cjs.map +1 -1
- package/dist/bconfig/types.d.ts +10 -5
- package/dist/bconfig/types.js +4 -2
- package/dist/bconfig/types.js.map +1 -1
- package/dist/bconfig/util.d.ts +7 -4
- package/dist/bconfig/v3.d.ts +10 -6
- package/dist/block_api_v1.d.ts +62 -58
- package/dist/block_api_v2.d.ts +51 -47
- package/dist/block_api_v3.d.ts +33 -29
- package/dist/block_migrations.cjs +481 -413
- package/dist/block_migrations.cjs.map +1 -1
- package/dist/block_migrations.d.ts +258 -204
- package/dist/block_migrations.js +482 -408
- package/dist/block_migrations.js.map +1 -1
- package/dist/block_model.cjs +312 -343
- package/dist/block_model.cjs.map +1 -1
- package/dist/block_model.d.ts +143 -147
- package/dist/block_model.js +312 -341
- package/dist/block_model.js.map +1 -1
- package/dist/block_model_legacy.cjs +231 -255
- package/dist/block_model_legacy.cjs.map +1 -1
- package/dist/block_model_legacy.d.ts +108 -106
- package/dist/block_model_legacy.js +231 -253
- package/dist/block_model_legacy.js.map +1 -1
- package/dist/block_state_patch.d.ts +10 -10
- package/dist/block_state_util.cjs +15 -19
- package/dist/block_state_util.cjs.map +1 -1
- package/dist/block_state_util.d.ts +14 -13
- package/dist/block_state_util.js +15 -18
- package/dist/block_state_util.js.map +1 -1
- package/dist/block_storage.cjs +233 -238
- package/dist/block_storage.cjs.map +1 -1
- package/dist/block_storage.d.ts +62 -78
- package/dist/block_storage.js +234 -237
- package/dist/block_storage.js.map +1 -1
- package/dist/block_storage_callbacks.cjs +156 -195
- package/dist/block_storage_callbacks.cjs.map +1 -1
- package/dist/block_storage_callbacks.js +156 -192
- package/dist/block_storage_callbacks.js.map +1 -1
- package/dist/block_storage_facade.cjs +29 -85
- package/dist/block_storage_facade.cjs.map +1 -1
- package/dist/block_storage_facade.d.ts +83 -126
- package/dist/block_storage_facade.js +29 -83
- package/dist/block_storage_facade.js.map +1 -1
- package/dist/components/PFrameForGraphs.cjs +26 -24
- package/dist/components/PFrameForGraphs.cjs.map +1 -1
- package/dist/components/PFrameForGraphs.d.ts +12 -7
- package/dist/components/PFrameForGraphs.js +25 -22
- package/dist/components/PFrameForGraphs.js.map +1 -1
- package/dist/components/PlAnnotations/filter.d.ts +62 -79
- package/dist/components/PlAnnotations/filters_ui.cjs +135 -171
- package/dist/components/PlAnnotations/filters_ui.cjs.map +1 -1
- package/dist/components/PlAnnotations/filters_ui.d.ts +48 -46
- package/dist/components/PlAnnotations/filters_ui.js +135 -170
- package/dist/components/PlAnnotations/filters_ui.js.map +1 -1
- package/dist/components/PlAnnotations/index.d.ts +2 -3
- package/dist/components/PlDataTable/index.cjs +2 -0
- package/dist/components/PlDataTable/index.d.ts +3 -5
- package/dist/components/PlDataTable/index.js +2 -0
- package/dist/components/PlDataTable/labels.cjs +59 -81
- package/dist/components/PlDataTable/labels.cjs.map +1 -1
- package/dist/components/PlDataTable/labels.js +58 -79
- package/dist/components/PlDataTable/labels.js.map +1 -1
- package/dist/components/PlDataTable/state-migration.cjs +186 -144
- package/dist/components/PlDataTable/state-migration.cjs.map +1 -1
- package/dist/components/PlDataTable/state-migration.d.ts +85 -82
- package/dist/components/PlDataTable/state-migration.js +185 -142
- package/dist/components/PlDataTable/state-migration.js.map +1 -1
- package/dist/components/PlDataTable/table.cjs +172 -194
- package/dist/components/PlDataTable/table.cjs.map +1 -1
- package/dist/components/PlDataTable/table.d.ts +16 -12
- package/dist/components/PlDataTable/table.js +171 -192
- package/dist/components/PlDataTable/table.js.map +1 -1
- package/dist/components/PlDataTable/v4.d.ts +84 -119
- package/dist/components/PlDataTable/v5.d.ts +80 -103
- package/dist/components/PlMultiSequenceAlignment.cjs +27 -29
- package/dist/components/PlMultiSequenceAlignment.cjs.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts +36 -27
- package/dist/components/PlMultiSequenceAlignment.js +26 -27
- package/dist/components/PlMultiSequenceAlignment.js.map +1 -1
- package/dist/components/PlSelectionModel.cjs +7 -6
- package/dist/components/PlSelectionModel.cjs.map +1 -1
- package/dist/components/PlSelectionModel.d.ts +10 -8
- package/dist/components/PlSelectionModel.js +7 -5
- package/dist/components/PlSelectionModel.js.map +1 -1
- package/dist/components/index.cjs +8 -0
- package/dist/components/index.d.ts +11 -6
- package/dist/components/index.js +8 -0
- package/dist/config/actions.cjs +138 -171
- package/dist/config/actions.cjs.map +1 -1
- package/dist/config/actions.d.ts +47 -47
- package/dist/config/actions.js +146 -178
- package/dist/config/actions.js.map +1 -1
- package/dist/config/actions_kinds.d.ts +114 -121
- package/dist/config/index.cjs +1 -0
- package/dist/config/index.d.ts +6 -7
- package/dist/config/index.js +1 -0
- package/dist/config/model.d.ts +131 -127
- package/dist/config/model_meta.d.ts +4 -1
- package/dist/config/type_engine.d.ts +22 -21
- package/dist/config/type_util.d.ts +12 -10
- package/dist/env_value.cjs +5 -6
- package/dist/env_value.cjs.map +1 -1
- package/dist/env_value.d.ts +4 -1
- package/dist/env_value.js +5 -5
- package/dist/env_value.js.map +1 -1
- package/dist/filters/converters/filterToQuery.cjs +273 -239
- package/dist/filters/converters/filterToQuery.cjs.map +1 -1
- package/dist/filters/converters/filterToQuery.d.ts +6 -2
- package/dist/filters/converters/filterToQuery.js +272 -237
- package/dist/filters/converters/filterToQuery.js.map +1 -1
- package/dist/filters/converters/filterUiToExpressionImpl.cjs +56 -85
- package/dist/filters/converters/filterUiToExpressionImpl.cjs.map +1 -1
- package/dist/filters/converters/filterUiToExpressionImpl.d.ts +8 -4
- package/dist/filters/converters/filterUiToExpressionImpl.js +55 -83
- package/dist/filters/converters/filterUiToExpressionImpl.js.map +1 -1
- package/dist/filters/converters/index.cjs +2 -0
- package/dist/filters/converters/index.d.ts +2 -3
- package/dist/filters/converters/index.js +2 -0
- package/dist/filters/distill.cjs +59 -60
- package/dist/filters/distill.cjs.map +1 -1
- package/dist/filters/distill.d.ts +6 -3
- package/dist/filters/distill.js +58 -58
- package/dist/filters/distill.js.map +1 -1
- package/dist/filters/index.cjs +4 -0
- package/dist/filters/index.d.ts +5 -4
- package/dist/filters/index.js +4 -0
- package/dist/filters/traverse.cjs +31 -40
- package/dist/filters/traverse.cjs.map +1 -1
- package/dist/filters/traverse.js +31 -39
- package/dist/filters/traverse.js.map +1 -1
- package/dist/filters/types.d.ts +10 -7
- package/dist/index.cjs +193 -187
- package/dist/index.d.ts +61 -28
- package/dist/index.js +49 -41
- package/dist/internal.cjs +48 -62
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +49 -60
- package/dist/internal.js.map +1 -1
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.js +6 -0
- package/dist/package.js.map +1 -0
- package/dist/pframe.cjs +32 -37
- package/dist/pframe.cjs.map +1 -1
- package/dist/pframe.d.ts +14 -10
- package/dist/pframe.js +32 -35
- package/dist/pframe.js.map +1 -1
- package/dist/pframe_utils/axes.cjs +81 -114
- package/dist/pframe_utils/axes.cjs.map +1 -1
- package/dist/pframe_utils/axes.d.ts +10 -13
- package/dist/pframe_utils/axes.js +80 -112
- package/dist/pframe_utils/axes.js.map +1 -1
- package/dist/pframe_utils/columns.cjs +61 -81
- package/dist/pframe_utils/columns.cjs.map +1 -1
- package/dist/pframe_utils/columns.d.ts +15 -6
- package/dist/pframe_utils/columns.js +60 -79
- package/dist/pframe_utils/columns.js.map +1 -1
- package/dist/pframe_utils/index.cjs +232 -253
- package/dist/pframe_utils/index.cjs.map +1 -1
- package/dist/pframe_utils/index.d.ts +39 -35
- package/dist/pframe_utils/index.js +231 -251
- package/dist/pframe_utils/index.js.map +1 -1
- package/dist/platforma.d.ts +48 -46
- package/dist/plugin_handle.cjs +6 -14
- package/dist/plugin_handle.cjs.map +1 -1
- package/dist/plugin_handle.d.ts +20 -25
- package/dist/plugin_handle.js +6 -13
- package/dist/plugin_handle.js.map +1 -1
- package/dist/plugin_model.cjs +364 -163
- package/dist/plugin_model.cjs.map +1 -1
- package/dist/plugin_model.d.ts +280 -129
- package/dist/plugin_model.js +362 -163
- package/dist/plugin_model.js.map +1 -1
- package/dist/raw_globals.cjs +10 -22
- package/dist/raw_globals.cjs.map +1 -1
- package/dist/raw_globals.d.ts +8 -5
- package/dist/raw_globals.js +10 -20
- package/dist/raw_globals.js.map +1 -1
- package/dist/ref_util.cjs +14 -13
- package/dist/ref_util.cjs.map +1 -1
- package/dist/ref_util.d.ts +18 -12
- package/dist/ref_util.js +14 -11
- package/dist/ref_util.js.map +1 -1
- package/dist/render/accessor.cjs +213 -226
- package/dist/render/accessor.cjs.map +1 -1
- package/dist/render/accessor.d.ts +115 -120
- package/dist/render/accessor.js +212 -224
- package/dist/render/accessor.js.map +1 -1
- package/dist/render/api.cjs +478 -580
- package/dist/render/api.cjs.map +1 -1
- package/dist/render/api.d.ts +207 -209
- package/dist/render/api.js +476 -578
- package/dist/render/api.js.map +1 -1
- package/dist/render/future.cjs +28 -32
- package/dist/render/future.cjs.map +1 -1
- package/dist/render/future.d.ts +15 -11
- package/dist/render/future.js +28 -30
- package/dist/render/future.js.map +1 -1
- package/dist/render/index.cjs +8 -0
- package/dist/render/index.d.ts +10 -8
- package/dist/render/index.js +8 -0
- package/dist/render/internal.cjs +33 -29
- package/dist/render/internal.cjs.map +1 -1
- package/dist/render/internal.d.ts +78 -72
- package/dist/render/internal.js +29 -26
- package/dist/render/internal.js.map +1 -1
- package/dist/render/traversal_ops.d.ts +42 -43
- package/dist/render/util/axis_filtering.cjs +63 -86
- package/dist/render/util/axis_filtering.cjs.map +1 -1
- package/dist/render/util/axis_filtering.d.ts +10 -7
- package/dist/render/util/axis_filtering.js +63 -85
- package/dist/render/util/axis_filtering.js.map +1 -1
- package/dist/render/util/column_collection.cjs +266 -321
- package/dist/render/util/column_collection.cjs.map +1 -1
- package/dist/render/util/column_collection.d.ts +47 -47
- package/dist/render/util/column_collection.js +264 -319
- package/dist/render/util/column_collection.js.map +1 -1
- package/dist/render/util/index.cjs +4 -0
- package/dist/render/util/index.d.ts +4 -5
- package/dist/render/util/index.js +4 -0
- package/dist/render/util/label.cjs +129 -163
- package/dist/render/util/label.cjs.map +1 -1
- package/dist/render/util/label.d.ts +45 -46
- package/dist/render/util/label.js +128 -161
- package/dist/render/util/label.js.map +1 -1
- package/dist/render/util/pcolumn_data.cjs +315 -375
- package/dist/render/util/pcolumn_data.cjs.map +1 -1
- package/dist/render/util/pcolumn_data.d.ts +33 -32
- package/dist/render/util/pcolumn_data.js +314 -373
- package/dist/render/util/pcolumn_data.js.map +1 -1
- package/dist/render/util/pframe_upgraders.cjs +37 -42
- package/dist/render/util/pframe_upgraders.cjs.map +1 -1
- package/dist/render/util/pframe_upgraders.js +37 -41
- package/dist/render/util/pframe_upgraders.js.map +1 -1
- package/dist/render/util/split_selectors.d.ts +13 -9
- package/dist/version.cjs +6 -8
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.ts +7 -4
- package/dist/version.js +5 -5
- package/dist/version.js.map +1 -1
- package/package.json +15 -9
- package/src/block_migrations.test.ts +184 -14
- package/src/block_migrations.ts +185 -30
- package/src/block_model.ts +111 -66
- package/src/block_storage.test.ts +147 -3
- package/src/block_storage.ts +43 -8
- package/src/block_storage_callbacks.ts +9 -4
- package/src/env_value.ts +0 -2
- package/src/index.ts +12 -11
- package/src/internal.ts +0 -1
- package/src/platforma.ts +4 -4
- package/src/plugin_handle.ts +1 -1
- package/src/plugin_model.test.ts +217 -21
- package/src/plugin_model.ts +450 -55
- package/src/raw_globals.ts +0 -1
- package/dist/annotations/converter.d.ts.map +0 -1
- package/dist/annotations/index.d.ts.map +0 -1
- package/dist/annotations/types.d.ts.map +0 -1
- package/dist/bconfig/index.d.ts.map +0 -1
- package/dist/bconfig/lambdas.d.ts.map +0 -1
- package/dist/bconfig/normalization.d.ts.map +0 -1
- package/dist/bconfig/types.d.ts.map +0 -1
- package/dist/bconfig/util.d.ts.map +0 -1
- package/dist/bconfig/v3.d.ts.map +0 -1
- package/dist/block_api_v1.d.ts.map +0 -1
- package/dist/block_api_v2.d.ts.map +0 -1
- package/dist/block_api_v3.d.ts.map +0 -1
- package/dist/block_migrations.d.ts.map +0 -1
- package/dist/block_model.d.ts.map +0 -1
- package/dist/block_model_legacy.d.ts.map +0 -1
- package/dist/block_state_patch.d.ts.map +0 -1
- package/dist/block_state_util.d.ts.map +0 -1
- package/dist/block_storage.d.ts.map +0 -1
- package/dist/block_storage_callbacks.d.ts +0 -115
- package/dist/block_storage_callbacks.d.ts.map +0 -1
- package/dist/block_storage_facade.d.ts.map +0 -1
- package/dist/components/PFrameForGraphs.d.ts.map +0 -1
- package/dist/components/PlAnnotations/filter.d.ts.map +0 -1
- package/dist/components/PlAnnotations/filters_ui.d.ts.map +0 -1
- package/dist/components/PlAnnotations/index.d.ts.map +0 -1
- package/dist/components/PlAnnotations/types.d.ts +0 -3
- package/dist/components/PlAnnotations/types.d.ts.map +0 -1
- package/dist/components/PlDataTable/index.d.ts.map +0 -1
- package/dist/components/PlDataTable/labels.d.ts +0 -7
- package/dist/components/PlDataTable/labels.d.ts.map +0 -1
- package/dist/components/PlDataTable/state-migration.d.ts.map +0 -1
- package/dist/components/PlDataTable/table.d.ts.map +0 -1
- package/dist/components/PlDataTable/v4.d.ts.map +0 -1
- package/dist/components/PlDataTable/v5.d.ts.map +0 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts.map +0 -1
- package/dist/components/PlSelectionModel.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/config/actions.d.ts.map +0 -1
- package/dist/config/actions_kinds.d.ts.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/model.d.ts.map +0 -1
- package/dist/config/model_meta.d.ts.map +0 -1
- package/dist/config/type_engine.d.ts.map +0 -1
- package/dist/config/type_util.d.ts.map +0 -1
- package/dist/env_value.d.ts.map +0 -1
- package/dist/filters/converters/filterToQuery.d.ts.map +0 -1
- package/dist/filters/converters/filterUiToExpressionImpl.d.ts.map +0 -1
- package/dist/filters/converters/index.d.ts.map +0 -1
- package/dist/filters/distill.d.ts.map +0 -1
- package/dist/filters/index.d.ts.map +0 -1
- package/dist/filters/traverse.d.ts +0 -27
- package/dist/filters/traverse.d.ts.map +0 -1
- package/dist/filters/types.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal.d.ts +0 -36
- package/dist/internal.d.ts.map +0 -1
- package/dist/package.json.cjs +0 -6
- package/dist/package.json.cjs.map +0 -1
- package/dist/package.json.js +0 -4
- package/dist/package.json.js.map +0 -1
- package/dist/pframe.d.ts.map +0 -1
- package/dist/pframe_utils/axes.d.ts.map +0 -1
- package/dist/pframe_utils/columns.d.ts.map +0 -1
- package/dist/pframe_utils/index.d.ts.map +0 -1
- package/dist/pframe_utils/querySpec.d.ts +0 -2
- package/dist/pframe_utils/querySpec.d.ts.map +0 -1
- package/dist/platforma.d.ts.map +0 -1
- package/dist/plugin_handle.d.ts.map +0 -1
- package/dist/plugin_model.d.ts.map +0 -1
- package/dist/raw_globals.d.ts.map +0 -1
- package/dist/ref_util.d.ts.map +0 -1
- package/dist/render/accessor.d.ts.map +0 -1
- package/dist/render/api.d.ts.map +0 -1
- package/dist/render/future.d.ts.map +0 -1
- package/dist/render/index.d.ts.map +0 -1
- package/dist/render/internal.d.ts.map +0 -1
- package/dist/render/traversal_ops.d.ts.map +0 -1
- package/dist/render/util/axis_filtering.d.ts.map +0 -1
- package/dist/render/util/column_collection.d.ts.map +0 -1
- package/dist/render/util/index.d.ts.map +0 -1
- package/dist/render/util/label.d.ts.map +0 -1
- package/dist/render/util/pcolumn_data.d.ts.map +0 -1
- package/dist/render/util/pframe_upgraders.d.ts +0 -3
- package/dist/render/util/pframe_upgraders.d.ts.map +0 -1
- package/dist/render/util/split_selectors.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __exportAll = (all, no_symbols) => {
|
|
9
|
+
let target = {};
|
|
10
|
+
for (var name in all) {
|
|
11
|
+
__defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
if (!no_symbols) {
|
|
17
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __copyProps = (to, from, except, desc) => {
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
24
|
+
key = keys[i];
|
|
25
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
26
|
+
__defProp(to, key, {
|
|
27
|
+
get: ((k) => from[k]).bind(null, key),
|
|
28
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
36
|
+
value: mod,
|
|
37
|
+
enumerable: true
|
|
38
|
+
}) : target, mod));
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
|
|
42
|
+
exports.__exportAll = __exportAll;
|
|
43
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) {
|
|
6
|
+
__defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!no_symbols) {
|
|
12
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { __exportAll };
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var distill = require('../filters/distill.cjs');
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_filterUiToExpressionImpl = require('../filters/converters/filterUiToExpressionImpl.cjs');
|
|
3
|
+
const require_distill = require('../filters/distill.cjs');
|
|
4
|
+
let _milaboratories_ptabler_expression_js = require("@milaboratories/ptabler-expression-js");
|
|
6
5
|
|
|
6
|
+
//#region src/annotations/converter.ts
|
|
7
7
|
function convertFilterSpecsToExpressionSpecs(annotationsUI) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
name: step.label.trim(),
|
|
17
|
-
value: ptablerExpressionJs.when(filterUiToExpressionImpl.convertFilterUiToExpressionImpl(step.filter))
|
|
18
|
-
.then(true)
|
|
19
|
-
.otherwise(false)
|
|
20
|
-
.toJSON(),
|
|
21
|
-
}));
|
|
8
|
+
return annotationsUI.map((step) => ({
|
|
9
|
+
label: step.label,
|
|
10
|
+
filter: require_distill.distillFilterSpec(step.filter)
|
|
11
|
+
})).filter((step) => step.filter !== null).map((step) => ({
|
|
12
|
+
type: "alias",
|
|
13
|
+
name: step.label.trim(),
|
|
14
|
+
value: (0, _milaboratories_ptabler_expression_js.when)(require_filterUiToExpressionImpl.convertFilterUiToExpressionImpl(step.filter)).then(true).otherwise(false).toJSON()
|
|
15
|
+
}));
|
|
22
16
|
}
|
|
23
17
|
|
|
18
|
+
//#endregion
|
|
24
19
|
exports.convertFilterSpecsToExpressionSpecs = convertFilterSpecsToExpressionSpecs;
|
|
25
|
-
//# sourceMappingURL=converter.cjs.map
|
|
20
|
+
//# sourceMappingURL=converter.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.cjs","sources":["../../src/annotations/converter.ts"],"sourcesContent":["import { when } from \"@milaboratories/ptabler-expression-js\";\nimport { convertFilterUiToExpressionImpl } from \"../filters/converters/filterUiToExpressionImpl\";\nimport type { ExpressionSpec, FilterSpecUi } from \"./types\";\nimport { distillFilterSpec } from \"../filters/distill\";\n\nexport function convertFilterSpecsToExpressionSpecs(\n annotationsUI: FilterSpecUi[],\n): ExpressionSpec[] {\n const validAnnotationsUI = annotationsUI\n .map((step) => ({\n label: step.label,\n filter: distillFilterSpec(step.filter),\n }))\n .filter(\n (step): step is { label: string; filter: NonNullable<typeof step.filter> } =>\n step.filter !== null,\n );\n\n return validAnnotationsUI.map(\n (step): ExpressionSpec => ({\n type: \"alias\",\n name: step.label.trim(),\n value: when(convertFilterUiToExpressionImpl(step.filter))\n .then(true)\n .otherwise(false)\n .toJSON(),\n }),\n );\n}\n"],"
|
|
1
|
+
{"version":3,"file":"converter.cjs","names":["distillFilterSpec","convertFilterUiToExpressionImpl"],"sources":["../../src/annotations/converter.ts"],"sourcesContent":["import { when } from \"@milaboratories/ptabler-expression-js\";\nimport { convertFilterUiToExpressionImpl } from \"../filters/converters/filterUiToExpressionImpl\";\nimport type { ExpressionSpec, FilterSpecUi } from \"./types\";\nimport { distillFilterSpec } from \"../filters/distill\";\n\nexport function convertFilterSpecsToExpressionSpecs(\n annotationsUI: FilterSpecUi[],\n): ExpressionSpec[] {\n const validAnnotationsUI = annotationsUI\n .map((step) => ({\n label: step.label,\n filter: distillFilterSpec(step.filter),\n }))\n .filter(\n (step): step is { label: string; filter: NonNullable<typeof step.filter> } =>\n step.filter !== null,\n );\n\n return validAnnotationsUI.map(\n (step): ExpressionSpec => ({\n type: \"alias\",\n name: step.label.trim(),\n value: when(convertFilterUiToExpressionImpl(step.filter))\n .then(true)\n .otherwise(false)\n .toJSON(),\n }),\n );\n}\n"],"mappings":";;;;;;AAKA,SAAgB,oCACd,eACkB;AAWlB,QAV2B,cACxB,KAAK,UAAU;EACd,OAAO,KAAK;EACZ,QAAQA,kCAAkB,KAAK,OAAO;EACvC,EAAE,CACF,QACE,SACC,KAAK,WAAW,KACnB,CAEuB,KACvB,UAA0B;EACzB,MAAM;EACN,MAAM,KAAK,MAAM,MAAM;EACvB,uDAAYC,iEAAgC,KAAK,OAAO,CAAC,CACtD,KAAK,KAAK,CACV,UAAU,MAAM,CAChB,QAAQ;EACZ,EACF"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ExpressionSpec, FilterSpecUi } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/annotations/converter.d.ts
|
|
4
|
+
declare function convertFilterSpecsToExpressionSpecs(annotationsUI: FilterSpecUi[]): ExpressionSpec[];
|
|
5
|
+
//#endregion
|
|
6
|
+
export { convertFilterSpecsToExpressionSpecs };
|
|
3
7
|
//# sourceMappingURL=converter.d.ts.map
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { convertFilterUiToExpressionImpl } from "../filters/converters/filterUiToExpressionImpl.js";
|
|
2
|
+
import { distillFilterSpec } from "../filters/distill.js";
|
|
3
|
+
import { when } from "@milaboratories/ptabler-expression-js";
|
|
4
4
|
|
|
5
|
+
//#region src/annotations/converter.ts
|
|
5
6
|
function convertFilterSpecsToExpressionSpecs(annotationsUI) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
name: step.label.trim(),
|
|
15
|
-
value: when(convertFilterUiToExpressionImpl(step.filter))
|
|
16
|
-
.then(true)
|
|
17
|
-
.otherwise(false)
|
|
18
|
-
.toJSON(),
|
|
19
|
-
}));
|
|
7
|
+
return annotationsUI.map((step) => ({
|
|
8
|
+
label: step.label,
|
|
9
|
+
filter: distillFilterSpec(step.filter)
|
|
10
|
+
})).filter((step) => step.filter !== null).map((step) => ({
|
|
11
|
+
type: "alias",
|
|
12
|
+
name: step.label.trim(),
|
|
13
|
+
value: when(convertFilterUiToExpressionImpl(step.filter)).then(true).otherwise(false).toJSON()
|
|
14
|
+
}));
|
|
20
15
|
}
|
|
21
16
|
|
|
17
|
+
//#endregion
|
|
22
18
|
export { convertFilterSpecsToExpressionSpecs };
|
|
23
|
-
//# sourceMappingURL=converter.js.map
|
|
19
|
+
//# sourceMappingURL=converter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","sources":["../../src/annotations/converter.ts"],"sourcesContent":["import { when } from \"@milaboratories/ptabler-expression-js\";\nimport { convertFilterUiToExpressionImpl } from \"../filters/converters/filterUiToExpressionImpl\";\nimport type { ExpressionSpec, FilterSpecUi } from \"./types\";\nimport { distillFilterSpec } from \"../filters/distill\";\n\nexport function convertFilterSpecsToExpressionSpecs(\n annotationsUI: FilterSpecUi[],\n): ExpressionSpec[] {\n const validAnnotationsUI = annotationsUI\n .map((step) => ({\n label: step.label,\n filter: distillFilterSpec(step.filter),\n }))\n .filter(\n (step): step is { label: string; filter: NonNullable<typeof step.filter> } =>\n step.filter !== null,\n );\n\n return validAnnotationsUI.map(\n (step): ExpressionSpec => ({\n type: \"alias\",\n name: step.label.trim(),\n value: when(convertFilterUiToExpressionImpl(step.filter))\n .then(true)\n .otherwise(false)\n .toJSON(),\n }),\n );\n}\n"],"
|
|
1
|
+
{"version":3,"file":"converter.js","names":[],"sources":["../../src/annotations/converter.ts"],"sourcesContent":["import { when } from \"@milaboratories/ptabler-expression-js\";\nimport { convertFilterUiToExpressionImpl } from \"../filters/converters/filterUiToExpressionImpl\";\nimport type { ExpressionSpec, FilterSpecUi } from \"./types\";\nimport { distillFilterSpec } from \"../filters/distill\";\n\nexport function convertFilterSpecsToExpressionSpecs(\n annotationsUI: FilterSpecUi[],\n): ExpressionSpec[] {\n const validAnnotationsUI = annotationsUI\n .map((step) => ({\n label: step.label,\n filter: distillFilterSpec(step.filter),\n }))\n .filter(\n (step): step is { label: string; filter: NonNullable<typeof step.filter> } =>\n step.filter !== null,\n );\n\n return validAnnotationsUI.map(\n (step): ExpressionSpec => ({\n type: \"alias\",\n name: step.label.trim(),\n value: when(convertFilterUiToExpressionImpl(step.filter))\n .then(true)\n .otherwise(false)\n .toJSON(),\n }),\n );\n}\n"],"mappings":";;;;;AAKA,SAAgB,oCACd,eACkB;AAWlB,QAV2B,cACxB,KAAK,UAAU;EACd,OAAO,KAAK;EACZ,QAAQ,kBAAkB,KAAK,OAAO;EACvC,EAAE,CACF,QACE,SACC,KAAK,WAAW,KACnB,CAEuB,KACvB,UAA0B;EACzB,MAAM;EACN,MAAM,KAAK,MAAM,MAAM;EACvB,OAAO,KAAK,gCAAgC,KAAK,OAAO,CAAC,CACtD,KAAK,KAAK,CACV,UAAU,MAAM,CAChB,QAAQ;EACZ,EACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const require_converter = require('./converter.cjs');
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { AnnotationSpec, AnnotationSpecUi, ExpressionSpec, FilterSpecUi } from "./types.js";
|
|
2
|
+
import { convertFilterSpecsToExpressionSpecs } from "./converter.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { convertFilterSpecsToExpressionSpecs } from "./converter.js";
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { FilterSpec } from "../filters/types.js";
|
|
2
|
+
import "../filters/index.js";
|
|
3
|
+
import { Expression } from "@milaboratories/ptabler-expression-js";
|
|
4
|
+
|
|
5
|
+
//#region src/annotations/types.d.ts
|
|
6
|
+
type AnnotationSpec<T extends ExpressionSpec = ExpressionSpec> = {
|
|
7
|
+
title: string;
|
|
8
|
+
steps: T[];
|
|
6
9
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
type ExpressionSpec<T extends Expression = Expression> = {
|
|
11
|
+
type: "alias";
|
|
12
|
+
name: string;
|
|
13
|
+
value: T;
|
|
11
14
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
type AnnotationSpecUi<T extends FilterSpecUi = FilterSpecUi> = {
|
|
16
|
+
title: string;
|
|
17
|
+
steps: T[];
|
|
15
18
|
};
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
type FilterSpecUi<T extends FilterSpec = Extract<FilterSpec, {
|
|
20
|
+
type: "and" | "or";
|
|
18
21
|
}>> = {
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
label: string;
|
|
23
|
+
filter: T;
|
|
21
24
|
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { AnnotationSpec, AnnotationSpecUi, ExpressionSpec, FilterSpecUi };
|
|
22
27
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/bconfig/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { TypedConfigOrConfigLambda, TypedConfigOrString, isConfigLambda } from "./types.js";
|
|
2
|
+
import { ConfigRenderLambda, ConfigRenderLambdaFlags, ExtractFunctionHandleReturn, InferOutputType, InferOutputsFromConfigs, InferOutputsFromLambdas, ResolveCfgType, StdCtx, StdCtxArgsOnly } from "./lambdas.js";
|
|
3
|
+
import { BlockConfig, BlockConfigV3, BlockConfigV4 } from "./v3.js";
|
|
4
|
+
import { downgradeCfgOrLambda, extractConfig } from "./normalization.js";
|
|
5
|
+
import { DeriveHref } from "./util.js";
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { ConfigResult, PlResourceEntry, TypedConfig } from "../config/type_engine.js";
|
|
2
|
+
import "../config/index.js";
|
|
3
|
+
import { TypedConfigOrConfigLambda } from "./types.js";
|
|
4
|
+
import { OutputWithStatus } from "@milaboratories/pl-model-common";
|
|
5
|
+
|
|
6
|
+
//#region src/bconfig/lambdas.d.ts
|
|
7
|
+
type StdCtxArgsOnly<Args, Data = undefined> = {
|
|
8
|
+
readonly $blockId: string;
|
|
9
|
+
readonly $args: Args; /** @deprecated Use $data instead. Kept for V1/V2 block compatibility. */
|
|
10
|
+
readonly $ui: Data;
|
|
11
|
+
readonly $data: Data;
|
|
10
12
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
type StdCtx<Args, Data = undefined> = StdCtxArgsOnly<Args, Data> & {
|
|
14
|
+
readonly $prod: PlResourceEntry;
|
|
15
|
+
readonly $staging: PlResourceEntry;
|
|
14
16
|
};
|
|
15
|
-
|
|
17
|
+
type ResolveCfgType<Cfg extends TypedConfig, Args, UiState = undefined> = ConfigResult<Cfg, StdCtx<Args, UiState>>;
|
|
16
18
|
/** Additional information that may alter lambda rendering procedure. */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
type ConfigRenderLambdaFlags = {
|
|
20
|
+
/**
|
|
21
|
+
* Tells the system that corresponding computable should be created with StableOnlyRetentive rendering mode.
|
|
22
|
+
* This flag can be overridden by the system.
|
|
23
|
+
* */
|
|
24
|
+
retentive?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Tells the system that resulting computable has important side-effects, thus it's rendering is required even
|
|
27
|
+
* nobody is actively monitoring rendered values. Like file upload progress, that triggers upload itself.
|
|
28
|
+
* */
|
|
29
|
+
isActive?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* If true, result will be wrapped with additional status information,
|
|
32
|
+
* such as stability status and explicit error
|
|
33
|
+
*/
|
|
34
|
+
withStatus?: boolean;
|
|
33
35
|
};
|
|
34
36
|
/** Creates branded Cfg type */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
interface ConfigRenderLambda<Return = unknown> extends ConfigRenderLambdaFlags {
|
|
38
|
+
/** Type marker */
|
|
39
|
+
__renderLambda: true;
|
|
40
|
+
/** Phantom property for type inference. Never set at runtime. */
|
|
41
|
+
__phantomReturn?: Return;
|
|
42
|
+
/** Reference to a callback registered inside the model code. */
|
|
43
|
+
handle: string;
|
|
42
44
|
}
|
|
43
|
-
|
|
45
|
+
type ExtractFunctionHandleReturn<Func extends ConfigRenderLambda> = Func extends ConfigRenderLambda<infer Return> ? Return : never;
|
|
44
46
|
/** Infers the output type from a TypedConfig or ConfigRenderLambda */
|
|
45
|
-
|
|
47
|
+
type InferOutputType<CfgOrFH, Args, UiState> = CfgOrFH extends TypedConfig ? ResolveCfgType<CfgOrFH, Args, UiState> : CfgOrFH extends ConfigRenderLambda ? ExtractFunctionHandleReturn<CfgOrFH> : never;
|
|
46
48
|
/** Maps outputs configuration to inferred output types with status wrapper */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
};
|
|
49
|
+
type InferOutputsFromConfigs<Args, OutputsCfg extends Record<string, TypedConfigOrConfigLambda>, UiState> = { [Key in keyof OutputsCfg]: OutputWithStatus<InferOutputType<OutputsCfg[Key], Args, UiState>> & {
|
|
50
|
+
__unwrap: OutputsCfg[Key] extends {
|
|
51
|
+
withStatus: true;
|
|
52
|
+
} ? false : true;
|
|
53
|
+
} };
|
|
54
54
|
/** Maps lambda-only outputs configuration to inferred output types (for V3 blocks) */
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
55
|
+
type InferOutputsFromLambdas<OutputsCfg extends Record<string, ConfigRenderLambda>> = { [Key in keyof OutputsCfg]: OutputWithStatus<ExtractFunctionHandleReturn<OutputsCfg[Key]>> & {
|
|
56
|
+
__unwrap: OutputsCfg[Key] extends {
|
|
57
|
+
withStatus: true;
|
|
58
|
+
} ? false : true;
|
|
59
|
+
} };
|
|
60
|
+
//#endregion
|
|
61
|
+
export { ConfigRenderLambda, ConfigRenderLambdaFlags, ExtractFunctionHandleReturn, InferOutputType, InferOutputsFromConfigs, InferOutputsFromLambdas, ResolveCfgType, StdCtx, StdCtxArgsOnly };
|
|
62
62
|
//# sourceMappingURL=lambdas.d.ts.map
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var block_storage_facade = require('../block_storage_facade.cjs');
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_block_storage_facade = require('../block_storage_facade.cjs');
|
|
3
|
+
const require_types = require('./types.cjs');
|
|
4
|
+
let _milaboratories_pl_model_common = require("@milaboratories/pl-model-common");
|
|
6
5
|
|
|
6
|
+
//#region src/bconfig/normalization.ts
|
|
7
7
|
function downgradeCfgOrLambda(data) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return data.handle;
|
|
12
|
-
return data;
|
|
8
|
+
if (data === void 0) return void 0;
|
|
9
|
+
if (require_types.isConfigLambda(data)) return data.handle;
|
|
10
|
+
return data;
|
|
13
11
|
}
|
|
14
12
|
function extractConfig(cfg) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
config.blockLifecycleCallbacks =
|
|
19
|
-
block_storage_facade.BlockStorageFacadeHandles;
|
|
20
|
-
}
|
|
21
|
-
return config;
|
|
13
|
+
const config = (0, _milaboratories_pl_model_common.extractConfigGeneric)(cfg);
|
|
14
|
+
if (config.configVersion === 4 && Object.keys(config.blockLifecycleCallbacks).length === 0) config.blockLifecycleCallbacks = require_block_storage_facade.BlockStorageFacadeHandles;
|
|
15
|
+
return config;
|
|
22
16
|
}
|
|
23
17
|
|
|
18
|
+
//#endregion
|
|
24
19
|
exports.downgradeCfgOrLambda = downgradeCfgOrLambda;
|
|
25
20
|
exports.extractConfig = extractConfig;
|
|
26
|
-
//# sourceMappingURL=normalization.cjs.map
|
|
21
|
+
//# sourceMappingURL=normalization.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalization.cjs","sources":["../../src/bconfig/normalization.ts"],"sourcesContent":["import { extractConfigGeneric, type BlockConfigContainer } from \"@milaboratories/pl-model-common\";\nimport type { TypedConfigOrConfigLambda, TypedConfigOrString } from \"./types\";\nimport { isConfigLambda } from \"./types\";\nimport type { BlockConfig } from \"./v3\";\nimport { BlockStorageFacadeHandles } from \"../block_storage_facade\";\n\nexport function downgradeCfgOrLambda(data: TypedConfigOrConfigLambda): TypedConfigOrString;\nexport function downgradeCfgOrLambda(\n data: TypedConfigOrConfigLambda | undefined,\n): TypedConfigOrString | undefined;\nexport function downgradeCfgOrLambda(\n data: TypedConfigOrConfigLambda | undefined,\n): TypedConfigOrString | undefined {\n if (data === undefined) return undefined;\n if (isConfigLambda(data)) return data.handle;\n return data;\n}\n\nexport function extractConfig(cfg: BlockConfigContainer): BlockConfig {\n const config = extractConfigGeneric(cfg) as BlockConfig;\n // Fill blockLifecycleCallbacks with defaults for V4 blocks that don't declare them\n if (config.configVersion === 4 && Object.keys(config.blockLifecycleCallbacks).length === 0) {\n (config as { blockLifecycleCallbacks: Record<string, unknown> }).blockLifecycleCallbacks =\n BlockStorageFacadeHandles;\n }\n return config;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"normalization.cjs","names":["isConfigLambda","BlockStorageFacadeHandles"],"sources":["../../src/bconfig/normalization.ts"],"sourcesContent":["import { extractConfigGeneric, type BlockConfigContainer } from \"@milaboratories/pl-model-common\";\nimport type { TypedConfigOrConfigLambda, TypedConfigOrString } from \"./types\";\nimport { isConfigLambda } from \"./types\";\nimport type { BlockConfig } from \"./v3\";\nimport { BlockStorageFacadeHandles } from \"../block_storage_facade\";\n\nexport function downgradeCfgOrLambda(data: TypedConfigOrConfigLambda): TypedConfigOrString;\nexport function downgradeCfgOrLambda(\n data: TypedConfigOrConfigLambda | undefined,\n): TypedConfigOrString | undefined;\nexport function downgradeCfgOrLambda(\n data: TypedConfigOrConfigLambda | undefined,\n): TypedConfigOrString | undefined {\n if (data === undefined) return undefined;\n if (isConfigLambda(data)) return data.handle;\n return data;\n}\n\nexport function extractConfig(cfg: BlockConfigContainer): BlockConfig {\n const config = extractConfigGeneric(cfg) as BlockConfig;\n // Fill blockLifecycleCallbacks with defaults for V4 blocks that don't declare them\n if (config.configVersion === 4 && Object.keys(config.blockLifecycleCallbacks).length === 0) {\n (config as { blockLifecycleCallbacks: Record<string, unknown> }).blockLifecycleCallbacks =\n BlockStorageFacadeHandles;\n }\n return config;\n}\n"],"mappings":";;;;;;AAUA,SAAgB,qBACd,MACiC;AACjC,KAAI,SAAS,OAAW,QAAO;AAC/B,KAAIA,6BAAe,KAAK,CAAE,QAAO,KAAK;AACtC,QAAO;;AAGT,SAAgB,cAAc,KAAwC;CACpE,MAAM,mEAA8B,IAAI;AAExC,KAAI,OAAO,kBAAkB,KAAK,OAAO,KAAK,OAAO,wBAAwB,CAAC,WAAW,EACvF,CAAC,OAAgE,0BAC/DC;AAEJ,QAAO"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { TypedConfigOrConfigLambda, TypedConfigOrString } from "./types.js";
|
|
2
|
+
import { BlockConfig } from "./v3.js";
|
|
3
|
+
import { BlockConfigContainer } from "@milaboratories/pl-model-common";
|
|
4
|
+
|
|
5
|
+
//#region src/bconfig/normalization.d.ts
|
|
6
|
+
declare function downgradeCfgOrLambda(data: TypedConfigOrConfigLambda): TypedConfigOrString;
|
|
7
|
+
declare function downgradeCfgOrLambda(data: TypedConfigOrConfigLambda | undefined): TypedConfigOrString | undefined;
|
|
8
|
+
declare function extractConfig(cfg: BlockConfigContainer): BlockConfig;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { downgradeCfgOrLambda, extractConfig };
|
|
7
11
|
//# sourceMappingURL=normalization.d.ts.map
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isConfigLambda } from
|
|
3
|
-
import {
|
|
1
|
+
import { BlockStorageFacadeHandles } from "../block_storage_facade.js";
|
|
2
|
+
import { isConfigLambda } from "./types.js";
|
|
3
|
+
import { extractConfigGeneric } from "@milaboratories/pl-model-common";
|
|
4
4
|
|
|
5
|
+
//#region src/bconfig/normalization.ts
|
|
5
6
|
function downgradeCfgOrLambda(data) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return data.handle;
|
|
10
|
-
return data;
|
|
7
|
+
if (data === void 0) return void 0;
|
|
8
|
+
if (isConfigLambda(data)) return data.handle;
|
|
9
|
+
return data;
|
|
11
10
|
}
|
|
12
11
|
function extractConfig(cfg) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
config.blockLifecycleCallbacks =
|
|
17
|
-
BlockStorageFacadeHandles;
|
|
18
|
-
}
|
|
19
|
-
return config;
|
|
12
|
+
const config = extractConfigGeneric(cfg);
|
|
13
|
+
if (config.configVersion === 4 && Object.keys(config.blockLifecycleCallbacks).length === 0) config.blockLifecycleCallbacks = BlockStorageFacadeHandles;
|
|
14
|
+
return config;
|
|
20
15
|
}
|
|
21
16
|
|
|
17
|
+
//#endregion
|
|
22
18
|
export { downgradeCfgOrLambda, extractConfig };
|
|
23
|
-
//# sourceMappingURL=normalization.js.map
|
|
19
|
+
//# sourceMappingURL=normalization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalization.js","sources":["../../src/bconfig/normalization.ts"],"sourcesContent":["import { extractConfigGeneric, type BlockConfigContainer } from \"@milaboratories/pl-model-common\";\nimport type { TypedConfigOrConfigLambda, TypedConfigOrString } from \"./types\";\nimport { isConfigLambda } from \"./types\";\nimport type { BlockConfig } from \"./v3\";\nimport { BlockStorageFacadeHandles } from \"../block_storage_facade\";\n\nexport function downgradeCfgOrLambda(data: TypedConfigOrConfigLambda): TypedConfigOrString;\nexport function downgradeCfgOrLambda(\n data: TypedConfigOrConfigLambda | undefined,\n): TypedConfigOrString | undefined;\nexport function downgradeCfgOrLambda(\n data: TypedConfigOrConfigLambda | undefined,\n): TypedConfigOrString | undefined {\n if (data === undefined) return undefined;\n if (isConfigLambda(data)) return data.handle;\n return data;\n}\n\nexport function extractConfig(cfg: BlockConfigContainer): BlockConfig {\n const config = extractConfigGeneric(cfg) as BlockConfig;\n // Fill blockLifecycleCallbacks with defaults for V4 blocks that don't declare them\n if (config.configVersion === 4 && Object.keys(config.blockLifecycleCallbacks).length === 0) {\n (config as { blockLifecycleCallbacks: Record<string, unknown> }).blockLifecycleCallbacks =\n BlockStorageFacadeHandles;\n }\n return config;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"normalization.js","names":[],"sources":["../../src/bconfig/normalization.ts"],"sourcesContent":["import { extractConfigGeneric, type BlockConfigContainer } from \"@milaboratories/pl-model-common\";\nimport type { TypedConfigOrConfigLambda, TypedConfigOrString } from \"./types\";\nimport { isConfigLambda } from \"./types\";\nimport type { BlockConfig } from \"./v3\";\nimport { BlockStorageFacadeHandles } from \"../block_storage_facade\";\n\nexport function downgradeCfgOrLambda(data: TypedConfigOrConfigLambda): TypedConfigOrString;\nexport function downgradeCfgOrLambda(\n data: TypedConfigOrConfigLambda | undefined,\n): TypedConfigOrString | undefined;\nexport function downgradeCfgOrLambda(\n data: TypedConfigOrConfigLambda | undefined,\n): TypedConfigOrString | undefined {\n if (data === undefined) return undefined;\n if (isConfigLambda(data)) return data.handle;\n return data;\n}\n\nexport function extractConfig(cfg: BlockConfigContainer): BlockConfig {\n const config = extractConfigGeneric(cfg) as BlockConfig;\n // Fill blockLifecycleCallbacks with defaults for V4 blocks that don't declare them\n if (config.configVersion === 4 && Object.keys(config.blockLifecycleCallbacks).length === 0) {\n (config as { blockLifecycleCallbacks: Record<string, unknown> }).blockLifecycleCallbacks =\n BlockStorageFacadeHandles;\n }\n return config;\n}\n"],"mappings":";;;;;AAUA,SAAgB,qBACd,MACiC;AACjC,KAAI,SAAS,OAAW,QAAO;AAC/B,KAAI,eAAe,KAAK,CAAE,QAAO,KAAK;AACtC,QAAO;;AAGT,SAAgB,cAAc,KAAwC;CACpE,MAAM,SAAS,qBAAqB,IAAI;AAExC,KAAI,OAAO,kBAAkB,KAAK,OAAO,KAAK,OAAO,wBAAwB,CAAC,WAAW,EACvF,CAAC,OAAgE,0BAC/D;AAEJ,QAAO"}
|
package/dist/bconfig/types.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
'use strict';
|
|
2
1
|
|
|
2
|
+
//#region src/bconfig/types.ts
|
|
3
3
|
function isConfigLambda(cfgOrFh) {
|
|
4
|
-
|
|
4
|
+
return cfgOrFh.__renderLambda === true;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
//#endregion
|
|
7
8
|
exports.isConfigLambda = isConfigLambda;
|
|
8
|
-
//# sourceMappingURL=types.cjs.map
|
|
9
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sources":["../../src/bconfig/types.ts"],"sourcesContent":["import type { TypedConfig } from \"../config\";\nimport type { ConfigRenderLambda } from \"./lambdas\";\n\nexport function isConfigLambda(cfgOrFh: TypedConfigOrConfigLambda): cfgOrFh is ConfigRenderLambda {\n return (cfgOrFh as any).__renderLambda === true;\n}\n\nexport type TypedConfigOrConfigLambda = TypedConfig | ConfigRenderLambda;\n\n/** @deprecated */\nexport type TypedConfigOrString = TypedConfig | string;\n"],"
|
|
1
|
+
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/bconfig/types.ts"],"sourcesContent":["import type { TypedConfig } from \"../config\";\nimport type { ConfigRenderLambda } from \"./lambdas\";\n\nexport function isConfigLambda(cfgOrFh: TypedConfigOrConfigLambda): cfgOrFh is ConfigRenderLambda {\n return (cfgOrFh as any).__renderLambda === true;\n}\n\nexport type TypedConfigOrConfigLambda = TypedConfig | ConfigRenderLambda;\n\n/** @deprecated */\nexport type TypedConfigOrString = TypedConfig | string;\n"],"mappings":";;AAGA,SAAgB,eAAe,SAAmE;AAChG,QAAQ,QAAgB,mBAAmB"}
|
package/dist/bconfig/types.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { TypedConfig } from "../config/type_engine.js";
|
|
2
|
+
import "../config/index.js";
|
|
3
|
+
import { ConfigRenderLambda } from "./lambdas.js";
|
|
4
|
+
|
|
5
|
+
//#region src/bconfig/types.d.ts
|
|
6
|
+
declare function isConfigLambda(cfgOrFh: TypedConfigOrConfigLambda): cfgOrFh is ConfigRenderLambda;
|
|
7
|
+
type TypedConfigOrConfigLambda = TypedConfig | ConfigRenderLambda;
|
|
5
8
|
/** @deprecated */
|
|
6
|
-
|
|
9
|
+
type TypedConfigOrString = TypedConfig | string;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { TypedConfigOrConfigLambda, TypedConfigOrString, isConfigLambda };
|
|
7
12
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/bconfig/types.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
//#region src/bconfig/types.ts
|
|
1
2
|
function isConfigLambda(cfgOrFh) {
|
|
2
|
-
|
|
3
|
+
return cfgOrFh.__renderLambda === true;
|
|
3
4
|
}
|
|
4
5
|
|
|
6
|
+
//#endregion
|
|
5
7
|
export { isConfigLambda };
|
|
6
|
-
//# sourceMappingURL=types.js.map
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../src/bconfig/types.ts"],"sourcesContent":["import type { TypedConfig } from \"../config\";\nimport type { ConfigRenderLambda } from \"./lambdas\";\n\nexport function isConfigLambda(cfgOrFh: TypedConfigOrConfigLambda): cfgOrFh is ConfigRenderLambda {\n return (cfgOrFh as any).__renderLambda === true;\n}\n\nexport type TypedConfigOrConfigLambda = TypedConfig | ConfigRenderLambda;\n\n/** @deprecated */\nexport type TypedConfigOrString = TypedConfig | string;\n"],"
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/bconfig/types.ts"],"sourcesContent":["import type { TypedConfig } from \"../config\";\nimport type { ConfigRenderLambda } from \"./lambdas\";\n\nexport function isConfigLambda(cfgOrFh: TypedConfigOrConfigLambda): cfgOrFh is ConfigRenderLambda {\n return (cfgOrFh as any).__renderLambda === true;\n}\n\nexport type TypedConfigOrConfigLambda = TypedConfig | ConfigRenderLambda;\n\n/** @deprecated */\nexport type TypedConfigOrString = TypedConfig | string;\n"],"mappings":";AAGA,SAAgB,eAAe,SAAmE;AAChG,QAAQ,QAAgB,mBAAmB"}
|
package/dist/bconfig/util.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BlockSection } from "@milaboratories/pl-model-common";
|
|
2
|
+
|
|
3
|
+
//#region src/bconfig/util.d.ts
|
|
2
4
|
type OnlyString<S> = S extends string ? S : "";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
type DeriveHref<S> = S extends readonly BlockSection[] ? OnlyString<Extract<S[number], {
|
|
6
|
+
type: "link";
|
|
5
7
|
}>["href"]> : never;
|
|
6
|
-
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DeriveHref };
|
|
7
10
|
//# sourceMappingURL=util.d.ts.map
|
package/dist/bconfig/v3.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { TypedConfigOrConfigLambda } from "./types.js";
|
|
2
|
+
import { ConfigRenderLambda } from "./lambdas.js";
|
|
3
|
+
import { BlockConfigV3Generic, BlockConfigV4Generic } from "@milaboratories/pl-model-common";
|
|
4
|
+
|
|
5
|
+
//#region src/bconfig/v3.d.ts
|
|
6
|
+
type BlockConfigV3<Args = unknown, UiState = unknown, Outputs extends Record<string, TypedConfigOrConfigLambda> = Record<string, TypedConfigOrConfigLambda>> = BlockConfigV3Generic<Args, UiState, TypedConfigOrConfigLambda, ConfigRenderLambda, Outputs>;
|
|
7
|
+
type BlockConfigV4<Args = unknown, Data extends Record<string, unknown> = Record<string, unknown>, Outputs extends Record<string, TypedConfigOrConfigLambda> = Record<string, TypedConfigOrConfigLambda>> = BlockConfigV4Generic<Args, Data, TypedConfigOrConfigLambda, ConfigRenderLambda, Outputs>;
|
|
6
8
|
/** Union of all block config versions with discriminator for type narrowing */
|
|
7
|
-
|
|
9
|
+
type BlockConfig = BlockConfigV3 | BlockConfigV4;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BlockConfig, BlockConfigV3, BlockConfigV4 };
|
|
8
12
|
//# sourceMappingURL=v3.d.ts.map
|