Commit Graph

97 Commits

Author SHA1 Message Date
Krist Wongsuphasawat
62204a9dde build: bump build-config with beemo 1.0.0 2021-11-26 11:44:51 +08:00
Krist Wongsuphasawat
9810dad834 build: bump build-config (#167)
* build: bump build-config

* test: fix typings in mock data
2021-11-26 11:44:51 +08:00
Krist Wongsuphasawat
7d6d5dcf4a docs: update changelog 2021-11-26 11:44:51 +08:00
dependabot[bot]
1d42434894 build(deps-dev): update husky requirement from ^1.1.2 to ^2.3.0 (#157)
Updates the requirements on [husky](https://github.com/typicode/husky) to permit the latest version.
- [Release notes](https://github.com/typicode/husky/releases)
- [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typicode/husky/compare/v1.1.2...v2.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2021-11-26 11:44:50 +08:00
dependabot[bot]
ed2c4a6bf1 build(deps-dev): update fs-extra requirement from ^7.0.1 to ^8.0.1 (#155)
Updates the requirements on [fs-extra](https://github.com/jprichardson/node-fs-extra) to permit the latest version.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2021-11-26 11:44:50 +08:00
Krist Wongsuphasawat
6421d4b514 build: update build config 2021-11-26 11:44:48 +08:00
Krist Wongsuphasawat
368ed3cb5b build: fix changelog script 2021-11-26 11:44:48 +08:00
Krist Wongsuphasawat
f0d55c313f docs: update changelog 2021-11-26 11:44:48 +08:00
Krist Wongsuphasawat
2feb8948bf build: migrate to storybook 5 (#133)
* build: storybook 5

* feat: configure js/jsx storybook

* chore: modify storybook webpack config

* fix: type

* fix: packages.json dep order
2021-11-26 11:44:47 +08:00
Krist Wongsuphasawat
bd8b699a7d docs: update changelog (#129)
* docs: update changelog

* chore: update changelog script

* docs: update changelog
2021-11-26 11:44:47 +08:00
Christine Chambers
f71180e251 Revert "Handle BigNumber conversions in JSON properly (without loss of precision) (#71)" (#126)
* revert: revert "Handle BigNumber conversions in JSON properly (without loss of precision) (#71)"

This reverts commit e3866129b2b3cbd6e099fe4ab66319c4fe6ae485.

* fix: type errors

* fix: typescript errors in superset-ui-demo
2021-11-26 11:44:47 +08:00
Beto Dealmeida
a63f947ff5 feat: add support for conditional get requests (#119)
* feat: add support for conditional requests

* feat: add unit tests for conditional requests

* feat: use invariant

* feat: add type guard

* feat: fix lint

* feat: add more unit tests
2021-11-26 11:44:46 +08:00
Chris Williams
12ce877530 fix(chart): import types from package, not monorepo (#122)
* fix(chart): import types from package, not monorepo

* build: ensure fresh directories on build

* fix(chart): nix type deep import
2021-11-26 11:44:46 +08:00
Chris Williams
061faab818 feat(chart): Add <ChartDataProvider /> (#120)
* docs: [demo][connection] add ConfigureCORS story for testing CORS

* docs: [demo][ConfigureCORS] better instructions

* feat: [chart] add mvp DataProvider component

* docs: better CORS story, update webpack for @babel/polyfill

* docs: [chart] add DataProvider story with WordCloudPlugin

* docs: [chart] add DataProvider deets to Readme

* test(chart): move SuperChart.test.jsx => .tsx and instead use @ts-ignore

* fix(connection): point interface.request to client.request

* feat(chart): re-write DataProvider as ChartDataProvider

* docs(demo): re-write LegacyWordCloudStories => ChartDataProviderStories

* refactor(chart): use IDENTITY as ChartPlugin buildQuery default

* feat(chart): support legacy + v1 loadQueryData endpoints in ChartClient

* docs(demo): add sankey + sunburst plugins to ChartDataProvider story

* style(chart): run prettier on SuperChart

* feat(chart): export QueryData type from models/ChartProps

* feat(chart): export Metrics and BaseFormData from types/ChartFormData

* feat(chart): add request option overrides in ChartDataProvider

* fix(chart): use Partial<> for ChartClient request option overrides

* test(chart): add ChartDataProvider tests

* build: include demo pkg in type script

* build: move storybook/mocks to test/fixtures

* build: move json-bigint TS declaration to root

* test(chart): clean up ChartDataProvider test TS

* chore(chart): lint fix SuperChart

* fix(chart): set ChartPlugin.buildQuery default back to undefined

* test(connection): fix expected Client.get call count

* test(chart): fix ChartClient tests and add test for legacy API

* fix(chart): uninitialized typo, change fetching => loading

* docs(chart): update README to final ChartDataProvider API

* docs(chart): fix typo

* test(chart): get ChartDataProvider to one hundo

* feat(chart): add and export more meaningful Datasource type

* feat(chart): use Datasource type in ChartClient
2021-11-26 11:44:45 +08:00
Krist Wongsuphasawat
3c85cd1ffc chore: add commitlint and commitizen config 2021-11-26 11:44:43 +08:00
Krist Wongsuphasawat
11378a4ea5 Fix: update build config version (#106) 2021-11-26 11:44:43 +08:00
Krist Wongsuphasawat
dd9cf0deb6 Point to @superset-ui/build-config 2021-11-26 11:44:42 +08:00
Krist Wongsuphasawat
d7f8394cd6 seems not helpfing 2021-11-26 11:44:42 +08:00
Krist Wongsuphasawat
e2ff5523b7 Update changelog and pin beemo version 2021-11-26 11:44:42 +08:00
Krist Wongsuphasawat
dba200aa84 Manage dependencies (#98) 2021-11-26 11:44:42 +08:00
Krist Wongsuphasawat
48c881f5c3 update generator and bump build config version 2021-11-26 11:44:41 +08:00
Krist Wongsuphasawat
9863d8779f update @data-ui/config to fix build (#95)
* update @data-ui/config

* update to 39
2021-11-26 11:44:41 +08:00
Krist Wongsuphasawat
55248c10c5 remove unnecessary dependencies 2021-11-26 11:44:41 +08:00
Krist Wongsuphasawat
bd3e7020a1 add scripts to copy assets to dist folders (#90) 2021-11-26 11:44:40 +08:00
Krist Wongsuphasawat
92f7794a44 Add @superset-ui/dimension (#88)
* add code for computing text dimension

* update readme

* Add unit tests

* remove dependency

* refactor util function

* add description
2021-11-26 11:44:40 +08:00
Krist Wongsuphasawat
68b97db5d7 Convert time-format to TypeScript (#78)
* convert source to TS

* fix lint

* convert unit test to TS

* fix rebasing issue

* fix typings

* use ts-ignore
2021-11-26 11:44:39 +08:00
Krist Wongsuphasawat
597d9b362d Convert translation to typescript (#74)
* Convert translation to typescript

* update input types

* update travis

* update node version
2021-11-26 11:44:39 +08:00
Chris Williams
458d9b9987 [deps] build-config@0.0.37 (#79)
* [deps] build-config@0.0.37

* [chart] lint SuperChart
2021-11-26 11:44:39 +08:00
Krist Wongsuphasawat
9a7e3dc7b2 Convert number-format to TypeScript (#75)
* Convert number-format to TypeScript

* return string

* unit test 100%

* Allow developer to specify return type for loader

* add doc
2021-11-26 11:44:39 +08:00
Krist Wongsuphasawat
fded8f1a1c Migrate @superset-ui/color to TypeScript (#69)
* Refactor: Convert color to TS
2021-11-26 11:44:38 +08:00
Krist Wongsuphasawat
fb6cde64d8 Convert core to TS (#62)
feat: convert core models to ts
2021-11-26 11:44:38 +08:00
Chris Williams
6c8e40c710 [build] fix typescript builds (#56)
* [build] fix typescript builds

* [typescript] ensure types pass in build

* [typescript][connection] declare modules in tests

* [typescript][connection] fix ts errors in tests

* [typescript][connection] test/types.ts => types/external.d.ts

* [chart][typescript] add @types/react-loadable

* [chart][components] convert to ts

* [charts][tests][broken] convert to ts

* [chart][typescript] re-write component generics

* [chart][typescript] fix reactify generic, add react-dom types

* [chart][typescript] more iteration

* - Tweaking reactify types (using Readonly types).
- Uncovered an issue in which ReactifyProps and Props can collide on id and className.
- Move @types/react-loadable to dev dependency
- Fixing a lint error

* [chart][deps] add @types/fetch-mock

* [client][typescript] add and export SupersetClientInterface

* [chart][clients] fix ts

* [charts][components] more ts iterations

* [chart][client] assert FormData type

* [chart][deps] try adding newest @types/react

* [chart][components][ts] fix reactify prop TS

* [chart] lint

* [chart][ts] lint #2, move @types to deps not dev-deps

* [chart][jest] fix tests

* [chart][tests] up branch coverage

* [chart][ts][test] null => undefined

* [chart][tests] hundo

* [chart][tests] update name

* [chart][ts] ChartClient type fixes
2021-11-26 11:44:38 +08:00
Krist Wongsuphasawat
d9163364f9 Separate SupersetClient and SupersetClientClass (#53)
feat: Export `SupersetClientClass`
internal: Increase test coverage.
2021-11-26 11:44:37 +08:00
Krist Wongsuphasawat
3b54039428 Add reactify (#51)
feat: Add `reactify` function from `incubator-superset`
2021-11-26 11:44:37 +08:00
Krist Wongsuphasawat
a4c3e7da3a Add createLoadableRenderer (#49)
feat: Add `createLoadableRenderer`
2021-11-26 11:44:37 +08:00
Christine Chambers
0f3bd0cd9c Moving query module into superset-ui from incubator-superset (#48)
* migrate query code from incubator-superset

* Getting tests to pass

- Up build-config version to pick up a fix to eslint-typescript-parser
- Remove usage of default exports in favor of named exports unless the export is the only thing being exported out of a module
- Fixing up a few linting errors

* - Remove DatasourceKey interface in favor of readonly id and type properties on the DatasourceKey class directly.
- Adding tests for DatasourceKey.
2021-11-26 11:44:37 +08:00
Chris Williams
b3444d86df add Typescript support + convert @superset-ui/connection to Typescript (#41)
* [typescript] add build support for typescript

* [typescript] working lint and build

* [typescript] refactor SupersetClient to TS

* [typescript][connection] leverage RequestInit types when relevant

* [typescript][connection] callApi.js => callApi.ts

* [typescript][connection] remaining .js => .ts

* [typescript][connection] add and export src/types.ts, refactor things, convert test to .ts and fix

* [typescript] build:ts only in typescript-containing packages
2021-11-26 11:44:35 +08:00
Krist Wongsuphasawat
b2c7e3cade update devDependencies version (#29) 2021-11-26 11:44:34 +08:00
Krist Wongsuphasawat
86f0007a77 Add generator-superset (#21)
* add generator to monorepo

* Squash all attempts (+21 squashed commits)
Squashed commits:
[cca27ae] enable jest projects
[e7dc4ce] wip
[dd3ea7a] run in order
[cf87275] define projects
[69baf16] use specific version
[c880cfa] ignore generator test
[e9e0fd3] update travis
[4bbb3c0] update travis
[d63118b] update travis config
[267fe08] remove config
[44883e8] update travis
[40580c3] reduce node version
[59b6add] update ignore rule
[fbbd03c] update readme
[b299dfe] remove script
[a988933] fix test and lint
[95b7d5b] try install and not install
[f4583b4] remove unnecessary files
[c735329] remove eslint-config-xo
[49b3106] pass lint and test
[56c6def] remove git and readd

* can get test to pass if exclude generator-superset

* add afterall to correct working directory

* update config

* add readme
2021-11-26 11:44:34 +08:00
Chris Williams
010890ae76 [demo] add package + storybook (#25)
* [demo] add package + storybook

* [demo] add color stories

* [demo] update readme, add gh-pages hooks, remove vx deps

* [demo] remove nesting for color stories

* [gh-pages] run postrelease

* [gh-pages] add link in readme

* [demo] exclude demo package from build script
2021-11-26 11:44:33 +08:00
Krist Wongsuphasawat
3df20eff6e @superset-ui/color (#20)
* add initial files

* update references

* fix lint issues

* Define top-level exports

* disable linting for color schemes

* update test

* update travis

* update travis

* revert travis

* install once

* update clear()

* update core index test

* update color index test

* update travis

* try build before test

* update unit tes

* override beemo config

* remove test command

* update ignore path

* use new build config
2021-11-26 11:44:33 +08:00
Krist Wongsuphasawat
68c8873370 Merge pull request #17 from apache-superset/kristw--readme
Update readme and remove unnecessary items from package.json
2021-11-26 11:44:32 +08:00
Chris Williams
282e719bb1 [build-config] move to monorepo root (#11)
* [build-config] move to monorepo root

* [lint-staged] testing

* [@babel/runtime] move to package level

* [build-config] update travis.yml for root build

* [lint] generate prettier config before linting

* [build-config] ^0.0.24

* [jest] add test:watch script

* [translation] remove package scripts

* [core] set author

* [core] add .eslintrc for root overrides

* [root] fix lint + prettier scripts

* [travis][jest] try --no-cache --debug

* [travis][jest] try running jest directly

* build-config@^0.0.25 to fix jest

* travis and test script to non-debug mode

* [travis] lerna bootstrap instead of installing 2x

* [npmrc] package-lock=false

* [travis] lerna bootstrap in script not install

* [travis] install and run tests per-package

* yarn workspaces are magical
2021-11-26 11:44:31 +08:00
Chris Williams
d9cc46fd17 [SupersetClient] include csrfToken passed in configuration in headers (#10) 2021-11-26 11:44:31 +08:00
Chris Williams
fc471d6511 [core] add parseMethod (#5)
* [core] expose 'parseMethod' in SupersetClient and callApi for text responses

* [parseResponse][test] fix parseMethod test

* [monorepo] gitignore .npmrc

* [core][deps] @data-ui/build-config => ^0.0.14

* [monorepo] tweak npm scripts

* [core] clean up parseResponse

* [core] clean up parseResponse more

* [core] don't fallback to text parsing if response is supposed to be json, allow for null responseParser

* [core][tests] fix borken tests, return promises instead of calling done()
2021-11-26 11:44:30 +08:00
Chris Williams
39677afc8a [monorepo] add travis + codecov (#3)
* [monorepo] initial attempt at travis

* [monorepo] coveralls => codecov

* [monorepo] don't lerna bootstrap?

* [monorepo] ignore lock files, add lint:fix script

* [core] add node-fetch dev dep

* [monorepo] tweak codecov call

* [monorepo] tweak codecov call take ii

* [monorepo] codecov again

* [core][deps] build-config@^0.0.11

* [core][jest] add <rootDir> to coveragePathIgnorePatterns paths

* [core][jest] add collectCoverageFrom config

* [core][jest] try adding rootDir to collectCoverageFrom glob

* [core][deps] build-config@0.0.12

* [travis] yolo

* [travis] this is the one

* [travis] install global codecov

* [travis] no quotes in yml

* [travis] no quotes in yml part 2
2021-11-26 11:44:30 +08:00
Chris Williams
c4b946f965 Merge pull request #1 from apache-superset/chris--core-package
[SIP-4] add lerna monorepo and`@superset-ui/core` package with `SupersetClient`
2021-11-26 11:44:30 +08:00