@nebula.js/stardust 4.0.0-alpha.4 → 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 +160 -81
- 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 +160 -81
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +7 -7
- 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
|
*/
|
|
@@ -8064,7 +8064,7 @@ function create$3(definition) {
|
|
|
8064
8064
|
return cache[key];
|
|
8065
8065
|
}
|
|
8066
8066
|
|
|
8067
|
-
const NEBULA_VERSION_HASH = "
|
|
8067
|
+
const NEBULA_VERSION_HASH = "6643" ;
|
|
8068
8068
|
ClassNameGenerator$1.configure(componentName => {
|
|
8069
8069
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
8070
8070
|
});
|
|
@@ -8272,7 +8272,7 @@ function boot(_ref2) {
|
|
|
8272
8272
|
const appRef = React__default.createRef();
|
|
8273
8273
|
const element = document.createElement('div');
|
|
8274
8274
|
element.style.display = 'none';
|
|
8275
|
-
element.setAttribute('data-nebulajs-version', "4.0.0-alpha.
|
|
8275
|
+
element.setAttribute('data-nebulajs-version', "4.0.0-alpha.5" );
|
|
8276
8276
|
element.setAttribute('data-app-id', app.id);
|
|
8277
8277
|
document.body.appendChild(element);
|
|
8278
8278
|
const root = client.createRoot(element);
|
|
@@ -9641,6 +9641,16 @@ const getValueStateClasses = _ref2 => {
|
|
|
9641
9641
|
return clazzArr;
|
|
9642
9642
|
};
|
|
9643
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;
|
|
9644
9654
|
const frequencyTextNone = '-';
|
|
9645
9655
|
const barPadPx = 4;
|
|
9646
9656
|
const barBorderWidthPx = 1;
|
|
@@ -9660,11 +9670,6 @@ const getBarWidth = _ref => {
|
|
|
9660
9670
|
};
|
|
9661
9671
|
const getFrequencyText = qFrequency => qFrequency || frequencyTextNone;
|
|
9662
9672
|
|
|
9663
|
-
const CELL_PADDING_LEFT = 9;
|
|
9664
|
-
const ICON_WIDTH = 12;
|
|
9665
|
-
const ICON_PADDING = 7;
|
|
9666
|
-
const BUTTON_ICON_WIDTH = ICON_WIDTH + (ICON_PADDING + 1) * 2; // 1 is border width
|
|
9667
|
-
|
|
9668
9673
|
const getSelectedStyle = _ref => {
|
|
9669
9674
|
let {
|
|
9670
9675
|
theme
|
|
@@ -9690,7 +9695,7 @@ const ellipsis = {
|
|
|
9690
9695
|
const iconWidth = 24; // tick and lock icon width in px
|
|
9691
9696
|
|
|
9692
9697
|
const RowColRoot = styled$1('div', {
|
|
9693
|
-
shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth'
|
|
9698
|
+
shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth'].includes(prop)
|
|
9694
9699
|
})(_ref2 => {
|
|
9695
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;
|
|
9696
9701
|
let {
|
|
@@ -9699,9 +9704,7 @@ const RowColRoot = styled$1('div', {
|
|
|
9699
9704
|
isGridMode,
|
|
9700
9705
|
isGridCol,
|
|
9701
9706
|
dense,
|
|
9702
|
-
frequencyWidth
|
|
9703
|
-
showIcon,
|
|
9704
|
-
checkboxes
|
|
9707
|
+
frequencyWidth
|
|
9705
9708
|
} = _ref2;
|
|
9706
9709
|
return {
|
|
9707
9710
|
'&:focus': {
|
|
@@ -9746,7 +9749,7 @@ const RowColRoot = styled$1('div', {
|
|
|
9746
9749
|
flexBasis: flexBasisProp,
|
|
9747
9750
|
lineHeight: '16px',
|
|
9748
9751
|
userSelect: 'none',
|
|
9749
|
-
paddingRight:
|
|
9752
|
+
paddingRight: '1px'
|
|
9750
9753
|
}, ellipsis), {}, {
|
|
9751
9754
|
whiteSpace: 'pre',
|
|
9752
9755
|
// to keep white-space on highlight
|
|
@@ -9784,6 +9787,12 @@ const RowColRoot = styled$1('div', {
|
|
|
9784
9787
|
paddingRight: '2px'
|
|
9785
9788
|
})
|
|
9786
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
|
+
},
|
|
9787
9796
|
// The icons container holding tick and lock, shown inside fields.
|
|
9788
9797
|
["& .".concat(rowColClasses.icon)]: {
|
|
9789
9798
|
display: 'flex',
|
|
@@ -9818,7 +9827,7 @@ const RowColRoot = styled$1('div', {
|
|
|
9818
9827
|
["& .".concat(rowColClasses.frequencyCount)]: _objectSpread2(_objectSpread2({
|
|
9819
9828
|
justifyContent: 'flex-end'
|
|
9820
9829
|
}, ellipsis), {}, {
|
|
9821
|
-
flex: "0 1 ".concat(frequencyWidth
|
|
9830
|
+
flex: "0 1 ".concat(frequencyWidth, "px"),
|
|
9822
9831
|
textAlign: 'right',
|
|
9823
9832
|
paddingLeft: '2px'
|
|
9824
9833
|
}),
|
|
@@ -10124,9 +10133,12 @@ function LabelsWithRanges(_ref) {
|
|
|
10124
10133
|
labels,
|
|
10125
10134
|
dense,
|
|
10126
10135
|
showGray,
|
|
10127
|
-
checkboxes
|
|
10136
|
+
checkboxes,
|
|
10137
|
+
textDirection
|
|
10128
10138
|
} = _ref;
|
|
10129
|
-
return /*#__PURE__*/React__default.createElement(
|
|
10139
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10140
|
+
dir: textDirection
|
|
10141
|
+
}, labels.map((_ref2, index) => {
|
|
10130
10142
|
let [label, highlighted] = _ref2;
|
|
10131
10143
|
const key = "".concat(index);
|
|
10132
10144
|
return /*#__PURE__*/React__default.createElement(ValueField, {
|
|
@@ -10152,13 +10164,15 @@ function FieldWithRanges(_ref3) {
|
|
|
10152
10164
|
cell,
|
|
10153
10165
|
isGridCol,
|
|
10154
10166
|
isSingleSelect,
|
|
10155
|
-
valueTextAlign
|
|
10167
|
+
valueTextAlign,
|
|
10168
|
+
textDirection
|
|
10156
10169
|
} = _ref3;
|
|
10157
10170
|
const LWR = /*#__PURE__*/React__default.createElement(LabelsWithRanges, {
|
|
10158
10171
|
labels: labels,
|
|
10159
10172
|
dense: dense,
|
|
10160
10173
|
showGray: showGray,
|
|
10161
|
-
checkboxes: checkboxes
|
|
10174
|
+
checkboxes: checkboxes,
|
|
10175
|
+
textDirection: textDirection
|
|
10162
10176
|
});
|
|
10163
10177
|
return checkboxes ? /*#__PURE__*/React__default.createElement(CheckboxField, {
|
|
10164
10178
|
onChange: onChange,
|
|
@@ -10309,7 +10323,7 @@ const ItemGrid = styled$1(Grid, {
|
|
|
10309
10323
|
dataLayout,
|
|
10310
10324
|
layoutOrder,
|
|
10311
10325
|
itemPadding,
|
|
10312
|
-
|
|
10326
|
+
cellPaddingRight
|
|
10313
10327
|
} = _ref;
|
|
10314
10328
|
return {
|
|
10315
10329
|
["&.".concat(rowColClasses.fieldRoot)]: _objectSpread2(_objectSpread2({}, getGridItemSizes({
|
|
@@ -10317,7 +10331,7 @@ const ItemGrid = styled$1(Grid, {
|
|
|
10317
10331
|
layoutOrder,
|
|
10318
10332
|
itemPadding
|
|
10319
10333
|
})), {}, {
|
|
10320
|
-
paddingRight:
|
|
10334
|
+
paddingRight: cellPaddingRight ? '8px' : undefined
|
|
10321
10335
|
})
|
|
10322
10336
|
};
|
|
10323
10337
|
});
|
|
@@ -10338,6 +10352,55 @@ function getCellFromPages(_ref) {
|
|
|
10338
10352
|
return c;
|
|
10339
10353
|
}
|
|
10340
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
|
+
|
|
10341
10404
|
function RowColumn(_ref) {
|
|
10342
10405
|
var _cell$qText, _cell$qHighlightRange, _cell$qHighlightRange2;
|
|
10343
10406
|
let {
|
|
@@ -10367,7 +10430,7 @@ function RowColumn(_ref) {
|
|
|
10367
10430
|
histogram = false,
|
|
10368
10431
|
keyboard,
|
|
10369
10432
|
showGray = true,
|
|
10370
|
-
showTick:
|
|
10433
|
+
showTick: sizePermitsTickOrLock = true,
|
|
10371
10434
|
columnCount = 1,
|
|
10372
10435
|
rowCount = 1,
|
|
10373
10436
|
dataOffset,
|
|
@@ -10463,7 +10526,7 @@ function RowColumn(_ref) {
|
|
|
10463
10526
|
}
|
|
10464
10527
|
const isGridCol = dataLayout === 'grid' && layoutOrder === 'column';
|
|
10465
10528
|
const label = (_cell$qText = cell === null || cell === void 0 ? void 0 : cell.qText) !== null && _cell$qText !== void 0 ? _cell$qText : '';
|
|
10466
|
-
|
|
10529
|
+
const textDirection = rtlUtil.detectTextDirection(label);
|
|
10467
10530
|
// Search highlights. Split up labelText span into several and add the highlighted class to matching sub-strings.
|
|
10468
10531
|
|
|
10469
10532
|
let labels;
|
|
@@ -10488,23 +10551,23 @@ function RowColumn(_ref) {
|
|
|
10488
10551
|
const isFirstElement = index === 0;
|
|
10489
10552
|
const flexBasisVal = checkboxes ? 'auto' : 'max-content';
|
|
10490
10553
|
const showLock = isSelected && isLocked;
|
|
10491
|
-
const showTick = !checkboxes && isSelected && !isLocked
|
|
10492
|
-
const showIcon = !checkboxes &&
|
|
10554
|
+
const showTick = !checkboxes && isSelected && !isLocked;
|
|
10555
|
+
const showIcon = !checkboxes && sizePermitsTickOrLock;
|
|
10556
|
+
const cellPaddingRight = checkboxes || !sizePermitsTickOrLock;
|
|
10493
10557
|
return /*#__PURE__*/React__default.createElement(RowColRoot$1, {
|
|
10494
10558
|
className: rowColClasses.barContainer,
|
|
10495
10559
|
flexBasisProp: flexBasisVal,
|
|
10496
10560
|
style: styles,
|
|
10497
|
-
showIcon: showIcon,
|
|
10498
|
-
checkboxes: checkboxes,
|
|
10499
10561
|
isGridCol: isGridCol,
|
|
10500
10562
|
isGridMode: dataLayout === 'grid',
|
|
10501
10563
|
dense: dense,
|
|
10502
|
-
frequencyWidth: frequencyWidth
|
|
10564
|
+
frequencyWidth: frequencyWidth,
|
|
10565
|
+
"data-testid": "listbox.item"
|
|
10503
10566
|
}, /*#__PURE__*/React__default.createElement(ItemGrid, {
|
|
10504
10567
|
ref: rowRef,
|
|
10505
10568
|
container: true,
|
|
10506
10569
|
dataLayout: dataLayout,
|
|
10507
|
-
|
|
10570
|
+
cellPaddingRight: cellPaddingRight,
|
|
10508
10571
|
layoutOrder: layoutOrder,
|
|
10509
10572
|
itemPadding: itemPadding,
|
|
10510
10573
|
gap: 0,
|
|
@@ -10545,7 +10608,8 @@ function RowColumn(_ref) {
|
|
|
10545
10608
|
cell: cell,
|
|
10546
10609
|
isGridCol: isGridCol,
|
|
10547
10610
|
isSingleSelect: isSingleSelect,
|
|
10548
|
-
valueTextAlign: valueTextAlign
|
|
10611
|
+
valueTextAlign: valueTextAlign,
|
|
10612
|
+
textDirection: textDirection
|
|
10549
10613
|
}) : /*#__PURE__*/React__default.createElement(Field$1, {
|
|
10550
10614
|
onChange: onChange,
|
|
10551
10615
|
label: label,
|
|
@@ -12101,8 +12165,6 @@ function handleSetOverflowDisclaimer(_ref) {
|
|
|
12101
12165
|
overflowDisclaimer.set(show);
|
|
12102
12166
|
}
|
|
12103
12167
|
|
|
12104
|
-
const REMOVE_TICK_LIMIT = 80; // an item width equal to or less than this, will hide the select tick
|
|
12105
|
-
|
|
12106
12168
|
const {
|
|
12107
12169
|
StyledFixedSizeList,
|
|
12108
12170
|
StyledFixedSizeGrid
|
|
@@ -12331,12 +12393,6 @@ function calculateColumnMode(_ref) {
|
|
|
12331
12393
|
};
|
|
12332
12394
|
}
|
|
12333
12395
|
|
|
12334
|
-
const SCROLL_BAR_WIDTH = 10; // TODO: ignore this - instead set the styling only show on hover...
|
|
12335
|
-
const ITEM_MAX_WIDTH = 150;
|
|
12336
|
-
const FREQUENCY_WIDTH = 40;
|
|
12337
|
-
const ITEM_MIN_WIDTH = 56;
|
|
12338
|
-
const CHECKBOX_WIDTH = 20;
|
|
12339
|
-
|
|
12340
12396
|
function calculateRowMode(_ref) {
|
|
12341
12397
|
let {
|
|
12342
12398
|
maxVisibleColumns,
|
|
@@ -12348,7 +12404,7 @@ function calculateRowMode(_ref) {
|
|
|
12348
12404
|
const maxColumns = (maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.maxColumns) || 3;
|
|
12349
12405
|
const innerWidth = containerWidth - SCROLL_BAR_WIDTH;
|
|
12350
12406
|
let columnCount;
|
|
12351
|
-
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...??
|
|
12352
12408
|
if ((maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.auto) !== false) {
|
|
12353
12409
|
columnCount = autoColumnCount;
|
|
12354
12410
|
} else {
|
|
@@ -12386,8 +12442,16 @@ function getListSizes(_ref) {
|
|
|
12386
12442
|
} = layoutOptions;
|
|
12387
12443
|
const frequencyAddWidth = freqIsAllowed ? FREQUENCY_WIDTH : 0;
|
|
12388
12444
|
const checkboxAddWidth = checkboxes ? CHECKBOX_WIDTH : 0;
|
|
12389
|
-
const
|
|
12390
|
-
|
|
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));
|
|
12391
12455
|
let overflowStyling;
|
|
12392
12456
|
let columnCount;
|
|
12393
12457
|
let columnWidth;
|
|
@@ -13107,7 +13171,7 @@ function ListBox(_ref) {
|
|
|
13107
13171
|
});
|
|
13108
13172
|
if (itemsLoader.pages.length && !awaitingFrequencyMax) {
|
|
13109
13173
|
// All necessary data fetching done - signal rendering done!
|
|
13110
|
-
renderedCallback();
|
|
13174
|
+
renderedCallback === null || renderedCallback === void 0 ? void 0 : renderedCallback();
|
|
13111
13175
|
}
|
|
13112
13176
|
}
|
|
13113
13177
|
const isItemLoaded = useCallback(index => {
|
|
@@ -13497,7 +13561,8 @@ const Item = React__default.forwardRef((_ref, ref) => {
|
|
|
13497
13561
|
size: "large",
|
|
13498
13562
|
disableRipple: true,
|
|
13499
13563
|
"aria-expanded": ariaExpanded,
|
|
13500
|
-
"aria-controls": "moreMenuList"
|
|
13564
|
+
"aria-controls": "moreMenuList",
|
|
13565
|
+
"data-testid": "actions-toolbar-".concat(item.key)
|
|
13501
13566
|
}, hasSvgIconShape && SvgIcon$2(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React__default.createElement("div", {
|
|
13502
13567
|
ref: ref,
|
|
13503
13568
|
style: {
|
|
@@ -16236,7 +16301,7 @@ function ListBoxInline(_ref3) {
|
|
|
16236
16301
|
selections
|
|
16237
16302
|
});
|
|
16238
16303
|
const shouldAutoFocus = searchVisible && search === 'toggle';
|
|
16239
|
-
const showSearchIcon = searchEnabled !== false && search === 'toggle'
|
|
16304
|
+
const showSearchIcon = searchEnabled !== false && search === 'toggle';
|
|
16240
16305
|
const showSearchOrLockIcon = isLocked || showSearchIcon;
|
|
16241
16306
|
const showIcons = showSearchOrLockIcon || isDrillDown;
|
|
16242
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
|
|
@@ -16249,6 +16314,42 @@ function ListBoxInline(_ref3) {
|
|
|
16249
16314
|
if (isGridMode) {
|
|
16250
16315
|
containerPadding = layoutOptions.layoutOrder === 'row' ? '2px 4px' : '2px 6px 2px 4px';
|
|
16251
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
|
+
}));
|
|
16252
16353
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, toolbarDetachedOnly && /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$6({
|
|
16253
16354
|
direction: direction
|
|
16254
16355
|
}, getActionToolbarProps(true))), /*#__PURE__*/React__default.createElement(StyledGrid$3, {
|
|
@@ -16295,29 +16396,7 @@ function ListBoxInline(_ref3) {
|
|
|
16295
16396
|
alignItems: 'center',
|
|
16296
16397
|
width: iconsWidth
|
|
16297
16398
|
}
|
|
16298
|
-
}, isLocked ? /*#__PURE__*/React__default.createElement(
|
|
16299
|
-
title: translator.get('SelectionToolbar.ClickToUnlock'),
|
|
16300
|
-
tabIndex: -1,
|
|
16301
|
-
onClick: unlock,
|
|
16302
|
-
disabled: selectDisabled(),
|
|
16303
|
-
size: "large"
|
|
16304
|
-
}, /*#__PURE__*/React__default.createElement(Lock, {
|
|
16305
|
-
disableRipple: true,
|
|
16306
|
-
style: {
|
|
16307
|
-
fontSize: '12px'
|
|
16308
|
-
}
|
|
16309
|
-
})) : showSearchIcon && /*#__PURE__*/React__default.createElement(IconButton, {
|
|
16310
|
-
onClick: onShowSearch,
|
|
16311
|
-
tabIndex: -1,
|
|
16312
|
-
title: translator.get('Listbox.Search'),
|
|
16313
|
-
size: "large",
|
|
16314
|
-
disableRipple: true,
|
|
16315
|
-
"data-testid": "search-toggle-btn"
|
|
16316
|
-
}, /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
16317
|
-
style: {
|
|
16318
|
-
fontSize: '12px'
|
|
16319
|
-
}
|
|
16320
|
-
})), isDrillDown && /*#__PURE__*/React__default.createElement(DrillDownIcon, {
|
|
16399
|
+
}, isLocked ? lockIconComp : showSearchIcon && searchIconComp, isDrillDown && /*#__PURE__*/React__default.createElement(DrillDownIcon, {
|
|
16321
16400
|
tabIndex: -1,
|
|
16322
16401
|
title: translator.get('Listbox.DrillDown'),
|
|
16323
16402
|
size: "large",
|
|
@@ -18853,12 +18932,21 @@ const loadType = async _ref5 => {
|
|
|
18853
18932
|
});
|
|
18854
18933
|
return sn;
|
|
18855
18934
|
} catch (err) {
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
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
|
+
}
|
|
18862
18950
|
}
|
|
18863
18951
|
return undefined;
|
|
18864
18952
|
};
|
|
@@ -19015,15 +19103,6 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
19015
19103
|
|
|
19016
19104
|
// Load supernova
|
|
19017
19105
|
const withVersion = types.getSupportedVersion(layout.visualization, layout.version);
|
|
19018
|
-
if (!withVersion) {
|
|
19019
|
-
dispatch({
|
|
19020
|
-
type: 'ERROR',
|
|
19021
|
-
error: {
|
|
19022
|
-
title: "Could not find a version of '".concat(layout.visualization, "' that supports current object version. Did you forget to register ").concat(layout.visualization, "?")
|
|
19023
|
-
}
|
|
19024
|
-
});
|
|
19025
|
-
return undefined;
|
|
19026
|
-
}
|
|
19027
19106
|
load(layout.visualization, withVersion);
|
|
19028
19107
|
return () => {};
|
|
19029
19108
|
}, [types, state.sn, model, selections, layout, appLayout, language]);
|