@nebula.js/stardust 4.0.0-alpha.3 → 4.0.0-alpha.5
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 +196 -93
- 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 +196 -93
- 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/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v4.0.0-alpha.
|
|
2
|
+
* @nebula.js/stardust v4.0.0-alpha.5
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -1493,6 +1493,26 @@ var Selection_SelectPossible = {
|
|
|
1493
1493
|
"zh-TW": "選取可能值"
|
|
1494
1494
|
}
|
|
1495
1495
|
};
|
|
1496
|
+
var SelectionToolbar_ClickToUnlock = {
|
|
1497
|
+
id: "SelectionToolbar.ClickToUnlock",
|
|
1498
|
+
locale: {
|
|
1499
|
+
"de-DE": "Klicken zum Freigeben",
|
|
1500
|
+
"en-US": "Click to unlock",
|
|
1501
|
+
"es-ES": "Haga clic para desbloquearla",
|
|
1502
|
+
"fr-FR": "Cliquez pour déverrouiller",
|
|
1503
|
+
"it-IT": "Fare clic per sbloccare",
|
|
1504
|
+
"ja-JP": "クリックしてロック解除",
|
|
1505
|
+
"ko-KR": "잠금을 해제하려면 클릭하십시오.",
|
|
1506
|
+
"nl-NL": "Klik om te ontgrendelen",
|
|
1507
|
+
"pl-PL": "Aby odblokować, kliknij",
|
|
1508
|
+
"pt-BR": "Clique para destravar",
|
|
1509
|
+
"ru-RU": "Щелкните, чтобы разблокировать",
|
|
1510
|
+
"sv-SE": "Klicka för att låsa upp",
|
|
1511
|
+
"tr-TR": "Kilidi kaldırmak için tıklayın",
|
|
1512
|
+
"zh-CN": "单击以解锁",
|
|
1513
|
+
"zh-TW": "按一下以解除鎖定"
|
|
1514
|
+
}
|
|
1515
|
+
};
|
|
1496
1516
|
var Visualization_Incomplete = {
|
|
1497
1517
|
id: "Visualization.Incomplete",
|
|
1498
1518
|
locale: {
|
|
@@ -1664,6 +1684,7 @@ var all = {
|
|
|
1664
1684
|
Selection_SelectAlternative: Selection_SelectAlternative,
|
|
1665
1685
|
Selection_SelectExcluded: Selection_SelectExcluded,
|
|
1666
1686
|
Selection_SelectPossible: Selection_SelectPossible,
|
|
1687
|
+
SelectionToolbar_ClickToUnlock: SelectionToolbar_ClickToUnlock,
|
|
1667
1688
|
Visualization_Incomplete: Visualization_Incomplete,
|
|
1668
1689
|
Visualization_Incomplete_Dimensions: Visualization_Incomplete_Dimensions,
|
|
1669
1690
|
Visualization_Incomplete_Measures: Visualization_Incomplete_Measures,
|
|
@@ -8043,7 +8064,7 @@ function create$3(definition) {
|
|
|
8043
8064
|
return cache[key];
|
|
8044
8065
|
}
|
|
8045
8066
|
|
|
8046
|
-
const NEBULA_VERSION_HASH = "
|
|
8067
|
+
const NEBULA_VERSION_HASH = "6643" ;
|
|
8047
8068
|
ClassNameGenerator$1.configure(componentName => {
|
|
8048
8069
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
8049
8070
|
});
|
|
@@ -8251,7 +8272,7 @@ function boot(_ref2) {
|
|
|
8251
8272
|
const appRef = React__default.createRef();
|
|
8252
8273
|
const element = document.createElement('div');
|
|
8253
8274
|
element.style.display = 'none';
|
|
8254
|
-
element.setAttribute('data-nebulajs-version', "4.0.0-alpha.
|
|
8275
|
+
element.setAttribute('data-nebulajs-version', "4.0.0-alpha.5" );
|
|
8255
8276
|
element.setAttribute('data-app-id', app.id);
|
|
8256
8277
|
document.body.appendChild(element);
|
|
8257
8278
|
const root = client.createRoot(element);
|
|
@@ -9620,6 +9641,16 @@ const getValueStateClasses = _ref2 => {
|
|
|
9620
9641
|
return clazzArr;
|
|
9621
9642
|
};
|
|
9622
9643
|
|
|
9644
|
+
const CELL_PADDING_LEFT = 9;
|
|
9645
|
+
const ICON_WIDTH = 12;
|
|
9646
|
+
const ICON_PADDING = 7;
|
|
9647
|
+
const BUTTON_ICON_WIDTH = ICON_WIDTH + (ICON_PADDING + 1) * 2; // 1 is border width
|
|
9648
|
+
const REMOVE_TICK_LIMIT = 80; // an item width equal to or less than this, will hide the select tick
|
|
9649
|
+
const SCROLL_BAR_WIDTH = 10; // TODO: ignore this - instead set the styling only show on hover...
|
|
9650
|
+
const ITEM_MAX_WIDTH = 150;
|
|
9651
|
+
const FREQUENCY_WIDTH = 40;
|
|
9652
|
+
const ITEM_MIN_WIDTH = 56;
|
|
9653
|
+
const CHECKBOX_WIDTH = 20;
|
|
9623
9654
|
const frequencyTextNone = '-';
|
|
9624
9655
|
const barPadPx = 4;
|
|
9625
9656
|
const barBorderWidthPx = 1;
|
|
@@ -9639,11 +9670,6 @@ const getBarWidth = _ref => {
|
|
|
9639
9670
|
};
|
|
9640
9671
|
const getFrequencyText = qFrequency => qFrequency || frequencyTextNone;
|
|
9641
9672
|
|
|
9642
|
-
const CELL_PADDING_LEFT = 9;
|
|
9643
|
-
const ICON_WIDTH = 12;
|
|
9644
|
-
const ICON_PADDING = 7;
|
|
9645
|
-
const BUTTON_ICON_WIDTH = ICON_WIDTH + (ICON_PADDING + 1) * 2; // 1 is border width
|
|
9646
|
-
|
|
9647
9673
|
const getSelectedStyle = _ref => {
|
|
9648
9674
|
let {
|
|
9649
9675
|
theme
|
|
@@ -9669,7 +9695,7 @@ const ellipsis = {
|
|
|
9669
9695
|
const iconWidth = 24; // tick and lock icon width in px
|
|
9670
9696
|
|
|
9671
9697
|
const RowColRoot = styled$1('div', {
|
|
9672
|
-
shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth'
|
|
9698
|
+
shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth'].includes(prop)
|
|
9673
9699
|
})(_ref2 => {
|
|
9674
9700
|
var _theme$listBox$conten, _theme$listBox, _theme$listBox$conten2, _theme$listBox$conten3, _theme$listBox2, _theme$listBox2$conte, _theme$listBox3, _theme$listBox3$conte, _theme$listBox4, _theme$listBox4$conte;
|
|
9675
9701
|
let {
|
|
@@ -9678,9 +9704,7 @@ const RowColRoot = styled$1('div', {
|
|
|
9678
9704
|
isGridMode,
|
|
9679
9705
|
isGridCol,
|
|
9680
9706
|
dense,
|
|
9681
|
-
frequencyWidth
|
|
9682
|
-
showIcon,
|
|
9683
|
-
checkboxes
|
|
9707
|
+
frequencyWidth
|
|
9684
9708
|
} = _ref2;
|
|
9685
9709
|
return {
|
|
9686
9710
|
'&:focus': {
|
|
@@ -9725,7 +9749,7 @@ const RowColRoot = styled$1('div', {
|
|
|
9725
9749
|
flexBasis: flexBasisProp,
|
|
9726
9750
|
lineHeight: '16px',
|
|
9727
9751
|
userSelect: 'none',
|
|
9728
|
-
paddingRight:
|
|
9752
|
+
paddingRight: '1px'
|
|
9729
9753
|
}, ellipsis), {}, {
|
|
9730
9754
|
whiteSpace: 'pre',
|
|
9731
9755
|
// to keep white-space on highlight
|
|
@@ -9763,6 +9787,12 @@ const RowColRoot = styled$1('div', {
|
|
|
9763
9787
|
paddingRight: '2px'
|
|
9764
9788
|
})
|
|
9765
9789
|
},
|
|
9790
|
+
["& .".concat(rowColClasses.checkboxLabel, " .").concat(rowColClasses.labelText)]: {
|
|
9791
|
+
width: 'auto'
|
|
9792
|
+
},
|
|
9793
|
+
["& .".concat(rowColClasses.checkboxLabel, " .").concat(rowColClasses.labelText, ".").concat(rowColClasses.highlighted)]: {
|
|
9794
|
+
width: 'auto'
|
|
9795
|
+
},
|
|
9766
9796
|
// The icons container holding tick and lock, shown inside fields.
|
|
9767
9797
|
["& .".concat(rowColClasses.icon)]: {
|
|
9768
9798
|
display: 'flex',
|
|
@@ -9797,7 +9827,7 @@ const RowColRoot = styled$1('div', {
|
|
|
9797
9827
|
["& .".concat(rowColClasses.frequencyCount)]: _objectSpread2(_objectSpread2({
|
|
9798
9828
|
justifyContent: 'flex-end'
|
|
9799
9829
|
}, ellipsis), {}, {
|
|
9800
|
-
flex: "0 1 ".concat(frequencyWidth
|
|
9830
|
+
flex: "0 1 ".concat(frequencyWidth, "px"),
|
|
9801
9831
|
textAlign: 'right',
|
|
9802
9832
|
paddingLeft: '2px'
|
|
9803
9833
|
}),
|
|
@@ -10103,9 +10133,12 @@ function LabelsWithRanges(_ref) {
|
|
|
10103
10133
|
labels,
|
|
10104
10134
|
dense,
|
|
10105
10135
|
showGray,
|
|
10106
|
-
checkboxes
|
|
10136
|
+
checkboxes,
|
|
10137
|
+
textDirection
|
|
10107
10138
|
} = _ref;
|
|
10108
|
-
return /*#__PURE__*/React__default.createElement(
|
|
10139
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10140
|
+
dir: textDirection
|
|
10141
|
+
}, labels.map((_ref2, index) => {
|
|
10109
10142
|
let [label, highlighted] = _ref2;
|
|
10110
10143
|
const key = "".concat(index);
|
|
10111
10144
|
return /*#__PURE__*/React__default.createElement(ValueField, {
|
|
@@ -10131,13 +10164,15 @@ function FieldWithRanges(_ref3) {
|
|
|
10131
10164
|
cell,
|
|
10132
10165
|
isGridCol,
|
|
10133
10166
|
isSingleSelect,
|
|
10134
|
-
valueTextAlign
|
|
10167
|
+
valueTextAlign,
|
|
10168
|
+
textDirection
|
|
10135
10169
|
} = _ref3;
|
|
10136
10170
|
const LWR = /*#__PURE__*/React__default.createElement(LabelsWithRanges, {
|
|
10137
10171
|
labels: labels,
|
|
10138
10172
|
dense: dense,
|
|
10139
10173
|
showGray: showGray,
|
|
10140
|
-
checkboxes: checkboxes
|
|
10174
|
+
checkboxes: checkboxes,
|
|
10175
|
+
textDirection: textDirection
|
|
10141
10176
|
});
|
|
10142
10177
|
return checkboxes ? /*#__PURE__*/React__default.createElement(CheckboxField, {
|
|
10143
10178
|
onChange: onChange,
|
|
@@ -10288,7 +10323,7 @@ const ItemGrid = styled$1(Grid, {
|
|
|
10288
10323
|
dataLayout,
|
|
10289
10324
|
layoutOrder,
|
|
10290
10325
|
itemPadding,
|
|
10291
|
-
|
|
10326
|
+
cellPaddingRight
|
|
10292
10327
|
} = _ref;
|
|
10293
10328
|
return {
|
|
10294
10329
|
["&.".concat(rowColClasses.fieldRoot)]: _objectSpread2(_objectSpread2({}, getGridItemSizes({
|
|
@@ -10296,7 +10331,7 @@ const ItemGrid = styled$1(Grid, {
|
|
|
10296
10331
|
layoutOrder,
|
|
10297
10332
|
itemPadding
|
|
10298
10333
|
})), {}, {
|
|
10299
|
-
paddingRight:
|
|
10334
|
+
paddingRight: cellPaddingRight ? '8px' : undefined
|
|
10300
10335
|
})
|
|
10301
10336
|
};
|
|
10302
10337
|
});
|
|
@@ -10317,6 +10352,55 @@ function getCellFromPages(_ref) {
|
|
|
10317
10352
|
return c;
|
|
10318
10353
|
}
|
|
10319
10354
|
|
|
10355
|
+
// Source: https://en.wikipedia.org/wiki/Bi-directional_text and http://www.unicode.org/Public/6.0.0/ucd/UnicodeData.txt
|
|
10356
|
+
// 3 types of strong direction characters: L (strong left-to-right), R(strong right-to-left, Hebrew) and AL(strong right-to-left, Arabic language)
|
|
10357
|
+
const rangesOfLChars = '[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02BB-\u02C1\u02D0-\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376-\u037D\u0386\u0388-\u03F5\u03F7-\u0482\u048A-\u0589\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u097F\u0982-\u09B9\u09BD-\u09C0\u09C7-\u09CC\u09CE-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u0A03-\u0A39\u0A3E-\u0A40\u0A59-\u0A6F\u0A72-\u0A74\u0A83-\u0AB9\u0ABD-\u0AC0\u0AC9-\u0ACC\u0AD0-\u0AE1\u0AE6-\u0AEF\u0B02-\u0B39\u0B3D-\u0B3E\u0B40\u0B47-\u0B4C\u0B57-\u0B61\u0B66-\u0B77\u0B83-\u0BBF\u0BC1-\u0BCC\u0BD0-\u0BF2\u0C01-\u0C3D\u0C41-\u0C44\u0C58-\u0C61\u0C66-\u0C6F\u0C7F-\u0CB9\u0CBD-\u0CCB\u0CD5-\u0CE1\u0CE6-\u0D40\u0D46-\u0D4C\u0D4E-\u0D61\u0D66-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E4F-\u0EB0\u0EB2-\u0EB3\u0EBD-\u0EC6\u0ED0-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u102C\u1031\u1038\u103B-\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083-\u1084\u1087-\u108C\u108E-\u109C\u109E-\u135A\u1360-\u138F\u13A0-\u13F4\u1401-\u167F\u1681-\u169A\u16A0-\u1711\u1720-\u1731\u1735-\u1751\u1760-\u1770\u1780-\u17B6\u17BE-\u17C5\u17C7-\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u18A8\u18AA-\u191C\u1923-\u1926\u1929-\u1931\u1933-\u1938\u1946-\u19DA\u1A00-\u1A16\u1A19-\u1A55\u1A57\u1A61\u1A63-\u1A64\u1A6D-\u1A72\u1A80-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B6A\u1B74-\u1B7C\u1B82-\u1BA1\u1BA6-\u1BA7\u1BAA-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2-\u1C2B\u1C34-\u1C35\u1C3B-\u1C7F\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1DBF\u1E00-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FFC\u200E\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E-\u214F\u2160-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2D00-\u2D70\u2D80-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u31BA\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA66E\uA680-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA925\uA92E-\uA946\uA952-\uA97C\uA983-\uA9B2\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BD-\uAA28\uAA2F-\uAA30\uAA33-\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2-\uABE4\uABE6-\uABE7\uABE9-\uABEC\uABF0-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]';
|
|
10358
|
+
const rangesOfRChars = '[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u07C0-\u07EA\u07F4-\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB4F]';
|
|
10359
|
+
const rangesOfALChars = '[\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u070D\u0710\u0712-\u072F\u074D-\u07A5\u07B1\uFB50-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]';
|
|
10360
|
+
const rangesOfNChars = '[\u0009-\u000D\u001C-\u0022\u0026-\u002A\u003B-\u0040\u005B-\u0060\u007B-\u007E\u0085\u00A1\u00A6-\u00A9\u00AB-\u00AC\u00AE-\u00AF\u00B4\u00B6-\u00B8\u00BB-\u00BF\u00D7\u00F7\u02B9-\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u02FF\u0374-\u0375\u037E-\u0385\u0387\u03F6\u058A\u0606-\u0607\u060E-\u060F\u06DE\u06E9\u07F6-\u07F9\u0BF3-\u0BF8\u0BFA\u0C78-\u0C7E\u0F3A-\u0F3D\u1390-\u1399\u1400\u1680\u169B-\u169C\u17F0-\u180A\u180E\u1940-\u1945\u19DE-\u19FF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD-\u200A\u2010-\u2029\u2035-\u2043\u2045-\u205F\u207C-\u207E\u208C-\u208E\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u213A-\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189-\u2211\u2214-\u2335\u237B-\u2394\u2396-\u2487\u24EA-\u26AB\u26AD-\u27FF\u2900-\u2B59\u2CE5-\u2CEA\u2CF9-\u2CFF\u2E00-\u3004\u3008-\u3020\u3030\u3036-\u3037\u303D-\u303F\u309B-\u309C\u30A0\u30FB\u31C0-\u31E3\u321D-\u321E\u3250-\u325F\u327C-\u327E\u32B1-\u32BF\u32CC-\u32CF\u3377-\u337A\u33DE-\u33DF\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA60D-\uA60F\uA673\uA67E-\uA67F\uA700-\uA721\uA788\uA828-\uA82B\uA874-\uA877\uFD3E-\uFD3F\uFDFD\uFE10-\uFE19\uFE30-\uFE4F\uFE51\uFE54\uFE56-\uFE5E\uFE60-\uFE61\uFE64-\uFE68\uFE6B\uFF01-\uFF02\uFF06-\uFF0A\uFF1B-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE2-\uFFE4\uFFE8-\uFFFD]';
|
|
10361
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
10362
|
+
const rangesOfLRgExp = new RegExp(rangesOfLChars);
|
|
10363
|
+
const rangesOfRRgExp = new RegExp(rangesOfRChars);
|
|
10364
|
+
const rangesOfALRgExp = new RegExp(rangesOfALChars);
|
|
10365
|
+
const rangesOfNRgExp = new RegExp(rangesOfNChars);
|
|
10366
|
+
const
|
|
10367
|
+
// left-to-right marker
|
|
10368
|
+
lrm = String.fromCharCode(8206); // right-to-left marker
|
|
10369
|
+
|
|
10370
|
+
const rlm = String.fromCharCode(8207);
|
|
10371
|
+
function isLtrChar(c) {
|
|
10372
|
+
return rangesOfLRgExp.test(c);
|
|
10373
|
+
}
|
|
10374
|
+
function isRtlChar(c) {
|
|
10375
|
+
return rangesOfRRgExp.test(c) || rangesOfALRgExp.test(c);
|
|
10376
|
+
}
|
|
10377
|
+
function isNeutralChar(c) {
|
|
10378
|
+
return rangesOfNRgExp.test(c);
|
|
10379
|
+
}
|
|
10380
|
+
function detectTextDirection(s) {
|
|
10381
|
+
const n = s ? s.length : 0;
|
|
10382
|
+
let i;
|
|
10383
|
+
let c;
|
|
10384
|
+
for (i = 0; i < n; i++) {
|
|
10385
|
+
c = s[i];
|
|
10386
|
+
if (isLtrChar(c)) {
|
|
10387
|
+
return 'ltr';
|
|
10388
|
+
}
|
|
10389
|
+
if (isRtlChar(c)) {
|
|
10390
|
+
return 'rtl';
|
|
10391
|
+
}
|
|
10392
|
+
}
|
|
10393
|
+
return 'ltr';
|
|
10394
|
+
}
|
|
10395
|
+
var rtlUtil = {
|
|
10396
|
+
detectTextDirection,
|
|
10397
|
+
isLtrChar,
|
|
10398
|
+
isRtlChar,
|
|
10399
|
+
isNeutralChar,
|
|
10400
|
+
lrm,
|
|
10401
|
+
rlm
|
|
10402
|
+
};
|
|
10403
|
+
|
|
10320
10404
|
function RowColumn(_ref) {
|
|
10321
10405
|
var _cell$qText, _cell$qHighlightRange, _cell$qHighlightRange2;
|
|
10322
10406
|
let {
|
|
@@ -10346,7 +10430,7 @@ function RowColumn(_ref) {
|
|
|
10346
10430
|
histogram = false,
|
|
10347
10431
|
keyboard,
|
|
10348
10432
|
showGray = true,
|
|
10349
|
-
showTick:
|
|
10433
|
+
showTick: sizePermitsTickOrLock = true,
|
|
10350
10434
|
columnCount = 1,
|
|
10351
10435
|
rowCount = 1,
|
|
10352
10436
|
dataOffset,
|
|
@@ -10442,7 +10526,7 @@ function RowColumn(_ref) {
|
|
|
10442
10526
|
}
|
|
10443
10527
|
const isGridCol = dataLayout === 'grid' && layoutOrder === 'column';
|
|
10444
10528
|
const label = (_cell$qText = cell === null || cell === void 0 ? void 0 : cell.qText) !== null && _cell$qText !== void 0 ? _cell$qText : '';
|
|
10445
|
-
|
|
10529
|
+
const textDirection = rtlUtil.detectTextDirection(label);
|
|
10446
10530
|
// Search highlights. Split up labelText span into several and add the highlighted class to matching sub-strings.
|
|
10447
10531
|
|
|
10448
10532
|
let labels;
|
|
@@ -10467,23 +10551,23 @@ function RowColumn(_ref) {
|
|
|
10467
10551
|
const isFirstElement = index === 0;
|
|
10468
10552
|
const flexBasisVal = checkboxes ? 'auto' : 'max-content';
|
|
10469
10553
|
const showLock = isSelected && isLocked;
|
|
10470
|
-
const showTick = !checkboxes && isSelected && !isLocked
|
|
10471
|
-
const showIcon = !checkboxes &&
|
|
10554
|
+
const showTick = !checkboxes && isSelected && !isLocked;
|
|
10555
|
+
const showIcon = !checkboxes && sizePermitsTickOrLock;
|
|
10556
|
+
const cellPaddingRight = checkboxes || !sizePermitsTickOrLock;
|
|
10472
10557
|
return /*#__PURE__*/React__default.createElement(RowColRoot$1, {
|
|
10473
10558
|
className: rowColClasses.barContainer,
|
|
10474
10559
|
flexBasisProp: flexBasisVal,
|
|
10475
10560
|
style: styles,
|
|
10476
|
-
showIcon: showIcon,
|
|
10477
|
-
checkboxes: checkboxes,
|
|
10478
10561
|
isGridCol: isGridCol,
|
|
10479
10562
|
isGridMode: dataLayout === 'grid',
|
|
10480
10563
|
dense: dense,
|
|
10481
|
-
frequencyWidth: frequencyWidth
|
|
10564
|
+
frequencyWidth: frequencyWidth,
|
|
10565
|
+
"data-testid": "listbox.item"
|
|
10482
10566
|
}, /*#__PURE__*/React__default.createElement(ItemGrid, {
|
|
10483
10567
|
ref: rowRef,
|
|
10484
10568
|
container: true,
|
|
10485
10569
|
dataLayout: dataLayout,
|
|
10486
|
-
|
|
10570
|
+
cellPaddingRight: cellPaddingRight,
|
|
10487
10571
|
layoutOrder: layoutOrder,
|
|
10488
10572
|
itemPadding: itemPadding,
|
|
10489
10573
|
gap: 0,
|
|
@@ -10524,7 +10608,8 @@ function RowColumn(_ref) {
|
|
|
10524
10608
|
cell: cell,
|
|
10525
10609
|
isGridCol: isGridCol,
|
|
10526
10610
|
isSingleSelect: isSingleSelect,
|
|
10527
|
-
valueTextAlign: valueTextAlign
|
|
10611
|
+
valueTextAlign: valueTextAlign,
|
|
10612
|
+
textDirection: textDirection
|
|
10528
10613
|
}) : /*#__PURE__*/React__default.createElement(Field$1, {
|
|
10529
10614
|
onChange: onChange,
|
|
10530
10615
|
label: label,
|
|
@@ -12080,8 +12165,6 @@ function handleSetOverflowDisclaimer(_ref) {
|
|
|
12080
12165
|
overflowDisclaimer.set(show);
|
|
12081
12166
|
}
|
|
12082
12167
|
|
|
12083
|
-
const REMOVE_TICK_LIMIT = 80; // an item width equal to or less than this, will hide the select tick
|
|
12084
|
-
|
|
12085
12168
|
const {
|
|
12086
12169
|
StyledFixedSizeList,
|
|
12087
12170
|
StyledFixedSizeGrid
|
|
@@ -12310,12 +12393,6 @@ function calculateColumnMode(_ref) {
|
|
|
12310
12393
|
};
|
|
12311
12394
|
}
|
|
12312
12395
|
|
|
12313
|
-
const SCROLL_BAR_WIDTH = 10; // TODO: ignore this - instead set the styling only show on hover...
|
|
12314
|
-
const ITEM_MAX_WIDTH = 150;
|
|
12315
|
-
const FREQUENCY_WIDTH = 40;
|
|
12316
|
-
const ITEM_MIN_WIDTH = 56;
|
|
12317
|
-
const CHECKBOX_WIDTH = 20;
|
|
12318
|
-
|
|
12319
12396
|
function calculateRowMode(_ref) {
|
|
12320
12397
|
let {
|
|
12321
12398
|
maxVisibleColumns,
|
|
@@ -12327,7 +12404,7 @@ function calculateRowMode(_ref) {
|
|
|
12327
12404
|
const maxColumns = (maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.maxColumns) || 3;
|
|
12328
12405
|
const innerWidth = containerWidth - SCROLL_BAR_WIDTH;
|
|
12329
12406
|
let columnCount;
|
|
12330
|
-
const autoColumnCount = Math.min(listCount, Math.
|
|
12407
|
+
const autoColumnCount = Math.min(listCount, Math.max(1, Math.round(innerWidth / Math.max(itemMinWidth, columnAutoWidth)))); // TODO: smarter sizing... based on glyph count + font size etc...??
|
|
12331
12408
|
if ((maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.auto) !== false) {
|
|
12332
12409
|
columnCount = autoColumnCount;
|
|
12333
12410
|
} else {
|
|
@@ -12365,8 +12442,16 @@ function getListSizes(_ref) {
|
|
|
12365
12442
|
} = layoutOptions;
|
|
12366
12443
|
const frequencyAddWidth = freqIsAllowed ? FREQUENCY_WIDTH : 0;
|
|
12367
12444
|
const checkboxAddWidth = checkboxes ? CHECKBOX_WIDTH : 0;
|
|
12368
|
-
const
|
|
12369
|
-
|
|
12445
|
+
const tickIconWidth = CHECKBOX_WIDTH;
|
|
12446
|
+
let dynamicItemMinWidth = ITEM_MIN_WIDTH + frequencyAddWidth + checkboxAddWidth;
|
|
12447
|
+
if (!checkboxes && dynamicItemMinWidth >= REMOVE_TICK_LIMIT) {
|
|
12448
|
+
dynamicItemMinWidth += tickIconWidth;
|
|
12449
|
+
}
|
|
12450
|
+
let columnAutoWidth = textWidth + 18 + frequencyAddWidth + checkboxAddWidth;
|
|
12451
|
+
if (!checkboxes && columnAutoWidth >= REMOVE_TICK_LIMIT) {
|
|
12452
|
+
columnAutoWidth += tickIconWidth;
|
|
12453
|
+
}
|
|
12454
|
+
columnAutoWidth = Math.min(ITEM_MAX_WIDTH, Math.max(columnAutoWidth, dynamicItemMinWidth));
|
|
12370
12455
|
let overflowStyling;
|
|
12371
12456
|
let columnCount;
|
|
12372
12457
|
let columnWidth;
|
|
@@ -12959,7 +13044,10 @@ const escapeField = field => {
|
|
|
12959
13044
|
if (!field) {
|
|
12960
13045
|
return field;
|
|
12961
13046
|
}
|
|
12962
|
-
|
|
13047
|
+
if (/^[A-Za-z][A-Za-z0-9_]*$/.test(field)) {
|
|
13048
|
+
return field;
|
|
13049
|
+
}
|
|
13050
|
+
return "[".concat(field.replace(/\]/g, ']]'), "]");
|
|
12963
13051
|
};
|
|
12964
13052
|
const needToFetchFrequencyMax = layout => (layout === null || layout === void 0 ? void 0 : layout.frequencyMax) === 'fetch';
|
|
12965
13053
|
const getFrequencyMaxExpression = field => {
|
|
@@ -13083,7 +13171,7 @@ function ListBox(_ref) {
|
|
|
13083
13171
|
});
|
|
13084
13172
|
if (itemsLoader.pages.length && !awaitingFrequencyMax) {
|
|
13085
13173
|
// All necessary data fetching done - signal rendering done!
|
|
13086
|
-
renderedCallback();
|
|
13174
|
+
renderedCallback === null || renderedCallback === void 0 ? void 0 : renderedCallback();
|
|
13087
13175
|
}
|
|
13088
13176
|
}
|
|
13089
13177
|
const isItemLoaded = useCallback(index => {
|
|
@@ -13473,7 +13561,8 @@ const Item = React__default.forwardRef((_ref, ref) => {
|
|
|
13473
13561
|
size: "large",
|
|
13474
13562
|
disableRipple: true,
|
|
13475
13563
|
"aria-expanded": ariaExpanded,
|
|
13476
|
-
"aria-controls": "moreMenuList"
|
|
13564
|
+
"aria-controls": "moreMenuList",
|
|
13565
|
+
"data-testid": "actions-toolbar-".concat(item.key)
|
|
13477
13566
|
}, hasSvgIconShape && SvgIcon$2(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React__default.createElement("div", {
|
|
13478
13567
|
ref: ref,
|
|
13479
13568
|
style: {
|
|
@@ -13729,15 +13818,12 @@ const ActionsGroup = React__default.forwardRef((_ref2, ref) => {
|
|
|
13729
13818
|
const popoverStyle = {
|
|
13730
13819
|
pointerEvents: 'none'
|
|
13731
13820
|
};
|
|
13732
|
-
const popoverAnchorOrigin = {
|
|
13733
|
-
vertical: 'top',
|
|
13734
|
-
horizontal: 'right'
|
|
13735
|
-
};
|
|
13736
13821
|
const popoverTransformOrigin = {
|
|
13737
13822
|
vertical: 'bottom',
|
|
13738
13823
|
horizontal: 'right'
|
|
13739
13824
|
};
|
|
13740
13825
|
function ActionsToolbar(_ref3) {
|
|
13826
|
+
var _popover$anchorEl$cli, _popover$anchorEl;
|
|
13741
13827
|
let {
|
|
13742
13828
|
show = true,
|
|
13743
13829
|
actions = [],
|
|
@@ -13776,6 +13862,10 @@ function ActionsToolbar(_ref3) {
|
|
|
13776
13862
|
const dividerStyle = useMemo$1(() => ({
|
|
13777
13863
|
margin: theme.spacing(0.5, 0)
|
|
13778
13864
|
}));
|
|
13865
|
+
const popoverAnchorOrigin = {
|
|
13866
|
+
vertical: 15,
|
|
13867
|
+
horizontal: ((_popover$anchorEl$cli = (_popover$anchorEl = popover.anchorEl) === null || _popover$anchorEl === void 0 ? void 0 : _popover$anchorEl.clientWidth) !== null && _popover$anchorEl$cli !== void 0 ? _popover$anchorEl$cli : 0) - 7
|
|
13868
|
+
};
|
|
13779
13869
|
const getEnabledButton = last => {
|
|
13780
13870
|
const actionsElement = actionsRef.current || actionsRefMock;
|
|
13781
13871
|
if (!actionsElement) return null;
|
|
@@ -15990,19 +16080,20 @@ const classes$4 = {
|
|
|
15990
16080
|
listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
|
|
15991
16081
|
};
|
|
15992
16082
|
const StyledGrid$3 = styled$1(Grid, {
|
|
15993
|
-
shouldForwardProp: p => !['containerPadding'].includes(p)
|
|
16083
|
+
shouldForwardProp: p => !['containerPadding', 'hasIcon'].includes(p)
|
|
15994
16084
|
})(_ref => {
|
|
15995
16085
|
var _theme$listBox$backgr, _theme$listBox;
|
|
15996
16086
|
let {
|
|
15997
16087
|
theme,
|
|
15998
|
-
containerPadding
|
|
16088
|
+
containerPadding,
|
|
16089
|
+
hasIcon
|
|
15999
16090
|
} = _ref;
|
|
16000
16091
|
return {
|
|
16001
16092
|
backgroundColor: (_theme$listBox$backgr = (_theme$listBox = theme.listBox) === null || _theme$listBox === void 0 ? void 0 : _theme$listBox.backgroundColor) !== null && _theme$listBox$backgr !== void 0 ? _theme$listBox$backgr : theme.palette.background.default,
|
|
16002
16093
|
["& .".concat(classes$4.listBoxHeader)]: {
|
|
16003
16094
|
alignSelf: 'center',
|
|
16004
16095
|
display: 'flex',
|
|
16005
|
-
width: "calc(100% - ".concat(BUTTON_ICON_WIDTH, "px)")
|
|
16096
|
+
width: "calc(100% - ".concat(hasIcon ? BUTTON_ICON_WIDTH : 0, "px)")
|
|
16006
16097
|
},
|
|
16007
16098
|
["& .".concat(classes$4.screenReaderOnly)]: {
|
|
16008
16099
|
position: 'absolute',
|
|
@@ -16133,9 +16224,6 @@ function ListBoxInline(_ref3) {
|
|
|
16133
16224
|
useEffect$1(() => {
|
|
16134
16225
|
const show = () => {
|
|
16135
16226
|
setShowToolbar(true);
|
|
16136
|
-
if (search === 'toggle' && toolbar === false) {
|
|
16137
|
-
setShowSearch(true);
|
|
16138
|
-
}
|
|
16139
16227
|
};
|
|
16140
16228
|
const hide = () => {
|
|
16141
16229
|
setShowToolbar(false);
|
|
@@ -16213,7 +16301,7 @@ function ListBoxInline(_ref3) {
|
|
|
16213
16301
|
selections
|
|
16214
16302
|
});
|
|
16215
16303
|
const shouldAutoFocus = searchVisible && search === 'toggle';
|
|
16216
|
-
const showSearchIcon = searchEnabled !== false && search === 'toggle'
|
|
16304
|
+
const showSearchIcon = searchEnabled !== false && search === 'toggle';
|
|
16217
16305
|
const showSearchOrLockIcon = isLocked || showSearchIcon;
|
|
16218
16306
|
const showIcons = showSearchOrLockIcon || isDrillDown;
|
|
16219
16307
|
const iconsWidth = (showSearchOrLockIcon ? BUTTON_ICON_WIDTH : 0) + (isDrillDown ? ICON_WIDTH + ICON_PADDING : 0); // Drill-down icon needs padding right so there is space between the icon and the title
|
|
@@ -16226,6 +16314,42 @@ function ListBoxInline(_ref3) {
|
|
|
16226
16314
|
if (isGridMode) {
|
|
16227
16315
|
containerPadding = layoutOptions.layoutOrder === 'row' ? '2px 4px' : '2px 6px 2px 4px';
|
|
16228
16316
|
}
|
|
16317
|
+
const searchIconComp = constraints !== null && constraints !== void 0 && constraints.active ? /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
16318
|
+
title: translator.get('Listbox.Search'),
|
|
16319
|
+
size: "large",
|
|
16320
|
+
style: {
|
|
16321
|
+
fontSize: '12px',
|
|
16322
|
+
padding: '7px'
|
|
16323
|
+
}
|
|
16324
|
+
}) : /*#__PURE__*/React__default.createElement(IconButton, {
|
|
16325
|
+
onClick: onShowSearch,
|
|
16326
|
+
tabIndex: -1,
|
|
16327
|
+
title: translator.get('Listbox.Search'),
|
|
16328
|
+
size: "large",
|
|
16329
|
+
disableRipple: true,
|
|
16330
|
+
"data-testid": "search-toggle-btn"
|
|
16331
|
+
}, /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
16332
|
+
style: {
|
|
16333
|
+
fontSize: '12px'
|
|
16334
|
+
}
|
|
16335
|
+
}));
|
|
16336
|
+
const lockIconComp = selectDisabled() ? /*#__PURE__*/React__default.createElement(Lock, {
|
|
16337
|
+
size: "large",
|
|
16338
|
+
style: {
|
|
16339
|
+
fontSize: '12px',
|
|
16340
|
+
padding: '7px'
|
|
16341
|
+
}
|
|
16342
|
+
}) : /*#__PURE__*/React__default.createElement(IconButton, {
|
|
16343
|
+
title: translator.get('SelectionToolbar.ClickToUnlock'),
|
|
16344
|
+
tabIndex: -1,
|
|
16345
|
+
onClick: unlock,
|
|
16346
|
+
size: "large"
|
|
16347
|
+
}, /*#__PURE__*/React__default.createElement(Lock, {
|
|
16348
|
+
disableRipple: true,
|
|
16349
|
+
style: {
|
|
16350
|
+
fontSize: '12px'
|
|
16351
|
+
}
|
|
16352
|
+
}));
|
|
16229
16353
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, toolbarDetachedOnly && /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$6({
|
|
16230
16354
|
direction: direction
|
|
16231
16355
|
}, getActionToolbarProps(true))), /*#__PURE__*/React__default.createElement(StyledGrid$3, {
|
|
@@ -16243,7 +16367,8 @@ function ListBoxInline(_ref3) {
|
|
|
16243
16367
|
onKeyDown: handleKeyDown,
|
|
16244
16368
|
onMouseEnter: handleOnMouseEnter,
|
|
16245
16369
|
onMouseLeave: handleOnMouseLeave,
|
|
16246
|
-
ref: containerRef
|
|
16370
|
+
ref: containerRef,
|
|
16371
|
+
hasIcon: showIcons
|
|
16247
16372
|
}, toolbar && /*#__PURE__*/React__default.createElement(Grid, {
|
|
16248
16373
|
item: true,
|
|
16249
16374
|
container: true,
|
|
@@ -16271,29 +16396,7 @@ function ListBoxInline(_ref3) {
|
|
|
16271
16396
|
alignItems: 'center',
|
|
16272
16397
|
width: iconsWidth
|
|
16273
16398
|
}
|
|
16274
|
-
}, isLocked ? /*#__PURE__*/React__default.createElement(
|
|
16275
|
-
title: translator.get('SelectionToolbar.ClickToUnlock'),
|
|
16276
|
-
tabIndex: -1,
|
|
16277
|
-
onClick: unlock,
|
|
16278
|
-
disabled: selectDisabled(),
|
|
16279
|
-
size: "large"
|
|
16280
|
-
}, /*#__PURE__*/React__default.createElement(Lock, {
|
|
16281
|
-
disableRipple: true,
|
|
16282
|
-
style: {
|
|
16283
|
-
fontSize: '12px'
|
|
16284
|
-
}
|
|
16285
|
-
})) : showSearchIcon && /*#__PURE__*/React__default.createElement(IconButton, {
|
|
16286
|
-
onClick: onShowSearch,
|
|
16287
|
-
tabIndex: -1,
|
|
16288
|
-
title: translator.get('Listbox.Search'),
|
|
16289
|
-
size: "large",
|
|
16290
|
-
disableRipple: true,
|
|
16291
|
-
"data-testid": "search-toggle-btn"
|
|
16292
|
-
}, /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
16293
|
-
style: {
|
|
16294
|
-
fontSize: '12px'
|
|
16295
|
-
}
|
|
16296
|
-
})), isDrillDown && /*#__PURE__*/React__default.createElement(DrillDownIcon, {
|
|
16399
|
+
}, isLocked ? lockIconComp : showSearchIcon && searchIconComp, isDrillDown && /*#__PURE__*/React__default.createElement(DrillDownIcon, {
|
|
16297
16400
|
tabIndex: -1,
|
|
16298
16401
|
title: translator.get('Listbox.DrillDown'),
|
|
16299
16402
|
size: "large",
|
|
@@ -18829,12 +18932,21 @@ const loadType = async _ref5 => {
|
|
|
18829
18932
|
});
|
|
18830
18933
|
return sn;
|
|
18831
18934
|
} catch (err) {
|
|
18832
|
-
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
|
|
18935
|
+
if (!version) {
|
|
18936
|
+
dispatch({
|
|
18937
|
+
type: 'ERROR',
|
|
18938
|
+
error: {
|
|
18939
|
+
title: "Could not find a version of '".concat(visualization, "' that supports current object version. Did you forget to register ").concat(visualization, "?")
|
|
18940
|
+
}
|
|
18941
|
+
});
|
|
18942
|
+
} else {
|
|
18943
|
+
dispatch({
|
|
18944
|
+
type: 'ERROR',
|
|
18945
|
+
error: {
|
|
18946
|
+
title: err.message
|
|
18947
|
+
}
|
|
18948
|
+
});
|
|
18949
|
+
}
|
|
18838
18950
|
}
|
|
18839
18951
|
return undefined;
|
|
18840
18952
|
};
|
|
@@ -18991,15 +19103,6 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
18991
19103
|
|
|
18992
19104
|
// Load supernova
|
|
18993
19105
|
const withVersion = types.getSupportedVersion(layout.visualization, layout.version);
|
|
18994
|
-
if (!withVersion) {
|
|
18995
|
-
dispatch({
|
|
18996
|
-
type: 'ERROR',
|
|
18997
|
-
error: {
|
|
18998
|
-
title: "Could not find a version of '".concat(layout.visualization, "' that supports current object version. Did you forget to register ").concat(layout.visualization, "?")
|
|
18999
|
-
}
|
|
19000
|
-
});
|
|
19001
|
-
return undefined;
|
|
19002
|
-
}
|
|
19003
19106
|
load(layout.visualization, withVersion);
|
|
19004
19107
|
return () => {};
|
|
19005
19108
|
}, [types, state.sn, model, selections, layout, appLayout, language]);
|