Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qlik-oss/nebula.js into field-mou…
Browse files Browse the repository at this point in the history
…nt-promise
  • Loading branch information
veinfors committed Mar 20, 2023
2 parents ecfdacb + d97d14a commit 5e7a537
Show file tree
Hide file tree
Showing 82 changed files with 752 additions and 124 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.0.0-alpha.2](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2023-03-20)

### Bug Fixes

- add tooltip lock button ([#1158](https://github.com/qlik-oss/nebula.js/issues/1158)) ([e8a17b5](https://github.com/qlik-oss/nebula.js/commit/e8a17b5af15e4ded47e21f61fcca05b8302a574c))
- **deps:** update dependency webpack to v5.76.0 [security] ([#1148](https://github.com/qlik-oss/nebula.js/issues/1148)) ([6b73707](https://github.com/qlik-oss/nebula.js/commit/6b737070c567409ecbf68c734689374b3c22fc48))
- fix getting listbox theme ([#1156](https://github.com/qlik-oss/nebula.js/issues/1156)) ([ef75133](https://github.com/qlik-oss/nebula.js/commit/ef751334f374bdbb4a9bf4cdc37168c548bbd382))
- fix set focus on keyboard navigation ([#1151](https://github.com/qlik-oss/nebula.js/issues/1151)) ([17cf57b](https://github.com/qlik-oss/nebula.js/commit/17cf57b3f8e10a26c0a72f275f32f7c0d4604096))
- grid mode calculations ([#1150](https://github.com/qlik-oss/nebula.js/issues/1150)) ([7881c72](https://github.com/qlik-oss/nebula.js/commit/7881c722760fa514bba589e0d50d6fcc79410d37)), closes [#145](https://github.com/qlik-oss/nebula.js/issues/145) [#144](https://github.com/qlik-oss/nebula.js/issues/144) [#127](https://github.com/qlik-oss/nebula.js/issues/127) [#146](https://github.com/qlik-oss/nebula.js/issues/146)
- **Listbox:** rtl mode ([#1144](https://github.com/qlik-oss/nebula.js/issues/1144)) ([b25bddc](https://github.com/qlik-oss/nebula.js/commit/b25bddccc45cdcf342b92a3fb322840389334d27))
- **Listbox:** take searchEnabled and toolbar into account for minHeight ([#1143](https://github.com/qlik-oss/nebula.js/issues/1143)) ([c664dfe](https://github.com/qlik-oss/nebula.js/commit/c664dfe689fb05a2827c933b8eaeab1b71e6cf24))

### Features

- fetch frequencyMax ([#1152](https://github.com/qlik-oss/nebula.js/issues/1152)) ([2589a93](https://github.com/qlik-oss/nebula.js/commit/2589a93ff2d079d28cca6a59115a8b621175a572))

# [4.0.0-alpha.1](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2023-03-15)

### Bug Fixes
Expand Down
4 changes: 4 additions & 0 deletions apis/conversion/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.0.0-alpha.2](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2023-03-20)

**Note:** Version bump only for package @nebula.js/conversion

# [4.0.0-alpha.1](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2023-03-15)

**Note:** Version bump only for package @nebula.js/conversion
Expand Down
2 changes: 1 addition & 1 deletion apis/conversion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nebula.js/conversion",
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"private": true,
"main": "src/index.js",
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions apis/enigma-mocker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.0.0-alpha.2](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2023-03-20)

**Note:** Version bump only for package @nebula.js/enigma-mocker

# [4.0.0-alpha.1](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2023-03-15)

**Note:** Version bump only for package @nebula.js/enigma-mocker
Expand Down
2 changes: 1 addition & 1 deletion apis/enigma-mocker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nebula.js/enigma-mocker",
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"private": true,
"main": "src/index.js",
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions apis/locale/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.0.0-alpha.2](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2023-03-20)

### Bug Fixes

- add tooltip lock button ([#1158](https://github.com/qlik-oss/nebula.js/issues/1158)) ([e8a17b5](https://github.com/qlik-oss/nebula.js/commit/e8a17b5af15e4ded47e21f61fcca05b8302a574c))

# [4.0.0-alpha.1](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2023-03-15)

**Note:** Version bump only for package @nebula.js/locale
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Klicken zum Freigeben",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Unvollständige Visualisierung",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
"value": "Select possible",
"comment": "Action text to select possible selections"
},
"SelectionToolbar.ClickToUnlock": {
"value": "Click to unlock",
"comment": "Unlock a selection from listbox"
},
"Visualization.LayoutError": {
"value": "Error",
"comment": "Status text shown when a visualization has layout errors"
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Haga clic para desbloquearla",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Visualización incompleta",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Cliquez pour déverrouiller",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Visualisation incomplète",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Fare clic per sbloccare",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Visualizzazione incompleta",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "クリックしてロック解除",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "未完了のビジュアライゼーション",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "잠금을 해제하려면 클릭하십시오.",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "완료되지 않은 시각화",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Klik om te ontgrendelen",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Onvolledige visualisatie",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Aby odblokować, kliknij",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Niekompletna wizualizacja",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Clique para destravar",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Visualização incompleta",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Щелкните, чтобы разблокировать",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Незавершенная визуализация",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Klicka för att låsa upp",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Ofullständig visualisering",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "Kilidi kaldırmak için tıklayın",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "Tamamlanmamış görselleştirme",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "单击以解锁",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "不完整的可视化",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
4 changes: 4 additions & 0 deletions apis/locale/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"comment": "Action text to select possible selections",
"version": "UYEx1K96g9h4HCK3GH/6kg=="
},
"SelectionToolbar.ClickToUnlock": {
"value": "按一下以解除鎖定",
"comment": "Unlock a selection from listbox"
},
"Visualization.Incomplete": {
"value": "視覺化未完成",
"comment": "Status text shown when a visualization is incomplete",
Expand Down
2 changes: 1 addition & 1 deletion apis/locale/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nebula.js/locale",
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"private": true,
"main": "src/index.js",
"scripts": {
Expand Down
15 changes: 15 additions & 0 deletions apis/nucleus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.0.0-alpha.2](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2023-03-20)

### Bug Fixes

- add tooltip lock button ([#1158](https://github.com/qlik-oss/nebula.js/issues/1158)) ([e8a17b5](https://github.com/qlik-oss/nebula.js/commit/e8a17b5af15e4ded47e21f61fcca05b8302a574c))
- fix getting listbox theme ([#1156](https://github.com/qlik-oss/nebula.js/issues/1156)) ([ef75133](https://github.com/qlik-oss/nebula.js/commit/ef751334f374bdbb4a9bf4cdc37168c548bbd382))
- fix set focus on keyboard navigation ([#1151](https://github.com/qlik-oss/nebula.js/issues/1151)) ([17cf57b](https://github.com/qlik-oss/nebula.js/commit/17cf57b3f8e10a26c0a72f275f32f7c0d4604096))
- grid mode calculations ([#1150](https://github.com/qlik-oss/nebula.js/issues/1150)) ([7881c72](https://github.com/qlik-oss/nebula.js/commit/7881c722760fa514bba589e0d50d6fcc79410d37)), closes [#145](https://github.com/qlik-oss/nebula.js/issues/145) [#144](https://github.com/qlik-oss/nebula.js/issues/144) [#127](https://github.com/qlik-oss/nebula.js/issues/127) [#146](https://github.com/qlik-oss/nebula.js/issues/146)
- **Listbox:** rtl mode ([#1144](https://github.com/qlik-oss/nebula.js/issues/1144)) ([b25bddc](https://github.com/qlik-oss/nebula.js/commit/b25bddccc45cdcf342b92a3fb322840389334d27))
- **Listbox:** take searchEnabled and toolbar into account for minHeight ([#1143](https://github.com/qlik-oss/nebula.js/issues/1143)) ([c664dfe](https://github.com/qlik-oss/nebula.js/commit/c664dfe689fb05a2827c933b8eaeab1b71e6cf24))

### Features

- fetch frequencyMax ([#1152](https://github.com/qlik-oss/nebula.js/issues/1152)) ([2589a93](https://github.com/qlik-oss/nebula.js/commit/2589a93ff2d079d28cca6a59115a8b621175a572))

# [4.0.0-alpha.1](https://github.com/qlik-oss/nebula.js/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2023-03-15)

### Bug Fixes
Expand Down
12 changes: 6 additions & 6 deletions apis/nucleus/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "@nebula.js/nucleus",
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"private": true,
"main": "src/index.js",
"devDependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/icons-material": "^5.11.11",
"@mui/material": "^5.11.11",
"@nebula.js/conversion": "^4.0.0-alpha.1",
"@nebula.js/locale": "^4.0.0-alpha.1",
"@nebula.js/supernova": "^4.0.0-alpha.1",
"@nebula.js/theme": "^4.0.0-alpha.1",
"@nebula.js/ui": "^4.0.0-alpha.1",
"@nebula.js/conversion": "^4.0.0-alpha.2",
"@nebula.js/locale": "^4.0.0-alpha.2",
"@nebula.js/supernova": "^4.0.0-alpha.2",
"@nebula.js/theme": "^4.0.0-alpha.2",
"@nebula.js/ui": "^4.0.0-alpha.2",
"extend": "3.0.2",
"node-event-emitter": "0.0.1",
"react": "18.2.0",
Expand Down
9 changes: 6 additions & 3 deletions apis/nucleus/src/app-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ const timed = (t, v) =>

const LOAD_THEME_TIMEOUT = 5000;

export default function appTheme({ themes = [], root } = {}) {
export default function appTheme({ themes = [], loadTheme, root } = {}) {
const wrappedTheme = themeFn();

const setTheme = async (themeId) => {
const found = themes.filter((t) => t.id === themeId)[0];
let found = themes.filter((t) => t.id === themeId)[0];
let muiTheme = themeId === 'dark' ? 'dark' : 'light';
if (!found && loadTheme) {
found = { load: loadTheme };
}
if (found && found.load) {
try {
const raw = await Promise.race([found.load(), timed(LOAD_THEME_TIMEOUT, { __timedOut: true })]);
const raw = await Promise.race([found.load(themeId), timed(LOAD_THEME_TIMEOUT, { __timedOut: true })]);
if (raw.__timedOut) {
if (__NEBULA_DEV__) {
console.warn(`Timeout when loading theme '${themeId}'`); // eslint-disable-line no-console
Expand Down
11 changes: 10 additions & 1 deletion apis/nucleus/src/components/listbox/ListBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,16 @@ export default function ListBox({
});

let freqIsAllowed = getFrequencyAllowed({ itemWidth: width, layout, frequencyMode });
const sizes = getListSizes({ layout, width, height, listCount: unlimitedListCount, count, textWidth, freqIsAllowed });
const sizes = getListSizes({
layout,
width,
height,
listCount: unlimitedListCount,
count,
textWidth,
freqIsAllowed,
checkboxes,
});
if (sizes.columnWidth) {
// In grid mode, where we have a dynamic item width, get a second opinion on showing/hiding frequency.
freqIsAllowed = getFrequencyAllowed({ itemWidth: sizes.columnWidth, layout, frequencyMode });
Expand Down
21 changes: 14 additions & 7 deletions apis/nucleus/src/components/listbox/ListBoxInline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const Title = styled(Typography)(({ theme }) => ({
color: theme.listBox?.title?.main?.color,
fontSize: theme.listBox?.title?.main?.fontSize,
fontFamily: theme.listBox?.title?.main?.fontFamily,
fontWeight: theme.listBox?.title?.main?.fontWeight || 'bold',
}));

function ListBoxInline({ options, layout }) {
Expand Down Expand Up @@ -197,16 +198,16 @@ function ListBoxInline({ options, layout }) {
selectionState,
});

const { wildCardSearch, searchEnabled, layoutOptions = {} } = layout;
const showTitle = true;
const showSearchToggle = search === 'toggle' && showSearch;
const searchVisible = (search === true || showSearchToggle) && !selectDisabled();
const { layoutOptions = {} } = layout;
const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
const dense = layoutOptions.dense ?? false;
const searchHeight = dense ? 27 : 40;
const extraheight = dense ? 39 : 49;
const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
const searchAddHeight = searchVisible ? searchHeight : 0;
const minHeight = toolbar ? 49 + searchAddHeight + extraheight : 0;
const headerHeight = 32;
const { wildCardSearch, searchEnabled } = layout;

const onShowSearch = () => {
const newValue = !showSearch;
Expand Down Expand Up @@ -276,8 +277,14 @@ function ListBoxInline({ options, layout }) {
{showIcons && (
<Grid item sx={{ display: 'flex', alignItems: 'center', width: iconsWidth }}>
{isLocked ? (
<IconButton tabIndex={-1} onClick={unlock} disabled={selectDisabled()} size="large">
<Lock title={translator.get('Listbox.Unlock')} disableRipple style={{ fontSize: '12px' }} />
<IconButton
title={translator.get('SelectionToolbar.ClickToUnlock')}
tabIndex={-1}
onClick={unlock}
disabled={selectDisabled()}
size="large"
>
<Lock disableRipple style={{ fontSize: '12px' }} />
</IconButton>
) : (
showSearchIcon && (
Expand Down Expand Up @@ -324,7 +331,7 @@ function ListBoxInline({ options, layout }) {
item
container
direction="column"
style={{ height: '100%', minHeight: `${minHeight}px` }}
style={{ height: '100%', minHeight: '50px' }}
role="region"
aria-label={translator.get('Listbox.ResultFilterLabel')}
>
Expand Down

0 comments on commit 5e7a537

Please sign in to comment.