@malloydata/malloy-explorer 0.0.275-dev250512182350 → 0.0.277-dev250515002611
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/.github/workflows/test.yaml +1 -1
- package/{babel.config.mjs → babel.config.cjs} +22 -9
- package/dist/cjs/index.cjs +243 -279
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +243 -279
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +2 -6
- package/dist/types/components/primitives/Badge.spec.d.ts +1 -0
- package/dist/types/components/primitives/HoverText.d.ts +3 -1
- package/dist/types/components/primitives/RichText.d.ts +10 -0
- package/dist/types/components/primitives/utils/icon.d.ts +0 -1
- package/dist/types/components/utils/fields.d.ts +4 -0
- package/dist/types/components/utils/segment.spec.d.ts +1 -0
- package/dist/types/test/SvgMock.d.ts +3 -0
- package/dist/types/test/jest.setup.d.ts +0 -0
- package/dist/types/test/model.d.ts +2 -0
- package/dist/types/test/utils.d.ts +7 -0
- package/eslint.config.mjs +3 -3
- package/jest.config.ts +27 -0
- package/package.json +14 -6
- package/postcss.config.mjs +1 -1
- package/vite.config.mts +2 -1
- package/dist/types/components/Label.d.ts +0 -5
package/dist/malloy-explorer.css
CHANGED
|
@@ -87,7 +87,6 @@
|
|
|
87
87
|
.mly1gs6z28{border:none}
|
|
88
88
|
.mly15r89dc{grid-area:1 / 1}
|
|
89
89
|
.mly1ghz6dp{margin:0}
|
|
90
|
-
.mly1hlb6i2{margin:12px}
|
|
91
90
|
.mlynfbntj{margin:5px 0}
|
|
92
91
|
.mly16zck5j{margin:5px}
|
|
93
92
|
.mlykib98w{margin:8px}
|
|
@@ -111,7 +110,6 @@
|
|
|
111
110
|
.mly1fut7tt{padding:4px 12px 12px 12px}
|
|
112
111
|
.mlytdwleo{padding:4px 12px}
|
|
113
112
|
.mly9cpjcd{padding:4px 8px 4px 8px}
|
|
114
|
-
.mly1q44i06{padding:4px 8px 4px}
|
|
115
113
|
.mlydqdrvq{padding:4px 8px}
|
|
116
114
|
.mlyfawy5m{padding:4px}
|
|
117
115
|
.mly17qkr04{padding:5px 0}
|
|
@@ -202,7 +200,6 @@
|
|
|
202
200
|
.mly6wxqrg{background-color:var(--malloy-composer-form-focusBackground,#f0f6ff)}
|
|
203
201
|
.mly12azwz9{background-color:var(--malloy-composer-menu-background,white)}
|
|
204
202
|
.mlyrkwa2d{background-color:var(--mly19gk0g3)}
|
|
205
|
-
.mly1pcjto7{background-color:var(--mly1bn1nfc)}
|
|
206
203
|
.mly1pnbjq1{background-color:var(--mly1bs2mf7)}
|
|
207
204
|
.mly12nb83b{background-color:var(--mly1yr7ch6)}
|
|
208
205
|
.mly1x7w6om{background-color:var(--mlyhsum04)}
|
|
@@ -229,6 +226,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
229
226
|
.mly1v5ugh9{color:#505050}
|
|
230
227
|
.mly358b0h{color:#909090}
|
|
231
228
|
.mly1e2nbdu{color:red}
|
|
229
|
+
.mly198oq2i{color:rgb(62,158,251)!important}
|
|
232
230
|
.mlyizdh9v{color:rgb(95,99,104)}
|
|
233
231
|
.mlykfrnou{color:rgba(0,100,224,1)}
|
|
234
232
|
.mlyj5j7qc{color:rgba(100,118,133,1)}
|
|
@@ -327,7 +325,6 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
327
325
|
.mly1vqy1sf{text-edge:cap}
|
|
328
326
|
.mlylyipyv{text-overflow:ellipsis}
|
|
329
327
|
.mly6mezaz{text-transform:none}
|
|
330
|
-
.mly1fuxgwz{transform:scale(1.33)}
|
|
331
328
|
.mly87ps6o{user-select:none}
|
|
332
329
|
.mlyxymvpz{vertical-align:middle}
|
|
333
330
|
.mly1n8ftqi{vertical-align:text-top}
|
|
@@ -337,7 +334,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
337
334
|
.mlyuxw1ft{white-space:nowrap}
|
|
338
335
|
.mly126k92a{white-space:pre-wrap}
|
|
339
336
|
.mly1so62im{will-change:transform}
|
|
340
|
-
.
|
|
337
|
+
.mly1vvkbs{word-wrap:break-word}
|
|
341
338
|
.mly35i7{writing-mode:sideways-lr}
|
|
342
339
|
.mly1vjfegm{z-index:1}
|
|
343
340
|
.mly11uqc5h{z-index:100}
|
|
@@ -398,7 +395,6 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
398
395
|
.mly3d5gib{max-height:50vh}
|
|
399
396
|
.mly1kbvuzt{max-height:var(--radix-tooltip-content-available-height)}
|
|
400
397
|
.mlyqyhut4{max-width:16.5px}
|
|
401
|
-
.mlyaka53j{max-width:230px}
|
|
402
398
|
.mly1pdpmub{max-width:264px}
|
|
403
399
|
.mly1jkqq1h{max-width:280px}
|
|
404
400
|
.mly1dc814f{max-width:350px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
interface HoverTextProps {
|
|
2
3
|
text: string;
|
|
4
|
+
containerRef?: React.RefObject<HTMLDivElement | null>;
|
|
3
5
|
align?: 'start' | 'center' | 'end';
|
|
4
6
|
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
5
7
|
}
|
|
@@ -8,5 +10,5 @@ interface HoverTextProps {
|
|
|
8
10
|
* Works in hovered parent.
|
|
9
11
|
* Works with formatted text.
|
|
10
12
|
*/
|
|
11
|
-
export declare function HoverText({ text, align, side, }: HoverTextProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function HoverText({ text, containerRef, align, side, }: HoverTextProps): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
3
|
+
interface RichTextProps extends React.ComponentProps<'div'> {
|
|
4
|
+
children: string;
|
|
5
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
isTooltipContent?: boolean;
|
|
7
|
+
customStyle: StyleXStyles;
|
|
8
|
+
}
|
|
9
|
+
export declare function RichText({ children, ref, customStyle, isTooltipContent, ...props }: RichTextProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -13,3 +13,7 @@ export declare function getViewDefinition(parent: ViewParent): import("@malloyda
|
|
|
13
13
|
export declare function getInputSchemaFromViewParent(parent: ViewParent): Malloy.Schema;
|
|
14
14
|
export declare function isNotAnnotatedFilteredField(field: Malloy.FieldInfo): boolean;
|
|
15
15
|
export declare function findUniqueFieldName(fields: Malloy.FieldInfo[], rename: string, path?: string[]): string;
|
|
16
|
+
export declare function findField(schema: Malloy.Schema, name: string): Malloy.FieldInfo | undefined;
|
|
17
|
+
export declare function findDimension(schema: Malloy.Schema, name: string): Malloy.FieldInfoWithDimension | undefined;
|
|
18
|
+
export declare function findMeasure(schema: Malloy.Schema, name: string): Malloy.FieldInfoWithMeasure | undefined;
|
|
19
|
+
export declare function findView(schema: Malloy.Schema, name: string): Malloy.FieldInfoWithView | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
+
export declare function expectDimension(schema: Malloy.Schema, name: string): Malloy.FieldInfoWithDimension;
|
|
3
|
+
export declare function expectMeasure(schema: Malloy.Schema, name: string): Malloy.FieldInfoWithMeasure;
|
|
4
|
+
export declare function expectView(schema: Malloy.Schema, name: string): Malloy.FieldInfoWithView;
|
|
5
|
+
type Constructor = new (...args: any[]) => any;
|
|
6
|
+
export declare function expectInstanceOf<T extends Constructor>(object: unknown, constructor: T): InstanceType<T>;
|
|
7
|
+
export {};
|
package/eslint.config.mjs
CHANGED
|
@@ -6,9 +6,8 @@ import prettier from 'eslint-plugin-prettier';
|
|
|
6
6
|
import react from 'eslint-plugin-react';
|
|
7
7
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
8
8
|
import tsParser from '@typescript-eslint/parser';
|
|
9
|
-
import globals from '
|
|
9
|
+
import globals, {fileURLToPath} from 'node:url';
|
|
10
10
|
import path from 'node:path';
|
|
11
|
-
import {fileURLToPath} from 'node:url';
|
|
12
11
|
import js from '@eslint/js';
|
|
13
12
|
import {FlatCompat} from '@eslint/eslintrc';
|
|
14
13
|
|
|
@@ -30,6 +29,7 @@ export default [
|
|
|
30
29
|
'**/dist/',
|
|
31
30
|
'**/build/',
|
|
32
31
|
'**/malloy-samples/',
|
|
32
|
+
'babel.config.cjs',
|
|
33
33
|
],
|
|
34
34
|
},
|
|
35
35
|
...fixupConfigRules(
|
|
@@ -139,7 +139,7 @@ export default [
|
|
|
139
139
|
},
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
|
-
files: ['**/*.spec.
|
|
142
|
+
files: ['**/*.spec.tsx?'],
|
|
143
143
|
|
|
144
144
|
languageOptions: {
|
|
145
145
|
globals: {
|
package/jest.config.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
setupFilesAfterEnv: ['<rootDir>/src/test/jest.setup.ts'],
|
|
10
|
+
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
|
|
11
|
+
testMatch: ['**/?(*.)spec.(ts|js)?(x)'],
|
|
12
|
+
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/dev/', '/src/test/'],
|
|
13
|
+
transform: {
|
|
14
|
+
'^.+\\.tsx?$': ['babel-jest'],
|
|
15
|
+
},
|
|
16
|
+
testTimeout: 100000,
|
|
17
|
+
verbose: true,
|
|
18
|
+
testEnvironment: 'jsdom',
|
|
19
|
+
collectCoverage: true,
|
|
20
|
+
coverageReporters: ['lcov', 'html'],
|
|
21
|
+
collectCoverageFrom: ['<rootDir>/src/**/*.(ts|tsx)', '!**/*.stylex.ts'],
|
|
22
|
+
preset: 'ts-jest',
|
|
23
|
+
moduleNameMapper: {
|
|
24
|
+
uuid: require.resolve('uuid'),
|
|
25
|
+
'\\.svg\\?react$': '<rootDir>/src/test/SvgMock.tsx',
|
|
26
|
+
},
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/malloy-explorer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.277-dev250515002611",
|
|
4
4
|
"description": "Malloy visual query builder",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -75,13 +75,19 @@
|
|
|
75
75
|
"react-dom": ">= 19.0.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
+
"@babel/preset-env": "^7.27.2",
|
|
78
79
|
"@babel/preset-react": "^7.26.3",
|
|
80
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
79
81
|
"@eslint/compat": "^1.2.7",
|
|
80
82
|
"@eslint/js": "^9.21.0",
|
|
81
83
|
"@rollup/plugin-replace": "^6.0.2",
|
|
82
84
|
"@stylexjs/eslint-plugin": "^0.11.1",
|
|
83
85
|
"@stylexjs/postcss-plugin": "^0.11.1",
|
|
84
86
|
"@stylexjs/rollup-plugin": "^0.10.1",
|
|
87
|
+
"@testing-library/dom": "^10.4.0",
|
|
88
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
89
|
+
"@testing-library/react": "^16.3.0",
|
|
90
|
+
"@types/jest": "^29.5.14",
|
|
85
91
|
"@types/react": "^19.0.10",
|
|
86
92
|
"@types/react-dom": "^19.0.4",
|
|
87
93
|
"@typescript-eslint/eslint-plugin": "^8.26.0",
|
|
@@ -96,17 +102,19 @@
|
|
|
96
102
|
"flow-api-translator": "^0.26.0",
|
|
97
103
|
"globals": "^16.0.0",
|
|
98
104
|
"jest": "^29.7.0",
|
|
105
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
99
106
|
"postcss": "^8.5.3",
|
|
107
|
+
"ts-jest": "^29.3.2",
|
|
100
108
|
"tsx": "^4.19.3",
|
|
101
109
|
"vite": "^6.1.0",
|
|
102
110
|
"vite-plugin-svgr": "^4.3.0"
|
|
103
111
|
},
|
|
104
112
|
"peerDependencies": {
|
|
105
|
-
"@malloydata/malloy-filter": ">=0.0.
|
|
106
|
-
"@malloydata/malloy-interfaces": ">=0.0.
|
|
107
|
-
"@malloydata/malloy-query-builder": ">=0.0.
|
|
108
|
-
"@malloydata/malloy-tag": ">=0.0.
|
|
109
|
-
"@malloydata/render": ">=0.0.
|
|
113
|
+
"@malloydata/malloy-filter": ">= 0.0.277",
|
|
114
|
+
"@malloydata/malloy-interfaces": ">= 0.0.277",
|
|
115
|
+
"@malloydata/malloy-query-builder": ">= 0.0.277",
|
|
116
|
+
"@malloydata/malloy-tag": ">= 0.0.277",
|
|
117
|
+
"@malloydata/render": ">= 0.0.277",
|
|
110
118
|
"react": ">= 19.0.0",
|
|
111
119
|
"react-dom": ">= 19.0.0"
|
|
112
120
|
}
|
package/postcss.config.mjs
CHANGED
package/vite.config.mts
CHANGED
|
@@ -4,7 +4,7 @@ import {resolve} from 'path';
|
|
|
4
4
|
import replace from '@rollup/plugin-replace';
|
|
5
5
|
import react from '@vitejs/plugin-react';
|
|
6
6
|
import svgr from 'vite-plugin-svgr';
|
|
7
|
-
import babelConfig from './babel.config.
|
|
7
|
+
import babelConfig from './babel.config.cjs';
|
|
8
8
|
|
|
9
9
|
export default defineConfig({
|
|
10
10
|
plugins: [
|
|
@@ -14,6 +14,7 @@ export default defineConfig({
|
|
|
14
14
|
'Object.defineProperty(exports, "__esModule", { value: true });':
|
|
15
15
|
'Object.defineProperty(typeof exports !== \'undefined\' ? exports : {}, "__esModule", { value: true });',
|
|
16
16
|
delimiters: ['\n', '\n'],
|
|
17
|
+
preventAssignment: true,
|
|
17
18
|
}),
|
|
18
19
|
],
|
|
19
20
|
build: {
|