react-science 19.0.0 → 19.2.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/lib/components/color-picker/react-color/helpers/color.d.ts +1 -1
- package/lib/components/color-picker/react-color/helpers/color.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/helpers/color.js +1 -1
- package/lib/components/color-picker/react-color/helpers/color.js.map +1 -1
- package/lib/components/form/components/hooks/use_input_id.d.ts +8 -0
- package/lib/components/form/components/hooks/use_input_id.d.ts.map +1 -0
- package/lib/components/form/components/hooks/use_input_id.js +15 -0
- package/lib/components/form/components/hooks/use_input_id.js.map +1 -0
- package/lib/components/form/components/input/checkbox.d.ts +5 -0
- package/lib/components/form/components/input/checkbox.d.ts.map +1 -0
- package/lib/components/form/components/input/checkbox.js +19 -0
- package/lib/components/form/components/input/checkbox.js.map +1 -0
- package/lib/components/form/components/input/input.d.ts +9 -0
- package/lib/components/form/components/input/input.d.ts.map +1 -0
- package/lib/components/form/components/input/input.js +16 -0
- package/lib/components/form/components/input/input.js.map +1 -0
- package/lib/components/form/components/input/numeric_input.d.ts +8 -0
- package/lib/components/form/components/input/numeric_input.d.ts.map +1 -0
- package/lib/components/form/components/input/numeric_input.js +20 -0
- package/lib/components/form/components/input/numeric_input.js.map +1 -0
- package/lib/components/form/components/input/reset_button.d.ts +7 -0
- package/lib/components/form/components/input/reset_button.d.ts.map +1 -0
- package/lib/components/form/components/input/reset_button.js +9 -0
- package/lib/components/form/components/input/reset_button.js.map +1 -0
- package/lib/components/form/components/input/select.d.ts +12 -0
- package/lib/components/form/components/input/select.d.ts.map +1 -0
- package/lib/components/form/components/input/select.js +25 -0
- package/lib/components/form/components/input/select.js.map +1 -0
- package/lib/components/form/components/input/submit_button.d.ts +5 -0
- package/lib/components/form/components/input/submit_button.d.ts.map +1 -0
- package/lib/components/form/components/input/submit_button.js +11 -0
- package/lib/components/form/components/input/submit_button.js.map +1 -0
- package/lib/components/form/components/input/switch.d.ts +6 -0
- package/lib/components/form/components/input/switch.d.ts.map +1 -0
- package/lib/components/form/components/input/switch.js +16 -0
- package/lib/components/form/components/input/switch.js.map +1 -0
- package/lib/components/form/components/input_groups/input.d.ts +20 -0
- package/lib/components/form/components/input_groups/input.d.ts.map +1 -0
- package/lib/components/form/components/input_groups/input.js +9 -0
- package/lib/components/form/components/input_groups/input.js.map +1 -0
- package/lib/components/form/components/input_groups/select.d.ts +59 -0
- package/lib/components/form/components/input_groups/select.d.ts.map +1 -0
- package/lib/components/form/components/input_groups/select.js +29 -0
- package/lib/components/form/components/input_groups/select.js.map +1 -0
- package/lib/components/form/components/util/select.d.ts +20 -0
- package/lib/components/form/components/util/select.d.ts.map +1 -0
- package/lib/components/form/components/util/select.js +20 -0
- package/lib/components/form/components/util/select.js.map +1 -0
- package/lib/components/form/context/use_ts_form.d.ts +41 -0
- package/lib/components/form/context/use_ts_form.d.ts.map +1 -0
- package/lib/components/form/context/use_ts_form.js +27 -0
- package/lib/components/form/context/use_ts_form.js.map +1 -0
- package/lib/components/form/utils/use_field_id.d.ts +2 -0
- package/lib/components/form/utils/use_field_id.d.ts.map +1 -0
- package/lib/components/form/utils/use_field_id.js +5 -0
- package/lib/components/form/utils/use_field_id.js.map +1 -0
- package/lib/components/form/utils/use_intent.d.ts +3 -0
- package/lib/components/form/utils/use_intent.d.ts.map +1 -0
- package/lib/components/form/utils/use_intent.js +4 -0
- package/lib/components/form/utils/use_intent.js.map +1 -0
- package/lib/components/hooks/useDoubleClick.js +1 -1
- package/lib/components/hooks/useDoubleClick.js.map +1 -1
- package/lib/components/hooks/useOnOff.js +1 -1
- package/lib/components/hooks/useOnOff.js.map +1 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +2 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/info-panel/InfoPanel.js +2 -2
- package/lib/components/info-panel/InfoPanel.js.map +1 -1
- package/lib/components/input/index.d.ts.map +1 -0
- package/lib/components/input/index.js.map +1 -0
- package/lib/components/{forms → input}/radio-button-group/RadioButton.d.ts.map +1 -1
- package/lib/components/{forms → input}/radio-button-group/RadioButton.js.map +1 -1
- package/lib/components/{forms → input}/radio-button-group/RadioButtonGroup.d.ts.map +1 -1
- package/lib/components/{forms → input}/radio-button-group/RadioButtonGroup.js.map +1 -1
- package/lib/components/{forms → input}/radio-button-group/index.d.ts.map +1 -1
- package/lib/components/input/radio-button-group/index.js.map +1 -0
- package/lib/components/input/styles.d.ts.map +1 -0
- package/lib/components/{forms → input}/styles.js.map +1 -1
- package/lib/components/{forms → input}/utils/SubText.d.ts.map +1 -1
- package/lib/components/{forms → input}/utils/SubText.js.map +1 -1
- package/lib/components/input/utils/index.d.ts.map +1 -0
- package/lib/components/input/utils/index.js.map +1 -0
- package/lib/components/{forms → input}/utils/use_input_id.d.ts.map +1 -1
- package/lib/components/{forms → input}/utils/use_input_id.js.map +1 -1
- package/lib/components/logger/FifoLoggerDialog.js +1 -1
- package/lib/components/logger/FifoLoggerDialog.js.map +1 -1
- package/lib/components/pdnd.cjs +2 -2
- package/lib/components/pdnd.cjs.map +1 -1
- package/lib/components/pdnd.d.cts +1 -1
- package/lib/components/pdnd.d.cts.map +1 -1
- package/lib/components/split_pane/split_pane.d.ts +5 -0
- package/lib/components/split_pane/split_pane.d.ts.map +1 -1
- package/lib/components/split_pane/split_pane.js +23 -2
- package/lib/components/split_pane/split_pane.js.map +1 -1
- package/lib/components/table/table_body.d.ts.map +1 -1
- package/lib/components/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/components/toolbar/Toolbar.js +2 -1
- package/lib/components/toolbar/Toolbar.js.map +1 -1
- package/package.json +32 -30
- package/src/components/color-picker/react-color/helpers/color.ts +2 -2
- package/src/components/form/components/hooks/use_input_id.ts +19 -0
- package/src/components/form/components/input/checkbox.tsx +36 -0
- package/src/components/form/components/input/input.tsx +37 -0
- package/src/components/form/components/input/numeric_input.tsx +49 -0
- package/src/components/form/components/input/reset_button.tsx +19 -0
- package/src/components/form/components/input/select.tsx +47 -0
- package/src/components/form/components/input/submit_button.tsx +23 -0
- package/src/components/form/components/input/switch.tsx +33 -0
- package/src/components/form/components/input_groups/input.tsx +63 -0
- package/src/components/form/components/input_groups/select.tsx +196 -0
- package/src/components/form/components/util/select.tsx +67 -0
- package/src/components/form/context/use_ts_form.ts +31 -0
- package/src/components/form/utils/use_field_id.ts +5 -0
- package/src/components/form/utils/use_intent.ts +5 -0
- package/src/components/hooks/useDoubleClick.ts +1 -1
- package/src/components/hooks/useOnOff.ts +1 -1
- package/src/components/index.ts +2 -1
- package/src/components/info-panel/InfoPanel.tsx +2 -2
- package/src/components/logger/FifoLoggerDialog.tsx +1 -1
- package/src/components/pdnd.cts +1 -1
- package/src/components/split_pane/split_pane.tsx +43 -2
- package/src/components/table/table_body.tsx +1 -1
- package/src/components/toolbar/Toolbar.tsx +2 -1
- package/lib/components/doi/__tests__/parseDoi.test.d.ts +0 -2
- package/lib/components/doi/__tests__/parseDoi.test.d.ts.map +0 -1
- package/lib/components/doi/__tests__/parseDoi.test.js +0 -19
- package/lib/components/doi/__tests__/parseDoi.test.js.map +0 -1
- package/lib/components/forms/index.d.ts.map +0 -1
- package/lib/components/forms/index.js.map +0 -1
- package/lib/components/forms/radio-button-group/index.js.map +0 -1
- package/lib/components/forms/styles.d.ts.map +0 -1
- package/lib/components/forms/utils/index.d.ts.map +0 -1
- package/lib/components/forms/utils/index.js.map +0 -1
- /package/lib/components/{forms → input}/index.d.ts +0 -0
- /package/lib/components/{forms → input}/index.js +0 -0
- /package/lib/components/{forms → input}/radio-button-group/RadioButton.d.ts +0 -0
- /package/lib/components/{forms → input}/radio-button-group/RadioButton.js +0 -0
- /package/lib/components/{forms → input}/radio-button-group/RadioButtonGroup.d.ts +0 -0
- /package/lib/components/{forms → input}/radio-button-group/RadioButtonGroup.js +0 -0
- /package/lib/components/{forms → input}/radio-button-group/index.d.ts +0 -0
- /package/lib/components/{forms → input}/radio-button-group/index.js +0 -0
- /package/lib/components/{forms → input}/styles.d.ts +0 -0
- /package/lib/components/{forms → input}/styles.js +0 -0
- /package/lib/components/{forms → input}/utils/SubText.d.ts +0 -0
- /package/lib/components/{forms → input}/utils/SubText.js +0 -0
- /package/lib/components/{forms → input}/utils/index.d.ts +0 -0
- /package/lib/components/{forms → input}/utils/index.js +0 -0
- /package/lib/components/{forms → input}/utils/use_input_id.d.ts +0 -0
- /package/lib/components/{forms → input}/utils/use_input_id.js +0 -0
- /package/src/components/{forms → input}/index.ts +0 -0
- /package/src/components/{forms → input}/radio-button-group/RadioButton.tsx +0 -0
- /package/src/components/{forms → input}/radio-button-group/RadioButtonGroup.tsx +0 -0
- /package/src/components/{forms → input}/radio-button-group/index.ts +0 -0
- /package/src/components/{forms → input}/styles.ts +0 -0
- /package/src/components/{forms → input}/utils/SubText.tsx +0 -0
- /package/src/components/{forms → input}/utils/index.ts +0 -0
- /package/src/components/{forms → input}/utils/use_input_id.ts +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { MenuItem } from '@blueprintjs/core';
|
|
2
|
+
import type { ItemRenderer } from '@blueprintjs/select';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
export type SelectId = string | number | null;
|
|
6
|
+
|
|
7
|
+
export type GetOptionValue<OptionType, ID extends SelectId> = (
|
|
8
|
+
option: OptionType | undefined,
|
|
9
|
+
) => ID | undefined;
|
|
10
|
+
export type GetOptionLabel<OptionType> = (
|
|
11
|
+
option: OptionType | undefined,
|
|
12
|
+
) => ReactNode;
|
|
13
|
+
|
|
14
|
+
export interface GetItemRendererOptions<OptionType, ID extends SelectId> {
|
|
15
|
+
selected: ID | undefined;
|
|
16
|
+
getValue: GetOptionValue<OptionType, ID>;
|
|
17
|
+
getLabel: GetOptionLabel<OptionType>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function getItemRenderer<OptionType, ID extends SelectId>(
|
|
21
|
+
options: GetItemRendererOptions<OptionType, ID>,
|
|
22
|
+
) {
|
|
23
|
+
const { selected, getValue, getLabel } = options;
|
|
24
|
+
|
|
25
|
+
const render: ItemRenderer<OptionType> = (
|
|
26
|
+
item,
|
|
27
|
+
{ handleClick, handleFocus, modifiers, index },
|
|
28
|
+
) => {
|
|
29
|
+
const label = getLabel(item);
|
|
30
|
+
const { active, disabled, matchesPredicate } = modifiers;
|
|
31
|
+
if (!matchesPredicate) return null;
|
|
32
|
+
return (
|
|
33
|
+
<MenuItem
|
|
34
|
+
active={active}
|
|
35
|
+
disabled={disabled}
|
|
36
|
+
selected={selected === getValue(item)}
|
|
37
|
+
key={index}
|
|
38
|
+
onClick={handleClick}
|
|
39
|
+
onFocus={handleFocus}
|
|
40
|
+
roleStructure="listoption"
|
|
41
|
+
text={label}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return render;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface SelectOptionLabel {
|
|
50
|
+
label: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function getSelectLabel(
|
|
54
|
+
option: SelectOptionLabel | undefined,
|
|
55
|
+
): string | undefined {
|
|
56
|
+
return option?.label;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface SelectOption<ID> extends SelectOptionLabel {
|
|
60
|
+
value: ID;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function getSelectValue<Option extends SelectOption<unknown>>(
|
|
64
|
+
option: Option | undefined,
|
|
65
|
+
): Option['value'] | undefined {
|
|
66
|
+
return option?.value;
|
|
67
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createFormHook, createFormHookContexts } from '@tanstack/react-form';
|
|
2
|
+
|
|
3
|
+
import { Checkbox } from '../components/input/checkbox.js';
|
|
4
|
+
import { Input } from '../components/input/input.js';
|
|
5
|
+
import { NumericInput } from '../components/input/numeric_input.js';
|
|
6
|
+
import { ResetButton } from '../components/input/reset_button.js';
|
|
7
|
+
import { Select } from '../components/input/select.js';
|
|
8
|
+
import { SubmitButton } from '../components/input/submit_button.js';
|
|
9
|
+
import { Switch } from '../components/input/switch.js';
|
|
10
|
+
|
|
11
|
+
const { useFormContext, useFieldContext, formContext, fieldContext } =
|
|
12
|
+
createFormHookContexts();
|
|
13
|
+
|
|
14
|
+
const { useAppForm, withForm } = createFormHook({
|
|
15
|
+
fieldContext,
|
|
16
|
+
formContext,
|
|
17
|
+
formComponents: {
|
|
18
|
+
SubmitButton,
|
|
19
|
+
ResetButton,
|
|
20
|
+
},
|
|
21
|
+
fieldComponents: {
|
|
22
|
+
Input,
|
|
23
|
+
NumericInput,
|
|
24
|
+
Checkbox,
|
|
25
|
+
Select,
|
|
26
|
+
Switch,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const useForm = useAppForm;
|
|
31
|
+
export { useFieldContext, useFormContext, withForm };
|
package/src/components/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from './color-picker/index.js';
|
|
|
4
4
|
export * from './dialog/index.js';
|
|
5
5
|
export * from './doi/index.js';
|
|
6
6
|
export * from './drop-zone/index.js';
|
|
7
|
-
export * from './
|
|
7
|
+
export * from './input/index.js';
|
|
8
8
|
export * from './fullscreen/index.js';
|
|
9
9
|
export * from './header/index.js';
|
|
10
10
|
export * from './hooks/index.js';
|
|
@@ -14,6 +14,7 @@ export * from './root-layout/index.js';
|
|
|
14
14
|
export * from './split_pane/index.js';
|
|
15
15
|
export * from './table/index.js';
|
|
16
16
|
export * from './toolbar/index.js';
|
|
17
|
+
export * from './form/context/use_ts_form.js';
|
|
17
18
|
export * from './activity_bar/index.js';
|
|
18
19
|
export * from './activity_panel/index.js';
|
|
19
20
|
export * from './utils/index.js';
|
|
@@ -2,11 +2,11 @@ import { Classes, Collapse, InputGroup } from '@blueprintjs/core';
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import type { CSSProperties } from 'react';
|
|
4
4
|
import { memo, useCallback, useMemo, useState } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { P, match } from 'ts-pattern';
|
|
6
6
|
|
|
7
7
|
import { Button } from '../button/Button.js';
|
|
8
8
|
import { SelectedTotal } from '../selected-total/index.js';
|
|
9
|
-
import {
|
|
9
|
+
import { Table, createTableColumnHelper } from '../table/index.js';
|
|
10
10
|
import { shouldForwardPropExcept } from '../utils/shouldForwardPropExcept.js';
|
|
11
11
|
import * as ValueRenderers from '../value-renderers/index.js';
|
|
12
12
|
|
|
@@ -5,7 +5,7 @@ import type { CSSProperties } from 'react';
|
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Button } from '../button/index.js';
|
|
8
|
-
import {
|
|
8
|
+
import { Table, createTableColumnHelper } from '../table/index.js';
|
|
9
9
|
|
|
10
10
|
import { useFifoLogger } from './useFifoLogger.js';
|
|
11
11
|
|
package/src/components/pdnd.cts
CHANGED
|
@@ -14,7 +14,7 @@ export {
|
|
|
14
14
|
export { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
15
15
|
export { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
16
16
|
export {
|
|
17
|
-
extractClosestEdge,
|
|
18
17
|
attachClosestEdge,
|
|
18
|
+
extractClosestEdge,
|
|
19
19
|
} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
20
20
|
export { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';
|
|
@@ -84,6 +84,12 @@ export interface SplitPaneProps {
|
|
|
84
84
|
*/
|
|
85
85
|
onSizeChange?: (size: SplitPaneSize) => void;
|
|
86
86
|
|
|
87
|
+
/**
|
|
88
|
+
* When set to true, only visible children will be rendered. If a side is closed or has a size of 0, it will not be rendered at all.
|
|
89
|
+
* When not set or set to false, closed or otherwise 0-sized sides will still be rendered.
|
|
90
|
+
*/
|
|
91
|
+
unmountChildren?: boolean;
|
|
92
|
+
|
|
87
93
|
/**
|
|
88
94
|
* The two React elements to show on both sides of the pane.
|
|
89
95
|
* If one of the elements is `null`, the splitter will disappear and the
|
|
@@ -105,6 +111,7 @@ export function SplitPane(props: SplitPaneProps) {
|
|
|
105
111
|
closeThreshold = null,
|
|
106
112
|
onResize,
|
|
107
113
|
onOpenChange,
|
|
114
|
+
unmountChildren = false,
|
|
108
115
|
children,
|
|
109
116
|
} = props;
|
|
110
117
|
|
|
@@ -113,6 +120,7 @@ export function SplitPane(props: SplitPaneProps) {
|
|
|
113
120
|
defaultProp: defaultOpen,
|
|
114
121
|
onChange: onOpenChange,
|
|
115
122
|
});
|
|
123
|
+
|
|
116
124
|
const [size, setSize] = useControllableState<SplitPaneSize>({
|
|
117
125
|
prop: sizeProp,
|
|
118
126
|
defaultProp: defaultSize,
|
|
@@ -169,9 +177,26 @@ export function SplitPane(props: SplitPaneProps) {
|
|
|
169
177
|
);
|
|
170
178
|
}
|
|
171
179
|
|
|
180
|
+
function shouldMountSide(side: SplitPaneSide) {
|
|
181
|
+
if (!unmountChildren) {
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
return isSideVisible(
|
|
185
|
+
isOpen ?? defaultOpen,
|
|
186
|
+
controlledSide === side,
|
|
187
|
+
splitSize,
|
|
188
|
+
sizeType,
|
|
189
|
+
rootSize
|
|
190
|
+
? direction === 'horizontal'
|
|
191
|
+
? rootSize.width
|
|
192
|
+
: rootSize.height
|
|
193
|
+
: 0,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
172
197
|
return (
|
|
173
198
|
<SplitPaneContainer direction={direction} ref={rootRef}>
|
|
174
|
-
{children[0] !== null && (
|
|
199
|
+
{children[0] !== null && shouldMountSide('start') && (
|
|
175
200
|
<SplitSide style={getSplitSideStyle('start')}>{children[0]}</SplitSide>
|
|
176
201
|
)}
|
|
177
202
|
{children[0] !== null && children[1] !== null && (
|
|
@@ -185,7 +210,7 @@ export function SplitPane(props: SplitPaneProps) {
|
|
|
185
210
|
/>
|
|
186
211
|
)}
|
|
187
212
|
|
|
188
|
-
{children[1] !== null && (
|
|
213
|
+
{children[1] !== null && shouldMountSide('end') && (
|
|
189
214
|
<SplitSide style={getSplitSideStyle('end')}>{children[1]}</SplitSide>
|
|
190
215
|
)}
|
|
191
216
|
</SplitPaneContainer>
|
|
@@ -242,6 +267,22 @@ function percentToFlex(percent: number): number {
|
|
|
242
267
|
return (flexBase - percent * flexBase) / percent;
|
|
243
268
|
}
|
|
244
269
|
|
|
270
|
+
function isSideVisible(
|
|
271
|
+
isOpen: boolean,
|
|
272
|
+
isControlledSide: boolean,
|
|
273
|
+
size: number,
|
|
274
|
+
type: SplitPaneType,
|
|
275
|
+
parentSize: number,
|
|
276
|
+
) {
|
|
277
|
+
if (!isOpen) {
|
|
278
|
+
return !isControlledSide;
|
|
279
|
+
} else if (type === '%') {
|
|
280
|
+
return isControlledSide ? size !== 0 : size !== 100;
|
|
281
|
+
} else {
|
|
282
|
+
return isControlledSide ? size !== 0 : size !== parentSize;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
245
286
|
function getItemStyle(
|
|
246
287
|
isOpen: boolean,
|
|
247
288
|
isControlledSide: boolean,
|
|
@@ -10,8 +10,8 @@ import { TableRowCell } from './table_row_cell.js';
|
|
|
10
10
|
import type {
|
|
11
11
|
GetTdProps,
|
|
12
12
|
TableRowPreviewRenderer,
|
|
13
|
-
TableRowTrRenderer,
|
|
14
13
|
TableRowTrRenderProps,
|
|
14
|
+
TableRowTrRenderer,
|
|
15
15
|
} from './table_utils.js';
|
|
16
16
|
|
|
17
17
|
interface TableBodyProps<TData extends RowData> {
|
|
@@ -60,7 +60,8 @@ const border = '1px solid rgb(247, 247, 247)';
|
|
|
60
60
|
|
|
61
61
|
const ToolbarButton = styled(Button)`
|
|
62
62
|
.${Classes.ICON} {
|
|
63
|
-
|
|
63
|
+
/* Color of icon in button is lighter in Blueprintjs. We want a better contrast in the toolbars */
|
|
64
|
+
color: ${Colors.DARK_GRAY3} !important;
|
|
64
65
|
width: 16px;
|
|
65
66
|
height: 16px;
|
|
66
67
|
font-size: 12px;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseDoi.test.d.ts","sourceRoot":"","sources":["../../../../src/components/doi/__tests__/parseDoi.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { expect, test } from 'vitest';
|
|
2
|
-
import { normalizeDOI } from '../utils.js';
|
|
3
|
-
const dois = [
|
|
4
|
-
'/10.3762/bjoc.20.4',
|
|
5
|
-
'10.3762/bjoc.20.4',
|
|
6
|
-
'http://dx.doi.org//10.3762/bjoc.20.4',
|
|
7
|
-
'https://dx.doi.org//10.3762/bjoc.20.4',
|
|
8
|
-
'http://www.doi.org//10.3762/bjoc.20.4',
|
|
9
|
-
'https://www.doi.org//10.3762/bjoc.20.4',
|
|
10
|
-
'http://doi.org//10.3762/bjoc.20.4',
|
|
11
|
-
'https://doi.org//10.3762/bjoc.20.4',
|
|
12
|
-
];
|
|
13
|
-
test('normalize doi', async () => {
|
|
14
|
-
for (const doi of dois) {
|
|
15
|
-
const result = normalizeDOI(doi);
|
|
16
|
-
expect(result).toBe('10.3762/bjoc.20.4');
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=parseDoi.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseDoi.test.js","sourceRoot":"","sources":["../../../../src/components/doi/__tests__/parseDoi.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,IAAI,GAAG;IACX,oBAAoB;IACpB,mBAAmB;IACnB,sCAAsC;IACtC,uCAAuC;IACvC,uCAAuC;IACvC,wCAAwC;IACxC,mCAAmC;IACnC,oCAAoC;CACrC,CAAC;AAEF,IAAI,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE;IAC/B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/forms/radio-button-group/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/forms/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,aAAa,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/forms/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|