@nebula.js/stardust 4.6.2 → 4.8.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 +480 -271
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +4 -4
- package/core/esm/index.js.map +1 -1
- package/core/package.json +2 -2
- package/dist/stardust.dev.js +561 -351
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +8 -8
- package/dist/stardust.js.map +1 -1
- package/package.json +13 -13
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v4.
|
|
2
|
+
* @nebula.js/stardust v4.8.0
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import * as React from 'react';
|
|
|
8
8
|
import React__default, { useState as useState$1, useEffect as useEffect$1, forwardRef, useMemo as useMemo$1, useImperativeHandle as useImperativeHandle$1, useReducer, useCallback, useLayoutEffect as useLayoutEffect$1, PureComponent, useRef, useContext, createElement, Component } from 'react';
|
|
9
9
|
import ReactDOM from 'react-dom';
|
|
10
10
|
import { CacheProvider, ThemeContext as ThemeContext$2 } from '@emotion/react';
|
|
11
|
-
import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$4, Popover, MenuList, MenuItem, ListItemIcon, Divider,
|
|
11
|
+
import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$4, Popover, MenuList, MenuItem, ListItemIcon, Divider, OutlinedInput, InputAdornment, Badge, List, ListItem, Button, Icon, CircularProgress } from '@mui/material';
|
|
12
12
|
import styled$3 from '@emotion/styled';
|
|
13
13
|
|
|
14
14
|
function getDefaultExportFromCjs (x) {
|
|
@@ -5670,7 +5670,7 @@ function StyledEngineProvider(props) {
|
|
|
5670
5670
|
}
|
|
5671
5671
|
|
|
5672
5672
|
/**
|
|
5673
|
-
* @mui/styled-engine v5.14.
|
|
5673
|
+
* @mui/styled-engine v5.14.18
|
|
5674
5674
|
*
|
|
5675
5675
|
* @license MIT
|
|
5676
5676
|
* This source code is licensed under the MIT license found in the
|
|
@@ -5718,7 +5718,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
5718
5718
|
return target;
|
|
5719
5719
|
}
|
|
5720
5720
|
|
|
5721
|
-
const _excluded$
|
|
5721
|
+
const _excluded$g = ["values", "unit", "step"];
|
|
5722
5722
|
const sortBreakpointsValues = values => {
|
|
5723
5723
|
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
5724
5724
|
key,
|
|
@@ -5753,7 +5753,7 @@ function createBreakpoints(breakpoints) {
|
|
|
5753
5753
|
unit = 'px',
|
|
5754
5754
|
step = 5
|
|
5755
5755
|
} = breakpoints,
|
|
5756
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$
|
|
5756
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$g);
|
|
5757
5757
|
const sortedValues = sortBreakpointsValues(values);
|
|
5758
5758
|
const keys = Object.keys(sortedValues);
|
|
5759
5759
|
function up(key) {
|
|
@@ -6751,7 +6751,7 @@ const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
|
6751
6751
|
styleFunctionSx.filterProps = ['sx'];
|
|
6752
6752
|
var styleFunctionSx$1 = styleFunctionSx;
|
|
6753
6753
|
|
|
6754
|
-
const _excluded$
|
|
6754
|
+
const _excluded$f = ["breakpoints", "palette", "spacing", "shape"];
|
|
6755
6755
|
function createTheme$1(options = {}, ...args) {
|
|
6756
6756
|
const {
|
|
6757
6757
|
breakpoints: breakpointsInput = {},
|
|
@@ -6759,7 +6759,7 @@ function createTheme$1(options = {}, ...args) {
|
|
|
6759
6759
|
spacing: spacingInput,
|
|
6760
6760
|
shape: shapeInput = {}
|
|
6761
6761
|
} = options,
|
|
6762
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
6762
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$f);
|
|
6763
6763
|
const breakpoints = createBreakpoints(breakpointsInput);
|
|
6764
6764
|
const spacing = createSpacing(spacingInput);
|
|
6765
6765
|
let muiTheme = deepmerge({
|
|
@@ -6799,7 +6799,7 @@ function useTheme$3(defaultTheme = systemDefaultTheme$1) {
|
|
|
6799
6799
|
|
|
6800
6800
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
6801
6801
|
|
|
6802
|
-
const _excluded$
|
|
6802
|
+
const _excluded$e = ["variant"];
|
|
6803
6803
|
function isEmpty$2(string) {
|
|
6804
6804
|
return string.length === 0;
|
|
6805
6805
|
}
|
|
@@ -6813,7 +6813,7 @@ function propsToClassKey(props) {
|
|
|
6813
6813
|
const {
|
|
6814
6814
|
variant
|
|
6815
6815
|
} = props,
|
|
6816
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
6816
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$e);
|
|
6817
6817
|
let classKey = variant || '';
|
|
6818
6818
|
Object.keys(other).sort().forEach(key => {
|
|
6819
6819
|
if (key === 'color') {
|
|
@@ -6825,7 +6825,7 @@ function propsToClassKey(props) {
|
|
|
6825
6825
|
return classKey;
|
|
6826
6826
|
}
|
|
6827
6827
|
|
|
6828
|
-
const _excluded$
|
|
6828
|
+
const _excluded$d = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
|
|
6829
6829
|
function isEmpty$1(obj) {
|
|
6830
6830
|
return Object.keys(obj).length === 0;
|
|
6831
6831
|
}
|
|
@@ -6962,7 +6962,7 @@ function createStyled(input = {}) {
|
|
|
6962
6962
|
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
6963
6963
|
overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))
|
|
6964
6964
|
} = inputOptions,
|
|
6965
|
-
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$
|
|
6965
|
+
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$d);
|
|
6966
6966
|
|
|
6967
6967
|
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
|
6968
6968
|
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :
|
|
@@ -7441,7 +7441,7 @@ function ThemeProvider$1(props) {
|
|
|
7441
7441
|
});
|
|
7442
7442
|
}
|
|
7443
7443
|
|
|
7444
|
-
const _excluded$
|
|
7444
|
+
const _excluded$c = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
|
|
7445
7445
|
_excluded2$1 = ["type", "mode"];
|
|
7446
7446
|
function adaptV4Theme(inputTheme) {
|
|
7447
7447
|
const {
|
|
@@ -7452,7 +7452,7 @@ function adaptV4Theme(inputTheme) {
|
|
|
7452
7452
|
props = {},
|
|
7453
7453
|
styleOverrides = {}
|
|
7454
7454
|
} = inputTheme,
|
|
7455
|
-
other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$
|
|
7455
|
+
other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$c);
|
|
7456
7456
|
const theme = _extends$3({}, other, {
|
|
7457
7457
|
components: {}
|
|
7458
7458
|
});
|
|
@@ -7665,7 +7665,7 @@ const green = {
|
|
|
7665
7665
|
};
|
|
7666
7666
|
var green$1 = green;
|
|
7667
7667
|
|
|
7668
|
-
const _excluded$
|
|
7668
|
+
const _excluded$b = ["mode", "contrastThreshold", "tonalOffset"];
|
|
7669
7669
|
const light$1 = {
|
|
7670
7670
|
// The colors used to style the text.
|
|
7671
7671
|
text: {
|
|
@@ -7834,7 +7834,7 @@ function createPalette(palette) {
|
|
|
7834
7834
|
contrastThreshold = 3,
|
|
7835
7835
|
tonalOffset = 0.2
|
|
7836
7836
|
} = palette,
|
|
7837
|
-
other = _objectWithoutPropertiesLoose$1(palette, _excluded$
|
|
7837
|
+
other = _objectWithoutPropertiesLoose$1(palette, _excluded$b);
|
|
7838
7838
|
const primary = palette.primary || getDefaultPrimary(mode);
|
|
7839
7839
|
const secondary = palette.secondary || getDefaultSecondary(mode);
|
|
7840
7840
|
const error = palette.error || getDefaultError(mode);
|
|
@@ -7933,7 +7933,7 @@ function createPalette(palette) {
|
|
|
7933
7933
|
return paletteOutput;
|
|
7934
7934
|
}
|
|
7935
7935
|
|
|
7936
|
-
const _excluded$
|
|
7936
|
+
const _excluded$a = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
|
|
7937
7937
|
function round$1(value) {
|
|
7938
7938
|
return Math.round(value * 1e5) / 1e5;
|
|
7939
7939
|
}
|
|
@@ -7964,7 +7964,7 @@ function createTypography(palette, typography) {
|
|
|
7964
7964
|
allVariants,
|
|
7965
7965
|
pxToRem: pxToRem2
|
|
7966
7966
|
} = _ref,
|
|
7967
|
-
other = _objectWithoutPropertiesLoose$1(_ref, _excluded$
|
|
7967
|
+
other = _objectWithoutPropertiesLoose$1(_ref, _excluded$a);
|
|
7968
7968
|
const coef = fontSize / 14;
|
|
7969
7969
|
const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
|
|
7970
7970
|
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$3({
|
|
@@ -8024,7 +8024,7 @@ function createShadow(...px) {
|
|
|
8024
8024
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
|
8025
8025
|
var shadows$1 = shadows;
|
|
8026
8026
|
|
|
8027
|
-
const _excluded$
|
|
8027
|
+
const _excluded$9 = ["duration", "easing", "delay"];
|
|
8028
8028
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
8029
8029
|
// to learn the context in which each easing should be used.
|
|
8030
8030
|
const easing = {
|
|
@@ -8075,7 +8075,7 @@ function createTransitions(inputTransitions) {
|
|
|
8075
8075
|
easing: easingOption = mergedEasing.easeInOut,
|
|
8076
8076
|
delay = 0
|
|
8077
8077
|
} = options;
|
|
8078
|
-
_objectWithoutPropertiesLoose$1(options, _excluded$
|
|
8078
|
+
_objectWithoutPropertiesLoose$1(options, _excluded$9);
|
|
8079
8079
|
return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
|
|
8080
8080
|
};
|
|
8081
8081
|
return _extends$3({
|
|
@@ -8101,7 +8101,7 @@ const zIndex = {
|
|
|
8101
8101
|
};
|
|
8102
8102
|
var zIndex$1 = zIndex;
|
|
8103
8103
|
|
|
8104
|
-
const _excluded$
|
|
8104
|
+
const _excluded$8 = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
|
8105
8105
|
function createTheme(options = {}, ...args) {
|
|
8106
8106
|
const {
|
|
8107
8107
|
mixins: mixinsInput = {},
|
|
@@ -8109,7 +8109,7 @@ function createTheme(options = {}, ...args) {
|
|
|
8109
8109
|
transitions: transitionsInput = {},
|
|
8110
8110
|
typography: typographyInput = {}
|
|
8111
8111
|
} = options,
|
|
8112
|
-
other = _objectWithoutPropertiesLoose$1(options, _excluded$
|
|
8112
|
+
other = _objectWithoutPropertiesLoose$1(options, _excluded$8);
|
|
8113
8113
|
if (options.vars) {
|
|
8114
8114
|
throw new Error(formatMuiErrorMessage(18));
|
|
8115
8115
|
}
|
|
@@ -8164,12 +8164,12 @@ const styled = createStyled({
|
|
|
8164
8164
|
});
|
|
8165
8165
|
var styled$1 = styled;
|
|
8166
8166
|
|
|
8167
|
-
const _excluded$
|
|
8167
|
+
const _excluded$7 = ["theme"];
|
|
8168
8168
|
function ThemeProvider(_ref) {
|
|
8169
8169
|
let {
|
|
8170
8170
|
theme: themeInput
|
|
8171
8171
|
} = _ref,
|
|
8172
|
-
props = _objectWithoutPropertiesLoose$1(_ref, _excluded$
|
|
8172
|
+
props = _objectWithoutPropertiesLoose$1(_ref, _excluded$7);
|
|
8173
8173
|
const scopedTheme = themeInput[THEME_ID];
|
|
8174
8174
|
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$3({}, props, {
|
|
8175
8175
|
themeId: scopedTheme ? THEME_ID : undefined,
|
|
@@ -8551,7 +8551,7 @@ function create$3(definition) {
|
|
|
8551
8551
|
return cache[key];
|
|
8552
8552
|
}
|
|
8553
8553
|
|
|
8554
|
-
const NEBULA_VERSION_HASH = "
|
|
8554
|
+
const NEBULA_VERSION_HASH = "f910" ;
|
|
8555
8555
|
ClassNameGenerator$1.configure(componentName => {
|
|
8556
8556
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
8557
8557
|
});
|
|
@@ -8812,7 +8812,7 @@ function boot(_ref2) {
|
|
|
8812
8812
|
const appRef = React__default.createRef();
|
|
8813
8813
|
const element = document.createElement('div');
|
|
8814
8814
|
element.style.display = 'none';
|
|
8815
|
-
element.setAttribute('data-nebulajs-version', "4.
|
|
8815
|
+
element.setAttribute('data-nebulajs-version', "4.8.0" );
|
|
8816
8816
|
element.setAttribute('data-app-id', app.id);
|
|
8817
8817
|
document.body.appendChild(element);
|
|
8818
8818
|
if (context) {
|
|
@@ -10030,6 +10030,7 @@ const getBarWidth = _ref => {
|
|
|
10030
10030
|
};
|
|
10031
10031
|
const getFrequencyText = qFrequency => qFrequency || frequencyTextNone;
|
|
10032
10032
|
|
|
10033
|
+
const _excluded$6 = ["backgroundColor"];
|
|
10033
10034
|
const getFreqFlexBasis = _ref => {
|
|
10034
10035
|
let {
|
|
10035
10036
|
sizes,
|
|
@@ -10111,8 +10112,8 @@ const RowColRoot = styled$1('div', {
|
|
|
10111
10112
|
freqHitsValue,
|
|
10112
10113
|
styles
|
|
10113
10114
|
} = _ref4;
|
|
10114
|
-
const
|
|
10115
|
-
|
|
10115
|
+
const _styles$content = styles.content,
|
|
10116
|
+
contentFontStyles = _objectWithoutProperties(_styles$content, _excluded$6);
|
|
10116
10117
|
const selectStyle = getSelectedStyle({
|
|
10117
10118
|
theme,
|
|
10118
10119
|
styles,
|
|
@@ -10138,20 +10139,17 @@ const RowColRoot = styled$1('div', {
|
|
|
10138
10139
|
outline: 'none'
|
|
10139
10140
|
}
|
|
10140
10141
|
},
|
|
10141
|
-
["& .".concat(rowColClasses.row)]: {
|
|
10142
|
-
flexWrap: 'nowrap'
|
|
10143
|
-
|
|
10144
|
-
backgroundColor: rowBackgroundColor
|
|
10145
|
-
},
|
|
10142
|
+
["& .".concat(rowColClasses.row)]: _objectSpread2({
|
|
10143
|
+
flexWrap: 'nowrap'
|
|
10144
|
+
}, styles.content),
|
|
10146
10145
|
["& .".concat(rowColClasses.rowBorderBottom)]: {
|
|
10147
10146
|
borderBottom: isGridCol ? 'none' : "1px solid ".concat(theme.palette.divider),
|
|
10148
10147
|
borderLeft: isGridCol ? "1px solid ".concat(theme.palette.divider) : 'none'
|
|
10149
10148
|
},
|
|
10150
|
-
["& .".concat(rowColClasses.column)]: {
|
|
10149
|
+
["& .".concat(rowColClasses.column)]: _objectSpread2({
|
|
10151
10150
|
flexWrap: 'nowrap',
|
|
10152
|
-
borderRight: "1px solid ".concat(theme.palette.divider)
|
|
10153
|
-
|
|
10154
|
-
},
|
|
10151
|
+
borderRight: "1px solid ".concat(theme.palette.divider)
|
|
10152
|
+
}, styles.content),
|
|
10155
10153
|
// The interior wrapper for all field content.
|
|
10156
10154
|
["& .".concat(rowColClasses.cell)]: {
|
|
10157
10155
|
zIndex: 2,
|
|
@@ -10170,11 +10168,7 @@ const RowColRoot = styled$1('div', {
|
|
|
10170
10168
|
lineHeight: '16px',
|
|
10171
10169
|
userSelect: 'none',
|
|
10172
10170
|
paddingRight: '1px'
|
|
10173
|
-
}, ellipsis),
|
|
10174
|
-
fontSize: styles.content.fontSize,
|
|
10175
|
-
fontFamily: styles.content.fontFamily,
|
|
10176
|
-
color: rowFontColor
|
|
10177
|
-
}),
|
|
10171
|
+
}, ellipsis), contentFontStyles),
|
|
10178
10172
|
["& .".concat(rowColClasses.labelDense)]: {
|
|
10179
10173
|
fontSize: 12
|
|
10180
10174
|
},
|
|
@@ -10208,7 +10202,7 @@ const RowColRoot = styled$1('div', {
|
|
|
10208
10202
|
width: iconWidth,
|
|
10209
10203
|
minWidth: iconWidth,
|
|
10210
10204
|
maxWidth: iconWidth,
|
|
10211
|
-
color:
|
|
10205
|
+
color: contentFontStyles.color
|
|
10212
10206
|
},
|
|
10213
10207
|
// Selection styles (S=Selected, XS=ExcludedSelected, A=Alternative, X=Excluded).
|
|
10214
10208
|
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, selectStyle), {}, {
|
|
@@ -10315,7 +10309,6 @@ const StyledCheckbox = styled$1(Checkbox, {
|
|
|
10315
10309
|
shouldForwardProp: p => p !== 'styles'
|
|
10316
10310
|
})(_ref => {
|
|
10317
10311
|
let {
|
|
10318
|
-
theme,
|
|
10319
10312
|
styles
|
|
10320
10313
|
} = _ref;
|
|
10321
10314
|
return {
|
|
@@ -10346,13 +10339,13 @@ const StyledCheckbox = styled$1(Checkbox, {
|
|
|
10346
10339
|
borderRadius: borderRadius - 1,
|
|
10347
10340
|
width: 12,
|
|
10348
10341
|
height: 12,
|
|
10349
|
-
backgroundColor:
|
|
10342
|
+
backgroundColor: styles.selections.excluded
|
|
10350
10343
|
},
|
|
10351
10344
|
["& .".concat(classes$b.cbIconAlternative)]: {
|
|
10352
10345
|
borderRadius: borderRadius - 1,
|
|
10353
10346
|
width: 12,
|
|
10354
10347
|
height: 12,
|
|
10355
|
-
backgroundColor:
|
|
10348
|
+
backgroundColor: styles.selections.alternative
|
|
10356
10349
|
},
|
|
10357
10350
|
["&.".concat(classes$b.checkbox)]: {
|
|
10358
10351
|
margin: 0,
|
|
@@ -14508,7 +14501,7 @@ const StyledPopover$1 = styled$1(Popover)(_ref => {
|
|
|
14508
14501
|
return {
|
|
14509
14502
|
// Set here to allow clicking through the modals container
|
|
14510
14503
|
pointerEvents: 'none',
|
|
14511
|
-
["& .".concat(classes$8.icon)]: {
|
|
14504
|
+
["& .".concat(classes$8.icon, " *")]: {
|
|
14512
14505
|
color: theme.palette.text.primary
|
|
14513
14506
|
}
|
|
14514
14507
|
};
|
|
@@ -14566,6 +14559,12 @@ const More$1 = React__default.forwardRef((_ref3, ref) => {
|
|
|
14566
14559
|
slotProps: {
|
|
14567
14560
|
root: {
|
|
14568
14561
|
className: ActionsToolbarMoreElement.className
|
|
14562
|
+
},
|
|
14563
|
+
paper: {
|
|
14564
|
+
style: _objectSpread2({
|
|
14565
|
+
pointerEvents: 'auto',
|
|
14566
|
+
maxWidth: '250px'
|
|
14567
|
+
}, popoverPaperStyle)
|
|
14569
14568
|
}
|
|
14570
14569
|
},
|
|
14571
14570
|
anchorOrigin: {
|
|
@@ -14575,12 +14574,6 @@ const More$1 = React__default.forwardRef((_ref3, ref) => {
|
|
|
14575
14574
|
transformOrigin: {
|
|
14576
14575
|
vertical: 'top',
|
|
14577
14576
|
horizontal: 'right'
|
|
14578
|
-
},
|
|
14579
|
-
PaperProps: {
|
|
14580
|
-
style: _objectSpread2({
|
|
14581
|
-
pointerEvents: 'auto',
|
|
14582
|
-
maxWidth: '250px'
|
|
14583
|
-
}, popoverPaperStyle)
|
|
14584
14577
|
}
|
|
14585
14578
|
}), /*#__PURE__*/React__default.createElement(MenuList, {
|
|
14586
14579
|
id: "moreMenuList"
|
|
@@ -14904,28 +14897,53 @@ var SearchIcon = (props => SvgIcon$2(search(props)));
|
|
|
14904
14897
|
|
|
14905
14898
|
const TREE_PATH = '/qListObjectDef';
|
|
14906
14899
|
const WILDCARD = '**';
|
|
14907
|
-
const
|
|
14908
|
-
shouldForwardProp: p =>
|
|
14900
|
+
const StyledOutlinedInput = styled$1(OutlinedInput, {
|
|
14901
|
+
shouldForwardProp: p => !['styles', 'dense', 'isRtl'].includes(p)
|
|
14909
14902
|
})(_ref => {
|
|
14910
14903
|
let {
|
|
14911
|
-
|
|
14904
|
+
theme,
|
|
14905
|
+
styles,
|
|
14906
|
+
dense,
|
|
14907
|
+
isRtl
|
|
14912
14908
|
} = _ref;
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
display: 'flex'
|
|
14926
|
-
|
|
14909
|
+
let denseProps = {};
|
|
14910
|
+
if (dense) {
|
|
14911
|
+
denseProps = {
|
|
14912
|
+
fontSize: 12,
|
|
14913
|
+
paddingLeft: theme.spacing(1),
|
|
14914
|
+
'& input': {
|
|
14915
|
+
paddingTop: '5px',
|
|
14916
|
+
paddingBottom: '5px'
|
|
14917
|
+
}
|
|
14918
|
+
};
|
|
14919
|
+
}
|
|
14920
|
+
return _objectSpread2({
|
|
14921
|
+
display: 'flex',
|
|
14922
|
+
border: 'none',
|
|
14923
|
+
fontSize: 14,
|
|
14924
|
+
borderRadius: 0,
|
|
14925
|
+
backgroundColor: styles.search.backgroundColor,
|
|
14926
|
+
paddingLeft: "".concat(CELL_PADDING_LEFT, "px"),
|
|
14927
|
+
flexDirection: isRtl ? 'row-reverse' : 'row',
|
|
14928
|
+
'& fieldset': {
|
|
14929
|
+
borderColor: "".concat(styles.search.borderColor),
|
|
14930
|
+
borderWidth: '1px 0 1px 0',
|
|
14931
|
+
borderRadius: 0
|
|
14932
|
+
},
|
|
14933
|
+
'& .MuiInputBase-root': _objectSpread2({}, styles.search),
|
|
14934
|
+
'& *': {
|
|
14935
|
+
color: styles.search.color
|
|
14936
|
+
},
|
|
14937
|
+
'& input': {
|
|
14938
|
+
color: styles.search.color,
|
|
14939
|
+
textAlign: isRtl ? 'right' : 'left'
|
|
14940
|
+
},
|
|
14941
|
+
'&.Mui-focused fieldset.OutlinedInput-notchedOutline': {
|
|
14942
|
+
borderColor: "".concat(styles.search.highlightBorderColor, " !important")
|
|
14943
|
+
}
|
|
14944
|
+
}, denseProps);
|
|
14927
14945
|
});
|
|
14928
|
-
function ListBoxSearch(
|
|
14946
|
+
function ListBoxSearch(_ref2) {
|
|
14929
14947
|
let {
|
|
14930
14948
|
selections,
|
|
14931
14949
|
selectionState,
|
|
@@ -14939,20 +14957,18 @@ function ListBoxSearch(_ref3) {
|
|
|
14939
14957
|
direction,
|
|
14940
14958
|
hide,
|
|
14941
14959
|
styles
|
|
14942
|
-
} =
|
|
14960
|
+
} = _ref2;
|
|
14943
14961
|
const {
|
|
14944
14962
|
translator
|
|
14945
14963
|
} = useContext(InstanceContext);
|
|
14946
14964
|
const [value, setValue] = useState$1('');
|
|
14947
14965
|
const [wildcardOn, setWildcardOn] = useState$1(false);
|
|
14948
14966
|
const inputRef = useRef();
|
|
14949
|
-
const theme = useTheme$1();
|
|
14950
14967
|
const {
|
|
14951
14968
|
getStoreValue,
|
|
14952
14969
|
setStoreValue
|
|
14953
14970
|
} = useDataStore(model);
|
|
14954
14971
|
const isRtl = direction === 'rtl';
|
|
14955
|
-
const inpuTextAlign = isRtl ? 'right' : 'left';
|
|
14956
14972
|
const cancel = () => selections.isActive() && selections.cancel();
|
|
14957
14973
|
const abortSearch = async () => {
|
|
14958
14974
|
if (!selections.isModal()) {
|
|
@@ -15076,37 +15092,14 @@ function ListBoxSearch(_ref3) {
|
|
|
15076
15092
|
}
|
|
15077
15093
|
return /*#__PURE__*/React__default.createElement(StyledOutlinedInput, {
|
|
15078
15094
|
styles: styles,
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15095
|
+
dense: dense,
|
|
15096
|
+
isRtl: isRtl,
|
|
15097
|
+
startAdornment: /*#__PURE__*/React__default.createElement(InputAdornment, {
|
|
15098
|
+
position: "start"
|
|
15082
15099
|
}, /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
15083
15100
|
size: dense ? 'small' : 'normal'
|
|
15084
15101
|
})),
|
|
15085
15102
|
className: "search",
|
|
15086
|
-
sx: [{
|
|
15087
|
-
border: 'none',
|
|
15088
|
-
fontSize: 14,
|
|
15089
|
-
borderRadius: 0,
|
|
15090
|
-
backgroundColor: 'transparent',
|
|
15091
|
-
'& fieldset': {
|
|
15092
|
-
border: "1px solid ".concat(theme.palette.divider),
|
|
15093
|
-
borderWidth: '1px 0 1px 0',
|
|
15094
|
-
borderRadius: 0
|
|
15095
|
-
},
|
|
15096
|
-
'&:hover': {
|
|
15097
|
-
border: 'none'
|
|
15098
|
-
},
|
|
15099
|
-
paddingLeft: "".concat(CELL_PADDING_LEFT, "px")
|
|
15100
|
-
}, dense && {
|
|
15101
|
-
fontSize: 12,
|
|
15102
|
-
paddingLeft: theme.spacing(1),
|
|
15103
|
-
'& input': {
|
|
15104
|
-
paddingTop: '5px',
|
|
15105
|
-
paddingBottom: '5px'
|
|
15106
|
-
}
|
|
15107
|
-
}, {
|
|
15108
|
-
flexDirection: isRtl ? 'row-reverse' : 'row'
|
|
15109
|
-
}],
|
|
15110
15103
|
inputRef: inputRef,
|
|
15111
15104
|
size: "small",
|
|
15112
15105
|
fullWidth: true,
|
|
@@ -15118,9 +15111,6 @@ function ListBoxSearch(_ref3) {
|
|
|
15118
15111
|
autoFocus: autoFocus,
|
|
15119
15112
|
inputProps: {
|
|
15120
15113
|
tabIndex: keyboard.innerTabStops ? 0 : -1,
|
|
15121
|
-
style: {
|
|
15122
|
-
textAlign: "".concat(inpuTextAlign)
|
|
15123
|
-
},
|
|
15124
15114
|
'data-testid': 'search-input-field',
|
|
15125
15115
|
'aria-label': translator.get('Listbox.Search.ScreenReaderInstructions')
|
|
15126
15116
|
}
|
|
@@ -16318,7 +16308,7 @@ const {
|
|
|
16318
16308
|
* @class
|
|
16319
16309
|
* @classdesc Class which provides color transformation functionality
|
|
16320
16310
|
* @description This is a constructor.
|
|
16321
|
-
* @private
|
|
16311
|
+
* @private
|
|
16322
16312
|
* @param {object} - Parameters to create a color from different notations
|
|
16323
16313
|
* @example
|
|
16324
16314
|
* // a few ways of instantiating a red color
|
|
@@ -17111,6 +17101,211 @@ class Color {
|
|
|
17111
17101
|
}
|
|
17112
17102
|
}
|
|
17113
17103
|
|
|
17104
|
+
const MULTI_REG = /,(?![^(]*\))/;
|
|
17105
|
+
const SINGLE_REG = /\s(?![^(]*\))/;
|
|
17106
|
+
const LENGTH_REG = /^[0-9]+[a-zA-Z%]+?$/;
|
|
17107
|
+
const PREDEFINED_STRINGS = ['none', 'inset', 'initial', 'inherit'];
|
|
17108
|
+
const isLength = v => v === '0' || LENGTH_REG.test(v);
|
|
17109
|
+
const getColor = singleShadowString => {
|
|
17110
|
+
if (!singleShadowString) return undefined;
|
|
17111
|
+
const parts = singleShadowString.split(SINGLE_REG).filter(part => !PREDEFINED_STRINGS.includes(part.toLowerCase()));
|
|
17112
|
+
const last = parts.at(-1);
|
|
17113
|
+
const color = last && !isLength(last) && !PREDEFINED_STRINGS.includes(last.toLowerCase()) ? last : undefined;
|
|
17114
|
+
return color;
|
|
17115
|
+
};
|
|
17116
|
+
const getShadows = shadowString => {
|
|
17117
|
+
if (!shadowString) return [];
|
|
17118
|
+
return shadowString.split(MULTI_REG).map(s => s.trim());
|
|
17119
|
+
};
|
|
17120
|
+
|
|
17121
|
+
/**
|
|
17122
|
+
* Combine box shadow with box shadow color.
|
|
17123
|
+
* @private
|
|
17124
|
+
* @param {string} boxShadow - Box shadow which may include color
|
|
17125
|
+
* @param {string} themeBoxShadow - Box shadow from theme which may include color
|
|
17126
|
+
* @param {string | undefined} boxShadowColor - Box shadow color
|
|
17127
|
+
* @returns {string} Returns the combined box shadow and box shadow color
|
|
17128
|
+
*
|
|
17129
|
+
* If boxShadow is a single shadow and has a color then this color will be replaced by boxShadowColor and then
|
|
17130
|
+
* returned as the result,otherwise boxShadowColor will be added to boxShadow and then returned as the result.
|
|
17131
|
+
* If boxShadow is multiple shadows or an empty string then it will be returned as the result.
|
|
17132
|
+
*
|
|
17133
|
+
* @example getFullBoxShadow('none', '', 'red') returns 'none'
|
|
17134
|
+
*
|
|
17135
|
+
* @example getFullBoxShadow('initial', '', 'red') returns 'initial'
|
|
17136
|
+
*
|
|
17137
|
+
* @example getFullBoxShadow('inherit', '', 'red') returns 'inherit'
|
|
17138
|
+
*
|
|
17139
|
+
* @example getFullBoxShadow('', '', 'red') returns ''
|
|
17140
|
+
*
|
|
17141
|
+
* @example getFullBoxShadow('1px 2px blue, 3px 6px green', '', 'red') returns '1px 2px blue, 3px 6px green'
|
|
17142
|
+
*
|
|
17143
|
+
* @example getFullBoxShadow('1px 2px blue', '', 'red') returns '1px 2px red'
|
|
17144
|
+
*
|
|
17145
|
+
* @example getFullBoxShadow('1px 2px', '', 'red') returns '1px 2px red'
|
|
17146
|
+
*
|
|
17147
|
+
* @example getFullBoxShadow('1px 2px', '2px 5px green', undefined) returns '1px 2px green'
|
|
17148
|
+
*
|
|
17149
|
+
* @example getFullBoxShadow('1px 2px', '2px 5px', undefined) returns '1px 2px'
|
|
17150
|
+
*/
|
|
17151
|
+
const getFullBoxShadow = (boxShadow, themeBoxShadow, boxShadowColor) => {
|
|
17152
|
+
if (boxShadow && PREDEFINED_STRINGS.includes(boxShadow.toLowerCase())) return boxShadow.toLowerCase();
|
|
17153
|
+
const shadowArray = getShadows(boxShadow);
|
|
17154
|
+
if (shadowArray.length !== 1) return boxShadow;
|
|
17155
|
+
let shadowColor = boxShadowColor;
|
|
17156
|
+
if (!shadowColor) {
|
|
17157
|
+
const themeShadowArray = getShadows(themeBoxShadow);
|
|
17158
|
+
if (themeShadowArray.length !== 1) return boxShadow;
|
|
17159
|
+
shadowColor = getColor(themeShadowArray[0]);
|
|
17160
|
+
}
|
|
17161
|
+
if (!shadowColor) return boxShadow;
|
|
17162
|
+
const color = getColor(shadowArray[0]);
|
|
17163
|
+
if (color) return boxShadow.replace(color, shadowColor);
|
|
17164
|
+
return "".concat(boxShadow, " ").concat(shadowColor);
|
|
17165
|
+
};
|
|
17166
|
+
|
|
17167
|
+
function resolveProperty(path, attribute, theme, objectType) {
|
|
17168
|
+
if (theme && objectType) {
|
|
17169
|
+
return theme.getStyle("object.".concat(objectType), path, attribute);
|
|
17170
|
+
}
|
|
17171
|
+
if (theme) {
|
|
17172
|
+
return theme.getStyle('', path, attribute);
|
|
17173
|
+
}
|
|
17174
|
+
return undefined;
|
|
17175
|
+
}
|
|
17176
|
+
|
|
17177
|
+
const supportNone = true;
|
|
17178
|
+
function resolveColor(colorObj, path, attribute, theme, objectType) {
|
|
17179
|
+
if (colorObj && theme) {
|
|
17180
|
+
return colorObj.color !== 'none' ? theme.getColorPickerColor(colorObj, supportNone) : undefined;
|
|
17181
|
+
}
|
|
17182
|
+
return resolveProperty(path, attribute, theme, objectType);
|
|
17183
|
+
}
|
|
17184
|
+
|
|
17185
|
+
const imageSizingToCssProperty = {
|
|
17186
|
+
originalSize: 'auto auto',
|
|
17187
|
+
alwaysFit: 'contain',
|
|
17188
|
+
fitWidth: '100% auto',
|
|
17189
|
+
fitHeight: 'auto 100%',
|
|
17190
|
+
stretchFit: '100% 100%',
|
|
17191
|
+
alwaysFill: 'cover'
|
|
17192
|
+
};
|
|
17193
|
+
const positionToCss = {
|
|
17194
|
+
'top-left': 'top left',
|
|
17195
|
+
'top-center': 'top center',
|
|
17196
|
+
'top-right': 'top right',
|
|
17197
|
+
'center-left': 'center left',
|
|
17198
|
+
'center-center': 'center center',
|
|
17199
|
+
'center-right': 'center right',
|
|
17200
|
+
'bottom-left': 'bottom left',
|
|
17201
|
+
'bottom-center': 'bottom center',
|
|
17202
|
+
'bottom-right': 'bottom right'
|
|
17203
|
+
};
|
|
17204
|
+
|
|
17205
|
+
// TODO: this needs some proper verification
|
|
17206
|
+
function getSenseServerUrl(app) {
|
|
17207
|
+
var _app$session;
|
|
17208
|
+
let config;
|
|
17209
|
+
let wsUrl;
|
|
17210
|
+
let protocol;
|
|
17211
|
+
let isSecure;
|
|
17212
|
+
if (app !== null && app !== void 0 && (_app$session = app.session) !== null && _app$session !== void 0 && _app$session.config) {
|
|
17213
|
+
config = app.session.config;
|
|
17214
|
+
wsUrl = new URL(config.url);
|
|
17215
|
+
isSecure = wsUrl.protocol === 'wss:';
|
|
17216
|
+
protocol = isSecure ? 'https://' : 'http://';
|
|
17217
|
+
return protocol + wsUrl.host;
|
|
17218
|
+
}
|
|
17219
|
+
return '';
|
|
17220
|
+
}
|
|
17221
|
+
function getBackgroundPosition(bgComp) {
|
|
17222
|
+
var _bgComp$bgImage;
|
|
17223
|
+
let bkgImagePosition = 'center center';
|
|
17224
|
+
if (bgComp !== null && bgComp !== void 0 && (_bgComp$bgImage = bgComp.bgImage) !== null && _bgComp$bgImage !== void 0 && _bgComp$bgImage.position) {
|
|
17225
|
+
bkgImagePosition = positionToCss[bgComp.bgImage.position];
|
|
17226
|
+
}
|
|
17227
|
+
return bkgImagePosition;
|
|
17228
|
+
}
|
|
17229
|
+
function getBackgroundSize(bgComp) {
|
|
17230
|
+
var _bgComp$bgImage2;
|
|
17231
|
+
let bkgImageSize = imageSizingToCssProperty.originalSize;
|
|
17232
|
+
const size = bgComp === null || bgComp === void 0 || (_bgComp$bgImage2 = bgComp.bgImage) === null || _bgComp$bgImage2 === void 0 ? void 0 : _bgComp$bgImage2.sizing;
|
|
17233
|
+
if (size) {
|
|
17234
|
+
bkgImageSize = imageSizingToCssProperty[size];
|
|
17235
|
+
}
|
|
17236
|
+
return bkgImageSize;
|
|
17237
|
+
}
|
|
17238
|
+
function resolveImageUrl(app, relativeUrl) {
|
|
17239
|
+
return relativeUrl ? getSenseServerUrl(app) + relativeUrl : undefined;
|
|
17240
|
+
}
|
|
17241
|
+
function resolveBgImage(bgComp, app) {
|
|
17242
|
+
const bgImageDef = bgComp === null || bgComp === void 0 ? void 0 : bgComp.bgImage;
|
|
17243
|
+
if (bgImageDef) {
|
|
17244
|
+
let url = '';
|
|
17245
|
+
if (bgImageDef.mode === 'media' || bgComp.useImage === 'media') {
|
|
17246
|
+
const urlObj = bgImageDef === null || bgImageDef === void 0 ? void 0 : bgImageDef.mediaUrl;
|
|
17247
|
+
const {
|
|
17248
|
+
qUrl
|
|
17249
|
+
} = (urlObj === null || urlObj === void 0 ? void 0 : urlObj.qStaticContentUrl) || {};
|
|
17250
|
+
url = qUrl ? decodeURIComponent(qUrl) : undefined;
|
|
17251
|
+
url = resolveImageUrl(app, url);
|
|
17252
|
+
}
|
|
17253
|
+
if (bgImageDef.mode === 'expression') {
|
|
17254
|
+
url = bgImageDef.expressionUrl ? decodeURIComponent(bgImageDef.expressionUrl) : undefined;
|
|
17255
|
+
}
|
|
17256
|
+
const pos = getBackgroundPosition(bgComp);
|
|
17257
|
+
const size = getBackgroundSize(bgComp);
|
|
17258
|
+
return url ? {
|
|
17259
|
+
url,
|
|
17260
|
+
pos,
|
|
17261
|
+
size
|
|
17262
|
+
} : undefined;
|
|
17263
|
+
}
|
|
17264
|
+
return undefined;
|
|
17265
|
+
}
|
|
17266
|
+
function resolveBgColor(comp, theme, objectType) {
|
|
17267
|
+
const bgColor = comp === null || comp === void 0 ? void 0 : comp.bgColor;
|
|
17268
|
+
if (bgColor && theme) {
|
|
17269
|
+
if (bgColor.useExpression) {
|
|
17270
|
+
return theme.validateColor(bgColor.colorExpression);
|
|
17271
|
+
}
|
|
17272
|
+
}
|
|
17273
|
+
return resolveColor(bgColor === null || bgColor === void 0 ? void 0 : bgColor.color, '', 'backgroundColor', theme, objectType);
|
|
17274
|
+
}
|
|
17275
|
+
function resolveBorder(comp, theme, objectType) {
|
|
17276
|
+
const borderColor = resolveColor(comp === null || comp === void 0 ? void 0 : comp.borderColor, '', 'borderColor', theme, objectType);
|
|
17277
|
+
const borderWidth = (comp === null || comp === void 0 ? void 0 : comp.borderWidth) || resolveProperty('', 'borderWidth', theme, objectType);
|
|
17278
|
+
return borderWidth && borderColor ? "".concat(borderWidth, " solid ").concat(borderColor) : undefined;
|
|
17279
|
+
}
|
|
17280
|
+
function resolveBorderRadius(comp, theme, objectType) {
|
|
17281
|
+
return (comp === null || comp === void 0 ? void 0 : comp.borderRadius) || resolveProperty('', 'borderRadius', theme, objectType);
|
|
17282
|
+
}
|
|
17283
|
+
function resolveBoxShadow(comp, theme, objectType) {
|
|
17284
|
+
var _comp$shadow, _comp$shadow2;
|
|
17285
|
+
const themeBoxShadow = resolveProperty('shadow', 'boxShadow', theme, objectType);
|
|
17286
|
+
const boxShadow = (comp === null || comp === void 0 || (_comp$shadow = comp.shadow) === null || _comp$shadow === void 0 ? void 0 : _comp$shadow.boxShadow) || themeBoxShadow;
|
|
17287
|
+
const boxShadowColor = resolveColor(comp === null || comp === void 0 || (_comp$shadow2 = comp.shadow) === null || _comp$shadow2 === void 0 ? void 0 : _comp$shadow2.boxShadowColor, 'shadow', 'boxShadowColor', theme, objectType);
|
|
17288
|
+
return getFullBoxShadow(boxShadow, themeBoxShadow, boxShadowColor);
|
|
17289
|
+
}
|
|
17290
|
+
function unfurlFontStyle(fontStyle, target) {
|
|
17291
|
+
if (fontStyle && Array.isArray(fontStyle)) {
|
|
17292
|
+
return fontStyle;
|
|
17293
|
+
}
|
|
17294
|
+
return target === 'main' ? ['bold'] : [];
|
|
17295
|
+
}
|
|
17296
|
+
function resolveTextStyle(textComp, target, theme, objectType) {
|
|
17297
|
+
var _textComp$title;
|
|
17298
|
+
const textProps = (textComp === null || textComp === void 0 || (_textComp$title = textComp.title) === null || _textComp$title === void 0 ? void 0 : _textComp$title[target]) || {};
|
|
17299
|
+
const fontStyle = unfurlFontStyle(textProps.fontStyle, target);
|
|
17300
|
+
return {
|
|
17301
|
+
fontFamily: textProps.fontFamily || theme.getStyle("object.".concat(objectType), "title.".concat(target), 'fontFamily'),
|
|
17302
|
+
color: textProps.color && textProps.color.color !== 'none' ? theme.getColorPickerColor(textProps.color, true) : theme.getStyle("object.".concat(objectType), target, 'color'),
|
|
17303
|
+
fontWeight: fontStyle.includes('bold') ? 'bold' : 'normal',
|
|
17304
|
+
fontStyle: fontStyle.includes('italic') ? 'italic' : 'normal',
|
|
17305
|
+
textDecoration: fontStyle.includes('underline') ? 'underline' : 'initial'
|
|
17306
|
+
};
|
|
17307
|
+
}
|
|
17308
|
+
|
|
17114
17309
|
const LIGHT = '#FFF';
|
|
17115
17310
|
const DARK = '#000';
|
|
17116
17311
|
const CONTRAST_THRESHOLD = 1.5;
|
|
@@ -17165,11 +17360,17 @@ function getOverridesAsObject() {
|
|
|
17165
17360
|
});
|
|
17166
17361
|
return overrides;
|
|
17167
17362
|
}
|
|
17168
|
-
function getSelectionColors(
|
|
17363
|
+
function getSelectionColors(_ref) {
|
|
17169
17364
|
var _overrides$theme, _theme$palette, _overrides$theme$cont, _overrides$theme2, _overrides$selections, _selectionColors$sele, _theme$palette2, _selectionColors$alte, _theme$palette3, _selectionColors$excl, _theme$palette4, _selectionColors$sele2, _theme$palette5, _selectionColors$poss, _theme$palette6, _theme$palette7, _theme$palette8, _theme$palette9, _theme$palette10, _theme$palette11;
|
|
17365
|
+
let {
|
|
17366
|
+
theme,
|
|
17367
|
+
getListboxStyle,
|
|
17368
|
+
overrides,
|
|
17369
|
+
checkboxes
|
|
17370
|
+
} = _ref;
|
|
17170
17371
|
const componentContentTextColor = (_overrides$theme = overrides.theme) === null || _overrides$theme === void 0 || (_overrides$theme = _overrides$theme.content) === null || _overrides$theme === void 0 || (_overrides$theme = _overrides$theme.fontColor) === null || _overrides$theme === void 0 ? void 0 : _overrides$theme.color;
|
|
17171
17372
|
const desiredTextColor = componentContentTextColor || getListboxStyle('content', 'color') || ((_theme$palette = theme.palette) === null || _theme$palette === void 0 ? void 0 : _theme$palette.text.primary);
|
|
17172
|
-
const useContrastTextColor = (_overrides$theme$cont = (_overrides$theme2 = overrides.theme) === null || _overrides$theme2 === void 0 || (_overrides$theme2 = _overrides$theme2.content) === null || _overrides$theme2 === void 0 ? void 0 : _overrides$theme2.useContrastColor) !== null && _overrides$theme$cont !== void 0 ? _overrides$theme$cont : true;
|
|
17373
|
+
const useContrastTextColor = !checkboxes && ((_overrides$theme$cont = (_overrides$theme2 = overrides.theme) === null || _overrides$theme2 === void 0 || (_overrides$theme2 = _overrides$theme2.content) === null || _overrides$theme2 === void 0 ? void 0 : _overrides$theme2.useContrastColor) !== null && _overrides$theme$cont !== void 0 ? _overrides$theme$cont : true);
|
|
17173
17374
|
|
|
17174
17375
|
// Background colors
|
|
17175
17376
|
const selectionColors = ((_overrides$selections = overrides.selections) === null || _overrides$selections === void 0 ? void 0 : _overrides$selections.colors) || {};
|
|
@@ -17206,31 +17407,94 @@ function getSelectionColors(theme, getListboxStyle, overrides) {
|
|
|
17206
17407
|
possibleContrast
|
|
17207
17408
|
};
|
|
17208
17409
|
}
|
|
17209
|
-
function
|
|
17210
|
-
|
|
17410
|
+
function getBackgroundColor(_ref2) {
|
|
17411
|
+
let {
|
|
17412
|
+
themeApi,
|
|
17413
|
+
themeOverrides
|
|
17414
|
+
} = _ref2;
|
|
17415
|
+
let color;
|
|
17416
|
+
const bgColor = themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.background;
|
|
17417
|
+
if (!bgColor) {
|
|
17418
|
+
return color;
|
|
17419
|
+
}
|
|
17420
|
+
if (bgColor !== null && bgColor !== void 0 && bgColor.useExpression) {
|
|
17421
|
+
color = resolveBgColor({
|
|
17422
|
+
bgColor
|
|
17423
|
+
}, themeApi, 'listBox');
|
|
17424
|
+
} else {
|
|
17425
|
+
var _themeApi$getColorPic;
|
|
17426
|
+
color = (_themeApi$getColorPic = themeApi.getColorPickerColor(bgColor, true)) === null || _themeApi$getColorPic === void 0 ? void 0 : _themeApi$getColorPic.color;
|
|
17427
|
+
}
|
|
17428
|
+
return color;
|
|
17429
|
+
}
|
|
17430
|
+
function getSearchColor(getListboxStyle) {
|
|
17431
|
+
const desiredTextColor = getListboxStyle('content', 'color');
|
|
17432
|
+
const color = getContrastingColor('#fff', desiredTextColor);
|
|
17433
|
+
return color;
|
|
17434
|
+
}
|
|
17435
|
+
function getStyles(_ref3) {
|
|
17436
|
+
var _themeOverrides$heade, _themeOverrides$backg, _themeOverrides$heade2, _themeOverrides$conte, _themeOverrides$heade3, _themeOverrides$heade4, _themeOverrides$conte2, _themeOverrides$conte3;
|
|
17211
17437
|
let {
|
|
17438
|
+
app,
|
|
17212
17439
|
themeApi,
|
|
17213
17440
|
theme,
|
|
17214
17441
|
components = [],
|
|
17215
17442
|
checkboxes = false
|
|
17216
|
-
} =
|
|
17443
|
+
} = _ref3;
|
|
17217
17444
|
const overrides = getOverridesAsObject(components);
|
|
17218
17445
|
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
17219
|
-
const selections = getSelectionColors(
|
|
17446
|
+
const selections = getSelectionColors({
|
|
17447
|
+
theme,
|
|
17448
|
+
getListboxStyle,
|
|
17449
|
+
overrides,
|
|
17450
|
+
checkboxes
|
|
17451
|
+
});
|
|
17220
17452
|
const themeOverrides = overrides.theme || {};
|
|
17453
|
+
const headerColor = ((_themeOverrides$heade = themeOverrides.header) === null || _themeOverrides$heade === void 0 || (_themeOverrides$heade = _themeOverrides$heade.fontColor) === null || _themeOverrides$heade === void 0 ? void 0 : _themeOverrides$heade.color) || getListboxStyle('title.main', 'color');
|
|
17454
|
+
const bgComponentColor = getBackgroundColor({
|
|
17455
|
+
themeApi,
|
|
17456
|
+
themeOverrides
|
|
17457
|
+
});
|
|
17458
|
+
const bgImage = (_themeOverrides$backg = themeOverrides.background) !== null && _themeOverrides$backg !== void 0 && _themeOverrides$backg.image ? resolveBgImage({
|
|
17459
|
+
bgImage: themeOverrides.background.image
|
|
17460
|
+
}, app) : undefined;
|
|
17461
|
+
const searchBgColor = 'rgba(255, 255, 255, 0.7)';
|
|
17462
|
+
const searchColor = getSearchColor(getListboxStyle);
|
|
17463
|
+
const headerFontStyle = ((_themeOverrides$heade2 = themeOverrides.header) === null || _themeOverrides$heade2 === void 0 ? void 0 : _themeOverrides$heade2.fontStyle) || {};
|
|
17464
|
+
const contentFontStyle = ((_themeOverrides$conte = themeOverrides.content) === null || _themeOverrides$conte === void 0 ? void 0 : _themeOverrides$conte.fontStyle) || {};
|
|
17465
|
+
|
|
17466
|
+
// Ensure we only return falseValue when the component is used, and thus has a false value.
|
|
17467
|
+
const getWithFallback = (value, trueValue, falseValue) => value === true && trueValue || value === false && falseValue || undefined;
|
|
17221
17468
|
return {
|
|
17222
|
-
|
|
17469
|
+
background: {
|
|
17470
|
+
backgroundColor: bgComponentColor || getListboxStyle('', 'backgroundColor') || theme.palette.background.default,
|
|
17471
|
+
backgroundImage: bgImage !== null && bgImage !== void 0 && bgImage.url && !(bgImage !== null && bgImage !== void 0 && bgImage.url.startsWith('url(')) ? "url('".concat(bgImage.url, "')") : undefined,
|
|
17472
|
+
backgroundRepeat: 'no-repeat',
|
|
17473
|
+
backgroundSize: bgImage === null || bgImage === void 0 ? void 0 : bgImage.size,
|
|
17474
|
+
backgroundPosition: bgImage === null || bgImage === void 0 ? void 0 : bgImage.pos
|
|
17475
|
+
},
|
|
17223
17476
|
header: {
|
|
17224
|
-
color:
|
|
17225
|
-
fontSize: ((_themeOverrides$
|
|
17226
|
-
fontFamily: getListboxStyle('title.main', 'fontFamily'),
|
|
17227
|
-
fontWeight: getListboxStyle('title.main', 'fontWeight') || 'bold'
|
|
17477
|
+
color: headerColor,
|
|
17478
|
+
fontSize: ((_themeOverrides$heade3 = themeOverrides.header) === null || _themeOverrides$heade3 === void 0 ? void 0 : _themeOverrides$heade3.fontSize) || getListboxStyle('title.main', 'fontSize'),
|
|
17479
|
+
fontFamily: ((_themeOverrides$heade4 = themeOverrides.header) === null || _themeOverrides$heade4 === void 0 ? void 0 : _themeOverrides$heade4.fontFamily) || getListboxStyle('title.main', 'fontFamily'),
|
|
17480
|
+
fontWeight: getWithFallback(headerFontStyle.bold, 'bold', 'normal') || getListboxStyle('title.main', 'fontWeight') || 'bold',
|
|
17481
|
+
textDecoration: headerFontStyle.underline ? 'underline' : 'initial',
|
|
17482
|
+
fontStyle: getWithFallback(headerFontStyle.italic, 'italic', 'normal') || getListboxStyle('title.main', 'fontStyle') || 'initial'
|
|
17228
17483
|
},
|
|
17229
17484
|
content: {
|
|
17230
17485
|
backgroundColor: checkboxes ? undefined : selections.possible,
|
|
17231
17486
|
color: selections.possibleContrast || getListboxStyle('content', 'color'),
|
|
17232
|
-
fontSize: ((_themeOverrides$
|
|
17233
|
-
fontFamily: getListboxStyle('content', 'fontFamily')
|
|
17487
|
+
fontSize: ((_themeOverrides$conte2 = themeOverrides.content) === null || _themeOverrides$conte2 === void 0 ? void 0 : _themeOverrides$conte2.fontSize) || getListboxStyle('content', 'fontSize'),
|
|
17488
|
+
fontFamily: ((_themeOverrides$conte3 = themeOverrides.content) === null || _themeOverrides$conte3 === void 0 ? void 0 : _themeOverrides$conte3.fontFamily) || getListboxStyle('content', 'fontFamily'),
|
|
17489
|
+
fontWeight: getWithFallback(contentFontStyle.bold, 'bold', 'normal') || getListboxStyle('content', 'fontWeight') || 'normal',
|
|
17490
|
+
textDecoration: contentFontStyle.underline ? 'underline' : 'initial',
|
|
17491
|
+
fontStyle: getWithFallback(contentFontStyle.italic, 'italic', 'normal') || getListboxStyle('content', 'fontStyle') || 'initial'
|
|
17492
|
+
},
|
|
17493
|
+
search: {
|
|
17494
|
+
color: searchColor,
|
|
17495
|
+
borderColor: theme.palette.divider,
|
|
17496
|
+
highlightBorderColor: theme.palette.primary.main,
|
|
17497
|
+
backgroundColor: searchBgColor
|
|
17234
17498
|
},
|
|
17235
17499
|
selections
|
|
17236
17500
|
};
|
|
@@ -18904,8 +19168,8 @@ const StyledGrid$3 = styled$1(Grid, {
|
|
|
18904
19168
|
isGridMode,
|
|
18905
19169
|
styles
|
|
18906
19170
|
} = _ref;
|
|
18907
|
-
return {
|
|
18908
|
-
background
|
|
19171
|
+
return _objectSpread2(_objectSpread2({}, styles.background), {}, {
|
|
19172
|
+
// sets background color and image of listbox
|
|
18909
19173
|
["& .".concat(classes$4.listBoxHeader)]: {
|
|
18910
19174
|
alignSelf: 'center',
|
|
18911
19175
|
display: 'flex'
|
|
@@ -18928,33 +19192,50 @@ const StyledGrid$3 = styled$1(Grid, {
|
|
|
18928
19192
|
'&:focus-visible': {
|
|
18929
19193
|
outline: 'none'
|
|
18930
19194
|
}
|
|
18931
|
-
};
|
|
19195
|
+
});
|
|
18932
19196
|
});
|
|
18933
|
-
const
|
|
19197
|
+
const StyledGridHeader = styled$1(Grid, {
|
|
19198
|
+
shouldForwardProp: p => !['styles', 'isRtl'].includes(p)
|
|
19199
|
+
})(_ref2 => {
|
|
18934
19200
|
let {
|
|
18935
|
-
styles
|
|
19201
|
+
styles,
|
|
19202
|
+
isRtl
|
|
18936
19203
|
} = _ref2;
|
|
18937
|
-
return {
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
}
|
|
19204
|
+
return _objectSpread2(_objectSpread2({
|
|
19205
|
+
flexDirection: isRtl ? 'row-reverse' : 'row',
|
|
19206
|
+
wrap: 'nowrap',
|
|
19207
|
+
minHeight: 32,
|
|
19208
|
+
alignContent: 'center'
|
|
19209
|
+
}, styles.header), {}, {
|
|
19210
|
+
'& *': {
|
|
19211
|
+
// Assign the styles color as defaul color for all elements in the header
|
|
19212
|
+
color: styles.header.color
|
|
19213
|
+
}
|
|
19214
|
+
});
|
|
18943
19215
|
});
|
|
18944
|
-
const
|
|
19216
|
+
const Title = styled$1(Typography)(_ref3 => {
|
|
19217
|
+
let {
|
|
19218
|
+
styles
|
|
19219
|
+
} = _ref3;
|
|
19220
|
+
return _objectSpread2(_objectSpread2({}, styles.header), {}, {
|
|
19221
|
+
paddingRight: '1px' // make place for italic font style
|
|
19222
|
+
});
|
|
19223
|
+
});
|
|
19224
|
+
|
|
19225
|
+
const isModal = _ref4 => {
|
|
18945
19226
|
var _app$isInModalSelecti, _app$isInModalSelecti2;
|
|
18946
19227
|
let {
|
|
18947
19228
|
app,
|
|
18948
19229
|
appSelections
|
|
18949
|
-
} =
|
|
19230
|
+
} = _ref4;
|
|
18950
19231
|
return (_app$isInModalSelecti = (_app$isInModalSelecti2 = app.isInModalSelection) === null || _app$isInModalSelecti2 === void 0 ? void 0 : _app$isInModalSelecti2.call(app)) !== null && _app$isInModalSelecti !== void 0 ? _app$isInModalSelecti : appSelections.isInModal();
|
|
18951
19232
|
};
|
|
18952
|
-
function ListBoxInline(
|
|
19233
|
+
function ListBoxInline(_ref5) {
|
|
18953
19234
|
var _layout$qListObject, _layout$qListObject2, _layoutOptions$dense;
|
|
18954
19235
|
let {
|
|
18955
19236
|
options,
|
|
18956
19237
|
layout
|
|
18957
|
-
} =
|
|
19238
|
+
} = _ref5;
|
|
18958
19239
|
const {
|
|
18959
19240
|
app,
|
|
18960
19241
|
direction,
|
|
@@ -19003,6 +19284,7 @@ function ListBoxInline(_ref4) {
|
|
|
19003
19284
|
checkboxes = checkboxesOption
|
|
19004
19285
|
} = layout || {};
|
|
19005
19286
|
const styles = getStyles({
|
|
19287
|
+
app,
|
|
19006
19288
|
themeApi,
|
|
19007
19289
|
theme,
|
|
19008
19290
|
components,
|
|
@@ -19148,7 +19430,6 @@ function ListBoxInline(_ref4) {
|
|
|
19148
19430
|
const showSearchToggle = search === 'toggle' && showSearch;
|
|
19149
19431
|
const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
|
|
19150
19432
|
const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
|
|
19151
|
-
const headerHeight = 32;
|
|
19152
19433
|
const onShowSearch = () => {
|
|
19153
19434
|
const newValue = !showSearch;
|
|
19154
19435
|
setShowSearch(newValue);
|
|
@@ -19242,15 +19523,14 @@ function ListBoxInline(_ref4) {
|
|
|
19242
19523
|
},
|
|
19243
19524
|
isGridMode: isGridMode,
|
|
19244
19525
|
"aria-label": keyboard.active ? translator.get('Listbox.ScreenReaderInstructions') : ''
|
|
19245
|
-
}, showToolbarWithTitle && /*#__PURE__*/React__default.createElement(
|
|
19526
|
+
}, showToolbarWithTitle && /*#__PURE__*/React__default.createElement(StyledGridHeader, {
|
|
19246
19527
|
item: true,
|
|
19247
19528
|
container: true,
|
|
19248
|
-
|
|
19249
|
-
|
|
19529
|
+
styles: styles,
|
|
19530
|
+
isRtl: isRtl,
|
|
19250
19531
|
marginY: 1,
|
|
19251
19532
|
paddingLeft: "".concat(headerPaddingLeft, "px"),
|
|
19252
|
-
paddingRight: "".concat(headerPaddingRight, "px")
|
|
19253
|
-
wrap: "nowrap"
|
|
19533
|
+
paddingRight: "".concat(headerPaddingRight, "px")
|
|
19254
19534
|
}, showIcons && /*#__PURE__*/React__default.createElement(Grid, {
|
|
19255
19535
|
item: true,
|
|
19256
19536
|
container: true,
|
|
@@ -19277,7 +19557,8 @@ function ListBoxInline(_ref4) {
|
|
|
19277
19557
|
title: layout.title,
|
|
19278
19558
|
styles: styles
|
|
19279
19559
|
}, layout.title)), /*#__PURE__*/React__default.createElement(Grid, {
|
|
19280
|
-
item: true
|
|
19560
|
+
item: true,
|
|
19561
|
+
display: "flex"
|
|
19281
19562
|
}, /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$5({
|
|
19282
19563
|
direction: direction
|
|
19283
19564
|
}, getActionToolbarProps(isToolbarDetached))))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
@@ -19313,11 +19594,11 @@ function ListBoxInline(_ref4) {
|
|
|
19313
19594
|
className: classes$4.listboxWrapper
|
|
19314
19595
|
}, isInvalid ? /*#__PURE__*/React__default.createElement(ListBoxError, {
|
|
19315
19596
|
text: errorText
|
|
19316
|
-
}) : /*#__PURE__*/React__default.createElement(AutoSizer, null,
|
|
19597
|
+
}) : /*#__PURE__*/React__default.createElement(AutoSizer, null, _ref6 => {
|
|
19317
19598
|
let {
|
|
19318
19599
|
height,
|
|
19319
19600
|
width
|
|
19320
|
-
} =
|
|
19601
|
+
} = _ref6;
|
|
19321
19602
|
return /*#__PURE__*/React__default.createElement(ListBox, {
|
|
19322
19603
|
model: model,
|
|
19323
19604
|
app: app,
|
|
@@ -19359,10 +19640,10 @@ function ListBoxInline(_ref4) {
|
|
|
19359
19640
|
})))));
|
|
19360
19641
|
}
|
|
19361
19642
|
const ListBoxInlineMemoed = React__default.memo(ListBoxInline);
|
|
19362
|
-
function IsolateUseLayoutWrapper(
|
|
19643
|
+
function IsolateUseLayoutWrapper(_ref7) {
|
|
19363
19644
|
let {
|
|
19364
19645
|
options = {}
|
|
19365
|
-
} =
|
|
19646
|
+
} = _ref7;
|
|
19366
19647
|
const {
|
|
19367
19648
|
model
|
|
19368
19649
|
} = options;
|
|
@@ -21777,117 +22058,33 @@ function Supernova(_ref) {
|
|
|
21777
22058
|
}));
|
|
21778
22059
|
}
|
|
21779
22060
|
|
|
21780
|
-
const
|
|
21781
|
-
|
|
21782
|
-
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
21787
|
-
|
|
21788
|
-
|
|
21789
|
-
|
|
21790
|
-
|
|
21791
|
-
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
|
|
21796
|
-
|
|
21797
|
-
|
|
21798
|
-
|
|
21799
|
-
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
var _app$session;
|
|
21803
|
-
let config;
|
|
21804
|
-
let wsUrl;
|
|
21805
|
-
let protocol;
|
|
21806
|
-
let isSecure;
|
|
21807
|
-
if (app !== null && app !== void 0 && (_app$session = app.session) !== null && _app$session !== void 0 && _app$session.config) {
|
|
21808
|
-
config = app.session.config;
|
|
21809
|
-
wsUrl = new URL(config.url);
|
|
21810
|
-
isSecure = wsUrl.protocol === 'wss:';
|
|
21811
|
-
protocol = isSecure ? 'https://' : 'http://';
|
|
21812
|
-
return protocol + wsUrl.host;
|
|
21813
|
-
}
|
|
21814
|
-
return '';
|
|
21815
|
-
}
|
|
21816
|
-
function getBackgroundPosition(bgComp) {
|
|
21817
|
-
var _bgComp$bgImage;
|
|
21818
|
-
let bkgImagePosition = 'center center';
|
|
21819
|
-
if (bgComp !== null && bgComp !== void 0 && (_bgComp$bgImage = bgComp.bgImage) !== null && _bgComp$bgImage !== void 0 && _bgComp$bgImage.position) {
|
|
21820
|
-
bkgImagePosition = positionToCss[bgComp.bgImage.position];
|
|
21821
|
-
}
|
|
21822
|
-
return bkgImagePosition;
|
|
21823
|
-
}
|
|
21824
|
-
function getBackgroundSize(bgComp) {
|
|
21825
|
-
var _bgComp$bgImage2;
|
|
21826
|
-
let bkgImageSize = imageSizingToCssProperty.originalSize;
|
|
21827
|
-
if (bgComp !== null && bgComp !== void 0 && (_bgComp$bgImage2 = bgComp.bgImage) !== null && _bgComp$bgImage2 !== void 0 && _bgComp$bgImage2.sizing) {
|
|
21828
|
-
bkgImageSize = imageSizingToCssProperty[bgComp.bgImage.sizing];
|
|
21829
|
-
}
|
|
21830
|
-
return bkgImageSize;
|
|
21831
|
-
}
|
|
21832
|
-
function resolveImageUrl(app, relativeUrl) {
|
|
21833
|
-
return relativeUrl ? getSenseServerUrl(app) + relativeUrl : undefined;
|
|
21834
|
-
}
|
|
21835
|
-
function resolveBgImage(bgComp, app) {
|
|
21836
|
-
const bgImageDef = bgComp === null || bgComp === void 0 ? void 0 : bgComp.bgImage;
|
|
21837
|
-
if (bgImageDef) {
|
|
21838
|
-
let url = '';
|
|
21839
|
-
if (bgImageDef.mode === 'media' || bgComp.useImage === 'media') {
|
|
21840
|
-
var _bgImageDef$mediaUrl;
|
|
21841
|
-
url = bgImageDef !== null && bgImageDef !== void 0 && (_bgImageDef$mediaUrl = bgImageDef.mediaUrl) !== null && _bgImageDef$mediaUrl !== void 0 && (_bgImageDef$mediaUrl = _bgImageDef$mediaUrl.qStaticContentUrl) !== null && _bgImageDef$mediaUrl !== void 0 && _bgImageDef$mediaUrl.qUrl ? decodeURIComponent(bgImageDef.mediaUrl.qStaticContentUrl.qUrl) : undefined;
|
|
21842
|
-
url = resolveImageUrl(app, url);
|
|
21843
|
-
}
|
|
21844
|
-
if (bgImageDef.mode === 'expression') {
|
|
21845
|
-
url = bgImageDef.expressionUrl ? decodeURIComponent(bgImageDef.expressionUrl) : undefined;
|
|
21846
|
-
}
|
|
21847
|
-
const pos = getBackgroundPosition(bgComp);
|
|
21848
|
-
const size = getBackgroundSize(bgComp);
|
|
21849
|
-
return url ? {
|
|
21850
|
-
url,
|
|
21851
|
-
pos,
|
|
21852
|
-
size
|
|
21853
|
-
} : undefined;
|
|
21854
|
-
}
|
|
21855
|
-
return undefined;
|
|
21856
|
-
}
|
|
21857
|
-
function resolveBgColor(bgComp, theme, objectType) {
|
|
21858
|
-
const bgColor = bgComp === null || bgComp === void 0 ? void 0 : bgComp.bgColor;
|
|
21859
|
-
if (bgColor && theme) {
|
|
21860
|
-
if (bgColor.useExpression) {
|
|
21861
|
-
return theme.validateColor(bgColor.colorExpression);
|
|
22061
|
+
const useStyling = (layout, theme, app, themeName) => {
|
|
22062
|
+
const styling = useMemo$1(() => {
|
|
22063
|
+
if (layout && theme) {
|
|
22064
|
+
const generalComp = layout.components ? layout.components.find(comp => comp.key === 'general') : null;
|
|
22065
|
+
const titleStyles = {
|
|
22066
|
+
main: resolveTextStyle(generalComp, 'main', theme, layout.visualization),
|
|
22067
|
+
footer: resolveTextStyle(generalComp, 'footer', theme, layout.visualization),
|
|
22068
|
+
subTitle: resolveTextStyle(generalComp, 'subTitle', theme, layout.visualization)
|
|
22069
|
+
};
|
|
22070
|
+
const bgColor = resolveBgColor(generalComp, theme, layout.visualization);
|
|
22071
|
+
const bgImage = resolveBgImage(generalComp, app);
|
|
22072
|
+
const border = resolveBorder(generalComp, theme, layout.visualization);
|
|
22073
|
+
const borderRadius = resolveBorderRadius(generalComp, theme, layout.visualization);
|
|
22074
|
+
const boxShadow = resolveBoxShadow(generalComp, theme, layout.visualization);
|
|
22075
|
+
return {
|
|
22076
|
+
titleStyles,
|
|
22077
|
+
bgColor,
|
|
22078
|
+
bgImage,
|
|
22079
|
+
border,
|
|
22080
|
+
borderRadius,
|
|
22081
|
+
boxShadow
|
|
22082
|
+
};
|
|
21862
22083
|
}
|
|
21863
|
-
return
|
|
21864
|
-
}
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
}
|
|
21868
|
-
if (theme) {
|
|
21869
|
-
return theme.getStyle('', '', 'backgroundColor');
|
|
21870
|
-
}
|
|
21871
|
-
return undefined;
|
|
21872
|
-
}
|
|
21873
|
-
function unfurlFontStyle(fontStyle, target) {
|
|
21874
|
-
if (fontStyle && Array.isArray(fontStyle)) {
|
|
21875
|
-
return fontStyle;
|
|
21876
|
-
}
|
|
21877
|
-
return target === 'main' ? ['bold'] : [];
|
|
21878
|
-
}
|
|
21879
|
-
function resolveTextStyle(textComp, target, theme, objectType) {
|
|
21880
|
-
var _textComp$title;
|
|
21881
|
-
const textProps = (textComp === null || textComp === void 0 || (_textComp$title = textComp.title) === null || _textComp$title === void 0 ? void 0 : _textComp$title[target]) || {};
|
|
21882
|
-
const fontStyle = unfurlFontStyle(textProps.fontStyle, target);
|
|
21883
|
-
return {
|
|
21884
|
-
fontFamily: textProps.fontFamily || theme.getStyle("object.".concat(objectType), "title.".concat(target), 'fontFamily'),
|
|
21885
|
-
color: textProps.color && textProps.color.color !== 'none' ? theme.getColorPickerColor(textProps.color, true) : theme.getStyle("object.".concat(objectType), target, 'color'),
|
|
21886
|
-
fontWeight: fontStyle.includes('bold') ? 'bold' : 'normal',
|
|
21887
|
-
fontStyle: fontStyle.includes('italic') ? 'italic' : 'normal',
|
|
21888
|
-
textDecoration: fontStyle.includes('underline') ? 'underline' : 'initial'
|
|
21889
|
-
};
|
|
21890
|
-
}
|
|
22084
|
+
return {};
|
|
22085
|
+
}, [layout, theme, app, themeName]);
|
|
22086
|
+
return styling;
|
|
22087
|
+
};
|
|
21891
22088
|
|
|
21892
22089
|
/**
|
|
21893
22090
|
* @interface
|
|
@@ -22218,9 +22415,14 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
22218
22415
|
enter: null,
|
|
22219
22416
|
leave: null
|
|
22220
22417
|
});
|
|
22221
|
-
const
|
|
22222
|
-
|
|
22223
|
-
|
|
22418
|
+
const {
|
|
22419
|
+
titleStyles,
|
|
22420
|
+
bgColor,
|
|
22421
|
+
bgImage,
|
|
22422
|
+
border,
|
|
22423
|
+
borderRadius,
|
|
22424
|
+
boxShadow
|
|
22425
|
+
} = useStyling(layout, halo.public.theme, halo.app, themeName);
|
|
22224
22426
|
const focusHandler = useRef({
|
|
22225
22427
|
focusToolbarButton(last) {
|
|
22226
22428
|
// eslint-disable-next-line react/no-this-in-sfc
|
|
@@ -22230,18 +22432,6 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
22230
22432
|
useEffect$1(() => {
|
|
22231
22433
|
eventmixin(focusHandler.current);
|
|
22232
22434
|
}, []);
|
|
22233
|
-
useEffect$1(() => {
|
|
22234
|
-
if (layout && halo.public.theme) {
|
|
22235
|
-
const bgComp = layout.components ? layout.components.find(comp => comp.key === 'general') : null;
|
|
22236
|
-
setTitleStyles({
|
|
22237
|
-
main: resolveTextStyle(bgComp, 'main', halo.public.theme, layout.visualization),
|
|
22238
|
-
footer: resolveTextStyle(bgComp, 'footer', halo.public.theme, layout.visualization),
|
|
22239
|
-
subTitle: resolveTextStyle(bgComp, 'subTitle', halo.public.theme, layout.visualization)
|
|
22240
|
-
});
|
|
22241
|
-
setBgColor(resolveBgColor(bgComp, halo.public.theme, layout.visualization));
|
|
22242
|
-
setBgImage(resolveBgImage(bgComp, halo.app));
|
|
22243
|
-
}
|
|
22244
|
-
}, [layout, halo.public.theme, halo.app, themeName]);
|
|
22245
22435
|
focusHandler.current.blurCallback = resetFocus => {
|
|
22246
22436
|
halo.root.toggleFocusOfCells();
|
|
22247
22437
|
if (resetFocus && contentNode) {
|
|
@@ -22432,7 +22622,11 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
22432
22622
|
backgroundImage: bgImage && bgImage.url ? "url(".concat(bgImage.url, ")") : undefined,
|
|
22433
22623
|
backgroundRepeat: 'no-repeat',
|
|
22434
22624
|
backgroundSize: bgImage && bgImage.size,
|
|
22435
|
-
backgroundPosition: bgImage && bgImage.pos
|
|
22625
|
+
backgroundPosition: bgImage && bgImage.pos,
|
|
22626
|
+
border,
|
|
22627
|
+
borderRadius,
|
|
22628
|
+
boxShadow,
|
|
22629
|
+
boxSizing: 'border-box'
|
|
22436
22630
|
},
|
|
22437
22631
|
elevation: 0,
|
|
22438
22632
|
square: true,
|
|
@@ -25374,6 +25568,17 @@ function getCellRenderer(cell, halo, initialSnOptions, initialSnPlugins, initial
|
|
|
25374
25568
|
onMount: onMount
|
|
25375
25569
|
}));
|
|
25376
25570
|
}
|
|
25571
|
+
function getBounds(pos, columns, rows) {
|
|
25572
|
+
if (pos.bounds) {
|
|
25573
|
+
return pos.bounds;
|
|
25574
|
+
}
|
|
25575
|
+
return {
|
|
25576
|
+
y: pos.row / rows * 100,
|
|
25577
|
+
x: pos.col / columns * 100,
|
|
25578
|
+
width: pos.colspan / columns * 100,
|
|
25579
|
+
height: pos.rowspan / rows * 100
|
|
25580
|
+
};
|
|
25581
|
+
}
|
|
25377
25582
|
function Sheet(_ref) {
|
|
25378
25583
|
let {
|
|
25379
25584
|
model,
|
|
@@ -25414,6 +25619,10 @@ function Sheet(_ref) {
|
|
|
25414
25619
|
root.removeCell(c.currentId);
|
|
25415
25620
|
});
|
|
25416
25621
|
const lCells = layout.cells;
|
|
25622
|
+
const {
|
|
25623
|
+
columns,
|
|
25624
|
+
rows
|
|
25625
|
+
} = layout;
|
|
25417
25626
|
// TODO - should try reuse existing objects on subsequent renders
|
|
25418
25627
|
// Non-id updates should only change the "css"
|
|
25419
25628
|
const cs = await Promise.all(lCells.map(async c => {
|
|
@@ -25423,7 +25632,7 @@ function Sheet(_ref) {
|
|
|
25423
25632
|
});
|
|
25424
25633
|
const cell = cells.find(ce => ce.id === c.name);
|
|
25425
25634
|
if (cell) {
|
|
25426
|
-
cell.bounds = c
|
|
25635
|
+
cell.bounds = getBounds(c, columns, rows);
|
|
25427
25636
|
delete cell.mountedPromise;
|
|
25428
25637
|
return cell;
|
|
25429
25638
|
}
|
|
@@ -25433,7 +25642,7 @@ function Sheet(_ref) {
|
|
|
25433
25642
|
return {
|
|
25434
25643
|
model: vs.model,
|
|
25435
25644
|
id: c.name,
|
|
25436
|
-
bounds: c
|
|
25645
|
+
bounds: getBounds(c, columns, rows),
|
|
25437
25646
|
cellRef: React__default.createRef(),
|
|
25438
25647
|
currentId: uid(),
|
|
25439
25648
|
mounted,
|