Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
search-page
Commits
409c94b4
Commit
409c94b4
authored
Jan 06, 2021
by
baesangjune
Browse files
rm node_modules
parent
df52aea8
Changes
741
Show whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
741 of 741+
files are displayed.
Plain diff
Email patch
node_modules/@popperjs/core/lib/utils/detectOverflow.d.ts
deleted
100644 → 0
View file @
df52aea8
import
{
State
,
SideObject
,
Padding
}
from
"
../types
"
;
import
{
Placement
,
Boundary
,
RootBoundary
,
Context
}
from
"
../enums
"
;
export
declare
type
Options
=
{
placement
:
Placement
;
boundary
:
Boundary
;
rootBoundary
:
RootBoundary
;
elementContext
:
Context
;
altBoundary
:
boolean
;
padding
:
Padding
;
};
export
default
function
detectOverflow
(
state
:
State
,
options
?:
Partial
<
Options
>
):
SideObject
;
node_modules/@popperjs/core/lib/utils/detectOverflow.js
deleted
100644 → 0
View file @
df52aea8
import
getBoundingClientRect
from
"
../dom-utils/getBoundingClientRect.js
"
;
import
getClippingRect
from
"
../dom-utils/getClippingRect.js
"
;
import
getDocumentElement
from
"
../dom-utils/getDocumentElement.js
"
;
import
computeOffsets
from
"
./computeOffsets.js
"
;
import
rectToClientRect
from
"
./rectToClientRect.js
"
;
import
{
clippingParents
,
reference
,
popper
,
bottom
,
top
,
right
,
basePlacements
,
viewport
}
from
"
../enums.js
"
;
import
{
isElement
}
from
"
../dom-utils/instanceOf.js
"
;
import
mergePaddingObject
from
"
./mergePaddingObject.js
"
;
import
expandToHashMap
from
"
./expandToHashMap.js
"
;
// eslint-disable-next-line import/no-unused-modules
export
default
function
detectOverflow
(
state
,
options
)
{
if
(
options
===
void
0
)
{
options
=
{};
}
var
_options
=
options
,
_options$placement
=
_options
.
placement
,
placement
=
_options$placement
===
void
0
?
state
.
placement
:
_options$placement
,
_options$boundary
=
_options
.
boundary
,
boundary
=
_options$boundary
===
void
0
?
clippingParents
:
_options$boundary
,
_options$rootBoundary
=
_options
.
rootBoundary
,
rootBoundary
=
_options$rootBoundary
===
void
0
?
viewport
:
_options$rootBoundary
,
_options$elementConte
=
_options
.
elementContext
,
elementContext
=
_options$elementConte
===
void
0
?
popper
:
_options$elementConte
,
_options$altBoundary
=
_options
.
altBoundary
,
altBoundary
=
_options$altBoundary
===
void
0
?
false
:
_options$altBoundary
,
_options$padding
=
_options
.
padding
,
padding
=
_options$padding
===
void
0
?
0
:
_options$padding
;
var
paddingObject
=
mergePaddingObject
(
typeof
padding
!==
'
number
'
?
padding
:
expandToHashMap
(
padding
,
basePlacements
));
var
altContext
=
elementContext
===
popper
?
reference
:
popper
;
var
referenceElement
=
state
.
elements
.
reference
;
var
popperRect
=
state
.
rects
.
popper
;
var
element
=
state
.
elements
[
altBoundary
?
altContext
:
elementContext
];
var
clippingClientRect
=
getClippingRect
(
isElement
(
element
)
?
element
:
element
.
contextElement
||
getDocumentElement
(
state
.
elements
.
popper
),
boundary
,
rootBoundary
);
var
referenceClientRect
=
getBoundingClientRect
(
referenceElement
);
var
popperOffsets
=
computeOffsets
({
reference
:
referenceClientRect
,
element
:
popperRect
,
strategy
:
'
absolute
'
,
placement
:
placement
});
var
popperClientRect
=
rectToClientRect
(
Object
.
assign
(
Object
.
assign
({},
popperRect
),
popperOffsets
));
var
elementClientRect
=
elementContext
===
popper
?
popperClientRect
:
referenceClientRect
;
// positive = overflowing the clipping rect
// 0 or negative = within the clipping rect
var
overflowOffsets
=
{
top
:
clippingClientRect
.
top
-
elementClientRect
.
top
+
paddingObject
.
top
,
bottom
:
elementClientRect
.
bottom
-
clippingClientRect
.
bottom
+
paddingObject
.
bottom
,
left
:
clippingClientRect
.
left
-
elementClientRect
.
left
+
paddingObject
.
left
,
right
:
elementClientRect
.
right
-
clippingClientRect
.
right
+
paddingObject
.
right
};
var
offsetData
=
state
.
modifiersData
.
offset
;
// Offsets can be applied only to the popper element
if
(
elementContext
===
popper
&&
offsetData
)
{
var
offset
=
offsetData
[
placement
];
Object
.
keys
(
overflowOffsets
).
forEach
(
function
(
key
)
{
var
multiply
=
[
right
,
bottom
].
indexOf
(
key
)
>=
0
?
1
:
-
1
;
var
axis
=
[
top
,
bottom
].
indexOf
(
key
)
>=
0
?
'
y
'
:
'
x
'
;
overflowOffsets
[
key
]
+=
offset
[
axis
]
*
multiply
;
});
}
return
overflowOffsets
;
}
\ No newline at end of file
node_modules/@popperjs/core/lib/utils/detectOverflow.js.flow
deleted
100644 → 0
View file @
df52aea8
// @flow
import type { State, SideObject, Padding } from '../types';
import type { Placement, Boundary, RootBoundary, Context } from '../enums';
import getBoundingClientRect from '../dom-utils/getBoundingClientRect';
import getClippingRect from '../dom-utils/getClippingRect';
import getDocumentElement from '../dom-utils/getDocumentElement';
import computeOffsets from './computeOffsets';
import rectToClientRect from './rectToClientRect';
import {
clippingParents,
reference,
popper,
bottom,
top,
right,
basePlacements,
viewport,
} from '../enums';
import { isElement } from '../dom-utils/instanceOf';
import mergePaddingObject from './mergePaddingObject';
import expandToHashMap from './expandToHashMap';
// eslint-disable-next-line import/no-unused-modules
export type Options = {
placement: Placement,
boundary: Boundary,
rootBoundary: RootBoundary,
elementContext: Context,
altBoundary: boolean,
padding: Padding,
};
export default function detectOverflow(
state: State,
options: $Shape<Options> = {}
): SideObject {
const {
placement = state.placement,
boundary = clippingParents,
rootBoundary = viewport,
elementContext = popper,
altBoundary = false,
padding = 0,
} = options;
const paddingObject = mergePaddingObject(
typeof padding !== 'number'
? padding
: expandToHashMap(padding, basePlacements)
);
const altContext = elementContext === popper ? reference : popper;
const referenceElement = state.elements.reference;
const popperRect = state.rects.popper;
const element = state.elements[altBoundary ? altContext : elementContext];
const clippingClientRect = getClippingRect(
isElement(element)
? element
: element.contextElement || getDocumentElement(state.elements.popper),
boundary,
rootBoundary
);
const referenceClientRect = getBoundingClientRect(referenceElement);
const popperOffsets = computeOffsets({
reference: referenceClientRect,
element: popperRect,
strategy: 'absolute',
placement,
});
const popperClientRect = rectToClientRect({
...popperRect,
...popperOffsets,
});
const elementClientRect =
elementContext === popper ? popperClientRect : referenceClientRect;
// positive = overflowing the clipping rect
// 0 or negative = within the clipping rect
const overflowOffsets = {
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
bottom:
elementClientRect.bottom -
clippingClientRect.bottom +
paddingObject.bottom,
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
right:
elementClientRect.right - clippingClientRect.right + paddingObject.right,
};
const offsetData = state.modifiersData.offset;
// Offsets can be applied only to the popper element
if (elementContext === popper && offsetData) {
const offset = offsetData[placement];
Object.keys(overflowOffsets).forEach((key) => {
const multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
const axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
overflowOffsets[key] += offset[axis] * multiply;
});
}
return overflowOffsets;
}
node_modules/@popperjs/core/lib/utils/expandToHashMap.d.ts
deleted
100644 → 0
View file @
df52aea8
export
default
function
expandToHashMap
<
T
extends
number
|
string
|
boolean
,
K
extends
string
>
(
value
:
T
,
keys
:
Array
<
K
>
):
{
[
key
:
string
]:
T
;
};
node_modules/@popperjs/core/lib/utils/expandToHashMap.js
deleted
100644 → 0
View file @
df52aea8
export
default
function
expandToHashMap
(
value
,
keys
)
{
return
keys
.
reduce
(
function
(
hashMap
,
key
)
{
hashMap
[
key
]
=
value
;
return
hashMap
;
},
{});
}
\ No newline at end of file
node_modules/@popperjs/core/lib/utils/expandToHashMap.js.flow
deleted
100644 → 0
View file @
df52aea8
// @flow
export default function expandToHashMap<
T: number | string | boolean,
K: string
>(value: T, keys: Array<K>): { [key: string]: T } {
return keys.reduce((hashMap, key) => {
hashMap[key] = value;
return hashMap;
}, {});
}
node_modules/@popperjs/core/lib/utils/format.d.ts
deleted
100644 → 0
View file @
df52aea8
export
default
function
format
(
str
:
string
,
...
args
:
Array
<
string
>
):
string
;
node_modules/@popperjs/core/lib/utils/format.js
deleted
100644 → 0
View file @
df52aea8
export
default
function
format
(
str
)
{
for
(
var
_len
=
arguments
.
length
,
args
=
new
Array
(
_len
>
1
?
_len
-
1
:
0
),
_key
=
1
;
_key
<
_len
;
_key
++
)
{
args
[
_key
-
1
]
=
arguments
[
_key
];
}
return
[].
concat
(
args
).
reduce
(
function
(
p
,
c
)
{
return
p
.
replace
(
/%s/
,
c
);
},
str
);
}
\ No newline at end of file
node_modules/@popperjs/core/lib/utils/format.js.flow
deleted
100644 → 0
View file @
df52aea8
// @flow
export default function format(str: string, ...args: Array<string>) {
return [...args].reduce((p, c) => p.replace(/%s/, c), str);
}
node_modules/@popperjs/core/lib/utils/getAltAxis.d.ts
deleted
100644 → 0
View file @
df52aea8
export
default
function
getAltAxis
(
axis
:
"
x
"
|
"
y
"
):
"
x
"
|
"
y
"
;
node_modules/@popperjs/core/lib/utils/getAltAxis.js
deleted
100644 → 0
View file @
df52aea8
export
default
function
getAltAxis
(
axis
)
{
return
axis
===
'
x
'
?
'
y
'
:
'
x
'
;
}
\ No newline at end of file
node_modules/@popperjs/core/lib/utils/getAltAxis.js.flow
deleted
100644 → 0
View file @
df52aea8
// @flow
export default function getAltAxis(axis: 'x' | 'y'): 'x' | 'y' {
return axis === 'x' ? 'y' : 'x';
}
node_modules/@popperjs/core/lib/utils/getAltLen.d.ts
deleted
100644 → 0
View file @
df52aea8
export
default
function
getAltLen
(
len
:
"
width
"
|
"
height
"
):
"
width
"
|
"
height
"
;
node_modules/@popperjs/core/lib/utils/getAltLen.js
deleted
100644 → 0
View file @
df52aea8
export
default
function
getAltLen
(
len
)
{
return
len
===
'
width
'
?
'
height
'
:
'
width
'
;
}
\ No newline at end of file
node_modules/@popperjs/core/lib/utils/getAltLen.js.flow
deleted
100644 → 0
View file @
df52aea8
// @flow
export default function getAltLen(len: 'width' | 'height'): 'width' | 'height' {
return len === 'width' ? 'height' : 'width';
}
node_modules/@popperjs/core/lib/utils/getBasePlacement.d.ts
deleted
100644 → 0
View file @
df52aea8
import
{
BasePlacement
,
Placement
,
auto
}
from
"
../enums
"
;
export
default
function
getBasePlacement
(
placement
:
Placement
|
typeof
auto
):
BasePlacement
;
node_modules/@popperjs/core/lib/utils/getBasePlacement.js
deleted
100644 → 0
View file @
df52aea8
import
{
auto
}
from
"
../enums.js
"
;
export
default
function
getBasePlacement
(
placement
)
{
return
placement
.
split
(
'
-
'
)[
0
];
}
\ No newline at end of file
node_modules/@popperjs/core/lib/utils/getBasePlacement.js.flow
deleted
100644 → 0
View file @
df52aea8
// @flow
import { type BasePlacement, type Placement, auto } from '../enums';
export default function getBasePlacement(
placement: Placement | typeof auto
): BasePlacement {
return (placement.split('-')[0]: any);
}
node_modules/@popperjs/core/lib/utils/getFreshSideObject.d.ts
deleted
100644 → 0
View file @
df52aea8
import
{
SideObject
}
from
"
../types
"
;
export
default
function
getFreshSideObject
():
SideObject
;
node_modules/@popperjs/core/lib/utils/getFreshSideObject.js
deleted
100644 → 0
View file @
df52aea8
export
default
function
getFreshSideObject
()
{
return
{
top
:
0
,
right
:
0
,
bottom
:
0
,
left
:
0
};
}
\ No newline at end of file
Prev
1
…
16
17
18
19
20
21
22
23
24
…
38
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment