@platforma-sdk/model 1.8.19 → 1.9.0
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/bconfig/container.d.ts +46 -0
- package/dist/bconfig/container.d.ts.map +1 -0
- package/dist/bconfig/index.d.ts +7 -0
- package/dist/bconfig/index.d.ts.map +1 -0
- package/dist/bconfig/lambdas.d.ts +33 -0
- package/dist/bconfig/lambdas.d.ts.map +1 -0
- package/dist/bconfig/normalization.d.ts +13 -0
- package/dist/bconfig/normalization.d.ts.map +1 -0
- package/dist/bconfig/types.d.ts +11 -0
- package/dist/bconfig/types.d.ts.map +1 -0
- package/dist/bconfig/utils.d.ts +7 -0
- package/dist/bconfig/utils.d.ts.map +1 -0
- package/dist/bconfig/v3.d.ts +30 -0
- package/dist/bconfig/v3.d.ts.map +1 -0
- package/dist/builder.d.ts +45 -65
- package/dist/builder.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +428 -251
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +3 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/platforma.d.ts +3 -2
- package/dist/platforma.d.ts.map +1 -1
- package/dist/raw_globals.d.ts.map +1 -1
- package/dist/render/accessor.d.ts +23 -0
- package/dist/render/accessor.d.ts.map +1 -1
- package/dist/render/api.d.ts +2 -0
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/internal.d.ts +4 -0
- package/dist/render/internal.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/bconfig/container.ts +58 -0
- package/src/bconfig/index.ts +6 -0
- package/src/bconfig/lambdas.ts +44 -0
- package/src/bconfig/normalization.ts +120 -0
- package/src/bconfig/types.ts +18 -0
- package/src/bconfig/utils.ts +8 -0
- package/src/bconfig/v3.ts +46 -0
- package/src/builder.ts +165 -141
- package/src/global.d.ts +1 -1
- package/src/index.ts +1 -0
- package/src/internal.ts +1 -2
- package/src/platforma.ts +1 -2
- package/src/raw_globals.ts +2 -1
- package/src/render/accessor.ts +73 -0
- package/src/render/api.ts +22 -10
- package/src/render/internal.ts +12 -0
- package/src/typing.test.ts +5 -4
package/src/render/internal.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
PSpecPredicate,
|
|
12
12
|
PTableDef,
|
|
13
13
|
PTableHandle,
|
|
14
|
+
Ref,
|
|
14
15
|
ResultCollection,
|
|
15
16
|
ValueOrError
|
|
16
17
|
} from '@milaboratories/pl-model-common';
|
|
@@ -103,6 +104,7 @@ export interface GlobalCfgRenderCtxMethods<AHandle = AccessorHandle, FHandle = F
|
|
|
103
104
|
// Blocks
|
|
104
105
|
//
|
|
105
106
|
|
|
107
|
+
/** @deprecated at some point will stop working and will return dummy values */
|
|
106
108
|
getBlockLabel(blockId: string): string;
|
|
107
109
|
|
|
108
110
|
//
|
|
@@ -117,6 +119,10 @@ export interface GlobalCfgRenderCtxMethods<AHandle = AccessorHandle, FHandle = F
|
|
|
117
119
|
|
|
118
120
|
getSpecsFromResultPool(): ResultCollection<PObjectSpec>;
|
|
119
121
|
|
|
122
|
+
getSpecFromResultPoolByRef(blockId: string, exportName: string): PObjectSpec | undefined;
|
|
123
|
+
|
|
124
|
+
getDataFromResultPoolByRef(blockId: string, exportName: string): PObject<AHandle> | undefined;
|
|
125
|
+
|
|
120
126
|
calculateOptions(predicate: PSpecPredicate): Option[];
|
|
121
127
|
|
|
122
128
|
//
|
|
@@ -126,6 +132,12 @@ export interface GlobalCfgRenderCtxMethods<AHandle = AccessorHandle, FHandle = F
|
|
|
126
132
|
createPFrame(def: PFrameDef<AHandle>): PFrameHandle;
|
|
127
133
|
|
|
128
134
|
createPTable(def: PTableDef<PColumn<AHandle>>): PTableHandle;
|
|
135
|
+
|
|
136
|
+
//
|
|
137
|
+
// Computable
|
|
138
|
+
//
|
|
139
|
+
|
|
140
|
+
getCurrentUnstableMarker(): string | undefined;
|
|
129
141
|
}
|
|
130
142
|
|
|
131
143
|
export interface GlobalCfgRenderCtx extends GlobalCfgRenderCtxMethods {
|
package/src/typing.test.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
RemoteBlobHandleAndSize,
|
|
5
5
|
ValueOrErrors
|
|
6
6
|
} from '@milaboratories/pl-model-common';
|
|
7
|
-
import { BlockModel
|
|
7
|
+
import { BlockModel } from './builder';
|
|
8
8
|
import {
|
|
9
9
|
Args,
|
|
10
10
|
ConfigResult,
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
mapRecordValues
|
|
28
28
|
} from './config';
|
|
29
29
|
import { InferHrefType, InferOutputsType } from './platforma';
|
|
30
|
+
import { DeriveHref, StdCtx } from './bconfig';
|
|
30
31
|
|
|
31
32
|
type AssertEqual<T, Expected> = [T] extends [Expected]
|
|
32
33
|
? [Expected] extends [T]
|
|
@@ -99,11 +100,11 @@ test('test config content', () => {
|
|
|
99
100
|
});
|
|
100
101
|
|
|
101
102
|
test('test config content', () => {
|
|
102
|
-
const platforma = BlockModel.create
|
|
103
|
-
.
|
|
103
|
+
const platforma = BlockModel.create('Heavy')
|
|
104
|
+
.withArgs<{ a: string[] }>({ a: [] })
|
|
105
|
+
.argsValid(isEmpty(getJsonField(Args, 'a')))
|
|
104
106
|
.output('cell1', makeObject({ b: getJsonField(Args, 'a') }))
|
|
105
107
|
.output('cell2', mapArrayValues(getJsonField(Args, 'a'), getImmediate('v1')))
|
|
106
|
-
.inputsValid(isEmpty(getJsonField(Args, 'a')))
|
|
107
108
|
.sections((r) => {
|
|
108
109
|
return [
|
|
109
110
|
{ type: 'link', href: '/', label: 'Main' },
|