@patternfly/pfe-core 2.0.0-rc.1 → 2.0.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/controllers/internals-controller.d.ts +6 -0
- package/controllers/internals-controller.js +18 -0
- package/controllers/internals-controller.js.map +1 -1
- package/controllers/overflow-controller.d.ts +21 -0
- package/controllers/overflow-controller.js +91 -0
- package/controllers/overflow-controller.js.map +1 -0
- package/custom-elements.json +738 -123
- package/functions/isElementInView.d.ts +4 -4
- package/functions/isElementInView.js +4 -4
- package/functions/isElementInView.js.map +1 -1
- package/package.json +3 -3
|
@@ -45,8 +45,14 @@ export declare class InternalsController implements ReactiveController, ARIAMixi
|
|
|
45
45
|
/** True when the control is disabled via it's containing fieldset element */
|
|
46
46
|
get formDisabled(): boolean;
|
|
47
47
|
static protos: WeakMap<object, any>;
|
|
48
|
+
get labels(): NodeList;
|
|
49
|
+
get validity(): ValidityState;
|
|
48
50
|
constructor(host: ReactiveControllerHost & HTMLElement, options?: Partial<ARIAMixin>);
|
|
49
51
|
hostConnected?(): void;
|
|
52
|
+
setFormValue(...args: Parameters<ElementInternals['setFormValue']>): void;
|
|
53
|
+
setValidity(...args: Parameters<ElementInternals['setValidity']>): void;
|
|
54
|
+
checkValidity(...args: Parameters<ElementInternals['checkValidity']>): boolean;
|
|
55
|
+
reportValidity(...args: Parameters<ElementInternals['reportValidity']>): boolean;
|
|
50
56
|
submit(): void;
|
|
51
57
|
reset(): void;
|
|
52
58
|
}
|
|
@@ -8,6 +8,12 @@ export class InternalsController {
|
|
|
8
8
|
get formDisabled() {
|
|
9
9
|
return this.host.matches(':disabled') || __classPrivateFieldGet(this, _InternalsController_formDisabled, "f");
|
|
10
10
|
}
|
|
11
|
+
get labels() {
|
|
12
|
+
return __classPrivateFieldGet(this, _InternalsController_internals, "f").labels;
|
|
13
|
+
}
|
|
14
|
+
get validity() {
|
|
15
|
+
return __classPrivateFieldGet(this, _InternalsController_internals, "f").validity;
|
|
16
|
+
}
|
|
11
17
|
constructor(host, options) {
|
|
12
18
|
this.host = host;
|
|
13
19
|
_InternalsController_internals.set(this, void 0);
|
|
@@ -40,6 +46,18 @@ export class InternalsController {
|
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
}
|
|
49
|
+
setFormValue(...args) {
|
|
50
|
+
return __classPrivateFieldGet(this, _InternalsController_internals, "f").setFormValue(...args);
|
|
51
|
+
}
|
|
52
|
+
setValidity(...args) {
|
|
53
|
+
return __classPrivateFieldGet(this, _InternalsController_internals, "f").setValidity(...args);
|
|
54
|
+
}
|
|
55
|
+
checkValidity(...args) {
|
|
56
|
+
return __classPrivateFieldGet(this, _InternalsController_internals, "f").checkValidity(...args);
|
|
57
|
+
}
|
|
58
|
+
reportValidity(...args) {
|
|
59
|
+
return __classPrivateFieldGet(this, _InternalsController_internals, "f").reportValidity(...args);
|
|
60
|
+
}
|
|
43
61
|
submit() {
|
|
44
62
|
__classPrivateFieldGet(this, _InternalsController_internals, "f").form?.requestSubmit();
|
|
45
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internals-controller.js","sourceRoot":"","sources":["internals-controller.ts"],"names":[],"mappings":";;AAEA,SAAS,eAAe,CAAC,GAAW;IAClC,OAAO,GAAG,KAAK,MAAM,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,OAAO,mBAAmB;IA8C9B,6EAA6E;IAC7E,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,uBAAA,IAAI,yCAAc,CAAC;IAC9D,CAAC;IAID,YACS,IAA0C,EACjD,OAA4B;QADrB,SAAI,GAAJ,IAAI,CAAsC;
|
|
1
|
+
{"version":3,"file":"internals-controller.js","sourceRoot":"","sources":["internals-controller.ts"],"names":[],"mappings":";;AAEA,SAAS,eAAe,CAAC,GAAW;IAClC,OAAO,GAAG,KAAK,MAAM,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,OAAO,mBAAmB;IA8C9B,6EAA6E;IAC7E,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,uBAAA,IAAI,yCAAc,CAAC;IAC9D,CAAC;IAID,IAAI,MAAM;QACR,OAAO,uBAAA,IAAI,sCAAW,CAAC,MAAM,CAAC;IAChC,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,uBAAA,IAAI,sCAAW,CAAC,QAAQ,CAAC;IAClC,CAAC;IAED,YACS,IAA0C,EACjD,OAA4B;QADrB,SAAI,GAAJ,IAAI,CAAsC;QApBnD,iDAA6B;QAE7B,4CAAgB,KAAK,EAAC;QAqBpB,uBAAA,IAAI,kCAAc,IAAI,CAAC,eAAe,EAAE,MAAA,CAAC;QACzC,gCAAgC;QAChC,6EAA6E;QAC7E,MAAM,IAAI,GAAI,IAAyE,CAAC,oBAAoB,CAAC;QAC5G,IAAyE,CAAC,oBAAoB,GAAG,QAAQ,CAAC,EAAE;YAC3G,uBAAA,IAAI,qCAAiB,QAAQ,MAAA,CAAC;YAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC7B,CAAC,CAAC;QACF,8CAA8C;QAC9C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,uBAAA,IAAI,sCAAW,CAAC,CAAC,EAAE;YACrE,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE;gBACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE;oBAC/B,GAAG;wBACD,OAAO,uBAAA,IAAI,sCAAW,CAAC,GAAG,CAAC,CAAC;oBAC9B,CAAC;oBACD,GAAG,CAAC,KAAK;wBACP,uBAAA,IAAI,sCAAW,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;wBAC7B,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;oBAC5B,CAAC;iBACF,CAAC,CAAC;aACJ;SACF;QAED,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE;YACtD,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE;gBACxB,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;aACjB;SACF;IACH,CAAC;IAID,YAAY,CAAC,GAAG,IAAkD;QAChE,OAAO,uBAAA,IAAI,sCAAW,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,WAAW,CAAC,GAAG,IAAiD;QAC9D,OAAO,uBAAA,IAAI,sCAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC;IAED,aAAa,CAAC,GAAG,IAAmD;QAClE,OAAO,uBAAA,IAAI,sCAAW,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,cAAc,CAAC,GAAG,IAAoD;QACpE,OAAO,uBAAA,IAAI,sCAAW,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,MAAM;QACJ,uBAAA,IAAI,sCAAW,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC;IACxC,CAAC;IAED,KAAK;QACH,uBAAA,IAAI,sCAAW,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;IAChC,CAAC;;;AApEM,0BAAM,GAAG,IAAI,OAAO,EAAE,CAAC","sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nfunction isARIAMixinProp(key: string): key is keyof ARIAMixin {\n return key === 'role' || key.startsWith('aria');\n}\n\nexport class InternalsController implements ReactiveController, ARIAMixin {\n declare role: ARIAMixin['role'];\n declare ariaAtomic: ARIAMixin['ariaAtomic'];\n declare ariaAutoComplete: ARIAMixin['ariaAutoComplete'];\n declare ariaBusy: ARIAMixin['ariaBusy'];\n declare ariaChecked: ARIAMixin['ariaChecked'];\n declare ariaColCount: ARIAMixin['ariaColCount'];\n declare ariaColIndex: ARIAMixin['ariaColIndex'];\n declare ariaColIndexText: ARIAMixin['ariaColIndexText'];\n declare ariaColSpan: ARIAMixin['ariaColSpan'];\n declare ariaCurrent: ARIAMixin['ariaCurrent'];\n declare ariaDisabled: ARIAMixin['ariaDisabled'];\n declare ariaExpanded: ARIAMixin['ariaExpanded'];\n declare ariaHasPopup: ARIAMixin['ariaHasPopup'];\n declare ariaHidden: ARIAMixin['ariaHidden'];\n declare ariaInvalid: ARIAMixin['ariaInvalid'];\n declare ariaKeyShortcuts: ARIAMixin['ariaKeyShortcuts'];\n declare ariaLabel: ARIAMixin['ariaLabel'];\n declare ariaLevel: ARIAMixin['ariaLevel'];\n declare ariaLive: ARIAMixin['ariaLive'];\n declare ariaModal: ARIAMixin['ariaModal'];\n declare ariaMultiLine: ARIAMixin['ariaMultiLine'];\n declare ariaMultiSelectable: ARIAMixin['ariaMultiSelectable'];\n declare ariaOrientation: ARIAMixin['ariaOrientation'];\n declare ariaPlaceholder: ARIAMixin['ariaPlaceholder'];\n declare ariaPosInSet: ARIAMixin['ariaPosInSet'];\n declare ariaPressed: ARIAMixin['ariaPressed'];\n declare ariaReadOnly: ARIAMixin['ariaReadOnly'];\n declare ariaRequired: ARIAMixin['ariaRequired'];\n declare ariaRoleDescription: ARIAMixin['ariaRoleDescription'];\n declare ariaRowCount: ARIAMixin['ariaRowCount'];\n declare ariaRowIndex: ARIAMixin['ariaRowIndex'];\n declare ariaRowIndexText: ARIAMixin['ariaRowIndexText'];\n declare ariaRowSpan: ARIAMixin['ariaRowSpan'];\n declare ariaSelected: ARIAMixin['ariaSelected'];\n declare ariaSetSize: ARIAMixin['ariaSetSize'];\n declare ariaSort: ARIAMixin['ariaSort'];\n declare ariaValueMax: ARIAMixin['ariaValueMax'];\n declare ariaValueMin: ARIAMixin['ariaValueMin'];\n declare ariaValueNow: ARIAMixin['ariaValueNow'];\n declare ariaValueText: ARIAMixin['ariaValueText'];\n\n #internals: ElementInternals;\n\n #formDisabled = false;\n\n /** True when the control is disabled via it's containing fieldset element */\n get formDisabled() {\n return this.host.matches(':disabled') || this.#formDisabled;\n }\n\n static protos = new WeakMap();\n\n get labels() {\n return this.#internals.labels;\n }\n\n get validity() {\n return this.#internals.validity;\n }\n\n constructor(\n public host: ReactiveControllerHost & HTMLElement,\n options?: Partial<ARIAMixin>\n ) {\n this.#internals = host.attachInternals();\n // We need to polyfill :disabled\n // see https://github.com/calebdwilliams/element-internals-polyfill/issues/88\n const orig = (host as HTMLElement & { formDisabledCallback?(disabled: boolean): void }).formDisabledCallback;\n (host as HTMLElement & { formDisabledCallback?(disabled: boolean): void }).formDisabledCallback = disabled => {\n this.#formDisabled = disabled;\n orig?.call(host, disabled);\n };\n // proxy the internals object's aria prototype\n for (const key of Object.keys(Object.getPrototypeOf(this.#internals))) {\n if (isARIAMixinProp(key)) {\n Object.defineProperty(this, key, {\n get() {\n return this.#internals[key];\n },\n set(value) {\n this.#internals[key] = value;\n this.host.requestUpdate();\n }\n });\n }\n }\n\n for (const [key, val] of Object.entries(options ?? {})) {\n if (isARIAMixinProp(key)) {\n this[key] = val;\n }\n }\n }\n\n hostConnected?(): void\n\n setFormValue(...args: Parameters<ElementInternals['setFormValue']>) {\n return this.#internals.setFormValue(...args);\n }\n\n setValidity(...args: Parameters<ElementInternals['setValidity']>) {\n return this.#internals.setValidity(...args);\n }\n\n checkValidity(...args: Parameters<ElementInternals['checkValidity']>) {\n return this.#internals.checkValidity(...args);\n }\n\n reportValidity(...args: Parameters<ElementInternals['reportValidity']>) {\n return this.#internals.reportValidity(...args);\n }\n\n submit() {\n this.#internals.form?.requestSubmit();\n }\n\n reset() {\n this.#internals.form?.reset();\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
export interface Options {
|
|
3
|
+
hideOverflowButtons?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare class OverflowController implements ReactiveController {
|
|
6
|
+
#private;
|
|
7
|
+
host: ReactiveControllerHost & Element;
|
|
8
|
+
private options?;
|
|
9
|
+
showScrollButtons: boolean;
|
|
10
|
+
overflowLeft: boolean;
|
|
11
|
+
overflowRight: boolean;
|
|
12
|
+
get firstItem(): HTMLElement | undefined;
|
|
13
|
+
get lastItem(): HTMLElement | undefined;
|
|
14
|
+
constructor(host: ReactiveControllerHost & Element, options?: Options | undefined);
|
|
15
|
+
init(container: HTMLElement, items: HTMLElement[]): void;
|
|
16
|
+
onScroll: () => void;
|
|
17
|
+
scrollLeft(): void;
|
|
18
|
+
scrollRight(): void;
|
|
19
|
+
update(): void;
|
|
20
|
+
hostConnected(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
var _OverflowController_instances, _OverflowController_container, _OverflowController_items, _OverflowController_scrollTimeoutDelay, _OverflowController_scrollTimeout, _OverflowController_hideOverflowButtons, _OverflowController_setOverflowState;
|
|
2
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
+
import { isElementInView } from '@patternfly/pfe-core/functions/isElementInView.js';
|
|
4
|
+
export class OverflowController {
|
|
5
|
+
get firstItem() {
|
|
6
|
+
return __classPrivateFieldGet(this, _OverflowController_items, "f").at(0);
|
|
7
|
+
}
|
|
8
|
+
get lastItem() {
|
|
9
|
+
return __classPrivateFieldGet(this, _OverflowController_items, "f").at(-1);
|
|
10
|
+
}
|
|
11
|
+
constructor(host, options) {
|
|
12
|
+
this.host = host;
|
|
13
|
+
this.options = options;
|
|
14
|
+
_OverflowController_instances.add(this);
|
|
15
|
+
/** Overflow container */
|
|
16
|
+
_OverflowController_container.set(this, void 0);
|
|
17
|
+
/** Children that can overflow */
|
|
18
|
+
_OverflowController_items.set(this, []);
|
|
19
|
+
_OverflowController_scrollTimeoutDelay.set(this, 0);
|
|
20
|
+
_OverflowController_scrollTimeout.set(this, void 0);
|
|
21
|
+
/** Default state */
|
|
22
|
+
_OverflowController_hideOverflowButtons.set(this, false);
|
|
23
|
+
this.showScrollButtons = false;
|
|
24
|
+
this.overflowLeft = false;
|
|
25
|
+
this.overflowRight = false;
|
|
26
|
+
this.onScroll = () => {
|
|
27
|
+
clearTimeout(__classPrivateFieldGet(this, _OverflowController_scrollTimeout, "f"));
|
|
28
|
+
__classPrivateFieldSet(this, _OverflowController_scrollTimeout, setTimeout(() => __classPrivateFieldGet(this, _OverflowController_instances, "m", _OverflowController_setOverflowState).call(this), __classPrivateFieldGet(this, _OverflowController_scrollTimeoutDelay, "f")), "f");
|
|
29
|
+
};
|
|
30
|
+
this.host.addController(this);
|
|
31
|
+
if (options?.hideOverflowButtons) {
|
|
32
|
+
__classPrivateFieldSet(this, _OverflowController_hideOverflowButtons, options?.hideOverflowButtons, "f");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
init(container, items) {
|
|
36
|
+
__classPrivateFieldSet(this, _OverflowController_container, container, "f");
|
|
37
|
+
// convert HTMLCollection to HTMLElement[]
|
|
38
|
+
__classPrivateFieldSet(this, _OverflowController_items, items, "f");
|
|
39
|
+
}
|
|
40
|
+
scrollLeft() {
|
|
41
|
+
if (!__classPrivateFieldGet(this, _OverflowController_container, "f")) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
let firstElementInView;
|
|
45
|
+
let lastElementOutOfView;
|
|
46
|
+
for (let i = 0; i < __classPrivateFieldGet(this, _OverflowController_items, "f").length && !firstElementInView; i++) {
|
|
47
|
+
if (isElementInView(__classPrivateFieldGet(this, _OverflowController_container, "f"), __classPrivateFieldGet(this, _OverflowController_items, "f")[i], false)) {
|
|
48
|
+
firstElementInView = __classPrivateFieldGet(this, _OverflowController_items, "f")[i];
|
|
49
|
+
lastElementOutOfView = __classPrivateFieldGet(this, _OverflowController_items, "f")[i - 1];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (lastElementOutOfView) {
|
|
53
|
+
__classPrivateFieldGet(this, _OverflowController_container, "f").scrollLeft -= lastElementOutOfView.scrollWidth;
|
|
54
|
+
}
|
|
55
|
+
__classPrivateFieldGet(this, _OverflowController_instances, "m", _OverflowController_setOverflowState).call(this);
|
|
56
|
+
}
|
|
57
|
+
scrollRight() {
|
|
58
|
+
if (!__classPrivateFieldGet(this, _OverflowController_container, "f")) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
let lastElementInView;
|
|
62
|
+
let firstElementOutOfView;
|
|
63
|
+
for (let i = __classPrivateFieldGet(this, _OverflowController_items, "f").length - 1; i >= 0 && !lastElementInView; i--) {
|
|
64
|
+
if (isElementInView(__classPrivateFieldGet(this, _OverflowController_container, "f"), __classPrivateFieldGet(this, _OverflowController_items, "f")[i], false)) {
|
|
65
|
+
lastElementInView = __classPrivateFieldGet(this, _OverflowController_items, "f")[i];
|
|
66
|
+
firstElementOutOfView = __classPrivateFieldGet(this, _OverflowController_items, "f")[i + 1];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (firstElementOutOfView) {
|
|
70
|
+
__classPrivateFieldGet(this, _OverflowController_container, "f").scrollLeft += firstElementOutOfView.scrollWidth;
|
|
71
|
+
}
|
|
72
|
+
__classPrivateFieldGet(this, _OverflowController_instances, "m", _OverflowController_setOverflowState).call(this);
|
|
73
|
+
}
|
|
74
|
+
update() {
|
|
75
|
+
__classPrivateFieldGet(this, _OverflowController_instances, "m", _OverflowController_setOverflowState).call(this);
|
|
76
|
+
}
|
|
77
|
+
hostConnected() {
|
|
78
|
+
this.onScroll();
|
|
79
|
+
__classPrivateFieldGet(this, _OverflowController_instances, "m", _OverflowController_setOverflowState).call(this);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
_OverflowController_container = new WeakMap(), _OverflowController_items = new WeakMap(), _OverflowController_scrollTimeoutDelay = new WeakMap(), _OverflowController_scrollTimeout = new WeakMap(), _OverflowController_hideOverflowButtons = new WeakMap(), _OverflowController_instances = new WeakSet(), _OverflowController_setOverflowState = function _OverflowController_setOverflowState() {
|
|
83
|
+
if (!this.firstItem || !this.lastItem || !__classPrivateFieldGet(this, _OverflowController_container, "f")) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.overflowLeft = !__classPrivateFieldGet(this, _OverflowController_hideOverflowButtons, "f") && !isElementInView(__classPrivateFieldGet(this, _OverflowController_container, "f"), this.firstItem);
|
|
87
|
+
this.overflowRight = !__classPrivateFieldGet(this, _OverflowController_hideOverflowButtons, "f") && !isElementInView(__classPrivateFieldGet(this, _OverflowController_container, "f"), this.lastItem);
|
|
88
|
+
this.showScrollButtons = !__classPrivateFieldGet(this, _OverflowController_hideOverflowButtons, "f") && (this.overflowLeft || this.overflowRight);
|
|
89
|
+
this.host.requestUpdate();
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=overflow-controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-controller.js","sourceRoot":"","sources":["overflow-controller.ts"],"names":[],"mappings":"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","sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport { isElementInView } from '@patternfly/pfe-core/functions/isElementInView.js';\n\nexport interface Options {\n hideOverflowButtons?: boolean;\n}\n\nexport class OverflowController implements ReactiveController {\n /** Overflow container */\n #container?: HTMLElement;\n /** Children that can overflow */\n #items: HTMLElement[] = [];\n\n #scrollTimeoutDelay = 0;\n #scrollTimeout?: ReturnType<typeof setTimeout>;\n\n /** Default state */\n #hideOverflowButtons = false;\n showScrollButtons = false;\n overflowLeft = false;\n overflowRight = false;\n\n get firstItem(): HTMLElement | undefined {\n return this.#items.at(0);\n }\n\n get lastItem(): HTMLElement | undefined {\n return this.#items.at(-1);\n }\n\n constructor(public host: ReactiveControllerHost & Element, private options?: Options) {\n this.host.addController(this);\n if (options?.hideOverflowButtons) {\n this.#hideOverflowButtons = options?.hideOverflowButtons;\n }\n }\n\n #setOverflowState(): void {\n if (!this.firstItem || !this.lastItem || !this.#container) {\n return;\n }\n this.overflowLeft = !this.#hideOverflowButtons && !isElementInView(this.#container, this.firstItem);\n this.overflowRight = !this.#hideOverflowButtons && !isElementInView(this.#container, this.lastItem);\n this.showScrollButtons = !this.#hideOverflowButtons && (this.overflowLeft || this.overflowRight);\n this.host.requestUpdate();\n }\n\n init(container: HTMLElement, items: HTMLElement[]) {\n this.#container = container;\n // convert HTMLCollection to HTMLElement[]\n this.#items = items;\n }\n\n onScroll = () => {\n clearTimeout(this.#scrollTimeout);\n this.#scrollTimeout = setTimeout(() => this.#setOverflowState(), this.#scrollTimeoutDelay);\n };\n\n scrollLeft() {\n if (!this.#container) {\n return;\n }\n let firstElementInView: HTMLElement | undefined;\n let lastElementOutOfView: HTMLElement | undefined;\n for (let i = 0; i < this.#items.length && !firstElementInView; i++) {\n if (isElementInView(this.#container, this.#items[i] as HTMLElement, false)) {\n firstElementInView = this.#items[i];\n lastElementOutOfView = this.#items[i - 1];\n }\n }\n if (lastElementOutOfView) {\n this.#container.scrollLeft -= lastElementOutOfView.scrollWidth;\n }\n this.#setOverflowState();\n }\n\n scrollRight() {\n if (!this.#container) {\n return;\n }\n let lastElementInView: HTMLElement | undefined;\n let firstElementOutOfView: HTMLElement | undefined;\n for (let i = this.#items.length - 1; i >= 0 && !lastElementInView; i--) {\n if (isElementInView(this.#container, this.#items[i] as HTMLElement, false)) {\n lastElementInView = this.#items[i];\n firstElementOutOfView = this.#items[i + 1];\n }\n }\n if (firstElementOutOfView) {\n this.#container.scrollLeft += firstElementOutOfView.scrollWidth;\n }\n this.#setOverflowState();\n }\n\n update() {\n this.#setOverflowState();\n }\n\n hostConnected(): void {\n this.onScroll();\n this.#setOverflowState();\n }\n}\n"]}
|
package/custom-elements.json
CHANGED
|
@@ -1839,6 +1839,20 @@
|
|
|
1839
1839
|
},
|
|
1840
1840
|
"static": true
|
|
1841
1841
|
},
|
|
1842
|
+
{
|
|
1843
|
+
"kind": "field",
|
|
1844
|
+
"name": "labels",
|
|
1845
|
+
"type": {
|
|
1846
|
+
"text": "NodeList"
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
"kind": "field",
|
|
1851
|
+
"name": "validity",
|
|
1852
|
+
"type": {
|
|
1853
|
+
"text": "ValidityState"
|
|
1854
|
+
}
|
|
1855
|
+
},
|
|
1842
1856
|
{
|
|
1843
1857
|
"kind": "method",
|
|
1844
1858
|
"name": "hostConnected",
|
|
@@ -1848,6 +1862,74 @@
|
|
|
1848
1862
|
}
|
|
1849
1863
|
}
|
|
1850
1864
|
},
|
|
1865
|
+
{
|
|
1866
|
+
"kind": "method",
|
|
1867
|
+
"name": "setFormValue",
|
|
1868
|
+
"return": {
|
|
1869
|
+
"type": {
|
|
1870
|
+
"text": "void"
|
|
1871
|
+
}
|
|
1872
|
+
},
|
|
1873
|
+
"parameters": [
|
|
1874
|
+
{
|
|
1875
|
+
"name": "args",
|
|
1876
|
+
"type": {
|
|
1877
|
+
"text": "Parameters<ElementInternals['setFormValue']>"
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
]
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
"kind": "method",
|
|
1884
|
+
"name": "setValidity",
|
|
1885
|
+
"return": {
|
|
1886
|
+
"type": {
|
|
1887
|
+
"text": "void"
|
|
1888
|
+
}
|
|
1889
|
+
},
|
|
1890
|
+
"parameters": [
|
|
1891
|
+
{
|
|
1892
|
+
"name": "args",
|
|
1893
|
+
"type": {
|
|
1894
|
+
"text": "Parameters<ElementInternals['setValidity']>"
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
]
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
"kind": "method",
|
|
1901
|
+
"name": "checkValidity",
|
|
1902
|
+
"return": {
|
|
1903
|
+
"type": {
|
|
1904
|
+
"text": "boolean"
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
"parameters": [
|
|
1908
|
+
{
|
|
1909
|
+
"name": "args",
|
|
1910
|
+
"type": {
|
|
1911
|
+
"text": "Parameters<ElementInternals['checkValidity']>"
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
]
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
"kind": "method",
|
|
1918
|
+
"name": "reportValidity",
|
|
1919
|
+
"return": {
|
|
1920
|
+
"type": {
|
|
1921
|
+
"text": "boolean"
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
"parameters": [
|
|
1925
|
+
{
|
|
1926
|
+
"name": "args",
|
|
1927
|
+
"type": {
|
|
1928
|
+
"text": "Parameters<ElementInternals['reportValidity']>"
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
]
|
|
1932
|
+
},
|
|
1851
1933
|
{
|
|
1852
1934
|
"kind": "method",
|
|
1853
1935
|
"name": "submit",
|
|
@@ -1894,6 +1976,50 @@
|
|
|
1894
1976
|
"name": "formDisabled",
|
|
1895
1977
|
"description": "True when the control is disabled via it's containing fieldset element"
|
|
1896
1978
|
},
|
|
1979
|
+
{
|
|
1980
|
+
"kind": "field",
|
|
1981
|
+
"name": "labels"
|
|
1982
|
+
},
|
|
1983
|
+
{
|
|
1984
|
+
"kind": "field",
|
|
1985
|
+
"name": "validity"
|
|
1986
|
+
},
|
|
1987
|
+
{
|
|
1988
|
+
"kind": "method",
|
|
1989
|
+
"name": "setFormValue",
|
|
1990
|
+
"parameters": [
|
|
1991
|
+
{
|
|
1992
|
+
"name": "args"
|
|
1993
|
+
}
|
|
1994
|
+
]
|
|
1995
|
+
},
|
|
1996
|
+
{
|
|
1997
|
+
"kind": "method",
|
|
1998
|
+
"name": "setValidity",
|
|
1999
|
+
"parameters": [
|
|
2000
|
+
{
|
|
2001
|
+
"name": "args"
|
|
2002
|
+
}
|
|
2003
|
+
]
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"kind": "method",
|
|
2007
|
+
"name": "checkValidity",
|
|
2008
|
+
"parameters": [
|
|
2009
|
+
{
|
|
2010
|
+
"name": "args"
|
|
2011
|
+
}
|
|
2012
|
+
]
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
"kind": "method",
|
|
2016
|
+
"name": "reportValidity",
|
|
2017
|
+
"parameters": [
|
|
2018
|
+
{
|
|
2019
|
+
"name": "args"
|
|
2020
|
+
}
|
|
2021
|
+
]
|
|
2022
|
+
},
|
|
1897
2023
|
{
|
|
1898
2024
|
"kind": "method",
|
|
1899
2025
|
"name": "submit"
|
|
@@ -2242,6 +2368,14 @@
|
|
|
2242
2368
|
"static": true,
|
|
2243
2369
|
"default": "new WeakMap()"
|
|
2244
2370
|
},
|
|
2371
|
+
{
|
|
2372
|
+
"kind": "field",
|
|
2373
|
+
"name": "labels"
|
|
2374
|
+
},
|
|
2375
|
+
{
|
|
2376
|
+
"kind": "field",
|
|
2377
|
+
"name": "validity"
|
|
2378
|
+
},
|
|
2245
2379
|
{
|
|
2246
2380
|
"kind": "method",
|
|
2247
2381
|
"name": "hostConnected",
|
|
@@ -2251,6 +2385,54 @@
|
|
|
2251
2385
|
}
|
|
2252
2386
|
}
|
|
2253
2387
|
},
|
|
2388
|
+
{
|
|
2389
|
+
"kind": "method",
|
|
2390
|
+
"name": "setFormValue",
|
|
2391
|
+
"parameters": [
|
|
2392
|
+
{
|
|
2393
|
+
"name": "args",
|
|
2394
|
+
"type": {
|
|
2395
|
+
"text": "Parameters<ElementInternals['setFormValue']>"
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
]
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
"kind": "method",
|
|
2402
|
+
"name": "setValidity",
|
|
2403
|
+
"parameters": [
|
|
2404
|
+
{
|
|
2405
|
+
"name": "args",
|
|
2406
|
+
"type": {
|
|
2407
|
+
"text": "Parameters<ElementInternals['setValidity']>"
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
]
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
"kind": "method",
|
|
2414
|
+
"name": "checkValidity",
|
|
2415
|
+
"parameters": [
|
|
2416
|
+
{
|
|
2417
|
+
"name": "args",
|
|
2418
|
+
"type": {
|
|
2419
|
+
"text": "Parameters<ElementInternals['checkValidity']>"
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
]
|
|
2423
|
+
},
|
|
2424
|
+
{
|
|
2425
|
+
"kind": "method",
|
|
2426
|
+
"name": "reportValidity",
|
|
2427
|
+
"parameters": [
|
|
2428
|
+
{
|
|
2429
|
+
"name": "args",
|
|
2430
|
+
"type": {
|
|
2431
|
+
"text": "Parameters<ElementInternals['reportValidity']>"
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
]
|
|
2435
|
+
},
|
|
2254
2436
|
{
|
|
2255
2437
|
"kind": "method",
|
|
2256
2438
|
"name": "submit"
|
|
@@ -2756,44 +2938,403 @@
|
|
|
2756
2938
|
},
|
|
2757
2939
|
{
|
|
2758
2940
|
"kind": "method",
|
|
2759
|
-
"name": "error",
|
|
2760
|
-
"static": true,
|
|
2941
|
+
"name": "error",
|
|
2942
|
+
"static": true,
|
|
2943
|
+
"parameters": [
|
|
2944
|
+
{
|
|
2945
|
+
"name": "msgs"
|
|
2946
|
+
}
|
|
2947
|
+
],
|
|
2948
|
+
"description": "A console error wrapper which formats your output with useful debugging information.\nFor use inside a component's function."
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
"kind": "method",
|
|
2952
|
+
"name": "log",
|
|
2953
|
+
"parameters": [
|
|
2954
|
+
{
|
|
2955
|
+
"name": "msgs"
|
|
2956
|
+
}
|
|
2957
|
+
],
|
|
2958
|
+
"description": "Local logging that outputs the tag name as a prefix automatically"
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
"kind": "method",
|
|
2962
|
+
"name": "warn",
|
|
2963
|
+
"parameters": [
|
|
2964
|
+
{
|
|
2965
|
+
"name": "msgs"
|
|
2966
|
+
}
|
|
2967
|
+
],
|
|
2968
|
+
"description": "Local warning wrapper that outputs the tag name as a prefix automatically.\nFor use inside a component's function."
|
|
2969
|
+
},
|
|
2970
|
+
{
|
|
2971
|
+
"kind": "method",
|
|
2972
|
+
"name": "error",
|
|
2973
|
+
"parameters": [
|
|
2974
|
+
{
|
|
2975
|
+
"name": "msgs"
|
|
2976
|
+
}
|
|
2977
|
+
],
|
|
2978
|
+
"description": "Local error wrapper that outputs the tag name as a prefix automatically.\nFor use inside a component's function."
|
|
2979
|
+
},
|
|
2980
|
+
{
|
|
2981
|
+
"kind": "method",
|
|
2982
|
+
"name": "hostConnected"
|
|
2983
|
+
},
|
|
2984
|
+
{
|
|
2985
|
+
"kind": "field",
|
|
2986
|
+
"name": "host",
|
|
2987
|
+
"default": "host"
|
|
2988
|
+
}
|
|
2989
|
+
]
|
|
2990
|
+
}
|
|
2991
|
+
],
|
|
2992
|
+
"exports": [
|
|
2993
|
+
{
|
|
2994
|
+
"kind": "js",
|
|
2995
|
+
"name": "Logger",
|
|
2996
|
+
"declaration": {
|
|
2997
|
+
"name": "Logger",
|
|
2998
|
+
"module": "controllers/logger.js"
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
]
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
"kind": "javascript-module",
|
|
3005
|
+
"path": "controllers/logger.ts",
|
|
3006
|
+
"declarations": [
|
|
3007
|
+
{
|
|
3008
|
+
"kind": "class",
|
|
3009
|
+
"description": "",
|
|
3010
|
+
"name": "Logger",
|
|
3011
|
+
"members": [
|
|
3012
|
+
{
|
|
3013
|
+
"kind": "field",
|
|
3014
|
+
"name": "logDebug",
|
|
3015
|
+
"type": {
|
|
3016
|
+
"text": "boolean"
|
|
3017
|
+
},
|
|
3018
|
+
"privacy": "private",
|
|
3019
|
+
"static": true
|
|
3020
|
+
},
|
|
3021
|
+
{
|
|
3022
|
+
"kind": "field",
|
|
3023
|
+
"name": "instances",
|
|
3024
|
+
"type": {
|
|
3025
|
+
"text": "WeakMap<HTMLElement, Logger>"
|
|
3026
|
+
},
|
|
3027
|
+
"privacy": "private",
|
|
3028
|
+
"static": true,
|
|
3029
|
+
"default": "new WeakMap()"
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
"kind": "field",
|
|
3033
|
+
"name": "prefix",
|
|
3034
|
+
"privacy": "private"
|
|
3035
|
+
},
|
|
3036
|
+
{
|
|
3037
|
+
"kind": "method",
|
|
3038
|
+
"name": "debugLog",
|
|
3039
|
+
"static": true,
|
|
3040
|
+
"parameters": [
|
|
3041
|
+
{
|
|
3042
|
+
"name": "preference",
|
|
3043
|
+
"default": "null"
|
|
3044
|
+
}
|
|
3045
|
+
],
|
|
3046
|
+
"description": "A boolean value that indicates if the logging should be printed to the console; used for debugging.\nFor use in a JS file or script tag; can also be added in the constructor of a component during development."
|
|
3047
|
+
},
|
|
3048
|
+
{
|
|
3049
|
+
"kind": "method",
|
|
3050
|
+
"name": "log",
|
|
3051
|
+
"static": true,
|
|
3052
|
+
"parameters": [
|
|
3053
|
+
{
|
|
3054
|
+
"name": "msgs",
|
|
3055
|
+
"type": {
|
|
3056
|
+
"text": "unknown[]"
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
],
|
|
3060
|
+
"description": "A logging wrapper which checks the debugLog boolean and prints to the console if true."
|
|
3061
|
+
},
|
|
3062
|
+
{
|
|
3063
|
+
"kind": "method",
|
|
3064
|
+
"name": "warn",
|
|
3065
|
+
"static": true,
|
|
3066
|
+
"parameters": [
|
|
3067
|
+
{
|
|
3068
|
+
"name": "msgs",
|
|
3069
|
+
"type": {
|
|
3070
|
+
"text": "unknown[]"
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
],
|
|
3074
|
+
"description": "A console warning wrapper which formats your output with useful debugging information."
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
"kind": "method",
|
|
3078
|
+
"name": "error",
|
|
3079
|
+
"static": true,
|
|
3080
|
+
"parameters": [
|
|
3081
|
+
{
|
|
3082
|
+
"name": "msgs",
|
|
3083
|
+
"type": {
|
|
3084
|
+
"text": "unknown[]"
|
|
3085
|
+
}
|
|
3086
|
+
}
|
|
3087
|
+
],
|
|
3088
|
+
"description": "A console error wrapper which formats your output with useful debugging information.\nFor use inside a component's function."
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
"kind": "method",
|
|
3092
|
+
"name": "log",
|
|
3093
|
+
"parameters": [
|
|
3094
|
+
{
|
|
3095
|
+
"name": "msgs",
|
|
3096
|
+
"type": {
|
|
3097
|
+
"text": "unknown[]"
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
3100
|
+
],
|
|
3101
|
+
"description": "Local logging that outputs the tag name as a prefix automatically"
|
|
3102
|
+
},
|
|
3103
|
+
{
|
|
3104
|
+
"kind": "method",
|
|
3105
|
+
"name": "warn",
|
|
3106
|
+
"parameters": [
|
|
3107
|
+
{
|
|
3108
|
+
"name": "msgs",
|
|
3109
|
+
"type": {
|
|
3110
|
+
"text": "unknown[]"
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
],
|
|
3114
|
+
"description": "Local warning wrapper that outputs the tag name as a prefix automatically.\nFor use inside a component's function."
|
|
3115
|
+
},
|
|
3116
|
+
{
|
|
3117
|
+
"kind": "method",
|
|
3118
|
+
"name": "error",
|
|
3119
|
+
"parameters": [
|
|
3120
|
+
{
|
|
3121
|
+
"name": "msgs",
|
|
3122
|
+
"type": {
|
|
3123
|
+
"text": "unknown[]"
|
|
3124
|
+
}
|
|
3125
|
+
}
|
|
3126
|
+
],
|
|
3127
|
+
"description": "Local error wrapper that outputs the tag name as a prefix automatically.\nFor use inside a component's function."
|
|
3128
|
+
},
|
|
3129
|
+
{
|
|
3130
|
+
"kind": "method",
|
|
3131
|
+
"name": "hostConnected"
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
"kind": "field",
|
|
3135
|
+
"type": {
|
|
3136
|
+
"text": "ReactiveElement",
|
|
3137
|
+
"name": "ReactiveElement",
|
|
3138
|
+
"package": "lit"
|
|
3139
|
+
},
|
|
3140
|
+
"name": "host",
|
|
3141
|
+
"privacy": "private"
|
|
3142
|
+
}
|
|
3143
|
+
]
|
|
3144
|
+
}
|
|
3145
|
+
],
|
|
3146
|
+
"exports": [
|
|
3147
|
+
{
|
|
3148
|
+
"kind": "js",
|
|
3149
|
+
"name": "Logger",
|
|
3150
|
+
"declaration": {
|
|
3151
|
+
"name": "Logger",
|
|
3152
|
+
"module": "controllers/logger.ts"
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
]
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
"kind": "javascript-module",
|
|
3159
|
+
"path": "controllers/overflow-controller.d.ts",
|
|
3160
|
+
"declarations": [
|
|
3161
|
+
{
|
|
3162
|
+
"kind": "class",
|
|
3163
|
+
"description": "",
|
|
3164
|
+
"name": "OverflowController",
|
|
3165
|
+
"members": [
|
|
3166
|
+
{
|
|
3167
|
+
"kind": "field",
|
|
3168
|
+
"name": "#private",
|
|
3169
|
+
"privacy": "private"
|
|
3170
|
+
},
|
|
3171
|
+
{
|
|
3172
|
+
"kind": "field",
|
|
3173
|
+
"name": "host",
|
|
3174
|
+
"type": {
|
|
3175
|
+
"text": "ReactiveControllerHost & Element"
|
|
3176
|
+
}
|
|
3177
|
+
},
|
|
3178
|
+
{
|
|
3179
|
+
"kind": "field",
|
|
3180
|
+
"name": "options",
|
|
3181
|
+
"privacy": "private"
|
|
3182
|
+
},
|
|
3183
|
+
{
|
|
3184
|
+
"kind": "field",
|
|
3185
|
+
"name": "showScrollButtons",
|
|
3186
|
+
"type": {
|
|
3187
|
+
"text": "boolean"
|
|
3188
|
+
}
|
|
3189
|
+
},
|
|
3190
|
+
{
|
|
3191
|
+
"kind": "field",
|
|
3192
|
+
"name": "overflowLeft",
|
|
3193
|
+
"type": {
|
|
3194
|
+
"text": "boolean"
|
|
3195
|
+
}
|
|
3196
|
+
},
|
|
3197
|
+
{
|
|
3198
|
+
"kind": "field",
|
|
3199
|
+
"name": "overflowRight",
|
|
3200
|
+
"type": {
|
|
3201
|
+
"text": "boolean"
|
|
3202
|
+
}
|
|
3203
|
+
},
|
|
3204
|
+
{
|
|
3205
|
+
"kind": "field",
|
|
3206
|
+
"name": "firstItem",
|
|
3207
|
+
"type": {
|
|
3208
|
+
"text": "HTMLElement | undefined"
|
|
3209
|
+
}
|
|
3210
|
+
},
|
|
3211
|
+
{
|
|
3212
|
+
"kind": "field",
|
|
3213
|
+
"name": "lastItem",
|
|
3214
|
+
"type": {
|
|
3215
|
+
"text": "HTMLElement | undefined"
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
{
|
|
3219
|
+
"kind": "method",
|
|
3220
|
+
"name": "init",
|
|
3221
|
+
"return": {
|
|
3222
|
+
"type": {
|
|
3223
|
+
"text": "void"
|
|
3224
|
+
}
|
|
3225
|
+
},
|
|
3226
|
+
"parameters": [
|
|
3227
|
+
{
|
|
3228
|
+
"name": "container",
|
|
3229
|
+
"type": {
|
|
3230
|
+
"text": "HTMLElement"
|
|
3231
|
+
}
|
|
3232
|
+
},
|
|
3233
|
+
{
|
|
3234
|
+
"name": "items",
|
|
3235
|
+
"type": {
|
|
3236
|
+
"text": "HTMLElement[]"
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
]
|
|
3240
|
+
},
|
|
3241
|
+
{
|
|
3242
|
+
"kind": "field",
|
|
3243
|
+
"name": "onScroll",
|
|
3244
|
+
"type": {
|
|
3245
|
+
"text": "() => void"
|
|
3246
|
+
}
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
"kind": "method",
|
|
3250
|
+
"name": "scrollLeft",
|
|
3251
|
+
"return": {
|
|
3252
|
+
"type": {
|
|
3253
|
+
"text": "void"
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
},
|
|
3257
|
+
{
|
|
3258
|
+
"kind": "method",
|
|
3259
|
+
"name": "scrollRight",
|
|
3260
|
+
"return": {
|
|
3261
|
+
"type": {
|
|
3262
|
+
"text": "void"
|
|
3263
|
+
}
|
|
3264
|
+
}
|
|
3265
|
+
},
|
|
3266
|
+
{
|
|
3267
|
+
"kind": "method",
|
|
3268
|
+
"name": "update",
|
|
3269
|
+
"return": {
|
|
3270
|
+
"type": {
|
|
3271
|
+
"text": "void"
|
|
3272
|
+
}
|
|
3273
|
+
}
|
|
3274
|
+
},
|
|
3275
|
+
{
|
|
3276
|
+
"kind": "method",
|
|
3277
|
+
"name": "hostConnected",
|
|
3278
|
+
"return": {
|
|
3279
|
+
"type": {
|
|
3280
|
+
"text": "void"
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
]
|
|
3285
|
+
}
|
|
3286
|
+
],
|
|
3287
|
+
"exports": [
|
|
3288
|
+
{
|
|
3289
|
+
"kind": "js",
|
|
3290
|
+
"name": "OverflowController",
|
|
3291
|
+
"declaration": {
|
|
3292
|
+
"name": "OverflowController",
|
|
3293
|
+
"module": "controllers/overflow-controller.d.ts"
|
|
3294
|
+
}
|
|
3295
|
+
}
|
|
3296
|
+
]
|
|
3297
|
+
},
|
|
3298
|
+
{
|
|
3299
|
+
"kind": "javascript-module",
|
|
3300
|
+
"path": "controllers/overflow-controller.js",
|
|
3301
|
+
"declarations": [
|
|
3302
|
+
{
|
|
3303
|
+
"kind": "class",
|
|
3304
|
+
"description": "",
|
|
3305
|
+
"name": "OverflowController",
|
|
3306
|
+
"members": [
|
|
3307
|
+
{
|
|
3308
|
+
"kind": "field",
|
|
3309
|
+
"name": "firstItem"
|
|
3310
|
+
},
|
|
3311
|
+
{
|
|
3312
|
+
"kind": "field",
|
|
3313
|
+
"name": "lastItem"
|
|
3314
|
+
},
|
|
3315
|
+
{
|
|
3316
|
+
"kind": "method",
|
|
3317
|
+
"name": "init",
|
|
2761
3318
|
"parameters": [
|
|
2762
3319
|
{
|
|
2763
|
-
"name": "
|
|
3320
|
+
"name": "container"
|
|
3321
|
+
},
|
|
3322
|
+
{
|
|
3323
|
+
"name": "items"
|
|
2764
3324
|
}
|
|
2765
|
-
]
|
|
2766
|
-
"description": "A console error wrapper which formats your output with useful debugging information.\nFor use inside a component's function."
|
|
3325
|
+
]
|
|
2767
3326
|
},
|
|
2768
3327
|
{
|
|
2769
3328
|
"kind": "method",
|
|
2770
|
-
"name": "
|
|
2771
|
-
"parameters": [
|
|
2772
|
-
{
|
|
2773
|
-
"name": "msgs"
|
|
2774
|
-
}
|
|
2775
|
-
],
|
|
2776
|
-
"description": "Local logging that outputs the tag name as a prefix automatically"
|
|
3329
|
+
"name": "scrollLeft"
|
|
2777
3330
|
},
|
|
2778
3331
|
{
|
|
2779
3332
|
"kind": "method",
|
|
2780
|
-
"name": "
|
|
2781
|
-
"parameters": [
|
|
2782
|
-
{
|
|
2783
|
-
"name": "msgs"
|
|
2784
|
-
}
|
|
2785
|
-
],
|
|
2786
|
-
"description": "Local warning wrapper that outputs the tag name as a prefix automatically.\nFor use inside a component's function."
|
|
3333
|
+
"name": "scrollRight"
|
|
2787
3334
|
},
|
|
2788
3335
|
{
|
|
2789
3336
|
"kind": "method",
|
|
2790
|
-
"name": "
|
|
2791
|
-
"parameters": [
|
|
2792
|
-
{
|
|
2793
|
-
"name": "msgs"
|
|
2794
|
-
}
|
|
2795
|
-
],
|
|
2796
|
-
"description": "Local error wrapper that outputs the tag name as a prefix automatically.\nFor use inside a component's function."
|
|
3337
|
+
"name": "update"
|
|
2797
3338
|
},
|
|
2798
3339
|
{
|
|
2799
3340
|
"kind": "method",
|
|
@@ -2803,6 +3344,39 @@
|
|
|
2803
3344
|
"kind": "field",
|
|
2804
3345
|
"name": "host",
|
|
2805
3346
|
"default": "host"
|
|
3347
|
+
},
|
|
3348
|
+
{
|
|
3349
|
+
"kind": "field",
|
|
3350
|
+
"name": "options",
|
|
3351
|
+
"default": "options"
|
|
3352
|
+
},
|
|
3353
|
+
{
|
|
3354
|
+
"kind": "field",
|
|
3355
|
+
"name": "showScrollButtons",
|
|
3356
|
+
"type": {
|
|
3357
|
+
"text": "boolean"
|
|
3358
|
+
},
|
|
3359
|
+
"default": "false"
|
|
3360
|
+
},
|
|
3361
|
+
{
|
|
3362
|
+
"kind": "field",
|
|
3363
|
+
"name": "overflowLeft",
|
|
3364
|
+
"type": {
|
|
3365
|
+
"text": "boolean"
|
|
3366
|
+
},
|
|
3367
|
+
"default": "false"
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
"kind": "field",
|
|
3371
|
+
"name": "overflowRight",
|
|
3372
|
+
"type": {
|
|
3373
|
+
"text": "boolean"
|
|
3374
|
+
},
|
|
3375
|
+
"default": "false"
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
"kind": "field",
|
|
3379
|
+
"name": "onScroll"
|
|
2806
3380
|
}
|
|
2807
3381
|
]
|
|
2808
3382
|
}
|
|
@@ -2810,152 +3384,175 @@
|
|
|
2810
3384
|
"exports": [
|
|
2811
3385
|
{
|
|
2812
3386
|
"kind": "js",
|
|
2813
|
-
"name": "
|
|
3387
|
+
"name": "OverflowController",
|
|
2814
3388
|
"declaration": {
|
|
2815
|
-
"name": "
|
|
2816
|
-
"module": "controllers/
|
|
3389
|
+
"name": "OverflowController",
|
|
3390
|
+
"module": "controllers/overflow-controller.js"
|
|
2817
3391
|
}
|
|
2818
3392
|
}
|
|
2819
3393
|
]
|
|
2820
3394
|
},
|
|
2821
3395
|
{
|
|
2822
3396
|
"kind": "javascript-module",
|
|
2823
|
-
"path": "controllers/
|
|
3397
|
+
"path": "controllers/overflow-controller.ts",
|
|
2824
3398
|
"declarations": [
|
|
2825
3399
|
{
|
|
2826
3400
|
"kind": "class",
|
|
2827
3401
|
"description": "",
|
|
2828
|
-
"name": "
|
|
3402
|
+
"name": "OverflowController",
|
|
2829
3403
|
"members": [
|
|
2830
3404
|
{
|
|
2831
3405
|
"kind": "field",
|
|
2832
|
-
"name": "
|
|
3406
|
+
"name": "#container",
|
|
3407
|
+
"privacy": "private",
|
|
2833
3408
|
"type": {
|
|
2834
|
-
"text": "
|
|
3409
|
+
"text": "HTMLElement | undefined"
|
|
2835
3410
|
},
|
|
3411
|
+
"description": "Overflow container"
|
|
3412
|
+
},
|
|
3413
|
+
{
|
|
3414
|
+
"kind": "field",
|
|
3415
|
+
"name": "#items",
|
|
2836
3416
|
"privacy": "private",
|
|
2837
|
-
"
|
|
3417
|
+
"type": {
|
|
3418
|
+
"text": "HTMLElement[]"
|
|
3419
|
+
},
|
|
3420
|
+
"default": "[]",
|
|
3421
|
+
"description": "Children that can overflow"
|
|
2838
3422
|
},
|
|
2839
3423
|
{
|
|
2840
3424
|
"kind": "field",
|
|
2841
|
-
"name": "
|
|
3425
|
+
"name": "#scrollTimeoutDelay",
|
|
3426
|
+
"privacy": "private",
|
|
2842
3427
|
"type": {
|
|
2843
|
-
"text": "
|
|
3428
|
+
"text": "number"
|
|
2844
3429
|
},
|
|
3430
|
+
"default": "0"
|
|
3431
|
+
},
|
|
3432
|
+
{
|
|
3433
|
+
"kind": "field",
|
|
3434
|
+
"name": "#scrollTimeout",
|
|
2845
3435
|
"privacy": "private",
|
|
2846
|
-
"
|
|
2847
|
-
|
|
3436
|
+
"type": {
|
|
3437
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
3438
|
+
}
|
|
2848
3439
|
},
|
|
2849
3440
|
{
|
|
2850
3441
|
"kind": "field",
|
|
2851
|
-
"name": "
|
|
2852
|
-
"privacy": "private"
|
|
3442
|
+
"name": "#hideOverflowButtons",
|
|
3443
|
+
"privacy": "private",
|
|
3444
|
+
"type": {
|
|
3445
|
+
"text": "boolean"
|
|
3446
|
+
},
|
|
3447
|
+
"default": "false",
|
|
3448
|
+
"description": "Default state"
|
|
2853
3449
|
},
|
|
2854
3450
|
{
|
|
2855
|
-
"kind": "
|
|
2856
|
-
"name": "
|
|
2857
|
-
"
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
"
|
|
3451
|
+
"kind": "field",
|
|
3452
|
+
"name": "showScrollButtons",
|
|
3453
|
+
"type": {
|
|
3454
|
+
"text": "boolean"
|
|
3455
|
+
},
|
|
3456
|
+
"default": "false"
|
|
3457
|
+
},
|
|
3458
|
+
{
|
|
3459
|
+
"kind": "field",
|
|
3460
|
+
"name": "overflowLeft",
|
|
3461
|
+
"type": {
|
|
3462
|
+
"text": "boolean"
|
|
3463
|
+
},
|
|
3464
|
+
"default": "false"
|
|
3465
|
+
},
|
|
3466
|
+
{
|
|
3467
|
+
"kind": "field",
|
|
3468
|
+
"name": "overflowRight",
|
|
3469
|
+
"type": {
|
|
3470
|
+
"text": "boolean"
|
|
3471
|
+
},
|
|
3472
|
+
"default": "false"
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
"kind": "field",
|
|
3476
|
+
"name": "firstItem",
|
|
3477
|
+
"type": {
|
|
3478
|
+
"text": "HTMLElement | undefined"
|
|
3479
|
+
}
|
|
3480
|
+
},
|
|
3481
|
+
{
|
|
3482
|
+
"kind": "field",
|
|
3483
|
+
"name": "lastItem",
|
|
3484
|
+
"type": {
|
|
3485
|
+
"text": "HTMLElement | undefined"
|
|
3486
|
+
}
|
|
2865
3487
|
},
|
|
2866
3488
|
{
|
|
2867
3489
|
"kind": "method",
|
|
2868
|
-
"name": "
|
|
2869
|
-
"
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
"name": "msgs",
|
|
2873
|
-
"type": {
|
|
2874
|
-
"text": "unknown[]"
|
|
2875
|
-
}
|
|
3490
|
+
"name": "#setOverflowState",
|
|
3491
|
+
"return": {
|
|
3492
|
+
"type": {
|
|
3493
|
+
"text": "void"
|
|
2876
3494
|
}
|
|
2877
|
-
|
|
2878
|
-
"description": "A logging wrapper which checks the debugLog boolean and prints to the console if true."
|
|
3495
|
+
}
|
|
2879
3496
|
},
|
|
2880
3497
|
{
|
|
2881
3498
|
"kind": "method",
|
|
2882
|
-
"name": "
|
|
2883
|
-
"static": true,
|
|
3499
|
+
"name": "init",
|
|
2884
3500
|
"parameters": [
|
|
2885
3501
|
{
|
|
2886
|
-
"name": "
|
|
3502
|
+
"name": "container",
|
|
2887
3503
|
"type": {
|
|
2888
|
-
"text": "
|
|
3504
|
+
"text": "HTMLElement"
|
|
2889
3505
|
}
|
|
2890
|
-
}
|
|
2891
|
-
],
|
|
2892
|
-
"description": "A console warning wrapper which formats your output with useful debugging information."
|
|
2893
|
-
},
|
|
2894
|
-
{
|
|
2895
|
-
"kind": "method",
|
|
2896
|
-
"name": "error",
|
|
2897
|
-
"static": true,
|
|
2898
|
-
"parameters": [
|
|
3506
|
+
},
|
|
2899
3507
|
{
|
|
2900
|
-
"name": "
|
|
3508
|
+
"name": "items",
|
|
2901
3509
|
"type": {
|
|
2902
|
-
"text": "
|
|
3510
|
+
"text": "HTMLElement[]"
|
|
2903
3511
|
}
|
|
2904
3512
|
}
|
|
2905
|
-
]
|
|
2906
|
-
|
|
3513
|
+
]
|
|
3514
|
+
},
|
|
3515
|
+
{
|
|
3516
|
+
"kind": "field",
|
|
3517
|
+
"name": "onScroll"
|
|
2907
3518
|
},
|
|
2908
3519
|
{
|
|
2909
3520
|
"kind": "method",
|
|
2910
|
-
"name": "
|
|
2911
|
-
"parameters": [
|
|
2912
|
-
{
|
|
2913
|
-
"name": "msgs",
|
|
2914
|
-
"type": {
|
|
2915
|
-
"text": "unknown[]"
|
|
2916
|
-
}
|
|
2917
|
-
}
|
|
2918
|
-
],
|
|
2919
|
-
"description": "Local logging that outputs the tag name as a prefix automatically"
|
|
3521
|
+
"name": "scrollLeft"
|
|
2920
3522
|
},
|
|
2921
3523
|
{
|
|
2922
3524
|
"kind": "method",
|
|
2923
|
-
"name": "
|
|
2924
|
-
"parameters": [
|
|
2925
|
-
{
|
|
2926
|
-
"name": "msgs",
|
|
2927
|
-
"type": {
|
|
2928
|
-
"text": "unknown[]"
|
|
2929
|
-
}
|
|
2930
|
-
}
|
|
2931
|
-
],
|
|
2932
|
-
"description": "Local warning wrapper that outputs the tag name as a prefix automatically.\nFor use inside a component's function."
|
|
3525
|
+
"name": "scrollRight"
|
|
2933
3526
|
},
|
|
2934
3527
|
{
|
|
2935
3528
|
"kind": "method",
|
|
2936
|
-
"name": "
|
|
2937
|
-
"parameters": [
|
|
2938
|
-
{
|
|
2939
|
-
"name": "msgs",
|
|
2940
|
-
"type": {
|
|
2941
|
-
"text": "unknown[]"
|
|
2942
|
-
}
|
|
2943
|
-
}
|
|
2944
|
-
],
|
|
2945
|
-
"description": "Local error wrapper that outputs the tag name as a prefix automatically.\nFor use inside a component's function."
|
|
3529
|
+
"name": "update"
|
|
2946
3530
|
},
|
|
2947
3531
|
{
|
|
2948
3532
|
"kind": "method",
|
|
2949
|
-
"name": "hostConnected"
|
|
3533
|
+
"name": "hostConnected",
|
|
3534
|
+
"return": {
|
|
3535
|
+
"type": {
|
|
3536
|
+
"text": "void"
|
|
3537
|
+
}
|
|
3538
|
+
}
|
|
2950
3539
|
},
|
|
2951
3540
|
{
|
|
2952
3541
|
"kind": "field",
|
|
2953
3542
|
"type": {
|
|
2954
|
-
"text": "
|
|
2955
|
-
"name": "
|
|
2956
|
-
"package": "lit"
|
|
3543
|
+
"text": "ReactiveControllerHost & Element",
|
|
3544
|
+
"name": "ReactiveControllerHost & Element"
|
|
2957
3545
|
},
|
|
2958
3546
|
"name": "host",
|
|
3547
|
+
"privacy": "public"
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
"kind": "field",
|
|
3551
|
+
"type": {
|
|
3552
|
+
"text": "Options",
|
|
3553
|
+
"name": "Options"
|
|
3554
|
+
},
|
|
3555
|
+
"name": "options",
|
|
2959
3556
|
"privacy": "private"
|
|
2960
3557
|
}
|
|
2961
3558
|
]
|
|
@@ -2964,10 +3561,10 @@
|
|
|
2964
3561
|
"exports": [
|
|
2965
3562
|
{
|
|
2966
3563
|
"kind": "js",
|
|
2967
|
-
"name": "
|
|
3564
|
+
"name": "OverflowController",
|
|
2968
3565
|
"declaration": {
|
|
2969
|
-
"name": "
|
|
2970
|
-
"module": "controllers/
|
|
3566
|
+
"name": "OverflowController",
|
|
3567
|
+
"module": "controllers/overflow-controller.ts"
|
|
2971
3568
|
}
|
|
2972
3569
|
}
|
|
2973
3570
|
]
|
|
@@ -6117,21 +6714,33 @@
|
|
|
6117
6714
|
"parameters": [
|
|
6118
6715
|
{
|
|
6119
6716
|
"name": "container",
|
|
6120
|
-
"description": "The container to check if the element is in view of."
|
|
6717
|
+
"description": "The container to check if the element is in view of.",
|
|
6718
|
+
"type": {
|
|
6719
|
+
"text": "HTMLElement"
|
|
6720
|
+
}
|
|
6121
6721
|
},
|
|
6122
6722
|
{
|
|
6123
6723
|
"name": "element",
|
|
6124
|
-
"description": "The element to check if it is view"
|
|
6724
|
+
"description": "The element to check if it is view",
|
|
6725
|
+
"type": {
|
|
6726
|
+
"text": "HTMLElement"
|
|
6727
|
+
}
|
|
6125
6728
|
},
|
|
6126
6729
|
{
|
|
6127
6730
|
"name": "partial",
|
|
6128
6731
|
"default": "false",
|
|
6129
|
-
"description": "true if partial view is allowed"
|
|
6732
|
+
"description": "true if partial view is allowed",
|
|
6733
|
+
"type": {
|
|
6734
|
+
"text": "boolean"
|
|
6735
|
+
}
|
|
6130
6736
|
},
|
|
6131
6737
|
{
|
|
6132
6738
|
"name": "strict",
|
|
6133
6739
|
"default": "false",
|
|
6134
|
-
"description": "true if strict mode is set, never consider the container width and element width"
|
|
6740
|
+
"description": "true if strict mode is set, never consider the container width and element width",
|
|
6741
|
+
"type": {
|
|
6742
|
+
"text": "boolean"
|
|
6743
|
+
}
|
|
6135
6744
|
}
|
|
6136
6745
|
],
|
|
6137
6746
|
"description": "This function returns whether or not an element is within the viewable area of a container. If partial is true,\nthen this function will return true even if only part of the element is in view.",
|
|
@@ -6183,12 +6792,18 @@
|
|
|
6183
6792
|
{
|
|
6184
6793
|
"name": "partial",
|
|
6185
6794
|
"default": "false",
|
|
6186
|
-
"description": "true if partial view is allowed"
|
|
6795
|
+
"description": "true if partial view is allowed",
|
|
6796
|
+
"type": {
|
|
6797
|
+
"text": "boolean"
|
|
6798
|
+
}
|
|
6187
6799
|
},
|
|
6188
6800
|
{
|
|
6189
6801
|
"name": "strict",
|
|
6190
6802
|
"default": "false",
|
|
6191
|
-
"description": "true if strict mode is set, never consider the container width and element width"
|
|
6803
|
+
"description": "true if strict mode is set, never consider the container width and element width",
|
|
6804
|
+
"type": {
|
|
6805
|
+
"text": "boolean"
|
|
6806
|
+
}
|
|
6192
6807
|
}
|
|
6193
6808
|
],
|
|
6194
6809
|
"description": "This function returns whether or not an element is within the viewable area of a container. If partial is true,\nthen this function will return true even if only part of the element is in view."
|
|
@@ -6299,19 +6914,19 @@
|
|
|
6299
6914
|
},
|
|
6300
6915
|
{
|
|
6301
6916
|
"kind": "javascript-module",
|
|
6302
|
-
"path": "test/kitchen-sink.e2e.
|
|
6917
|
+
"path": "test/kitchen-sink.e2e.d.ts",
|
|
6303
6918
|
"declarations": [],
|
|
6304
6919
|
"exports": []
|
|
6305
6920
|
},
|
|
6306
6921
|
{
|
|
6307
6922
|
"kind": "javascript-module",
|
|
6308
|
-
"path": "test/kitchen-sink.e2e.
|
|
6923
|
+
"path": "test/kitchen-sink.e2e.js",
|
|
6309
6924
|
"declarations": [],
|
|
6310
6925
|
"exports": []
|
|
6311
6926
|
},
|
|
6312
6927
|
{
|
|
6313
6928
|
"kind": "javascript-module",
|
|
6314
|
-
"path": "test/kitchen-sink.e2e.
|
|
6929
|
+
"path": "test/kitchen-sink.e2e.ts",
|
|
6315
6930
|
"declarations": [],
|
|
6316
6931
|
"exports": []
|
|
6317
6932
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* This function returns whether or not an element is within the viewable area of a container. If partial is true,
|
|
3
3
|
* then this function will return true even if only part of the element is in view.
|
|
4
4
|
*
|
|
5
|
-
* @param container The container to check if the element is in view of.
|
|
6
|
-
* @param element The element to check if it is view
|
|
7
|
-
* @param partial true if partial view is allowed
|
|
8
|
-
* @param strict true if strict mode is set, never consider the container width and element width
|
|
5
|
+
* @param {HTMLElement} container The container to check if the element is in view of.
|
|
6
|
+
* @param {HTMLElement} element The element to check if it is view
|
|
7
|
+
* @param {boolean} partial true if partial view is allowed
|
|
8
|
+
* @param {boolean} strict true if strict mode is set, never consider the container width and element width
|
|
9
9
|
*
|
|
10
10
|
* @returns True if the component is in View.
|
|
11
11
|
*/
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* This function returns whether or not an element is within the viewable area of a container. If partial is true,
|
|
3
3
|
* then this function will return true even if only part of the element is in view.
|
|
4
4
|
*
|
|
5
|
-
* @param container The container to check if the element is in view of.
|
|
6
|
-
* @param element The element to check if it is view
|
|
7
|
-
* @param partial true if partial view is allowed
|
|
8
|
-
* @param strict true if strict mode is set, never consider the container width and element width
|
|
5
|
+
* @param {HTMLElement} container The container to check if the element is in view of.
|
|
6
|
+
* @param {HTMLElement} element The element to check if it is view
|
|
7
|
+
* @param {boolean} partial true if partial view is allowed
|
|
8
|
+
* @param {boolean} strict true if strict mode is set, never consider the container width and element width
|
|
9
9
|
*
|
|
10
10
|
* @returns True if the component is in View.
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isElementInView.js","sourceRoot":"","sources":["isElementInView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,SAAsB,EACtB,OAAoB,EACpB,OAAO,GAAG,KAAK,EACf,MAAM,GAAG,KAAK;IAEd,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,MAAM,eAAe,GAAG,SAAS,CAAC,qBAAqB,EAAE,CAAC;IAC1D,MAAM,aAAa,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IACtD,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC5D,MAAM,oBAAoB,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC/D,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE3D,mBAAmB;IACnB,MAAM,eAAe,GACnB,iBAAiB,IAAI,mBAAmB;QACxC,kBAAkB,IAAI,oBAAoB,CAAC;IAC7C,MAAM,iBAAiB,GACrB,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QACrE,CAAC,CAAC,iBAAiB,GAAG,mBAAmB,IAAI,kBAAkB,GAAG,mBAAmB,CAAC;YACpF,CAAC,kBAAkB,GAAG,oBAAoB,IAAI,iBAAiB,GAAG,oBAAoB,CAAC,CAAC,CAAC;IAE7F,iBAAiB;IACjB,OAAO,eAAe,IAAI,iBAAiB,CAAC;AAC9C,CAAC","sourcesContent":["/**\n * This function returns whether or not an element is within the viewable area of a container. If partial is true,\n * then this function will return true even if only part of the element is in view.\n *\n * @param container The container to check if the element is in view of.\n * @param element The element to check if it is view\n * @param partial true if partial view is allowed\n * @param strict true if strict mode is set, never consider the container width and element width\n *\n * @returns True if the component is in View.\n */\nexport function isElementInView(\n container: HTMLElement,\n element: HTMLElement,\n partial = false,\n strict = false\n): boolean {\n if (!container || !element) {\n return false;\n }\n const containerBounds = container.getBoundingClientRect();\n const elementBounds = element.getBoundingClientRect();\n const containerBoundsLeft = Math.ceil(containerBounds.left);\n const containerBoundsRight = Math.floor(containerBounds.right);\n const elementBoundsLeft = Math.ceil(elementBounds.left);\n const elementBoundsRight = Math.floor(elementBounds.right);\n\n // Check if in view\n const isTotallyInView =\n elementBoundsLeft >= containerBoundsLeft &&\n elementBoundsRight <= containerBoundsRight;\n const isPartiallyInView =\n (partial || (!strict && containerBounds.width < elementBounds.width)) &&\n ((elementBoundsLeft < containerBoundsLeft && elementBoundsRight > containerBoundsLeft) ||\n (elementBoundsRight > containerBoundsRight && elementBoundsLeft < containerBoundsRight));\n\n // Return outcome\n return isTotallyInView || isPartiallyInView;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"isElementInView.js","sourceRoot":"","sources":["isElementInView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,SAAsB,EACtB,OAAoB,EACpB,OAAO,GAAG,KAAK,EACf,MAAM,GAAG,KAAK;IAEd,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,MAAM,eAAe,GAAG,SAAS,CAAC,qBAAqB,EAAE,CAAC;IAC1D,MAAM,aAAa,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IACtD,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC5D,MAAM,oBAAoB,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC/D,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE3D,mBAAmB;IACnB,MAAM,eAAe,GACnB,iBAAiB,IAAI,mBAAmB;QACxC,kBAAkB,IAAI,oBAAoB,CAAC;IAC7C,MAAM,iBAAiB,GACrB,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QACrE,CAAC,CAAC,iBAAiB,GAAG,mBAAmB,IAAI,kBAAkB,GAAG,mBAAmB,CAAC;YACpF,CAAC,kBAAkB,GAAG,oBAAoB,IAAI,iBAAiB,GAAG,oBAAoB,CAAC,CAAC,CAAC;IAE7F,iBAAiB;IACjB,OAAO,eAAe,IAAI,iBAAiB,CAAC;AAC9C,CAAC","sourcesContent":["/**\n * This function returns whether or not an element is within the viewable area of a container. If partial is true,\n * then this function will return true even if only part of the element is in view.\n *\n * @param {HTMLElement} container The container to check if the element is in view of.\n * @param {HTMLElement} element The element to check if it is view\n * @param {boolean} partial true if partial view is allowed\n * @param {boolean} strict true if strict mode is set, never consider the container width and element width\n *\n * @returns True if the component is in View.\n */\nexport function isElementInView(\n container: HTMLElement,\n element: HTMLElement,\n partial = false,\n strict = false\n): boolean {\n if (!container || !element) {\n return false;\n }\n const containerBounds = container.getBoundingClientRect();\n const elementBounds = element.getBoundingClientRect();\n const containerBoundsLeft = Math.ceil(containerBounds.left);\n const containerBoundsRight = Math.floor(containerBounds.right);\n const elementBoundsLeft = Math.ceil(elementBounds.left);\n const elementBoundsRight = Math.floor(elementBounds.right);\n\n // Check if in view\n const isTotallyInView =\n elementBoundsLeft >= containerBoundsLeft &&\n elementBoundsRight <= containerBoundsRight;\n const isPartiallyInView =\n (partial || (!strict && containerBounds.width < elementBounds.width)) &&\n ((elementBoundsLeft < containerBoundsLeft && elementBoundsRight > containerBoundsLeft) ||\n (elementBoundsRight > containerBoundsRight && elementBoundsLeft < containerBoundsRight));\n\n // Return outcome\n return isTotallyInView || isPartiallyInView;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/pfe-core",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "PatternFly Elements Core Library",
|
|
6
6
|
"customElements": "custom-elements.json",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"test": "wtr --files './test/*.spec.ts' --config ../../web-test-runner.config.js"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@floating-ui/dom": "^1.
|
|
54
|
-
"lit": "2.
|
|
53
|
+
"@floating-ui/dom": "^1.2.3",
|
|
54
|
+
"lit": "2.6.1"
|
|
55
55
|
},
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|