@nebula.js/stardust 3.1.3 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/esm/dev.js +212 -115
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +3 -3
- package/core/esm/index.js.map +1 -1
- package/dist/stardust.dev.js +212 -115
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +4 -4
- package/dist/stardust.js.map +1 -1
- package/package.json +9 -9
- package/types/index.d.ts +25 -8
package/dist/stardust.dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v3.
|
|
2
|
+
* @nebula.js/stardust v3.2.0
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -1020,6 +1020,46 @@
|
|
|
1020
1020
|
"zh-TW": "{0}/ {1}"
|
|
1021
1021
|
}
|
|
1022
1022
|
};
|
|
1023
|
+
var Listbox_Dismiss = {
|
|
1024
|
+
id: "Listbox.Dismiss",
|
|
1025
|
+
locale: {
|
|
1026
|
+
"de-DE": "Schließen",
|
|
1027
|
+
"en-US": "Dismiss",
|
|
1028
|
+
"es-ES": "Descartar",
|
|
1029
|
+
"fr-FR": "Ignorer",
|
|
1030
|
+
"it-IT": "Ignora",
|
|
1031
|
+
"ja-JP": "却下",
|
|
1032
|
+
"ko-KR": "해제",
|
|
1033
|
+
"nl-NL": "Overslaan",
|
|
1034
|
+
"pl-PL": "Zamknij",
|
|
1035
|
+
"pt-BR": "Ignorar",
|
|
1036
|
+
"ru-RU": "Пропустить",
|
|
1037
|
+
"sv-SE": "Hoppa över",
|
|
1038
|
+
"tr-TR": "Kapat",
|
|
1039
|
+
"zh-CN": "离开",
|
|
1040
|
+
"zh-TW": "解除"
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
var Listbox_ItemsOverflow = {
|
|
1044
|
+
id: "Listbox.ItemsOverflow",
|
|
1045
|
+
locale: {
|
|
1046
|
+
"de-DE": "Derzeit wird ein eingeschränkter Datensatz angezeigt, verwenden Sie die Suche, um die Größe zu reduzieren",
|
|
1047
|
+
"en-US": "Currently showing a limited data set, use search to reduce the size",
|
|
1048
|
+
"es-ES": "Actualmente se muestra un conjunto de datos limitado, utilice la búsqueda para reducir el tamaño",
|
|
1049
|
+
"fr-FR": "Ensemble de données limité actuellement affiché. Utilisez la rechercher pour réduire la taille.",
|
|
1050
|
+
"it-IT": "Attualmente visualizzato un set di dati limitato; utilizzare la ricerca per ridurre le dimensioni",
|
|
1051
|
+
"ja-JP": "現在表示されているデータ セットは制限されているため、検索を使ってサイズを縮小してください",
|
|
1052
|
+
"ko-KR": "현재 제한된 데이터 집합이 표시되고 있습니다. 검색을 사용하여 크기를 줄이십시오.",
|
|
1053
|
+
"nl-NL": "Er wordt momenteel een beperkte gegevensverzameling getoond, gebruik Zoeken om de omvang te verkleinen",
|
|
1054
|
+
"pl-PL": "Wyświetlany jest ograniczony zestaw danych. Użyj wyszukiwania, aby zmniejszyć rozmiar.",
|
|
1055
|
+
"pt-BR": "Atualmente mostrando um conjunto de dados limitado, use a pesquisa para reduzir o tamanho",
|
|
1056
|
+
"ru-RU": "Сейчас отображается ограниченный набор данных. Используйте поиск, чтобы уменьшить размер.",
|
|
1057
|
+
"sv-SE": "En begränsad datauppsättning visas. Använd sök för att minska storleken",
|
|
1058
|
+
"tr-TR": "Şu anda sınırlı bir veri kümesi gösteriliyor. Boyutu azaltmak için arama işlevini kullanın",
|
|
1059
|
+
"zh-CN": "目前显示有限的数据集,使用搜索来减少大小",
|
|
1060
|
+
"zh-TW": "目前顯示有限資料集,請使用搜尋減少大小"
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1023
1063
|
var Listbox_Lock = {
|
|
1024
1064
|
id: "Listbox.Lock",
|
|
1025
1065
|
locale: {
|
|
@@ -1040,6 +1080,26 @@
|
|
|
1040
1080
|
"zh-TW": "鎖定選項"
|
|
1041
1081
|
}
|
|
1042
1082
|
};
|
|
1083
|
+
var Listbox_NoMatchesForYourTerms = {
|
|
1084
|
+
id: "Listbox.NoMatchesForYourTerms",
|
|
1085
|
+
locale: {
|
|
1086
|
+
"de-DE": "Für Ihre Suche wurden keine Übereinstimmungen gefunden.",
|
|
1087
|
+
"en-US": "There are no matches for your search.",
|
|
1088
|
+
"es-ES": "No hay resultados para su búsqueda.",
|
|
1089
|
+
"fr-FR": "Aucun résultat ne correspond à votre recherche.",
|
|
1090
|
+
"it-IT": "Non è stata trovata alcuna corrispondenza per questa ricerca.",
|
|
1091
|
+
"ja-JP": "検索に一致するものがありません。",
|
|
1092
|
+
"ko-KR": "검색에 대해 일치하는 항목이 없습니다.",
|
|
1093
|
+
"nl-NL": "Er zijn geen overeenkomsten voor uw zoekopdracht.",
|
|
1094
|
+
"pl-PL": "Brak dopasowań dla tego wyszukiwania.",
|
|
1095
|
+
"pt-BR": "Não há correspondências para sua pesquisa.",
|
|
1096
|
+
"ru-RU": "Нет совпадений по вашему поисковому запросу.",
|
|
1097
|
+
"sv-SE": "Det finns inga matchningar för din sökning.",
|
|
1098
|
+
"tr-TR": "Aramanızla eşleşen sonuç yok.",
|
|
1099
|
+
"zh-CN": "您的搜索条件没有任何匹配结果。",
|
|
1100
|
+
"zh-TW": "沒有與您搜尋相符的項目。"
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1043
1103
|
var Listbox_ResultFilterLabel = {
|
|
1044
1104
|
id: "Listbox.ResultFilterLabel",
|
|
1045
1105
|
locale: {
|
|
@@ -1060,26 +1120,6 @@
|
|
|
1060
1120
|
"zh-TW": "搜尋結果篩選"
|
|
1061
1121
|
}
|
|
1062
1122
|
};
|
|
1063
|
-
var Listbox_NoMatchesForYourTerms = {
|
|
1064
|
-
id: "Listbox.NoMatchesForYourTerms",
|
|
1065
|
-
locale: {
|
|
1066
|
-
"de-DE": "Für Ihre Suche wurden keine Übereinstimmungen gefunden.",
|
|
1067
|
-
"en-US": "There are no matches for your search.",
|
|
1068
|
-
"es-ES": "No hay resultados para su búsqueda.",
|
|
1069
|
-
"fr-FR": "Aucun résultat ne correspond à votre recherche.",
|
|
1070
|
-
"it-IT": "Non esistono corrispondenze per la ricerca.",
|
|
1071
|
-
"ja-JP": "検索に一致するものがありません。",
|
|
1072
|
-
"ko-KR": "검색에 대해 일치하는 항목이 없습니다.",
|
|
1073
|
-
"nl-NL": "Er zijn geen overeenkomsten voor uw zoekopdracht.",
|
|
1074
|
-
"pl-PL": "Brak dopasowań dla tego wyszukiwania.",
|
|
1075
|
-
"pt-BR": "Não há correspondências para sua pesquisa.",
|
|
1076
|
-
"ru-RU": "Нет совпадений для искомого текста.",
|
|
1077
|
-
"sv-SE": "Det finns inga matchningar för din sökning.",
|
|
1078
|
-
"tr-TR": "Aramanızla eşleşen sonuç yok.",
|
|
1079
|
-
"zh-CN": "您的搜索条件没有任何匹配结果。",
|
|
1080
|
-
"zh-TW": "沒有與您搜尋相符的項目。"
|
|
1081
|
-
}
|
|
1082
|
-
};
|
|
1083
1123
|
var Listbox_ScreenReaderInstructions = {
|
|
1084
1124
|
id: "Listbox.ScreenReaderInstructions",
|
|
1085
1125
|
locale: {
|
|
@@ -1640,25 +1680,15 @@
|
|
|
1640
1680
|
"zh-TW": "不符計算條件"
|
|
1641
1681
|
}
|
|
1642
1682
|
};
|
|
1643
|
-
var Listbox_ItemsOverflow = {
|
|
1644
|
-
id: "Listbox.ItemsOverflow",
|
|
1645
|
-
locale: {
|
|
1646
|
-
"en-US": "Currently showing a limited data set, use search to reduce the size"
|
|
1647
|
-
}
|
|
1648
|
-
};
|
|
1649
|
-
var Listbox_Dismiss = {
|
|
1650
|
-
id: "Listbox.Dismiss",
|
|
1651
|
-
locale: {
|
|
1652
|
-
"en-US": "Dismiss"
|
|
1653
|
-
}
|
|
1654
|
-
};
|
|
1655
1683
|
var all = {
|
|
1656
1684
|
Cancel: Cancel$1,
|
|
1657
1685
|
CurrentSelections_All: CurrentSelections_All,
|
|
1658
1686
|
CurrentSelections_Of: CurrentSelections_Of,
|
|
1687
|
+
Listbox_Dismiss: Listbox_Dismiss,
|
|
1688
|
+
Listbox_ItemsOverflow: Listbox_ItemsOverflow,
|
|
1659
1689
|
Listbox_Lock: Listbox_Lock,
|
|
1660
|
-
Listbox_ResultFilterLabel: Listbox_ResultFilterLabel,
|
|
1661
1690
|
Listbox_NoMatchesForYourTerms: Listbox_NoMatchesForYourTerms,
|
|
1691
|
+
Listbox_ResultFilterLabel: Listbox_ResultFilterLabel,
|
|
1662
1692
|
Listbox_ScreenReaderInstructions: Listbox_ScreenReaderInstructions,
|
|
1663
1693
|
Listbox_Search: Listbox_Search,
|
|
1664
1694
|
Listbox_Search_ScreenReaderInstructions: Listbox_Search_ScreenReaderInstructions,
|
|
@@ -1686,9 +1716,7 @@
|
|
|
1686
1716
|
Visualization_Invalid_Dimension: Visualization_Invalid_Dimension,
|
|
1687
1717
|
Visualization_Invalid_Measure: Visualization_Invalid_Measure,
|
|
1688
1718
|
Visualization_LayoutError: Visualization_LayoutError,
|
|
1689
|
-
Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition
|
|
1690
|
-
Listbox_ItemsOverflow: Listbox_ItemsOverflow,
|
|
1691
|
-
Listbox_Dismiss: Listbox_Dismiss
|
|
1719
|
+
Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition
|
|
1692
1720
|
};
|
|
1693
1721
|
|
|
1694
1722
|
function appLocaleFn(language) {
|
|
@@ -14360,7 +14388,7 @@
|
|
|
14360
14388
|
return cache[key];
|
|
14361
14389
|
}
|
|
14362
14390
|
|
|
14363
|
-
const NEBULA_VERSION_HASH = "
|
|
14391
|
+
const NEBULA_VERSION_HASH = "070a" ;
|
|
14364
14392
|
ClassNameGenerator$1.configure(componentName => {
|
|
14365
14393
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
14366
14394
|
});
|
|
@@ -14879,7 +14907,7 @@
|
|
|
14879
14907
|
const appRef = React.createRef();
|
|
14880
14908
|
const element = document.createElement('div');
|
|
14881
14909
|
element.style.display = 'none';
|
|
14882
|
-
element.setAttribute('data-nebulajs-version', "3.
|
|
14910
|
+
element.setAttribute('data-nebulajs-version', "3.2.0" );
|
|
14883
14911
|
element.setAttribute('data-app-id', app.id);
|
|
14884
14912
|
document.body.appendChild(element);
|
|
14885
14913
|
ReactDOM.render( /*#__PURE__*/React.createElement(NebulaApp, {
|
|
@@ -21658,7 +21686,8 @@
|
|
|
21658
21686
|
};
|
|
21659
21687
|
const iconStyles = {
|
|
21660
21688
|
alignItems: 'center',
|
|
21661
|
-
display: 'flex'
|
|
21689
|
+
display: 'flex',
|
|
21690
|
+
fontSize: '8px'
|
|
21662
21691
|
};
|
|
21663
21692
|
const showLock = isSelected && isLocked;
|
|
21664
21693
|
const showTick = !checkboxes && isSelected && !isLocked;
|
|
@@ -24768,7 +24797,8 @@
|
|
|
24768
24797
|
keyboard,
|
|
24769
24798
|
dense = false,
|
|
24770
24799
|
visible = true,
|
|
24771
|
-
wildCardSearch = true
|
|
24800
|
+
wildCardSearch = true,
|
|
24801
|
+
searchEnabled
|
|
24772
24802
|
} = _ref3;
|
|
24773
24803
|
const {
|
|
24774
24804
|
translator
|
|
@@ -24854,7 +24884,7 @@
|
|
|
24854
24884
|
}
|
|
24855
24885
|
return response;
|
|
24856
24886
|
};
|
|
24857
|
-
if (!visible) {
|
|
24887
|
+
if (!visible || searchEnabled === false) {
|
|
24858
24888
|
return null;
|
|
24859
24889
|
}
|
|
24860
24890
|
return /*#__PURE__*/React.createElement(StyledOutlinedInput, {
|
|
@@ -25085,7 +25115,8 @@
|
|
|
25085
25115
|
const getClickOutFuncs = _ref3 => {
|
|
25086
25116
|
let {
|
|
25087
25117
|
elements,
|
|
25088
|
-
objectSelections
|
|
25118
|
+
objectSelections,
|
|
25119
|
+
options
|
|
25089
25120
|
} = _ref3;
|
|
25090
25121
|
const handler = createHandler({
|
|
25091
25122
|
elements,
|
|
@@ -25093,14 +25124,18 @@
|
|
|
25093
25124
|
});
|
|
25094
25125
|
return {
|
|
25095
25126
|
activateClickOut() {
|
|
25127
|
+
var _options$onSelectionA;
|
|
25096
25128
|
document.addEventListener('mousedown', handler);
|
|
25129
|
+
(_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0 ? void 0 : _options$onSelectionA.call(options);
|
|
25097
25130
|
},
|
|
25098
25131
|
deactivateClickOut() {
|
|
25132
|
+
var _options$onSelectionD;
|
|
25099
25133
|
document.removeEventListener('mousedown', handler);
|
|
25134
|
+
(_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0 ? void 0 : _options$onSelectionD.call(options);
|
|
25100
25135
|
}
|
|
25101
25136
|
};
|
|
25102
25137
|
};
|
|
25103
|
-
function useObjectSelections(app, model, elements) {
|
|
25138
|
+
function useObjectSelections(app, model, elements, options) {
|
|
25104
25139
|
const elementsArr = Array.isArray(elements) ? elements : [elements];
|
|
25105
25140
|
const [appSelections] = useAppSelections(app);
|
|
25106
25141
|
const [layout] = useLayout$1(model);
|
|
@@ -25126,7 +25161,8 @@
|
|
|
25126
25161
|
deactivateClickOut
|
|
25127
25162
|
} = getClickOutFuncs({
|
|
25128
25163
|
elements: elementsArr,
|
|
25129
|
-
objectSelections
|
|
25164
|
+
objectSelections,
|
|
25165
|
+
options
|
|
25130
25166
|
});
|
|
25131
25167
|
objectSelections.addListener('activated', activateClickOut);
|
|
25132
25168
|
objectSelections.addListener('deactivated', deactivateClickOut);
|
|
@@ -26584,7 +26620,6 @@
|
|
|
26584
26620
|
checkboxes,
|
|
26585
26621
|
search = true,
|
|
26586
26622
|
focusSearch = false,
|
|
26587
|
-
toolbar = true,
|
|
26588
26623
|
rangeSelect = true,
|
|
26589
26624
|
model,
|
|
26590
26625
|
selections,
|
|
@@ -26596,6 +26631,9 @@
|
|
|
26596
26631
|
showGray = true,
|
|
26597
26632
|
scrollState = undefined
|
|
26598
26633
|
} = options;
|
|
26634
|
+
let {
|
|
26635
|
+
toolbar = true
|
|
26636
|
+
} = options;
|
|
26599
26637
|
|
|
26600
26638
|
// Hook that will trigger update when used in useEffects.
|
|
26601
26639
|
// Modified from: https://medium.com/@teh_builder/ref-objects-inside-useeffect-hooks-eb7c15198780
|
|
@@ -26609,9 +26647,6 @@
|
|
|
26609
26647
|
return [ref, setRef];
|
|
26610
26648
|
};
|
|
26611
26649
|
const theme = useTheme$1();
|
|
26612
|
-
const lock = reactExports.useCallback(() => {
|
|
26613
|
-
model.lock('/qListObjectDef');
|
|
26614
|
-
}, [model]);
|
|
26615
26650
|
const unlock = reactExports.useCallback(() => {
|
|
26616
26651
|
model.unlock('/qListObjectDef');
|
|
26617
26652
|
}, [model]);
|
|
@@ -26637,13 +26672,19 @@
|
|
|
26637
26672
|
// this will be static until we can access the useKeyboard hook
|
|
26638
26673
|
active: keyboardActive
|
|
26639
26674
|
};
|
|
26675
|
+
if ((layout === null || layout === void 0 ? void 0 : layout.toolbar) !== undefined) {
|
|
26676
|
+
toolbar = layout.toolbar;
|
|
26677
|
+
}
|
|
26640
26678
|
reactExports.useEffect(() => {
|
|
26641
26679
|
const show = () => {
|
|
26642
26680
|
setShowToolbar(true);
|
|
26681
|
+
if (search === 'inSelection') {
|
|
26682
|
+
setShowSearch(true);
|
|
26683
|
+
}
|
|
26643
26684
|
};
|
|
26644
26685
|
const hide = () => {
|
|
26645
26686
|
setShowToolbar(false);
|
|
26646
|
-
if (search === 'toggle') {
|
|
26687
|
+
if (search === 'toggle' || search === 'inSelection') {
|
|
26647
26688
|
setShowSearch(false);
|
|
26648
26689
|
}
|
|
26649
26690
|
};
|
|
@@ -26680,31 +26721,19 @@
|
|
|
26680
26721
|
model,
|
|
26681
26722
|
translator
|
|
26682
26723
|
}) : [];
|
|
26683
|
-
const
|
|
26684
|
-
const searchVisible = (search === true || search === 'toggle' && showSearch) && !selectDisabled();
|
|
26724
|
+
const searchVisible = (search === true || (search === 'toggle' || search === 'inSelection') && showSearch) && !selectDisabled();
|
|
26685
26725
|
const dense = (_layout$layoutOptions = (_layout$layoutOptions2 = layout.layoutOptions) === null || _layout$layoutOptions2 === void 0 ? void 0 : _layout$layoutOptions2.dense) !== null && _layout$layoutOptions !== void 0 ? _layout$layoutOptions : false;
|
|
26686
26726
|
const searchHeight = dense ? 27 : 40;
|
|
26687
26727
|
const extraheight = dense ? 39 : 49;
|
|
26688
26728
|
const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
|
|
26689
|
-
const
|
|
26729
|
+
const {
|
|
26730
|
+
wildCardSearch,
|
|
26731
|
+
searchEnabled
|
|
26732
|
+
} = layout;
|
|
26690
26733
|
const onShowSearch = () => {
|
|
26691
26734
|
const newValue = !showSearch;
|
|
26692
26735
|
setShowSearch(newValue);
|
|
26693
26736
|
};
|
|
26694
|
-
const getSearchOrUnlock = () => {
|
|
26695
|
-
const showSearchIcon = search === 'toggle' && !hasSelections$1;
|
|
26696
|
-
return showSearchIcon ? /*#__PURE__*/React.createElement(IconButton$1, {
|
|
26697
|
-
onClick: onShowSearch,
|
|
26698
|
-
tabIndex: -1,
|
|
26699
|
-
title: translator.get('Listbox.Search'),
|
|
26700
|
-
size: "large"
|
|
26701
|
-
}, /*#__PURE__*/React.createElement(SearchIcon, null)) : /*#__PURE__*/React.createElement(IconButton$1, {
|
|
26702
|
-
onClick: lock,
|
|
26703
|
-
tabIndex: -1,
|
|
26704
|
-
disabled: !hasSelections$1,
|
|
26705
|
-
size: "large"
|
|
26706
|
-
}, /*#__PURE__*/React.createElement(Unlock, null));
|
|
26707
|
-
};
|
|
26708
26737
|
return /*#__PURE__*/React.createElement(StyledGrid$3, {
|
|
26709
26738
|
className: "listbox-container",
|
|
26710
26739
|
container: true,
|
|
@@ -26717,28 +26746,44 @@
|
|
|
26717
26746
|
flexFlow: 'column nowrap'
|
|
26718
26747
|
},
|
|
26719
26748
|
onKeyDown: handleKeyDown
|
|
26720
|
-
}, toolbar && /*#__PURE__*/React.createElement(Grid$1, {
|
|
26749
|
+
}, toolbar && layout.title && /*#__PURE__*/React.createElement(Grid$1, {
|
|
26721
26750
|
item: true,
|
|
26722
26751
|
container: true,
|
|
26723
26752
|
style: {
|
|
26724
26753
|
padding: theme.spacing(1)
|
|
26725
26754
|
}
|
|
26726
26755
|
}, /*#__PURE__*/React.createElement(Grid$1, {
|
|
26727
|
-
item: true
|
|
26756
|
+
item: true,
|
|
26757
|
+
sx: {
|
|
26758
|
+
display: 'flex',
|
|
26759
|
+
alignItems: 'center'
|
|
26760
|
+
}
|
|
26728
26761
|
}, isLocked ? /*#__PURE__*/React.createElement(IconButton$1, {
|
|
26729
26762
|
tabIndex: -1,
|
|
26730
26763
|
onClick: unlock,
|
|
26731
26764
|
disabled: !isLocked,
|
|
26732
26765
|
size: "large"
|
|
26733
26766
|
}, /*#__PURE__*/React.createElement(Lock, {
|
|
26734
|
-
title: translator.get('Listbox.Unlock')
|
|
26735
|
-
|
|
26767
|
+
title: translator.get('Listbox.Unlock'),
|
|
26768
|
+
style: {
|
|
26769
|
+
fontSize: '12px'
|
|
26770
|
+
}
|
|
26771
|
+
})) : searchEnabled !== false && /*#__PURE__*/React.createElement(IconButton$1, {
|
|
26772
|
+
onClick: onShowSearch,
|
|
26773
|
+
tabIndex: -1,
|
|
26774
|
+
title: translator.get('Listbox.Search'),
|
|
26775
|
+
size: "large"
|
|
26776
|
+
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
26777
|
+
style: {
|
|
26778
|
+
fontSize: '12px'
|
|
26779
|
+
}
|
|
26780
|
+
}))), /*#__PURE__*/React.createElement(Grid$1, {
|
|
26736
26781
|
item: true,
|
|
26737
26782
|
className: classes$4.listBoxHeader
|
|
26738
26783
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
26739
26784
|
variant: "h6",
|
|
26740
26785
|
noWrap: true
|
|
26741
|
-
}, layout.title
|
|
26786
|
+
}, layout.title)), /*#__PURE__*/React.createElement(Grid$1, {
|
|
26742
26787
|
item: true,
|
|
26743
26788
|
xs: true
|
|
26744
26789
|
}), /*#__PURE__*/React.createElement(Grid$1, {
|
|
@@ -26784,7 +26829,8 @@
|
|
|
26784
26829
|
keyboard: keyboard,
|
|
26785
26830
|
visible: searchVisible,
|
|
26786
26831
|
searchContainerRef: searchContainerRef,
|
|
26787
|
-
wildCardSearch: wildCardSearch
|
|
26832
|
+
wildCardSearch: wildCardSearch,
|
|
26833
|
+
searchEnabled: searchEnabled
|
|
26788
26834
|
})), /*#__PURE__*/React.createElement(Grid$1, {
|
|
26789
26835
|
item: true,
|
|
26790
26836
|
xs: true
|
|
@@ -27070,7 +27116,7 @@
|
|
|
27070
27116
|
options
|
|
27071
27117
|
});
|
|
27072
27118
|
const elementRef = reactExports.useRef(element);
|
|
27073
|
-
const selections = hasExternalSelectionsApi ? options.selectionsApi : useObjectSelections(app, model, elementRef)[0];
|
|
27119
|
+
const selections = hasExternalSelectionsApi ? options.selectionsApi : useObjectSelections(app, model, elementRef, options)[0];
|
|
27074
27120
|
if (!selections || !model) {
|
|
27075
27121
|
return null;
|
|
27076
27122
|
}
|
|
@@ -33918,9 +33964,9 @@
|
|
|
33918
33964
|
version
|
|
33919
33965
|
} = typeInfo;
|
|
33920
33966
|
if (!tc[name]) {
|
|
33921
|
-
//
|
|
33967
|
+
// Chart not registered, so we'll do that now.
|
|
33922
33968
|
{
|
|
33923
|
-
console.warn("Visualization ".concat(name, " is not registered.")); // eslint-disable-line no-console
|
|
33969
|
+
console.warn("Visualization ".concat(name, " is not registered. Adding it now.")); // eslint-disable-line no-console
|
|
33924
33970
|
}
|
|
33925
33971
|
|
|
33926
33972
|
this.register({
|
|
@@ -33951,26 +33997,6 @@
|
|
|
33951
33997
|
};
|
|
33952
33998
|
}
|
|
33953
33999
|
|
|
33954
|
-
/**
|
|
33955
|
-
* @interface Context
|
|
33956
|
-
* @property {boolean=} keyboardNavigation
|
|
33957
|
-
* @property {object=} constraints
|
|
33958
|
-
* @property {boolean=} constraints.active
|
|
33959
|
-
* @property {boolean=} constraints.passive
|
|
33960
|
-
* @property {boolean=} constraints.select
|
|
33961
|
-
*/
|
|
33962
|
-
const DEFAULT_CONTEXT = /** @lends Context */{
|
|
33963
|
-
/** @type {string=} */
|
|
33964
|
-
theme: 'light',
|
|
33965
|
-
/** @type {string=} */
|
|
33966
|
-
language: 'en-US',
|
|
33967
|
-
/** @type {string=} */
|
|
33968
|
-
deviceType: 'auto',
|
|
33969
|
-
constraints: {},
|
|
33970
|
-
keyboardNavigation: false,
|
|
33971
|
-
disableCellPadding: false
|
|
33972
|
-
};
|
|
33973
|
-
|
|
33974
34000
|
/**
|
|
33975
34001
|
* @interface SnapshotConfiguration
|
|
33976
34002
|
* @private
|
|
@@ -34000,30 +34026,68 @@
|
|
|
34000
34026
|
|
|
34001
34027
|
/**
|
|
34002
34028
|
* @interface Configuration
|
|
34029
|
+
* @property {LoadType=} load Fallback load function for missing types
|
|
34030
|
+
* @property {Context=} context Settings for the rendering instance
|
|
34031
|
+
* @property {Array<TypeInfo>=} types Visualization types to register
|
|
34032
|
+
* @property {Array<ThemeInfo>=} themes Themes to register
|
|
34033
|
+
* @property {object=} anything
|
|
34034
|
+
* @example
|
|
34035
|
+
* import { embed } from '@nebula.js/stardust'
|
|
34036
|
+
* n = embed(app, {
|
|
34037
|
+
* context: {
|
|
34038
|
+
* keyboardNavigation: true,
|
|
34039
|
+
* theme: 'purple',
|
|
34040
|
+
* },
|
|
34041
|
+
* load: ({ name, version }) => {
|
|
34042
|
+
* if (name === 'linechart') {
|
|
34043
|
+
* return Promise.resolve(line);
|
|
34044
|
+
* }
|
|
34045
|
+
* },
|
|
34046
|
+
* types: [
|
|
34047
|
+
* {
|
|
34048
|
+
* name: 'bar',
|
|
34049
|
+
* load: () => Promise.resolve(bar),
|
|
34050
|
+
* },
|
|
34051
|
+
* ],
|
|
34052
|
+
* themes: [
|
|
34053
|
+
* {
|
|
34054
|
+
* id: 'purple',
|
|
34055
|
+
* load: () => Promise.resolve(purpleThemeJson),
|
|
34056
|
+
* },
|
|
34057
|
+
* ],
|
|
34058
|
+
* });
|
|
34003
34059
|
*/
|
|
34004
|
-
|
|
34005
|
-
|
|
34006
|
-
|
|
34007
|
-
*/
|
|
34008
|
-
context: DEFAULT_CONTEXT,
|
|
34060
|
+
|
|
34061
|
+
const DEFAULT_CONFIG = {
|
|
34062
|
+
context: {},
|
|
34009
34063
|
load: () => undefined,
|
|
34010
|
-
/**
|
|
34011
|
-
* @type {(TypeInfo[])=}
|
|
34012
|
-
*/
|
|
34013
34064
|
types: [],
|
|
34014
|
-
/**
|
|
34015
|
-
* @type {(ThemeInfo[])=}
|
|
34016
|
-
*/
|
|
34017
34065
|
themes: [],
|
|
34018
|
-
/** @type {object=} */
|
|
34019
34066
|
anything: {},
|
|
34020
|
-
/**
|
|
34021
|
-
* @type {SnapshotConfiguration=}
|
|
34022
|
-
* @private
|
|
34023
|
-
*/
|
|
34024
34067
|
snapshot: DEFAULT_SNAPSHOT_CONFIG
|
|
34025
34068
|
};
|
|
34026
34069
|
|
|
34070
|
+
/**
|
|
34071
|
+
* @interface Context
|
|
34072
|
+
* @property {boolean=} keyboardNavigation
|
|
34073
|
+
* @property {object=} constraints
|
|
34074
|
+
* @property {boolean=} constraints.active
|
|
34075
|
+
* @property {boolean=} constraints.passive
|
|
34076
|
+
* @property {boolean=} constraints.select
|
|
34077
|
+
*/
|
|
34078
|
+
const DEFAULT_CONTEXT = /** @lends Context */{
|
|
34079
|
+
/** @type {string=} */
|
|
34080
|
+
theme: 'light',
|
|
34081
|
+
/** @type {string=} */
|
|
34082
|
+
language: 'en-US',
|
|
34083
|
+
/** @type {string=} */
|
|
34084
|
+
deviceType: 'auto',
|
|
34085
|
+
constraints: {},
|
|
34086
|
+
keyboardNavigation: false,
|
|
34087
|
+
disableCellPadding: false
|
|
34088
|
+
};
|
|
34089
|
+
DEFAULT_CONFIG.context = DEFAULT_CONTEXT;
|
|
34090
|
+
|
|
34027
34091
|
/**
|
|
34028
34092
|
* @interface Galaxy
|
|
34029
34093
|
*/
|
|
@@ -34296,7 +34360,34 @@
|
|
|
34296
34360
|
*/
|
|
34297
34361
|
|
|
34298
34362
|
/**
|
|
34299
|
-
* @typedef { boolean | 'toggle' } SearchMode
|
|
34363
|
+
* @typedef { boolean | 'toggle' | 'inSelection' } SearchMode
|
|
34364
|
+
*/
|
|
34365
|
+
|
|
34366
|
+
/**
|
|
34367
|
+
* @typedef { 'selectionActivated' | 'selectionDeactivated' } FieldEventTypes
|
|
34368
|
+
*/
|
|
34369
|
+
|
|
34370
|
+
/**
|
|
34371
|
+
* Event listener function on instance
|
|
34372
|
+
*
|
|
34373
|
+
* @method
|
|
34374
|
+
* @name FieldInstance#on
|
|
34375
|
+
* @param {FieldEventTypes} eventType event type that function needs to listen
|
|
34376
|
+
* @param {Function} callback a callback function to run when event emits
|
|
34377
|
+
* @example
|
|
34378
|
+
* const handleSomeEvent () => {...};
|
|
34379
|
+
* fieldInstance.on('someEvent', handleSomeEvent);
|
|
34380
|
+
* ...
|
|
34381
|
+
* fieldInstance.removeListener('someEvent', handleSomeEvent);
|
|
34382
|
+
*/
|
|
34383
|
+
|
|
34384
|
+
/**
|
|
34385
|
+
* Remove listener on instance
|
|
34386
|
+
*
|
|
34387
|
+
* @method
|
|
34388
|
+
* @name FieldInstance#removeListener
|
|
34389
|
+
* @param {FieldEventTypes} eventType event type
|
|
34390
|
+
* @param {Function} callback handler
|
|
34300
34391
|
*/
|
|
34301
34392
|
|
|
34302
34393
|
/**
|
|
@@ -34315,7 +34406,7 @@
|
|
|
34315
34406
|
* @param {ListLayout=} [options.listLayout=vertical] Layout direction vertical|horizontal (not applicable for existing objects)
|
|
34316
34407
|
* @param {FrequencyMode=} [options.frequencyMode=none] Show frequency none|value|percent|relative
|
|
34317
34408
|
* @param {boolean=} [options.histogram=false] Show histogram bar (not applicable for existing objects)
|
|
34318
|
-
* @param {SearchMode=} [options.search=true] Show the search bar permanently
|
|
34409
|
+
* @param {SearchMode=} [options.search=true] Show the search bar permanently, using the toggle button or when in selection: false|true|toggle|inSelection
|
|
34319
34410
|
* @param {boolean=} [options.toolbar=true] Show the toolbar
|
|
34320
34411
|
* @param {boolean=} [options.checkboxes=false] Show values as checkboxes instead of as fields (not applicable for existing objects)
|
|
34321
34412
|
* @param {boolean=} [options.dense=false] Reduces padding and text size (not applicable for existing objects)
|
|
@@ -34335,12 +34426,17 @@
|
|
|
34335
34426
|
if (this._instance) {
|
|
34336
34427
|
throw new Error("Field or object ".concat(fieldName || qId, " already mounted"));
|
|
34337
34428
|
}
|
|
34429
|
+
const onSelectionActivated = () => fieldSels.emit('selectionActivated');
|
|
34430
|
+
const onSelectionDeactivated = () => fieldSels.emit('selectionDeactivated');
|
|
34338
34431
|
this._instance = ListBoxPortal({
|
|
34339
34432
|
element,
|
|
34340
34433
|
app,
|
|
34341
34434
|
fieldIdentifier,
|
|
34342
34435
|
qId,
|
|
34343
|
-
options: getOptions$1(
|
|
34436
|
+
options: getOptions$1(_objectSpread2({
|
|
34437
|
+
onSelectionActivated,
|
|
34438
|
+
onSelectionDeactivated
|
|
34439
|
+
}, options)),
|
|
34344
34440
|
stateName: options.stateName || '$'
|
|
34345
34441
|
});
|
|
34346
34442
|
root.add(this._instance);
|
|
@@ -34359,6 +34455,7 @@
|
|
|
34359
34455
|
}
|
|
34360
34456
|
}
|
|
34361
34457
|
};
|
|
34458
|
+
eventmixin(fieldSels);
|
|
34362
34459
|
return fieldSels;
|
|
34363
34460
|
},
|
|
34364
34461
|
/**
|