@platforma-sdk/ui-vue 1.37.2 → 1.37.4
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/.turbo/turbo-build.log +10 -9
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/components/PlAgDataTable/types.d.ts +21 -1
- package/dist/components/PlAgDataTable/types.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/types.js +55 -0
- package/dist/components/PlAgDataTable/types.js.map +1 -0
- package/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/lib.js +264 -262
- package/dist/lib.js.map +1 -1
- package/package.json +5 -5
- package/src/components/PlAgDataTable/types.ts +86 -17
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-sdk/ui-vue@1.37.
|
|
3
|
+
> @platforma-sdk/ui-vue@1.37.4 build /home/runner/_work/platforma/platforma/sdk/ui-vue
|
|
4
4
|
> vite build
|
|
5
5
|
|
|
6
6
|
[36mvite v6.3.5 [32mbuilding for production...[36m[39m
|
|
@@ -10,7 +10,7 @@ rendering chunks...
|
|
|
10
10
|
|
|
11
11
|
[vite:dts] Start generate declaration files...
|
|
12
12
|
computing gzip size...
|
|
13
|
-
[vite:dts] Declaration files built in
|
|
13
|
+
[vite:dts] Declaration files built in 5037ms.
|
|
14
14
|
|
|
15
15
|
[2mdist/[22m[36m_virtual/re.js [39m[1m[2m 0.08 kB[22m[1m[22m[2m │ gzip: 0.10 kB[22m[2m │ map: 0.09 kB[22m
|
|
16
16
|
[2mdist/[22m[36m_virtual/lodash2.js [39m[1m[2m 0.09 kB[22m[1m[22m[2m │ gzip: 0.10 kB[22m[2m │ map: 0.09 kB[22m
|
|
@@ -40,18 +40,18 @@ computing gzip size...
|
|
|
40
40
|
[2mdist/[22m[36mcomponents/PlTableFilters/PlTableFilters.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.10 kB[22m
|
|
41
41
|
[2mdist/[22m[36mcomponents/PlAgCsvExporter/PlAgCsvExporter.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
42
42
|
[2mdist/[22m[36mlib/ui/uikit/dist/helpers/math.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.13 kB[22m[2m │ map: 0.36 kB[22m
|
|
43
|
-
[2mdist/[22m[36mcomponents/PlAgColumnHeader/PlAgColumnHeader.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
44
43
|
[2mdist/[22m[36mcomponents/PlAgCellProgress/PlAgCellProgress.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
44
|
+
[2mdist/[22m[36mcomponents/PlAgColumnHeader/PlAgColumnHeader.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
45
45
|
[2mdist/[22m[36mcomponents/PlAgRowNumHeader.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
46
46
|
[2mdist/[22m[36mcomponents/PlTableFilters/PlTableAddFilter.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
47
47
|
[2mdist/[22m[36mlib/ui/uikit/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.40 kB[22m
|
|
48
48
|
[2mdist/[22m[36mlib/ui/uikit/dist/node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/constant.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.40 kB[22m
|
|
49
49
|
[2mdist/[22m[36mcomponents/PlAgDataTable/PlAgOverlayLoading.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
50
|
-
[2mdist/[22m[36mcomponents/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
51
50
|
[2mdist/[22m[36mcomponents/PlTableFilters/PlTableFilterEntry.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
51
|
+
[2mdist/[22m[36mcomponents/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue2.js [39m[1m[2m 0.12 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
52
52
|
[2mdist/[22m[36mplugins/Monetization/MonetizationSidebar.vue2.js [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
53
|
-
[2mdist/[22m[36mcomponents/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
54
53
|
[2mdist/[22m[36mcomponents/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue2.js [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
54
|
+
[2mdist/[22m[36mcomponents/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
55
55
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlRadio/keys.js [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.13 kB[22m[2m │ map: 0.46 kB[22m
|
|
56
56
|
[2mdist/[22m[36mlib/ui/uikit/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.13 kB[22m[2m │ map: 0.49 kB[22m
|
|
57
57
|
[2mdist/[22m[36mcomponents/ValueOrErrorsComponent.vue2.js [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m[2m │ map: 0.11 kB[22m
|
|
@@ -146,8 +146,8 @@ computing gzip size...
|
|
|
146
146
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlChartHistogram/logspace.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m[2m │ map: 0.88 kB[22m
|
|
147
147
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlSvg/PlSvg.vue.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m[2m │ map: 0.10 kB[22m
|
|
148
148
|
[2mdist/[22m[36mlib/ui/uikit/dist/assets/icons/icon-assets-min/24_windows-expand.svg.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m[2m │ map: 0.51 kB[22m
|
|
149
|
-
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/residue-counts.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m[2m │ map: 4.45 kB[22m
|
|
150
149
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m[2m │ map: 0.59 kB[22m
|
|
150
|
+
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/residue-counts.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m[2m │ map: 4.45 kB[22m
|
|
151
151
|
[2mdist/[22m[36mlib/ui/uikit/dist/assets/icons/icon-assets-min/24_arrow-left.svg.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m[2m │ map: 0.47 kB[22m
|
|
152
152
|
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/Legend.vue.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m[2m │ map: 0.10 kB[22m
|
|
153
153
|
[2mdist/[22m[36mlib/ui/uikit/dist/assets/icons/icon-assets-min/24_arrow-right.svg.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m[2m │ map: 0.47 kB[22m
|
|
@@ -689,6 +689,7 @@ computing gzip size...
|
|
|
689
689
|
[2mdist/[22m[36mdefineApp.js [39m[1m[2m 1.36 kB[22m[1m[22m[2m │ gzip: 0.72 kB[22m[2m │ map: 4.74 kB[22m
|
|
690
690
|
[2mdist/[22m[36mcreateModel.js [39m[1m[2m 1.38 kB[22m[1m[22m[2m │ gzip: 0.65 kB[22m[2m │ map: 3.91 kB[22m
|
|
691
691
|
[2mdist/[22m[36mlib/ui/uikit/dist/composition/useScroll.js [39m[1m[2m 1.40 kB[22m[1m[22m[2m │ gzip: 0.57 kB[22m[2m │ map: 3.78 kB[22m
|
|
692
|
+
[2mdist/[22m[36mcomponents/PlAgDataTable/types.js [39m[1m[2m 1.41 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m[2m │ map: 8.14 kB[22m
|
|
692
693
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlRadio/PlRadioGroup.vue2.js [39m[1m[2m 1.41 kB[22m[1m[22m[2m │ gzip: 0.72 kB[22m[2m │ map: 2.55 kB[22m
|
|
693
694
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlErrorAlert/PlErrorAlert.vue3.js [39m[1m[2m 1.42 kB[22m[1m[22m[2m │ gzip: 0.73 kB[22m[2m │ map: 0.12 kB[22m
|
|
694
695
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlChartStackedBar/StackedRow.vue3.js [39m[1m[2m 1.43 kB[22m[1m[22m[2m │ gzip: 0.69 kB[22m[2m │ map: 0.12 kB[22m
|
|
@@ -819,7 +820,7 @@ computing gzip size...
|
|
|
819
820
|
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/Toolbar.vue2.js [39m[1m[2m 4.48 kB[22m[1m[22m[2m │ gzip: 1.09 kB[22m[2m │ map: 3.14 kB[22m
|
|
820
821
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlAlert/PlAlert.vue.js [39m[1m[2m 4.48 kB[22m[1m[22m[2m │ gzip: 1.69 kB[22m[2m │ map: 2.91 kB[22m
|
|
821
822
|
[2mdist/[22m[36mcomponents/BlockLayout.vue.js [39m[1m[2m 4.89 kB[22m[1m[22m[2m │ gzip: 1.80 kB[22m[2m │ map: 2.83 kB[22m
|
|
822
|
-
[2mdist/[22m[36mlib/model/common/dist/index.js [39m[1m[2m 4.90 kB[22m[1m[22m[2m │ gzip: 2.00 kB[22m[2m │ map: 38.
|
|
823
|
+
[2mdist/[22m[36mlib/model/common/dist/index.js [39m[1m[2m 4.90 kB[22m[1m[22m[2m │ gzip: 2.00 kB[22m[2m │ map: 38.02 kB[22m
|
|
823
824
|
[2mdist/[22m[36mplugins/Monetization/MonetizationSidebar.vue.js [39m[1m[2m 5.12 kB[22m[1m[22m[2m │ gzip: 1.79 kB[22m[2m │ map: 5.01 kB[22m
|
|
824
825
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlBtnGroup/PlBtnGroup.vue.js [39m[1m[2m 5.18 kB[22m[1m[22m[2m │ gzip: 1.94 kB[22m[2m │ map: 3.19 kB[22m
|
|
825
826
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlTooltip/PlTooltip.vue.js [39m[1m[2m 5.23 kB[22m[1m[22m[2m │ gzip: 1.93 kB[22m[2m │ map: 5.49 kB[22m
|
|
@@ -868,11 +869,11 @@ computing gzip size...
|
|
|
868
869
|
[2mdist/[22m[36mcomponents/PlAgDataTable/PlAgDataTable.vue2.js [39m[1m[2m 49.26 kB[22m[1m[22m[2m │ gzip: 30.80 kB[22m[2m │ map: 28.50 kB[22m
|
|
869
870
|
[2mdist/[22m[36mnode_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.js [39m[1m[2m 50.22 kB[22m[1m[22m[2m │ gzip: 14.80 kB[22m[2m │ map: 181.40 kB[22m
|
|
870
871
|
[2mdist/[22m[36mAgGridVue/useAgGridOptions.js [39m[1m[2m 53.53 kB[22m[1m[22m[2m │ gzip: 30.97 kB[22m[2m │ map: 16.36 kB[22m
|
|
871
|
-
[2mdist/[22m[36mlib.js [39m[1m[2m 54.
|
|
872
|
+
[2mdist/[22m[36mlib.js [39m[1m[2m 54.70 kB[22m[1m[22m[2m │ gzip: 31.26 kB[22m[2m │ map: 0.22 kB[22m
|
|
872
873
|
[2mdist/[22m[36mlib/ui/uikit/dist/node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js [39m[1m[2m 83.80 kB[22m[1m[22m[2m │ gzip: 17.23 kB[22m[2m │ map: 240.83 kB[22m
|
|
873
874
|
[2mdist/[22m[36mnode_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js [39m[1m[2m 83.81 kB[22m[1m[22m[2m │ gzip: 17.26 kB[22m[2m │ map: 241.15 kB[22m
|
|
874
875
|
[2mdist/[22m[36mnode_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js [39m[1m[2m128.45 kB[22m[1m[22m[2m │ gzip: 31.07 kB[22m[2m │ map: 723.83 kB[22m
|
|
875
876
|
[2mdist/[22m[36mlib/ui/uikit/dist/index.js [39m[1m[2m497.32 kB[22m[1m[22m[2m │ gzip: 191.64 kB[22m[2m │ map: 0.18 kB[22m
|
|
876
877
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/PlSlideModal/PlSlideModal.vue.js [39m[1m[33m601.36 kB[39m[22m[2m │ gzip: 204.40 kB[22m[2m │ map: 0.23 kB[22m
|
|
877
878
|
[2mdist/[22m[36mlib/ui/uikit/dist/components/DataTable/TableComponent.vue.js [39m[1m[33m602.69 kB[39m[22m[2m │ gzip: 204.99 kB[22m[2m │ map: 0.27 kB[22m
|
|
878
|
-
[32m✓ built in
|
|
879
|
+
[32m✓ built in 9.42s[39m
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-sdk/ui-vue@1.37.
|
|
3
|
+
> @platforma-sdk/ui-vue@1.37.4 type-check /home/runner/_work/platforma/platforma/sdk/ui-vue
|
|
4
4
|
> vue-tsc --noEmit --project ./tsconfig.json
|
|
5
5
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AxisId, CanonicalizedJson, ListOptionBase, LocalBlobHandleAndSize, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlTableFilter, PlTableFilterType, PTableColumnId, PTableColumnSpec, PTableHandle, PTableKey, PTableRowKey, PTableValue, RemoteBlobHandleAndSize } from '@platforma-sdk/model';
|
|
1
|
+
import { JsonCompatible, AxisId, CanonicalizedJson, ListOptionBase, LocalBlobHandleAndSize, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlTableFilter, PlTableFilterType, PTableColumnId, PTableColumnSpec, PTableHandle, PTableKey, PTableRowKey, PTableValue, RemoteBlobHandleAndSize } from '@platforma-sdk/model';
|
|
2
2
|
import { PTableHidden } from './sources/common';
|
|
3
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
3
4
|
export type PlDataTableSettingsPTable = {
|
|
4
5
|
/** The type of the source to feed the data into the table */
|
|
5
6
|
sourceType: 'ptable';
|
|
@@ -26,6 +27,25 @@ export type PlDataTableSettingsV2 = {
|
|
|
26
27
|
/** Result of `createPlDataTableV2` */
|
|
27
28
|
model: PlDataTableModel | undefined;
|
|
28
29
|
};
|
|
30
|
+
export declare function usePlDataTableSettingsV2<T = string>({
|
|
31
|
+
/**
|
|
32
|
+
* Block property (such as inputAnchor) used to produce the data source.
|
|
33
|
+
* Mandatory for cases when the table can change without block run.
|
|
34
|
+
* Skip when the table is changed only after block run.
|
|
35
|
+
* Ask developers for help if you don't know what to set here.
|
|
36
|
+
*/
|
|
37
|
+
sourceId,
|
|
38
|
+
/** Block output created by `createPlDataTableV2` */
|
|
39
|
+
model,
|
|
40
|
+
/**
|
|
41
|
+
* Sheets for partitioned data sources.
|
|
42
|
+
* Do not set if data source is never partitioned.
|
|
43
|
+
*/
|
|
44
|
+
sheets, }: {
|
|
45
|
+
sourceId?: MaybeRefOrGetter<JsonCompatible<T> | undefined>;
|
|
46
|
+
model: MaybeRefOrGetter<PlDataTableModel | undefined>;
|
|
47
|
+
sheets?: MaybeRefOrGetter<PlDataTableSheet[] | undefined>;
|
|
48
|
+
}): ComputedRef<PlDataTableSettingsV2>;
|
|
29
49
|
/** PlTableFilters restriction entry */
|
|
30
50
|
export type PlTableFiltersRestriction = {
|
|
31
51
|
/** Spec of the column for which filter types should be restricted */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PlAgDataTable/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PlAgDataTable/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB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
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import "../../sdk/model/dist/index.js";
|
|
2
|
+
import { computed as c, toValue as t } from "vue";
|
|
3
|
+
import { canonicalizeJson as u } from "../../lib/model/common/dist/index.js";
|
|
4
|
+
function m({
|
|
5
|
+
/**
|
|
6
|
+
* Block property (such as inputAnchor) used to produce the data source.
|
|
7
|
+
* Mandatory for cases when the table can change without block run.
|
|
8
|
+
* Skip when the table is changed only after block run.
|
|
9
|
+
* Ask developers for help if you don't know what to set here.
|
|
10
|
+
*/
|
|
11
|
+
sourceId: l,
|
|
12
|
+
/** Block output created by `createPlDataTableV2` */
|
|
13
|
+
model: n,
|
|
14
|
+
/**
|
|
15
|
+
* Sheets for partitioned data sources.
|
|
16
|
+
* Do not set if data source is never partitioned.
|
|
17
|
+
*/
|
|
18
|
+
sheets: s
|
|
19
|
+
}) {
|
|
20
|
+
return c(() => {
|
|
21
|
+
const o = t(n);
|
|
22
|
+
if (l) {
|
|
23
|
+
const e = t(l);
|
|
24
|
+
if (s) {
|
|
25
|
+
const r = t(s);
|
|
26
|
+
return e && r ? {
|
|
27
|
+
sourceId: u(e),
|
|
28
|
+
sheets: r,
|
|
29
|
+
model: o
|
|
30
|
+
} : { sourceId: null };
|
|
31
|
+
} else
|
|
32
|
+
return e ? {
|
|
33
|
+
sourceId: u(e),
|
|
34
|
+
sheets: [],
|
|
35
|
+
model: o
|
|
36
|
+
} : { sourceId: null };
|
|
37
|
+
} else if (s) {
|
|
38
|
+
const e = t(s);
|
|
39
|
+
return e ? {
|
|
40
|
+
sourceId: u("static"),
|
|
41
|
+
sheets: e,
|
|
42
|
+
model: o
|
|
43
|
+
} : { sourceId: null };
|
|
44
|
+
} else
|
|
45
|
+
return o ? {
|
|
46
|
+
sourceId: u("static"),
|
|
47
|
+
sheets: [],
|
|
48
|
+
model: o
|
|
49
|
+
} : { sourceId: null };
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
m as usePlDataTableSettingsV2
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/PlAgDataTable/types.ts"],"sourcesContent":["import {\n canonicalizeJson,\n type JsonCompatible,\n type AxisId,\n type CanonicalizedJson,\n type ListOptionBase,\n type LocalBlobHandleAndSize,\n type PlDataTableModel,\n type PlDataTableSheet,\n type PlDataTableSheetState,\n type PlTableFilter,\n type PlTableFilterType,\n type PTableColumnId,\n type PTableColumnSpec,\n type PTableHandle,\n type PTableKey,\n type PTableRowKey,\n type PTableValue,\n type RemoteBlobHandleAndSize,\n} from '@platforma-sdk/model';\nimport type { PTableHidden } from './sources/common';\nimport type { ComputedRef, MaybeRefOrGetter } from 'vue';\nimport { computed, toValue } from 'vue';\n\nexport type PlDataTableSettingsPTable = {\n /** The type of the source to feed the data into the table */\n sourceType: 'ptable';\n /** PTable handle output */\n pTable?: PTableHandle;\n /** Sheets that we want to show in our table */\n sheets?: PlDataTableSheet[];\n};\n\nexport type PlDataTableSettingsXsv = {\n /** The type of the source to feed the data into the table */\n sourceType: 'xsv';\n xsvFile?: LocalBlobHandleAndSize | RemoteBlobHandleAndSize;\n};\n\n/** Data table settings */\nexport type PlDataTableSettings =\n | undefined\n | PlDataTableSettingsPTable\n | PlDataTableSettingsXsv;\n\n/** Data table V2 settings */\nexport type PlDataTableSettingsV2 =\n | { sourceId: null }\n | {\n /** Unique source id for state caching */\n sourceId: string;\n /** Sheets that we want to show in our table */\n sheets: PlDataTableSheet[];\n /** Result of `createPlDataTableV2` */\n model: PlDataTableModel | undefined;\n };\n\nexport function usePlDataTableSettingsV2<T = string>({\n /**\n * Block property (such as inputAnchor) used to produce the data source.\n * Mandatory for cases when the table can change without block run.\n * Skip when the table is changed only after block run.\n * Ask developers for help if you don't know what to set here.\n */\n sourceId,\n /** Block output created by `createPlDataTableV2` */\n model,\n /**\n * Sheets for partitioned data sources.\n * Do not set if data source is never partitioned.\n */\n sheets,\n}: {\n sourceId?: MaybeRefOrGetter<JsonCompatible<T> | undefined>;\n model: MaybeRefOrGetter<PlDataTableModel | undefined>;\n sheets?: MaybeRefOrGetter<PlDataTableSheet[] | undefined>;\n}): ComputedRef<PlDataTableSettingsV2> {\n return computed(() => {\n const modelValue = toValue(model);\n if (sourceId) {\n const sourceIdValue = toValue(sourceId);\n if (sheets) {\n const sheetsValue = toValue(sheets);\n return sourceIdValue && sheetsValue\n ? {\n sourceId: canonicalizeJson(sourceIdValue),\n sheets: sheetsValue,\n model: modelValue,\n }\n : { sourceId: null };\n } else {\n return sourceIdValue\n ? {\n sourceId: canonicalizeJson(sourceIdValue),\n sheets: [],\n model: modelValue,\n }\n : { sourceId: null };\n }\n } else {\n if (sheets) {\n const sheetsValue = toValue(sheets);\n return sheetsValue\n ? {\n sourceId: canonicalizeJson<string>('static'),\n sheets: sheetsValue,\n model: modelValue,\n }\n : { sourceId: null };\n } else {\n return modelValue\n ? {\n sourceId: canonicalizeJson<string>('static'),\n sheets: [],\n model: modelValue,\n }\n : { sourceId: null };\n }\n }\n });\n};\n\n/** PlTableFilters restriction entry */\nexport type PlTableFiltersRestriction = {\n /** Spec of the column for which filter types should be restricted */\n column: PTableColumnId;\n /** List of filter types applicable to the column */\n allowedFilterTypes: PlTableFilterType[];\n};\n\n/** PlTableFilters default settings entry */\nexport type PlTableFiltersDefault = {\n /** Spec of the column the default should be applied */\n column: PTableColumnId;\n /** Filter entry */\n default: PlTableFilter;\n};\n\n/** PlAgDataTable controller contains all exported methods */\nexport type PlAgDataTableController = {\n /**\n * Scroll table to make row with provided key visible\n * Warning: works reliably only in client side mode.\n */\n focusRow: (rowKey: PTableRowKey) => Promise<void>;\n};\n\n/** PlAgDataTable controller contains all exported methods */\nexport type PlAgDataTableV2Controller = {\n /**\n * Scroll table to make row with provided key visible\n * Warning: works reliably only in client side mode.\n */\n focusRow: (rowKey: PTableKey) => Promise<void>;\n};\n\n/**\n * Canonicalized PTableValue array JSON string\n * @deprecated Migrate to PlAgDataTableV2\n */\nexport type PTableRowKeyJson = CanonicalizedJson<PTableRowKey>;\n\n/** PlAgDataTable row */\nexport type PlAgDataTableRow = {\n /** Axis key is not present for heterogeneous axes */\n key?: PTableRowKey;\n /** Unique row identifier, created as canonicalize(key)! when key is present */\n id: PTableRowKeyJson | `${number}`;\n /** Row values by column; sheet axes and labeled axes are excluded */\n [field: `${number}` | `hC${number}`]: PTableValue;\n};\n\nexport type PTableKeyJson = CanonicalizedJson<PTableKey>;\n\n/** PlAgDataTableV2 row */\nexport type PlAgDataTableV2Row = {\n /** Axis key is not present for heterogeneous axes */\n key?: PTableKey;\n /** Unique row identifier, created as canonicalize(key)! when key is present */\n id: PTableKeyJson;\n /** Row values by column; sheet axes and labeled axes are excluded */\n [field: `${number}`]: PTableValue | PTableHidden;\n};\n\nexport type PlAgOverlayLoadingParams = {\n /**\n * Required flag, that shows catInBag icon with message if `true`, shows PlSplash component if `false`.\n */\n notReady?: boolean;\n /**\n * Prop to override default \"Loading\" text\n */\n loadingText?: string;\n /**\n * Prop to override default \"No datasource\" text (So why props name is notReady? Good question)\n */\n notReadyText?: string;\n /**\n * Use \"transparent\" to make table headers visible below the loading layer\n */\n overlayType?: 'transparent';\n};\n\nexport type PlAgOverlayNoRowsParams = {\n /**\n * Prop to override default \"Empty\" text\n */\n text?: string;\n};\n\nexport type PlDataTableSheetsSettings = {\n /** User-provided sheets for the sourceId */\n sheets: PlDataTableSheet[];\n /** Persisted selection for the sourceId */\n cachedState: PlDataTableSheetState[];\n};\n\nexport type PlDataTableSheetNormalized = {\n /** id of the axis */\n axisId: AxisId;\n /** sheet prefix */\n prefix: string;\n /** options to show in the filter dropdown */\n options: ListOptionBase<string | number>[];\n /** default (selected) value */\n defaultValue: string | number;\n};\n\nexport type PlDataTableColumnsInfo = {\n sourceId: null;\n columns: [];\n} | {\n sourceId: string;\n columns: PTableColumnSpec[];\n};\n"],"names":["usePlDataTableSettingsV2","sourceId","model","sheets","computed","modelValue","toValue","sourceIdValue","sheetsValue","canonicalizeJson"],"mappings":";;;AAyDO,SAASA,EAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnD,UAAAC;AAAA;AAAA,EAEA,OAAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,QAAAC;AACF,GAIuC;AACrC,SAAOC,EAAS,MAAM;AACd,UAAAC,IAAaC,EAAQJ,CAAK;AAChC,QAAID,GAAU;AACN,YAAAM,IAAgBD,EAAQL,CAAQ;AACtC,UAAIE,GAAQ;AACJ,cAAAK,IAAcF,EAAQH,CAAM;AAClC,eAAOI,KAAiBC,IACpB;AAAA,UACE,UAAUC,EAAiBF,CAAa;AAAA,UACxC,QAAQC;AAAA,UACR,OAAOH;AAAA,QAAA,IAET,EAAE,UAAU,KAAK;AAAA,MAAA;AAErB,eAAOE,IACH;AAAA,UACE,UAAUE,EAAiBF,CAAa;AAAA,UACxC,QAAQ,CAAC;AAAA,UACT,OAAOF;AAAA,QAAA,IAET,EAAE,UAAU,KAAK;AAAA,IACvB,WAEIF,GAAQ;AACJ,YAAAK,IAAcF,EAAQH,CAAM;AAClC,aAAOK,IACH;AAAA,QACE,UAAUC,EAAyB,QAAQ;AAAA,QAC3C,QAAQD;AAAA,QACR,OAAOH;AAAA,MAAA,IAET,EAAE,UAAU,KAAK;AAAA,IAAA;AAErB,aAAOA,IACH;AAAA,QACE,UAAUI,EAAyB,QAAQ;AAAA,QAC3C,QAAQ,CAAC;AAAA,QACT,OAAOJ;AAAA,MAAA,IAET,EAAE,UAAU,KAAK;AAAA,EAEzB,CACD;AACH;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../lib/model/common/src/drivers/blob.ts","../../../../../../../lib/model/common/src/drivers/pframe/data_types.ts","../../../../../../../lib/model/common/src/drivers/pframe/spec/spec.ts","../../../../../../../lib/model/common/src/ref.ts","../../../../../../../lib/model/common/src/base32-encode.ts","../../../../../../../lib/model/common/src/plid.ts","../../../../../../../lib/model/common/src/json.ts","../../../../../../../lib/model/common/src/errors.ts"],"sourcesContent":["import type { Branded } from '../branding';\nimport { z } from 'zod';\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, 'LocalBlobHandle'>;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, 'RemoteBlobHandle'>;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = | LocalBlobHandle\n | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less or equal than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number(),\n /** Excluded right border. */\n to: z.number(),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n return { from, to };\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.to < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /** Given the blob handle returns its content. Depending on the handle type,\n * content will be served from locally downloaded file, or directly from\n * remote platforma storage. */\n getContent(handle: LocalBlobHandle | RemoteBlobHandle, range?: RangeBytes): Promise<Uint8Array>;\n}\n","import type { ValueType } from './spec/spec';\n\nexport const PValueIntNA = -2147483648;\nexport const PValueLongNA = -9007199254740991n;\nexport const PValueFloatNA = NaN; // do not change, isNaN is used in other cases\nexport const PValueDoubleNA = NaN; // do not change, isNaN is used in other cases\nexport const PValueStringNA = null;\nexport const PValueBytesNA = null;\n\nexport type PValueInt = number;\nexport type PValueLong = number | bigint; // use bigint only if extra integer precision is needed\nexport type PValueFloat = number;\nexport type PValueDouble = number;\nexport type PValueString = string | null;\nexport type PValueBytes = Uint8Array | null;\n\nexport type NotNAPValueInt = number;\nexport type NotNAPValueLong = number | bigint; // use bigint only if extra integer precision is needed\nexport type NotNAPValueFloat = number;\nexport type NotNAPValueDouble = number;\nexport type NotNAPValueString = string;\n\nexport type NotNAPValue = number | bigint | string;\n\nexport type PValue =\n | PValueInt\n | PValueLong\n // Doesn't differ from PValueInt, TODO: branded types for these PValue* types?\n // | PValueFloat\n // | PValueDouble\n | PValueString\n | PValueBytes;\n\nexport function isValueNA(value: unknown, valueType: ValueType): boolean {\n switch (valueType) {\n case 'Int':\n return value === PValueIntNA;\n case 'Long':\n return value === Number(PValueLongNA) || value === PValueLongNA;\n case 'Float':\n return Number.isNaN(value);\n case 'Double':\n return Number.isNaN(value);\n case 'String':\n return value === PValueStringNA;\n case 'Bytes':\n return value === PValueBytesNA;\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\nexport function ensureNotNAPValue(value: string): string;\nexport function ensureNotNAPValue(value: number): number;\nexport function ensureNotNAPValue(value: bigint): bigint;\nexport function ensureNotNAPValue(value: unknown): NotNAPValue;\nexport function ensureNotNAPValue(value: unknown): NotNAPValue {\n if (!isNotNAPValue(value)) throw new Error(`Expected not-NA PValue, got ${value}`);\n return value;\n}\n\nexport function isNotNAPValue(value: unknown, valueType: 'Int'): value is number;\nexport function isNotNAPValue(value: unknown, valueType: 'Long'): value is number | bigint;\nexport function isNotNAPValue(value: unknown, valueType: 'Float'): value is number;\nexport function isNotNAPValue(value: unknown, valueType: 'Double'): value is number;\nexport function isNotNAPValue(value: unknown, valueType: 'String'): value is string;\nexport function isNotNAPValue(value: unknown, valueType: ValueType): value is NotNAPValue;\nexport function isNotNAPValue(value: unknown): value is NotNAPValue;\nexport function isNotNAPValue(value: unknown, valueType?: ValueType): boolean {\n if (!valueType)\n return (\n typeof value === 'string'\n || (typeof value === 'number' && isFinite(value))\n || typeof value === 'bigint'\n );\n if (isValueNA(value, valueType)) return false;\n switch (valueType) {\n case 'Int':\n return typeof value === 'number';\n case 'Long':\n return typeof value === 'number' || typeof value === 'bigint';\n case 'Float':\n return typeof value === 'number';\n case 'Double':\n return typeof value === 'number';\n case 'String':\n return typeof value === 'string';\n case 'Bytes':\n throw Error(`Bytes not yet supported`);\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\nexport function isPValue(value: unknown, valueType: 'Int'): value is PValueInt;\nexport function isPValue(value: unknown, valueType: 'Long'): value is PValueLong;\nexport function isPValue(value: unknown, valueType: 'Float'): value is PValueFloat;\nexport function isPValue(value: unknown, valueType: 'Double'): value is PValueDouble;\nexport function isPValue(value: unknown, valueType: 'String'): value is PValueString;\nexport function isPValue(value: unknown, valueType: ValueType): value is PValue;\nexport function isPValue(value: unknown): value is PValue;\nexport function isPValue(value: unknown, valueType?: ValueType): boolean {\n if (!valueType)\n return (\n value === null\n || typeof value === 'string'\n || typeof value === 'number'\n || typeof value === 'bigint'\n );\n if (isValueNA(value, valueType)) return true;\n switch (valueType) {\n case 'Int':\n return typeof value === 'number';\n case 'Long':\n return typeof value === 'number' || typeof value === 'bigint';\n case 'Float':\n return typeof value === 'number';\n case 'Double':\n return typeof value === 'number';\n case 'String':\n return typeof value === 'string';\n case 'Bytes':\n throw Error(`Bytes not yet supported`);\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\nexport type PValueLongJsonSafe = { bigint: string };\nexport type PValueJsonSafe = number | string | null | PValueLongJsonSafe;\n\n/**\n * Converts PValue to value that can be safely serialized by standard JSON.stringify\n * method. Use {@link safeConvertToPValue} to \"deserialize\" the value back to runtime\n * PValue representation.\n */\nexport function toJsonSafePValue(value: PValue): PValueJsonSafe {\n if (value === null || typeof value === 'string' || typeof value === 'number') return value;\n if (typeof value === 'bigint') return { bigint: value.toString() };\n throw new Error(`Type ${typeof value} (value ${value}) not yet supported.`);\n}\n\n/**\n * Can be used to \"deserialize\" result of {@link toJsonSafePValue} or to\n * safely cast any unknown value to actual runtime PValue representation.\n */\nexport function safeConvertToPValue(value: unknown, checkType?: ValueType): PValue {\n if (\n value === null\n || typeof value === 'string'\n || typeof value === 'number'\n || typeof value === 'bigint'\n ) {\n if (checkType && !isValueNA(value, checkType) && !isPValue(value, checkType))\n throw new Error(`Unexpected value type, got ${typeof value}, expected ${checkType}`);\n return value;\n }\n\n if (\n typeof value === 'object'\n && value !== null\n && 'bigint' in value\n && typeof value.bigint === 'string'\n ) {\n if (checkType && checkType !== 'Long')\n throw new Error(`Unexpected value type, got serialized bigint, expected ${checkType}`);\n\n return BigInt(value.bigint);\n }\n\n throw new Error(`Unsupported type ${typeof value} (value ${value}).`);\n}\n\nexport function pValueToStringOrNumber(value: string): string;\nexport function pValueToStringOrNumber(value: number | bigint): number;\nexport function pValueToStringOrNumber(value: PValue | PValueJsonSafe): string | number;\nexport function pValueToStringOrNumber(value: PValue | PValueJsonSafe): string | number {\n value = pValueToStringOrNumberOrNull(value);\n if (value === null) throw new Error('Value is null');\n return value;\n}\n\nexport function pValueToStringOrNumberOrNull(value: string | null): string;\nexport function pValueToStringOrNumberOrNull(value: number | bigint | null): number;\nexport function pValueToStringOrNumberOrNull(\n value: PValue | PValueJsonSafe\n): string | number | null;\nexport function pValueToStringOrNumberOrNull(\n value: PValue | PValueJsonSafe,\n): string | number | null {\n value = safeConvertToPValue(value);\n if (value === null) return null;\n if (typeof value === 'string') return value;\n if (typeof value === 'number') {\n if (!isFinite(value)) throw new Error(`Value is not finite (${value})`);\n return value;\n }\n if (typeof value === 'bigint') {\n // @TODO add range check\n return Number(value);\n }\n throw new Error(`Unexpected value type: ${typeof value}`);\n}\n\nexport type PVectorDataInt = Int32Array;\nexport type PVectorDataLong = BigInt64Array;\nexport type PVectorDataFloat = Float32Array;\nexport type PVectorDataDouble = Float64Array;\nexport type PVectorDataString = PValueString[];\nexport type PVectorDataBytes = PValueBytes[];\n\nexport type PVectorData =\n | PVectorDataInt\n | PVectorDataLong\n | PVectorDataFloat\n | PVectorDataDouble\n | PVectorDataString\n | PVectorDataBytes;\n\n/** Table column data in comparison to the data stored in a separate PColumn\n * may have some of the values \"absent\", i.e. as a result of missing record in\n * outer join operation. This information is encoded in {@link absent} field. */\nexport interface PTableVector {\n /** Stored data type */\n readonly type: ValueType;\n\n /** Values for present positions, absent positions have NA values */\n readonly data: PVectorData;\n\n /**\n * Encoded bit array marking some elements of this vector as absent,\n * call {@link isValueAbsent} to read the data.\n * */\n readonly absent: Uint8Array;\n}\n\n/** Used to read bit array with value absence information */\nexport function isValueAbsent(absent: Uint8Array, index: number): boolean {\n const chunkIndex = Math.floor(index / 8);\n const mask = 1 << (7 - (index % 8));\n return (absent[chunkIndex] & mask) > 0;\n}\n\nexport const PTableAbsent = { type: 'absent' } as const;\nexport type PTableAbsent = typeof PTableAbsent;\nexport const PTableNA = null;\nexport type PTableNA = typeof PTableNA;\n\n/** Decoded PTable value */\nexport type PTableValue = PTableAbsent | PTableNA | number | string;\n\n/** Type guard for absent PValue */\nexport function isPTableAbsent(value: PTableValue): value is PTableAbsent {\n return typeof value === 'object' && value !== null && value.type === 'absent';\n}\n\nexport type AbsentAndNAFill = {\n na?: PTableValue;\n absent?: PTableValue;\n};\n\n/** Read PTableValue from PTable column at specified row */\nexport function pTableValue(\n column: PTableVector,\n row: number,\n fill: AbsentAndNAFill = {},\n): PTableValue {\n if (isValueAbsent(column.absent, row))\n return fill.absent === undefined ? PTableAbsent : fill.absent;\n\n const value = column.data[row];\n const valueType = column.type;\n if (isValueNA(value, valueType)) return fill.na === undefined ? PTableNA : fill.na;\n\n switch (valueType) {\n case 'Int':\n return value as PVectorDataInt[number];\n case 'Long':\n return Number(value as PVectorDataLong[number]);\n case 'Float':\n return value as PVectorDataFloat[number];\n case 'Double':\n return value as PVectorDataDouble[number];\n case 'String':\n return value as PVectorDataString[number];\n case 'Bytes':\n throw Error(`Bytes not yet supported`);\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\n/** Used in requests to partially retrieve table's data */\nexport type TableRange = {\n /** Index of the first record to retrieve */\n readonly offset: number;\n\n /** Block length */\n readonly length: number;\n};\n\n/** Unified information about table shape */\nexport type PTableShape = {\n /** Number of unified table columns, including all axes and PColumn values */\n columns: number;\n\n /** Number of rows */\n rows: number;\n};\n","import type { PObject, PObjectId, PObjectSpec } from '../../../pool';\nimport canonicalize from 'canonicalize';\n\n/** PFrame columns and axes within them may store one of these types. */\nexport type ValueType = 'Int' | 'Long' | 'Float' | 'Double' | 'String' | 'Bytes';\n\n/**\n * Specification of an individual axis.\n *\n * Each axis is a part of a composite key that addresses data inside the PColumn.\n *\n * Each record inside a PColumn is addressed by a unique tuple of values set for\n * all the axes specified in the column spec.\n * */\nexport interface AxisSpec {\n /** Type of the axis value. Should not use non-key types like float or double. */\n readonly type: ValueType;\n\n /** Name of the axis */\n readonly name: string;\n\n /** Adds auxiliary information to the axis name, type and parents to form a\n * unique identifier */\n readonly domain?: Record<string, string>;\n\n /** Any additional information attached to the axis that does not affect its\n * identifier */\n readonly annotations?: Record<string, string>;\n\n /**\n * Parent axes provide contextual grouping for the axis in question, establishing\n * a hierarchy where the current axis is dependent on one or more axes for its\n * full definition and meaning. For instance, in a data structure where each\n * \"container\" axis may contain multiple \"item\" axes, the `item` axis would\n * list the index of the `container` axis in this field to denote its dependency.\n *\n * This means that the identity or significance of the `item` axis is only\n * interpretable when combined with its parent `container` axis. An `item` axis\n * index by itself may be non-unique and only gains uniqueness within the context\n * of its parent `container`. Therefore, the `parentAxes` field is essential for\n * mapping these relationships and ensuring data coherence across nested or\n * multi-level data models.\n *\n * A list of zero-based indices of parent axes in the overall axes specification\n * from the column spec. Each index corresponds to the position of a parent axis\n * in the list that defines the structure of the data model.\n */\n readonly parentAxes?: number[];\n}\n\n/** Common type representing spec for all the axes in a column */\nexport type AxesSpec = AxisSpec[];\n\n/**\n * Full column specification including all axes specs and specs of the column\n * itself.\n *\n * A PColumn in its essence represents a mapping from a fixed size, explicitly\n * typed tuple to an explicitly typed value.\n *\n * (axis1Value1, axis2Value1, ...) -> columnValue\n *\n * Each element in tuple correspond to the axis having the same index in axesSpec.\n * */\nexport interface PUniversalColumnSpec extends PObjectSpec {\n /** Defines specific type of BObject, the most generic type of unit of\n * information in Platforma Project. */\n readonly kind: 'PColumn';\n\n /** Type of column values */\n readonly valueType: string;\n\n /** Column name */\n readonly name: string;\n\n /** Adds auxiliary information to the axis name, type and parents to form a\n * unique identifier */\n readonly domain?: Record<string, string>;\n\n /** Any additional information attached to the column that does not affect its\n * identifier */\n readonly annotations?: Record<string, string>;\n\n /** A list of zero-based indices of parent axes from the {@link axesSpec} array. */\n readonly parentAxes?: number[];\n\n /** Axes specifications */\n readonly axesSpec: AxesSpec;\n}\n\n/**\n * Specification of a data column.\n *\n * Data column is a specialized type of PColumn that stores only simple values (strings and numbers)\n * addressed by multiple keys. This is in contrast to other PColumn variants that can store more complex\n * values like files or other abstract data types. Data columns are optimized for storing and processing\n * basic tabular data.\n */\nexport interface PDataColumnSpec extends PUniversalColumnSpec {\n /** Type of column values */\n readonly valueType: ValueType;\n}\n\n// @todo: change this to PUniversalColumnSpec\nexport type PColumnSpec = PDataColumnSpec;\n\n/** Unique PColumnSpec identifier */\nexport type PColumnSpecId = {\n /** Defines specific type of BObject, the most generic type of unit of\n * information in Platforma Project. */\n readonly kind: 'PColumn';\n\n /** Type of column values */\n readonly valueType: ValueType;\n\n /** Column name */\n readonly name: string;\n\n /** Adds auxiliary information to the axis name, type and parents to form a\n * unique identifier */\n readonly domain?: Record<string, string>;\n\n /** A list of zero-based indices of parent axes from the {@link axesSpec} array. */\n readonly parentAxes?: number[];\n\n /** Axes id */\n readonly axesId: AxesId;\n};\n\nexport function getPColumnSpecId(spec: PColumnSpec): PColumnSpecId {\n return {\n kind: spec.kind,\n valueType: spec.valueType,\n name: spec.name,\n domain: spec.domain,\n parentAxes: spec.parentAxes,\n axesId: getAxesId(spec.axesSpec),\n };\n}\n\nexport interface PColumn<Data> extends PObject<Data> {\n /** PColumn spec, allowing it to be found among other PObjects */\n readonly spec: PColumnSpec;\n}\n\n/** Columns in a PFrame also have internal identifier, this object represents\n * combination of specs and such id */\nexport interface PColumnIdAndSpec {\n /** Internal column id within the PFrame */\n readonly columnId: PObjectId;\n\n /** Column spec */\n readonly spec: PColumnSpec;\n}\n\n/** Get column id and spec from a column */\nexport function getColumnIdAndSpec<Data>(column: PColumn<Data>): PColumnIdAndSpec {\n return {\n columnId: column.id,\n spec: column.spec,\n };\n}\n\n/** Information returned by {@link PFrame.listColumns} method */\nexport interface PColumnInfo extends PColumnIdAndSpec {\n /** True if data was associated with this PColumn */\n readonly hasData: boolean;\n}\n\nexport interface AxisId {\n /** Type of the axis or column value. For an axis should not use non-key\n * types like float or double. */\n readonly type: ValueType;\n\n /** Name of the axis or column */\n readonly name: string;\n\n /** Adds auxiliary information to the axis or column name and type to form a\n * unique identifier */\n readonly domain?: Record<string, string>;\n}\n\n/** Array of axis ids */\nexport type AxesId = AxisId[];\n\n/** Extracts axis ids from axis spec */\nexport function getAxisId(spec: AxisSpec): AxisId {\n const { type, name, domain } = spec;\n const result = { type, name };\n if (domain && Object.entries(domain).length > 0) {\n Object.assign(result, { domain });\n }\n return result;\n}\n\n/** Extracts axes ids from axes spec array from column spec */\nexport function getAxesId(spec: AxesSpec): AxesId {\n return spec.map(getAxisId);\n}\n\n/**\n * Canonicalizes axis id\n * @deprecated Use {@link canonicalizeJson} instead to preserve type\n */\nexport function canonicalizeAxisId(id: AxisId): string {\n return canonicalize(getAxisId(id))!;\n}\n\n/** Returns true if all domains from query are found in target */\nfunction matchDomain(query?: Record<string, string>, target?: Record<string, string>) {\n if (query === undefined) return target === undefined;\n if (target === undefined) return true;\n for (const k in target) {\n if (query[k] !== target[k]) return false;\n }\n return true;\n}\n\n/** Returns whether \"match\" axis id is compatible with the \"query\" */\nexport function matchAxisId(query: AxisId, target: AxisId): boolean {\n return query.name === target.name && matchDomain(query.domain, target.domain);\n}\n","import { z } from 'zod';\n\nexport const PlRef = z\n .object({\n __isRef: z\n .literal(true)\n .describe('Crucial marker for the block dependency tree reconstruction'),\n blockId: z.string()\n .describe('Upstream block id'),\n name: z.string()\n .describe('Name of the output provided to the upstream block\\'s output context'),\n requireEnrichments: z.literal(true).optional()\n .describe('True if current block that stores this reference in its args, may need enrichments '\n + 'for the references value originating from the blocks in between current and referenced block'),\n })\n .describe(\n 'Universal reference type, allowing to set block connections. It is crucial that '\n + '{@link __isRef} is present and equal to true, internal logic relies on this marker '\n + 'to build block dependency trees.',\n )\n .readonly();\nexport type PlRef = z.infer<typeof PlRef>;\n/** @deprecated use {@link PlRef} */\nexport type Ref = PlRef;\n\n/**\n * Type guard to check if a value is a PlRef.\n *\n * @param value - The value to check.\n * @returns True if the value is a PlRef, false otherwise.\n */\nexport function isPlRef(value: unknown): value is PlRef {\n return (\n typeof value === 'object'\n && value !== null\n && '__isRef' in value\n && (value as { __isRef: unknown }).__isRef === true\n && 'blockId' in value\n && 'name' in value\n );\n}\n\n/** Standard way how to communicate possible connections given specific\n * requirements for incoming data. */\nexport type Option = {\n /** Fully rendered reference to be assigned for the intended field in block's\n * args */\n readonly ref: PlRef;\n\n /** Label to be present for the user in i.e. drop-down list */\n readonly label: string;\n};\n\n/**\n * Creates a PlRef with the given blockId and name.\n *\n * @param blockId - The blockId of the reference.\n * @param name - The name of the reference.\n * @param requireEnrichments - Whether the reference requires enrichments.\n */\nexport function createPlRef(blockId: string, name: string, requireEnrichments: boolean = false) {\n if (requireEnrichments)\n return {\n __isRef: true,\n blockId,\n name,\n requireEnrichments: true,\n };\n else\n return {\n __isRef: true,\n blockId,\n name,\n };\n}\n\n/**\n * Creates a new PlRef based on an existing one, explicitly setting (default) or removing the\n * requireEnrichments property.\n *\n * @param ref - The original PlRef object.\n * @param requireEnrichments - If true, the `requireEnrichments: true` property is added\n * to the returned PlRef. If false, the `requireEnrichments` property is removed. Defaults to true.\n * @returns A new PlRef object with the `requireEnrichments` property set or removed accordingly.\n */\nexport function withEnrichments(ref: PlRef, requireEnrichments: boolean = true): PlRef {\n if (requireEnrichments)\n return {\n ...ref,\n requireEnrichments: true,\n };\n else {\n const { requireEnrichments: _, ...rest } = ref;\n return rest;\n }\n}\n\n/** Compare two PlRefs and returns true if they are qual */\nexport function plRefsEqual(ref1: PlRef, ref2: PlRef, ignoreEnrichments: boolean = false) {\n return ref1.blockId === ref2.blockId && ref1.name === ref2.name && (ignoreEnrichments || ref1.requireEnrichments === ref2.requireEnrichments);\n}\n","type Data = Int8Array | Uint8Array | Uint8ClampedArray | ArrayBuffer;\n\nfunction toDataView(data: Data) {\n if (data instanceof Int8Array || data instanceof Uint8Array || data instanceof Uint8ClampedArray)\n return new DataView(data.buffer, data.byteOffset, data.byteLength);\n\n if (data instanceof ArrayBuffer) return new DataView(data);\n\n throw new TypeError(\n 'Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray',\n );\n}\n\ninterface Options {\n /** If set, forcefully enable or disable padding. The default behavior is to follow the default of the selected variant. */\n padding?: boolean;\n}\n\nconst RFC4648 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';\nconst RFC4648_HEX = '0123456789ABCDEFGHIJKLMNOPQRSTUV';\nconst CROCKFORD = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';\n\nexport function base32Encode(\n data: Data,\n variant: 'RFC3548' | 'RFC4648' | 'RFC4648-HEX' | 'Crockford',\n options?: Options,\n) {\n options = options || {};\n let alphabet, defaultPadding;\n\n switch (variant) {\n case 'RFC3548':\n case 'RFC4648':\n alphabet = RFC4648;\n defaultPadding = true;\n break;\n case 'RFC4648-HEX':\n alphabet = RFC4648_HEX;\n defaultPadding = true;\n break;\n case 'Crockford':\n alphabet = CROCKFORD;\n defaultPadding = false;\n break;\n default:\n throw new Error('Unknown base32 variant: ' + String(variant));\n }\n\n const padding = options.padding !== undefined ? options.padding : defaultPadding;\n const view = toDataView(data);\n\n let bits = 0;\n let value = 0;\n let output = '';\n\n for (let i = 0; i < view.byteLength; i++) {\n value = (value << 8) | view.getUint8(i);\n bits += 8;\n\n while (bits >= 5) {\n output += alphabet[(value >>> (bits - 5)) & 31];\n bits -= 5;\n }\n }\n\n if (bits > 0) output += alphabet[(value << (5 - bits)) & 31];\n\n if (padding)\n while (output.length % 8 !== 0) {\n output += '=';\n }\n\n return output;\n}\n","import { z } from 'zod';\nimport { base32Encode } from './base32-encode';\n\n/** Number of raw bytes in the PlId. */\nexport const PlIdBytes = 15;\n/** Characters in string representation */\nexport const PlIdLength = 24; // = 15 bytes * 8 bits / 5 bits per char in base32\n\nexport const PlId = z\n .string()\n .length(PlIdLength)\n .regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/) // RFC4648\n .brand('PlId');\nexport type PlId = z.infer<typeof PlId>;\n\nexport function uniquePlId(): PlId {\n const data = new Uint8Array(PlIdBytes);\n crypto.getRandomValues(data);\n return PlId.parse(base32Encode(data, 'RFC4648'));\n}\n\nexport function plId(bytes: Uint8Array): PlId {\n if (bytes.length !== PlIdBytes) throw new Error(`Wrong number of bytes: ${bytes.length}`);\n return PlId.parse(base32Encode(bytes, 'RFC4648'));\n}\n\nexport async function digestPlId(data: string): Promise<PlId> {\n const encoder = new TextEncoder();\n const bytes = await crypto.subtle.digest('SHA-256', encoder.encode(data));\n return plId(new Uint8Array(bytes.slice(0, 15)));\n}\n","import canonicalize from 'canonicalize';\n\ntype JsonPrimitive = string | number | boolean | null | undefined;\n\ntype JsonValue = JsonPrimitive | JsonValue[] | {\n [key: string]: JsonValue;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\ntype NotAssignableToJson = bigint | symbol | Function;\n\ntype JsonCompatible<T> = unknown extends T ? never : {\n [P in keyof T]:\n T[P] extends JsonValue ? T[P] :\n T[P] extends NotAssignableToJson ? never :\n JsonCompatible<T[P]>;\n};\n\nexport type StringifiedJson<T> = JsonCompatible<T> extends never ? never : string & {\n __json_stringified: T;\n};\n\nexport function stringifyJson<T>(value: JsonCompatible<T>): StringifiedJson<T> {\n return JSON.stringify(value)! as StringifiedJson<T>;\n}\n\nexport type CanonicalizedJson<T> = JsonCompatible<T> extends never ? never : string & {\n __json_canonicalized: T;\n};\n\nexport function canonicalizeJson<T>(value: JsonCompatible<T>): CanonicalizedJson<T> {\n return canonicalize(value)! as CanonicalizedJson<T>;\n}\n\nexport function parseJson<T>(value: StringifiedJson<T> | CanonicalizedJson<T>): T {\n return JSON.parse(value) as T;\n}\n","/**\n * Just for convenience, usually it is an Error with name 'AbortError'\n */\nexport class AbortError extends Error {\n name = 'AbortError';\n}\n\n/**\n * Throw this to show a message without stack trace in UI\n */\nexport class UiError extends Error {\n name = 'UiError';\n}\n\nexport function isAbortError(error: unknown): error is Error & { name: 'AbortError' } {\n return error instanceof Error && error.name === 'AbortError';\n}\n\nexport function hasAbortError(error: unknown): boolean {\n if (!(error instanceof Error)) {\n return false;\n }\n\n return error.name === 'AbortError' || hasAbortError(error.cause);\n}\n\nexport function isAggregateError(error: unknown): error is AggregateError {\n return error instanceof Error && error.name === 'AggregateError';\n}\n\nfunction stringifyValue(value: unknown): string {\n if (typeof value === 'string') {\n return `String value was thrown: ${value}`;\n }\n\n if (value && typeof value === 'object') {\n try {\n return `Plain object was thrown: ${JSON.stringify(value)}`;\n } catch (jsonError) {\n const errorMessage = jsonError instanceof Error ? jsonError.message : String(jsonError);\n return `Non-serializable object was thrown (JSON.stringify failed: ${errorMessage}): ${String(value)}`;\n }\n }\n\n return String(`Non-Error value (${typeof value}) was thrown: ${value}`);\n}\n\nexport function ensureError(value: unknown): Error {\n if (value instanceof Error) {\n return value;\n }\n\n return new Error(stringifyValue(value));\n}\n\n// Error serialization for IPC/network transmission (Error objects can't be JSON serialized)\n\nexport type SerializedError = {\n name: string;\n message: string;\n stack: string | undefined;\n cause?: SerializedError;\n};\n\nexport function deserializeError(obj: SerializedError): Error {\n const cause = obj.cause ? deserializeError(obj.cause) : undefined;\n\n const error = new Error(obj.message, cause !== undefined ? { cause } : undefined);\n error.name = obj.name || 'Error';\n error.stack = obj.stack;\n\n return error;\n}\n\nexport function serializeError(e: unknown): SerializedError {\n const error = ensureError(e);\n const cause = error.cause ? serializeError(error.cause) : undefined;\n\n return {\n name: error.name,\n message: error.message,\n stack: error.stack,\n ...(error.cause !== undefined && { cause }),\n };\n}\n\nexport type ResultOrError<S, F = Error> = {\n value: S;\n error?: undefined;\n} | {\n error: F;\n};\n\nexport function unwrapResult<T>(result: ResultOrError<T>): T {\n if (result.error) {\n throw result.error;\n }\n return result.value;\n}\n\nexport function serializeResult<T>(result: ResultOrError<T>): ResultOrError<T, SerializedError> {\n if (result.error) {\n return { error: serializeError(result.error) };\n }\n return { value: result.value };\n}\n\nexport function deserializeResult<T>(result: ResultOrError<T, SerializedError>): ResultOrError<T> {\n if (result.error) {\n return { error: deserializeError(result.error) };\n }\n return { value: result.value };\n}\n\nexport function wrapCallback<T>(callback: () => T): ResultOrError<T> {\n try {\n const value = callback();\n return { value };\n } catch (error) {\n return { error: ensureError(error) };\n }\n}\n\nexport async function wrapAsyncCallback<T>(callback: () => Promise<T>): Promise<ResultOrError<T>> {\n try {\n const value = await callback();\n return { value };\n } catch (error) {\n return { error: ensureError(error) };\n }\n}\n\nexport function wrapAndSerialize<T>(callback: () => T): ResultOrError<T, SerializedError> {\n const result = wrapCallback(callback);\n return serializeResult(result);\n}\n\nexport async function wrapAndSerializeAsync<T>(callback: () => Promise<T>): Promise<ResultOrError<T, SerializedError>> {\n const result = await wrapAsyncCallback(callback);\n return serializeResult(result);\n}\n"],"names":["z","PValueIntNA","PValueLongNA","PValueStringNA","PValueBytesNA","isValueNA","value","valueType","isValueAbsent","absent","index","chunkIndex","mask","PTableAbsent","PTableNA","isPTableAbsent","pTableValue","column","row","fill","getAxisId","spec","type","name","domain","result","matchDomain","query","target","k","matchAxisId","toDataView","data","RFC4648","RFC4648_HEX","CROCKFORD","base32Encode","variant","options","alphabet","defaultPadding","padding","view","bits","output","i","PlIdBytes","PlIdLength","PlId","uniquePlId","canonicalizeJson","canonicalize","parseJson","stringifyValue","jsonError","ensureError"],"mappings":";;AAyB0BA,EAAE,OAAO;AAAA;AAAA,EAEjC,MAAMA,EAAE,OAAO;AAAA;AAAA,EAEf,IAAIA,EAAE,OAAO;AACf,CAAC;AC5BYC,MAAAA,IAAc,aACdC,IAAe,CAAC,mBAGhBC,IAAiB,MACjBC,IAAgB;AA0Bb,SAAAC,EAAUC,GAAgBC,GAA+B;AACvE,UAAQA,GAAW;AAAA,IACjB,KAAK;AACH,aAAOD,MAAUL;AAAAA,IACnB,KAAK;AACH,aAAOK,MAAU,OAAOJ,CAAY,KAAKI,MAAUJ;AAAAA,IACrD,KAAK;AACI,aAAA,OAAO,MAAMI,CAAK;AAAA,IAC3B,KAAK;AACI,aAAA,OAAO,MAAMA,CAAK;AAAA,IAC3B,KAAK;AACH,aAAOA,MAAUH;AAAAA,IACnB,KAAK;AACH,aAAOG,MAAUF;AAAAA,IACnB;AACQ,YAAA,MAAM,0BAA0BG,CAAyB,EAAE;AAAA,EAAA;AAEvE;AA2LgB,SAAAC,EAAcC,GAAoBC,GAAwB;AAClEC,QAAAA,IAAa,KAAK,MAAMD,IAAQ,CAAC,GACjCE,IAAO,KAAM,IAAKF,IAAQ;AACxBD,UAAAA,EAAOE,CAAU,IAAIC,KAAQ;AACvC;AAEa,MAAAC,IA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,KAAA,GAEDA,KAAQ;AACbC,MAAAA,KAAUL,EAAUjC,MAAWqC,IAAO,IAAM,EAAE,GACtCA,KAAA;AAIRA,MAAAA,IAAO,MAAGC,KAAUL,EAAUjC,KAAU,IAAIqC,IAAS,EAAE,IAEvDF;AACKG,WAAAA,EAAO,SAAS,MAAM;AACjBA,MAAAA,KAAA;AAGPA,SAAAA;AACT;ACrEO,MAAME,IAAY,IAEZC,IAAa,IAEbC,IAAOhD,EACjB,OAAA,EACA,OAAO+C,CAAU,EACjB,MAAM,oCAAoC,EAC1C,MAAM,MAAM;AAGR,SAASE,IAAmB;AAC3BjB,QAAAA,IAAO,IAAI,WAAWc,CAAS;AAC9B,SAAA,OAAA,gBAAgBd,CAAI,GACpBgB,EAAK,MAAMZ,EAAaJ,GAAM,SAAS,CAAC;AACjD;ACWO,SAASkB,EAAoB5C,GAAgD;AAClF,SAAO6C,EAAa7C,CAAK;AAC3B;AAEO,SAAS8C,EAAa9C,GAAqD;AACzE,SAAA,KAAK,MAAMA,CAAK;AACzB;ACNA,SAAS+C,EAAe/C,GAAwB;AAC1C,MAAA,OAAOA,KAAU;AACnB,WAAO,4BAA4BA,CAAK;AAGtCA,MAAAA,KAAS,OAAOA,KAAU;AACxB,QAAA;AACF,aAAO,4BAA4B,KAAK,UAAUA,CAAK,CAAC;AAAA,IAAA,SACjDgD,GAAW;AAEX,aAAA,8DADcA,aAAqB,QAAQA,EAAU,UAAU,OAAOA,CAAS,CACL,MAAM,OAAOhD,CAAK,CAAC;AAAA,IAAA;AAIxG,SAAc,oBAAoB,OAAOA,CAAK,iBAAiBA,CAAK;AACtE;AAEO,SAASiD,EAAYjD,GAAuB;AACjD,SAAIA,aAAiB,QACZA,IAGF,IAAI,MAAM+C,EAAe/C,CAAK,CAAC;AACxC;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../lib/model/common/src/drivers/blob.ts","../../../../../../../lib/model/common/src/drivers/pframe/data_types.ts","../../../../../../../lib/model/common/src/drivers/pframe/spec/spec.ts","../../../../../../../lib/model/common/src/ref.ts","../../../../../../../lib/model/common/src/base32-encode.ts","../../../../../../../lib/model/common/src/plid.ts","../../../../../../../lib/model/common/src/json.ts","../../../../../../../lib/model/common/src/errors.ts"],"sourcesContent":["import type { Branded } from '../branding';\nimport { z } from 'zod';\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, 'LocalBlobHandle'>;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, 'RemoteBlobHandle'>;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = | LocalBlobHandle\n | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less or equal than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number(),\n /** Excluded right border. */\n to: z.number(),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n return { from, to };\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.to < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /** Given the blob handle returns its content. Depending on the handle type,\n * content will be served from locally downloaded file, or directly from\n * remote platforma storage. */\n getContent(handle: LocalBlobHandle | RemoteBlobHandle, range?: RangeBytes): Promise<Uint8Array>;\n}\n","import type { ValueType } from './spec/spec';\n\nexport const PValueIntNA = -2147483648;\nexport const PValueLongNA = -9007199254740991n;\nexport const PValueFloatNA = NaN; // do not change, isNaN is used in other cases\nexport const PValueDoubleNA = NaN; // do not change, isNaN is used in other cases\nexport const PValueStringNA = null;\nexport const PValueBytesNA = null;\n\nexport type PValueInt = number;\nexport type PValueLong = number | bigint; // use bigint only if extra integer precision is needed\nexport type PValueFloat = number;\nexport type PValueDouble = number;\nexport type PValueString = string | null;\nexport type PValueBytes = Uint8Array | null;\n\nexport type NotNAPValueInt = number;\nexport type NotNAPValueLong = number | bigint; // use bigint only if extra integer precision is needed\nexport type NotNAPValueFloat = number;\nexport type NotNAPValueDouble = number;\nexport type NotNAPValueString = string;\n\nexport type NotNAPValue = number | bigint | string;\n\nexport type PValue =\n | PValueInt\n | PValueLong\n // Doesn't differ from PValueInt, TODO: branded types for these PValue* types?\n // | PValueFloat\n // | PValueDouble\n | PValueString\n | PValueBytes;\n\nexport function isValueNA(value: unknown, valueType: ValueType): boolean {\n switch (valueType) {\n case 'Int':\n return value === PValueIntNA;\n case 'Long':\n return value === Number(PValueLongNA) || value === PValueLongNA;\n case 'Float':\n return Number.isNaN(value);\n case 'Double':\n return Number.isNaN(value);\n case 'String':\n return value === PValueStringNA;\n case 'Bytes':\n return value === PValueBytesNA;\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\nexport function ensureNotNAPValue(value: string): string;\nexport function ensureNotNAPValue(value: number): number;\nexport function ensureNotNAPValue(value: bigint): bigint;\nexport function ensureNotNAPValue(value: unknown): NotNAPValue;\nexport function ensureNotNAPValue(value: unknown): NotNAPValue {\n if (!isNotNAPValue(value)) throw new Error(`Expected not-NA PValue, got ${value}`);\n return value;\n}\n\nexport function isNotNAPValue(value: unknown, valueType: 'Int'): value is number;\nexport function isNotNAPValue(value: unknown, valueType: 'Long'): value is number | bigint;\nexport function isNotNAPValue(value: unknown, valueType: 'Float'): value is number;\nexport function isNotNAPValue(value: unknown, valueType: 'Double'): value is number;\nexport function isNotNAPValue(value: unknown, valueType: 'String'): value is string;\nexport function isNotNAPValue(value: unknown, valueType: ValueType): value is NotNAPValue;\nexport function isNotNAPValue(value: unknown): value is NotNAPValue;\nexport function isNotNAPValue(value: unknown, valueType?: ValueType): boolean {\n if (!valueType)\n return (\n typeof value === 'string'\n || (typeof value === 'number' && isFinite(value))\n || typeof value === 'bigint'\n );\n if (isValueNA(value, valueType)) return false;\n switch (valueType) {\n case 'Int':\n return typeof value === 'number';\n case 'Long':\n return typeof value === 'number' || typeof value === 'bigint';\n case 'Float':\n return typeof value === 'number';\n case 'Double':\n return typeof value === 'number';\n case 'String':\n return typeof value === 'string';\n case 'Bytes':\n throw Error(`Bytes not yet supported`);\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\nexport function isPValue(value: unknown, valueType: 'Int'): value is PValueInt;\nexport function isPValue(value: unknown, valueType: 'Long'): value is PValueLong;\nexport function isPValue(value: unknown, valueType: 'Float'): value is PValueFloat;\nexport function isPValue(value: unknown, valueType: 'Double'): value is PValueDouble;\nexport function isPValue(value: unknown, valueType: 'String'): value is PValueString;\nexport function isPValue(value: unknown, valueType: ValueType): value is PValue;\nexport function isPValue(value: unknown): value is PValue;\nexport function isPValue(value: unknown, valueType?: ValueType): boolean {\n if (!valueType)\n return (\n value === null\n || typeof value === 'string'\n || typeof value === 'number'\n || typeof value === 'bigint'\n );\n if (isValueNA(value, valueType)) return true;\n switch (valueType) {\n case 'Int':\n return typeof value === 'number';\n case 'Long':\n return typeof value === 'number' || typeof value === 'bigint';\n case 'Float':\n return typeof value === 'number';\n case 'Double':\n return typeof value === 'number';\n case 'String':\n return typeof value === 'string';\n case 'Bytes':\n throw Error(`Bytes not yet supported`);\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\nexport type PValueLongJsonSafe = { bigint: string };\nexport type PValueJsonSafe = number | string | null | PValueLongJsonSafe;\n\n/**\n * Converts PValue to value that can be safely serialized by standard JSON.stringify\n * method. Use {@link safeConvertToPValue} to \"deserialize\" the value back to runtime\n * PValue representation.\n */\nexport function toJsonSafePValue(value: PValue): PValueJsonSafe {\n if (value === null || typeof value === 'string' || typeof value === 'number') return value;\n if (typeof value === 'bigint') return { bigint: value.toString() };\n throw new Error(`Type ${typeof value} (value ${value}) not yet supported.`);\n}\n\n/**\n * Can be used to \"deserialize\" result of {@link toJsonSafePValue} or to\n * safely cast any unknown value to actual runtime PValue representation.\n */\nexport function safeConvertToPValue(value: unknown, checkType?: ValueType): PValue {\n if (\n value === null\n || typeof value === 'string'\n || typeof value === 'number'\n || typeof value === 'bigint'\n ) {\n if (checkType && !isValueNA(value, checkType) && !isPValue(value, checkType))\n throw new Error(`Unexpected value type, got ${typeof value}, expected ${checkType}`);\n return value;\n }\n\n if (\n typeof value === 'object'\n && value !== null\n && 'bigint' in value\n && typeof value.bigint === 'string'\n ) {\n if (checkType && checkType !== 'Long')\n throw new Error(`Unexpected value type, got serialized bigint, expected ${checkType}`);\n\n return BigInt(value.bigint);\n }\n\n throw new Error(`Unsupported type ${typeof value} (value ${value}).`);\n}\n\nexport function pValueToStringOrNumber(value: string): string;\nexport function pValueToStringOrNumber(value: number | bigint): number;\nexport function pValueToStringOrNumber(value: PValue | PValueJsonSafe): string | number;\nexport function pValueToStringOrNumber(value: PValue | PValueJsonSafe): string | number {\n value = pValueToStringOrNumberOrNull(value);\n if (value === null) throw new Error('Value is null');\n return value;\n}\n\nexport function pValueToStringOrNumberOrNull(value: string | null): string;\nexport function pValueToStringOrNumberOrNull(value: number | bigint | null): number;\nexport function pValueToStringOrNumberOrNull(\n value: PValue | PValueJsonSafe\n): string | number | null;\nexport function pValueToStringOrNumberOrNull(\n value: PValue | PValueJsonSafe,\n): string | number | null {\n value = safeConvertToPValue(value);\n if (value === null) return null;\n if (typeof value === 'string') return value;\n if (typeof value === 'number') {\n if (!isFinite(value)) throw new Error(`Value is not finite (${value})`);\n return value;\n }\n if (typeof value === 'bigint') {\n // @TODO add range check\n return Number(value);\n }\n throw new Error(`Unexpected value type: ${typeof value}`);\n}\n\nexport type PVectorDataInt = Int32Array;\nexport type PVectorDataLong = BigInt64Array;\nexport type PVectorDataFloat = Float32Array;\nexport type PVectorDataDouble = Float64Array;\nexport type PVectorDataString = PValueString[];\nexport type PVectorDataBytes = PValueBytes[];\n\nexport type PVectorData =\n | PVectorDataInt\n | PVectorDataLong\n | PVectorDataFloat\n | PVectorDataDouble\n | PVectorDataString\n | PVectorDataBytes;\n\n/** Table column data in comparison to the data stored in a separate PColumn\n * may have some of the values \"absent\", i.e. as a result of missing record in\n * outer join operation. This information is encoded in {@link absent} field. */\nexport interface PTableVector {\n /** Stored data type */\n readonly type: ValueType;\n\n /** Values for present positions, absent positions have NA values */\n readonly data: PVectorData;\n\n /**\n * Encoded bit array marking some elements of this vector as absent,\n * call {@link isValueAbsent} to read the data.\n * */\n readonly absent: Uint8Array;\n}\n\n/** Used to read bit array with value absence information */\nexport function isValueAbsent(absent: Uint8Array, index: number): boolean {\n const chunkIndex = Math.floor(index / 8);\n const mask = 1 << (7 - (index % 8));\n return (absent[chunkIndex] & mask) > 0;\n}\n\nexport const PTableAbsent = { type: 'absent' } as const;\nexport type PTableAbsent = typeof PTableAbsent;\nexport const PTableNA = null;\nexport type PTableNA = typeof PTableNA;\n\n/** Decoded PTable value */\nexport type PTableValue = PTableAbsent | PTableNA | number | string;\n\n/** Type guard for absent PValue */\nexport function isPTableAbsent(value: PTableValue): value is PTableAbsent {\n return typeof value === 'object' && value !== null && value.type === 'absent';\n}\n\nexport type AbsentAndNAFill = {\n na?: PTableValue;\n absent?: PTableValue;\n};\n\n/** Read PTableValue from PTable column at specified row */\nexport function pTableValue(\n column: PTableVector,\n row: number,\n fill: AbsentAndNAFill = {},\n): PTableValue {\n if (isValueAbsent(column.absent, row))\n return fill.absent === undefined ? PTableAbsent : fill.absent;\n\n const value = column.data[row];\n const valueType = column.type;\n if (isValueNA(value, valueType)) return fill.na === undefined ? PTableNA : fill.na;\n\n switch (valueType) {\n case 'Int':\n return value as PVectorDataInt[number];\n case 'Long':\n return Number(value as PVectorDataLong[number]);\n case 'Float':\n return value as PVectorDataFloat[number];\n case 'Double':\n return value as PVectorDataDouble[number];\n case 'String':\n return value as PVectorDataString[number];\n case 'Bytes':\n throw Error(`Bytes not yet supported`);\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\n/** Used in requests to partially retrieve table's data */\nexport type TableRange = {\n /** Index of the first record to retrieve */\n readonly offset: number;\n\n /** Block length */\n readonly length: number;\n};\n\n/** Unified information about table shape */\nexport type PTableShape = {\n /** Number of unified table columns, including all axes and PColumn values */\n columns: number;\n\n /** Number of rows */\n rows: number;\n};\n","import type { PObject, PObjectId, PObjectSpec } from '../../../pool';\nimport canonicalize from 'canonicalize';\n\n/** PFrame columns and axes within them may store one of these types. */\nexport type ValueType = 'Int' | 'Long' | 'Float' | 'Double' | 'String' | 'Bytes';\n\n/**\n * Specification of an individual axis.\n *\n * Each axis is a part of a composite key that addresses data inside the PColumn.\n *\n * Each record inside a PColumn is addressed by a unique tuple of values set for\n * all the axes specified in the column spec.\n * */\nexport interface AxisSpec {\n /** Type of the axis value. Should not use non-key types like float or double. */\n readonly type: ValueType;\n\n /** Name of the axis */\n readonly name: string;\n\n /** Adds auxiliary information to the axis name, type and parents to form a\n * unique identifier */\n readonly domain?: Record<string, string>;\n\n /** Any additional information attached to the axis that does not affect its\n * identifier */\n readonly annotations?: Record<string, string>;\n\n /**\n * Parent axes provide contextual grouping for the axis in question, establishing\n * a hierarchy where the current axis is dependent on one or more axes for its\n * full definition and meaning. For instance, in a data structure where each\n * \"container\" axis may contain multiple \"item\" axes, the `item` axis would\n * list the index of the `container` axis in this field to denote its dependency.\n *\n * This means that the identity or significance of the `item` axis is only\n * interpretable when combined with its parent `container` axis. An `item` axis\n * index by itself may be non-unique and only gains uniqueness within the context\n * of its parent `container`. Therefore, the `parentAxes` field is essential for\n * mapping these relationships and ensuring data coherence across nested or\n * multi-level data models.\n *\n * A list of zero-based indices of parent axes in the overall axes specification\n * from the column spec. Each index corresponds to the position of a parent axis\n * in the list that defines the structure of the data model.\n */\n readonly parentAxes?: number[];\n}\n\n/** Common type representing spec for all the axes in a column */\nexport type AxesSpec = AxisSpec[];\n\n/**\n * Full column specification including all axes specs and specs of the column\n * itself.\n *\n * A PColumn in its essence represents a mapping from a fixed size, explicitly\n * typed tuple to an explicitly typed value.\n *\n * (axis1Value1, axis2Value1, ...) -> columnValue\n *\n * Each element in tuple correspond to the axis having the same index in axesSpec.\n * */\nexport interface PUniversalColumnSpec extends PObjectSpec {\n /** Defines specific type of BObject, the most generic type of unit of\n * information in Platforma Project. */\n readonly kind: 'PColumn';\n\n /** Type of column values */\n readonly valueType: string;\n\n /** Column name */\n readonly name: string;\n\n /** Adds auxiliary information to the axis name, type and parents to form a\n * unique identifier */\n readonly domain?: Record<string, string>;\n\n /** Any additional information attached to the column that does not affect its\n * identifier */\n readonly annotations?: Record<string, string>;\n\n /** A list of zero-based indices of parent axes from the {@link axesSpec} array. */\n readonly parentAxes?: number[];\n\n /** Axes specifications */\n readonly axesSpec: AxesSpec;\n}\n\n/**\n * Specification of a data column.\n *\n * Data column is a specialized type of PColumn that stores only simple values (strings and numbers)\n * addressed by multiple keys. This is in contrast to other PColumn variants that can store more complex\n * values like files or other abstract data types. Data columns are optimized for storing and processing\n * basic tabular data.\n */\nexport interface PDataColumnSpec extends PUniversalColumnSpec {\n /** Type of column values */\n readonly valueType: ValueType;\n}\n\n// @todo: change this to PUniversalColumnSpec\nexport type PColumnSpec = PDataColumnSpec;\n\n/** Unique PColumnSpec identifier */\nexport type PColumnSpecId = {\n /** Defines specific type of BObject, the most generic type of unit of\n * information in Platforma Project. */\n readonly kind: 'PColumn';\n\n /** Type of column values */\n readonly valueType: ValueType;\n\n /** Column name */\n readonly name: string;\n\n /** Adds auxiliary information to the axis name, type and parents to form a\n * unique identifier */\n readonly domain?: Record<string, string>;\n\n /** A list of zero-based indices of parent axes from the {@link axesSpec} array. */\n readonly parentAxes?: number[];\n\n /** Axes id */\n readonly axesId: AxesId;\n};\n\nexport function getPColumnSpecId(spec: PColumnSpec): PColumnSpecId {\n return {\n kind: spec.kind,\n valueType: spec.valueType,\n name: spec.name,\n domain: spec.domain,\n parentAxes: spec.parentAxes,\n axesId: getAxesId(spec.axesSpec),\n };\n}\n\nexport interface PColumn<Data> extends PObject<Data> {\n /** PColumn spec, allowing it to be found among other PObjects */\n readonly spec: PColumnSpec;\n}\n\n/** Columns in a PFrame also have internal identifier, this object represents\n * combination of specs and such id */\nexport interface PColumnIdAndSpec {\n /** Internal column id within the PFrame */\n readonly columnId: PObjectId;\n\n /** Column spec */\n readonly spec: PColumnSpec;\n}\n\n/** Get column id and spec from a column */\nexport function getColumnIdAndSpec<Data>(column: PColumn<Data>): PColumnIdAndSpec {\n return {\n columnId: column.id,\n spec: column.spec,\n };\n}\n\n/** Information returned by {@link PFrame.listColumns} method */\nexport interface PColumnInfo extends PColumnIdAndSpec {\n /** True if data was associated with this PColumn */\n readonly hasData: boolean;\n}\n\nexport interface AxisId {\n /** Type of the axis or column value. For an axis should not use non-key\n * types like float or double. */\n readonly type: ValueType;\n\n /** Name of the axis or column */\n readonly name: string;\n\n /** Adds auxiliary information to the axis or column name and type to form a\n * unique identifier */\n readonly domain?: Record<string, string>;\n}\n\n/** Array of axis ids */\nexport type AxesId = AxisId[];\n\n/** Extracts axis ids from axis spec */\nexport function getAxisId(spec: AxisSpec): AxisId {\n const { type, name, domain } = spec;\n const result = { type, name };\n if (domain && Object.entries(domain).length > 0) {\n Object.assign(result, { domain });\n }\n return result;\n}\n\n/** Extracts axes ids from axes spec array from column spec */\nexport function getAxesId(spec: AxesSpec): AxesId {\n return spec.map(getAxisId);\n}\n\n/**\n * Canonicalizes axis id\n * @deprecated Use {@link canonicalizeJson} instead to preserve type\n */\nexport function canonicalizeAxisId(id: AxisId): string {\n return canonicalize(getAxisId(id))!;\n}\n\n/** Returns true if all domains from query are found in target */\nfunction matchDomain(query?: Record<string, string>, target?: Record<string, string>) {\n if (query === undefined) return target === undefined;\n if (target === undefined) return true;\n for (const k in target) {\n if (query[k] !== target[k]) return false;\n }\n return true;\n}\n\n/** Returns whether \"match\" axis id is compatible with the \"query\" */\nexport function matchAxisId(query: AxisId, target: AxisId): boolean {\n return query.name === target.name && matchDomain(query.domain, target.domain);\n}\n","import { z } from 'zod';\n\nexport const PlRef = z\n .object({\n __isRef: z\n .literal(true)\n .describe('Crucial marker for the block dependency tree reconstruction'),\n blockId: z.string()\n .describe('Upstream block id'),\n name: z.string()\n .describe('Name of the output provided to the upstream block\\'s output context'),\n requireEnrichments: z.literal(true).optional()\n .describe('True if current block that stores this reference in its args, may need enrichments '\n + 'for the references value originating from the blocks in between current and referenced block'),\n })\n .describe(\n 'Universal reference type, allowing to set block connections. It is crucial that '\n + '{@link __isRef} is present and equal to true, internal logic relies on this marker '\n + 'to build block dependency trees.',\n )\n .readonly();\nexport type PlRef = z.infer<typeof PlRef>;\n/** @deprecated use {@link PlRef} */\nexport type Ref = PlRef;\n\n/**\n * Type guard to check if a value is a PlRef.\n *\n * @param value - The value to check.\n * @returns True if the value is a PlRef, false otherwise.\n */\nexport function isPlRef(value: unknown): value is PlRef {\n return (\n typeof value === 'object'\n && value !== null\n && '__isRef' in value\n && (value as { __isRef: unknown }).__isRef === true\n && 'blockId' in value\n && 'name' in value\n );\n}\n\n/** Standard way how to communicate possible connections given specific\n * requirements for incoming data. */\nexport type Option = {\n /** Fully rendered reference to be assigned for the intended field in block's\n * args */\n readonly ref: PlRef;\n\n /** Label to be present for the user in i.e. drop-down list */\n readonly label: string;\n};\n\n/**\n * Creates a PlRef with the given blockId and name.\n *\n * @param blockId - The blockId of the reference.\n * @param name - The name of the reference.\n * @param requireEnrichments - Whether the reference requires enrichments.\n */\nexport function createPlRef(blockId: string, name: string, requireEnrichments: boolean = false) {\n if (requireEnrichments)\n return {\n __isRef: true,\n blockId,\n name,\n requireEnrichments: true,\n };\n else\n return {\n __isRef: true,\n blockId,\n name,\n };\n}\n\n/**\n * Creates a new PlRef based on an existing one, explicitly setting (default) or removing the\n * requireEnrichments property.\n *\n * @param ref - The original PlRef object.\n * @param requireEnrichments - If true, the `requireEnrichments: true` property is added\n * to the returned PlRef. If false, the `requireEnrichments` property is removed. Defaults to true.\n * @returns A new PlRef object with the `requireEnrichments` property set or removed accordingly.\n */\nexport function withEnrichments(ref: PlRef, requireEnrichments: boolean = true): PlRef {\n if (requireEnrichments)\n return {\n ...ref,\n requireEnrichments: true,\n };\n else {\n const { requireEnrichments: _, ...rest } = ref;\n return rest;\n }\n}\n\n/** Compare two PlRefs and returns true if they are qual */\nexport function plRefsEqual(ref1: PlRef, ref2: PlRef, ignoreEnrichments: boolean = false) {\n return ref1.blockId === ref2.blockId && ref1.name === ref2.name && (ignoreEnrichments || ref1.requireEnrichments === ref2.requireEnrichments);\n}\n","type Data = Int8Array | Uint8Array | Uint8ClampedArray | ArrayBuffer;\n\nfunction toDataView(data: Data) {\n if (data instanceof Int8Array || data instanceof Uint8Array || data instanceof Uint8ClampedArray)\n return new DataView(data.buffer, data.byteOffset, data.byteLength);\n\n if (data instanceof ArrayBuffer) return new DataView(data);\n\n throw new TypeError(\n 'Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray',\n );\n}\n\ninterface Options {\n /** If set, forcefully enable or disable padding. The default behavior is to follow the default of the selected variant. */\n padding?: boolean;\n}\n\nconst RFC4648 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';\nconst RFC4648_HEX = '0123456789ABCDEFGHIJKLMNOPQRSTUV';\nconst CROCKFORD = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';\n\nexport function base32Encode(\n data: Data,\n variant: 'RFC3548' | 'RFC4648' | 'RFC4648-HEX' | 'Crockford',\n options?: Options,\n) {\n options = options || {};\n let alphabet, defaultPadding;\n\n switch (variant) {\n case 'RFC3548':\n case 'RFC4648':\n alphabet = RFC4648;\n defaultPadding = true;\n break;\n case 'RFC4648-HEX':\n alphabet = RFC4648_HEX;\n defaultPadding = true;\n break;\n case 'Crockford':\n alphabet = CROCKFORD;\n defaultPadding = false;\n break;\n default:\n throw new Error('Unknown base32 variant: ' + String(variant));\n }\n\n const padding = options.padding !== undefined ? options.padding : defaultPadding;\n const view = toDataView(data);\n\n let bits = 0;\n let value = 0;\n let output = '';\n\n for (let i = 0; i < view.byteLength; i++) {\n value = (value << 8) | view.getUint8(i);\n bits += 8;\n\n while (bits >= 5) {\n output += alphabet[(value >>> (bits - 5)) & 31];\n bits -= 5;\n }\n }\n\n if (bits > 0) output += alphabet[(value << (5 - bits)) & 31];\n\n if (padding)\n while (output.length % 8 !== 0) {\n output += '=';\n }\n\n return output;\n}\n","import { z } from 'zod';\nimport { base32Encode } from './base32-encode';\n\n/** Number of raw bytes in the PlId. */\nexport const PlIdBytes = 15;\n/** Characters in string representation */\nexport const PlIdLength = 24; // = 15 bytes * 8 bits / 5 bits per char in base32\n\nexport const PlId = z\n .string()\n .length(PlIdLength)\n .regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/) // RFC4648\n .brand('PlId');\nexport type PlId = z.infer<typeof PlId>;\n\nexport function uniquePlId(): PlId {\n const data = new Uint8Array(PlIdBytes);\n crypto.getRandomValues(data);\n return PlId.parse(base32Encode(data, 'RFC4648'));\n}\n\nexport function plId(bytes: Uint8Array): PlId {\n if (bytes.length !== PlIdBytes) throw new Error(`Wrong number of bytes: ${bytes.length}`);\n return PlId.parse(base32Encode(bytes, 'RFC4648'));\n}\n\nexport async function digestPlId(data: string): Promise<PlId> {\n const encoder = new TextEncoder();\n const bytes = await crypto.subtle.digest('SHA-256', encoder.encode(data));\n return plId(new Uint8Array(bytes.slice(0, 15)));\n}\n","import canonicalize from 'canonicalize';\n\ntype JsonPrimitive = string | number | boolean | null | undefined;\n\ntype JsonValue = JsonPrimitive | JsonValue[] | {\n [key: string]: JsonValue;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\ntype NotAssignableToJson = bigint | symbol | Function;\n\nexport type JsonCompatible<T> = unknown extends T ? never : {\n [P in keyof T]:\n T[P] extends JsonValue ? T[P] :\n T[P] extends NotAssignableToJson ? never :\n JsonCompatible<T[P]>;\n};\n\nexport type StringifiedJson<T> = JsonCompatible<T> extends never ? never : string & {\n __json_stringified: T;\n};\n\nexport function stringifyJson<T>(value: JsonCompatible<T>): StringifiedJson<T> {\n return JSON.stringify(value)! as StringifiedJson<T>;\n}\n\nexport type CanonicalizedJson<T> = JsonCompatible<T> extends never ? never : string & {\n __json_canonicalized: T;\n};\n\nexport function canonicalizeJson<T>(value: JsonCompatible<T>): CanonicalizedJson<T> {\n return canonicalize(value)! as CanonicalizedJson<T>;\n}\n\nexport function parseJson<T>(value: StringifiedJson<T> | CanonicalizedJson<T>): T {\n return JSON.parse(value) as T;\n}\n","/**\n * Just for convenience, usually it is an Error with name 'AbortError'\n */\nexport class AbortError extends Error {\n name = 'AbortError';\n}\n\n/**\n * Throw this to show a message without stack trace in UI\n */\nexport class UiError extends Error {\n name = 'UiError';\n}\n\nexport function isAbortError(error: unknown): error is Error & { name: 'AbortError' } {\n return error instanceof Error && error.name === 'AbortError';\n}\n\nexport function hasAbortError(error: unknown): boolean {\n if (!(error instanceof Error)) {\n return false;\n }\n\n return error.name === 'AbortError' || hasAbortError(error.cause);\n}\n\nexport function isAggregateError(error: unknown): error is AggregateError {\n return error instanceof Error && error.name === 'AggregateError';\n}\n\nfunction stringifyValue(value: unknown): string {\n if (typeof value === 'string') {\n return `String value was thrown: ${value}`;\n }\n\n if (value && typeof value === 'object') {\n try {\n return `Plain object was thrown: ${JSON.stringify(value)}`;\n } catch (jsonError) {\n const errorMessage = jsonError instanceof Error ? jsonError.message : String(jsonError);\n return `Non-serializable object was thrown (JSON.stringify failed: ${errorMessage}): ${String(value)}`;\n }\n }\n\n return String(`Non-Error value (${typeof value}) was thrown: ${value}`);\n}\n\nexport function ensureError(value: unknown): Error {\n if (value instanceof Error) {\n return value;\n }\n\n return new Error(stringifyValue(value));\n}\n\n// Error serialization for IPC/network transmission (Error objects can't be JSON serialized)\n\nexport type SerializedError = {\n name: string;\n message: string;\n stack: string | undefined;\n cause?: SerializedError;\n};\n\nexport function deserializeError(obj: SerializedError): Error {\n const cause = obj.cause ? deserializeError(obj.cause) : undefined;\n\n const error = new Error(obj.message, cause !== undefined ? { cause } : undefined);\n error.name = obj.name || 'Error';\n error.stack = obj.stack;\n\n return error;\n}\n\nexport function serializeError(e: unknown): SerializedError {\n const error = ensureError(e);\n const cause = error.cause ? serializeError(error.cause) : undefined;\n\n return {\n name: error.name,\n message: error.message,\n stack: error.stack,\n ...(error.cause !== undefined && { cause }),\n };\n}\n\nexport type ResultOrError<S, F = Error> = {\n value: S;\n error?: undefined;\n} | {\n error: F;\n};\n\nexport function unwrapResult<T>(result: ResultOrError<T>): T {\n if (result.error) {\n throw result.error;\n }\n return result.value;\n}\n\nexport function serializeResult<T>(result: ResultOrError<T>): ResultOrError<T, SerializedError> {\n if (result.error) {\n return { error: serializeError(result.error) };\n }\n return { value: result.value };\n}\n\nexport function deserializeResult<T>(result: ResultOrError<T, SerializedError>): ResultOrError<T> {\n if (result.error) {\n return { error: deserializeError(result.error) };\n }\n return { value: result.value };\n}\n\nexport function wrapCallback<T>(callback: () => T): ResultOrError<T> {\n try {\n const value = callback();\n return { value };\n } catch (error) {\n return { error: ensureError(error) };\n }\n}\n\nexport async function wrapAsyncCallback<T>(callback: () => Promise<T>): Promise<ResultOrError<T>> {\n try {\n const value = await callback();\n return { value };\n } catch (error) {\n return { error: ensureError(error) };\n }\n}\n\nexport function wrapAndSerialize<T>(callback: () => T): ResultOrError<T, SerializedError> {\n const result = wrapCallback(callback);\n return serializeResult(result);\n}\n\nexport async function wrapAndSerializeAsync<T>(callback: () => Promise<T>): Promise<ResultOrError<T, SerializedError>> {\n const result = await wrapAsyncCallback(callback);\n return serializeResult(result);\n}\n"],"names":["z","PValueIntNA","PValueLongNA","PValueStringNA","PValueBytesNA","isValueNA","value","valueType","isValueAbsent","absent","index","chunkIndex","mask","PTableAbsent","PTableNA","isPTableAbsent","pTableValue","column","row","fill","getAxisId","spec","type","name","domain","result","matchDomain","query","target","k","matchAxisId","toDataView","data","RFC4648","RFC4648_HEX","CROCKFORD","base32Encode","variant","options","alphabet","defaultPadding","padding","view","bits","output","i","PlIdBytes","PlIdLength","PlId","uniquePlId","canonicalizeJson","canonicalize","parseJson","stringifyValue","jsonError","ensureError"],"mappings":";;AAyB0BA,EAAE,OAAO;AAAA;AAAA,EAEjC,MAAMA,EAAE,OAAO;AAAA;AAAA,EAEf,IAAIA,EAAE,OAAO;AACf,CAAC;AC5BYC,MAAAA,IAAc,aACdC,IAAe,CAAC,mBAGhBC,IAAiB,MACjBC,IAAgB;AA0Bb,SAAAC,EAAUC,GAAgBC,GAA+B;AACvE,UAAQA,GAAW;AAAA,IACjB,KAAK;AACH,aAAOD,MAAUL;AAAAA,IACnB,KAAK;AACH,aAAOK,MAAU,OAAOJ,CAAY,KAAKI,MAAUJ;AAAAA,IACrD,KAAK;AACI,aAAA,OAAO,MAAMI,CAAK;AAAA,IAC3B,KAAK;AACI,aAAA,OAAO,MAAMA,CAAK;AAAA,IAC3B,KAAK;AACH,aAAOA,MAAUH;AAAAA,IACnB,KAAK;AACH,aAAOG,MAAUF;AAAAA,IACnB;AACQ,YAAA,MAAM,0BAA0BG,CAAyB,EAAE;AAAA,EAAA;AAEvE;AA2LgB,SAAAC,EAAcC,GAAoBC,GAAwB;AAClEC,QAAAA,IAAa,KAAK,MAAMD,IAAQ,CAAC,GACjCE,IAAO,KAAM,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import { default as H } from "./components/PlAgChartStackedBarCell/PlAgChartStac
|
|
|
23
23
|
|
|
24
24
|
import { default as q } from "./components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue.js";
|
|
25
25
|
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { default as re } from "./components/
|
|
31
|
-
import { default as ae } from "./components/
|
|
32
|
-
import { default as fe } from "./components/
|
|
33
|
-
import { default as me } from "./components/
|
|
34
|
-
import { default as ue } from "./components/
|
|
35
|
-
import { default as xe } from "./components/
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
26
|
+
import { usePlDataTableSettingsV2 as j } from "./components/PlAgDataTable/types.js";
|
|
27
|
+
import { PlAgDataTableRowNumberColId as U, autoSizeRowNumberColumn as W, makeRowNumberColDef as J } from "./components/PlAgDataTable/sources/row-number.js";
|
|
28
|
+
import { focusRow as X, makeOnceTracker as Y, trackFirstDataRendered as _ } from "./components/PlAgDataTable/sources/focus-row.js";
|
|
29
|
+
import { defaultMainMenuItems as ee } from "./components/PlAgDataTable/sources/menu-items.js";
|
|
30
|
+
import { default as re } from "./components/PlAgCsvExporter/PlAgCsvExporter.vue.js";
|
|
31
|
+
import { default as ae } from "./components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue.js";
|
|
32
|
+
import { default as fe } from "./components/PlAgGridColumnManager/PlAgGridColumnManager.vue.js";
|
|
33
|
+
import { default as me } from "./components/PlAgDataTableToolsPanel/PlAgDataTableToolsPanel.vue.js";
|
|
34
|
+
import { default as ue } from "./components/PlTableFilters/PlTableFilters.vue.js";
|
|
35
|
+
import { default as xe } from "./components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue.js";
|
|
36
|
+
import { default as ne } from "./components/PlElementList/PlElementList.vue.js";
|
|
37
|
+
import { defineApp as ce, useSdkPlugin as ge } from "./defineApp.js";
|
|
38
|
+
import { createModel as Se } from "./createModel.js";
|
|
39
|
+
import { defineStore as Te } from "./defineStore.js";
|
|
40
|
+
import { AgGridTheme as De, activateAgGrid as we } from "./aggrid.js";
|
|
41
|
+
import { MultiError as ke, UnresolvedError as Ee, ensureError as Re, formatZodError as Be, identity as Me, isDefined as Oe, isZodError as ve, unwrapValueOrErrors as Le, wrapOptionalResult as Ie, wrapValueOrErrors as Ge } from "./utils.js";
|
|
42
|
+
import { objectHash as Fe } from "./objectHash.js";
|
|
43
|
+
import { computedResult as Ne } from "./computedResult.js";
|
|
44
|
+
import { ReactiveFileContent as ze } from "./composition/fileContent.js";
|
|
45
|
+
import { multiSequenceAlignment as Ze } from "./components/PlMultiSequenceAlignment/multi-sequence-alignment.js";
|
|
46
|
+
import { DemoData as Qe } from "./lib/ui/uikit/dist/index.js";
|
|
47
|
+
import { Color as We } from "./lib/ui/uikit/dist/colors/color.js";
|
|
48
|
+
import { default as Ke } from "./lib/ui/uikit/dist/components/ContextProvider.vue.js";
|
|
48
49
|
import * as l from "./lib/ui/uikit/dist/components/DataTable/index.js";
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { Gradient as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
91
|
-
import { default as
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
95
|
-
import { default as
|
|
96
|
-
import { default as
|
|
97
|
-
import { default as
|
|
98
|
-
import { default as
|
|
99
|
-
import { default as
|
|
100
|
-
import { default as
|
|
101
|
-
import { default as
|
|
102
|
-
import { default as
|
|
103
|
-
import { default as
|
|
104
|
-
import { default as
|
|
105
|
-
import { default as
|
|
106
|
-
import { default as
|
|
107
|
-
import { default as
|
|
108
|
-
import { default as
|
|
109
|
-
import { default as
|
|
110
|
-
import { default as
|
|
111
|
-
import { default as
|
|
112
|
-
import { default as
|
|
113
|
-
import { default as
|
|
114
|
-
import { animate as
|
|
115
|
-
import { categoricalColors as
|
|
116
|
-
import { detectOutside as
|
|
117
|
-
import { icons16 as
|
|
118
|
-
import { icons24 as
|
|
119
|
-
import { showContextMenu as
|
|
120
|
-
import { useClickOutside as
|
|
121
|
-
import { useComponentProp as
|
|
122
|
-
import { useDraggable as
|
|
123
|
-
import { useEventListener as
|
|
124
|
-
import { useFormState as
|
|
125
|
-
import { useHover as
|
|
126
|
-
import { useInterval as
|
|
127
|
-
import { useLabelNotch as
|
|
128
|
-
import { useLocalStorage as
|
|
129
|
-
import { useMouse as
|
|
130
|
-
import { useMouseCapture as
|
|
131
|
-
import { useElementPosition as
|
|
132
|
-
import { useQuery as
|
|
133
|
-
import { useResizeObserver as
|
|
134
|
-
import { useScroll as
|
|
135
|
-
import { useSortable as
|
|
136
|
-
import { useSortable2 as
|
|
137
|
-
import { useTheme as
|
|
138
|
-
import { useWatchFetch as
|
|
50
|
+
import { default as Ye } from "./lib/ui/uikit/dist/components/DropdownListItem.vue.js";
|
|
51
|
+
import { default as $e } from "./lib/ui/uikit/dist/utils/DropdownOverlay/DropdownOverlay.vue.js";
|
|
52
|
+
import { Gradient as oo, interpolateColor as ro, normalizeGradient as to } from "./lib/ui/uikit/dist/colors/gradient.js";
|
|
53
|
+
import { default as lo } from "./lib/ui/uikit/dist/components/LongText.vue.js";
|
|
54
|
+
import { default as so } from "./lib/ui/uikit/dist/components/PlAccordion/PlAccordion.vue.js";
|
|
55
|
+
import { default as po } from "./lib/ui/uikit/dist/components/PlAccordion/PlAccordionSection.vue.js";
|
|
56
|
+
import { default as xo } from "./lib/ui/uikit/dist/components/PlAlert/PlAlert.vue.js";
|
|
57
|
+
import { default as no } from "./lib/ui/uikit/dist/components/PlAutocomplete/PlAutocomplete.vue.js";
|
|
58
|
+
import { default as co } from "./lib/ui/uikit/dist/layout/PlBlockPage/PlBlockPage.vue.js";
|
|
59
|
+
import { default as Co } from "./lib/ui/uikit/dist/components/PlBtnAccent/PlBtnAccent.vue.js";
|
|
60
|
+
import { default as Ao } from "./lib/ui/uikit/dist/components/PlBtnDanger/PlBtnDanger.vue.js";
|
|
61
|
+
import { default as bo } from "./lib/ui/uikit/dist/components/PlBtnGhost/PlBtnGhost.vue.js";
|
|
62
|
+
import { default as wo } from "./lib/ui/uikit/dist/components/PlBtnGroup/PlBtnGroup.vue.js";
|
|
63
|
+
import { default as ko } from "./lib/ui/uikit/dist/components/PlBtnLink/PlBtnLink.vue.js";
|
|
64
|
+
import { default as Ro } from "./lib/ui/uikit/dist/components/PlBtnPrimary/PlBtnPrimary.vue.js";
|
|
65
|
+
import { default as Mo } from "./lib/ui/uikit/dist/components/PlBtnSecondary/PlBtnSecondary.vue.js";
|
|
66
|
+
import { default as vo } from "./lib/ui/uikit/dist/components/PlBtnSplit/PlBtnSplit.vue.js";
|
|
67
|
+
import { default as Io } from "./lib/ui/uikit/dist/components/PlChartHistogram/PlChartHistogram.vue.js";
|
|
68
|
+
import { default as yo } from "./lib/ui/uikit/dist/components/PlChartStackedBar/PlChartStackedBar.vue.js";
|
|
69
|
+
import { default as Vo } from "./lib/ui/uikit/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue.js";
|
|
70
|
+
import { default as Ho } from "./lib/ui/uikit/dist/components/PlCheckbox/PlCheckbox.vue.js";
|
|
71
|
+
import { default as qo } from "./lib/ui/uikit/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js";
|
|
72
|
+
import { default as jo } from "./lib/ui/uikit/dist/components/PlChip/PlChip.vue.js";
|
|
73
|
+
import { default as Uo } from "./lib/ui/uikit/dist/utils/PlCloseModalBtn.vue.js";
|
|
74
|
+
import { default as Jo } from "./lib/ui/uikit/dist/layout/PlContainer/PlContainer.vue.js";
|
|
75
|
+
import { default as Xo } from "./lib/ui/uikit/dist/components/PlDialogModal/PlDialogModal.vue.js";
|
|
76
|
+
import { default as _o } from "./lib/ui/uikit/dist/components/PlDropdown/PlDropdown.vue.js";
|
|
77
|
+
import { default as er } from "./lib/ui/uikit/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js";
|
|
78
|
+
import { default as rr } from "./lib/ui/uikit/dist/components/PlDropdownLine/PlDropdownLine.vue.js";
|
|
79
|
+
import { default as ar } from "./lib/ui/uikit/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js";
|
|
80
|
+
import { default as fr } from "./lib/ui/uikit/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.js";
|
|
81
|
+
import { default as mr } from "./lib/ui/uikit/dist/components/PlDropdownRef/PlDropdownRef.vue.js";
|
|
82
|
+
import { default as ur } from "./lib/ui/uikit/dist/components/PlEditableTitle/PlEditableTitle.vue.js";
|
|
83
|
+
import { default as xr } from "./lib/ui/uikit/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js";
|
|
84
|
+
import { default as nr } from "./lib/ui/uikit/dist/components/PlFileDialog/PlFileDialog.vue.js";
|
|
85
|
+
import { default as cr } from "./lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js";
|
|
86
|
+
import { default as Cr } from "./lib/ui/uikit/dist/layout/PlGrid/PlGrid.vue.js";
|
|
87
|
+
import { default as Ar, default as Tr } from "./lib/ui/uikit/dist/components/PlIcon16/PlIcon16.vue.js";
|
|
88
|
+
import { default as Dr, default as wr } from "./lib/ui/uikit/dist/components/PlIcon24/PlIcon24.vue.js";
|
|
89
|
+
import { default as kr } from "./lib/ui/uikit/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js";
|
|
90
|
+
import { default as Rr } from "./lib/ui/uikit/dist/components/PlLogView/PlLogView.vue.js";
|
|
91
|
+
import { default as Mr } from "./lib/ui/uikit/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js";
|
|
92
|
+
import { default as vr } from "./lib/ui/uikit/dist/components/PlNumberField/PlNumberField.vue.js";
|
|
93
|
+
import { default as Ir } from "./lib/ui/uikit/dist/components/PlProgressBar/PlProgressBar.vue.js";
|
|
94
|
+
import { default as yr } from "./lib/ui/uikit/dist/components/PlProgressCell/PlProgressCell.vue.js";
|
|
95
|
+
import { default as Vr } from "./lib/ui/uikit/dist/components/PlRadio/PlRadio.vue.js";
|
|
96
|
+
import { default as Hr } from "./lib/ui/uikit/dist/components/PlRadio/PlRadioGroup.vue.js";
|
|
97
|
+
import { default as qr } from "./lib/ui/uikit/dist/layout/PlRow/PlRow.vue.js";
|
|
98
|
+
import { default as jr } from "./lib/ui/uikit/dist/components/PlSearchField/PlSearchField.vue.js";
|
|
99
|
+
import { default as Ur } from "./lib/ui/uikit/dist/components/PlSectionSeparator/PlSectionSeparator.vue.js";
|
|
100
|
+
import { default as Jr } from "./lib/ui/uikit/dist/components/PlSlideModal/PlSlideModal.vue.js";
|
|
101
|
+
import { default as Xr } from "./lib/ui/uikit/dist/layout/PlSpacer/PlSpacer.vue.js";
|
|
102
|
+
import { default as _r } from "./lib/ui/uikit/dist/components/PlSplash/PlSplash.vue.js";
|
|
103
|
+
import { default as et } from "./lib/ui/uikit/dist/components/PlStatusTag/PlStatusTag.vue.js";
|
|
104
|
+
import { default as rt } from "./lib/ui/uikit/dist/components/PlSvg/PlSvg.vue.js";
|
|
105
|
+
import { default as at } from "./lib/ui/uikit/dist/components/PlTabs/PlTabs.vue.js";
|
|
106
|
+
import { default as ft } from "./lib/ui/uikit/dist/components/PlTextArea/PlTextArea.vue.js";
|
|
107
|
+
import { default as mt } from "./lib/ui/uikit/dist/components/PlTextField/PlTextField.vue.js";
|
|
108
|
+
import { default as ut } from "./lib/ui/uikit/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js";
|
|
109
|
+
import { default as xt } from "./lib/ui/uikit/dist/components/PlTooltip/PlTooltip.vue.js";
|
|
110
|
+
import { default as nt } from "./lib/ui/uikit/dist/components/Scrollable.vue.js";
|
|
111
|
+
import { default as ct } from "./lib/ui/uikit/dist/components/Slider.vue.js";
|
|
112
|
+
import { default as Ct } from "./lib/ui/uikit/dist/components/SliderRange.vue.js";
|
|
113
|
+
import { default as At } from "./lib/ui/uikit/dist/components/SliderRangeTriple.vue.js";
|
|
114
|
+
import { default as bt } from "./lib/ui/uikit/dist/components/ThemeSwitcher.vue.js";
|
|
115
|
+
import { animate as wt, animateInfinite as ht, call as kt, delay as Et, listToOptions as Rt, makeEaseInOut as Bt, makeEaseOut as Mt, normalizeListOptions as Ot, randomInt as vt, randomString as Lt, requestTick as It, throttle as Gt, timeout as yt } from "./lib/ui/uikit/dist/helpers/utils.js";
|
|
116
|
+
import { categoricalColors as Vt, magma as Nt, palettes as Ht, viridis as zt } from "./lib/ui/uikit/dist/colors/palette.js";
|
|
117
|
+
import { detectOutside as Zt, eventListener as jt, getElementScrollPosition as Qt, isElementVisible as Ut, scrollIntoView as Wt } from "./lib/ui/uikit/dist/helpers/dom.js";
|
|
118
|
+
import { icons16 as Kt } from "./lib/ui/uikit/dist/generated/icons-16.js";
|
|
119
|
+
import { icons24 as Yt } from "./lib/ui/uikit/dist/generated/icons-24.js";
|
|
120
|
+
import { showContextMenu as $t } from "./lib/ui/uikit/dist/components/contextMenu/index.js";
|
|
121
|
+
import { useClickOutside as oa } from "./lib/ui/uikit/dist/composition/useClickOutside.js";
|
|
122
|
+
import { useComponentProp as ta } from "./lib/ui/uikit/dist/composition/useComponentProp.js";
|
|
123
|
+
import { useDraggable as la } from "./lib/ui/uikit/dist/composition/useDraggable.js";
|
|
124
|
+
import { useEventListener as sa } from "./lib/ui/uikit/dist/composition/useEventListener.js";
|
|
125
|
+
import { useFormState as pa } from "./lib/ui/uikit/dist/composition/useFormState.js";
|
|
126
|
+
import { useHover as da } from "./lib/ui/uikit/dist/composition/useHover.js";
|
|
127
|
+
import { useInterval as ia } from "./lib/ui/uikit/dist/composition/useInterval.js";
|
|
128
|
+
import { useLabelNotch as Pa } from "./lib/ui/uikit/dist/utils/useLabelNotch.js";
|
|
129
|
+
import { useLocalStorage as ga } from "./lib/ui/uikit/dist/composition/useLocalStorage.js";
|
|
130
|
+
import { useMouse as Sa } from "./lib/ui/uikit/dist/composition/useMouse.js";
|
|
131
|
+
import { useMouseCapture as Ta } from "./lib/ui/uikit/dist/composition/useMouseCapture.js";
|
|
132
|
+
import { useElementPosition as Da } from "./lib/ui/uikit/dist/composition/usePosition.js";
|
|
133
|
+
import { useQuery as ha } from "./lib/ui/uikit/dist/composition/useQuery.js";
|
|
134
|
+
import { useResizeObserver as Ea } from "./lib/ui/uikit/dist/composition/useResizeObserver.js";
|
|
135
|
+
import { useScroll as Ba } from "./lib/ui/uikit/dist/composition/useScroll.js";
|
|
136
|
+
import { useSortable as Oa } from "./lib/ui/uikit/dist/composition/useSortable.js";
|
|
137
|
+
import { useSortable2 as La } from "./lib/ui/uikit/dist/composition/useSortable2.js";
|
|
138
|
+
import { useTheme as Ga } from "./lib/ui/uikit/dist/composition/useTheme.js";
|
|
139
|
+
import { useWatchFetch as Fa } from "./lib/ui/uikit/dist/composition/useWatchFetch.js";
|
|
139
140
|
export {
|
|
140
|
-
|
|
141
|
+
De as AgGridTheme,
|
|
141
142
|
m as BlockLayout,
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
We as Color,
|
|
144
|
+
Ke as ContextProvider,
|
|
144
145
|
l as DataTable,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
Qe as DemoData,
|
|
147
|
+
Ye as DropdownListItem,
|
|
148
|
+
$e as DropdownOverlay,
|
|
149
|
+
oo as Gradient,
|
|
150
|
+
lo as LongText,
|
|
151
|
+
ke as MultiError,
|
|
152
|
+
so as PlAccordion,
|
|
153
|
+
po as PlAccordionSection,
|
|
153
154
|
I as PlAgCellFile,
|
|
154
155
|
y as PlAgCellProgress,
|
|
155
156
|
V as PlAgCellStatusTag,
|
|
156
157
|
q as PlAgChartHistogramCell,
|
|
157
158
|
H as PlAgChartStackedBarCell,
|
|
158
159
|
v as PlAgColumnHeader,
|
|
159
|
-
|
|
160
|
+
re as PlAgCsvExporter,
|
|
160
161
|
u as PlAgDataTable,
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
U as PlAgDataTableRowNumberColId,
|
|
163
|
+
me as PlAgDataTableToolsPanel,
|
|
163
164
|
i as PlAgDataTableV2,
|
|
164
|
-
|
|
165
|
+
fe as PlAgGridColumnManager,
|
|
165
166
|
c as PlAgOverlayLoading,
|
|
166
167
|
C as PlAgOverlayNoRows,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
168
|
+
ae as PlAgTextAndButtonCell,
|
|
169
|
+
xo as PlAlert,
|
|
170
|
+
no as PlAutocomplete,
|
|
171
|
+
co as PlBlockPage,
|
|
172
|
+
Co as PlBtnAccent,
|
|
173
|
+
Ao as PlBtnDanger,
|
|
174
|
+
bo as PlBtnGhost,
|
|
175
|
+
wo as PlBtnGroup,
|
|
176
|
+
ko as PlBtnLink,
|
|
177
|
+
Ro as PlBtnPrimary,
|
|
178
|
+
Mo as PlBtnSecondary,
|
|
179
|
+
vo as PlBtnSplit,
|
|
180
|
+
Io as PlChartHistogram,
|
|
181
|
+
yo as PlChartStackedBar,
|
|
182
|
+
Vo as PlChartStackedBarCompact,
|
|
183
|
+
Ho as PlCheckbox,
|
|
184
|
+
qo as PlCheckboxGroup,
|
|
185
|
+
jo as PlChip,
|
|
186
|
+
Uo as PlCloseModalBtn,
|
|
187
|
+
Jo as PlContainer,
|
|
187
188
|
d as PlDataTable,
|
|
188
189
|
n as PlDataTableV2,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
190
|
+
Xo as PlDialogModal,
|
|
191
|
+
_o as PlDropdown,
|
|
192
|
+
er as PlDropdownLegacy,
|
|
193
|
+
rr as PlDropdownLine,
|
|
194
|
+
ar as PlDropdownMulti,
|
|
195
|
+
fr as PlDropdownMultiRef,
|
|
196
|
+
mr as PlDropdownRef,
|
|
197
|
+
ur as PlEditableTitle,
|
|
198
|
+
ne as PlElementList,
|
|
199
|
+
xr as PlErrorBoundary,
|
|
200
|
+
nr as PlFileDialog,
|
|
201
|
+
cr as PlFileInput,
|
|
202
|
+
Cr as PlGrid,
|
|
203
|
+
Ar as PlIcon16,
|
|
204
|
+
Dr as PlIcon24,
|
|
205
|
+
kr as PlLoaderCircular,
|
|
206
|
+
Rr as PlLogView,
|
|
207
|
+
Tr as PlMaskIcon16,
|
|
208
|
+
wr as PlMaskIcon24,
|
|
209
|
+
xe as PlMultiSequenceAlignment,
|
|
210
|
+
Mr as PlNotificationAlert,
|
|
211
|
+
vr as PlNumberField,
|
|
212
|
+
Ir as PlProgressBar,
|
|
213
|
+
yr as PlProgressCell,
|
|
214
|
+
Vr as PlRadio,
|
|
215
|
+
Hr as PlRadioGroup,
|
|
216
|
+
qr as PlRow,
|
|
217
|
+
jr as PlSearchField,
|
|
218
|
+
Ur as PlSectionSeparator,
|
|
219
|
+
Jr as PlSlideModal,
|
|
220
|
+
Xr as PlSpacer,
|
|
221
|
+
_r as PlSplash,
|
|
222
|
+
et as PlStatusTag,
|
|
223
|
+
rt as PlSvg,
|
|
224
|
+
ue as PlTableFilters,
|
|
225
|
+
at as PlTabs,
|
|
226
|
+
ft as PlTextArea,
|
|
227
|
+
mt as PlTextField,
|
|
228
|
+
ut as PlToggleSwitch,
|
|
229
|
+
xt as PlTooltip,
|
|
230
|
+
ze as ReactiveFileContent,
|
|
231
|
+
nt as Scrollable,
|
|
232
|
+
ct as Slider,
|
|
233
|
+
Ct as SliderRange,
|
|
234
|
+
At as SliderRangeTriple,
|
|
235
|
+
bt as ThemeSwitcher,
|
|
236
|
+
Ee as UnresolvedError,
|
|
236
237
|
A as ValueOrErrorsComponent,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
238
|
+
we as activateAgGrid,
|
|
239
|
+
wt as animate,
|
|
240
|
+
ht as animateInfinite,
|
|
241
|
+
W as autoSizeRowNumberColumn,
|
|
242
|
+
kt as call,
|
|
243
|
+
Vt as categoricalColors,
|
|
244
|
+
Ne as computedResult,
|
|
244
245
|
w as createAgGridColDef,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
Se as createModel,
|
|
247
|
+
ee as defaultMainMenuItems,
|
|
248
|
+
ce as defineApp,
|
|
249
|
+
Te as defineStore,
|
|
250
|
+
Et as delay,
|
|
250
251
|
k as deselectAll,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
252
|
+
Zt as detectOutside,
|
|
253
|
+
Re as ensureError,
|
|
254
|
+
jt as eventListener,
|
|
255
|
+
X as focusRow,
|
|
256
|
+
Be as formatZodError,
|
|
257
|
+
Qt as getElementScrollPosition,
|
|
257
258
|
E as getSelectedRowsCount,
|
|
258
259
|
R as getTotalRowsCount,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
260
|
+
Kt as icons16,
|
|
261
|
+
Yt as icons24,
|
|
262
|
+
Me as identity,
|
|
263
|
+
ro as interpolateColor,
|
|
264
|
+
Oe as isDefined,
|
|
265
|
+
Ut as isElementVisible,
|
|
265
266
|
B as isSelectionEnabled,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
267
|
+
ve as isZodError,
|
|
268
|
+
Rt as listToOptions,
|
|
269
|
+
Nt as magma,
|
|
270
|
+
Bt as makeEaseInOut,
|
|
271
|
+
Mt as makeEaseOut,
|
|
272
|
+
Y as makeOnceTracker,
|
|
273
|
+
J as makeRowNumberColDef,
|
|
274
|
+
Ze as multiSequenceAlignment,
|
|
275
|
+
to as normalizeGradient,
|
|
276
|
+
Ot as normalizeListOptions,
|
|
277
|
+
Fe as objectHash,
|
|
278
|
+
Ht as palettes,
|
|
279
|
+
vt as randomInt,
|
|
280
|
+
Lt as randomString,
|
|
281
|
+
It as requestTick,
|
|
282
|
+
Wt as scrollIntoView,
|
|
282
283
|
M as selectAll,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
284
|
+
$t as showContextMenu,
|
|
285
|
+
Gt as throttle,
|
|
286
|
+
yt as timeout,
|
|
287
|
+
_ as trackFirstDataRendered,
|
|
288
|
+
Le as unwrapValueOrErrors,
|
|
288
289
|
b as useAgGridOptions,
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
Da as
|
|
302
|
-
ha as
|
|
303
|
-
Ea as
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
Oa as
|
|
307
|
-
La as
|
|
308
|
-
Ga as
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
290
|
+
oa as useClickOutside,
|
|
291
|
+
ta as useComponentProp,
|
|
292
|
+
la as useDraggable,
|
|
293
|
+
sa as useEventListener,
|
|
294
|
+
pa as useFormState,
|
|
295
|
+
da as useHover,
|
|
296
|
+
ia as useInterval,
|
|
297
|
+
Pa as useLabelNotch,
|
|
298
|
+
ga as useLocalStorage,
|
|
299
|
+
Sa as useMouse,
|
|
300
|
+
Ta as useMouseCapture,
|
|
301
|
+
j as usePlDataTableSettingsV2,
|
|
302
|
+
Da as usePosition,
|
|
303
|
+
ha as useQuery,
|
|
304
|
+
Ea as useResizeObserver,
|
|
305
|
+
Ba as useScroll,
|
|
306
|
+
ge as useSdkPlugin,
|
|
307
|
+
Oa as useSortable,
|
|
308
|
+
La as useSortable2,
|
|
309
|
+
Ga as useTheme,
|
|
310
|
+
Fa as useWatchFetch,
|
|
311
|
+
zt as viridis,
|
|
312
|
+
Ie as wrapOptionalResult,
|
|
313
|
+
Ge as wrapValueOrErrors
|
|
312
314
|
};
|
|
313
315
|
//# sourceMappingURL=lib.js.map
|
package/dist/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lib.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/ui-vue",
|
|
3
|
-
"version": "1.37.
|
|
3
|
+
"version": "1.37.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/lib.js",
|
|
6
6
|
"styles": "dist/lib.js",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"lodash": "^4.17.17",
|
|
31
31
|
"zod": "~3.23.8",
|
|
32
32
|
"@milaboratories/biowasm-tools": "^1.1.0",
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
33
|
+
"@platforma-sdk/model": "^1.37.2",
|
|
34
|
+
"@milaboratories/uikit": "^2.2.92"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"happy-dom": "^15.11.7",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"vitest": "^2.1.9",
|
|
45
45
|
"vue-tsc": "^2.1.10",
|
|
46
46
|
"yarpm": "^1.2.0",
|
|
47
|
-
"@milaboratories/eslint-config": "^1.0.4",
|
|
48
|
-
"@milaboratories/build-configs": "1.0.4",
|
|
49
47
|
"@milaboratories/ts-configs": "1.0.4",
|
|
48
|
+
"@milaboratories/build-configs": "1.0.4",
|
|
49
|
+
"@milaboratories/eslint-config": "^1.0.4",
|
|
50
50
|
"@milaboratories/helpers": "^1.6.15"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import {
|
|
2
|
+
canonicalizeJson,
|
|
3
|
+
type JsonCompatible,
|
|
4
|
+
type AxisId,
|
|
5
|
+
type CanonicalizedJson,
|
|
6
|
+
type ListOptionBase,
|
|
7
|
+
type LocalBlobHandleAndSize,
|
|
8
|
+
type PlDataTableModel,
|
|
9
|
+
type PlDataTableSheet,
|
|
10
|
+
type PlDataTableSheetState,
|
|
11
|
+
type PlTableFilter,
|
|
12
|
+
type PlTableFilterType,
|
|
13
|
+
type PTableColumnId,
|
|
14
|
+
type PTableColumnSpec,
|
|
15
|
+
type PTableHandle,
|
|
16
|
+
type PTableKey,
|
|
17
|
+
type PTableRowKey,
|
|
18
|
+
type PTableValue,
|
|
19
|
+
type RemoteBlobHandleAndSize,
|
|
18
20
|
} from '@platforma-sdk/model';
|
|
19
21
|
import type { PTableHidden } from './sources/common';
|
|
22
|
+
import type { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
23
|
+
import { computed, toValue } from 'vue';
|
|
20
24
|
|
|
21
25
|
export type PlDataTableSettingsPTable = {
|
|
22
26
|
/** The type of the source to feed the data into the table */
|
|
@@ -51,6 +55,71 @@ export type PlDataTableSettingsV2 =
|
|
|
51
55
|
model: PlDataTableModel | undefined;
|
|
52
56
|
};
|
|
53
57
|
|
|
58
|
+
export function usePlDataTableSettingsV2<T = string>({
|
|
59
|
+
/**
|
|
60
|
+
* Block property (such as inputAnchor) used to produce the data source.
|
|
61
|
+
* Mandatory for cases when the table can change without block run.
|
|
62
|
+
* Skip when the table is changed only after block run.
|
|
63
|
+
* Ask developers for help if you don't know what to set here.
|
|
64
|
+
*/
|
|
65
|
+
sourceId,
|
|
66
|
+
/** Block output created by `createPlDataTableV2` */
|
|
67
|
+
model,
|
|
68
|
+
/**
|
|
69
|
+
* Sheets for partitioned data sources.
|
|
70
|
+
* Do not set if data source is never partitioned.
|
|
71
|
+
*/
|
|
72
|
+
sheets,
|
|
73
|
+
}: {
|
|
74
|
+
sourceId?: MaybeRefOrGetter<JsonCompatible<T> | undefined>;
|
|
75
|
+
model: MaybeRefOrGetter<PlDataTableModel | undefined>;
|
|
76
|
+
sheets?: MaybeRefOrGetter<PlDataTableSheet[] | undefined>;
|
|
77
|
+
}): ComputedRef<PlDataTableSettingsV2> {
|
|
78
|
+
return computed(() => {
|
|
79
|
+
const modelValue = toValue(model);
|
|
80
|
+
if (sourceId) {
|
|
81
|
+
const sourceIdValue = toValue(sourceId);
|
|
82
|
+
if (sheets) {
|
|
83
|
+
const sheetsValue = toValue(sheets);
|
|
84
|
+
return sourceIdValue && sheetsValue
|
|
85
|
+
? {
|
|
86
|
+
sourceId: canonicalizeJson(sourceIdValue),
|
|
87
|
+
sheets: sheetsValue,
|
|
88
|
+
model: modelValue,
|
|
89
|
+
}
|
|
90
|
+
: { sourceId: null };
|
|
91
|
+
} else {
|
|
92
|
+
return sourceIdValue
|
|
93
|
+
? {
|
|
94
|
+
sourceId: canonicalizeJson(sourceIdValue),
|
|
95
|
+
sheets: [],
|
|
96
|
+
model: modelValue,
|
|
97
|
+
}
|
|
98
|
+
: { sourceId: null };
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
if (sheets) {
|
|
102
|
+
const sheetsValue = toValue(sheets);
|
|
103
|
+
return sheetsValue
|
|
104
|
+
? {
|
|
105
|
+
sourceId: canonicalizeJson<string>('static'),
|
|
106
|
+
sheets: sheetsValue,
|
|
107
|
+
model: modelValue,
|
|
108
|
+
}
|
|
109
|
+
: { sourceId: null };
|
|
110
|
+
} else {
|
|
111
|
+
return modelValue
|
|
112
|
+
? {
|
|
113
|
+
sourceId: canonicalizeJson<string>('static'),
|
|
114
|
+
sheets: [],
|
|
115
|
+
model: modelValue,
|
|
116
|
+
}
|
|
117
|
+
: { sourceId: null };
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
|
|
54
123
|
/** PlTableFilters restriction entry */
|
|
55
124
|
export type PlTableFiltersRestriction = {
|
|
56
125
|
/** Spec of the column for which filter types should be restricted */
|