@nebula.js/stardust 3.1.0 → 3.1.2
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 +1055 -138
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +3 -3
- package/core/esm/index.js.map +1 -1
- package/dist/stardust.dev.js +3448 -420
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +13 -13
- package/dist/stardust.js.map +1 -1
- package/package.json +9 -9
- package/types/index.d.ts +1 -0
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v3.1.
|
|
2
|
+
* @nebula.js/stardust v3.1.2
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -8,9 +8,37 @@ import * as React from 'react';
|
|
|
8
8
|
import React__default, { useState as useState$1, useEffect as useEffect$1, useReducer, forwardRef, useMemo as useMemo$1, useImperativeHandle as useImperativeHandle$1, useCallback, useLayoutEffect as useLayoutEffect$1, PureComponent, createElement, useContext, useRef } from 'react';
|
|
9
9
|
import ReactDOM from 'react-dom';
|
|
10
10
|
import { CacheProvider, ThemeContext as ThemeContext$2 } from '@emotion/react';
|
|
11
|
-
import { Checkbox, Radio, Grid, Typography, FormControlLabel, IconButton, Popover, MenuList, MenuItem, ListItemIcon, Divider, InputAdornment, OutlinedInput, Badge, List, ListItem, Button, Box, Icon, CircularProgress
|
|
11
|
+
import { Checkbox, Radio, Grid, Typography, FormControlLabel, Tooltip, Paper, IconButton, Popover, MenuList, MenuItem, ListItemIcon, Divider, InputAdornment, OutlinedInput, Badge, List, ListItem, Button, Box, Icon, CircularProgress } from '@mui/material';
|
|
12
12
|
import styled$3 from '@emotion/styled';
|
|
13
13
|
|
|
14
|
+
function getAugmentedNamespace(n) {
|
|
15
|
+
if (n.__esModule) return n;
|
|
16
|
+
var f = n.default;
|
|
17
|
+
if (typeof f == "function") {
|
|
18
|
+
var a = function a () {
|
|
19
|
+
if (this instanceof a) {
|
|
20
|
+
var args = [null];
|
|
21
|
+
args.push.apply(args, arguments);
|
|
22
|
+
var Ctor = Function.bind.apply(f, args);
|
|
23
|
+
return new Ctor();
|
|
24
|
+
}
|
|
25
|
+
return f.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
a.prototype = f.prototype;
|
|
28
|
+
} else a = {};
|
|
29
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
30
|
+
Object.keys(n).forEach(function (k) {
|
|
31
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
32
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return n[k];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
return a;
|
|
40
|
+
}
|
|
41
|
+
|
|
14
42
|
var runtimeExports = {};
|
|
15
43
|
var runtime = {
|
|
16
44
|
get exports(){ return runtimeExports; },
|
|
@@ -1545,6 +1573,18 @@ var Visualization_UnfulfilledCalculationCondition = {
|
|
|
1545
1573
|
"zh-TW": "不符計算條件"
|
|
1546
1574
|
}
|
|
1547
1575
|
};
|
|
1576
|
+
var Listbox_ItemsOverflow = {
|
|
1577
|
+
id: "Listbox.ItemsOverflow",
|
|
1578
|
+
locale: {
|
|
1579
|
+
"en-US": "Currently showing a limited data set, use search to reduce the size"
|
|
1580
|
+
}
|
|
1581
|
+
};
|
|
1582
|
+
var Listbox_Dismiss = {
|
|
1583
|
+
id: "Listbox.Dismiss",
|
|
1584
|
+
locale: {
|
|
1585
|
+
"en-US": "Dismiss"
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1548
1588
|
var all = {
|
|
1549
1589
|
Cancel: Cancel$1,
|
|
1550
1590
|
CurrentSelections_All: CurrentSelections_All,
|
|
@@ -1579,7 +1619,9 @@ var all = {
|
|
|
1579
1619
|
Visualization_Invalid_Dimension: Visualization_Invalid_Dimension,
|
|
1580
1620
|
Visualization_Invalid_Measure: Visualization_Invalid_Measure,
|
|
1581
1621
|
Visualization_LayoutError: Visualization_LayoutError,
|
|
1582
|
-
Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition
|
|
1622
|
+
Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition,
|
|
1623
|
+
Listbox_ItemsOverflow: Listbox_ItemsOverflow,
|
|
1624
|
+
Listbox_Dismiss: Listbox_Dismiss
|
|
1583
1625
|
};
|
|
1584
1626
|
|
|
1585
1627
|
function appLocaleFn(language) {
|
|
@@ -3450,6 +3492,391 @@ function capitalize(string) {
|
|
|
3450
3492
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
3451
3493
|
}
|
|
3452
3494
|
|
|
3495
|
+
/**
|
|
3496
|
+
* Safe chained function.
|
|
3497
|
+
*
|
|
3498
|
+
* Will only create a new function if needed,
|
|
3499
|
+
* otherwise will pass back existing functions or null.
|
|
3500
|
+
*/
|
|
3501
|
+
function createChainedFunction(...funcs) {
|
|
3502
|
+
return funcs.reduce((acc, func) => {
|
|
3503
|
+
if (func == null) {
|
|
3504
|
+
return acc;
|
|
3505
|
+
}
|
|
3506
|
+
return function chainedFunction(...args) {
|
|
3507
|
+
acc.apply(this, args);
|
|
3508
|
+
func.apply(this, args);
|
|
3509
|
+
};
|
|
3510
|
+
}, () => {});
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
// Corresponds to 10 frames at 60 Hz.
|
|
3514
|
+
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
|
|
3515
|
+
function debounce(func, wait = 166) {
|
|
3516
|
+
let timeout;
|
|
3517
|
+
function debounced(...args) {
|
|
3518
|
+
const later = () => {
|
|
3519
|
+
func.apply(this, args);
|
|
3520
|
+
};
|
|
3521
|
+
clearTimeout(timeout);
|
|
3522
|
+
timeout = setTimeout(later, wait);
|
|
3523
|
+
}
|
|
3524
|
+
debounced.clear = () => {
|
|
3525
|
+
clearTimeout(timeout);
|
|
3526
|
+
};
|
|
3527
|
+
return debounced;
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3530
|
+
function deprecatedPropType(validator, reason) {
|
|
3531
|
+
{
|
|
3532
|
+
return () => null;
|
|
3533
|
+
}
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3536
|
+
function isMuiElement(element, muiNames) {
|
|
3537
|
+
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(element.type.muiName) !== -1;
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
function ownerDocument(node) {
|
|
3541
|
+
return node && node.ownerDocument || document;
|
|
3542
|
+
}
|
|
3543
|
+
|
|
3544
|
+
function ownerWindow(node) {
|
|
3545
|
+
const doc = ownerDocument(node);
|
|
3546
|
+
return doc.defaultView || window;
|
|
3547
|
+
}
|
|
3548
|
+
|
|
3549
|
+
function requirePropFactory(componentNameInError, Component) {
|
|
3550
|
+
{
|
|
3551
|
+
return () => null;
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3554
|
+
|
|
3555
|
+
/**
|
|
3556
|
+
* TODO v5: consider making it private
|
|
3557
|
+
*
|
|
3558
|
+
* passes {value} to {ref}
|
|
3559
|
+
*
|
|
3560
|
+
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
|
3561
|
+
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
|
3562
|
+
* https://github.com/mui/material-ui/issues/13539
|
|
3563
|
+
*
|
|
3564
|
+
* Useful if you want to expose the ref of an inner component to the public API
|
|
3565
|
+
* while still using it inside the component.
|
|
3566
|
+
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
3567
|
+
*/
|
|
3568
|
+
function setRef(ref, value) {
|
|
3569
|
+
if (typeof ref === 'function') {
|
|
3570
|
+
ref(value);
|
|
3571
|
+
} else if (ref) {
|
|
3572
|
+
ref.current = value;
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
3577
|
+
var useEnhancedEffect$1 = useEnhancedEffect;
|
|
3578
|
+
|
|
3579
|
+
let globalId = 0;
|
|
3580
|
+
function useGlobalId(idOverride) {
|
|
3581
|
+
const [defaultId, setDefaultId] = React.useState(idOverride);
|
|
3582
|
+
const id = idOverride || defaultId;
|
|
3583
|
+
React.useEffect(() => {
|
|
3584
|
+
if (defaultId == null) {
|
|
3585
|
+
// Fallback to this default id when possible.
|
|
3586
|
+
// Use the incrementing value for client-side rendering only.
|
|
3587
|
+
// We can't use it server-side.
|
|
3588
|
+
// If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
|
|
3589
|
+
globalId += 1;
|
|
3590
|
+
setDefaultId(`mui-${globalId}`);
|
|
3591
|
+
}
|
|
3592
|
+
}, [defaultId]);
|
|
3593
|
+
return id;
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3596
|
+
// eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814
|
|
3597
|
+
const maybeReactUseId = React['useId' + ''];
|
|
3598
|
+
/**
|
|
3599
|
+
*
|
|
3600
|
+
* @example <div id={useId()} />
|
|
3601
|
+
* @param idOverride
|
|
3602
|
+
* @returns {string}
|
|
3603
|
+
*/
|
|
3604
|
+
function useId(idOverride) {
|
|
3605
|
+
if (maybeReactUseId !== undefined) {
|
|
3606
|
+
const reactId = maybeReactUseId();
|
|
3607
|
+
return idOverride != null ? idOverride : reactId;
|
|
3608
|
+
}
|
|
3609
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
|
|
3610
|
+
return useGlobalId(idOverride);
|
|
3611
|
+
}
|
|
3612
|
+
|
|
3613
|
+
function unsupportedProp(props, propName, componentName, location, propFullName) {
|
|
3614
|
+
{
|
|
3615
|
+
return null;
|
|
3616
|
+
}
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */
|
|
3620
|
+
function useControlled({
|
|
3621
|
+
controlled,
|
|
3622
|
+
default: defaultProp,
|
|
3623
|
+
name,
|
|
3624
|
+
state = 'value'
|
|
3625
|
+
}) {
|
|
3626
|
+
// isControlled is ignored in the hook dependency lists as it should never change.
|
|
3627
|
+
const {
|
|
3628
|
+
current: isControlled
|
|
3629
|
+
} = React.useRef(controlled !== undefined);
|
|
3630
|
+
const [valueState, setValue] = React.useState(defaultProp);
|
|
3631
|
+
const value = isControlled ? controlled : valueState;
|
|
3632
|
+
const setValueIfUncontrolled = React.useCallback(newValue => {
|
|
3633
|
+
if (!isControlled) {
|
|
3634
|
+
setValue(newValue);
|
|
3635
|
+
}
|
|
3636
|
+
}, []);
|
|
3637
|
+
return [value, setValueIfUncontrolled];
|
|
3638
|
+
}
|
|
3639
|
+
|
|
3640
|
+
/**
|
|
3641
|
+
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
3642
|
+
*/
|
|
3643
|
+
function useEventCallback(fn) {
|
|
3644
|
+
const ref = React.useRef(fn);
|
|
3645
|
+
useEnhancedEffect$1(() => {
|
|
3646
|
+
ref.current = fn;
|
|
3647
|
+
});
|
|
3648
|
+
return React.useCallback((...args) =>
|
|
3649
|
+
// @ts-expect-error hide `this`
|
|
3650
|
+
// tslint:disable-next-line:ban-comma-operator
|
|
3651
|
+
(0, ref.current)(...args), []);
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
function useForkRef(...refs) {
|
|
3655
|
+
/**
|
|
3656
|
+
* This will create a new function if the refs passed to this hook change and are all defined.
|
|
3657
|
+
* This means react will call the old forkRef with `null` and the new forkRef
|
|
3658
|
+
* with the ref. Cleanup naturally emerges from this behavior.
|
|
3659
|
+
*/
|
|
3660
|
+
return React.useMemo(() => {
|
|
3661
|
+
if (refs.every(ref => ref == null)) {
|
|
3662
|
+
return null;
|
|
3663
|
+
}
|
|
3664
|
+
return instance => {
|
|
3665
|
+
refs.forEach(ref => {
|
|
3666
|
+
setRef(ref, instance);
|
|
3667
|
+
});
|
|
3668
|
+
};
|
|
3669
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3670
|
+
}, refs);
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3673
|
+
// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js
|
|
3674
|
+
let hadKeyboardEvent = true;
|
|
3675
|
+
let hadFocusVisibleRecently = false;
|
|
3676
|
+
let hadFocusVisibleRecentlyTimeout;
|
|
3677
|
+
const inputTypesWhitelist = {
|
|
3678
|
+
text: true,
|
|
3679
|
+
search: true,
|
|
3680
|
+
url: true,
|
|
3681
|
+
tel: true,
|
|
3682
|
+
email: true,
|
|
3683
|
+
password: true,
|
|
3684
|
+
number: true,
|
|
3685
|
+
date: true,
|
|
3686
|
+
month: true,
|
|
3687
|
+
week: true,
|
|
3688
|
+
time: true,
|
|
3689
|
+
datetime: true,
|
|
3690
|
+
'datetime-local': true
|
|
3691
|
+
};
|
|
3692
|
+
|
|
3693
|
+
/**
|
|
3694
|
+
* Computes whether the given element should automatically trigger the
|
|
3695
|
+
* `focus-visible` class being added, i.e. whether it should always match
|
|
3696
|
+
* `:focus-visible` when focused.
|
|
3697
|
+
* @param {Element} node
|
|
3698
|
+
* @returns {boolean}
|
|
3699
|
+
*/
|
|
3700
|
+
function focusTriggersKeyboardModality(node) {
|
|
3701
|
+
const {
|
|
3702
|
+
type,
|
|
3703
|
+
tagName
|
|
3704
|
+
} = node;
|
|
3705
|
+
if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
|
|
3706
|
+
return true;
|
|
3707
|
+
}
|
|
3708
|
+
if (tagName === 'TEXTAREA' && !node.readOnly) {
|
|
3709
|
+
return true;
|
|
3710
|
+
}
|
|
3711
|
+
if (node.isContentEditable) {
|
|
3712
|
+
return true;
|
|
3713
|
+
}
|
|
3714
|
+
return false;
|
|
3715
|
+
}
|
|
3716
|
+
|
|
3717
|
+
/**
|
|
3718
|
+
* Keep track of our keyboard modality state with `hadKeyboardEvent`.
|
|
3719
|
+
* If the most recent user interaction was via the keyboard;
|
|
3720
|
+
* and the key press did not include a meta, alt/option, or control key;
|
|
3721
|
+
* then the modality is keyboard. Otherwise, the modality is not keyboard.
|
|
3722
|
+
* @param {KeyboardEvent} event
|
|
3723
|
+
*/
|
|
3724
|
+
function handleKeyDown(event) {
|
|
3725
|
+
if (event.metaKey || event.altKey || event.ctrlKey) {
|
|
3726
|
+
return;
|
|
3727
|
+
}
|
|
3728
|
+
hadKeyboardEvent = true;
|
|
3729
|
+
}
|
|
3730
|
+
|
|
3731
|
+
/**
|
|
3732
|
+
* If at any point a user clicks with a pointing device, ensure that we change
|
|
3733
|
+
* the modality away from keyboard.
|
|
3734
|
+
* This avoids the situation where a user presses a key on an already focused
|
|
3735
|
+
* element, and then clicks on a different element, focusing it with a
|
|
3736
|
+
* pointing device, while we still think we're in keyboard modality.
|
|
3737
|
+
*/
|
|
3738
|
+
function handlePointerDown() {
|
|
3739
|
+
hadKeyboardEvent = false;
|
|
3740
|
+
}
|
|
3741
|
+
function handleVisibilityChange() {
|
|
3742
|
+
if (this.visibilityState === 'hidden') {
|
|
3743
|
+
// If the tab becomes active again, the browser will handle calling focus
|
|
3744
|
+
// on the element (Safari actually calls it twice).
|
|
3745
|
+
// If this tab change caused a blur on an element with focus-visible,
|
|
3746
|
+
// re-apply the class when the user switches back to the tab.
|
|
3747
|
+
if (hadFocusVisibleRecently) {
|
|
3748
|
+
hadKeyboardEvent = true;
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
}
|
|
3752
|
+
function prepare(doc) {
|
|
3753
|
+
doc.addEventListener('keydown', handleKeyDown, true);
|
|
3754
|
+
doc.addEventListener('mousedown', handlePointerDown, true);
|
|
3755
|
+
doc.addEventListener('pointerdown', handlePointerDown, true);
|
|
3756
|
+
doc.addEventListener('touchstart', handlePointerDown, true);
|
|
3757
|
+
doc.addEventListener('visibilitychange', handleVisibilityChange, true);
|
|
3758
|
+
}
|
|
3759
|
+
function isFocusVisible(event) {
|
|
3760
|
+
const {
|
|
3761
|
+
target
|
|
3762
|
+
} = event;
|
|
3763
|
+
try {
|
|
3764
|
+
return target.matches(':focus-visible');
|
|
3765
|
+
} catch (error) {
|
|
3766
|
+
// Browsers not implementing :focus-visible will throw a SyntaxError.
|
|
3767
|
+
// We use our own heuristic for those browsers.
|
|
3768
|
+
// Rethrow might be better if it's not the expected error but do we really
|
|
3769
|
+
// want to crash if focus-visible malfunctioned?
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
// No need for validFocusTarget check. The user does that by attaching it to
|
|
3773
|
+
// focusable events only.
|
|
3774
|
+
return hadKeyboardEvent || focusTriggersKeyboardModality(target);
|
|
3775
|
+
}
|
|
3776
|
+
function useIsFocusVisible() {
|
|
3777
|
+
const ref = React.useCallback(node => {
|
|
3778
|
+
if (node != null) {
|
|
3779
|
+
prepare(node.ownerDocument);
|
|
3780
|
+
}
|
|
3781
|
+
}, []);
|
|
3782
|
+
const isFocusVisibleRef = React.useRef(false);
|
|
3783
|
+
|
|
3784
|
+
/**
|
|
3785
|
+
* Should be called if a blur event is fired
|
|
3786
|
+
*/
|
|
3787
|
+
function handleBlurVisible() {
|
|
3788
|
+
// checking against potential state variable does not suffice if we focus and blur synchronously.
|
|
3789
|
+
// React wouldn't have time to trigger a re-render so `focusVisible` would be stale.
|
|
3790
|
+
// Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.
|
|
3791
|
+
// This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751
|
|
3792
|
+
// TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).
|
|
3793
|
+
if (isFocusVisibleRef.current) {
|
|
3794
|
+
// To detect a tab/window switch, we look for a blur event followed
|
|
3795
|
+
// rapidly by a visibility change.
|
|
3796
|
+
// If we don't see a visibility change within 100ms, it's probably a
|
|
3797
|
+
// regular focus change.
|
|
3798
|
+
hadFocusVisibleRecently = true;
|
|
3799
|
+
window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
|
3800
|
+
hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
|
|
3801
|
+
hadFocusVisibleRecently = false;
|
|
3802
|
+
}, 100);
|
|
3803
|
+
isFocusVisibleRef.current = false;
|
|
3804
|
+
return true;
|
|
3805
|
+
}
|
|
3806
|
+
return false;
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3809
|
+
/**
|
|
3810
|
+
* Should be called if a blur event is fired
|
|
3811
|
+
*/
|
|
3812
|
+
function handleFocusVisible(event) {
|
|
3813
|
+
if (isFocusVisible(event)) {
|
|
3814
|
+
isFocusVisibleRef.current = true;
|
|
3815
|
+
return true;
|
|
3816
|
+
}
|
|
3817
|
+
return false;
|
|
3818
|
+
}
|
|
3819
|
+
return {
|
|
3820
|
+
isFocusVisibleRef,
|
|
3821
|
+
onFocus: handleFocusVisible,
|
|
3822
|
+
onBlur: handleBlurVisible,
|
|
3823
|
+
ref
|
|
3824
|
+
};
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
/**
|
|
3828
|
+
* Add keys, values of `defaultProps` that does not exist in `props`
|
|
3829
|
+
* @param {object} defaultProps
|
|
3830
|
+
* @param {object} props
|
|
3831
|
+
* @returns {object} resolved props
|
|
3832
|
+
*/
|
|
3833
|
+
function resolveProps(defaultProps, props) {
|
|
3834
|
+
const output = _extends$5({}, props);
|
|
3835
|
+
Object.keys(defaultProps).forEach(propName => {
|
|
3836
|
+
if (propName.toString().match(/^(components|slots)$/)) {
|
|
3837
|
+
output[propName] = _extends$5({}, defaultProps[propName], output[propName]);
|
|
3838
|
+
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
3839
|
+
const defaultSlotProps = defaultProps[propName] || {};
|
|
3840
|
+
const slotProps = props[propName];
|
|
3841
|
+
output[propName] = {};
|
|
3842
|
+
if (!slotProps || !Object.keys(slotProps)) {
|
|
3843
|
+
// Reduce the iteration if the slot props is empty
|
|
3844
|
+
output[propName] = defaultSlotProps;
|
|
3845
|
+
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
3846
|
+
// Reduce the iteration if the default slot props is empty
|
|
3847
|
+
output[propName] = slotProps;
|
|
3848
|
+
} else {
|
|
3849
|
+
output[propName] = _extends$5({}, slotProps);
|
|
3850
|
+
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
|
3851
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
3852
|
+
});
|
|
3853
|
+
}
|
|
3854
|
+
} else if (output[propName] === undefined) {
|
|
3855
|
+
output[propName] = defaultProps[propName];
|
|
3856
|
+
}
|
|
3857
|
+
});
|
|
3858
|
+
return output;
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
function composeClasses(slots, getUtilityClass, classes) {
|
|
3862
|
+
const output = {};
|
|
3863
|
+
Object.keys(slots).forEach(
|
|
3864
|
+
// `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
3865
|
+
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
3866
|
+
slot => {
|
|
3867
|
+
output[slot] = slots[slot].reduce((acc, key) => {
|
|
3868
|
+
if (key) {
|
|
3869
|
+
acc.push(getUtilityClass(key));
|
|
3870
|
+
if (classes && classes[key]) {
|
|
3871
|
+
acc.push(classes[key]);
|
|
3872
|
+
}
|
|
3873
|
+
}
|
|
3874
|
+
return acc;
|
|
3875
|
+
}, []).join(' ');
|
|
3876
|
+
});
|
|
3877
|
+
return output;
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3453
3880
|
const defaultGenerator = componentName => componentName;
|
|
3454
3881
|
const createClassNameGenerator = () => {
|
|
3455
3882
|
let generate = defaultGenerator;
|
|
@@ -4766,10 +5193,10 @@ var createCache = function createCache(options) {
|
|
|
4766
5193
|
|
|
4767
5194
|
var createCache$1 = createCache;
|
|
4768
5195
|
|
|
4769
|
-
var jsxRuntimeExports = {};
|
|
5196
|
+
var jsxRuntimeExports$1 = {};
|
|
4770
5197
|
var jsxRuntime = {
|
|
4771
|
-
get exports(){ return jsxRuntimeExports; },
|
|
4772
|
-
set exports(v){ jsxRuntimeExports = v; },
|
|
5198
|
+
get exports(){ return jsxRuntimeExports$1; },
|
|
5199
|
+
set exports(v){ jsxRuntimeExports$1 = v; },
|
|
4773
5200
|
};
|
|
4774
5201
|
|
|
4775
5202
|
var reactJsxRuntime_production_min = {};
|
|
@@ -4783,15 +5210,32 @@ var reactJsxRuntime_production_min = {};
|
|
|
4783
5210
|
* This source code is licensed under the MIT license found in the
|
|
4784
5211
|
* LICENSE file in the root directory of this source tree.
|
|
4785
5212
|
*/
|
|
5213
|
+
|
|
5214
|
+
var hasRequiredReactJsxRuntime_production_min;
|
|
5215
|
+
|
|
5216
|
+
function requireReactJsxRuntime_production_min () {
|
|
5217
|
+
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
5218
|
+
hasRequiredReactJsxRuntime_production_min = 1;
|
|
4786
5219
|
var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
4787
|
-
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
|
|
5220
|
+
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
|
|
5221
|
+
return reactJsxRuntime_production_min;
|
|
5222
|
+
}
|
|
4788
5223
|
|
|
4789
|
-
|
|
5224
|
+
var hasRequiredJsxRuntime;
|
|
4790
5225
|
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
5226
|
+
function requireJsxRuntime () {
|
|
5227
|
+
if (hasRequiredJsxRuntime) return jsxRuntimeExports$1;
|
|
5228
|
+
hasRequiredJsxRuntime = 1;
|
|
5229
|
+
(function (module) {
|
|
5230
|
+
|
|
5231
|
+
{
|
|
5232
|
+
module.exports = requireReactJsxRuntime_production_min();
|
|
5233
|
+
}
|
|
4794
5234
|
} (jsxRuntime));
|
|
5235
|
+
return jsxRuntimeExports$1;
|
|
5236
|
+
}
|
|
5237
|
+
|
|
5238
|
+
var jsxRuntimeExports = requireJsxRuntime();
|
|
4795
5239
|
|
|
4796
5240
|
const cache$1 = createCache$1({
|
|
4797
5241
|
key: 'css',
|
|
@@ -5759,7 +6203,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
5759
6203
|
return target;
|
|
5760
6204
|
}
|
|
5761
6205
|
|
|
5762
|
-
const _excluded$
|
|
6206
|
+
const _excluded$e = ["values", "unit", "step"];
|
|
5763
6207
|
const sortBreakpointsValues = values => {
|
|
5764
6208
|
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
5765
6209
|
key,
|
|
@@ -5794,7 +6238,7 @@ function createBreakpoints(breakpoints) {
|
|
|
5794
6238
|
unit = 'px',
|
|
5795
6239
|
step = 5
|
|
5796
6240
|
} = breakpoints,
|
|
5797
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$
|
|
6241
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$e);
|
|
5798
6242
|
const sortedValues = sortBreakpointsValues(values);
|
|
5799
6243
|
const keys = Object.keys(sortedValues);
|
|
5800
6244
|
function up(key) {
|
|
@@ -5868,7 +6312,7 @@ function createSpacing(spacingInput = 8) {
|
|
|
5868
6312
|
return spacing;
|
|
5869
6313
|
}
|
|
5870
6314
|
|
|
5871
|
-
const _excluded$
|
|
6315
|
+
const _excluded$d = ["breakpoints", "palette", "spacing", "shape"];
|
|
5872
6316
|
function createTheme$1(options = {}, ...args) {
|
|
5873
6317
|
const {
|
|
5874
6318
|
breakpoints: breakpointsInput = {},
|
|
@@ -5876,7 +6320,7 @@ function createTheme$1(options = {}, ...args) {
|
|
|
5876
6320
|
spacing: spacingInput,
|
|
5877
6321
|
shape: shapeInput = {}
|
|
5878
6322
|
} = options,
|
|
5879
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
6323
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$d);
|
|
5880
6324
|
const breakpoints = createBreakpoints(breakpointsInput);
|
|
5881
6325
|
const spacing = createSpacing(spacingInput);
|
|
5882
6326
|
let muiTheme = deepmerge({
|
|
@@ -5972,7 +6416,7 @@ function useTheme$2(defaultTheme = systemDefaultTheme$1) {
|
|
|
5972
6416
|
return useTheme$3(defaultTheme);
|
|
5973
6417
|
}
|
|
5974
6418
|
|
|
5975
|
-
const _excluded$
|
|
6419
|
+
const _excluded$c = ["variant"];
|
|
5976
6420
|
function isEmpty$2(string) {
|
|
5977
6421
|
return string.length === 0;
|
|
5978
6422
|
}
|
|
@@ -5986,7 +6430,7 @@ function propsToClassKey(props) {
|
|
|
5986
6430
|
const {
|
|
5987
6431
|
variant
|
|
5988
6432
|
} = props,
|
|
5989
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
6433
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$c);
|
|
5990
6434
|
let classKey = variant || '';
|
|
5991
6435
|
Object.keys(other).sort().forEach(key => {
|
|
5992
6436
|
if (key === 'color') {
|
|
@@ -5998,7 +6442,7 @@ function propsToClassKey(props) {
|
|
|
5998
6442
|
return classKey;
|
|
5999
6443
|
}
|
|
6000
6444
|
|
|
6001
|
-
const _excluded$
|
|
6445
|
+
const _excluded$b = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
|
|
6002
6446
|
_excluded2$2 = ["theme"],
|
|
6003
6447
|
_excluded3 = ["theme"];
|
|
6004
6448
|
function isEmpty$1(obj) {
|
|
@@ -6082,7 +6526,7 @@ function createStyled(input = {}) {
|
|
|
6082
6526
|
skipSx: inputSkipSx,
|
|
6083
6527
|
overridesResolver
|
|
6084
6528
|
} = inputOptions,
|
|
6085
|
-
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$
|
|
6529
|
+
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$b);
|
|
6086
6530
|
|
|
6087
6531
|
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
|
6088
6532
|
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
|
|
@@ -6175,6 +6619,32 @@ function createStyled(input = {}) {
|
|
|
6175
6619
|
};
|
|
6176
6620
|
}
|
|
6177
6621
|
|
|
6622
|
+
function getThemeProps(params) {
|
|
6623
|
+
const {
|
|
6624
|
+
theme,
|
|
6625
|
+
name,
|
|
6626
|
+
props
|
|
6627
|
+
} = params;
|
|
6628
|
+
if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {
|
|
6629
|
+
return props;
|
|
6630
|
+
}
|
|
6631
|
+
return resolveProps(theme.components[name].defaultProps, props);
|
|
6632
|
+
}
|
|
6633
|
+
|
|
6634
|
+
function useThemeProps$1({
|
|
6635
|
+
props,
|
|
6636
|
+
name,
|
|
6637
|
+
defaultTheme
|
|
6638
|
+
}) {
|
|
6639
|
+
const theme = useTheme$2(defaultTheme);
|
|
6640
|
+
const mergedProps = getThemeProps({
|
|
6641
|
+
theme,
|
|
6642
|
+
name,
|
|
6643
|
+
props
|
|
6644
|
+
});
|
|
6645
|
+
return mergedProps;
|
|
6646
|
+
}
|
|
6647
|
+
|
|
6178
6648
|
/**
|
|
6179
6649
|
* Returns a number whose value is limited to the given range.
|
|
6180
6650
|
* @param {number} value The value to be clamped
|
|
@@ -6406,7 +6876,7 @@ function ThemeProvider(props) {
|
|
|
6406
6876
|
});
|
|
6407
6877
|
}
|
|
6408
6878
|
|
|
6409
|
-
const _excluded$
|
|
6879
|
+
const _excluded$a = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
|
|
6410
6880
|
_excluded2$1 = ["type", "mode"];
|
|
6411
6881
|
function adaptV4Theme(inputTheme) {
|
|
6412
6882
|
const {
|
|
@@ -6417,7 +6887,7 @@ function adaptV4Theme(inputTheme) {
|
|
|
6417
6887
|
props = {},
|
|
6418
6888
|
styleOverrides = {}
|
|
6419
6889
|
} = inputTheme,
|
|
6420
|
-
other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$
|
|
6890
|
+
other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$a);
|
|
6421
6891
|
const theme = _extends$4({}, other, {
|
|
6422
6892
|
components: {}
|
|
6423
6893
|
});
|
|
@@ -6630,7 +7100,7 @@ const green = {
|
|
|
6630
7100
|
};
|
|
6631
7101
|
var green$1 = green;
|
|
6632
7102
|
|
|
6633
|
-
const _excluded$
|
|
7103
|
+
const _excluded$9 = ["mode", "contrastThreshold", "tonalOffset"];
|
|
6634
7104
|
const light$1 = {
|
|
6635
7105
|
// The colors used to style the text.
|
|
6636
7106
|
text: {
|
|
@@ -6799,7 +7269,7 @@ function createPalette(palette) {
|
|
|
6799
7269
|
contrastThreshold = 3,
|
|
6800
7270
|
tonalOffset = 0.2
|
|
6801
7271
|
} = palette,
|
|
6802
|
-
other = _objectWithoutPropertiesLoose$1(palette, _excluded$
|
|
7272
|
+
other = _objectWithoutPropertiesLoose$1(palette, _excluded$9);
|
|
6803
7273
|
const primary = palette.primary || getDefaultPrimary(mode);
|
|
6804
7274
|
const secondary = palette.secondary || getDefaultSecondary(mode);
|
|
6805
7275
|
const error = palette.error || getDefaultError(mode);
|
|
@@ -6898,7 +7368,7 @@ function createPalette(palette) {
|
|
|
6898
7368
|
return paletteOutput;
|
|
6899
7369
|
}
|
|
6900
7370
|
|
|
6901
|
-
const _excluded$
|
|
7371
|
+
const _excluded$8 = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
|
|
6902
7372
|
function round(value) {
|
|
6903
7373
|
return Math.round(value * 1e5) / 1e5;
|
|
6904
7374
|
}
|
|
@@ -6929,7 +7399,7 @@ function createTypography(palette, typography) {
|
|
|
6929
7399
|
allVariants,
|
|
6930
7400
|
pxToRem: pxToRem2
|
|
6931
7401
|
} = _ref,
|
|
6932
|
-
other = _objectWithoutPropertiesLoose$1(_ref, _excluded$
|
|
7402
|
+
other = _objectWithoutPropertiesLoose$1(_ref, _excluded$8);
|
|
6933
7403
|
const coef = fontSize / 14;
|
|
6934
7404
|
const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
|
|
6935
7405
|
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$4({
|
|
@@ -6981,7 +7451,7 @@ function createShadow(...px) {
|
|
|
6981
7451
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
|
6982
7452
|
var shadows$1 = shadows;
|
|
6983
7453
|
|
|
6984
|
-
const _excluded$
|
|
7454
|
+
const _excluded$7 = ["duration", "easing", "delay"];
|
|
6985
7455
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
6986
7456
|
// to learn the context in which each easing should be used.
|
|
6987
7457
|
const easing = {
|
|
@@ -7032,7 +7502,7 @@ function createTransitions(inputTransitions) {
|
|
|
7032
7502
|
easing: easingOption = mergedEasing.easeInOut,
|
|
7033
7503
|
delay = 0
|
|
7034
7504
|
} = options;
|
|
7035
|
-
_objectWithoutPropertiesLoose$1(options, _excluded$
|
|
7505
|
+
_objectWithoutPropertiesLoose$1(options, _excluded$7);
|
|
7036
7506
|
return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
|
|
7037
7507
|
};
|
|
7038
7508
|
return _extends$4({
|
|
@@ -7058,7 +7528,7 @@ const zIndex = {
|
|
|
7058
7528
|
};
|
|
7059
7529
|
var zIndex$1 = zIndex;
|
|
7060
7530
|
|
|
7061
|
-
const _excluded$
|
|
7531
|
+
const _excluded$6 = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
|
7062
7532
|
function createTheme(options = {}, ...args) {
|
|
7063
7533
|
const {
|
|
7064
7534
|
mixins: mixinsInput = {},
|
|
@@ -7066,7 +7536,7 @@ function createTheme(options = {}, ...args) {
|
|
|
7066
7536
|
transitions: transitionsInput = {},
|
|
7067
7537
|
typography: typographyInput = {}
|
|
7068
7538
|
} = options,
|
|
7069
|
-
other = _objectWithoutPropertiesLoose$1(options, _excluded$
|
|
7539
|
+
other = _objectWithoutPropertiesLoose$1(options, _excluded$6);
|
|
7070
7540
|
if (options.vars) {
|
|
7071
7541
|
throw new Error(formatMuiErrorMessage(18));
|
|
7072
7542
|
}
|
|
@@ -7101,6 +7571,17 @@ function useTheme$1() {
|
|
|
7101
7571
|
return theme;
|
|
7102
7572
|
}
|
|
7103
7573
|
|
|
7574
|
+
function useThemeProps({
|
|
7575
|
+
props,
|
|
7576
|
+
name
|
|
7577
|
+
}) {
|
|
7578
|
+
return useThemeProps$1({
|
|
7579
|
+
props,
|
|
7580
|
+
name,
|
|
7581
|
+
defaultTheme: defaultTheme$1
|
|
7582
|
+
});
|
|
7583
|
+
}
|
|
7584
|
+
|
|
7104
7585
|
const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';
|
|
7105
7586
|
const styled = createStyled({
|
|
7106
7587
|
defaultTheme: defaultTheme$1,
|
|
@@ -7108,6 +7589,8 @@ const styled = createStyled({
|
|
|
7108
7589
|
});
|
|
7109
7590
|
var styled$1 = styled;
|
|
7110
7591
|
|
|
7592
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
7593
|
+
|
|
7111
7594
|
function _extends$1() {
|
|
7112
7595
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
7113
7596
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -7457,7 +7940,7 @@ function create$3(definition) {
|
|
|
7457
7940
|
return cache[key];
|
|
7458
7941
|
}
|
|
7459
7942
|
|
|
7460
|
-
const NEBULA_VERSION_HASH = "
|
|
7943
|
+
const NEBULA_VERSION_HASH = "1f4e" ;
|
|
7461
7944
|
ClassNameGenerator$1.configure(componentName => {
|
|
7462
7945
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
7463
7946
|
});
|
|
@@ -7976,7 +8459,7 @@ function boot(_ref2) {
|
|
|
7976
8459
|
const appRef = React__default.createRef();
|
|
7977
8460
|
const element = document.createElement('div');
|
|
7978
8461
|
element.style.display = 'none';
|
|
7979
|
-
element.setAttribute('data-nebulajs-version', "3.1.
|
|
8462
|
+
element.setAttribute('data-nebulajs-version', "3.1.2" );
|
|
7980
8463
|
element.setAttribute('data-app-id', app.id);
|
|
7981
8464
|
document.body.appendChild(element);
|
|
7982
8465
|
ReactDOM.render( /*#__PURE__*/React__default.createElement(NebulaApp, {
|
|
@@ -8083,7 +8566,7 @@ function getFontSize(size) {
|
|
|
8083
8566
|
}
|
|
8084
8567
|
return '16px';
|
|
8085
8568
|
}
|
|
8086
|
-
function SvgIcon(_ref) {
|
|
8569
|
+
function SvgIcon$2(_ref) {
|
|
8087
8570
|
let {
|
|
8088
8571
|
size,
|
|
8089
8572
|
style = {},
|
|
@@ -8133,7 +8616,7 @@ const remove = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
8133
8616
|
}
|
|
8134
8617
|
}]
|
|
8135
8618
|
});
|
|
8136
|
-
var Remove = (props => SvgIcon(remove(props)));
|
|
8619
|
+
var Remove = (props => SvgIcon$2(remove(props)));
|
|
8137
8620
|
|
|
8138
8621
|
const lock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
8139
8622
|
shapes: [{
|
|
@@ -8143,7 +8626,7 @@ const lock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
8143
8626
|
}
|
|
8144
8627
|
}]
|
|
8145
8628
|
});
|
|
8146
|
-
var Lock = (props => SvgIcon(lock(props)));
|
|
8629
|
+
var Lock = (props => SvgIcon$2(lock(props)));
|
|
8147
8630
|
|
|
8148
8631
|
const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
8149
8632
|
shapes: [{
|
|
@@ -8153,7 +8636,7 @@ const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
8153
8636
|
}
|
|
8154
8637
|
}]
|
|
8155
8638
|
});
|
|
8156
|
-
var Unlock = (props => SvgIcon(unlock(props)));
|
|
8639
|
+
var Unlock = (props => SvgIcon$2(unlock(props)));
|
|
8157
8640
|
|
|
8158
8641
|
function isRangeVisible(_ref) {
|
|
8159
8642
|
var lastRenderedStartIndex = _ref.lastRenderedStartIndex,
|
|
@@ -8698,7 +9181,7 @@ const tick = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
8698
9181
|
}
|
|
8699
9182
|
}]
|
|
8700
9183
|
});
|
|
8701
|
-
var Tick = (props => SvgIcon(tick(props)));
|
|
9184
|
+
var Tick = (props => SvgIcon$2(tick(props)));
|
|
8702
9185
|
|
|
8703
9186
|
const CheckboxChecked = "url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath" + " fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 " + "1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")";
|
|
8704
9187
|
|
|
@@ -11038,6 +11521,30 @@ function getStyledComponents() {
|
|
|
11038
11521
|
};
|
|
11039
11522
|
}
|
|
11040
11523
|
|
|
11524
|
+
const getIndex = (renderProps, isColumnLayout) => {
|
|
11525
|
+
if (renderProps !== null && renderProps !== void 0 && renderProps.visibleRowStopIndex || renderProps.visibleColumnStopIndex) {
|
|
11526
|
+
return isColumnLayout ? renderProps.visibleColumnStopIndex : renderProps.visibleRowStopIndex;
|
|
11527
|
+
}
|
|
11528
|
+
return renderProps.visibleStopIndex;
|
|
11529
|
+
};
|
|
11530
|
+
function handleSetOverflowDisclaimer(_ref) {
|
|
11531
|
+
let {
|
|
11532
|
+
renderProps,
|
|
11533
|
+
layoutOptions,
|
|
11534
|
+
maxCount,
|
|
11535
|
+
columnCount,
|
|
11536
|
+
rowCount,
|
|
11537
|
+
overflowDisclaimer
|
|
11538
|
+
} = _ref;
|
|
11539
|
+
const isColumnLayout = (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.layoutOrder) === 'column' && layoutOptions.dataLayout !== 'singleColumn';
|
|
11540
|
+
const index = getIndex(renderProps, isColumnLayout);
|
|
11541
|
+
const stopIndex = isColumnLayout ? maxCount.column : maxCount.row;
|
|
11542
|
+
const count = isColumnLayout ? columnCount : rowCount;
|
|
11543
|
+
const overflowPossible = count >= stopIndex;
|
|
11544
|
+
const show = overflowPossible && index >= stopIndex - 1 || overflowDisclaimer.state.show;
|
|
11545
|
+
overflowDisclaimer.set(show);
|
|
11546
|
+
}
|
|
11547
|
+
|
|
11041
11548
|
const {
|
|
11042
11549
|
StyledFixedSizeList,
|
|
11043
11550
|
StyledFixedSizeGrid
|
|
@@ -11064,7 +11571,8 @@ function getListBoxComponents(_ref) {
|
|
|
11064
11571
|
direction,
|
|
11065
11572
|
listLayout,
|
|
11066
11573
|
sizes,
|
|
11067
|
-
listCount
|
|
11574
|
+
listCount,
|
|
11575
|
+
overflowDisclaimer
|
|
11068
11576
|
} = _ref;
|
|
11069
11577
|
const {
|
|
11070
11578
|
layoutOptions = {},
|
|
@@ -11135,6 +11643,14 @@ function getListBoxComponents(_ref) {
|
|
|
11135
11643
|
if (scrollState) {
|
|
11136
11644
|
scrollState.setScrollPos(renderProps.visibleStopIndex);
|
|
11137
11645
|
}
|
|
11646
|
+
handleSetOverflowDisclaimer({
|
|
11647
|
+
renderProps,
|
|
11648
|
+
layoutOptions,
|
|
11649
|
+
maxCount: sizes.maxCount,
|
|
11650
|
+
columnCount,
|
|
11651
|
+
rowCount,
|
|
11652
|
+
overflowDisclaimer
|
|
11653
|
+
});
|
|
11138
11654
|
onItemsRendered(_objectSpread2({}, renderProps));
|
|
11139
11655
|
},
|
|
11140
11656
|
ref: ref
|
|
@@ -11164,6 +11680,14 @@ function getListBoxComponents(_ref) {
|
|
|
11164
11680
|
rowCount,
|
|
11165
11681
|
columnCount
|
|
11166
11682
|
});
|
|
11683
|
+
handleSetOverflowDisclaimer({
|
|
11684
|
+
renderProps,
|
|
11685
|
+
layoutOptions,
|
|
11686
|
+
maxCount: sizes.maxCount,
|
|
11687
|
+
columnCount,
|
|
11688
|
+
rowCount,
|
|
11689
|
+
overflowDisclaimer
|
|
11690
|
+
});
|
|
11167
11691
|
onItemsRendered(renderOptions);
|
|
11168
11692
|
};
|
|
11169
11693
|
return /*#__PURE__*/React__default.createElement(StyledFixedSizeGrid
|
|
@@ -11211,7 +11735,8 @@ function getListSizes(_ref) {
|
|
|
11211
11735
|
layoutOrder,
|
|
11212
11736
|
maxVisibleRows = {},
|
|
11213
11737
|
maxVisibleColumns,
|
|
11214
|
-
dense
|
|
11738
|
+
dense,
|
|
11739
|
+
dataLayout
|
|
11215
11740
|
} = layoutOptions;
|
|
11216
11741
|
const columnAutoWidth = Math.min(150, textWidth + 18);
|
|
11217
11742
|
let overflowStyling;
|
|
@@ -11225,8 +11750,8 @@ function getListSizes(_ref) {
|
|
|
11225
11750
|
overflowStyling = {
|
|
11226
11751
|
overflowX: 'hidden'
|
|
11227
11752
|
};
|
|
11228
|
-
const maxColumns = maxVisibleColumns.maxColumns || 3;
|
|
11229
|
-
if (maxVisibleColumns.auto !== false) {
|
|
11753
|
+
const maxColumns = (maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.maxColumns) || 3;
|
|
11754
|
+
if ((maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.auto) !== false) {
|
|
11230
11755
|
columnCount = Math.min(listCount, Math.ceil((width - scrollBarWidth) / columnAutoWidth)); // TODO: smarter sizing... based on glyph count + font size etc...??
|
|
11231
11756
|
} else {
|
|
11232
11757
|
columnCount = Math.min(listCount, maxColumns);
|
|
@@ -11237,7 +11762,7 @@ function getListSizes(_ref) {
|
|
|
11237
11762
|
overflowStyling = {
|
|
11238
11763
|
overflowY: 'hidden'
|
|
11239
11764
|
};
|
|
11240
|
-
const maxRows = maxVisibleRows.maxRows || 3;
|
|
11765
|
+
const maxRows = (maxVisibleRows === null || maxVisibleRows === void 0 ? void 0 : maxVisibleRows.maxRows) || 3;
|
|
11241
11766
|
if (maxVisibleRows.auto !== false) {
|
|
11242
11767
|
rowCount = Math.floor(listHeight / itemSize);
|
|
11243
11768
|
} else {
|
|
@@ -11247,6 +11772,15 @@ function getListSizes(_ref) {
|
|
|
11247
11772
|
columnWidth = Math.max(columnAutoWidth, width / columnCount);
|
|
11248
11773
|
}
|
|
11249
11774
|
}
|
|
11775
|
+
columnCount = (dataLayout === 'singleColumn' ? 1 : columnCount) || 1;
|
|
11776
|
+
rowCount = (dataLayout === 'singleColumn' ? count : rowCount) || listCount;
|
|
11777
|
+
const maxRowCount = layoutOptions.dense ? 838000 : 577000; // Styling breaks on items above this number: https://github.com/bvaughn/react-window/issues/659
|
|
11778
|
+
rowCount = Math.min(rowCount, maxRowCount);
|
|
11779
|
+
const maxScrollWidth = 33550000; // Styling breaks on items above this width: https://github.com/bvaughn/react-window/issues/659
|
|
11780
|
+
const maxColumnCount = Math.floor(maxScrollWidth / columnWidth);
|
|
11781
|
+
columnCount = Math.min(columnCount, maxColumnCount) || 1;
|
|
11782
|
+
const maxListCount = rowCount * columnCount;
|
|
11783
|
+
const limitedListCount = Math.min(listCount, maxListCount);
|
|
11250
11784
|
return {
|
|
11251
11785
|
columnCount,
|
|
11252
11786
|
columnWidth,
|
|
@@ -11256,7 +11790,11 @@ function getListSizes(_ref) {
|
|
|
11256
11790
|
listHeight,
|
|
11257
11791
|
scrollBarWidth,
|
|
11258
11792
|
count,
|
|
11259
|
-
listCount
|
|
11793
|
+
listCount: limitedListCount,
|
|
11794
|
+
maxCount: {
|
|
11795
|
+
row: maxRowCount,
|
|
11796
|
+
column: maxColumnCount
|
|
11797
|
+
}
|
|
11260
11798
|
};
|
|
11261
11799
|
}
|
|
11262
11800
|
|
|
@@ -11423,24 +11961,297 @@ function useDataStore(model) {
|
|
|
11423
11961
|
|
|
11424
11962
|
function ListBoxDisclaimer(_ref) {
|
|
11425
11963
|
let {
|
|
11426
|
-
width
|
|
11964
|
+
width,
|
|
11965
|
+
text,
|
|
11966
|
+
dense,
|
|
11967
|
+
tooltip
|
|
11427
11968
|
} = _ref;
|
|
11428
11969
|
const {
|
|
11429
11970
|
translator
|
|
11430
11971
|
} = useContext(InstanceContext);
|
|
11431
|
-
|
|
11972
|
+
const StyledText = styled$1(Typography)(() => _objectSpread2({
|
|
11973
|
+
minWidth: "".concat(width, "px"),
|
|
11974
|
+
textAlign: 'center',
|
|
11975
|
+
fontSize: "".concat(dense ? '12px' : '14px')
|
|
11976
|
+
}, dense && {
|
|
11977
|
+
textOverflow: 'ellipsis',
|
|
11978
|
+
overflow: 'hidden',
|
|
11979
|
+
whiteSpace: 'nowrap',
|
|
11980
|
+
width
|
|
11981
|
+
}));
|
|
11982
|
+
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
11983
|
+
title: tooltip ? translator.get(text) : ''
|
|
11984
|
+
}, /*#__PURE__*/React__default.createElement(StyledText, {
|
|
11432
11985
|
component: "div",
|
|
11433
11986
|
variant: "body1",
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11987
|
+
py: "12px"
|
|
11988
|
+
}, translator.get(text)));
|
|
11989
|
+
}
|
|
11990
|
+
|
|
11991
|
+
var Close = {};
|
|
11992
|
+
|
|
11993
|
+
var interopRequireDefaultExports = {};
|
|
11994
|
+
var interopRequireDefault = {
|
|
11995
|
+
get exports(){ return interopRequireDefaultExports; },
|
|
11996
|
+
set exports(v){ interopRequireDefaultExports = v; },
|
|
11997
|
+
};
|
|
11998
|
+
|
|
11999
|
+
(function (module) {
|
|
12000
|
+
function _interopRequireDefault(obj) {
|
|
12001
|
+
return obj && obj.__esModule ? obj : {
|
|
12002
|
+
"default": obj
|
|
12003
|
+
};
|
|
12004
|
+
}
|
|
12005
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12006
|
+
} (interopRequireDefault));
|
|
12007
|
+
|
|
12008
|
+
var createSvgIcon$1 = {};
|
|
12009
|
+
|
|
12010
|
+
function getSvgIconUtilityClass(slot) {
|
|
12011
|
+
return generateUtilityClass('MuiSvgIcon', slot);
|
|
12012
|
+
}
|
|
12013
|
+
generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
|
|
12014
|
+
|
|
12015
|
+
const _excluded$5 = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
|
|
12016
|
+
const useUtilityClasses = ownerState => {
|
|
12017
|
+
const {
|
|
12018
|
+
color,
|
|
12019
|
+
fontSize,
|
|
12020
|
+
classes
|
|
12021
|
+
} = ownerState;
|
|
12022
|
+
const slots = {
|
|
12023
|
+
root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]
|
|
12024
|
+
};
|
|
12025
|
+
return composeClasses(slots, getSvgIconUtilityClass, classes);
|
|
12026
|
+
};
|
|
12027
|
+
const SvgIconRoot = styled$1('svg', {
|
|
12028
|
+
name: 'MuiSvgIcon',
|
|
12029
|
+
slot: 'Root',
|
|
12030
|
+
overridesResolver: (props, styles) => {
|
|
12031
|
+
const {
|
|
12032
|
+
ownerState
|
|
12033
|
+
} = props;
|
|
12034
|
+
return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];
|
|
12035
|
+
}
|
|
12036
|
+
})(({
|
|
12037
|
+
theme,
|
|
12038
|
+
ownerState
|
|
12039
|
+
}) => {
|
|
12040
|
+
var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$transitions2$d, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette$ownerState$c2, _palette2, _palette2$action, _palette3, _palette3$action;
|
|
12041
|
+
return {
|
|
12042
|
+
userSelect: 'none',
|
|
12043
|
+
width: '1em',
|
|
12044
|
+
height: '1em',
|
|
12045
|
+
display: 'inline-block',
|
|
12046
|
+
fill: 'currentColor',
|
|
12047
|
+
flexShrink: 0,
|
|
12048
|
+
transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
|
|
12049
|
+
duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
|
|
12050
|
+
}),
|
|
12051
|
+
fontSize: {
|
|
12052
|
+
inherit: 'inherit',
|
|
12053
|
+
small: ((_theme$typography = theme.typography) == null ? void 0 : (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
|
|
12054
|
+
medium: ((_theme$typography2 = theme.typography) == null ? void 0 : (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
|
|
12055
|
+
large: ((_theme$typography3 = theme.typography) == null ? void 0 : (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'
|
|
12056
|
+
}[ownerState.fontSize],
|
|
12057
|
+
// TODO v5 deprecate, v6 remove for sx
|
|
12058
|
+
color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null ? void 0 : (_palette$ownerState$c2 = _palette[ownerState.color]) == null ? void 0 : _palette$ownerState$c2.main) != null ? _palette$ownerState$c : {
|
|
12059
|
+
action: (_palette2 = (theme.vars || theme).palette) == null ? void 0 : (_palette2$action = _palette2.action) == null ? void 0 : _palette2$action.active,
|
|
12060
|
+
disabled: (_palette3 = (theme.vars || theme).palette) == null ? void 0 : (_palette3$action = _palette3.action) == null ? void 0 : _palette3$action.disabled,
|
|
12061
|
+
inherit: undefined
|
|
12062
|
+
}[ownerState.color]
|
|
12063
|
+
};
|
|
12064
|
+
});
|
|
12065
|
+
const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
12066
|
+
const props = useThemeProps({
|
|
12067
|
+
props: inProps,
|
|
12068
|
+
name: 'MuiSvgIcon'
|
|
12069
|
+
});
|
|
12070
|
+
const {
|
|
12071
|
+
children,
|
|
12072
|
+
className,
|
|
12073
|
+
color = 'inherit',
|
|
12074
|
+
component = 'svg',
|
|
12075
|
+
fontSize = 'medium',
|
|
12076
|
+
htmlColor,
|
|
12077
|
+
inheritViewBox = false,
|
|
12078
|
+
titleAccess,
|
|
12079
|
+
viewBox = '0 0 24 24'
|
|
12080
|
+
} = props,
|
|
12081
|
+
other = _objectWithoutPropertiesLoose$1(props, _excluded$5);
|
|
12082
|
+
const ownerState = _extends$4({}, props, {
|
|
12083
|
+
color,
|
|
12084
|
+
component,
|
|
12085
|
+
fontSize,
|
|
12086
|
+
instanceFontSize: inProps.fontSize,
|
|
12087
|
+
inheritViewBox,
|
|
12088
|
+
viewBox
|
|
12089
|
+
});
|
|
12090
|
+
const more = {};
|
|
12091
|
+
if (!inheritViewBox) {
|
|
12092
|
+
more.viewBox = viewBox;
|
|
12093
|
+
}
|
|
12094
|
+
const classes = useUtilityClasses(ownerState);
|
|
12095
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$4({
|
|
12096
|
+
as: component,
|
|
12097
|
+
className: clsx(classes.root, className),
|
|
12098
|
+
focusable: "false",
|
|
12099
|
+
color: htmlColor,
|
|
12100
|
+
"aria-hidden": titleAccess ? undefined : true,
|
|
12101
|
+
role: titleAccess ? 'img' : undefined,
|
|
12102
|
+
ref: ref
|
|
12103
|
+
}, more, other, {
|
|
12104
|
+
ownerState: ownerState,
|
|
12105
|
+
children: [children, titleAccess ? /*#__PURE__*/jsxRuntimeExports.jsx("title", {
|
|
12106
|
+
children: titleAccess
|
|
12107
|
+
}) : null]
|
|
12108
|
+
}));
|
|
12109
|
+
});
|
|
12110
|
+
SvgIcon.muiName = 'SvgIcon';
|
|
12111
|
+
var SvgIcon$1 = SvgIcon;
|
|
12112
|
+
|
|
12113
|
+
function createSvgIcon(path, displayName) {
|
|
12114
|
+
function Component(props, ref) {
|
|
12115
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon$1, _extends$4({
|
|
12116
|
+
"data-testid": `${displayName}Icon`,
|
|
12117
|
+
ref: ref
|
|
12118
|
+
}, props, {
|
|
12119
|
+
children: path
|
|
12120
|
+
}));
|
|
12121
|
+
}
|
|
12122
|
+
Component.muiName = SvgIcon$1.muiName;
|
|
12123
|
+
return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
|
|
12124
|
+
}
|
|
12125
|
+
|
|
12126
|
+
// TODO: remove this export once ClassNameGenerator is stable
|
|
12127
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12128
|
+
const unstable_ClassNameGenerator = {
|
|
12129
|
+
configure: generator => {
|
|
12130
|
+
ClassNameGenerator$1.configure(generator);
|
|
12131
|
+
}
|
|
12132
|
+
};
|
|
12133
|
+
|
|
12134
|
+
var utils$1 = /*#__PURE__*/Object.freeze({
|
|
12135
|
+
__proto__: null,
|
|
12136
|
+
capitalize: capitalize,
|
|
12137
|
+
createChainedFunction: createChainedFunction,
|
|
12138
|
+
createSvgIcon: createSvgIcon,
|
|
12139
|
+
debounce: debounce,
|
|
12140
|
+
deprecatedPropType: deprecatedPropType,
|
|
12141
|
+
isMuiElement: isMuiElement,
|
|
12142
|
+
ownerDocument: ownerDocument,
|
|
12143
|
+
ownerWindow: ownerWindow,
|
|
12144
|
+
requirePropFactory: requirePropFactory,
|
|
12145
|
+
setRef: setRef,
|
|
12146
|
+
unstable_ClassNameGenerator: unstable_ClassNameGenerator,
|
|
12147
|
+
unstable_useEnhancedEffect: useEnhancedEffect$1,
|
|
12148
|
+
unstable_useId: useId,
|
|
12149
|
+
unsupportedProp: unsupportedProp,
|
|
12150
|
+
useControlled: useControlled,
|
|
12151
|
+
useEventCallback: useEventCallback,
|
|
12152
|
+
useForkRef: useForkRef,
|
|
12153
|
+
useIsFocusVisible: useIsFocusVisible
|
|
12154
|
+
});
|
|
12155
|
+
|
|
12156
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(utils$1);
|
|
12157
|
+
|
|
12158
|
+
var hasRequiredCreateSvgIcon;
|
|
12159
|
+
|
|
12160
|
+
function requireCreateSvgIcon () {
|
|
12161
|
+
if (hasRequiredCreateSvgIcon) return createSvgIcon$1;
|
|
12162
|
+
hasRequiredCreateSvgIcon = 1;
|
|
12163
|
+
(function (exports) {
|
|
12164
|
+
|
|
12165
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12166
|
+
value: true
|
|
12167
|
+
});
|
|
12168
|
+
Object.defineProperty(exports, "default", {
|
|
12169
|
+
enumerable: true,
|
|
12170
|
+
get: function () {
|
|
12171
|
+
return _utils.createSvgIcon;
|
|
12172
|
+
}
|
|
12173
|
+
});
|
|
12174
|
+
var _utils = require$$0;
|
|
12175
|
+
} (createSvgIcon$1));
|
|
12176
|
+
return createSvgIcon$1;
|
|
12177
|
+
}
|
|
12178
|
+
|
|
12179
|
+
var _interopRequireDefault = interopRequireDefaultExports;
|
|
12180
|
+
Object.defineProperty(Close, "__esModule", {
|
|
12181
|
+
value: true
|
|
12182
|
+
});
|
|
12183
|
+
var default_1 = Close.default = void 0;
|
|
12184
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
12185
|
+
var _jsxRuntime = requireJsxRuntime();
|
|
12186
|
+
var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
12187
|
+
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
12188
|
+
}), 'Close');
|
|
12189
|
+
default_1 = Close.default = _default;
|
|
12190
|
+
|
|
12191
|
+
const RootContainer = styled$1(Paper)(_ref => {
|
|
12192
|
+
let {
|
|
12193
|
+
theme,
|
|
12194
|
+
left
|
|
12195
|
+
} = _ref;
|
|
12196
|
+
return {
|
|
12197
|
+
position: 'absolute',
|
|
12198
|
+
bottom: '12px',
|
|
12199
|
+
display: 'flex',
|
|
12200
|
+
border: "1px solid ".concat(theme.palette.divider),
|
|
12201
|
+
width: 'calc(100% - 11px)',
|
|
12202
|
+
left
|
|
12203
|
+
};
|
|
12204
|
+
});
|
|
12205
|
+
const LeftItem = styled$1('div')(() => ({
|
|
12206
|
+
paddingLeft: '6px',
|
|
12207
|
+
flexGrow: 1
|
|
12208
|
+
}));
|
|
12209
|
+
const RightItem = styled$1('div')(_ref2 => {
|
|
12210
|
+
let {
|
|
12211
|
+
dense
|
|
12212
|
+
} = _ref2;
|
|
12213
|
+
return {
|
|
12214
|
+
display: 'flex',
|
|
12215
|
+
alignItems: "".concat(dense ? 'center' : 'flex-start')
|
|
12216
|
+
};
|
|
12217
|
+
});
|
|
12218
|
+
const SmallCloseIcon = styled$1(default_1)(() => ({
|
|
12219
|
+
fontSize: '14px'
|
|
12220
|
+
}));
|
|
12221
|
+
function ListBoxFooter(_ref3) {
|
|
12222
|
+
let {
|
|
12223
|
+
text,
|
|
12224
|
+
dismiss,
|
|
12225
|
+
dense,
|
|
12226
|
+
parentWidth = 0
|
|
12227
|
+
} = _ref3;
|
|
12228
|
+
const hasDismissButton = typeof dismiss === 'function';
|
|
12229
|
+
const maxWidth = dense ? 370 : 282;
|
|
12230
|
+
const left = Math.max(parentWidth / 2 - maxWidth / 2, 0);
|
|
12231
|
+
const textWidth = Math.min(maxWidth, parentWidth) - 42;
|
|
12232
|
+
const enableTooltip = dense && parentWidth < maxWidth;
|
|
12233
|
+
return /*#__PURE__*/React__default.createElement(RootContainer, {
|
|
12234
|
+
left: left,
|
|
12235
|
+
style: {
|
|
12236
|
+
maxWidth
|
|
12237
|
+
}
|
|
12238
|
+
}, /*#__PURE__*/React__default.createElement(LeftItem, null, /*#__PURE__*/React__default.createElement(ListBoxDisclaimer, {
|
|
12239
|
+
text: text,
|
|
12240
|
+
dense: dense,
|
|
12241
|
+
width: textWidth,
|
|
12242
|
+
tooltip: enableTooltip
|
|
12243
|
+
})), /*#__PURE__*/React__default.createElement(RightItem, {
|
|
12244
|
+
dense: dense
|
|
12245
|
+
}, hasDismissButton && /*#__PURE__*/React__default.createElement(IconButton, {
|
|
12246
|
+
"aria-label": "close",
|
|
12247
|
+
onClick: () => dismiss()
|
|
12248
|
+
}, /*#__PURE__*/React__default.createElement(SmallCloseIcon, null))));
|
|
11438
12249
|
}
|
|
11439
12250
|
|
|
11440
12251
|
const _excluded$4 = ["isLoadingData"];
|
|
11441
12252
|
const DEFAULT_MIN_BATCH_SIZE = 100;
|
|
11442
12253
|
function ListBox(_ref) {
|
|
11443
|
-
var _layout$qListObject$q;
|
|
12254
|
+
var _layout$qListObject$q, _loaderRef$current, _loaderRef$current$_l, _loaderRef$current$_l2;
|
|
11444
12255
|
let {
|
|
11445
12256
|
model,
|
|
11446
12257
|
selections,
|
|
@@ -11495,6 +12306,13 @@ function ListBox(_ref) {
|
|
|
11495
12306
|
setStoreValue
|
|
11496
12307
|
} = useDataStore(model);
|
|
11497
12308
|
const loadMoreItems = useCallback(itemsLoader.loadMoreItems, [layout]);
|
|
12309
|
+
const [overflowDisclaimer, setOverflowDisclaimer] = useState$1({
|
|
12310
|
+
show: false,
|
|
12311
|
+
dismissed: false
|
|
12312
|
+
});
|
|
12313
|
+
const showOverflowDisclaimer = show => setOverflowDisclaimer(state => _objectSpread2(_objectSpread2({}, state), {}, {
|
|
12314
|
+
show
|
|
12315
|
+
}));
|
|
11498
12316
|
useEffect$1(() => {
|
|
11499
12317
|
setPages((itemsLoader === null || itemsLoader === void 0 ? void 0 : itemsLoader.pages) || []);
|
|
11500
12318
|
}, [itemsLoader === null || itemsLoader === void 0 ? void 0 : itemsLoader.pages]);
|
|
@@ -11561,21 +12379,26 @@ function ListBox(_ref) {
|
|
|
11561
12379
|
let minimumBatchSize = DEFAULT_MIN_BATCH_SIZE;
|
|
11562
12380
|
const isVertical = layoutOptions.dataLayout ? layoutOptions.dataLayout === 'singleColumn' : listLayout !== 'horizontal';
|
|
11563
12381
|
const count = layout === null || layout === void 0 ? void 0 : (_layout$qListObject$q = layout.qListObject.qSize) === null || _layout$qListObject$q === void 0 ? void 0 : _layout$qListObject$q.qcy;
|
|
11564
|
-
const
|
|
12382
|
+
const unlimitedListCount = getListCount({
|
|
11565
12383
|
pages,
|
|
11566
12384
|
minimumBatchSize,
|
|
11567
12385
|
count,
|
|
11568
|
-
calculatePagesHeight
|
|
12386
|
+
calculatePagesHeight,
|
|
12387
|
+
layoutOptions,
|
|
12388
|
+
model
|
|
11569
12389
|
});
|
|
11570
|
-
setStoreValue('listCount', listCount);
|
|
11571
12390
|
const sizes = getListSizes({
|
|
11572
12391
|
layout,
|
|
11573
12392
|
width,
|
|
11574
12393
|
height,
|
|
11575
|
-
listCount,
|
|
12394
|
+
listCount: unlimitedListCount,
|
|
11576
12395
|
count,
|
|
11577
12396
|
textWidth
|
|
11578
12397
|
});
|
|
12398
|
+
const {
|
|
12399
|
+
listCount
|
|
12400
|
+
} = sizes;
|
|
12401
|
+
setStoreValue('listCount', listCount);
|
|
11579
12402
|
const {
|
|
11580
12403
|
textAlign
|
|
11581
12404
|
} = (layout === null || layout === void 0 ? void 0 : layout.qListObject.qDimensionInfo) || {};
|
|
@@ -11603,7 +12426,11 @@ function ListBox(_ref) {
|
|
|
11603
12426
|
scrollState,
|
|
11604
12427
|
local,
|
|
11605
12428
|
sizes,
|
|
11606
|
-
listCount
|
|
12429
|
+
listCount,
|
|
12430
|
+
overflowDisclaimer: {
|
|
12431
|
+
state: overflowDisclaimer,
|
|
12432
|
+
set: showOverflowDisclaimer
|
|
12433
|
+
}
|
|
11607
12434
|
});
|
|
11608
12435
|
const {
|
|
11609
12436
|
columnWidth,
|
|
@@ -11619,7 +12446,8 @@ function ListBox(_ref) {
|
|
|
11619
12446
|
});
|
|
11620
12447
|
}
|
|
11621
12448
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !listCount && /*#__PURE__*/React__default.createElement(ListBoxDisclaimer, {
|
|
11622
|
-
width: width
|
|
12449
|
+
width: width,
|
|
12450
|
+
text: "Listbox.NoMatchesForYourTerms"
|
|
11623
12451
|
}), /*#__PURE__*/React__default.createElement(InfiniteLoader, {
|
|
11624
12452
|
isItemLoaded: isItemLoaded,
|
|
11625
12453
|
itemCount: listCount || 1 // must be more than 0 or loadMoreItems will never be called again
|
|
@@ -11630,7 +12458,14 @@ function ListBox(_ref) {
|
|
|
11630
12458
|
threshold: 0,
|
|
11631
12459
|
minimumBatchSize: minimumBatchSize,
|
|
11632
12460
|
ref: loaderRef
|
|
11633
|
-
}, isVertical ? List : Grid)
|
|
12461
|
+
}, isVertical ? List : Grid), overflowDisclaimer.show && !overflowDisclaimer.dismissed && /*#__PURE__*/React__default.createElement(ListBoxFooter, {
|
|
12462
|
+
text: "Listbox.ItemsOverflow",
|
|
12463
|
+
dismiss: () => setOverflowDisclaimer(state => _objectSpread2(_objectSpread2({}, state), {}, {
|
|
12464
|
+
dismissed: true
|
|
12465
|
+
})),
|
|
12466
|
+
parentWidth: loaderRef === null || loaderRef === void 0 ? void 0 : (_loaderRef$current = loaderRef.current) === null || _loaderRef$current === void 0 ? void 0 : (_loaderRef$current$_l = _loaderRef$current._listRef) === null || _loaderRef$current$_l === void 0 ? void 0 : (_loaderRef$current$_l2 = _loaderRef$current$_l.props) === null || _loaderRef$current$_l2 === void 0 ? void 0 : _loaderRef$current$_l2.width,
|
|
12467
|
+
dense: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.dense
|
|
12468
|
+
}));
|
|
11634
12469
|
}
|
|
11635
12470
|
|
|
11636
12471
|
const selectAll = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -11780,7 +12615,7 @@ const Item = React__default.forwardRef((_ref, ref) => {
|
|
|
11780
12615
|
size: "large",
|
|
11781
12616
|
"aria-expanded": ariaExpanded,
|
|
11782
12617
|
"aria-controls": "moreMenuList"
|
|
11783
|
-
}, hasSvgIconShape && SvgIcon(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React__default.createElement("div", {
|
|
12618
|
+
}, hasSvgIconShape && SvgIcon$2(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React__default.createElement("div", {
|
|
11784
12619
|
ref: ref,
|
|
11785
12620
|
style: {
|
|
11786
12621
|
bottom: -spacing,
|
|
@@ -11809,7 +12644,7 @@ const clearSelections = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
11809
12644
|
}
|
|
11810
12645
|
}]
|
|
11811
12646
|
});
|
|
11812
|
-
var ClearSelections = (props => SvgIcon(clearSelections(props)));
|
|
12647
|
+
var ClearSelections = (props => SvgIcon$2(clearSelections(props)));
|
|
11813
12648
|
|
|
11814
12649
|
function useDefaultSelectionActions(_ref) {
|
|
11815
12650
|
let {
|
|
@@ -11896,7 +12731,7 @@ function MoreItem(_ref2) {
|
|
|
11896
12731
|
tabindex: "0"
|
|
11897
12732
|
}, hasSvgIconShape && /*#__PURE__*/React__default.createElement(ListItemIcon, {
|
|
11898
12733
|
className: classes$8.icon
|
|
11899
|
-
}, SvgIcon(item.getSvgIconShape())), /*#__PURE__*/React__default.createElement(Typography, {
|
|
12734
|
+
}, SvgIcon$2(item.getSvgIconShape())), /*#__PURE__*/React__default.createElement(Typography, {
|
|
11900
12735
|
noWrap: true
|
|
11901
12736
|
}, item.label)) : null;
|
|
11902
12737
|
}
|
|
@@ -12190,7 +13025,7 @@ const search = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
12190
13025
|
}
|
|
12191
13026
|
}]
|
|
12192
13027
|
});
|
|
12193
|
-
var SearchIcon = (props => SvgIcon(search(props)));
|
|
13028
|
+
var SearchIcon = (props => SvgIcon$2(search(props)));
|
|
12194
13029
|
|
|
12195
13030
|
const TREE_PATH = '/qListObjectDef';
|
|
12196
13031
|
const StyledInputAdornment = styled$1(InputAdornment)(_ref => {
|
|
@@ -12591,6 +13426,14 @@ function hasSelections(layout) {
|
|
|
12591
13426
|
function ListBoxPopover(_ref) {
|
|
12592
13427
|
let {
|
|
12593
13428
|
alignTo,
|
|
13429
|
+
anchorOrigin = {
|
|
13430
|
+
vertical: 'bottom',
|
|
13431
|
+
horizontal: 'center'
|
|
13432
|
+
},
|
|
13433
|
+
transformOrigin = {
|
|
13434
|
+
vertical: 'top',
|
|
13435
|
+
horizontal: 'center'
|
|
13436
|
+
},
|
|
12594
13437
|
show,
|
|
12595
13438
|
close,
|
|
12596
13439
|
app,
|
|
@@ -12663,14 +13506,8 @@ function ListBoxPopover(_ref) {
|
|
|
12663
13506
|
open: open,
|
|
12664
13507
|
onClose: popoverClose,
|
|
12665
13508
|
anchorEl: alignTo.current,
|
|
12666
|
-
anchorOrigin:
|
|
12667
|
-
|
|
12668
|
-
horizontal: 'center'
|
|
12669
|
-
},
|
|
12670
|
-
transformOrigin: {
|
|
12671
|
-
vertical: 'top',
|
|
12672
|
-
horizontal: 'center'
|
|
12673
|
-
},
|
|
13509
|
+
anchorOrigin: anchorOrigin,
|
|
13510
|
+
transformOrigin: transformOrigin,
|
|
12674
13511
|
PaperProps: {
|
|
12675
13512
|
style: {
|
|
12676
13513
|
minWidth: '250px'
|
|
@@ -12917,7 +13754,7 @@ const downArrow = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
12917
13754
|
}
|
|
12918
13755
|
}]
|
|
12919
13756
|
});
|
|
12920
|
-
var DownArrow = (props => SvgIcon(downArrow(props)));
|
|
13757
|
+
var DownArrow = (props => SvgIcon$2(downArrow(props)));
|
|
12921
13758
|
|
|
12922
13759
|
const PREFIX$6 = 'MultiState';
|
|
12923
13760
|
const classes$6 = {
|
|
@@ -13355,7 +14192,7 @@ const selectionsBack = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
13355
14192
|
}
|
|
13356
14193
|
}]
|
|
13357
14194
|
});
|
|
13358
|
-
var SelectionsBack = (props => SvgIcon(selectionsBack(props)));
|
|
14195
|
+
var SelectionsBack = (props => SvgIcon$2(selectionsBack(props)));
|
|
13359
14196
|
|
|
13360
14197
|
const selectionsForward = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
13361
14198
|
shapes: [{
|
|
@@ -13365,7 +14202,7 @@ const selectionsForward = props => _objectSpread2(_objectSpread2({}, props), {},
|
|
|
13365
14202
|
}
|
|
13366
14203
|
}]
|
|
13367
14204
|
});
|
|
13368
|
-
var SelectionsForward = (props => SvgIcon(selectionsForward(props)));
|
|
14205
|
+
var SelectionsForward = (props => SvgIcon$2(selectionsForward(props)));
|
|
13369
14206
|
|
|
13370
14207
|
function Nav(_ref) {
|
|
13371
14208
|
let {
|
|
@@ -13414,6 +14251,15 @@ function Nav(_ref) {
|
|
|
13414
14251
|
}, /*#__PURE__*/React__default.createElement(ClearSelections, null))));
|
|
13415
14252
|
}
|
|
13416
14253
|
|
|
14254
|
+
const idGen = [[10, 31], [0, 31], [0, 31], [0, 31], [0, 31], [0, 31]];
|
|
14255
|
+
function toChar(_ref) {
|
|
14256
|
+
let [min, max] = _ref;
|
|
14257
|
+
return (min + (Math.random() * (max - min) | 0)).toString(32);
|
|
14258
|
+
}
|
|
14259
|
+
function uid() {
|
|
14260
|
+
return idGen.map(toChar).join('');
|
|
14261
|
+
}
|
|
14262
|
+
|
|
13417
14263
|
function AppSelections(_ref) {
|
|
13418
14264
|
let {
|
|
13419
14265
|
app
|
|
@@ -13456,7 +14302,7 @@ function mount(_ref2) {
|
|
|
13456
14302
|
} = _ref2;
|
|
13457
14303
|
return ReactDOM.createPortal( /*#__PURE__*/React__default.createElement(AppSelections, {
|
|
13458
14304
|
app: app
|
|
13459
|
-
}), element);
|
|
14305
|
+
}), element, uid());
|
|
13460
14306
|
}
|
|
13461
14307
|
|
|
13462
14308
|
var classCallCheck = function (instance, Constructor) {
|
|
@@ -14413,6 +15259,51 @@ function identify(_ref) {
|
|
|
14413
15259
|
};
|
|
14414
15260
|
}
|
|
14415
15261
|
|
|
15262
|
+
const _excluded$3 = ["__DO_NOT_USE__"];
|
|
15263
|
+
|
|
15264
|
+
/**
|
|
15265
|
+
* @ignore
|
|
15266
|
+
* @typedef {object} DoNotUseOptions Options strictly recommended not to use as they might change anytime. Documenting them to keep track of them, but not exposing them to API docs.
|
|
15267
|
+
* @property {boolean=} [focusSearch=false] Initialize the Listbox with the search input focused. Only applicable when
|
|
15268
|
+
* search is true, since toggling will always focus the search input on show.
|
|
15269
|
+
* @property {boolean=} [options.showGray=true] Render fields or checkboxes in shades of gray instead of white when their state is excluded or alternative.
|
|
15270
|
+
* @property {boolean=} [options.calculatePagesHeight=false] Override each page's qHeight with its actual row count.
|
|
15271
|
+
* @property {object} [options.sessionModel] Use a custom sessionModel.
|
|
15272
|
+
* @property {object} [options.selectionsApi] Use a custom selectionsApi to customize how values are selected.
|
|
15273
|
+
* @property {function():boolean} [options.selectDisabled=] Define a function which tells when selections are disabled (true) or enabled (false). By default, always returns false.
|
|
15274
|
+
* @property {function():object[]} [options.postProcessPages] A function for client-side post-processing of returned pages.
|
|
15275
|
+
* @property {PromiseFunction} [options.fetchStart] A function called when the Listbox starts fetching data. Receives the fetch request promise as an argument.
|
|
15276
|
+
* @property {ReceiverFunction} [options.update] A function which receives an update function which upon call will trigger a data fetch.
|
|
15277
|
+
* @property {{setScrollPos:function(number):void, initScrollPos:number}} [options.scrollState=] Object including a setScrollPos function that sets current scroll position index. A initial scroll position index.
|
|
15278
|
+
* @property {function(number):void} [options.setCount=] A function that gets called with the length of the data in the Listbox.
|
|
15279
|
+
*/
|
|
15280
|
+
|
|
15281
|
+
/**
|
|
15282
|
+
* @ignore
|
|
15283
|
+
* @param {object} usersOptions Options sent in to fieldInstance.mount.
|
|
15284
|
+
* @param {DoNotUseOptions} __DO_NOT_USE__
|
|
15285
|
+
* @returns {object} Squashed options with defaults given for non-exposed options.
|
|
15286
|
+
*/
|
|
15287
|
+
const getOptions$1 = function () {
|
|
15288
|
+
let usersOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15289
|
+
const {
|
|
15290
|
+
__DO_NOT_USE__ = {}
|
|
15291
|
+
} = usersOptions,
|
|
15292
|
+
exposedOptions = _objectWithoutProperties(usersOptions, _excluded$3);
|
|
15293
|
+
const DO_NOT_USE_DEFAULTS = {
|
|
15294
|
+
update: undefined,
|
|
15295
|
+
fetchStart: undefined,
|
|
15296
|
+
showGray: true,
|
|
15297
|
+
focusSearch: false,
|
|
15298
|
+
sessionModel: undefined,
|
|
15299
|
+
selectionsApi: undefined,
|
|
15300
|
+
selectDisabled: undefined,
|
|
15301
|
+
postProcessPages: undefined,
|
|
15302
|
+
calculatePagesHeight: false
|
|
15303
|
+
};
|
|
15304
|
+
const squashedOptions = _objectSpread2(_objectSpread2(_objectSpread2({}, exposedOptions), DO_NOT_USE_DEFAULTS), __DO_NOT_USE__);
|
|
15305
|
+
return squashedOptions;
|
|
15306
|
+
};
|
|
14416
15307
|
function ListBoxWrapper(_ref) {
|
|
14417
15308
|
let {
|
|
14418
15309
|
app,
|
|
@@ -14475,16 +15366,50 @@ function ListBoxPortal(_ref2) {
|
|
|
14475
15366
|
qId: qId,
|
|
14476
15367
|
stateName: stateName,
|
|
14477
15368
|
options: options
|
|
14478
|
-
}), element);
|
|
15369
|
+
}), element, uid());
|
|
14479
15370
|
}
|
|
14480
15371
|
|
|
14481
|
-
const
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
15372
|
+
const DEFAULTS = {
|
|
15373
|
+
show: true,
|
|
15374
|
+
anchorOrigin: {
|
|
15375
|
+
vertical: 'bottom',
|
|
15376
|
+
horizontal: 'center'
|
|
15377
|
+
},
|
|
15378
|
+
transformOrigin: {
|
|
15379
|
+
vertical: 'top',
|
|
15380
|
+
horizontal: 'center'
|
|
15381
|
+
}
|
|
15382
|
+
};
|
|
15383
|
+
const getOptions = function () {
|
|
15384
|
+
let usersOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15385
|
+
const squashedOptions = _objectSpread2({}, DEFAULTS);
|
|
15386
|
+
extend$1(true, squashedOptions, usersOptions);
|
|
15387
|
+
return squashedOptions;
|
|
15388
|
+
};
|
|
15389
|
+
function ListBoxPopoverWrapper(_ref) {
|
|
15390
|
+
let {
|
|
15391
|
+
app,
|
|
15392
|
+
fieldIdentifier,
|
|
15393
|
+
stateName,
|
|
15394
|
+
element,
|
|
15395
|
+
options = {}
|
|
15396
|
+
} = _ref;
|
|
15397
|
+
const [showState, setShowstate] = useState$1(!!options.show);
|
|
15398
|
+
const handleCloseShowState = () => {
|
|
15399
|
+
setShowstate(false);
|
|
15400
|
+
};
|
|
15401
|
+
return /*#__PURE__*/React__default.createElement(ListBoxPopover, {
|
|
15402
|
+
show: showState,
|
|
15403
|
+
app: app,
|
|
15404
|
+
alignTo: {
|
|
15405
|
+
current: element
|
|
15406
|
+
},
|
|
15407
|
+
anchorOrigin: options.anchorOrigin,
|
|
15408
|
+
transformOrigin: options.transformOrigin,
|
|
15409
|
+
close: handleCloseShowState,
|
|
15410
|
+
fieldName: fieldIdentifier,
|
|
15411
|
+
stateName: stateName
|
|
15412
|
+
});
|
|
14488
15413
|
}
|
|
14489
15414
|
|
|
14490
15415
|
function addIndex(array, index) {
|
|
@@ -15542,7 +16467,7 @@ const warning = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
15542
16467
|
}
|
|
15543
16468
|
}]
|
|
15544
16469
|
});
|
|
15545
|
-
var WarningTriangle = (props => SvgIcon(warning(props)));
|
|
16470
|
+
var WarningTriangle = (props => SvgIcon$2(warning(props)));
|
|
15546
16471
|
|
|
15547
16472
|
/* eslint-disable react/no-array-index-key */
|
|
15548
16473
|
function DescriptionRow(_ref) {
|
|
@@ -15674,7 +16599,7 @@ function Error$1(_ref3) {
|
|
|
15674
16599
|
}));
|
|
15675
16600
|
}
|
|
15676
16601
|
|
|
15677
|
-
const _excluded$
|
|
16602
|
+
const _excluded$2 = ["size"];
|
|
15678
16603
|
const PREFIX$3 = 'Progress';
|
|
15679
16604
|
const classes$3 = {
|
|
15680
16605
|
root: "".concat(PREFIX$3, "-root"),
|
|
@@ -15711,7 +16636,7 @@ function Progress(_ref2) {
|
|
|
15711
16636
|
let {
|
|
15712
16637
|
size = 'medium'
|
|
15713
16638
|
} = _ref2,
|
|
15714
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
16639
|
+
props = _objectWithoutProperties(_ref2, _excluded$2);
|
|
15715
16640
|
const s = SIZES[size];
|
|
15716
16641
|
return /*#__PURE__*/React__default.createElement(Root, {
|
|
15717
16642
|
className: classes$3.root
|
|
@@ -15730,7 +16655,7 @@ function Progress(_ref2) {
|
|
|
15730
16655
|
}, props)));
|
|
15731
16656
|
}
|
|
15732
16657
|
|
|
15733
|
-
const _excluded$
|
|
16658
|
+
const _excluded$1 = ["cancel", "translator"],
|
|
15734
16659
|
_excluded2 = ["retry", "translator"];
|
|
15735
16660
|
const PREFIX$2 = 'LongRunningQuery';
|
|
15736
16661
|
const classes$2 = {
|
|
@@ -15756,7 +16681,7 @@ function Cancel(_ref) {
|
|
|
15756
16681
|
cancel,
|
|
15757
16682
|
translator
|
|
15758
16683
|
} = _ref,
|
|
15759
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16684
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
15760
16685
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledGrid$2, {
|
|
15761
16686
|
container: true,
|
|
15762
16687
|
item: true,
|
|
@@ -16866,7 +17791,7 @@ function glue$1(_ref) {
|
|
|
16866
17791
|
initialSnPlugins: initialSnPlugins,
|
|
16867
17792
|
initialError: initialError,
|
|
16868
17793
|
onMount: onMount
|
|
16869
|
-
}), element,
|
|
17794
|
+
}), element, currentId);
|
|
16870
17795
|
const unmount = () => {
|
|
16871
17796
|
root.remove(portal);
|
|
16872
17797
|
model.removeListener('closed', unmount);
|
|
@@ -17144,7 +18069,22 @@ async function init(model, optional, halo, initialError) {
|
|
|
17144
18069
|
* @property {string} type
|
|
17145
18070
|
* @property {string=} version
|
|
17146
18071
|
* @property {(Field[])=} fields
|
|
18072
|
+
* @property {boolean} [extendProperties=false] Whether to deeply extend properties or not. If false then subtrees will be overwritten.
|
|
17147
18073
|
* @property {EngineAPI.IGenericObjectProperties=} properties
|
|
18074
|
+
* @example
|
|
18075
|
+
* // A config for Creating objects:
|
|
18076
|
+
* const createConfig = {
|
|
18077
|
+
* type: 'bar',
|
|
18078
|
+
* element: document.querySelector('.bar'),
|
|
18079
|
+
* extendProperties: true,
|
|
18080
|
+
* fields: ['[Country names]', '=Sum(Sales)'],
|
|
18081
|
+
* properties: {
|
|
18082
|
+
* legend: {
|
|
18083
|
+
* show: false,
|
|
18084
|
+
* },
|
|
18085
|
+
* }
|
|
18086
|
+
* };
|
|
18087
|
+
* nebbie.render(createConfig);
|
|
17148
18088
|
*/
|
|
17149
18089
|
async function createSessionObject(_ref, halo) {
|
|
17150
18090
|
let {
|
|
@@ -17154,7 +18094,8 @@ async function createSessionObject(_ref, halo) {
|
|
|
17154
18094
|
properties,
|
|
17155
18095
|
options,
|
|
17156
18096
|
plugins,
|
|
17157
|
-
element
|
|
18097
|
+
element,
|
|
18098
|
+
extendProperties
|
|
17158
18099
|
} = _ref;
|
|
17159
18100
|
let mergedProps = {};
|
|
17160
18101
|
let error;
|
|
@@ -17163,7 +18104,7 @@ async function createSessionObject(_ref, halo) {
|
|
|
17163
18104
|
name: type,
|
|
17164
18105
|
version
|
|
17165
18106
|
});
|
|
17166
|
-
mergedProps = await t.initialProperties(properties);
|
|
18107
|
+
mergedProps = await t.initialProperties(properties, extendProperties);
|
|
17167
18108
|
const sn = await t.supernova();
|
|
17168
18109
|
if (fields) {
|
|
17169
18110
|
populateData({
|
|
@@ -21157,16 +22098,21 @@ function create$1(info, halo) {
|
|
|
21157
22098
|
return sn;
|
|
21158
22099
|
}),
|
|
21159
22100
|
initialProperties(initial) {
|
|
22101
|
+
let extendProperties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
21160
22102
|
return this.supernova().then(() => {
|
|
21161
|
-
const props = _objectSpread2(
|
|
22103
|
+
const props = _objectSpread2({
|
|
21162
22104
|
qInfo: {
|
|
21163
22105
|
qType: type.name
|
|
21164
22106
|
},
|
|
21165
22107
|
visualization: type.name,
|
|
21166
22108
|
version: type.version,
|
|
21167
22109
|
showTitles: true
|
|
21168
|
-
}, JSON.parse(stringified))
|
|
21169
|
-
|
|
22110
|
+
}, JSON.parse(stringified));
|
|
22111
|
+
if (extendProperties) {
|
|
22112
|
+
extend$1(true, props, initial);
|
|
22113
|
+
return props;
|
|
22114
|
+
}
|
|
22115
|
+
return _objectSpread2(_objectSpread2({}, props), initial);
|
|
21170
22116
|
});
|
|
21171
22117
|
}
|
|
21172
22118
|
};
|
|
@@ -21270,8 +22216,6 @@ function create(_ref) {
|
|
|
21270
22216
|
};
|
|
21271
22217
|
}
|
|
21272
22218
|
|
|
21273
|
-
const _excluded$1 = ["__DO_NOT_USE__"];
|
|
21274
|
-
|
|
21275
22219
|
/**
|
|
21276
22220
|
* @interface Context
|
|
21277
22221
|
* @property {boolean=} keyboardNavigation
|
|
@@ -21382,49 +22326,6 @@ const mergeConfigs = (base, c) => ({
|
|
|
21382
22326
|
* @typedef {function(function)} ReceiverFunction A callback function which receives another function as input.
|
|
21383
22327
|
*/
|
|
21384
22328
|
|
|
21385
|
-
/**
|
|
21386
|
-
* @ignore
|
|
21387
|
-
* @typedef {object} DoNotUseOptions Options strictly recommended not to use as they might change anytime. Documenting them to keep track of them, but not exposing them to API docs.
|
|
21388
|
-
* @property {boolean=} [focusSearch=false] Initialize the Listbox with the search input focused. Only applicable when
|
|
21389
|
-
* search is true, since toggling will always focus the search input on show.
|
|
21390
|
-
* @property {boolean=} [options.showGray=true] Render fields or checkboxes in shades of gray instead of white when their state is excluded or alternative.
|
|
21391
|
-
* @property {boolean=} [options.calculatePagesHeight=false] Override each page's qHeight with its actual row count.
|
|
21392
|
-
* @property {object} [options.sessionModel] Use a custom sessionModel.
|
|
21393
|
-
* @property {object} [options.selectionsApi] Use a custom selectionsApi to customize how values are selected.
|
|
21394
|
-
* @property {function():boolean} [options.selectDisabled=] Define a function which tells when selections are disabled (true) or enabled (false). By default, always returns false.
|
|
21395
|
-
* @property {function():object[]} [options.postProcessPages] A function for client-side post-processing of returned pages.
|
|
21396
|
-
* @property {PromiseFunction} [options.fetchStart] A function called when the Listbox starts fetching data. Receives the fetch request promise as an argument.
|
|
21397
|
-
* @property {ReceiverFunction} [options.update] A function which receives an update function which upon call will trigger a data fetch.
|
|
21398
|
-
* @property {{setScrollPos:function(number):void, initScrollPos:number}} [options.scrollState=] Object including a setScrollPos function that sets current scroll position index. A initial scroll position index.
|
|
21399
|
-
* @property {function(number):void} [options.setCount=] A function that gets called with the length of the data in the Listbox.
|
|
21400
|
-
*/
|
|
21401
|
-
|
|
21402
|
-
/**
|
|
21403
|
-
* @ignore
|
|
21404
|
-
* @param {object} usersOptions Options sent in to fieldInstance.mount.
|
|
21405
|
-
* @param {DoNotUseOptions} __DO_NOT_USE__
|
|
21406
|
-
* @returns {object} Squashed options with defaults given for non-exposed options.
|
|
21407
|
-
*/
|
|
21408
|
-
const getOptions = function () {
|
|
21409
|
-
let usersOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21410
|
-
const {
|
|
21411
|
-
__DO_NOT_USE__ = {}
|
|
21412
|
-
} = usersOptions,
|
|
21413
|
-
exposedOptions = _objectWithoutProperties(usersOptions, _excluded$1);
|
|
21414
|
-
const DO_NOT_USE_DEFAULTS = {
|
|
21415
|
-
update: undefined,
|
|
21416
|
-
fetchStart: undefined,
|
|
21417
|
-
showGray: true,
|
|
21418
|
-
focusSearch: false,
|
|
21419
|
-
sessionModel: undefined,
|
|
21420
|
-
selectionsApi: undefined,
|
|
21421
|
-
selectDisabled: undefined,
|
|
21422
|
-
postProcessPages: undefined,
|
|
21423
|
-
calculatePagesHeight: false
|
|
21424
|
-
};
|
|
21425
|
-
const squashedOptions = _objectSpread2(_objectSpread2(_objectSpread2({}, exposedOptions), DO_NOT_USE_DEFAULTS), __DO_NOT_USE__);
|
|
21426
|
-
return squashedOptions;
|
|
21427
|
-
};
|
|
21428
22329
|
function nuked() {
|
|
21429
22330
|
let configuration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21430
22331
|
const locale = appLocaleFn(configuration.context.language);
|
|
@@ -21687,7 +22588,7 @@ function nuked() {
|
|
|
21687
22588
|
app,
|
|
21688
22589
|
fieldIdentifier,
|
|
21689
22590
|
qId,
|
|
21690
|
-
options: getOptions(options),
|
|
22591
|
+
options: getOptions$1(options),
|
|
21691
22592
|
stateName: options.stateName || '$'
|
|
21692
22593
|
});
|
|
21693
22594
|
root.add(this._instance);
|
|
@@ -21724,7 +22625,23 @@ function nuked() {
|
|
|
21724
22625
|
*/
|
|
21725
22626
|
getRegisteredTypes: types.getList,
|
|
21726
22627
|
__DO_NOT_USE__: {
|
|
21727
|
-
types
|
|
22628
|
+
types,
|
|
22629
|
+
popover(anchorElement, fieldIdentifier, options) {
|
|
22630
|
+
if (api._popoverInstance) {
|
|
22631
|
+
root.remove(api._popoverInstance);
|
|
22632
|
+
api._popoverInstance = null;
|
|
22633
|
+
}
|
|
22634
|
+
const opts = getOptions(options);
|
|
22635
|
+
api._popoverInstance = React__default.createElement(ListBoxPopoverWrapper, {
|
|
22636
|
+
element: anchorElement,
|
|
22637
|
+
key: uid(),
|
|
22638
|
+
app,
|
|
22639
|
+
fieldIdentifier,
|
|
22640
|
+
options: opts,
|
|
22641
|
+
stateName: options.stateName || '$'
|
|
22642
|
+
});
|
|
22643
|
+
root.add(api._popoverInstance);
|
|
22644
|
+
}
|
|
21728
22645
|
}
|
|
21729
22646
|
};
|
|
21730
22647
|
halo.public.nebbie = api;
|