@nebula.js/stardust 4.5.0 → 4.6.1
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 +716 -189
- 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 +718 -191
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +14 -14
- package/dist/stardust.js.map +1 -1
- package/package.json +12 -12
- package/types/index.d.ts +15 -10
package/dist/stardust.dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v4.
|
|
2
|
+
* @nebula.js/stardust v4.6.1
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -722,26 +722,26 @@
|
|
|
722
722
|
}
|
|
723
723
|
})(runtime);
|
|
724
724
|
|
|
725
|
-
function ownKeys(
|
|
726
|
-
var
|
|
725
|
+
function ownKeys(object, enumerableOnly) {
|
|
726
|
+
var keys = Object.keys(object);
|
|
727
727
|
if (Object.getOwnPropertySymbols) {
|
|
728
|
-
var
|
|
729
|
-
|
|
730
|
-
return Object.getOwnPropertyDescriptor(
|
|
731
|
-
})),
|
|
732
|
-
}
|
|
733
|
-
return
|
|
734
|
-
}
|
|
735
|
-
function _objectSpread2(
|
|
736
|
-
for (var
|
|
737
|
-
var
|
|
738
|
-
|
|
739
|
-
_defineProperty(
|
|
740
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
741
|
-
Object.defineProperty(
|
|
728
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
729
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
730
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
731
|
+
})), keys.push.apply(keys, symbols);
|
|
732
|
+
}
|
|
733
|
+
return keys;
|
|
734
|
+
}
|
|
735
|
+
function _objectSpread2(target) {
|
|
736
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
737
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
738
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
739
|
+
_defineProperty(target, key, source[key]);
|
|
740
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
741
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
742
742
|
});
|
|
743
743
|
}
|
|
744
|
-
return
|
|
744
|
+
return target;
|
|
745
745
|
}
|
|
746
746
|
function _defineProperty(obj, key, value) {
|
|
747
747
|
key = _toPropertyKey(key);
|
|
@@ -6952,7 +6952,7 @@
|
|
|
6952
6952
|
}
|
|
6953
6953
|
|
|
6954
6954
|
/**
|
|
6955
|
-
* @mui/styled-engine v5.14.
|
|
6955
|
+
* @mui/styled-engine v5.14.13
|
|
6956
6956
|
*
|
|
6957
6957
|
* @license MIT
|
|
6958
6958
|
* This source code is licensed under the MIT license found in the
|
|
@@ -8267,40 +8267,48 @@
|
|
|
8267
8267
|
}
|
|
8268
8268
|
return null;
|
|
8269
8269
|
};
|
|
8270
|
+
const transformVariants = variants => {
|
|
8271
|
+
const variantsStyles = {};
|
|
8272
|
+
if (variants) {
|
|
8273
|
+
variants.forEach(definition => {
|
|
8274
|
+
const key = propsToClassKey(definition.props);
|
|
8275
|
+
variantsStyles[key] = definition.style;
|
|
8276
|
+
});
|
|
8277
|
+
}
|
|
8278
|
+
return variantsStyles;
|
|
8279
|
+
};
|
|
8270
8280
|
const getVariantStyles = (name, theme) => {
|
|
8271
8281
|
let variants = [];
|
|
8272
8282
|
if (theme && theme.components && theme.components[name] && theme.components[name].variants) {
|
|
8273
8283
|
variants = theme.components[name].variants;
|
|
8274
8284
|
}
|
|
8275
|
-
|
|
8276
|
-
variants.forEach(definition => {
|
|
8277
|
-
const key = propsToClassKey(definition.props);
|
|
8278
|
-
variantsStyles[key] = definition.style;
|
|
8279
|
-
});
|
|
8280
|
-
return variantsStyles;
|
|
8285
|
+
return transformVariants(variants);
|
|
8281
8286
|
};
|
|
8282
|
-
const variantsResolver = (props, styles,
|
|
8283
|
-
var _theme$components;
|
|
8287
|
+
const variantsResolver = (props, styles, variants) => {
|
|
8284
8288
|
const {
|
|
8285
8289
|
ownerState = {}
|
|
8286
8290
|
} = props;
|
|
8287
8291
|
const variantsStyles = [];
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
themeVariants.forEach(themeVariant => {
|
|
8292
|
+
if (variants) {
|
|
8293
|
+
variants.forEach(variant => {
|
|
8291
8294
|
let isMatch = true;
|
|
8292
|
-
Object.keys(
|
|
8293
|
-
if (ownerState[key] !==
|
|
8295
|
+
Object.keys(variant.props).forEach(key => {
|
|
8296
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
8294
8297
|
isMatch = false;
|
|
8295
8298
|
}
|
|
8296
8299
|
});
|
|
8297
8300
|
if (isMatch) {
|
|
8298
|
-
variantsStyles.push(styles[propsToClassKey(
|
|
8301
|
+
variantsStyles.push(styles[propsToClassKey(variant.props)]);
|
|
8299
8302
|
}
|
|
8300
8303
|
});
|
|
8301
8304
|
}
|
|
8302
8305
|
return variantsStyles;
|
|
8303
8306
|
};
|
|
8307
|
+
const themeVariantsResolver = (props, styles, theme, name) => {
|
|
8308
|
+
var _theme$components;
|
|
8309
|
+
const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[name]) == null ? void 0 : _theme$components.variants;
|
|
8310
|
+
return variantsResolver(props, styles, themeVariants);
|
|
8311
|
+
};
|
|
8304
8312
|
|
|
8305
8313
|
// Update /system/styled/#api in case if this changes
|
|
8306
8314
|
function shouldForwardProp(prop) {
|
|
@@ -8326,6 +8334,29 @@
|
|
|
8326
8334
|
}
|
|
8327
8335
|
return (props, styles) => styles[slot];
|
|
8328
8336
|
}
|
|
8337
|
+
const muiStyledFunctionResolver = ({
|
|
8338
|
+
styledArg,
|
|
8339
|
+
props,
|
|
8340
|
+
defaultTheme,
|
|
8341
|
+
themeId
|
|
8342
|
+
}) => {
|
|
8343
|
+
const resolvedStyles = styledArg(_extends$3({}, props, {
|
|
8344
|
+
theme: resolveTheme(_extends$3({}, props, {
|
|
8345
|
+
defaultTheme,
|
|
8346
|
+
themeId
|
|
8347
|
+
}))
|
|
8348
|
+
}));
|
|
8349
|
+
let optionalVariants;
|
|
8350
|
+
if (resolvedStyles && resolvedStyles.variants) {
|
|
8351
|
+
optionalVariants = resolvedStyles.variants;
|
|
8352
|
+
delete resolvedStyles.variants;
|
|
8353
|
+
}
|
|
8354
|
+
if (optionalVariants) {
|
|
8355
|
+
const variantsStyles = variantsResolver(props, transformVariants(optionalVariants), optionalVariants);
|
|
8356
|
+
return [resolvedStyles, ...variantsStyles];
|
|
8357
|
+
}
|
|
8358
|
+
return resolvedStyles;
|
|
8359
|
+
};
|
|
8329
8360
|
function createStyled(input = {}) {
|
|
8330
8361
|
const {
|
|
8331
8362
|
themeId,
|
|
@@ -8385,16 +8416,61 @@
|
|
|
8385
8416
|
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
8386
8417
|
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
8387
8418
|
// which are basically components used as a selectors.
|
|
8388
|
-
|
|
8389
|
-
return
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
})
|
|
8395
|
-
}
|
|
8419
|
+
if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg) {
|
|
8420
|
+
return props => muiStyledFunctionResolver({
|
|
8421
|
+
styledArg: stylesArg,
|
|
8422
|
+
props,
|
|
8423
|
+
defaultTheme,
|
|
8424
|
+
themeId
|
|
8425
|
+
});
|
|
8426
|
+
}
|
|
8427
|
+
if (isPlainObject(stylesArg)) {
|
|
8428
|
+
let transformedStylesArg = stylesArg;
|
|
8429
|
+
let styledArgVariants;
|
|
8430
|
+
if (stylesArg && stylesArg.variants) {
|
|
8431
|
+
styledArgVariants = stylesArg.variants;
|
|
8432
|
+
delete transformedStylesArg.variants;
|
|
8433
|
+
transformedStylesArg = props => {
|
|
8434
|
+
let result = stylesArg;
|
|
8435
|
+
const variantStyles = variantsResolver(props, transformVariants(styledArgVariants), styledArgVariants);
|
|
8436
|
+
variantStyles.forEach(variantStyle => {
|
|
8437
|
+
result = deepmerge(result, variantStyle);
|
|
8438
|
+
});
|
|
8439
|
+
return result;
|
|
8440
|
+
};
|
|
8441
|
+
}
|
|
8442
|
+
return transformedStylesArg;
|
|
8443
|
+
}
|
|
8444
|
+
return stylesArg;
|
|
8396
8445
|
}) : [];
|
|
8397
8446
|
let transformedStyleArg = styleArg;
|
|
8447
|
+
if (isPlainObject(styleArg)) {
|
|
8448
|
+
let styledArgVariants;
|
|
8449
|
+
if (styleArg && styleArg.variants) {
|
|
8450
|
+
styledArgVariants = styleArg.variants;
|
|
8451
|
+
delete transformedStyleArg.variants;
|
|
8452
|
+
transformedStyleArg = props => {
|
|
8453
|
+
let result = styleArg;
|
|
8454
|
+
const variantStyles = variantsResolver(props, transformVariants(styledArgVariants), styledArgVariants);
|
|
8455
|
+
variantStyles.forEach(variantStyle => {
|
|
8456
|
+
result = deepmerge(result, variantStyle);
|
|
8457
|
+
});
|
|
8458
|
+
return result;
|
|
8459
|
+
};
|
|
8460
|
+
}
|
|
8461
|
+
} else if (typeof styleArg === 'function' &&
|
|
8462
|
+
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
8463
|
+
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
8464
|
+
// which are basically components used as a selectors.
|
|
8465
|
+
styleArg.__emotion_real !== styleArg) {
|
|
8466
|
+
// If the type is function, we need to define the default theme.
|
|
8467
|
+
transformedStyleArg = props => muiStyledFunctionResolver({
|
|
8468
|
+
styledArg: styleArg,
|
|
8469
|
+
props,
|
|
8470
|
+
defaultTheme,
|
|
8471
|
+
themeId
|
|
8472
|
+
});
|
|
8473
|
+
}
|
|
8398
8474
|
if (componentName && overridesResolver) {
|
|
8399
8475
|
expressionsWithDefaultTheme.push(props => {
|
|
8400
8476
|
const theme = resolveTheme(_extends$3({}, props, {
|
|
@@ -8420,7 +8496,7 @@
|
|
|
8420
8496
|
defaultTheme,
|
|
8421
8497
|
themeId
|
|
8422
8498
|
}));
|
|
8423
|
-
return
|
|
8499
|
+
return themeVariantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
|
8424
8500
|
});
|
|
8425
8501
|
}
|
|
8426
8502
|
if (!skipSx) {
|
|
@@ -8432,18 +8508,6 @@
|
|
|
8432
8508
|
// If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.
|
|
8433
8509
|
transformedStyleArg = [...styleArg, ...placeholders];
|
|
8434
8510
|
transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
|
|
8435
|
-
} else if (typeof styleArg === 'function' &&
|
|
8436
|
-
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
8437
|
-
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
8438
|
-
// which are basically components used as a selectors.
|
|
8439
|
-
styleArg.__emotion_real !== styleArg) {
|
|
8440
|
-
// If the type is function, we need to define the default theme.
|
|
8441
|
-
transformedStyleArg = props => styleArg(_extends$3({}, props, {
|
|
8442
|
-
theme: resolveTheme(_extends$3({}, props, {
|
|
8443
|
-
defaultTheme,
|
|
8444
|
-
themeId
|
|
8445
|
-
}))
|
|
8446
|
-
}));
|
|
8447
8511
|
}
|
|
8448
8512
|
const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
|
|
8449
8513
|
if (tag.muiName) {
|
|
@@ -11129,7 +11193,7 @@
|
|
|
11129
11193
|
type: type
|
|
11130
11194
|
}, buttonProps, other, {
|
|
11131
11195
|
children: [children, enableTouchRipple ?
|
|
11132
|
-
|
|
11196
|
+
|
|
11133
11197
|
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
|
11134
11198
|
jsxRuntimeExports.jsx(TouchRipple$1, _extends$5({
|
|
11135
11199
|
ref: handleRippleRef,
|
|
@@ -11497,7 +11561,9 @@
|
|
|
11497
11561
|
text: {
|
|
11498
11562
|
primary: colors.grey25,
|
|
11499
11563
|
secondary: 'rgba(0, 0, 0, 0.55)',
|
|
11500
|
-
disabled: 'rgba(0, 0, 0, 0.3)'
|
|
11564
|
+
disabled: 'rgba(0, 0, 0, 0.3)',
|
|
11565
|
+
light: colors.grey100,
|
|
11566
|
+
dark: colors.grey0
|
|
11501
11567
|
},
|
|
11502
11568
|
action: {
|
|
11503
11569
|
active: '#545454',
|
|
@@ -11531,9 +11597,13 @@
|
|
|
11531
11597
|
main: colors.green,
|
|
11532
11598
|
alternative: '#E4E4E4',
|
|
11533
11599
|
excluded: '#BEBEBE',
|
|
11600
|
+
selectedExcluded: '#BEBEBE',
|
|
11601
|
+
possible: colors.grey100,
|
|
11534
11602
|
mainContrastText: colors.grey100,
|
|
11535
11603
|
alternativeContrastText: colors.grey25,
|
|
11536
|
-
excludedContrastText: colors.grey25
|
|
11604
|
+
excludedContrastText: colors.grey25,
|
|
11605
|
+
selectedExcludedContrastText: colors.grey100,
|
|
11606
|
+
possibleContrastText: colors.grey0
|
|
11537
11607
|
},
|
|
11538
11608
|
btn: {
|
|
11539
11609
|
normal: 'rgba(255, 255, 255, 0.6)',
|
|
@@ -11561,7 +11631,9 @@
|
|
|
11561
11631
|
text: {
|
|
11562
11632
|
primary: colors.grey100,
|
|
11563
11633
|
secondary: 'rgba(255, 255, 255, 0.6)',
|
|
11564
|
-
disabled: 'rgba(255, 255, 255, 0.3)'
|
|
11634
|
+
disabled: 'rgba(255, 255, 255, 0.3)',
|
|
11635
|
+
light: colors.grey100,
|
|
11636
|
+
dark: colors.grey0
|
|
11565
11637
|
},
|
|
11566
11638
|
action: {
|
|
11567
11639
|
// active: 'rgba(0, 0, 0, 0.55)',
|
|
@@ -11592,9 +11664,13 @@
|
|
|
11592
11664
|
main: colors.green,
|
|
11593
11665
|
alternative: colors.grey20,
|
|
11594
11666
|
excluded: colors.grey10,
|
|
11667
|
+
selectedExcluded: colors.grey10,
|
|
11668
|
+
possible: colors.grey80,
|
|
11595
11669
|
mainContrastText: colors.grey100,
|
|
11596
11670
|
alternativeContrastText: colors.grey100,
|
|
11597
|
-
excludedContrastText: colors.grey100
|
|
11671
|
+
excludedContrastText: colors.grey100,
|
|
11672
|
+
selectedExcludedContrastText: colors.grey100,
|
|
11673
|
+
possibleContrastText: colors.grey0
|
|
11598
11674
|
},
|
|
11599
11675
|
btn: {
|
|
11600
11676
|
normal: 'rgba(255, 255, 255, 0.15)',
|
|
@@ -11742,7 +11818,7 @@
|
|
|
11742
11818
|
return cache[key];
|
|
11743
11819
|
}
|
|
11744
11820
|
|
|
11745
|
-
const NEBULA_VERSION_HASH = "
|
|
11821
|
+
const NEBULA_VERSION_HASH = "2504" ;
|
|
11746
11822
|
ClassNameGenerator$1.configure(componentName => {
|
|
11747
11823
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
11748
11824
|
});
|
|
@@ -12003,7 +12079,7 @@
|
|
|
12003
12079
|
const appRef = React.createRef();
|
|
12004
12080
|
const element = document.createElement('div');
|
|
12005
12081
|
element.style.display = 'none';
|
|
12006
|
-
element.setAttribute('data-nebulajs-version', "4.
|
|
12082
|
+
element.setAttribute('data-nebulajs-version', "4.6.1" );
|
|
12007
12083
|
element.setAttribute('data-app-id', app.id);
|
|
12008
12084
|
document.body.appendChild(element);
|
|
12009
12085
|
if (context) {
|
|
@@ -12071,6 +12147,246 @@
|
|
|
12071
12147
|
}, appRef, rendered];
|
|
12072
12148
|
}
|
|
12073
12149
|
|
|
12150
|
+
const pink = {
|
|
12151
|
+
50: '#fce4ec',
|
|
12152
|
+
100: '#f8bbd0',
|
|
12153
|
+
200: '#f48fb1',
|
|
12154
|
+
300: '#f06292',
|
|
12155
|
+
400: '#ec407a',
|
|
12156
|
+
500: '#e91e63',
|
|
12157
|
+
600: '#d81b60',
|
|
12158
|
+
700: '#c2185b',
|
|
12159
|
+
800: '#ad1457',
|
|
12160
|
+
900: '#880e4f',
|
|
12161
|
+
A100: '#ff80ab',
|
|
12162
|
+
A200: '#ff4081',
|
|
12163
|
+
A400: '#f50057',
|
|
12164
|
+
A700: '#c51162'
|
|
12165
|
+
};
|
|
12166
|
+
var pink$1 = pink;
|
|
12167
|
+
|
|
12168
|
+
const deepPurple = {
|
|
12169
|
+
50: '#ede7f6',
|
|
12170
|
+
100: '#d1c4e9',
|
|
12171
|
+
200: '#b39ddb',
|
|
12172
|
+
300: '#9575cd',
|
|
12173
|
+
400: '#7e57c2',
|
|
12174
|
+
500: '#673ab7',
|
|
12175
|
+
600: '#5e35b1',
|
|
12176
|
+
700: '#512da8',
|
|
12177
|
+
800: '#4527a0',
|
|
12178
|
+
900: '#311b92',
|
|
12179
|
+
A100: '#b388ff',
|
|
12180
|
+
A200: '#7c4dff',
|
|
12181
|
+
A400: '#651fff',
|
|
12182
|
+
A700: '#6200ea'
|
|
12183
|
+
};
|
|
12184
|
+
var deepPurple$1 = deepPurple;
|
|
12185
|
+
|
|
12186
|
+
const indigo = {
|
|
12187
|
+
50: '#e8eaf6',
|
|
12188
|
+
100: '#c5cae9',
|
|
12189
|
+
200: '#9fa8da',
|
|
12190
|
+
300: '#7986cb',
|
|
12191
|
+
400: '#5c6bc0',
|
|
12192
|
+
500: '#3f51b5',
|
|
12193
|
+
600: '#3949ab',
|
|
12194
|
+
700: '#303f9f',
|
|
12195
|
+
800: '#283593',
|
|
12196
|
+
900: '#1a237e',
|
|
12197
|
+
A100: '#8c9eff',
|
|
12198
|
+
A200: '#536dfe',
|
|
12199
|
+
A400: '#3d5afe',
|
|
12200
|
+
A700: '#304ffe'
|
|
12201
|
+
};
|
|
12202
|
+
var indigo$1 = indigo;
|
|
12203
|
+
|
|
12204
|
+
const cyan = {
|
|
12205
|
+
50: '#e0f7fa',
|
|
12206
|
+
100: '#b2ebf2',
|
|
12207
|
+
200: '#80deea',
|
|
12208
|
+
300: '#4dd0e1',
|
|
12209
|
+
400: '#26c6da',
|
|
12210
|
+
500: '#00bcd4',
|
|
12211
|
+
600: '#00acc1',
|
|
12212
|
+
700: '#0097a7',
|
|
12213
|
+
800: '#00838f',
|
|
12214
|
+
900: '#006064',
|
|
12215
|
+
A100: '#84ffff',
|
|
12216
|
+
A200: '#18ffff',
|
|
12217
|
+
A400: '#00e5ff',
|
|
12218
|
+
A700: '#00b8d4'
|
|
12219
|
+
};
|
|
12220
|
+
var cyan$1 = cyan;
|
|
12221
|
+
|
|
12222
|
+
const teal = {
|
|
12223
|
+
50: '#e0f2f1',
|
|
12224
|
+
100: '#b2dfdb',
|
|
12225
|
+
200: '#80cbc4',
|
|
12226
|
+
300: '#4db6ac',
|
|
12227
|
+
400: '#26a69a',
|
|
12228
|
+
500: '#009688',
|
|
12229
|
+
600: '#00897b',
|
|
12230
|
+
700: '#00796b',
|
|
12231
|
+
800: '#00695c',
|
|
12232
|
+
900: '#004d40',
|
|
12233
|
+
A100: '#a7ffeb',
|
|
12234
|
+
A200: '#64ffda',
|
|
12235
|
+
A400: '#1de9b6',
|
|
12236
|
+
A700: '#00bfa5'
|
|
12237
|
+
};
|
|
12238
|
+
var teal$1 = teal;
|
|
12239
|
+
|
|
12240
|
+
const lightGreen = {
|
|
12241
|
+
50: '#f1f8e9',
|
|
12242
|
+
100: '#dcedc8',
|
|
12243
|
+
200: '#c5e1a5',
|
|
12244
|
+
300: '#aed581',
|
|
12245
|
+
400: '#9ccc65',
|
|
12246
|
+
500: '#8bc34a',
|
|
12247
|
+
600: '#7cb342',
|
|
12248
|
+
700: '#689f38',
|
|
12249
|
+
800: '#558b2f',
|
|
12250
|
+
900: '#33691e',
|
|
12251
|
+
A100: '#ccff90',
|
|
12252
|
+
A200: '#b2ff59',
|
|
12253
|
+
A400: '#76ff03',
|
|
12254
|
+
A700: '#64dd17'
|
|
12255
|
+
};
|
|
12256
|
+
var lightGreen$1 = lightGreen;
|
|
12257
|
+
|
|
12258
|
+
const lime = {
|
|
12259
|
+
50: '#f9fbe7',
|
|
12260
|
+
100: '#f0f4c3',
|
|
12261
|
+
200: '#e6ee9c',
|
|
12262
|
+
300: '#dce775',
|
|
12263
|
+
400: '#d4e157',
|
|
12264
|
+
500: '#cddc39',
|
|
12265
|
+
600: '#c0ca33',
|
|
12266
|
+
700: '#afb42b',
|
|
12267
|
+
800: '#9e9d24',
|
|
12268
|
+
900: '#827717',
|
|
12269
|
+
A100: '#f4ff81',
|
|
12270
|
+
A200: '#eeff41',
|
|
12271
|
+
A400: '#c6ff00',
|
|
12272
|
+
A700: '#aeea00'
|
|
12273
|
+
};
|
|
12274
|
+
var lime$1 = lime;
|
|
12275
|
+
|
|
12276
|
+
const yellow = {
|
|
12277
|
+
50: '#fffde7',
|
|
12278
|
+
100: '#fff9c4',
|
|
12279
|
+
200: '#fff59d',
|
|
12280
|
+
300: '#fff176',
|
|
12281
|
+
400: '#ffee58',
|
|
12282
|
+
500: '#ffeb3b',
|
|
12283
|
+
600: '#fdd835',
|
|
12284
|
+
700: '#fbc02d',
|
|
12285
|
+
800: '#f9a825',
|
|
12286
|
+
900: '#f57f17',
|
|
12287
|
+
A100: '#ffff8d',
|
|
12288
|
+
A200: '#ffff00',
|
|
12289
|
+
A400: '#ffea00',
|
|
12290
|
+
A700: '#ffd600'
|
|
12291
|
+
};
|
|
12292
|
+
var yellow$1 = yellow;
|
|
12293
|
+
|
|
12294
|
+
const amber = {
|
|
12295
|
+
50: '#fff8e1',
|
|
12296
|
+
100: '#ffecb3',
|
|
12297
|
+
200: '#ffe082',
|
|
12298
|
+
300: '#ffd54f',
|
|
12299
|
+
400: '#ffca28',
|
|
12300
|
+
500: '#ffc107',
|
|
12301
|
+
600: '#ffb300',
|
|
12302
|
+
700: '#ffa000',
|
|
12303
|
+
800: '#ff8f00',
|
|
12304
|
+
900: '#ff6f00',
|
|
12305
|
+
A100: '#ffe57f',
|
|
12306
|
+
A200: '#ffd740',
|
|
12307
|
+
A400: '#ffc400',
|
|
12308
|
+
A700: '#ffab00'
|
|
12309
|
+
};
|
|
12310
|
+
var amber$1 = amber;
|
|
12311
|
+
|
|
12312
|
+
const deepOrange = {
|
|
12313
|
+
50: '#fbe9e7',
|
|
12314
|
+
100: '#ffccbc',
|
|
12315
|
+
200: '#ffab91',
|
|
12316
|
+
300: '#ff8a65',
|
|
12317
|
+
400: '#ff7043',
|
|
12318
|
+
500: '#ff5722',
|
|
12319
|
+
600: '#f4511e',
|
|
12320
|
+
700: '#e64a19',
|
|
12321
|
+
800: '#d84315',
|
|
12322
|
+
900: '#bf360c',
|
|
12323
|
+
A100: '#ff9e80',
|
|
12324
|
+
A200: '#ff6e40',
|
|
12325
|
+
A400: '#ff3d00',
|
|
12326
|
+
A700: '#dd2c00'
|
|
12327
|
+
};
|
|
12328
|
+
var deepOrange$1 = deepOrange;
|
|
12329
|
+
|
|
12330
|
+
const brown = {
|
|
12331
|
+
50: '#efebe9',
|
|
12332
|
+
100: '#d7ccc8',
|
|
12333
|
+
200: '#bcaaa4',
|
|
12334
|
+
300: '#a1887f',
|
|
12335
|
+
400: '#8d6e63',
|
|
12336
|
+
500: '#795548',
|
|
12337
|
+
600: '#6d4c41',
|
|
12338
|
+
700: '#5d4037',
|
|
12339
|
+
800: '#4e342e',
|
|
12340
|
+
900: '#3e2723',
|
|
12341
|
+
A100: '#d7ccc8',
|
|
12342
|
+
A200: '#bcaaa4',
|
|
12343
|
+
A400: '#8d6e63',
|
|
12344
|
+
A700: '#5d4037'
|
|
12345
|
+
};
|
|
12346
|
+
var brown$1 = brown;
|
|
12347
|
+
|
|
12348
|
+
const blueGrey = {
|
|
12349
|
+
50: '#eceff1',
|
|
12350
|
+
100: '#cfd8dc',
|
|
12351
|
+
200: '#b0bec5',
|
|
12352
|
+
300: '#90a4ae',
|
|
12353
|
+
400: '#78909c',
|
|
12354
|
+
500: '#607d8b',
|
|
12355
|
+
600: '#546e7a',
|
|
12356
|
+
700: '#455a64',
|
|
12357
|
+
800: '#37474f',
|
|
12358
|
+
900: '#263238',
|
|
12359
|
+
A100: '#cfd8dc',
|
|
12360
|
+
A200: '#b0bec5',
|
|
12361
|
+
A400: '#78909c',
|
|
12362
|
+
A700: '#455a64'
|
|
12363
|
+
};
|
|
12364
|
+
var blueGrey$1 = blueGrey;
|
|
12365
|
+
|
|
12366
|
+
var namedColors = /*#__PURE__*/Object.freeze({
|
|
12367
|
+
__proto__: null,
|
|
12368
|
+
amber: amber$1,
|
|
12369
|
+
blue: blue$1,
|
|
12370
|
+
blueGrey: blueGrey$1,
|
|
12371
|
+
brown: brown$1,
|
|
12372
|
+
common: common$1,
|
|
12373
|
+
cyan: cyan$1,
|
|
12374
|
+
deepOrange: deepOrange$1,
|
|
12375
|
+
deepPurple: deepPurple$1,
|
|
12376
|
+
green: green$1,
|
|
12377
|
+
grey: grey$1,
|
|
12378
|
+
indigo: indigo$1,
|
|
12379
|
+
lightBlue: lightBlue$1,
|
|
12380
|
+
lightGreen: lightGreen$1,
|
|
12381
|
+
lime: lime$1,
|
|
12382
|
+
orange: orange$1,
|
|
12383
|
+
pink: pink$1,
|
|
12384
|
+
purple: purple$1,
|
|
12385
|
+
red: red$1,
|
|
12386
|
+
teal: teal$1,
|
|
12387
|
+
yellow: yellow$1
|
|
12388
|
+
});
|
|
12389
|
+
|
|
12074
12390
|
function getSvgIconUtilityClass(slot) {
|
|
12075
12391
|
return generateUtilityClass('MuiSvgIcon', slot);
|
|
12076
12392
|
}
|
|
@@ -17020,7 +17336,7 @@
|
|
|
17020
17336
|
color: (theme.vars || theme).palette.text.secondary
|
|
17021
17337
|
}, !ownerState.disableRipple && {
|
|
17022
17338
|
'&:hover': {
|
|
17023
|
-
backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette.
|
|
17339
|
+
backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
17024
17340
|
// Reset on touch devices, it doesn't add specificity
|
|
17025
17341
|
'@media (hover: none)': {
|
|
17026
17342
|
backgroundColor: 'transparent'
|
|
@@ -20819,10 +21135,6 @@
|
|
|
20819
21135
|
const [modelStore] = useModelStore();
|
|
20820
21136
|
const [rpcRequestSessionModelStore] = useRpcRequestSessionModelStore();
|
|
20821
21137
|
const [model, setModel] = reactExports.useState();
|
|
20822
|
-
let rpcShared;
|
|
20823
|
-
if (key) {
|
|
20824
|
-
rpcShared = rpcRequestSessionModelStore.get(key);
|
|
20825
|
-
}
|
|
20826
21138
|
for (var _len = arguments.length, deps = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
20827
21139
|
deps[_key - 2] = arguments[_key];
|
|
20828
21140
|
}
|
|
@@ -20832,9 +21144,9 @@
|
|
|
20832
21144
|
}
|
|
20833
21145
|
// Create new session object
|
|
20834
21146
|
const create = async () => {
|
|
21147
|
+
let rpcShared = rpcRequestSessionModelStore.get(key);
|
|
20835
21148
|
if (!rpcShared) {
|
|
20836
|
-
|
|
20837
|
-
rpcShared = rpc;
|
|
21149
|
+
rpcShared = app.createSessionObject(definition);
|
|
20838
21150
|
rpcRequestSessionModelStore.set(key, rpcShared);
|
|
20839
21151
|
}
|
|
20840
21152
|
const newModel = await rpcShared;
|
|
@@ -21947,17 +22259,30 @@
|
|
|
21947
22259
|
};
|
|
21948
22260
|
const getSelectedStyle = _ref3 => {
|
|
21949
22261
|
let {
|
|
21950
|
-
theme
|
|
22262
|
+
theme,
|
|
22263
|
+
styles,
|
|
22264
|
+
selectedState
|
|
21951
22265
|
} = _ref3;
|
|
22266
|
+
const selectionStyles = styles.selections;
|
|
22267
|
+
const backgroundColor = selectionStyles[selectedState];
|
|
22268
|
+
const contrastTextColor = selectionStyles["".concat(selectedState, "Contrast")];
|
|
21952
22269
|
return {
|
|
21953
|
-
background:
|
|
21954
|
-
color:
|
|
22270
|
+
background: backgroundColor,
|
|
22271
|
+
color: contrastTextColor,
|
|
21955
22272
|
'&:focus': {
|
|
21956
22273
|
boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder),
|
|
21957
22274
|
outline: 'none'
|
|
21958
22275
|
},
|
|
21959
22276
|
'& $cell': {
|
|
21960
22277
|
paddingRight: 0
|
|
22278
|
+
},
|
|
22279
|
+
// Override default label text style for selection states
|
|
22280
|
+
// when contrasting text is needed.
|
|
22281
|
+
["& .".concat(rowColClasses.labelText)]: {
|
|
22282
|
+
color: contrastTextColor
|
|
22283
|
+
},
|
|
22284
|
+
["& .".concat(rowColClasses.icon)]: {
|
|
22285
|
+
color: contrastTextColor
|
|
21961
22286
|
}
|
|
21962
22287
|
};
|
|
21963
22288
|
};
|
|
@@ -21970,9 +22295,8 @@
|
|
|
21970
22295
|
const iconWidth = 24; // tick and lock icon width in px
|
|
21971
22296
|
|
|
21972
22297
|
const RowColRoot = styled$1('div', {
|
|
21973
|
-
shouldForwardProp: prop => !['checkboxes', 'isGridMode', 'isGridCol', 'dense', 'direction', 'sizes', 'frequencyMode', 'freqHitsValue'].includes(prop)
|
|
22298
|
+
shouldForwardProp: prop => !['checkboxes', 'isGridMode', 'isGridCol', 'dense', 'direction', 'sizes', 'frequencyMode', 'freqHitsValue', 'layout', 'styles'].includes(prop)
|
|
21974
22299
|
})(_ref4 => {
|
|
21975
|
-
var _theme$listBox$conten, _theme$listBox, _theme$listBox$conten2, _theme$listBox2, _theme$listBox3, _theme$listBox4;
|
|
21976
22300
|
let {
|
|
21977
22301
|
theme,
|
|
21978
22302
|
checkboxes,
|
|
@@ -21982,8 +22306,21 @@
|
|
|
21982
22306
|
direction,
|
|
21983
22307
|
sizes,
|
|
21984
22308
|
frequencyMode,
|
|
21985
|
-
freqHitsValue
|
|
22309
|
+
freqHitsValue,
|
|
22310
|
+
styles
|
|
21986
22311
|
} = _ref4;
|
|
22312
|
+
const rowFontColor = styles.content.color;
|
|
22313
|
+
const rowBackgroundColor = styles.content.backgroundColor;
|
|
22314
|
+
const selectStyle = getSelectedStyle({
|
|
22315
|
+
theme,
|
|
22316
|
+
styles,
|
|
22317
|
+
selectedState: 'selected'
|
|
22318
|
+
});
|
|
22319
|
+
const excludedSelectStyle = getSelectedStyle({
|
|
22320
|
+
theme,
|
|
22321
|
+
styles,
|
|
22322
|
+
selectedState: 'excluded'
|
|
22323
|
+
});
|
|
21987
22324
|
return {
|
|
21988
22325
|
'&:focus': {
|
|
21989
22326
|
boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
|
|
@@ -22001,7 +22338,8 @@
|
|
|
22001
22338
|
},
|
|
22002
22339
|
["& .".concat(rowColClasses.row)]: {
|
|
22003
22340
|
flexWrap: 'nowrap',
|
|
22004
|
-
color:
|
|
22341
|
+
color: rowFontColor,
|
|
22342
|
+
backgroundColor: rowBackgroundColor
|
|
22005
22343
|
},
|
|
22006
22344
|
["& .".concat(rowColClasses.rowBorderBottom)]: {
|
|
22007
22345
|
borderBottom: isGridCol ? 'none' : "1px solid ".concat(theme.palette.divider),
|
|
@@ -22010,10 +22348,11 @@
|
|
|
22010
22348
|
["& .".concat(rowColClasses.column)]: {
|
|
22011
22349
|
flexWrap: 'nowrap',
|
|
22012
22350
|
borderRight: "1px solid ".concat(theme.palette.divider),
|
|
22013
|
-
color:
|
|
22351
|
+
color: rowFontColor
|
|
22014
22352
|
},
|
|
22015
22353
|
// The interior wrapper for all field content.
|
|
22016
22354
|
["& .".concat(rowColClasses.cell)]: {
|
|
22355
|
+
zIndex: 2,
|
|
22017
22356
|
display: 'flex',
|
|
22018
22357
|
alignItems: 'center',
|
|
22019
22358
|
flexGrow: 1,
|
|
@@ -22030,8 +22369,9 @@
|
|
|
22030
22369
|
userSelect: 'none',
|
|
22031
22370
|
paddingRight: '1px'
|
|
22032
22371
|
}, ellipsis), {}, {
|
|
22033
|
-
fontSize:
|
|
22034
|
-
fontFamily:
|
|
22372
|
+
fontSize: styles.content.fontSize,
|
|
22373
|
+
fontFamily: styles.content.fontFamily,
|
|
22374
|
+
color: rowFontColor
|
|
22035
22375
|
}),
|
|
22036
22376
|
["& .".concat(rowColClasses.labelDense)]: {
|
|
22037
22377
|
fontSize: 12
|
|
@@ -22065,32 +22405,32 @@
|
|
|
22065
22405
|
justifyContent: 'center',
|
|
22066
22406
|
width: iconWidth,
|
|
22067
22407
|
minWidth: iconWidth,
|
|
22068
|
-
maxWidth: iconWidth
|
|
22408
|
+
maxWidth: iconWidth,
|
|
22409
|
+
color: rowFontColor
|
|
22069
22410
|
},
|
|
22070
|
-
// Selection styles (S=Selected, XS=ExcludedSelected, A=
|
|
22071
|
-
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({},
|
|
22072
|
-
theme
|
|
22073
|
-
})), {}, {
|
|
22411
|
+
// Selection styles (S=Selected, XS=ExcludedSelected, A=Alternative, X=Excluded).
|
|
22412
|
+
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, selectStyle), {}, {
|
|
22074
22413
|
border: isGridMode ? 'none' : undefined
|
|
22075
22414
|
}),
|
|
22076
22415
|
["& .".concat(rowColClasses.XS)]: _objectSpread2(_objectSpread2({}, getSelectedStyle({
|
|
22077
|
-
theme
|
|
22416
|
+
theme,
|
|
22417
|
+
styles,
|
|
22418
|
+
selectedState: 'selectedExcluded'
|
|
22078
22419
|
})), {}, {
|
|
22079
|
-
background: theme.palette.selected.excluded,
|
|
22080
|
-
color: theme.palette.selected.excludedContrastText,
|
|
22081
22420
|
border: isGridMode ? 'none' : undefined
|
|
22082
22421
|
}),
|
|
22083
|
-
["& .".concat(rowColClasses.A)]: {
|
|
22084
|
-
|
|
22085
|
-
|
|
22422
|
+
["& .".concat(rowColClasses.A)]: _objectSpread2(_objectSpread2({}, getSelectedStyle({
|
|
22423
|
+
theme,
|
|
22424
|
+
styles,
|
|
22425
|
+
selectedState: 'alternative'
|
|
22426
|
+
})), {}, {
|
|
22086
22427
|
border: isGridMode ? 'none' : undefined
|
|
22087
|
-
},
|
|
22088
|
-
["& .".concat(rowColClasses.X)]: {
|
|
22089
|
-
background: theme.palette.selected.excluded,
|
|
22090
|
-
color: theme.palette.selected.excludedContrastText,
|
|
22428
|
+
}),
|
|
22429
|
+
["& .".concat(rowColClasses.X)]: _objectSpread2(_objectSpread2({}, excludedSelectStyle), {}, {
|
|
22091
22430
|
border: isGridMode ? 'none' : undefined
|
|
22092
|
-
},
|
|
22431
|
+
}),
|
|
22093
22432
|
["& .".concat(rowColClasses.frequencyCount)]: _objectSpread2(_objectSpread2({
|
|
22433
|
+
zIndex: 3,
|
|
22094
22434
|
justifyContent: 'flex-end'
|
|
22095
22435
|
}, ellipsis), {}, {
|
|
22096
22436
|
flex: "0 0 ".concat(getFreqFlexBasis({
|
|
@@ -22118,7 +22458,7 @@
|
|
|
22118
22458
|
["& .".concat(rowColClasses.bar)]: {
|
|
22119
22459
|
height: dense ? '16px' : '20px',
|
|
22120
22460
|
position: 'absolute',
|
|
22121
|
-
zIndex:
|
|
22461
|
+
zIndex: 1,
|
|
22122
22462
|
alignSelf: 'center',
|
|
22123
22463
|
left: barPadPx,
|
|
22124
22464
|
width: "calc(100% - ".concat(barPadPx * 2, "px)"),
|
|
@@ -22133,7 +22473,6 @@
|
|
|
22133
22473
|
}
|
|
22134
22474
|
},
|
|
22135
22475
|
["& .".concat(rowColClasses.barSelected)]: {
|
|
22136
|
-
zIndex: '0',
|
|
22137
22476
|
'& .bar-filled': {
|
|
22138
22477
|
opacity: '30%',
|
|
22139
22478
|
background: theme.palette.background.lighter
|
|
@@ -22145,8 +22484,9 @@
|
|
|
22145
22484
|
},
|
|
22146
22485
|
["& .".concat(rowColClasses.barSelectedWithCheckbox)]: {
|
|
22147
22486
|
'& .bar-filled': {
|
|
22148
|
-
|
|
22149
|
-
|
|
22487
|
+
opacity: '30%',
|
|
22488
|
+
background: selectStyle.background || '#BFE5D0',
|
|
22489
|
+
borderColor: selectStyle.background || '#BFE5D0'
|
|
22150
22490
|
}
|
|
22151
22491
|
},
|
|
22152
22492
|
["& .".concat(rowColClasses.excludedTextWithCheckbox)]: {
|
|
@@ -22169,9 +22509,12 @@
|
|
|
22169
22509
|
checkbox: "".concat(PREFIX$b, "-checkbox"),
|
|
22170
22510
|
dense: "".concat(PREFIX$b, "-dense")
|
|
22171
22511
|
};
|
|
22172
|
-
const StyledCheckbox = styled$1(Checkbox$1
|
|
22512
|
+
const StyledCheckbox = styled$1(Checkbox$1, {
|
|
22513
|
+
shouldForwardProp: p => p !== 'styles'
|
|
22514
|
+
})(_ref => {
|
|
22173
22515
|
let {
|
|
22174
|
-
theme
|
|
22516
|
+
theme,
|
|
22517
|
+
styles
|
|
22175
22518
|
} = _ref;
|
|
22176
22519
|
return {
|
|
22177
22520
|
["& .".concat(classes$b.cbIcon)]: {
|
|
@@ -22187,7 +22530,7 @@
|
|
|
22187
22530
|
},
|
|
22188
22531
|
["& .".concat(classes$b.cbIconChecked)]: {
|
|
22189
22532
|
borderRadius,
|
|
22190
|
-
backgroundColor:
|
|
22533
|
+
backgroundColor: styles.selections.selected,
|
|
22191
22534
|
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
|
22192
22535
|
'&:before': {
|
|
22193
22536
|
display: 'block',
|
|
@@ -22236,6 +22579,7 @@
|
|
|
22236
22579
|
label,
|
|
22237
22580
|
dense,
|
|
22238
22581
|
excluded,
|
|
22582
|
+
styles,
|
|
22239
22583
|
showGray = true,
|
|
22240
22584
|
dataN
|
|
22241
22585
|
} = _ref2;
|
|
@@ -22253,7 +22597,8 @@
|
|
|
22253
22597
|
icon: getIcon(classes$b, showGray, excluded),
|
|
22254
22598
|
checkedIcon: /*#__PURE__*/React.createElement("span", {
|
|
22255
22599
|
className: classes$b.cbIconChecked
|
|
22256
|
-
})
|
|
22600
|
+
}),
|
|
22601
|
+
styles: styles
|
|
22257
22602
|
});
|
|
22258
22603
|
}
|
|
22259
22604
|
|
|
@@ -22305,7 +22650,6 @@
|
|
|
22305
22650
|
function ValueField(_ref) {
|
|
22306
22651
|
let {
|
|
22307
22652
|
label,
|
|
22308
|
-
color,
|
|
22309
22653
|
dense,
|
|
22310
22654
|
showGray = true,
|
|
22311
22655
|
checkboxes,
|
|
@@ -22319,7 +22663,6 @@
|
|
|
22319
22663
|
cell,
|
|
22320
22664
|
checkboxes
|
|
22321
22665
|
}) && rowColClasses.excludedTextWithCheckbox]),
|
|
22322
|
-
color: color,
|
|
22323
22666
|
align: valueTextAlign,
|
|
22324
22667
|
dir: "auto"
|
|
22325
22668
|
}, /*#__PURE__*/React.createElement("span", null, label));
|
|
@@ -22353,7 +22696,6 @@
|
|
|
22353
22696
|
let {
|
|
22354
22697
|
onChange,
|
|
22355
22698
|
label,
|
|
22356
|
-
color,
|
|
22357
22699
|
qElemNumber,
|
|
22358
22700
|
isSelected,
|
|
22359
22701
|
dense,
|
|
@@ -22362,7 +22704,8 @@
|
|
|
22362
22704
|
showGray,
|
|
22363
22705
|
isSingleSelect,
|
|
22364
22706
|
checkboxes,
|
|
22365
|
-
valueTextAlign
|
|
22707
|
+
valueTextAlign,
|
|
22708
|
+
styles
|
|
22366
22709
|
} = _ref;
|
|
22367
22710
|
const cb = /*#__PURE__*/React.createElement(ListboxCheckbox, {
|
|
22368
22711
|
onChange: onChange,
|
|
@@ -22372,7 +22715,8 @@
|
|
|
22372
22715
|
excluded: isExcluded(cell),
|
|
22373
22716
|
isGridCol: isGridCol,
|
|
22374
22717
|
showGray: showGray,
|
|
22375
|
-
dataN: qElemNumber
|
|
22718
|
+
dataN: qElemNumber,
|
|
22719
|
+
styles: styles
|
|
22376
22720
|
});
|
|
22377
22721
|
const rb = /*#__PURE__*/React.createElement(ListBoxRadioButton, {
|
|
22378
22722
|
onChange: onChange,
|
|
@@ -22382,12 +22726,10 @@
|
|
|
22382
22726
|
dataN: qElemNumber
|
|
22383
22727
|
});
|
|
22384
22728
|
return /*#__PURE__*/React.createElement(FormControlLabel$1, {
|
|
22385
|
-
color: color,
|
|
22386
22729
|
control: isSingleSelect ? rb : cb,
|
|
22387
22730
|
className: rowColClasses.checkboxLabel,
|
|
22388
22731
|
label: /*#__PURE__*/React.createElement(LabelTag, {
|
|
22389
22732
|
label: label,
|
|
22390
|
-
color: color,
|
|
22391
22733
|
dense: dense,
|
|
22392
22734
|
showGray: showGray,
|
|
22393
22735
|
checkboxes: checkboxes,
|
|
@@ -22426,13 +22768,13 @@
|
|
|
22426
22768
|
checkboxes,
|
|
22427
22769
|
dense,
|
|
22428
22770
|
showGray,
|
|
22429
|
-
color,
|
|
22430
22771
|
qElemNumber,
|
|
22431
22772
|
isSelected,
|
|
22432
22773
|
cell,
|
|
22433
22774
|
isGridCol,
|
|
22434
22775
|
isSingleSelect,
|
|
22435
|
-
valueTextAlign
|
|
22776
|
+
valueTextAlign,
|
|
22777
|
+
styles
|
|
22436
22778
|
} = _ref3;
|
|
22437
22779
|
const LWR = /*#__PURE__*/React.createElement(LabelsWithRanges, {
|
|
22438
22780
|
labels: labels,
|
|
@@ -22443,7 +22785,6 @@
|
|
|
22443
22785
|
return checkboxes ? /*#__PURE__*/React.createElement(CheckboxField, {
|
|
22444
22786
|
onChange: onChange,
|
|
22445
22787
|
label: LWR,
|
|
22446
|
-
color: color,
|
|
22447
22788
|
qElemNumber: qElemNumber,
|
|
22448
22789
|
isSelected: isSelected,
|
|
22449
22790
|
dense: dense,
|
|
@@ -22452,7 +22793,8 @@
|
|
|
22452
22793
|
showGray: showGray,
|
|
22453
22794
|
isSingleSelect: isSingleSelect,
|
|
22454
22795
|
checkboxes: checkboxes,
|
|
22455
|
-
valueTextAlign: valueTextAlign
|
|
22796
|
+
valueTextAlign: valueTextAlign,
|
|
22797
|
+
styles: styles
|
|
22456
22798
|
}) : LWR;
|
|
22457
22799
|
}
|
|
22458
22800
|
|
|
@@ -22460,7 +22802,6 @@
|
|
|
22460
22802
|
let {
|
|
22461
22803
|
onChange,
|
|
22462
22804
|
label,
|
|
22463
|
-
color,
|
|
22464
22805
|
qElemNumber,
|
|
22465
22806
|
isSelected,
|
|
22466
22807
|
dense,
|
|
@@ -22469,12 +22810,12 @@
|
|
|
22469
22810
|
showGray,
|
|
22470
22811
|
isSingleSelect,
|
|
22471
22812
|
checkboxes,
|
|
22472
|
-
valueTextAlign
|
|
22813
|
+
valueTextAlign,
|
|
22814
|
+
styles
|
|
22473
22815
|
} = _ref;
|
|
22474
22816
|
return checkboxes ? /*#__PURE__*/React.createElement(CheckboxField, {
|
|
22475
22817
|
onChange: onChange,
|
|
22476
22818
|
label: label,
|
|
22477
|
-
color: color,
|
|
22478
22819
|
qElemNumber: qElemNumber,
|
|
22479
22820
|
isSelected: isSelected,
|
|
22480
22821
|
dense: dense,
|
|
@@ -22483,10 +22824,10 @@
|
|
|
22483
22824
|
showGray: showGray,
|
|
22484
22825
|
isSingleSelect: isSingleSelect,
|
|
22485
22826
|
checkboxes: checkboxes,
|
|
22486
|
-
valueTextAlign: valueTextAlign
|
|
22827
|
+
valueTextAlign: valueTextAlign,
|
|
22828
|
+
styles: styles
|
|
22487
22829
|
}) : /*#__PURE__*/React.createElement(ValueField, {
|
|
22488
22830
|
label: label,
|
|
22489
|
-
color: color,
|
|
22490
22831
|
dense: dense,
|
|
22491
22832
|
showGray: true,
|
|
22492
22833
|
checkboxes: checkboxes,
|
|
@@ -23036,7 +23377,9 @@
|
|
|
23036
23377
|
sizes,
|
|
23037
23378
|
translator,
|
|
23038
23379
|
showSearch,
|
|
23039
|
-
isModal
|
|
23380
|
+
isModal,
|
|
23381
|
+
contentFontStyle,
|
|
23382
|
+
styles
|
|
23040
23383
|
} = data;
|
|
23041
23384
|
const {
|
|
23042
23385
|
dense = false,
|
|
@@ -23047,7 +23390,7 @@
|
|
|
23047
23390
|
itemPadding
|
|
23048
23391
|
} = sizes;
|
|
23049
23392
|
let cellIndex;
|
|
23050
|
-
let
|
|
23393
|
+
let styleOverrides;
|
|
23051
23394
|
const count = {
|
|
23052
23395
|
max: null,
|
|
23053
23396
|
currentIndex: null
|
|
@@ -23063,7 +23406,7 @@
|
|
|
23063
23406
|
count.currentIndex = columnIndex;
|
|
23064
23407
|
}
|
|
23065
23408
|
const padding = 0;
|
|
23066
|
-
|
|
23409
|
+
styleOverrides = _objectSpread2(_objectSpread2({}, style), {}, {
|
|
23067
23410
|
left: padding + (columnIndex === 0 ? style.left : Number(style.left) + columnIndex * padding),
|
|
23068
23411
|
// right: columnIndex === columnCount ? style.right : Number(style.right) + columnIndex * padding,
|
|
23069
23412
|
top: rowIndex === 0 ? style.top : Number(style.top) + rowIndex * padding
|
|
@@ -23072,7 +23415,7 @@
|
|
|
23072
23415
|
cellIndex = index;
|
|
23073
23416
|
count.max = listCount;
|
|
23074
23417
|
count.currentIndex = index;
|
|
23075
|
-
|
|
23418
|
+
styleOverrides = _objectSpread2({}, style);
|
|
23076
23419
|
}
|
|
23077
23420
|
cellIndex += dataOffset;
|
|
23078
23421
|
const [rowRef, setRowRef] = reactExports.useState(null);
|
|
@@ -23162,7 +23505,8 @@
|
|
|
23162
23505
|
return /*#__PURE__*/React.createElement(RowColRoot$1, {
|
|
23163
23506
|
className: rowColClasses.barContainer,
|
|
23164
23507
|
checkboxes: checkboxes,
|
|
23165
|
-
style:
|
|
23508
|
+
style: styleOverrides,
|
|
23509
|
+
styles: styles,
|
|
23166
23510
|
isGridCol: isGridCol,
|
|
23167
23511
|
isGridMode: dataLayout === 'grid',
|
|
23168
23512
|
dense: dense,
|
|
@@ -23170,6 +23514,7 @@
|
|
|
23170
23514
|
sizes: sizes,
|
|
23171
23515
|
frequencyMode: deducedFrequencyMode,
|
|
23172
23516
|
freqHitsValue: freqHitsValue,
|
|
23517
|
+
contentFontStyle: contentFontStyle,
|
|
23173
23518
|
"data-testid": "listbox.item"
|
|
23174
23519
|
}, /*#__PURE__*/React.createElement(ItemGrid, {
|
|
23175
23520
|
role: "row",
|
|
@@ -23216,18 +23561,16 @@
|
|
|
23216
23561
|
checkboxes: checkboxes,
|
|
23217
23562
|
dense: dense,
|
|
23218
23563
|
showGray: showGray,
|
|
23219
|
-
color: "inherit" // TODO: Check this
|
|
23220
|
-
,
|
|
23221
23564
|
qElemNumber: cell.qElemNumber,
|
|
23222
23565
|
isSelected: isSelected,
|
|
23223
23566
|
cell: cell,
|
|
23224
23567
|
isGridCol: isGridCol,
|
|
23225
23568
|
isSingleSelect: isSingleSelect,
|
|
23226
|
-
valueTextAlign: valueTextAlign
|
|
23569
|
+
valueTextAlign: valueTextAlign,
|
|
23570
|
+
styles: styles
|
|
23227
23571
|
}) : /*#__PURE__*/React.createElement(Field$1, {
|
|
23228
23572
|
onChange: onChange,
|
|
23229
23573
|
label: label,
|
|
23230
|
-
color: "inherit",
|
|
23231
23574
|
qElemNumber: cell.qElemNumber,
|
|
23232
23575
|
isSelected: isSelected,
|
|
23233
23576
|
dense: dense,
|
|
@@ -23236,7 +23579,8 @@
|
|
|
23236
23579
|
showGray: showGray,
|
|
23237
23580
|
isSingleSelect: isSingleSelect,
|
|
23238
23581
|
checkboxes: checkboxes,
|
|
23239
|
-
valueTextAlign: valueTextAlign
|
|
23582
|
+
valueTextAlign: valueTextAlign,
|
|
23583
|
+
styles: styles
|
|
23240
23584
|
})), freqIsAllowed && /*#__PURE__*/React.createElement(Frequency, {
|
|
23241
23585
|
cell: cell,
|
|
23242
23586
|
checkboxes: checkboxes,
|
|
@@ -24816,7 +25160,8 @@
|
|
|
24816
25160
|
freqIsAllowed,
|
|
24817
25161
|
translator,
|
|
24818
25162
|
showSearch,
|
|
24819
|
-
isModal
|
|
25163
|
+
isModal,
|
|
25164
|
+
styles
|
|
24820
25165
|
} = _ref;
|
|
24821
25166
|
const {
|
|
24822
25167
|
layoutOptions = {}
|
|
@@ -24870,7 +25215,8 @@
|
|
|
24870
25215
|
direction,
|
|
24871
25216
|
translator,
|
|
24872
25217
|
showSearch,
|
|
24873
|
-
isModal
|
|
25218
|
+
isModal,
|
|
25219
|
+
styles
|
|
24874
25220
|
});
|
|
24875
25221
|
const List = _ref2 => {
|
|
24876
25222
|
let {
|
|
@@ -25001,6 +25347,7 @@
|
|
|
25001
25347
|
} else {
|
|
25002
25348
|
rowCount = Math.min(listCount, maxRows, autoRowCount);
|
|
25003
25349
|
}
|
|
25350
|
+
rowCount = Math.max(rowCount, 1);
|
|
25004
25351
|
const columnCount = Math.ceil(listCount / rowCount);
|
|
25005
25352
|
const columnWidth = Math.max(columnAutoWidth, containerWidth / columnCount, itemMinWidth);
|
|
25006
25353
|
return {
|
|
@@ -25027,6 +25374,7 @@
|
|
|
25027
25374
|
} else {
|
|
25028
25375
|
columnCount = Math.min(listCount, maxColumns, autoColumnCount);
|
|
25029
25376
|
}
|
|
25377
|
+
columnCount = Math.max(columnCount, 1);
|
|
25030
25378
|
const columnWidth = innerWidth / columnCount;
|
|
25031
25379
|
const rowCount = Math.ceil(listCount / columnCount);
|
|
25032
25380
|
return {
|
|
@@ -25066,7 +25414,6 @@
|
|
|
25066
25414
|
}
|
|
25067
25415
|
|
|
25068
25416
|
function useListSizes(_ref) {
|
|
25069
|
-
var _theme$listBox;
|
|
25070
25417
|
let {
|
|
25071
25418
|
layout,
|
|
25072
25419
|
width,
|
|
@@ -25075,7 +25422,7 @@
|
|
|
25075
25422
|
count,
|
|
25076
25423
|
freqIsAllowed,
|
|
25077
25424
|
checkboxes,
|
|
25078
|
-
|
|
25425
|
+
styles
|
|
25079
25426
|
} = _ref;
|
|
25080
25427
|
const {
|
|
25081
25428
|
layoutOptions = {}
|
|
@@ -25090,7 +25437,7 @@
|
|
|
25090
25437
|
const {
|
|
25091
25438
|
fontSize = '12px',
|
|
25092
25439
|
fontFamily = 'Source sans pro'
|
|
25093
|
-
} = (
|
|
25440
|
+
} = (styles === null || styles === void 0 ? void 0 : styles.content) || {};
|
|
25094
25441
|
const font = "".concat(fontSize, " ").concat(fontFamily); // font format as supported by HTML canvas
|
|
25095
25442
|
const textWidth = useTextWidth({
|
|
25096
25443
|
text: getMeasureText(layout),
|
|
@@ -25611,7 +25958,6 @@
|
|
|
25611
25958
|
model,
|
|
25612
25959
|
app,
|
|
25613
25960
|
constraints,
|
|
25614
|
-
theme,
|
|
25615
25961
|
layout,
|
|
25616
25962
|
selections,
|
|
25617
25963
|
selectionState,
|
|
@@ -25638,7 +25984,8 @@
|
|
|
25638
25984
|
renderedCallback,
|
|
25639
25985
|
onCtrlF,
|
|
25640
25986
|
showSearch,
|
|
25641
|
-
isModal
|
|
25987
|
+
isModal,
|
|
25988
|
+
styles
|
|
25642
25989
|
} = _ref;
|
|
25643
25990
|
const {
|
|
25644
25991
|
translator: translatorDynamic
|
|
@@ -25794,7 +26141,7 @@
|
|
|
25794
26141
|
count,
|
|
25795
26142
|
freqIsAllowed,
|
|
25796
26143
|
checkboxes,
|
|
25797
|
-
|
|
26144
|
+
styles
|
|
25798
26145
|
});
|
|
25799
26146
|
if (sizes.columnWidth) {
|
|
25800
26147
|
// In grid mode, where we have a dynamic item width, get a second opinion on showing/hiding frequency.
|
|
@@ -25909,7 +26256,8 @@
|
|
|
25909
26256
|
freqIsAllowed,
|
|
25910
26257
|
translator: translatorDynamic,
|
|
25911
26258
|
showSearch,
|
|
25912
|
-
isModal
|
|
26259
|
+
isModal,
|
|
26260
|
+
styles
|
|
25913
26261
|
});
|
|
25914
26262
|
const {
|
|
25915
26263
|
columnWidth,
|
|
@@ -26285,7 +26633,7 @@
|
|
|
26285
26633
|
}), /*#__PURE__*/React.createElement(MenuList$1, {
|
|
26286
26634
|
id: "moreMenuList"
|
|
26287
26635
|
}, actions.map((item, ix) =>
|
|
26288
|
-
|
|
26636
|
+
|
|
26289
26637
|
// eslint-disable-next-line react/no-array-index-key
|
|
26290
26638
|
React.createElement(MoreItem, {
|
|
26291
26639
|
key: ix,
|
|
@@ -26604,22 +26952,24 @@
|
|
|
26604
26952
|
|
|
26605
26953
|
const TREE_PATH = '/qListObjectDef';
|
|
26606
26954
|
const WILDCARD = '**';
|
|
26607
|
-
const StyledInputAdornment = styled$1(InputAdornment$1
|
|
26608
|
-
|
|
26955
|
+
const StyledInputAdornment = styled$1(InputAdornment$1, {
|
|
26956
|
+
shouldForwardProp: p => p !== 'styles'
|
|
26957
|
+
})(_ref => {
|
|
26609
26958
|
let {
|
|
26610
|
-
|
|
26959
|
+
styles
|
|
26611
26960
|
} = _ref;
|
|
26612
26961
|
return {
|
|
26613
|
-
color:
|
|
26962
|
+
color: styles.content.color
|
|
26614
26963
|
};
|
|
26615
26964
|
});
|
|
26616
|
-
const StyledOutlinedInput = styled$1(OutlinedInput$1
|
|
26617
|
-
|
|
26965
|
+
const StyledOutlinedInput = styled$1(OutlinedInput$1, {
|
|
26966
|
+
shouldForwardProp: p => p !== 'styles'
|
|
26967
|
+
})(_ref2 => {
|
|
26618
26968
|
let {
|
|
26619
|
-
|
|
26969
|
+
styles
|
|
26620
26970
|
} = _ref2;
|
|
26621
26971
|
return {
|
|
26622
|
-
color:
|
|
26972
|
+
color: styles.content.color,
|
|
26623
26973
|
display: 'flex'
|
|
26624
26974
|
};
|
|
26625
26975
|
});
|
|
@@ -26635,7 +26985,8 @@
|
|
|
26635
26985
|
wildCardSearch = false,
|
|
26636
26986
|
searchEnabled,
|
|
26637
26987
|
direction,
|
|
26638
|
-
hide
|
|
26988
|
+
hide,
|
|
26989
|
+
styles
|
|
26639
26990
|
} = _ref3;
|
|
26640
26991
|
const {
|
|
26641
26992
|
translator
|
|
@@ -26772,8 +27123,10 @@
|
|
|
26772
27123
|
return null;
|
|
26773
27124
|
}
|
|
26774
27125
|
return /*#__PURE__*/React.createElement(StyledOutlinedInput, {
|
|
27126
|
+
styles: styles,
|
|
26775
27127
|
startAdornment: /*#__PURE__*/React.createElement(StyledInputAdornment, {
|
|
26776
|
-
position: "start"
|
|
27128
|
+
position: "start",
|
|
27129
|
+
styles: styles
|
|
26777
27130
|
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
26778
27131
|
size: dense ? 'small' : 'normal'
|
|
26779
27132
|
})),
|
|
@@ -27236,6 +27589,143 @@
|
|
|
27236
27589
|
return totalCounts > 0;
|
|
27237
27590
|
}
|
|
27238
27591
|
|
|
27592
|
+
const LIGHT = '#FFF';
|
|
27593
|
+
const DARK = '#000';
|
|
27594
|
+
const TRANSPARENT = 'rgba(255, 255, 255, 0)';
|
|
27595
|
+
|
|
27596
|
+
/**
|
|
27597
|
+
* If needed, converts a named color to a more reliable CSS color format.
|
|
27598
|
+
*
|
|
27599
|
+
* @param {string} c The CSS color.
|
|
27600
|
+
* @returns {string} Converted color or same color as before.
|
|
27601
|
+
* @private
|
|
27602
|
+
* @example
|
|
27603
|
+
* convertNamedColor('red') => '#FF0000'
|
|
27604
|
+
*/
|
|
27605
|
+
function convertNamedColor(c) {
|
|
27606
|
+
let out = c;
|
|
27607
|
+
try {
|
|
27608
|
+
if (c in namedColors) {
|
|
27609
|
+
({
|
|
27610
|
+
500: out
|
|
27611
|
+
} = namedColors[c]); // 500 exposes the standard color
|
|
27612
|
+
} else if (c === 'transparent') {
|
|
27613
|
+
out = TRANSPARENT;
|
|
27614
|
+
}
|
|
27615
|
+
} catch (err) {
|
|
27616
|
+
out = c;
|
|
27617
|
+
}
|
|
27618
|
+
return out;
|
|
27619
|
+
}
|
|
27620
|
+
const hasEnoughContrast = (desiredTextColor, backgroundColor) => {
|
|
27621
|
+
const desired = convertNamedColor(desiredTextColor);
|
|
27622
|
+
const background = convertNamedColor(backgroundColor);
|
|
27623
|
+
const CONTRAST_THRESHOLD = 3.0;
|
|
27624
|
+
let isContrastingEnough;
|
|
27625
|
+
try {
|
|
27626
|
+
isContrastingEnough = getContrastRatio(desired, background) > CONTRAST_THRESHOLD;
|
|
27627
|
+
} catch (err) {
|
|
27628
|
+
// The function throws on unsupported or misspelled colors.
|
|
27629
|
+
// In these cases, simply return true.
|
|
27630
|
+
isContrastingEnough = true;
|
|
27631
|
+
}
|
|
27632
|
+
return isContrastingEnough;
|
|
27633
|
+
};
|
|
27634
|
+
function getContrastingColor(backgroundColor) {
|
|
27635
|
+
let desiredTextColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
27636
|
+
let dark = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DARK;
|
|
27637
|
+
let light = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : LIGHT;
|
|
27638
|
+
let contrastingColor;
|
|
27639
|
+
if (desiredTextColor && hasEnoughContrast(desiredTextColor, backgroundColor)) {
|
|
27640
|
+
contrastingColor = desiredTextColor;
|
|
27641
|
+
} else {
|
|
27642
|
+
contrastingColor = hasEnoughContrast(light, backgroundColor) ? light : dark;
|
|
27643
|
+
}
|
|
27644
|
+
return contrastingColor;
|
|
27645
|
+
}
|
|
27646
|
+
const SUPPORTED_COMPONENTS = ['theme', 'selections'];
|
|
27647
|
+
function getOverridesAsObject() {
|
|
27648
|
+
let components = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
27649
|
+
// Currently supporting components "theme" and "selections".
|
|
27650
|
+
const overrides = {};
|
|
27651
|
+
components.forEach(c => {
|
|
27652
|
+
const k = c === null || c === void 0 ? void 0 : c.key;
|
|
27653
|
+
if (SUPPORTED_COMPONENTS.includes(k)) {
|
|
27654
|
+
overrides[k] = c;
|
|
27655
|
+
}
|
|
27656
|
+
});
|
|
27657
|
+
return overrides;
|
|
27658
|
+
}
|
|
27659
|
+
function getSelectionColors(theme, getListboxStyle, overrides) {
|
|
27660
|
+
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;
|
|
27661
|
+
const desiredTextColor = ((_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) || getListboxStyle('content', 'color') || ((_theme$palette = theme.palette) === null || _theme$palette === void 0 ? void 0 : _theme$palette.text.primary);
|
|
27662
|
+
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;
|
|
27663
|
+
|
|
27664
|
+
// Background colors
|
|
27665
|
+
const selectionColors = ((_overrides$selections = overrides.selections) === null || _overrides$selections === void 0 ? void 0 : _overrides$selections.colors) || {};
|
|
27666
|
+
const selected = ((_selectionColors$sele = selectionColors.selected) === null || _selectionColors$sele === void 0 ? void 0 : _selectionColors$sele.color) || ((_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 ? void 0 : _theme$palette2.selected.main) || '#009845';
|
|
27667
|
+
const alternative = ((_selectionColors$alte = selectionColors.alternative) === null || _selectionColors$alte === void 0 ? void 0 : _selectionColors$alte.color) || ((_theme$palette3 = theme.palette) === null || _theme$palette3 === void 0 ? void 0 : _theme$palette3.selected.alternative) || '#E4E4E4';
|
|
27668
|
+
const excluded = ((_selectionColors$excl = selectionColors.excluded) === null || _selectionColors$excl === void 0 ? void 0 : _selectionColors$excl.color) || ((_theme$palette4 = theme.palette) === null || _theme$palette4 === void 0 ? void 0 : _theme$palette4.selected.excluded) || '#A9A9A9';
|
|
27669
|
+
const selectedExcluded = ((_selectionColors$sele2 = selectionColors.selectedExcluded) === null || _selectionColors$sele2 === void 0 ? void 0 : _selectionColors$sele2.color) || ((_theme$palette5 = theme.palette) === null || _theme$palette5 === void 0 ? void 0 : _theme$palette5.selected.selectedExcluded) || '#A9A9A9';
|
|
27670
|
+
const possible = ((_selectionColors$poss = selectionColors.possible) === null || _selectionColors$poss === void 0 ? void 0 : _selectionColors$poss.color) || getListboxStyle('', 'backgroundColor') || ((_theme$palette6 = theme.palette) === null || _theme$palette6 === void 0 ? void 0 : _theme$palette6.selected.possible) || '#FFFFFF';
|
|
27671
|
+
|
|
27672
|
+
// Font colors
|
|
27673
|
+
let selectedContrast = desiredTextColor || ((_theme$palette7 = theme.palette) === null || _theme$palette7 === void 0 ? void 0 : _theme$palette7.selected.main);
|
|
27674
|
+
let alternativeContrast = desiredTextColor || ((_theme$palette8 = theme.palette) === null || _theme$palette8 === void 0 ? void 0 : _theme$palette8.selected.alternativeContrastText);
|
|
27675
|
+
let excludedContrast = desiredTextColor || ((_theme$palette9 = theme.palette) === null || _theme$palette9 === void 0 ? void 0 : _theme$palette9.selected.excludedContrastText);
|
|
27676
|
+
let selectedExcludedContrast = desiredTextColor || ((_theme$palette10 = theme.palette) === null || _theme$palette10 === void 0 ? void 0 : _theme$palette10.selected.selectedExcludedContrastText);
|
|
27677
|
+
let possibleContrast = desiredTextColor || ((_theme$palette11 = theme.palette) === null || _theme$palette11 === void 0 ? void 0 : _theme$palette11.selected.possibleContrastText);
|
|
27678
|
+
if (useContrastTextColor) {
|
|
27679
|
+
// Override preferred text color if it does not contrast enough with the background color.
|
|
27680
|
+
selectedContrast = getContrastingColor(selected, desiredTextColor);
|
|
27681
|
+
alternativeContrast = getContrastingColor(alternative, desiredTextColor);
|
|
27682
|
+
excludedContrast = getContrastingColor(excluded, desiredTextColor);
|
|
27683
|
+
selectedExcludedContrast = getContrastingColor(selectedExcluded, desiredTextColor);
|
|
27684
|
+
possibleContrast = getContrastingColor(possible, desiredTextColor);
|
|
27685
|
+
}
|
|
27686
|
+
return {
|
|
27687
|
+
selected,
|
|
27688
|
+
alternative,
|
|
27689
|
+
excluded,
|
|
27690
|
+
selectedExcluded,
|
|
27691
|
+
possible,
|
|
27692
|
+
selectedContrast,
|
|
27693
|
+
alternativeContrast,
|
|
27694
|
+
excludedContrast,
|
|
27695
|
+
selectedExcludedContrast,
|
|
27696
|
+
possibleContrast
|
|
27697
|
+
};
|
|
27698
|
+
}
|
|
27699
|
+
function getStyles(_ref) {
|
|
27700
|
+
var _themeOverrides$heade, _themeOverrides$heade2, _themeOverrides$conte;
|
|
27701
|
+
let {
|
|
27702
|
+
themeApi,
|
|
27703
|
+
theme,
|
|
27704
|
+
components = [],
|
|
27705
|
+
checkboxes = false
|
|
27706
|
+
} = _ref;
|
|
27707
|
+
const overrides = getOverridesAsObject(components);
|
|
27708
|
+
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
27709
|
+
const selections = getSelectionColors(theme, getListboxStyle, overrides);
|
|
27710
|
+
const themeOverrides = overrides.theme || {};
|
|
27711
|
+
return {
|
|
27712
|
+
backgroundColor: getListboxStyle('', 'backgroundColor') || theme.palette.background.default,
|
|
27713
|
+
header: {
|
|
27714
|
+
color: ((_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'),
|
|
27715
|
+
fontSize: ((_themeOverrides$heade2 = themeOverrides.header) === null || _themeOverrides$heade2 === void 0 ? void 0 : _themeOverrides$heade2.fontSize) || getListboxStyle('title.main', 'fontSize'),
|
|
27716
|
+
fontFamily: getListboxStyle('title.main', 'fontFamily'),
|
|
27717
|
+
fontWeight: getListboxStyle('title.main', 'fontWeight') || 'bold'
|
|
27718
|
+
},
|
|
27719
|
+
content: {
|
|
27720
|
+
backgroundColor: checkboxes ? undefined : selections.possible,
|
|
27721
|
+
color: selections.possibleContrast || getListboxStyle('content', 'color'),
|
|
27722
|
+
fontSize: ((_themeOverrides$conte = themeOverrides.content) === null || _themeOverrides$conte === void 0 ? void 0 : _themeOverrides$conte.fontSize) || getListboxStyle('content', 'fontSize'),
|
|
27723
|
+
fontFamily: getListboxStyle('content', 'fontFamily')
|
|
27724
|
+
},
|
|
27725
|
+
selections
|
|
27726
|
+
};
|
|
27727
|
+
}
|
|
27728
|
+
|
|
27239
27729
|
function ListBoxPopover(_ref) {
|
|
27240
27730
|
let {
|
|
27241
27731
|
alignTo,
|
|
@@ -27252,7 +27742,9 @@
|
|
|
27252
27742
|
app,
|
|
27253
27743
|
fieldName,
|
|
27254
27744
|
stateName = '$',
|
|
27255
|
-
autoFocus
|
|
27745
|
+
autoFocus,
|
|
27746
|
+
components,
|
|
27747
|
+
checkboxes: checkboxesOption
|
|
27256
27748
|
} = _ref;
|
|
27257
27749
|
const isMasterDim = Boolean(fieldName === null || fieldName === void 0 ? void 0 : fieldName.qLibraryId);
|
|
27258
27750
|
const open = show && Boolean(alignTo.current);
|
|
@@ -27291,13 +27783,23 @@
|
|
|
27291
27783
|
model.unlock('/qListObjectDef');
|
|
27292
27784
|
}, [model]);
|
|
27293
27785
|
const {
|
|
27294
|
-
translator
|
|
27786
|
+
translator,
|
|
27787
|
+
themeApi
|
|
27295
27788
|
} = reactExports.useContext(InstanceContext);
|
|
27296
27789
|
const moreAlignTo = reactExports.useRef();
|
|
27297
27790
|
const containerRef = reactExports.useRef();
|
|
27298
27791
|
const [selections] = useObjectSelections(app, model, containerRef);
|
|
27299
27792
|
const [layout] = useLayout$1(model);
|
|
27300
27793
|
const [selectionState$1] = reactExports.useState(() => selectionState());
|
|
27794
|
+
const {
|
|
27795
|
+
checkboxes = checkboxesOption
|
|
27796
|
+
} = layout || {};
|
|
27797
|
+
const styles = getStyles({
|
|
27798
|
+
themeApi,
|
|
27799
|
+
theme,
|
|
27800
|
+
components,
|
|
27801
|
+
checkboxes
|
|
27802
|
+
});
|
|
27301
27803
|
reactExports.useEffect(() => {
|
|
27302
27804
|
if (selections && open) {
|
|
27303
27805
|
if (!selections.isModal(model)) {
|
|
@@ -27394,6 +27896,7 @@
|
|
|
27394
27896
|
item: true,
|
|
27395
27897
|
ref: searchContainerRef
|
|
27396
27898
|
}, /*#__PURE__*/React.createElement(ListBoxSearch, {
|
|
27899
|
+
styles: styles,
|
|
27397
27900
|
visible: true,
|
|
27398
27901
|
model: model,
|
|
27399
27902
|
listCount: listCount,
|
|
@@ -27412,7 +27915,7 @@
|
|
|
27412
27915
|
direction: "ltr",
|
|
27413
27916
|
onSetListCount: c => setListCount(c),
|
|
27414
27917
|
onCtrlF: onCtrlF,
|
|
27415
|
-
|
|
27918
|
+
styles: styles
|
|
27416
27919
|
}))));
|
|
27417
27920
|
}
|
|
27418
27921
|
|
|
@@ -27696,7 +28199,7 @@
|
|
|
27696
28199
|
variant: "contained",
|
|
27697
28200
|
fullWidth: true
|
|
27698
28201
|
}, clearAllStates)), field.states.map((s, ix) =>
|
|
27699
|
-
|
|
28202
|
+
|
|
27700
28203
|
// eslint-disable-next-line react/no-array-index-key
|
|
27701
28204
|
React.createElement(ListItem$1, {
|
|
27702
28205
|
key: ix,
|
|
@@ -27874,7 +28377,7 @@
|
|
|
27874
28377
|
}, /*#__PURE__*/React.createElement(List$1, {
|
|
27875
28378
|
dense: true
|
|
27876
28379
|
}, items.map((s, ix) =>
|
|
27877
|
-
|
|
28380
|
+
|
|
27878
28381
|
// eslint-disable-next-line react/no-array-index-key
|
|
27879
28382
|
React.createElement(ListItem$1, {
|
|
27880
28383
|
key: ix,
|
|
@@ -28791,26 +29294,6 @@
|
|
|
28791
29294
|
};
|
|
28792
29295
|
}
|
|
28793
29296
|
|
|
28794
|
-
const addListboxTheme = themeApi => {
|
|
28795
|
-
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
28796
|
-
return {
|
|
28797
|
-
backgroundColor: getListboxStyle('', 'backgroundColor'),
|
|
28798
|
-
title: {
|
|
28799
|
-
main: {
|
|
28800
|
-
color: getListboxStyle('title.main', 'color'),
|
|
28801
|
-
fontSize: getListboxStyle('title.main', 'fontSize'),
|
|
28802
|
-
fontFamily: getListboxStyle('title.main', 'fontFamily'),
|
|
28803
|
-
fontWeight: getListboxStyle('title.main', 'fontWeight')
|
|
28804
|
-
}
|
|
28805
|
-
},
|
|
28806
|
-
content: {
|
|
28807
|
-
color: getListboxStyle('content', 'color'),
|
|
28808
|
-
fontSize: getListboxStyle('content', 'fontSize'),
|
|
28809
|
-
fontFamily: getListboxStyle('content', 'fontFamily')
|
|
28810
|
-
}
|
|
28811
|
-
};
|
|
28812
|
-
};
|
|
28813
|
-
|
|
28814
29297
|
function showToolbarDetached(_ref) {
|
|
28815
29298
|
var _titleRef$current$cli, _titleRef$current, _titleRef$current2, _titleRef$current3;
|
|
28816
29299
|
let {
|
|
@@ -28903,16 +29386,16 @@
|
|
|
28903
29386
|
listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
|
|
28904
29387
|
};
|
|
28905
29388
|
const StyledGrid$3 = styled$1(Grid$1, {
|
|
28906
|
-
shouldForwardProp: p => !['containerPadding', 'isGridMode'].includes(p)
|
|
29389
|
+
shouldForwardProp: p => !['containerPadding', 'isGridMode', 'styles'].includes(p)
|
|
28907
29390
|
})(_ref => {
|
|
28908
|
-
var _theme$listBox$backgr, _theme$listBox;
|
|
28909
29391
|
let {
|
|
28910
29392
|
theme,
|
|
28911
29393
|
containerPadding,
|
|
28912
|
-
isGridMode
|
|
29394
|
+
isGridMode,
|
|
29395
|
+
styles
|
|
28913
29396
|
} = _ref;
|
|
28914
29397
|
return {
|
|
28915
|
-
|
|
29398
|
+
background: styles.backgroundColor,
|
|
28916
29399
|
["& .".concat(classes$4.listBoxHeader)]: {
|
|
28917
29400
|
alignSelf: 'center',
|
|
28918
29401
|
display: 'flex'
|
|
@@ -28938,15 +29421,14 @@
|
|
|
28938
29421
|
};
|
|
28939
29422
|
});
|
|
28940
29423
|
const Title = styled$1(Typography$1)(_ref2 => {
|
|
28941
|
-
var _theme$listBox2, _theme$listBox3, _theme$listBox4, _theme$listBox5;
|
|
28942
29424
|
let {
|
|
28943
|
-
|
|
29425
|
+
styles
|
|
28944
29426
|
} = _ref2;
|
|
28945
29427
|
return {
|
|
28946
|
-
color:
|
|
28947
|
-
fontSize:
|
|
28948
|
-
fontFamily:
|
|
28949
|
-
fontWeight:
|
|
29428
|
+
color: styles.header.color,
|
|
29429
|
+
fontSize: styles.header.fontSize,
|
|
29430
|
+
fontFamily: styles.header.fontFamily,
|
|
29431
|
+
fontWeight: styles.header.fontWeight
|
|
28950
29432
|
};
|
|
28951
29433
|
});
|
|
28952
29434
|
const isModal = _ref3 => {
|
|
@@ -28967,7 +29449,7 @@
|
|
|
28967
29449
|
app,
|
|
28968
29450
|
direction,
|
|
28969
29451
|
frequencyMode,
|
|
28970
|
-
checkboxes,
|
|
29452
|
+
checkboxes: checkboxesOption,
|
|
28971
29453
|
search = true,
|
|
28972
29454
|
focusSearch = false,
|
|
28973
29455
|
rangeSelect = true,
|
|
@@ -28982,7 +29464,8 @@
|
|
|
28982
29464
|
scrollState = undefined,
|
|
28983
29465
|
renderedCallback,
|
|
28984
29466
|
toolbar = true,
|
|
28985
|
-
isPopover = false
|
|
29467
|
+
isPopover = false,
|
|
29468
|
+
components
|
|
28986
29469
|
} = options;
|
|
28987
29470
|
|
|
28988
29471
|
// Hook that will trigger update when used in useEffects.
|
|
@@ -29006,7 +29489,15 @@
|
|
|
29006
29489
|
themeApi,
|
|
29007
29490
|
constraints
|
|
29008
29491
|
} = reactExports.useContext(InstanceContext);
|
|
29009
|
-
|
|
29492
|
+
const {
|
|
29493
|
+
checkboxes = checkboxesOption
|
|
29494
|
+
} = layout || {};
|
|
29495
|
+
const styles = getStyles({
|
|
29496
|
+
themeApi,
|
|
29497
|
+
theme,
|
|
29498
|
+
components,
|
|
29499
|
+
checkboxes
|
|
29500
|
+
});
|
|
29010
29501
|
const isDirectQuery = isDirectQueryEnabled({
|
|
29011
29502
|
appLayout: app === null || app === void 0 ? void 0 : app.layout
|
|
29012
29503
|
});
|
|
@@ -29227,6 +29718,7 @@
|
|
|
29227
29718
|
direction: "column",
|
|
29228
29719
|
gap: 0,
|
|
29229
29720
|
containerPadding: containerPadding,
|
|
29721
|
+
styles: styles,
|
|
29230
29722
|
style: {
|
|
29231
29723
|
height: '100%',
|
|
29232
29724
|
flexFlow: 'column nowrap'
|
|
@@ -29272,7 +29764,8 @@
|
|
|
29272
29764
|
variant: "h6",
|
|
29273
29765
|
noWrap: true,
|
|
29274
29766
|
ref: titleRef,
|
|
29275
|
-
title: layout.title
|
|
29767
|
+
title: layout.title,
|
|
29768
|
+
styles: styles
|
|
29276
29769
|
}, layout.title)), /*#__PURE__*/React.createElement(Grid$1, {
|
|
29277
29770
|
item: true
|
|
29278
29771
|
}, /*#__PURE__*/React.createElement(ActionsToolbar, _extends$7({
|
|
@@ -29302,7 +29795,8 @@
|
|
|
29302
29795
|
wildCardSearch: wildCardSearch,
|
|
29303
29796
|
searchEnabled: searchEnabled,
|
|
29304
29797
|
direction: direction,
|
|
29305
|
-
hide: showSearchIcon && onShowSearch
|
|
29798
|
+
hide: showSearchIcon && onShowSearch,
|
|
29799
|
+
styles: styles
|
|
29306
29800
|
})), /*#__PURE__*/React.createElement(Grid$1, {
|
|
29307
29801
|
item: true,
|
|
29308
29802
|
xs: true,
|
|
@@ -29317,7 +29811,6 @@
|
|
|
29317
29811
|
return /*#__PURE__*/React.createElement(ListBox, {
|
|
29318
29812
|
model: model,
|
|
29319
29813
|
app: app,
|
|
29320
|
-
theme: theme,
|
|
29321
29814
|
constraints: constraints,
|
|
29322
29815
|
layout: layout,
|
|
29323
29816
|
selections: selections,
|
|
@@ -29350,7 +29843,8 @@
|
|
|
29350
29843
|
},
|
|
29351
29844
|
renderedCallback: renderedCallback,
|
|
29352
29845
|
onCtrlF: onCtrlF,
|
|
29353
|
-
isModal: isModalMode
|
|
29846
|
+
isModal: isModalMode,
|
|
29847
|
+
styles: styles
|
|
29354
29848
|
});
|
|
29355
29849
|
})))));
|
|
29356
29850
|
}
|
|
@@ -29907,7 +30401,8 @@
|
|
|
29907
30401
|
close: handleCloseShowState,
|
|
29908
30402
|
fieldName: fieldIdentifier,
|
|
29909
30403
|
stateName: stateName,
|
|
29910
|
-
autoFocus: options.autoFocus
|
|
30404
|
+
autoFocus: options.autoFocus,
|
|
30405
|
+
components: options.components
|
|
29911
30406
|
});
|
|
29912
30407
|
}
|
|
29913
30408
|
|
|
@@ -37812,6 +38307,37 @@
|
|
|
37812
38307
|
}
|
|
37813
38308
|
};
|
|
37814
38309
|
|
|
38310
|
+
/**
|
|
38311
|
+
* @interface Component
|
|
38312
|
+
* @property {string} key The key of the component. Currently supporting components "theme" and "selections".
|
|
38313
|
+
* @example
|
|
38314
|
+
* const n = embed(app);
|
|
38315
|
+
* const inst = await n.field('field_name');
|
|
38316
|
+
* inst.mount(document.querySelector('.listbox'), {
|
|
38317
|
+
* components: [{
|
|
38318
|
+
* key: 'theme',
|
|
38319
|
+
* header: {
|
|
38320
|
+
* fontColor: { color: '#f00' },
|
|
38321
|
+
* fontSize: 23,
|
|
38322
|
+
* },
|
|
38323
|
+
* content: {
|
|
38324
|
+
* fontSize: 16,
|
|
38325
|
+
* useContrastColor: false,
|
|
38326
|
+
* }
|
|
38327
|
+
* },{
|
|
38328
|
+
* key: 'selections',
|
|
38329
|
+
* colors: {
|
|
38330
|
+
* selected: { color: '#0f0' },
|
|
38331
|
+
* alternative: { color: '#ededed' },
|
|
38332
|
+
* excluded: { color: '#ccc' },
|
|
38333
|
+
* selectedExcluded: { color: '#bbb' },
|
|
38334
|
+
* possible: { color: '#fefefe' },
|
|
38335
|
+
* possible: { color: '#fefefe' },
|
|
38336
|
+
* }
|
|
38337
|
+
* }]
|
|
38338
|
+
* });
|
|
38339
|
+
*/
|
|
38340
|
+
|
|
37815
38341
|
/**
|
|
37816
38342
|
* @interface Configuration
|
|
37817
38343
|
* @property {LoadType=} load Fallback load function for missing types
|
|
@@ -38234,6 +38760,7 @@
|
|
|
38234
38760
|
* @param {boolean=} [options.checkboxes=false] Show values as checkboxes instead of as fields (not applicable for existing objects)
|
|
38235
38761
|
* @param {boolean=} [options.dense=false] Reduces padding and text size (not applicable for existing objects)
|
|
38236
38762
|
* @param {string=} [options.stateName="$"] Sets the state to make selections in (not applicable for existing objects)
|
|
38763
|
+
* @param {Component[]} [options.components] Override individual components' styling, otherwise set by the theme or the default style.
|
|
38237
38764
|
* @param {object=} [options.properties={}] Properties object to extend default properties with
|
|
38238
38765
|
* @returns {Promise<void>} A promise that resolves when the data is fetched.
|
|
38239
38766
|
*
|