@nebula.js/stardust 4.5.0-alpha.0 → 4.6.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 +493 -232
- 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 +615 -328
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +13 -13
- 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.0
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -4417,7 +4417,11 @@
|
|
|
4417
4417
|
}
|
|
4418
4418
|
|
|
4419
4419
|
function isMuiElement(element, muiNames) {
|
|
4420
|
-
|
|
4420
|
+
var _muiName, _element$type;
|
|
4421
|
+
return /*#__PURE__*/reactExports.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
4422
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
4423
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
4424
|
+
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
4421
4425
|
}
|
|
4422
4426
|
|
|
4423
4427
|
function ownerDocument(node) {
|
|
@@ -4456,6 +4460,13 @@
|
|
|
4456
4460
|
}
|
|
4457
4461
|
}
|
|
4458
4462
|
|
|
4463
|
+
/**
|
|
4464
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
4465
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
4466
|
+
*
|
|
4467
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
4468
|
+
* and confirm it doesn't apply to your use-case.
|
|
4469
|
+
*/
|
|
4459
4470
|
const useEnhancedEffect = typeof window !== 'undefined' ? reactExports.useLayoutEffect : reactExports.useEffect;
|
|
4460
4471
|
var useEnhancedEffect$1 = useEnhancedEffect;
|
|
4461
4472
|
|
|
@@ -4520,7 +4531,8 @@
|
|
|
4520
4531
|
}
|
|
4521
4532
|
|
|
4522
4533
|
/**
|
|
4523
|
-
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
4534
|
+
* Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
4535
|
+
* See RFC in https://github.com/reactjs/rfcs/pull/220
|
|
4524
4536
|
*/
|
|
4525
4537
|
|
|
4526
4538
|
function useEventCallback(fn) {
|
|
@@ -6940,7 +6952,7 @@
|
|
|
6940
6952
|
}
|
|
6941
6953
|
|
|
6942
6954
|
/**
|
|
6943
|
-
* @mui/styled-engine v5.14.
|
|
6955
|
+
* @mui/styled-engine v5.14.13
|
|
6944
6956
|
*
|
|
6945
6957
|
* @license MIT
|
|
6946
6958
|
* This source code is licensed under the MIT license found in the
|
|
@@ -7620,10 +7632,20 @@
|
|
|
7620
7632
|
const maxWidth = props => {
|
|
7621
7633
|
if (props.maxWidth !== undefined && props.maxWidth !== null) {
|
|
7622
7634
|
const styleFromPropValue = propValue => {
|
|
7623
|
-
var _props$theme;
|
|
7635
|
+
var _props$theme, _props$theme2;
|
|
7624
7636
|
const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || values$1[propValue];
|
|
7637
|
+
if (!breakpoint) {
|
|
7638
|
+
return {
|
|
7639
|
+
maxWidth: sizingTransform(propValue)
|
|
7640
|
+
};
|
|
7641
|
+
}
|
|
7642
|
+
if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {
|
|
7643
|
+
return {
|
|
7644
|
+
maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
|
|
7645
|
+
};
|
|
7646
|
+
}
|
|
7625
7647
|
return {
|
|
7626
|
-
maxWidth: breakpoint
|
|
7648
|
+
maxWidth: breakpoint
|
|
7627
7649
|
};
|
|
7628
7650
|
};
|
|
7629
7651
|
return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
|
|
@@ -8245,40 +8267,48 @@
|
|
|
8245
8267
|
}
|
|
8246
8268
|
return null;
|
|
8247
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
|
+
};
|
|
8248
8280
|
const getVariantStyles = (name, theme) => {
|
|
8249
8281
|
let variants = [];
|
|
8250
8282
|
if (theme && theme.components && theme.components[name] && theme.components[name].variants) {
|
|
8251
8283
|
variants = theme.components[name].variants;
|
|
8252
8284
|
}
|
|
8253
|
-
|
|
8254
|
-
variants.forEach(definition => {
|
|
8255
|
-
const key = propsToClassKey(definition.props);
|
|
8256
|
-
variantsStyles[key] = definition.style;
|
|
8257
|
-
});
|
|
8258
|
-
return variantsStyles;
|
|
8285
|
+
return transformVariants(variants);
|
|
8259
8286
|
};
|
|
8260
|
-
const variantsResolver = (props, styles,
|
|
8261
|
-
var _theme$components;
|
|
8287
|
+
const variantsResolver = (props, styles, variants) => {
|
|
8262
8288
|
const {
|
|
8263
8289
|
ownerState = {}
|
|
8264
8290
|
} = props;
|
|
8265
8291
|
const variantsStyles = [];
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
themeVariants.forEach(themeVariant => {
|
|
8292
|
+
if (variants) {
|
|
8293
|
+
variants.forEach(variant => {
|
|
8269
8294
|
let isMatch = true;
|
|
8270
|
-
Object.keys(
|
|
8271
|
-
if (ownerState[key] !==
|
|
8295
|
+
Object.keys(variant.props).forEach(key => {
|
|
8296
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
8272
8297
|
isMatch = false;
|
|
8273
8298
|
}
|
|
8274
8299
|
});
|
|
8275
8300
|
if (isMatch) {
|
|
8276
|
-
variantsStyles.push(styles[propsToClassKey(
|
|
8301
|
+
variantsStyles.push(styles[propsToClassKey(variant.props)]);
|
|
8277
8302
|
}
|
|
8278
8303
|
});
|
|
8279
8304
|
}
|
|
8280
8305
|
return variantsStyles;
|
|
8281
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
|
+
};
|
|
8282
8312
|
|
|
8283
8313
|
// Update /system/styled/#api in case if this changes
|
|
8284
8314
|
function shouldForwardProp(prop) {
|
|
@@ -8304,6 +8334,29 @@
|
|
|
8304
8334
|
}
|
|
8305
8335
|
return (props, styles) => styles[slot];
|
|
8306
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
|
+
};
|
|
8307
8360
|
function createStyled(input = {}) {
|
|
8308
8361
|
const {
|
|
8309
8362
|
themeId,
|
|
@@ -8363,16 +8416,61 @@
|
|
|
8363
8416
|
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
8364
8417
|
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
8365
8418
|
// which are basically components used as a selectors.
|
|
8366
|
-
|
|
8367
|
-
return
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
})
|
|
8373
|
-
}
|
|
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;
|
|
8374
8445
|
}) : [];
|
|
8375
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
|
+
}
|
|
8376
8474
|
if (componentName && overridesResolver) {
|
|
8377
8475
|
expressionsWithDefaultTheme.push(props => {
|
|
8378
8476
|
const theme = resolveTheme(_extends$3({}, props, {
|
|
@@ -8398,7 +8496,7 @@
|
|
|
8398
8496
|
defaultTheme,
|
|
8399
8497
|
themeId
|
|
8400
8498
|
}));
|
|
8401
|
-
return
|
|
8499
|
+
return themeVariantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
|
8402
8500
|
});
|
|
8403
8501
|
}
|
|
8404
8502
|
if (!skipSx) {
|
|
@@ -8410,18 +8508,6 @@
|
|
|
8410
8508
|
// If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.
|
|
8411
8509
|
transformedStyleArg = [...styleArg, ...placeholders];
|
|
8412
8510
|
transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
|
|
8413
|
-
} else if (typeof styleArg === 'function' &&
|
|
8414
|
-
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
8415
|
-
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
8416
|
-
// which are basically components used as a selectors.
|
|
8417
|
-
styleArg.__emotion_real !== styleArg) {
|
|
8418
|
-
// If the type is function, we need to define the default theme.
|
|
8419
|
-
transformedStyleArg = props => styleArg(_extends$3({}, props, {
|
|
8420
|
-
theme: resolveTheme(_extends$3({}, props, {
|
|
8421
|
-
defaultTheme,
|
|
8422
|
-
themeId
|
|
8423
|
-
}))
|
|
8424
|
-
}));
|
|
8425
8511
|
}
|
|
8426
8512
|
const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
|
|
8427
8513
|
if (tag.muiName) {
|
|
@@ -11107,7 +11193,7 @@
|
|
|
11107
11193
|
type: type
|
|
11108
11194
|
}, buttonProps, other, {
|
|
11109
11195
|
children: [children, enableTouchRipple ?
|
|
11110
|
-
|
|
11196
|
+
|
|
11111
11197
|
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
|
11112
11198
|
jsxRuntimeExports.jsx(TouchRipple$1, _extends$5({
|
|
11113
11199
|
ref: handleRippleRef,
|
|
@@ -11129,6 +11215,12 @@
|
|
|
11129
11215
|
const ButtonGroupContext = /*#__PURE__*/reactExports.createContext({});
|
|
11130
11216
|
var ButtonGroupContext$1 = ButtonGroupContext;
|
|
11131
11217
|
|
|
11218
|
+
/**
|
|
11219
|
+
* @ignore - internal component.
|
|
11220
|
+
*/
|
|
11221
|
+
const ButtonGroupButtonContext = /*#__PURE__*/reactExports.createContext(undefined);
|
|
11222
|
+
var ButtonGroupButtonContext$1 = ButtonGroupButtonContext;
|
|
11223
|
+
|
|
11132
11224
|
const _excluded$C = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"];
|
|
11133
11225
|
const useUtilityClasses$q = ownerState => {
|
|
11134
11226
|
const {
|
|
@@ -11334,6 +11426,7 @@
|
|
|
11334
11426
|
const Button = /*#__PURE__*/reactExports.forwardRef(function Button(inProps, ref) {
|
|
11335
11427
|
// props priority: `inProps` > `contextProps` > `themeDefaultProps`
|
|
11336
11428
|
const contextProps = reactExports.useContext(ButtonGroupContext$1);
|
|
11429
|
+
const buttonGroupButtonContextPositionClassName = reactExports.useContext(ButtonGroupButtonContext$1);
|
|
11337
11430
|
const resolvedProps = resolveProps(contextProps, inProps);
|
|
11338
11431
|
const props = useThemeProps({
|
|
11339
11432
|
props: resolvedProps,
|
|
@@ -11378,9 +11471,10 @@
|
|
|
11378
11471
|
ownerState: ownerState,
|
|
11379
11472
|
children: endIconProp
|
|
11380
11473
|
});
|
|
11474
|
+
const positionClassName = buttonGroupButtonContextPositionClassName || '';
|
|
11381
11475
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(ButtonRoot, _extends$5({
|
|
11382
11476
|
ownerState: ownerState,
|
|
11383
|
-
className: clsx(contextProps.className, classes.root, className),
|
|
11477
|
+
className: clsx(contextProps.className, classes.root, className, positionClassName),
|
|
11384
11478
|
component: component,
|
|
11385
11479
|
disabled: disabled,
|
|
11386
11480
|
focusRipple: !disableFocusRipple,
|
|
@@ -11467,7 +11561,9 @@
|
|
|
11467
11561
|
text: {
|
|
11468
11562
|
primary: colors.grey25,
|
|
11469
11563
|
secondary: 'rgba(0, 0, 0, 0.55)',
|
|
11470
|
-
disabled: 'rgba(0, 0, 0, 0.3)'
|
|
11564
|
+
disabled: 'rgba(0, 0, 0, 0.3)',
|
|
11565
|
+
light: colors.grey100,
|
|
11566
|
+
dark: colors.grey0
|
|
11471
11567
|
},
|
|
11472
11568
|
action: {
|
|
11473
11569
|
active: '#545454',
|
|
@@ -11501,9 +11597,13 @@
|
|
|
11501
11597
|
main: colors.green,
|
|
11502
11598
|
alternative: '#E4E4E4',
|
|
11503
11599
|
excluded: '#BEBEBE',
|
|
11600
|
+
selectedExcluded: '#BEBEBE',
|
|
11601
|
+
possible: colors.grey100,
|
|
11504
11602
|
mainContrastText: colors.grey100,
|
|
11505
11603
|
alternativeContrastText: colors.grey25,
|
|
11506
|
-
excludedContrastText: colors.grey25
|
|
11604
|
+
excludedContrastText: colors.grey25,
|
|
11605
|
+
selectedExcludedContrastText: colors.grey100,
|
|
11606
|
+
possibleContrastText: colors.grey0
|
|
11507
11607
|
},
|
|
11508
11608
|
btn: {
|
|
11509
11609
|
normal: 'rgba(255, 255, 255, 0.6)',
|
|
@@ -11531,7 +11631,9 @@
|
|
|
11531
11631
|
text: {
|
|
11532
11632
|
primary: colors.grey100,
|
|
11533
11633
|
secondary: 'rgba(255, 255, 255, 0.6)',
|
|
11534
|
-
disabled: 'rgba(255, 255, 255, 0.3)'
|
|
11634
|
+
disabled: 'rgba(255, 255, 255, 0.3)',
|
|
11635
|
+
light: colors.grey100,
|
|
11636
|
+
dark: colors.grey0
|
|
11535
11637
|
},
|
|
11536
11638
|
action: {
|
|
11537
11639
|
// active: 'rgba(0, 0, 0, 0.55)',
|
|
@@ -11562,9 +11664,13 @@
|
|
|
11562
11664
|
main: colors.green,
|
|
11563
11665
|
alternative: colors.grey20,
|
|
11564
11666
|
excluded: colors.grey10,
|
|
11667
|
+
selectedExcluded: colors.grey10,
|
|
11668
|
+
possible: colors.grey80,
|
|
11565
11669
|
mainContrastText: colors.grey100,
|
|
11566
11670
|
alternativeContrastText: colors.grey100,
|
|
11567
|
-
excludedContrastText: colors.grey100
|
|
11671
|
+
excludedContrastText: colors.grey100,
|
|
11672
|
+
selectedExcludedContrastText: colors.grey100,
|
|
11673
|
+
possibleContrastText: colors.grey0
|
|
11568
11674
|
},
|
|
11569
11675
|
btn: {
|
|
11570
11676
|
normal: 'rgba(255, 255, 255, 0.15)',
|
|
@@ -11712,7 +11818,7 @@
|
|
|
11712
11818
|
return cache[key];
|
|
11713
11819
|
}
|
|
11714
11820
|
|
|
11715
|
-
const NEBULA_VERSION_HASH = "
|
|
11821
|
+
const NEBULA_VERSION_HASH = "ba42" ;
|
|
11716
11822
|
ClassNameGenerator$1.configure(componentName => {
|
|
11717
11823
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
11718
11824
|
});
|
|
@@ -11973,7 +12079,7 @@
|
|
|
11973
12079
|
const appRef = React.createRef();
|
|
11974
12080
|
const element = document.createElement('div');
|
|
11975
12081
|
element.style.display = 'none';
|
|
11976
|
-
element.setAttribute('data-nebulajs-version', "4.
|
|
12082
|
+
element.setAttribute('data-nebulajs-version', "4.6.0" );
|
|
11977
12083
|
element.setAttribute('data-app-id', app.id);
|
|
11978
12084
|
document.body.appendChild(element);
|
|
11979
12085
|
if (context) {
|
|
@@ -12934,51 +13040,6 @@
|
|
|
12934
13040
|
return;
|
|
12935
13041
|
}
|
|
12936
13042
|
const doc = ownerDocument(rootRef.current);
|
|
12937
|
-
const contain = nativeEvent => {
|
|
12938
|
-
const {
|
|
12939
|
-
current: rootElement
|
|
12940
|
-
} = rootRef;
|
|
12941
|
-
|
|
12942
|
-
// Cleanup functions are executed lazily in React 17.
|
|
12943
|
-
// Contain can be called between the component being unmounted and its cleanup function being run.
|
|
12944
|
-
if (rootElement === null) {
|
|
12945
|
-
return;
|
|
12946
|
-
}
|
|
12947
|
-
if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {
|
|
12948
|
-
ignoreNextEnforceFocus.current = false;
|
|
12949
|
-
return;
|
|
12950
|
-
}
|
|
12951
|
-
if (!rootElement.contains(doc.activeElement)) {
|
|
12952
|
-
// if the focus event is not coming from inside the children's react tree, reset the refs
|
|
12953
|
-
if (nativeEvent && reactFocusEventTarget.current !== nativeEvent.target || doc.activeElement !== reactFocusEventTarget.current) {
|
|
12954
|
-
reactFocusEventTarget.current = null;
|
|
12955
|
-
} else if (reactFocusEventTarget.current !== null) {
|
|
12956
|
-
return;
|
|
12957
|
-
}
|
|
12958
|
-
if (!activated.current) {
|
|
12959
|
-
return;
|
|
12960
|
-
}
|
|
12961
|
-
let tabbable = [];
|
|
12962
|
-
if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {
|
|
12963
|
-
tabbable = getTabbable(rootRef.current);
|
|
12964
|
-
}
|
|
12965
|
-
if (tabbable.length > 0) {
|
|
12966
|
-
var _lastKeydown$current, _lastKeydown$current2;
|
|
12967
|
-
const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === 'Tab');
|
|
12968
|
-
const focusNext = tabbable[0];
|
|
12969
|
-
const focusPrevious = tabbable[tabbable.length - 1];
|
|
12970
|
-
if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {
|
|
12971
|
-
if (isShiftTab) {
|
|
12972
|
-
focusPrevious.focus();
|
|
12973
|
-
} else {
|
|
12974
|
-
focusNext.focus();
|
|
12975
|
-
}
|
|
12976
|
-
}
|
|
12977
|
-
} else {
|
|
12978
|
-
rootElement.focus();
|
|
12979
|
-
}
|
|
12980
|
-
}
|
|
12981
|
-
};
|
|
12982
13043
|
const loopFocus = nativeEvent => {
|
|
12983
13044
|
lastKeydown.current = nativeEvent;
|
|
12984
13045
|
if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {
|
|
@@ -12996,6 +13057,62 @@
|
|
|
12996
13057
|
}
|
|
12997
13058
|
}
|
|
12998
13059
|
};
|
|
13060
|
+
const contain = () => {
|
|
13061
|
+
const rootElement = rootRef.current;
|
|
13062
|
+
|
|
13063
|
+
// Cleanup functions are executed lazily in React 17.
|
|
13064
|
+
// Contain can be called between the component being unmounted and its cleanup function being run.
|
|
13065
|
+
if (rootElement === null) {
|
|
13066
|
+
return;
|
|
13067
|
+
}
|
|
13068
|
+
if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {
|
|
13069
|
+
ignoreNextEnforceFocus.current = false;
|
|
13070
|
+
return;
|
|
13071
|
+
}
|
|
13072
|
+
|
|
13073
|
+
// The focus is already inside
|
|
13074
|
+
if (rootElement.contains(doc.activeElement)) {
|
|
13075
|
+
return;
|
|
13076
|
+
}
|
|
13077
|
+
|
|
13078
|
+
// The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)
|
|
13079
|
+
if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {
|
|
13080
|
+
return;
|
|
13081
|
+
}
|
|
13082
|
+
|
|
13083
|
+
// if the focus event is not coming from inside the children's react tree, reset the refs
|
|
13084
|
+
if (doc.activeElement !== reactFocusEventTarget.current) {
|
|
13085
|
+
reactFocusEventTarget.current = null;
|
|
13086
|
+
} else if (reactFocusEventTarget.current !== null) {
|
|
13087
|
+
return;
|
|
13088
|
+
}
|
|
13089
|
+
if (!activated.current) {
|
|
13090
|
+
return;
|
|
13091
|
+
}
|
|
13092
|
+
let tabbable = [];
|
|
13093
|
+
if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {
|
|
13094
|
+
tabbable = getTabbable(rootRef.current);
|
|
13095
|
+
}
|
|
13096
|
+
|
|
13097
|
+
// one of the sentinel nodes was focused, so move the focus
|
|
13098
|
+
// to the first/last tabbable element inside the focus trap
|
|
13099
|
+
if (tabbable.length > 0) {
|
|
13100
|
+
var _lastKeydown$current, _lastKeydown$current2;
|
|
13101
|
+
const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === 'Tab');
|
|
13102
|
+
const focusNext = tabbable[0];
|
|
13103
|
+
const focusPrevious = tabbable[tabbable.length - 1];
|
|
13104
|
+
if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {
|
|
13105
|
+
if (isShiftTab) {
|
|
13106
|
+
focusPrevious.focus();
|
|
13107
|
+
} else {
|
|
13108
|
+
focusNext.focus();
|
|
13109
|
+
}
|
|
13110
|
+
}
|
|
13111
|
+
// no tabbable elements in the trap focus or the focus was outside of the focus trap
|
|
13112
|
+
} else {
|
|
13113
|
+
rootElement.focus();
|
|
13114
|
+
}
|
|
13115
|
+
};
|
|
12999
13116
|
doc.addEventListener('focusin', contain);
|
|
13000
13117
|
doc.addEventListener('keydown', loopFocus, true);
|
|
13001
13118
|
|
|
@@ -13007,7 +13124,7 @@
|
|
|
13007
13124
|
// https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.
|
|
13008
13125
|
const interval = setInterval(() => {
|
|
13009
13126
|
if (doc.activeElement && doc.activeElement.tagName === 'BODY') {
|
|
13010
|
-
contain(
|
|
13127
|
+
contain();
|
|
13011
13128
|
}
|
|
13012
13129
|
}, 50);
|
|
13013
13130
|
return () => {
|
|
@@ -15448,7 +15565,7 @@
|
|
|
15448
15565
|
}, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);
|
|
15449
15566
|
const createHandleKeyDown = otherHandlers => event => {
|
|
15450
15567
|
var _otherHandlers$onKeyD;
|
|
15451
|
-
(_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null
|
|
15568
|
+
(_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);
|
|
15452
15569
|
|
|
15453
15570
|
// The handler doesn't take event.defaultPrevented into account:
|
|
15454
15571
|
//
|
|
@@ -15469,7 +15586,7 @@
|
|
|
15469
15586
|
};
|
|
15470
15587
|
const createHandleBackdropClick = otherHandlers => event => {
|
|
15471
15588
|
var _otherHandlers$onClic;
|
|
15472
|
-
(_otherHandlers$onClic = otherHandlers.onClick) == null
|
|
15589
|
+
(_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event);
|
|
15473
15590
|
if (event.target !== event.currentTarget) {
|
|
15474
15591
|
return;
|
|
15475
15592
|
}
|
|
@@ -15517,8 +15634,8 @@
|
|
|
15517
15634
|
}
|
|
15518
15635
|
};
|
|
15519
15636
|
return {
|
|
15520
|
-
onEnter: createChainedFunction(handleEnter, children.props.onEnter),
|
|
15521
|
-
onExited: createChainedFunction(handleExited, children.props.onExited)
|
|
15637
|
+
onEnter: createChainedFunction(handleEnter, children == null ? void 0 : children.props.onEnter),
|
|
15638
|
+
onExited: createChainedFunction(handleExited, children == null ? void 0 : children.props.onExited)
|
|
15522
15639
|
};
|
|
15523
15640
|
};
|
|
15524
15641
|
return {
|
|
@@ -15656,53 +15773,51 @@
|
|
|
15656
15773
|
if (isEmpty$1(newState)) {
|
|
15657
15774
|
return;
|
|
15658
15775
|
}
|
|
15659
|
-
setState(prevState =>
|
|
15660
|
-
return updateState(prevState, newState);
|
|
15661
|
-
});
|
|
15776
|
+
setState(prevState => updateState(prevState, newState));
|
|
15662
15777
|
}, [getUpdatedState]);
|
|
15663
|
-
|
|
15664
|
-
const
|
|
15665
|
-
|
|
15666
|
-
|
|
15667
|
-
|
|
15778
|
+
useEnhancedEffect$1(() => {
|
|
15779
|
+
const syncHeightWithFlushSync = () => {
|
|
15780
|
+
const newState = getUpdatedState();
|
|
15781
|
+
if (isEmpty$1(newState)) {
|
|
15782
|
+
return;
|
|
15783
|
+
}
|
|
15668
15784
|
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
15673
|
-
|
|
15674
|
-
|
|
15785
|
+
// In React 18, state updates in a ResizeObserver's callback are happening after
|
|
15786
|
+
// the paint, this leads to an infinite rendering.
|
|
15787
|
+
//
|
|
15788
|
+
// Using flushSync ensures that the states is updated before the next pain.
|
|
15789
|
+
// Related issue - https://github.com/facebook/react/issues/24331
|
|
15790
|
+
reactDomExports.flushSync(() => {
|
|
15791
|
+
setState(prevState => updateState(prevState, newState));
|
|
15675
15792
|
});
|
|
15676
|
-
}
|
|
15677
|
-
|
|
15678
|
-
reactExports.useEffect(() => {
|
|
15679
|
-
const handleResize = debounce$1(() => {
|
|
15793
|
+
};
|
|
15794
|
+
const handleResize = () => {
|
|
15680
15795
|
renders.current = 0;
|
|
15681
|
-
|
|
15682
|
-
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
});
|
|
15690
|
-
let resizeObserver;
|
|
15796
|
+
syncHeightWithFlushSync();
|
|
15797
|
+
};
|
|
15798
|
+
// Workaround a "ResizeObserver loop completed with undelivered notifications" error
|
|
15799
|
+
// in test.
|
|
15800
|
+
// Note that we might need to use this logic in production per https://github.com/WICG/resize-observer/issues/38
|
|
15801
|
+
// Also see https://github.com/mui/mui-x/issues/8733
|
|
15802
|
+
let rAF;
|
|
15803
|
+
const debounceHandleResize = debounce$1(handleResize);
|
|
15691
15804
|
const input = inputRef.current;
|
|
15692
15805
|
const containerWindow = ownerWindow(input);
|
|
15693
|
-
containerWindow.addEventListener('resize',
|
|
15806
|
+
containerWindow.addEventListener('resize', debounceHandleResize);
|
|
15807
|
+
let resizeObserver;
|
|
15694
15808
|
if (typeof ResizeObserver !== 'undefined') {
|
|
15695
15809
|
resizeObserver = new ResizeObserver(handleResize);
|
|
15696
15810
|
resizeObserver.observe(input);
|
|
15697
15811
|
}
|
|
15698
15812
|
return () => {
|
|
15699
|
-
|
|
15700
|
-
|
|
15813
|
+
debounceHandleResize.clear();
|
|
15814
|
+
cancelAnimationFrame(rAF);
|
|
15815
|
+
containerWindow.removeEventListener('resize', debounceHandleResize);
|
|
15701
15816
|
if (resizeObserver) {
|
|
15702
15817
|
resizeObserver.disconnect();
|
|
15703
15818
|
}
|
|
15704
15819
|
};
|
|
15705
|
-
});
|
|
15820
|
+
}, [getUpdatedState]);
|
|
15706
15821
|
useEnhancedEffect$1(() => {
|
|
15707
15822
|
syncHeight();
|
|
15708
15823
|
});
|
|
@@ -15907,7 +16022,7 @@
|
|
|
15907
16022
|
type
|
|
15908
16023
|
} = ownerState;
|
|
15909
16024
|
const slots = {
|
|
15910
|
-
root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size
|
|
16025
|
+
root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && `size${capitalize(size)}`, multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
|
|
15911
16026
|
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
|
|
15912
16027
|
};
|
|
15913
16028
|
return composeClasses(slots, getInputBaseUtilityClass, classes);
|
|
@@ -16981,7 +17096,7 @@
|
|
|
16981
17096
|
color: (theme.vars || theme).palette.text.secondary
|
|
16982
17097
|
}, !ownerState.disableRipple && {
|
|
16983
17098
|
'&:hover': {
|
|
16984
|
-
backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette.
|
|
17099
|
+
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),
|
|
16985
17100
|
// Reset on touch devices, it doesn't add specificity
|
|
16986
17101
|
'@media (hover: none)': {
|
|
16987
17102
|
backgroundColor: 'transparent'
|
|
@@ -17227,7 +17342,7 @@
|
|
|
17227
17342
|
}
|
|
17228
17343
|
generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);
|
|
17229
17344
|
|
|
17230
|
-
const _excluded$m = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "open", "slotProps", "slots", "theme"];
|
|
17345
|
+
const _excluded$m = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"];
|
|
17231
17346
|
const useUtilityClasses$e = ownerState => {
|
|
17232
17347
|
const {
|
|
17233
17348
|
open,
|
|
@@ -19243,7 +19358,7 @@
|
|
|
19243
19358
|
generateUtilityClasses('MuiPopover', ['root', 'paper']);
|
|
19244
19359
|
|
|
19245
19360
|
const _excluded$a = ["onEntering"],
|
|
19246
|
-
_excluded2$1 = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps"],
|
|
19361
|
+
_excluded2$1 = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"],
|
|
19247
19362
|
_excluded3 = ["slotProps"];
|
|
19248
19363
|
function getOffsetTop(rect, vertical) {
|
|
19249
19364
|
let offset = 0;
|
|
@@ -19337,7 +19452,8 @@
|
|
|
19337
19452
|
transitionDuration: transitionDurationProp = 'auto',
|
|
19338
19453
|
TransitionProps: {
|
|
19339
19454
|
onEntering
|
|
19340
|
-
} = {}
|
|
19455
|
+
} = {},
|
|
19456
|
+
disableScrollLock = false
|
|
19341
19457
|
} = props,
|
|
19342
19458
|
TransitionProps = _objectWithoutPropertiesLoose$3(props.TransitionProps, _excluded$a),
|
|
19343
19459
|
other = _objectWithoutPropertiesLoose$3(props, _excluded2$1);
|
|
@@ -19414,18 +19530,18 @@
|
|
|
19414
19530
|
const widthThreshold = containerWindow.innerWidth - marginThreshold;
|
|
19415
19531
|
|
|
19416
19532
|
// Check if the vertical axis needs shifting
|
|
19417
|
-
if (top < marginThreshold) {
|
|
19533
|
+
if (marginThreshold !== null && top < marginThreshold) {
|
|
19418
19534
|
const diff = top - marginThreshold;
|
|
19419
19535
|
top -= diff;
|
|
19420
19536
|
elemTransformOrigin.vertical += diff;
|
|
19421
|
-
} else if (bottom > heightThreshold) {
|
|
19537
|
+
} else if (marginThreshold !== null && bottom > heightThreshold) {
|
|
19422
19538
|
const diff = bottom - heightThreshold;
|
|
19423
19539
|
top -= diff;
|
|
19424
19540
|
elemTransformOrigin.vertical += diff;
|
|
19425
19541
|
}
|
|
19426
19542
|
|
|
19427
19543
|
// Check if the horizontal axis needs shifting
|
|
19428
|
-
if (left < marginThreshold) {
|
|
19544
|
+
if (marginThreshold !== null && left < marginThreshold) {
|
|
19429
19545
|
const diff = left - marginThreshold;
|
|
19430
19546
|
left -= diff;
|
|
19431
19547
|
elemTransformOrigin.horizontal += diff;
|
|
@@ -19456,6 +19572,12 @@
|
|
|
19456
19572
|
element.style.transformOrigin = positioning.transformOrigin;
|
|
19457
19573
|
setIsPositioned(true);
|
|
19458
19574
|
}, [getPositioningStyle]);
|
|
19575
|
+
reactExports.useEffect(() => {
|
|
19576
|
+
if (disableScrollLock) {
|
|
19577
|
+
window.addEventListener('scroll', setPositioningStyles);
|
|
19578
|
+
}
|
|
19579
|
+
return () => window.removeEventListener('scroll', setPositioningStyles);
|
|
19580
|
+
}, [anchorEl, disableScrollLock, setPositioningStyles]);
|
|
19459
19581
|
const handleEntering = (element, isAppearing) => {
|
|
19460
19582
|
if (onEntering) {
|
|
19461
19583
|
onEntering(element, isAppearing);
|
|
@@ -19536,7 +19658,8 @@
|
|
|
19536
19658
|
} = _useSlotProps,
|
|
19537
19659
|
rootProps = _objectWithoutPropertiesLoose$3(_useSlotProps, _excluded3);
|
|
19538
19660
|
return /*#__PURE__*/jsxRuntimeExports.jsx(RootSlot, _extends$5({}, rootProps, !isHostComponent(RootSlot) && {
|
|
19539
|
-
slotProps: rootSlotPropsProp
|
|
19661
|
+
slotProps: rootSlotPropsProp,
|
|
19662
|
+
disableScrollLock
|
|
19540
19663
|
}, {
|
|
19541
19664
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(TransitionComponent, _extends$5({
|
|
19542
19665
|
appear: true,
|
|
@@ -20064,17 +20187,18 @@
|
|
|
20064
20187
|
function getRadioUtilityClass(slot) {
|
|
20065
20188
|
return generateUtilityClass('MuiRadio', slot);
|
|
20066
20189
|
}
|
|
20067
|
-
const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary']);
|
|
20190
|
+
const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
|
|
20068
20191
|
var radioClasses$1 = radioClasses;
|
|
20069
20192
|
|
|
20070
20193
|
const _excluded$6 = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"];
|
|
20071
20194
|
const useUtilityClasses$1 = ownerState => {
|
|
20072
20195
|
const {
|
|
20073
20196
|
classes,
|
|
20074
|
-
color
|
|
20197
|
+
color,
|
|
20198
|
+
size
|
|
20075
20199
|
} = ownerState;
|
|
20076
20200
|
const slots = {
|
|
20077
|
-
root: ['root', `color${capitalize(color)}`]
|
|
20201
|
+
root: ['root', `color${capitalize(color)}`, size !== 'medium' && `size${capitalize(size)}`]
|
|
20078
20202
|
};
|
|
20079
20203
|
return _extends$5({}, classes, composeClasses(slots, getRadioUtilityClass, classes));
|
|
20080
20204
|
};
|
|
@@ -20771,10 +20895,6 @@
|
|
|
20771
20895
|
const [modelStore] = useModelStore();
|
|
20772
20896
|
const [rpcRequestSessionModelStore] = useRpcRequestSessionModelStore();
|
|
20773
20897
|
const [model, setModel] = reactExports.useState();
|
|
20774
|
-
let rpcShared;
|
|
20775
|
-
if (key) {
|
|
20776
|
-
rpcShared = rpcRequestSessionModelStore.get(key);
|
|
20777
|
-
}
|
|
20778
20898
|
for (var _len = arguments.length, deps = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
20779
20899
|
deps[_key - 2] = arguments[_key];
|
|
20780
20900
|
}
|
|
@@ -20784,9 +20904,9 @@
|
|
|
20784
20904
|
}
|
|
20785
20905
|
// Create new session object
|
|
20786
20906
|
const create = async () => {
|
|
20907
|
+
let rpcShared = rpcRequestSessionModelStore.get(key);
|
|
20787
20908
|
if (!rpcShared) {
|
|
20788
|
-
|
|
20789
|
-
rpcShared = rpc;
|
|
20909
|
+
rpcShared = app.createSessionObject(definition);
|
|
20790
20910
|
rpcRequestSessionModelStore.set(key, rpcShared);
|
|
20791
20911
|
}
|
|
20792
20912
|
const newModel = await rpcShared;
|
|
@@ -21850,6 +21970,9 @@
|
|
|
21850
21970
|
const barPadPx = 4;
|
|
21851
21971
|
const barBorderWidthPx = 1;
|
|
21852
21972
|
const barWithCheckboxLeftPadPx = 29;
|
|
21973
|
+
const GRID_ROW_HEIGHT = 32;
|
|
21974
|
+
const LIST_ROW_HEIGHT = 29;
|
|
21975
|
+
const DENSE_ROW_HEIGHT = 20; // same for both list and grid in dense mode
|
|
21853
21976
|
|
|
21854
21977
|
const joinClassNames = namesArray => namesArray.filter(c => !!c).join(' ').trim();
|
|
21855
21978
|
const getBarWidth = _ref => {
|
|
@@ -21896,17 +22019,30 @@
|
|
|
21896
22019
|
};
|
|
21897
22020
|
const getSelectedStyle = _ref3 => {
|
|
21898
22021
|
let {
|
|
21899
|
-
theme
|
|
22022
|
+
theme,
|
|
22023
|
+
styles,
|
|
22024
|
+
selectedState
|
|
21900
22025
|
} = _ref3;
|
|
22026
|
+
const selectionStyles = styles.selections;
|
|
22027
|
+
const backgroundColor = selectionStyles[selectedState];
|
|
22028
|
+
const contrastTextColor = selectionStyles["".concat(selectedState, "Contrast")];
|
|
21901
22029
|
return {
|
|
21902
|
-
background:
|
|
21903
|
-
color:
|
|
22030
|
+
background: backgroundColor,
|
|
22031
|
+
color: contrastTextColor,
|
|
21904
22032
|
'&:focus': {
|
|
21905
22033
|
boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder),
|
|
21906
22034
|
outline: 'none'
|
|
21907
22035
|
},
|
|
21908
22036
|
'& $cell': {
|
|
21909
22037
|
paddingRight: 0
|
|
22038
|
+
},
|
|
22039
|
+
// Override default label text style for selection states
|
|
22040
|
+
// when contrasting text is needed.
|
|
22041
|
+
["& .".concat(rowColClasses.labelText)]: {
|
|
22042
|
+
color: contrastTextColor
|
|
22043
|
+
},
|
|
22044
|
+
["& .".concat(rowColClasses.icon)]: {
|
|
22045
|
+
color: contrastTextColor
|
|
21910
22046
|
}
|
|
21911
22047
|
};
|
|
21912
22048
|
};
|
|
@@ -21919,9 +22055,8 @@
|
|
|
21919
22055
|
const iconWidth = 24; // tick and lock icon width in px
|
|
21920
22056
|
|
|
21921
22057
|
const RowColRoot = styled$1('div', {
|
|
21922
|
-
shouldForwardProp: prop => !['checkboxes', 'isGridMode', 'isGridCol', 'dense', 'direction', 'sizes', 'frequencyMode', 'freqHitsValue'].includes(prop)
|
|
22058
|
+
shouldForwardProp: prop => !['checkboxes', 'isGridMode', 'isGridCol', 'dense', 'direction', 'sizes', 'frequencyMode', 'freqHitsValue', 'layout', 'styles'].includes(prop)
|
|
21923
22059
|
})(_ref4 => {
|
|
21924
|
-
var _theme$listBox$conten, _theme$listBox, _theme$listBox$conten2, _theme$listBox2, _theme$listBox3, _theme$listBox4;
|
|
21925
22060
|
let {
|
|
21926
22061
|
theme,
|
|
21927
22062
|
checkboxes,
|
|
@@ -21931,8 +22066,21 @@
|
|
|
21931
22066
|
direction,
|
|
21932
22067
|
sizes,
|
|
21933
22068
|
frequencyMode,
|
|
21934
|
-
freqHitsValue
|
|
22069
|
+
freqHitsValue,
|
|
22070
|
+
styles
|
|
21935
22071
|
} = _ref4;
|
|
22072
|
+
const rowFontColor = styles.content.color;
|
|
22073
|
+
const rowBackgroundColor = styles.content.backgroundColor;
|
|
22074
|
+
const selectStyle = getSelectedStyle({
|
|
22075
|
+
theme,
|
|
22076
|
+
styles,
|
|
22077
|
+
selectedState: 'selected'
|
|
22078
|
+
});
|
|
22079
|
+
const excludedSelectStyle = getSelectedStyle({
|
|
22080
|
+
theme,
|
|
22081
|
+
styles,
|
|
22082
|
+
selectedState: 'excluded'
|
|
22083
|
+
});
|
|
21936
22084
|
return {
|
|
21937
22085
|
'&:focus': {
|
|
21938
22086
|
boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
|
|
@@ -21950,7 +22098,8 @@
|
|
|
21950
22098
|
},
|
|
21951
22099
|
["& .".concat(rowColClasses.row)]: {
|
|
21952
22100
|
flexWrap: 'nowrap',
|
|
21953
|
-
color:
|
|
22101
|
+
color: rowFontColor,
|
|
22102
|
+
backgroundColor: rowBackgroundColor
|
|
21954
22103
|
},
|
|
21955
22104
|
["& .".concat(rowColClasses.rowBorderBottom)]: {
|
|
21956
22105
|
borderBottom: isGridCol ? 'none' : "1px solid ".concat(theme.palette.divider),
|
|
@@ -21959,10 +22108,11 @@
|
|
|
21959
22108
|
["& .".concat(rowColClasses.column)]: {
|
|
21960
22109
|
flexWrap: 'nowrap',
|
|
21961
22110
|
borderRight: "1px solid ".concat(theme.palette.divider),
|
|
21962
|
-
color:
|
|
22111
|
+
color: rowFontColor
|
|
21963
22112
|
},
|
|
21964
22113
|
// The interior wrapper for all field content.
|
|
21965
22114
|
["& .".concat(rowColClasses.cell)]: {
|
|
22115
|
+
zIndex: 2,
|
|
21966
22116
|
display: 'flex',
|
|
21967
22117
|
alignItems: 'center',
|
|
21968
22118
|
flexGrow: 1,
|
|
@@ -21979,8 +22129,9 @@
|
|
|
21979
22129
|
userSelect: 'none',
|
|
21980
22130
|
paddingRight: '1px'
|
|
21981
22131
|
}, ellipsis), {}, {
|
|
21982
|
-
fontSize:
|
|
21983
|
-
fontFamily:
|
|
22132
|
+
fontSize: styles.content.fontSize,
|
|
22133
|
+
fontFamily: styles.content.fontFamily,
|
|
22134
|
+
color: rowFontColor
|
|
21984
22135
|
}),
|
|
21985
22136
|
["& .".concat(rowColClasses.labelDense)]: {
|
|
21986
22137
|
fontSize: 12
|
|
@@ -22014,32 +22165,32 @@
|
|
|
22014
22165
|
justifyContent: 'center',
|
|
22015
22166
|
width: iconWidth,
|
|
22016
22167
|
minWidth: iconWidth,
|
|
22017
|
-
maxWidth: iconWidth
|
|
22168
|
+
maxWidth: iconWidth,
|
|
22169
|
+
color: rowFontColor
|
|
22018
22170
|
},
|
|
22019
|
-
// Selection styles (S=Selected, XS=ExcludedSelected, A=
|
|
22020
|
-
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({},
|
|
22021
|
-
theme
|
|
22022
|
-
})), {}, {
|
|
22171
|
+
// Selection styles (S=Selected, XS=ExcludedSelected, A=Alternative, X=Excluded).
|
|
22172
|
+
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, selectStyle), {}, {
|
|
22023
22173
|
border: isGridMode ? 'none' : undefined
|
|
22024
22174
|
}),
|
|
22025
22175
|
["& .".concat(rowColClasses.XS)]: _objectSpread2(_objectSpread2({}, getSelectedStyle({
|
|
22026
|
-
theme
|
|
22176
|
+
theme,
|
|
22177
|
+
styles,
|
|
22178
|
+
selectedState: 'selectedExcluded'
|
|
22027
22179
|
})), {}, {
|
|
22028
|
-
background: theme.palette.selected.excluded,
|
|
22029
|
-
color: theme.palette.selected.excludedContrastText,
|
|
22030
22180
|
border: isGridMode ? 'none' : undefined
|
|
22031
22181
|
}),
|
|
22032
|
-
["& .".concat(rowColClasses.A)]: {
|
|
22033
|
-
|
|
22034
|
-
|
|
22182
|
+
["& .".concat(rowColClasses.A)]: _objectSpread2(_objectSpread2({}, getSelectedStyle({
|
|
22183
|
+
theme,
|
|
22184
|
+
styles,
|
|
22185
|
+
selectedState: 'alternative'
|
|
22186
|
+
})), {}, {
|
|
22035
22187
|
border: isGridMode ? 'none' : undefined
|
|
22036
|
-
},
|
|
22037
|
-
["& .".concat(rowColClasses.X)]: {
|
|
22038
|
-
background: theme.palette.selected.excluded,
|
|
22039
|
-
color: theme.palette.selected.excludedContrastText,
|
|
22188
|
+
}),
|
|
22189
|
+
["& .".concat(rowColClasses.X)]: _objectSpread2(_objectSpread2({}, excludedSelectStyle), {}, {
|
|
22040
22190
|
border: isGridMode ? 'none' : undefined
|
|
22041
|
-
},
|
|
22191
|
+
}),
|
|
22042
22192
|
["& .".concat(rowColClasses.frequencyCount)]: _objectSpread2(_objectSpread2({
|
|
22193
|
+
zIndex: 3,
|
|
22043
22194
|
justifyContent: 'flex-end'
|
|
22044
22195
|
}, ellipsis), {}, {
|
|
22045
22196
|
flex: "0 0 ".concat(getFreqFlexBasis({
|
|
@@ -22067,7 +22218,7 @@
|
|
|
22067
22218
|
["& .".concat(rowColClasses.bar)]: {
|
|
22068
22219
|
height: dense ? '16px' : '20px',
|
|
22069
22220
|
position: 'absolute',
|
|
22070
|
-
zIndex:
|
|
22221
|
+
zIndex: 1,
|
|
22071
22222
|
alignSelf: 'center',
|
|
22072
22223
|
left: barPadPx,
|
|
22073
22224
|
width: "calc(100% - ".concat(barPadPx * 2, "px)"),
|
|
@@ -22082,7 +22233,6 @@
|
|
|
22082
22233
|
}
|
|
22083
22234
|
},
|
|
22084
22235
|
["& .".concat(rowColClasses.barSelected)]: {
|
|
22085
|
-
zIndex: '0',
|
|
22086
22236
|
'& .bar-filled': {
|
|
22087
22237
|
opacity: '30%',
|
|
22088
22238
|
background: theme.palette.background.lighter
|
|
@@ -22094,8 +22244,9 @@
|
|
|
22094
22244
|
},
|
|
22095
22245
|
["& .".concat(rowColClasses.barSelectedWithCheckbox)]: {
|
|
22096
22246
|
'& .bar-filled': {
|
|
22097
|
-
|
|
22098
|
-
|
|
22247
|
+
opacity: '30%',
|
|
22248
|
+
background: selectStyle.background || '#BFE5D0',
|
|
22249
|
+
borderColor: selectStyle.background || '#BFE5D0'
|
|
22099
22250
|
}
|
|
22100
22251
|
},
|
|
22101
22252
|
["& .".concat(rowColClasses.excludedTextWithCheckbox)]: {
|
|
@@ -22118,9 +22269,12 @@
|
|
|
22118
22269
|
checkbox: "".concat(PREFIX$b, "-checkbox"),
|
|
22119
22270
|
dense: "".concat(PREFIX$b, "-dense")
|
|
22120
22271
|
};
|
|
22121
|
-
const StyledCheckbox = styled$1(Checkbox$1
|
|
22272
|
+
const StyledCheckbox = styled$1(Checkbox$1, {
|
|
22273
|
+
shouldForwardProp: p => p !== 'styles'
|
|
22274
|
+
})(_ref => {
|
|
22122
22275
|
let {
|
|
22123
|
-
theme
|
|
22276
|
+
theme,
|
|
22277
|
+
styles
|
|
22124
22278
|
} = _ref;
|
|
22125
22279
|
return {
|
|
22126
22280
|
["& .".concat(classes$b.cbIcon)]: {
|
|
@@ -22136,7 +22290,7 @@
|
|
|
22136
22290
|
},
|
|
22137
22291
|
["& .".concat(classes$b.cbIconChecked)]: {
|
|
22138
22292
|
borderRadius,
|
|
22139
|
-
backgroundColor:
|
|
22293
|
+
backgroundColor: styles.selections.selected,
|
|
22140
22294
|
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
|
22141
22295
|
'&:before': {
|
|
22142
22296
|
display: 'block',
|
|
@@ -22185,6 +22339,7 @@
|
|
|
22185
22339
|
label,
|
|
22186
22340
|
dense,
|
|
22187
22341
|
excluded,
|
|
22342
|
+
styles,
|
|
22188
22343
|
showGray = true,
|
|
22189
22344
|
dataN
|
|
22190
22345
|
} = _ref2;
|
|
@@ -22202,7 +22357,8 @@
|
|
|
22202
22357
|
icon: getIcon(classes$b, showGray, excluded),
|
|
22203
22358
|
checkedIcon: /*#__PURE__*/React.createElement("span", {
|
|
22204
22359
|
className: classes$b.cbIconChecked
|
|
22205
|
-
})
|
|
22360
|
+
}),
|
|
22361
|
+
styles: styles
|
|
22206
22362
|
});
|
|
22207
22363
|
}
|
|
22208
22364
|
|
|
@@ -22254,7 +22410,6 @@
|
|
|
22254
22410
|
function ValueField(_ref) {
|
|
22255
22411
|
let {
|
|
22256
22412
|
label,
|
|
22257
|
-
color,
|
|
22258
22413
|
dense,
|
|
22259
22414
|
showGray = true,
|
|
22260
22415
|
checkboxes,
|
|
@@ -22268,7 +22423,6 @@
|
|
|
22268
22423
|
cell,
|
|
22269
22424
|
checkboxes
|
|
22270
22425
|
}) && rowColClasses.excludedTextWithCheckbox]),
|
|
22271
|
-
color: color,
|
|
22272
22426
|
align: valueTextAlign,
|
|
22273
22427
|
dir: "auto"
|
|
22274
22428
|
}, /*#__PURE__*/React.createElement("span", null, label));
|
|
@@ -22302,7 +22456,6 @@
|
|
|
22302
22456
|
let {
|
|
22303
22457
|
onChange,
|
|
22304
22458
|
label,
|
|
22305
|
-
color,
|
|
22306
22459
|
qElemNumber,
|
|
22307
22460
|
isSelected,
|
|
22308
22461
|
dense,
|
|
@@ -22311,7 +22464,8 @@
|
|
|
22311
22464
|
showGray,
|
|
22312
22465
|
isSingleSelect,
|
|
22313
22466
|
checkboxes,
|
|
22314
|
-
valueTextAlign
|
|
22467
|
+
valueTextAlign,
|
|
22468
|
+
styles
|
|
22315
22469
|
} = _ref;
|
|
22316
22470
|
const cb = /*#__PURE__*/React.createElement(ListboxCheckbox, {
|
|
22317
22471
|
onChange: onChange,
|
|
@@ -22321,7 +22475,8 @@
|
|
|
22321
22475
|
excluded: isExcluded(cell),
|
|
22322
22476
|
isGridCol: isGridCol,
|
|
22323
22477
|
showGray: showGray,
|
|
22324
|
-
dataN: qElemNumber
|
|
22478
|
+
dataN: qElemNumber,
|
|
22479
|
+
styles: styles
|
|
22325
22480
|
});
|
|
22326
22481
|
const rb = /*#__PURE__*/React.createElement(ListBoxRadioButton, {
|
|
22327
22482
|
onChange: onChange,
|
|
@@ -22331,12 +22486,10 @@
|
|
|
22331
22486
|
dataN: qElemNumber
|
|
22332
22487
|
});
|
|
22333
22488
|
return /*#__PURE__*/React.createElement(FormControlLabel$1, {
|
|
22334
|
-
color: color,
|
|
22335
22489
|
control: isSingleSelect ? rb : cb,
|
|
22336
22490
|
className: rowColClasses.checkboxLabel,
|
|
22337
22491
|
label: /*#__PURE__*/React.createElement(LabelTag, {
|
|
22338
22492
|
label: label,
|
|
22339
|
-
color: color,
|
|
22340
22493
|
dense: dense,
|
|
22341
22494
|
showGray: showGray,
|
|
22342
22495
|
checkboxes: checkboxes,
|
|
@@ -22375,13 +22528,13 @@
|
|
|
22375
22528
|
checkboxes,
|
|
22376
22529
|
dense,
|
|
22377
22530
|
showGray,
|
|
22378
|
-
color,
|
|
22379
22531
|
qElemNumber,
|
|
22380
22532
|
isSelected,
|
|
22381
22533
|
cell,
|
|
22382
22534
|
isGridCol,
|
|
22383
22535
|
isSingleSelect,
|
|
22384
|
-
valueTextAlign
|
|
22536
|
+
valueTextAlign,
|
|
22537
|
+
styles
|
|
22385
22538
|
} = _ref3;
|
|
22386
22539
|
const LWR = /*#__PURE__*/React.createElement(LabelsWithRanges, {
|
|
22387
22540
|
labels: labels,
|
|
@@ -22392,7 +22545,6 @@
|
|
|
22392
22545
|
return checkboxes ? /*#__PURE__*/React.createElement(CheckboxField, {
|
|
22393
22546
|
onChange: onChange,
|
|
22394
22547
|
label: LWR,
|
|
22395
|
-
color: color,
|
|
22396
22548
|
qElemNumber: qElemNumber,
|
|
22397
22549
|
isSelected: isSelected,
|
|
22398
22550
|
dense: dense,
|
|
@@ -22401,7 +22553,8 @@
|
|
|
22401
22553
|
showGray: showGray,
|
|
22402
22554
|
isSingleSelect: isSingleSelect,
|
|
22403
22555
|
checkboxes: checkboxes,
|
|
22404
|
-
valueTextAlign: valueTextAlign
|
|
22556
|
+
valueTextAlign: valueTextAlign,
|
|
22557
|
+
styles: styles
|
|
22405
22558
|
}) : LWR;
|
|
22406
22559
|
}
|
|
22407
22560
|
|
|
@@ -22409,7 +22562,6 @@
|
|
|
22409
22562
|
let {
|
|
22410
22563
|
onChange,
|
|
22411
22564
|
label,
|
|
22412
|
-
color,
|
|
22413
22565
|
qElemNumber,
|
|
22414
22566
|
isSelected,
|
|
22415
22567
|
dense,
|
|
@@ -22418,12 +22570,12 @@
|
|
|
22418
22570
|
showGray,
|
|
22419
22571
|
isSingleSelect,
|
|
22420
22572
|
checkboxes,
|
|
22421
|
-
valueTextAlign
|
|
22573
|
+
valueTextAlign,
|
|
22574
|
+
styles
|
|
22422
22575
|
} = _ref;
|
|
22423
22576
|
return checkboxes ? /*#__PURE__*/React.createElement(CheckboxField, {
|
|
22424
22577
|
onChange: onChange,
|
|
22425
22578
|
label: label,
|
|
22426
|
-
color: color,
|
|
22427
22579
|
qElemNumber: qElemNumber,
|
|
22428
22580
|
isSelected: isSelected,
|
|
22429
22581
|
dense: dense,
|
|
@@ -22432,10 +22584,10 @@
|
|
|
22432
22584
|
showGray: showGray,
|
|
22433
22585
|
isSingleSelect: isSingleSelect,
|
|
22434
22586
|
checkboxes: checkboxes,
|
|
22435
|
-
valueTextAlign: valueTextAlign
|
|
22587
|
+
valueTextAlign: valueTextAlign,
|
|
22588
|
+
styles: styles
|
|
22436
22589
|
}) : /*#__PURE__*/React.createElement(ValueField, {
|
|
22437
22590
|
label: label,
|
|
22438
|
-
color: color,
|
|
22439
22591
|
dense: dense,
|
|
22440
22592
|
showGray: true,
|
|
22441
22593
|
checkboxes: checkboxes,
|
|
@@ -22691,13 +22843,13 @@
|
|
|
22691
22843
|
const getElementIndex = currentTarget => +currentTarget.getAttribute('data-n');
|
|
22692
22844
|
const focusSearch = container => {
|
|
22693
22845
|
const searchField = container === null || container === void 0 ? void 0 : container.querySelector('.search input');
|
|
22694
|
-
searchField === null || searchField === void 0
|
|
22846
|
+
searchField === null || searchField === void 0 || searchField.focus();
|
|
22695
22847
|
return searchField;
|
|
22696
22848
|
};
|
|
22697
22849
|
const focusRow = container => {
|
|
22698
22850
|
const row = container === null || container === void 0 ? void 0 : container.querySelector('.value.last-focused, .value.selector, .value');
|
|
22699
|
-
row === null || row === void 0
|
|
22700
|
-
row === null || row === void 0
|
|
22851
|
+
row === null || row === void 0 || row.setAttribute('tabIndex', 0);
|
|
22852
|
+
row === null || row === void 0 || row.focus();
|
|
22701
22853
|
return row;
|
|
22702
22854
|
};
|
|
22703
22855
|
|
|
@@ -22879,18 +23031,18 @@
|
|
|
22879
23031
|
case KEYS.HOME:
|
|
22880
23032
|
focusListItems.setFirst(true);
|
|
22881
23033
|
if (ctrlKey) {
|
|
22882
|
-
setScrollPosition === null || setScrollPosition === void 0
|
|
23034
|
+
setScrollPosition === null || setScrollPosition === void 0 || setScrollPosition('overflowStart');
|
|
22883
23035
|
break;
|
|
22884
23036
|
}
|
|
22885
|
-
setScrollPosition === null || setScrollPosition === void 0
|
|
23037
|
+
setScrollPosition === null || setScrollPosition === void 0 || setScrollPosition('start');
|
|
22886
23038
|
break;
|
|
22887
23039
|
case KEYS.END:
|
|
22888
23040
|
focusListItems.setLast(true);
|
|
22889
23041
|
if (ctrlKey) {
|
|
22890
|
-
setScrollPosition === null || setScrollPosition === void 0
|
|
23042
|
+
setScrollPosition === null || setScrollPosition === void 0 || setScrollPosition('overflowEnd');
|
|
22891
23043
|
break;
|
|
22892
23044
|
}
|
|
22893
|
-
setScrollPosition === null || setScrollPosition === void 0
|
|
23045
|
+
setScrollPosition === null || setScrollPosition === void 0 || setScrollPosition('end');
|
|
22894
23046
|
break;
|
|
22895
23047
|
case KEYS.A:
|
|
22896
23048
|
if (ctrlKey || metaKey) {
|
|
@@ -22985,7 +23137,9 @@
|
|
|
22985
23137
|
sizes,
|
|
22986
23138
|
translator,
|
|
22987
23139
|
showSearch,
|
|
22988
|
-
isModal
|
|
23140
|
+
isModal,
|
|
23141
|
+
contentFontStyle,
|
|
23142
|
+
styles
|
|
22989
23143
|
} = data;
|
|
22990
23144
|
const {
|
|
22991
23145
|
dense = false,
|
|
@@ -22996,7 +23150,7 @@
|
|
|
22996
23150
|
itemPadding
|
|
22997
23151
|
} = sizes;
|
|
22998
23152
|
let cellIndex;
|
|
22999
|
-
let
|
|
23153
|
+
let styleOverrides;
|
|
23000
23154
|
const count = {
|
|
23001
23155
|
max: null,
|
|
23002
23156
|
currentIndex: null
|
|
@@ -23012,7 +23166,7 @@
|
|
|
23012
23166
|
count.currentIndex = columnIndex;
|
|
23013
23167
|
}
|
|
23014
23168
|
const padding = 0;
|
|
23015
|
-
|
|
23169
|
+
styleOverrides = _objectSpread2(_objectSpread2({}, style), {}, {
|
|
23016
23170
|
left: padding + (columnIndex === 0 ? style.left : Number(style.left) + columnIndex * padding),
|
|
23017
23171
|
// right: columnIndex === columnCount ? style.right : Number(style.right) + columnIndex * padding,
|
|
23018
23172
|
top: rowIndex === 0 ? style.top : Number(style.top) + rowIndex * padding
|
|
@@ -23021,7 +23175,7 @@
|
|
|
23021
23175
|
cellIndex = index;
|
|
23022
23176
|
count.max = listCount;
|
|
23023
23177
|
count.currentIndex = index;
|
|
23024
|
-
|
|
23178
|
+
styleOverrides = _objectSpread2({}, style);
|
|
23025
23179
|
}
|
|
23026
23180
|
cellIndex += dataOffset;
|
|
23027
23181
|
const [rowRef, setRowRef] = reactExports.useState(null);
|
|
@@ -23111,7 +23265,8 @@
|
|
|
23111
23265
|
return /*#__PURE__*/React.createElement(RowColRoot$1, {
|
|
23112
23266
|
className: rowColClasses.barContainer,
|
|
23113
23267
|
checkboxes: checkboxes,
|
|
23114
|
-
style:
|
|
23268
|
+
style: styleOverrides,
|
|
23269
|
+
styles: styles,
|
|
23115
23270
|
isGridCol: isGridCol,
|
|
23116
23271
|
isGridMode: dataLayout === 'grid',
|
|
23117
23272
|
dense: dense,
|
|
@@ -23119,6 +23274,7 @@
|
|
|
23119
23274
|
sizes: sizes,
|
|
23120
23275
|
frequencyMode: deducedFrequencyMode,
|
|
23121
23276
|
freqHitsValue: freqHitsValue,
|
|
23277
|
+
contentFontStyle: contentFontStyle,
|
|
23122
23278
|
"data-testid": "listbox.item"
|
|
23123
23279
|
}, /*#__PURE__*/React.createElement(ItemGrid, {
|
|
23124
23280
|
role: "row",
|
|
@@ -23165,18 +23321,16 @@
|
|
|
23165
23321
|
checkboxes: checkboxes,
|
|
23166
23322
|
dense: dense,
|
|
23167
23323
|
showGray: showGray,
|
|
23168
|
-
color: "inherit" // TODO: Check this
|
|
23169
|
-
,
|
|
23170
23324
|
qElemNumber: cell.qElemNumber,
|
|
23171
23325
|
isSelected: isSelected,
|
|
23172
23326
|
cell: cell,
|
|
23173
23327
|
isGridCol: isGridCol,
|
|
23174
23328
|
isSingleSelect: isSingleSelect,
|
|
23175
|
-
valueTextAlign: valueTextAlign
|
|
23329
|
+
valueTextAlign: valueTextAlign,
|
|
23330
|
+
styles: styles
|
|
23176
23331
|
}) : /*#__PURE__*/React.createElement(Field$1, {
|
|
23177
23332
|
onChange: onChange,
|
|
23178
23333
|
label: label,
|
|
23179
|
-
color: "inherit",
|
|
23180
23334
|
qElemNumber: cell.qElemNumber,
|
|
23181
23335
|
isSelected: isSelected,
|
|
23182
23336
|
dense: dense,
|
|
@@ -23185,7 +23339,8 @@
|
|
|
23185
23339
|
showGray: showGray,
|
|
23186
23340
|
isSingleSelect: isSingleSelect,
|
|
23187
23341
|
checkboxes: checkboxes,
|
|
23188
|
-
valueTextAlign: valueTextAlign
|
|
23342
|
+
valueTextAlign: valueTextAlign,
|
|
23343
|
+
styles: styles
|
|
23189
23344
|
})), freqIsAllowed && /*#__PURE__*/React.createElement(Frequency, {
|
|
23190
23345
|
cell: cell,
|
|
23191
23346
|
checkboxes: checkboxes,
|
|
@@ -24765,7 +24920,8 @@
|
|
|
24765
24920
|
freqIsAllowed,
|
|
24766
24921
|
translator,
|
|
24767
24922
|
showSearch,
|
|
24768
|
-
isModal
|
|
24923
|
+
isModal,
|
|
24924
|
+
styles
|
|
24769
24925
|
} = _ref;
|
|
24770
24926
|
const {
|
|
24771
24927
|
layoutOptions = {}
|
|
@@ -24819,7 +24975,8 @@
|
|
|
24819
24975
|
direction,
|
|
24820
24976
|
translator,
|
|
24821
24977
|
showSearch,
|
|
24822
|
-
isModal
|
|
24978
|
+
isModal,
|
|
24979
|
+
styles
|
|
24823
24980
|
});
|
|
24824
24981
|
const List = _ref2 => {
|
|
24825
24982
|
let {
|
|
@@ -24950,6 +25107,7 @@
|
|
|
24950
25107
|
} else {
|
|
24951
25108
|
rowCount = Math.min(listCount, maxRows, autoRowCount);
|
|
24952
25109
|
}
|
|
25110
|
+
rowCount = Math.max(rowCount, 1);
|
|
24953
25111
|
const columnCount = Math.ceil(listCount / rowCount);
|
|
24954
25112
|
const columnWidth = Math.max(columnAutoWidth, containerWidth / columnCount, itemMinWidth);
|
|
24955
25113
|
return {
|
|
@@ -24976,6 +25134,7 @@
|
|
|
24976
25134
|
} else {
|
|
24977
25135
|
columnCount = Math.min(listCount, maxColumns, autoColumnCount);
|
|
24978
25136
|
}
|
|
25137
|
+
columnCount = Math.max(columnCount, 1);
|
|
24979
25138
|
const columnWidth = innerWidth / columnCount;
|
|
24980
25139
|
const rowCount = Math.ceil(listCount / columnCount);
|
|
24981
25140
|
return {
|
|
@@ -25015,7 +25174,6 @@
|
|
|
25015
25174
|
}
|
|
25016
25175
|
|
|
25017
25176
|
function useListSizes(_ref) {
|
|
25018
|
-
var _theme$listBox;
|
|
25019
25177
|
let {
|
|
25020
25178
|
layout,
|
|
25021
25179
|
width,
|
|
@@ -25024,7 +25182,7 @@
|
|
|
25024
25182
|
count,
|
|
25025
25183
|
freqIsAllowed,
|
|
25026
25184
|
checkboxes,
|
|
25027
|
-
|
|
25185
|
+
styles
|
|
25028
25186
|
} = _ref;
|
|
25029
25187
|
const {
|
|
25030
25188
|
layoutOptions = {}
|
|
@@ -25039,7 +25197,7 @@
|
|
|
25039
25197
|
const {
|
|
25040
25198
|
fontSize = '12px',
|
|
25041
25199
|
fontFamily = 'Source sans pro'
|
|
25042
|
-
} = (
|
|
25200
|
+
} = (styles === null || styles === void 0 ? void 0 : styles.content) || {};
|
|
25043
25201
|
const font = "".concat(fontSize, " ").concat(fontFamily); // font format as supported by HTML canvas
|
|
25044
25202
|
const textWidth = useTextWidth({
|
|
25045
25203
|
text: getMeasureText(layout),
|
|
@@ -25071,9 +25229,8 @@
|
|
|
25071
25229
|
let rowCount;
|
|
25072
25230
|
const isGridMode = dataLayout === 'grid';
|
|
25073
25231
|
const itemPadding = 4;
|
|
25074
|
-
const
|
|
25075
|
-
|
|
25076
|
-
let itemHeight = dense ? denseItemHeight : normalItemHeight;
|
|
25232
|
+
const normalItemHeight = isGridMode ? GRID_ROW_HEIGHT : LIST_ROW_HEIGHT;
|
|
25233
|
+
let itemHeight = dense ? DENSE_ROW_HEIGHT : normalItemHeight;
|
|
25077
25234
|
if (isGridMode) {
|
|
25078
25235
|
// Emulate a margin between items using padding, since the list library
|
|
25079
25236
|
// needs an explicit row height and cannot handle margins.
|
|
@@ -25561,7 +25718,6 @@
|
|
|
25561
25718
|
model,
|
|
25562
25719
|
app,
|
|
25563
25720
|
constraints,
|
|
25564
|
-
theme,
|
|
25565
25721
|
layout,
|
|
25566
25722
|
selections,
|
|
25567
25723
|
selectionState,
|
|
@@ -25588,7 +25744,8 @@
|
|
|
25588
25744
|
renderedCallback,
|
|
25589
25745
|
onCtrlF,
|
|
25590
25746
|
showSearch,
|
|
25591
|
-
isModal
|
|
25747
|
+
isModal,
|
|
25748
|
+
styles
|
|
25592
25749
|
} = _ref;
|
|
25593
25750
|
const {
|
|
25594
25751
|
translator: translatorDynamic
|
|
@@ -25651,7 +25808,7 @@
|
|
|
25651
25808
|
const cardinal = layout === null || layout === void 0 ? void 0 : layout.qListObject.qDimensionInfo.qCardinal;
|
|
25652
25809
|
if (itemsLoader !== null && itemsLoader !== void 0 && itemsLoader.pages.length && !awaitingFrequencyMax || cardinal === 0) {
|
|
25653
25810
|
// All necessary data fetching done - signal rendering done!
|
|
25654
|
-
renderedCallback === null || renderedCallback === void 0
|
|
25811
|
+
renderedCallback === null || renderedCallback === void 0 || renderedCallback();
|
|
25655
25812
|
}
|
|
25656
25813
|
const isItemLoaded = reactExports.useCallback(index => {
|
|
25657
25814
|
if (!(pages !== null && pages !== void 0 && pages.length) || !local.current.validPages) {
|
|
@@ -25744,7 +25901,7 @@
|
|
|
25744
25901
|
count,
|
|
25745
25902
|
freqIsAllowed,
|
|
25746
25903
|
checkboxes,
|
|
25747
|
-
|
|
25904
|
+
styles
|
|
25748
25905
|
});
|
|
25749
25906
|
if (sizes.columnWidth) {
|
|
25750
25907
|
// In grid mode, where we have a dynamic item width, get a second opinion on showing/hiding frequency.
|
|
@@ -25859,7 +26016,8 @@
|
|
|
25859
26016
|
freqIsAllowed,
|
|
25860
26017
|
translator: translatorDynamic,
|
|
25861
26018
|
showSearch,
|
|
25862
|
-
isModal
|
|
26019
|
+
isModal,
|
|
26020
|
+
styles
|
|
25863
26021
|
});
|
|
25864
26022
|
const {
|
|
25865
26023
|
columnWidth,
|
|
@@ -26235,7 +26393,7 @@
|
|
|
26235
26393
|
}), /*#__PURE__*/React.createElement(MenuList$1, {
|
|
26236
26394
|
id: "moreMenuList"
|
|
26237
26395
|
}, actions.map((item, ix) =>
|
|
26238
|
-
|
|
26396
|
+
|
|
26239
26397
|
// eslint-disable-next-line react/no-array-index-key
|
|
26240
26398
|
React.createElement(MoreItem, {
|
|
26241
26399
|
key: ix,
|
|
@@ -26404,7 +26562,7 @@
|
|
|
26404
26562
|
actionsRefMock = null,
|
|
26405
26563
|
// for testing
|
|
26406
26564
|
direction = 'ltr',
|
|
26407
|
-
autoConfirm
|
|
26565
|
+
autoConfirm = false
|
|
26408
26566
|
} = _ref3;
|
|
26409
26567
|
const defaultSelectionActions = useDefaultSelectionActions(selections);
|
|
26410
26568
|
const {
|
|
@@ -26451,14 +26609,7 @@
|
|
|
26451
26609
|
focusHandler.on('focus_toolbar_last', focusLast);
|
|
26452
26610
|
}, []);
|
|
26453
26611
|
if (autoConfirm) {
|
|
26454
|
-
|
|
26455
|
-
if (canConfirm) {
|
|
26456
|
-
const confirm = defaultSelectionActions.find(o => o.key === 'confirm') || {
|
|
26457
|
-
action: () => {}
|
|
26458
|
-
};
|
|
26459
|
-
confirm.action();
|
|
26460
|
-
}
|
|
26461
|
-
return null;
|
|
26612
|
+
return undefined;
|
|
26462
26613
|
}
|
|
26463
26614
|
let moreEnabled = more$1.enabled;
|
|
26464
26615
|
let moreActions = more$1.actions;
|
|
@@ -26535,13 +26686,15 @@
|
|
|
26535
26686
|
transformOrigin: popoverTransformOrigin,
|
|
26536
26687
|
hideBackdrop: true,
|
|
26537
26688
|
style: popoverStyle,
|
|
26538
|
-
|
|
26539
|
-
|
|
26540
|
-
|
|
26541
|
-
|
|
26542
|
-
|
|
26543
|
-
|
|
26544
|
-
|
|
26689
|
+
slotProps: {
|
|
26690
|
+
paper: {
|
|
26691
|
+
id: 'njs-action-toolbar-popover',
|
|
26692
|
+
'data-testid': 'njs-action-toolbar-popover',
|
|
26693
|
+
className: ActionToolbarElement.className,
|
|
26694
|
+
style: {
|
|
26695
|
+
pointerEvents: 'auto',
|
|
26696
|
+
padding: theme.spacing(0.5, 0.25)
|
|
26697
|
+
}
|
|
26545
26698
|
}
|
|
26546
26699
|
}
|
|
26547
26700
|
}, Actions) : show && Actions;
|
|
@@ -26559,22 +26712,24 @@
|
|
|
26559
26712
|
|
|
26560
26713
|
const TREE_PATH = '/qListObjectDef';
|
|
26561
26714
|
const WILDCARD = '**';
|
|
26562
|
-
const StyledInputAdornment = styled$1(InputAdornment$1
|
|
26563
|
-
|
|
26715
|
+
const StyledInputAdornment = styled$1(InputAdornment$1, {
|
|
26716
|
+
shouldForwardProp: p => p !== 'styles'
|
|
26717
|
+
})(_ref => {
|
|
26564
26718
|
let {
|
|
26565
|
-
|
|
26719
|
+
styles
|
|
26566
26720
|
} = _ref;
|
|
26567
26721
|
return {
|
|
26568
|
-
color:
|
|
26722
|
+
color: styles.content.color
|
|
26569
26723
|
};
|
|
26570
26724
|
});
|
|
26571
|
-
const StyledOutlinedInput = styled$1(OutlinedInput$1
|
|
26572
|
-
|
|
26725
|
+
const StyledOutlinedInput = styled$1(OutlinedInput$1, {
|
|
26726
|
+
shouldForwardProp: p => p !== 'styles'
|
|
26727
|
+
})(_ref2 => {
|
|
26573
26728
|
let {
|
|
26574
|
-
|
|
26729
|
+
styles
|
|
26575
26730
|
} = _ref2;
|
|
26576
26731
|
return {
|
|
26577
|
-
color:
|
|
26732
|
+
color: styles.content.color,
|
|
26578
26733
|
display: 'flex'
|
|
26579
26734
|
};
|
|
26580
26735
|
});
|
|
@@ -26590,7 +26745,8 @@
|
|
|
26590
26745
|
wildCardSearch = false,
|
|
26591
26746
|
searchEnabled,
|
|
26592
26747
|
direction,
|
|
26593
|
-
hide
|
|
26748
|
+
hide,
|
|
26749
|
+
styles
|
|
26594
26750
|
} = _ref3;
|
|
26595
26751
|
const {
|
|
26596
26752
|
translator
|
|
@@ -26672,7 +26828,7 @@
|
|
|
26672
26828
|
function focusRow(container) {
|
|
26673
26829
|
const row = (container === null || container === void 0 ? void 0 : container.querySelector('.last-focused')) || (container === null || container === void 0 ? void 0 : container.querySelector('[role="row"]:first-child'));
|
|
26674
26830
|
row.setAttribute('tabIndex', 0);
|
|
26675
|
-
row === null || row === void 0
|
|
26831
|
+
row === null || row === void 0 || row.focus();
|
|
26676
26832
|
}
|
|
26677
26833
|
const onKeyDown = async e => {
|
|
26678
26834
|
const {
|
|
@@ -26698,7 +26854,7 @@
|
|
|
26698
26854
|
focusRow(container);
|
|
26699
26855
|
|
|
26700
26856
|
// Clean up.
|
|
26701
|
-
container === null || container === void 0
|
|
26857
|
+
container === null || container === void 0 || container.querySelectorAll('.last-focused').forEach(elm => {
|
|
26702
26858
|
elm.classList.remove('last-focused');
|
|
26703
26859
|
});
|
|
26704
26860
|
}
|
|
@@ -26727,8 +26883,10 @@
|
|
|
26727
26883
|
return null;
|
|
26728
26884
|
}
|
|
26729
26885
|
return /*#__PURE__*/React.createElement(StyledOutlinedInput, {
|
|
26886
|
+
styles: styles,
|
|
26730
26887
|
startAdornment: /*#__PURE__*/React.createElement(StyledInputAdornment, {
|
|
26731
|
-
position: "start"
|
|
26888
|
+
position: "start",
|
|
26889
|
+
styles: styles
|
|
26732
26890
|
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
26733
26891
|
size: dense ? 'small' : 'normal'
|
|
26734
26892
|
})),
|
|
@@ -27007,12 +27165,12 @@
|
|
|
27007
27165
|
activateClickOut() {
|
|
27008
27166
|
var _options$onSelectionA;
|
|
27009
27167
|
document.addEventListener('mousedown', handler);
|
|
27010
|
-
options === null || options === void 0 || (_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0
|
|
27168
|
+
options === null || options === void 0 || (_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0 || _options$onSelectionA.call(options);
|
|
27011
27169
|
},
|
|
27012
27170
|
deactivateClickOut() {
|
|
27013
27171
|
var _options$onSelectionD;
|
|
27014
27172
|
document.removeEventListener('mousedown', handler);
|
|
27015
|
-
options === null || options === void 0 || (_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0
|
|
27173
|
+
options === null || options === void 0 || (_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0 || _options$onSelectionD.call(options);
|
|
27016
27174
|
}
|
|
27017
27175
|
};
|
|
27018
27176
|
};
|
|
@@ -27137,7 +27295,7 @@
|
|
|
27137
27295
|
if (selected && !additive) {
|
|
27138
27296
|
state.itemStates[elementNumber] = false;
|
|
27139
27297
|
} else if (!selected) {
|
|
27140
|
-
selectedValues === null || selectedValues === void 0
|
|
27298
|
+
selectedValues === null || selectedValues === void 0 || selectedValues.push(elementNumber);
|
|
27141
27299
|
state.itemStates[elementNumber] = true;
|
|
27142
27300
|
}
|
|
27143
27301
|
},
|
|
@@ -27191,6 +27349,104 @@
|
|
|
27191
27349
|
return totalCounts > 0;
|
|
27192
27350
|
}
|
|
27193
27351
|
|
|
27352
|
+
const LIGHT = '#FFF';
|
|
27353
|
+
const DARK = '#000';
|
|
27354
|
+
function getContrastingColor(backgroundColor) {
|
|
27355
|
+
let desiredTextColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
27356
|
+
let dark = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DARK;
|
|
27357
|
+
let light = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : LIGHT;
|
|
27358
|
+
const CONTRAST_THRESHOLD = 3.0;
|
|
27359
|
+
let contrastingColor;
|
|
27360
|
+
if (desiredTextColor && getContrastRatio(desiredTextColor, backgroundColor) > CONTRAST_THRESHOLD) {
|
|
27361
|
+
contrastingColor = desiredTextColor;
|
|
27362
|
+
} else {
|
|
27363
|
+
contrastingColor = getContrastRatio(light, backgroundColor) > CONTRAST_THRESHOLD ? light : dark;
|
|
27364
|
+
}
|
|
27365
|
+
return contrastingColor;
|
|
27366
|
+
}
|
|
27367
|
+
const SUPPORTED_COMPONENTS = ['theme', 'selections'];
|
|
27368
|
+
function getOverridesAsObject() {
|
|
27369
|
+
let components = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
27370
|
+
// Currently supporting components "theme" and "selections".
|
|
27371
|
+
const overrides = {};
|
|
27372
|
+
components.forEach(c => {
|
|
27373
|
+
const k = c === null || c === void 0 ? void 0 : c.key;
|
|
27374
|
+
if (SUPPORTED_COMPONENTS.includes(k)) {
|
|
27375
|
+
overrides[k] = c;
|
|
27376
|
+
}
|
|
27377
|
+
});
|
|
27378
|
+
return overrides;
|
|
27379
|
+
}
|
|
27380
|
+
function getSelectionColors(theme, getListboxStyle, overrides) {
|
|
27381
|
+
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;
|
|
27382
|
+
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);
|
|
27383
|
+
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;
|
|
27384
|
+
|
|
27385
|
+
// Background colors
|
|
27386
|
+
const selectionColors = ((_overrides$selections = overrides.selections) === null || _overrides$selections === void 0 ? void 0 : _overrides$selections.colors) || {};
|
|
27387
|
+
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';
|
|
27388
|
+
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';
|
|
27389
|
+
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';
|
|
27390
|
+
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';
|
|
27391
|
+
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';
|
|
27392
|
+
|
|
27393
|
+
// Font colors
|
|
27394
|
+
let selectedContrast = desiredTextColor || ((_theme$palette7 = theme.palette) === null || _theme$palette7 === void 0 ? void 0 : _theme$palette7.selected.main);
|
|
27395
|
+
let alternativeContrast = desiredTextColor || ((_theme$palette8 = theme.palette) === null || _theme$palette8 === void 0 ? void 0 : _theme$palette8.selected.alternativeContrastText);
|
|
27396
|
+
let excludedContrast = desiredTextColor || ((_theme$palette9 = theme.palette) === null || _theme$palette9 === void 0 ? void 0 : _theme$palette9.selected.excludedContrastText);
|
|
27397
|
+
let selectedExcludedContrast = desiredTextColor || ((_theme$palette10 = theme.palette) === null || _theme$palette10 === void 0 ? void 0 : _theme$palette10.selected.selectedExcludedContrastText);
|
|
27398
|
+
let possibleContrast = desiredTextColor || ((_theme$palette11 = theme.palette) === null || _theme$palette11 === void 0 ? void 0 : _theme$palette11.selected.possibleContrastText);
|
|
27399
|
+
if (useContrastTextColor) {
|
|
27400
|
+
// Override preferred text color if it does not contrast enough with the background color.
|
|
27401
|
+
selectedContrast = getContrastingColor(selected, desiredTextColor);
|
|
27402
|
+
alternativeContrast = getContrastingColor(alternative, desiredTextColor);
|
|
27403
|
+
excludedContrast = getContrastingColor(excluded, desiredTextColor);
|
|
27404
|
+
selectedExcludedContrast = getContrastingColor(selectedExcluded, desiredTextColor);
|
|
27405
|
+
possibleContrast = getContrastingColor(possible, desiredTextColor);
|
|
27406
|
+
}
|
|
27407
|
+
return {
|
|
27408
|
+
selected,
|
|
27409
|
+
alternative,
|
|
27410
|
+
excluded,
|
|
27411
|
+
selectedExcluded,
|
|
27412
|
+
possible,
|
|
27413
|
+
selectedContrast,
|
|
27414
|
+
alternativeContrast,
|
|
27415
|
+
excludedContrast,
|
|
27416
|
+
selectedExcludedContrast,
|
|
27417
|
+
possibleContrast
|
|
27418
|
+
};
|
|
27419
|
+
}
|
|
27420
|
+
function getStyles(_ref) {
|
|
27421
|
+
var _themeOverrides$heade, _themeOverrides$heade2, _themeOverrides$conte;
|
|
27422
|
+
let {
|
|
27423
|
+
themeApi,
|
|
27424
|
+
theme,
|
|
27425
|
+
components = [],
|
|
27426
|
+
checkboxes = false
|
|
27427
|
+
} = _ref;
|
|
27428
|
+
const overrides = getOverridesAsObject(components);
|
|
27429
|
+
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
27430
|
+
const selections = getSelectionColors(theme, getListboxStyle, overrides);
|
|
27431
|
+
const themeOverrides = overrides.theme || {};
|
|
27432
|
+
return {
|
|
27433
|
+
backgroundColor: getListboxStyle('', 'backgroundColor') || theme.palette.background.default,
|
|
27434
|
+
header: {
|
|
27435
|
+
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'),
|
|
27436
|
+
fontSize: ((_themeOverrides$heade2 = themeOverrides.header) === null || _themeOverrides$heade2 === void 0 ? void 0 : _themeOverrides$heade2.fontSize) || getListboxStyle('title.main', 'fontSize'),
|
|
27437
|
+
fontFamily: getListboxStyle('title.main', 'fontFamily'),
|
|
27438
|
+
fontWeight: getListboxStyle('title.main', 'fontWeight') || 'bold'
|
|
27439
|
+
},
|
|
27440
|
+
content: {
|
|
27441
|
+
backgroundColor: checkboxes ? undefined : selections.possible,
|
|
27442
|
+
color: selections.possibleContrast || getListboxStyle('content', 'color'),
|
|
27443
|
+
fontSize: ((_themeOverrides$conte = themeOverrides.content) === null || _themeOverrides$conte === void 0 ? void 0 : _themeOverrides$conte.fontSize) || getListboxStyle('content', 'fontSize'),
|
|
27444
|
+
fontFamily: getListboxStyle('content', 'fontFamily')
|
|
27445
|
+
},
|
|
27446
|
+
selections
|
|
27447
|
+
};
|
|
27448
|
+
}
|
|
27449
|
+
|
|
27194
27450
|
function ListBoxPopover(_ref) {
|
|
27195
27451
|
let {
|
|
27196
27452
|
alignTo,
|
|
@@ -27207,7 +27463,9 @@
|
|
|
27207
27463
|
app,
|
|
27208
27464
|
fieldName,
|
|
27209
27465
|
stateName = '$',
|
|
27210
|
-
autoFocus
|
|
27466
|
+
autoFocus,
|
|
27467
|
+
components,
|
|
27468
|
+
checkboxes: checkboxesOption
|
|
27211
27469
|
} = _ref;
|
|
27212
27470
|
const isMasterDim = Boolean(fieldName === null || fieldName === void 0 ? void 0 : fieldName.qLibraryId);
|
|
27213
27471
|
const open = show && Boolean(alignTo.current);
|
|
@@ -27246,13 +27504,23 @@
|
|
|
27246
27504
|
model.unlock('/qListObjectDef');
|
|
27247
27505
|
}, [model]);
|
|
27248
27506
|
const {
|
|
27249
|
-
translator
|
|
27507
|
+
translator,
|
|
27508
|
+
themeApi
|
|
27250
27509
|
} = reactExports.useContext(InstanceContext);
|
|
27251
27510
|
const moreAlignTo = reactExports.useRef();
|
|
27252
27511
|
const containerRef = reactExports.useRef();
|
|
27253
27512
|
const [selections] = useObjectSelections(app, model, containerRef);
|
|
27254
27513
|
const [layout] = useLayout$1(model);
|
|
27255
27514
|
const [selectionState$1] = reactExports.useState(() => selectionState());
|
|
27515
|
+
const {
|
|
27516
|
+
checkboxes = checkboxesOption
|
|
27517
|
+
} = layout || {};
|
|
27518
|
+
const styles = getStyles({
|
|
27519
|
+
themeApi,
|
|
27520
|
+
theme,
|
|
27521
|
+
components,
|
|
27522
|
+
checkboxes
|
|
27523
|
+
});
|
|
27256
27524
|
reactExports.useEffect(() => {
|
|
27257
27525
|
if (selections && open) {
|
|
27258
27526
|
if (!selections.isModal(model)) {
|
|
@@ -27277,7 +27545,7 @@
|
|
|
27277
27545
|
});
|
|
27278
27546
|
const onCtrlF = () => {
|
|
27279
27547
|
const input = searchContainerRef.current.querySelector('input');
|
|
27280
|
-
input === null || input === void 0
|
|
27548
|
+
input === null || input === void 0 || input.focus();
|
|
27281
27549
|
};
|
|
27282
27550
|
const hasSelections$1 = hasSelections(layout);
|
|
27283
27551
|
return /*#__PURE__*/React.createElement(Popover$1, {
|
|
@@ -27349,6 +27617,7 @@
|
|
|
27349
27617
|
item: true,
|
|
27350
27618
|
ref: searchContainerRef
|
|
27351
27619
|
}, /*#__PURE__*/React.createElement(ListBoxSearch, {
|
|
27620
|
+
styles: styles,
|
|
27352
27621
|
visible: true,
|
|
27353
27622
|
model: model,
|
|
27354
27623
|
listCount: listCount,
|
|
@@ -27367,7 +27636,7 @@
|
|
|
27367
27636
|
direction: "ltr",
|
|
27368
27637
|
onSetListCount: c => setListCount(c),
|
|
27369
27638
|
onCtrlF: onCtrlF,
|
|
27370
|
-
|
|
27639
|
+
styles: styles
|
|
27371
27640
|
}))));
|
|
27372
27641
|
}
|
|
27373
27642
|
|
|
@@ -27651,7 +27920,7 @@
|
|
|
27651
27920
|
variant: "contained",
|
|
27652
27921
|
fullWidth: true
|
|
27653
27922
|
}, clearAllStates)), field.states.map((s, ix) =>
|
|
27654
|
-
|
|
27923
|
+
|
|
27655
27924
|
// eslint-disable-next-line react/no-array-index-key
|
|
27656
27925
|
React.createElement(ListItem$1, {
|
|
27657
27926
|
key: ix,
|
|
@@ -27829,7 +28098,7 @@
|
|
|
27829
28098
|
}, /*#__PURE__*/React.createElement(List$1, {
|
|
27830
28099
|
dense: true
|
|
27831
28100
|
}, items.map((s, ix) =>
|
|
27832
|
-
|
|
28101
|
+
|
|
27833
28102
|
// eslint-disable-next-line react/no-array-index-key
|
|
27834
28103
|
React.createElement(ListItem$1, {
|
|
27835
28104
|
key: ix,
|
|
@@ -28530,12 +28799,12 @@
|
|
|
28530
28799
|
var DrillDownIcon = (props => SvgIcon(drillDown(props)));
|
|
28531
28800
|
|
|
28532
28801
|
function removeInnnerTabStops(container) {
|
|
28533
|
-
container === null || container === void 0
|
|
28802
|
+
container === null || container === void 0 || container.querySelectorAll('[tabIndex="0"]').forEach(elm => {
|
|
28534
28803
|
elm.setAttribute('tabIndex', -1);
|
|
28535
28804
|
});
|
|
28536
28805
|
}
|
|
28537
28806
|
function removeLastFocused(container) {
|
|
28538
|
-
container === null || container === void 0
|
|
28807
|
+
container === null || container === void 0 || container.querySelectorAll('.last-focused').forEach(elm => {
|
|
28539
28808
|
elm.classList.remove('last-focused');
|
|
28540
28809
|
});
|
|
28541
28810
|
}
|
|
@@ -28583,13 +28852,13 @@
|
|
|
28583
28852
|
const firstRowElement = c === null || c === void 0 ? void 0 : c.querySelector('.value.selector, .value');
|
|
28584
28853
|
const confirmButton = c === null || c === void 0 ? void 0 : c.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
|
|
28585
28854
|
const elementToFocus = searchField || lastSelectedRow || firstRowElement || confirmButton;
|
|
28586
|
-
elementToFocus === null || elementToFocus === void 0
|
|
28587
|
-
elementToFocus === null || elementToFocus === void 0
|
|
28855
|
+
elementToFocus === null || elementToFocus === void 0 || elementToFocus.setAttribute('tabIndex', 0);
|
|
28856
|
+
elementToFocus === null || elementToFocus === void 0 || elementToFocus.focus();
|
|
28588
28857
|
},
|
|
28589
28858
|
focusSelection() {
|
|
28590
28859
|
const confirmButton = document.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
|
|
28591
|
-
confirmButton === null || confirmButton === void 0
|
|
28592
|
-
confirmButton === null || confirmButton === void 0
|
|
28860
|
+
confirmButton === null || confirmButton === void 0 || confirmButton.setAttribute('tabIndex', 0);
|
|
28861
|
+
confirmButton === null || confirmButton === void 0 || confirmButton.focus();
|
|
28593
28862
|
}
|
|
28594
28863
|
};
|
|
28595
28864
|
return keyboard;
|
|
@@ -28631,7 +28900,7 @@
|
|
|
28631
28900
|
keyboard.blur();
|
|
28632
28901
|
const c = currentTarget.closest('.listbox-container');
|
|
28633
28902
|
c.setAttribute('tabIndex', -1);
|
|
28634
|
-
c === null || c === void 0
|
|
28903
|
+
c === null || c === void 0 || c.focus();
|
|
28635
28904
|
}
|
|
28636
28905
|
};
|
|
28637
28906
|
const handleKeyDown = event => {
|
|
@@ -28746,26 +29015,6 @@
|
|
|
28746
29015
|
};
|
|
28747
29016
|
}
|
|
28748
29017
|
|
|
28749
|
-
const addListboxTheme = themeApi => {
|
|
28750
|
-
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
28751
|
-
return {
|
|
28752
|
-
backgroundColor: getListboxStyle('', 'backgroundColor'),
|
|
28753
|
-
title: {
|
|
28754
|
-
main: {
|
|
28755
|
-
color: getListboxStyle('title.main', 'color'),
|
|
28756
|
-
fontSize: getListboxStyle('title.main', 'fontSize'),
|
|
28757
|
-
fontFamily: getListboxStyle('title.main', 'fontFamily'),
|
|
28758
|
-
fontWeight: getListboxStyle('title.main', 'fontWeight')
|
|
28759
|
-
}
|
|
28760
|
-
},
|
|
28761
|
-
content: {
|
|
28762
|
-
color: getListboxStyle('content', 'color'),
|
|
28763
|
-
fontSize: getListboxStyle('content', 'fontSize'),
|
|
28764
|
-
fontFamily: getListboxStyle('content', 'fontFamily')
|
|
28765
|
-
}
|
|
28766
|
-
};
|
|
28767
|
-
};
|
|
28768
|
-
|
|
28769
29018
|
function showToolbarDetached(_ref) {
|
|
28770
29019
|
var _titleRef$current$cli, _titleRef$current, _titleRef$current2, _titleRef$current3;
|
|
28771
29020
|
let {
|
|
@@ -28794,11 +29043,9 @@
|
|
|
28794
29043
|
isLocked,
|
|
28795
29044
|
listboxSelectionToolbarItems,
|
|
28796
29045
|
selections,
|
|
28797
|
-
keyboard
|
|
28798
|
-
autoConfirm
|
|
29046
|
+
keyboard
|
|
28799
29047
|
} = _ref;
|
|
28800
29048
|
return {
|
|
28801
|
-
autoConfirm,
|
|
28802
29049
|
show: showToolbar && !isDetached,
|
|
28803
29050
|
popover: {
|
|
28804
29051
|
show: showToolbar && isDetached,
|
|
@@ -28819,10 +29066,10 @@
|
|
|
28819
29066
|
show: showToolbar,
|
|
28820
29067
|
api: selections,
|
|
28821
29068
|
onConfirm: () => {
|
|
28822
|
-
keyboard === null || keyboard === void 0
|
|
29069
|
+
keyboard === null || keyboard === void 0 || keyboard.focus();
|
|
28823
29070
|
},
|
|
28824
29071
|
onCancel: () => {
|
|
28825
|
-
keyboard === null || keyboard === void 0
|
|
29072
|
+
keyboard === null || keyboard === void 0 || keyboard.focus();
|
|
28826
29073
|
}
|
|
28827
29074
|
}
|
|
28828
29075
|
};
|
|
@@ -28860,16 +29107,16 @@
|
|
|
28860
29107
|
listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
|
|
28861
29108
|
};
|
|
28862
29109
|
const StyledGrid$3 = styled$1(Grid$1, {
|
|
28863
|
-
shouldForwardProp: p => !['containerPadding', 'isGridMode'].includes(p)
|
|
29110
|
+
shouldForwardProp: p => !['containerPadding', 'isGridMode', 'styles'].includes(p)
|
|
28864
29111
|
})(_ref => {
|
|
28865
|
-
var _theme$listBox$backgr, _theme$listBox;
|
|
28866
29112
|
let {
|
|
28867
29113
|
theme,
|
|
28868
29114
|
containerPadding,
|
|
28869
|
-
isGridMode
|
|
29115
|
+
isGridMode,
|
|
29116
|
+
styles
|
|
28870
29117
|
} = _ref;
|
|
28871
29118
|
return {
|
|
28872
|
-
|
|
29119
|
+
background: styles.backgroundColor,
|
|
28873
29120
|
["& .".concat(classes$4.listBoxHeader)]: {
|
|
28874
29121
|
alignSelf: 'center',
|
|
28875
29122
|
display: 'flex'
|
|
@@ -28895,15 +29142,14 @@
|
|
|
28895
29142
|
};
|
|
28896
29143
|
});
|
|
28897
29144
|
const Title = styled$1(Typography$1)(_ref2 => {
|
|
28898
|
-
var _theme$listBox2, _theme$listBox3, _theme$listBox4, _theme$listBox5;
|
|
28899
29145
|
let {
|
|
28900
|
-
|
|
29146
|
+
styles
|
|
28901
29147
|
} = _ref2;
|
|
28902
29148
|
return {
|
|
28903
|
-
color:
|
|
28904
|
-
fontSize:
|
|
28905
|
-
fontFamily:
|
|
28906
|
-
fontWeight:
|
|
29149
|
+
color: styles.header.color,
|
|
29150
|
+
fontSize: styles.header.fontSize,
|
|
29151
|
+
fontFamily: styles.header.fontFamily,
|
|
29152
|
+
fontWeight: styles.header.fontWeight
|
|
28907
29153
|
};
|
|
28908
29154
|
});
|
|
28909
29155
|
const isModal = _ref3 => {
|
|
@@ -28924,7 +29170,7 @@
|
|
|
28924
29170
|
app,
|
|
28925
29171
|
direction,
|
|
28926
29172
|
frequencyMode,
|
|
28927
|
-
checkboxes,
|
|
29173
|
+
checkboxes: checkboxesOption,
|
|
28928
29174
|
search = true,
|
|
28929
29175
|
focusSearch = false,
|
|
28930
29176
|
rangeSelect = true,
|
|
@@ -28939,7 +29185,8 @@
|
|
|
28939
29185
|
scrollState = undefined,
|
|
28940
29186
|
renderedCallback,
|
|
28941
29187
|
toolbar = true,
|
|
28942
|
-
isPopover = false
|
|
29188
|
+
isPopover = false,
|
|
29189
|
+
components
|
|
28943
29190
|
} = options;
|
|
28944
29191
|
|
|
28945
29192
|
// Hook that will trigger update when used in useEffects.
|
|
@@ -28963,7 +29210,15 @@
|
|
|
28963
29210
|
themeApi,
|
|
28964
29211
|
constraints
|
|
28965
29212
|
} = reactExports.useContext(InstanceContext);
|
|
28966
|
-
|
|
29213
|
+
const {
|
|
29214
|
+
checkboxes = checkboxesOption
|
|
29215
|
+
} = layout || {};
|
|
29216
|
+
const styles = getStyles({
|
|
29217
|
+
themeApi,
|
|
29218
|
+
theme,
|
|
29219
|
+
components,
|
|
29220
|
+
checkboxes
|
|
29221
|
+
});
|
|
28967
29222
|
const isDirectQuery = isDirectQueryEnabled({
|
|
28968
29223
|
appLayout: app === null || app === void 0 ? void 0 : app.layout
|
|
28969
29224
|
});
|
|
@@ -29104,10 +29359,6 @@
|
|
|
29104
29359
|
const showSearchToggle = search === 'toggle' && showSearch;
|
|
29105
29360
|
const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
|
|
29106
29361
|
const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
|
|
29107
|
-
const searchHeight = dense ? 27 : 40;
|
|
29108
|
-
const extraheight = dense ? 39 : 49;
|
|
29109
|
-
const searchAddHeight = searchVisible ? searchHeight : 0;
|
|
29110
|
-
const minHeight = showToolbarWithTitle ? 49 + searchAddHeight + extraheight : 0;
|
|
29111
29362
|
const headerHeight = 32;
|
|
29112
29363
|
const onShowSearch = () => {
|
|
29113
29364
|
const newValue = !showSearch;
|
|
@@ -29118,17 +29369,18 @@
|
|
|
29118
29369
|
onShowSearch();
|
|
29119
29370
|
} else {
|
|
29120
29371
|
const input = searchContainer.current.querySelector('input');
|
|
29121
|
-
input === null || input === void 0
|
|
29372
|
+
input === null || input === void 0 || input.focus();
|
|
29122
29373
|
}
|
|
29123
29374
|
};
|
|
29124
|
-
const getActionToolbarProps = isDetached => getListboxActionProps({
|
|
29375
|
+
const getActionToolbarProps = isDetached => _objectSpread2(_objectSpread2({}, getListboxActionProps({
|
|
29125
29376
|
isDetached: isPopover ? false : isDetached,
|
|
29126
29377
|
showToolbar,
|
|
29127
29378
|
containerRef,
|
|
29128
29379
|
isLocked,
|
|
29129
29380
|
listboxSelectionToolbarItems,
|
|
29130
29381
|
selections,
|
|
29131
|
-
keyboard
|
|
29382
|
+
keyboard
|
|
29383
|
+
})), {}, {
|
|
29132
29384
|
autoConfirm
|
|
29133
29385
|
});
|
|
29134
29386
|
const shouldAutoFocus = searchVisible && search === 'toggle';
|
|
@@ -29176,7 +29428,7 @@
|
|
|
29176
29428
|
}
|
|
29177
29429
|
}));
|
|
29178
29430
|
if (isInvalid) {
|
|
29179
|
-
renderedCallback === null || renderedCallback === void 0
|
|
29431
|
+
renderedCallback === null || renderedCallback === void 0 || renderedCallback();
|
|
29180
29432
|
}
|
|
29181
29433
|
return /*#__PURE__*/React.createElement(React.Fragment, null, showDetachedToolbarOnly && /*#__PURE__*/React.createElement(ActionsToolbar, _extends$7({
|
|
29182
29434
|
direction: direction
|
|
@@ -29187,9 +29439,9 @@
|
|
|
29187
29439
|
direction: "column",
|
|
29188
29440
|
gap: 0,
|
|
29189
29441
|
containerPadding: containerPadding,
|
|
29442
|
+
styles: styles,
|
|
29190
29443
|
style: {
|
|
29191
29444
|
height: '100%',
|
|
29192
|
-
minHeight: "".concat(minHeight, "px"),
|
|
29193
29445
|
flexFlow: 'column nowrap'
|
|
29194
29446
|
},
|
|
29195
29447
|
onKeyDown: handleKeyDown,
|
|
@@ -29233,7 +29485,8 @@
|
|
|
29233
29485
|
variant: "h6",
|
|
29234
29486
|
noWrap: true,
|
|
29235
29487
|
ref: titleRef,
|
|
29236
|
-
title: layout.title
|
|
29488
|
+
title: layout.title,
|
|
29489
|
+
styles: styles
|
|
29237
29490
|
}, layout.title)), /*#__PURE__*/React.createElement(Grid$1, {
|
|
29238
29491
|
item: true
|
|
29239
29492
|
}, /*#__PURE__*/React.createElement(ActionsToolbar, _extends$7({
|
|
@@ -29244,7 +29497,7 @@
|
|
|
29244
29497
|
direction: "column",
|
|
29245
29498
|
style: {
|
|
29246
29499
|
height: '100%',
|
|
29247
|
-
minHeight:
|
|
29500
|
+
minHeight: DENSE_ROW_HEIGHT + SCROLL_BAR_WIDTH
|
|
29248
29501
|
},
|
|
29249
29502
|
role: "region",
|
|
29250
29503
|
"aria-label": translator.get('Listbox.ResultFilterLabel')
|
|
@@ -29263,7 +29516,8 @@
|
|
|
29263
29516
|
wildCardSearch: wildCardSearch,
|
|
29264
29517
|
searchEnabled: searchEnabled,
|
|
29265
29518
|
direction: direction,
|
|
29266
|
-
hide: showSearchIcon && onShowSearch
|
|
29519
|
+
hide: showSearchIcon && onShowSearch,
|
|
29520
|
+
styles: styles
|
|
29267
29521
|
})), /*#__PURE__*/React.createElement(Grid$1, {
|
|
29268
29522
|
item: true,
|
|
29269
29523
|
xs: true,
|
|
@@ -29278,7 +29532,6 @@
|
|
|
29278
29532
|
return /*#__PURE__*/React.createElement(ListBox, {
|
|
29279
29533
|
model: model,
|
|
29280
29534
|
app: app,
|
|
29281
|
-
theme: theme,
|
|
29282
29535
|
constraints: constraints,
|
|
29283
29536
|
layout: layout,
|
|
29284
29537
|
selections: selections,
|
|
@@ -29311,7 +29564,8 @@
|
|
|
29311
29564
|
},
|
|
29312
29565
|
renderedCallback: renderedCallback,
|
|
29313
29566
|
onCtrlF: onCtrlF,
|
|
29314
|
-
isModal: isModalMode
|
|
29567
|
+
isModal: isModalMode,
|
|
29568
|
+
styles: styles
|
|
29315
29569
|
});
|
|
29316
29570
|
})))));
|
|
29317
29571
|
}
|
|
@@ -29459,7 +29713,7 @@
|
|
|
29459
29713
|
*/
|
|
29460
29714
|
wildCardSearch: false,
|
|
29461
29715
|
/**
|
|
29462
|
-
* Automatically confirm selections without showing the selections toolbar.
|
|
29716
|
+
* Automatically confirm selections when clicking outside a listbox, without showing the selections toolbar.
|
|
29463
29717
|
* @type {boolean=}
|
|
29464
29718
|
* @default
|
|
29465
29719
|
*/
|
|
@@ -29868,7 +30122,8 @@
|
|
|
29868
30122
|
close: handleCloseShowState,
|
|
29869
30123
|
fieldName: fieldIdentifier,
|
|
29870
30124
|
stateName: stateName,
|
|
29871
|
-
autoFocus: options.autoFocus
|
|
30125
|
+
autoFocus: options.autoFocus,
|
|
30126
|
+
components: options.components
|
|
29872
30127
|
});
|
|
29873
30128
|
}
|
|
29874
30129
|
|
|
@@ -37773,6 +38028,37 @@
|
|
|
37773
38028
|
}
|
|
37774
38029
|
};
|
|
37775
38030
|
|
|
38031
|
+
/**
|
|
38032
|
+
* @interface Component
|
|
38033
|
+
* @property {string} key The key of the component. Currently supporting components "theme" and "selections".
|
|
38034
|
+
* @example
|
|
38035
|
+
* const n = embed(app);
|
|
38036
|
+
* const inst = await n.field('field_name');
|
|
38037
|
+
* inst.mount(document.querySelector('.listbox'), {
|
|
38038
|
+
* components: [{
|
|
38039
|
+
* key: 'theme',
|
|
38040
|
+
* header: {
|
|
38041
|
+
* fontColor: { color: '#f00' },
|
|
38042
|
+
* fontSize: 23,
|
|
38043
|
+
* },
|
|
38044
|
+
* content: {
|
|
38045
|
+
* fontSize: 16,
|
|
38046
|
+
* useContrastColor: false,
|
|
38047
|
+
* }
|
|
38048
|
+
* },{
|
|
38049
|
+
* key: 'selections',
|
|
38050
|
+
* colors: {
|
|
38051
|
+
* selected: { color: '#0f0' },
|
|
38052
|
+
* alternative: { color: '#ededed' },
|
|
38053
|
+
* excluded: { color: '#ccc' },
|
|
38054
|
+
* selectedExcluded: { color: '#bbb' },
|
|
38055
|
+
* possible: { color: '#fefefe' },
|
|
38056
|
+
* possible: { color: '#fefefe' },
|
|
38057
|
+
* }
|
|
38058
|
+
* }]
|
|
38059
|
+
* });
|
|
38060
|
+
*/
|
|
38061
|
+
|
|
37776
38062
|
/**
|
|
37777
38063
|
* @interface Configuration
|
|
37778
38064
|
* @property {LoadType=} load Fallback load function for missing types
|
|
@@ -38195,6 +38481,7 @@
|
|
|
38195
38481
|
* @param {boolean=} [options.checkboxes=false] Show values as checkboxes instead of as fields (not applicable for existing objects)
|
|
38196
38482
|
* @param {boolean=} [options.dense=false] Reduces padding and text size (not applicable for existing objects)
|
|
38197
38483
|
* @param {string=} [options.stateName="$"] Sets the state to make selections in (not applicable for existing objects)
|
|
38484
|
+
* @param {Component[]} [options.components] Override individual components' styling, otherwise set by the theme or the default style.
|
|
38198
38485
|
* @param {object=} [options.properties={}] Properties object to extend default properties with
|
|
38199
38486
|
* @returns {Promise<void>} A promise that resolves when the data is fetched.
|
|
38200
38487
|
*
|