@swiftwc/ui 0.0.0-dev.6 → 0.0.0-dev.61
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/README.md +15 -0
- package/generated/buses/alert-dialog.d.ts +2 -0
- package/generated/buses/alert-dialog.js +1 -0
- package/generated/buses/confirmation-dialog.d.ts +2 -0
- package/generated/buses/confirmation-dialog.js +1 -0
- package/generated/buses/index.d.ts +6 -0
- package/generated/buses/index.js +6 -0
- package/generated/buses/lifecycle-observer.d.ts +2 -0
- package/generated/buses/lifecycle-observer.js +1 -0
- package/generated/client/index.d.ts +22 -4
- package/generated/client/index.js +219 -181
- package/generated/components/alert-dialog.d.ts +8 -0
- package/generated/components/alert-dialog.js +99 -0
- package/generated/components/body-view.js +5 -2
- package/generated/components/bordered-button.d.ts +17 -0
- package/generated/components/bordered-button.js +56 -0
- package/generated/components/bordered-prominent-button.d.ts +17 -0
- package/generated/components/bordered-prominent-button.js +56 -0
- package/generated/components/borderless-button.d.ts +12 -4
- package/generated/components/borderless-button.js +47 -16
- package/generated/components/color-scheme.d.ts +7 -0
- package/generated/components/color-scheme.js +54 -0
- package/generated/components/confirmation-dialog.d.ts +9 -0
- package/generated/components/confirmation-dialog.js +113 -0
- package/generated/components/content-unavailable-view.d.ts +24 -0
- package/generated/components/content-unavailable-view.js +81 -0
- package/generated/components/date-picker.d.ts +36 -0
- package/generated/components/date-picker.js +461 -0
- package/generated/components/disclosure-group.d.ts +9 -7
- package/generated/components/disclosure-group.js +51 -65
- package/generated/components/fine-tooltip.d.ts +7 -0
- package/generated/components/fine-tooltip.js +107 -0
- package/generated/components/form-view.d.ts +9 -0
- package/generated/components/form-view.js +63 -0
- package/generated/components/glass-button.d.ts +16 -0
- package/generated/components/glass-button.js +53 -0
- package/generated/components/glass-prominent-button.d.ts +16 -0
- package/generated/components/glass-prominent-button.js +53 -0
- package/generated/components/h-stack.d.ts +10 -0
- package/generated/components/h-stack.js +19 -0
- package/generated/components/image-view.d.ts +9 -0
- package/generated/components/image-view.js +46 -0
- package/generated/components/index.d.ts +41 -10
- package/generated/components/index.js +41 -15
- package/generated/components/label-view.d.ts +9 -0
- package/generated/components/label-view.js +51 -0
- package/generated/components/labeled-content.d.ts +9 -0
- package/generated/components/labeled-content.js +115 -0
- package/generated/components/list-view.d.ts +8 -0
- package/generated/components/list-view.js +32 -0
- package/generated/components/menu-view.d.ts +12 -0
- package/generated/components/menu-view.js +142 -0
- package/generated/components/navigation-large-title.d.ts +6 -0
- package/generated/components/navigation-large-title.js +181 -0
- package/generated/components/navigation-split-view.d.ts +7 -2
- package/generated/components/navigation-split-view.js +19 -3
- package/generated/components/navigation-stack.d.ts +6 -2
- package/generated/components/navigation-stack.js +23 -59
- package/generated/components/navigation-title.d.ts +8 -0
- package/generated/components/navigation-title.js +50 -0
- package/generated/components/picker-view.d.ts +44 -0
- package/generated/components/picker-view.js +1009 -0
- package/generated/components/plain-button.d.ts +7 -0
- package/generated/components/plain-button.js +22 -0
- package/generated/components/progress-view.d.ts +13 -0
- package/generated/components/progress-view.js +120 -0
- package/generated/components/screen-view.d.ts +1 -1
- package/generated/components/screen-view.js +4 -2
- package/generated/components/scroll-view-proxy.d.ts +8 -0
- package/generated/components/scroll-view-proxy.js +17 -0
- package/generated/components/scroll-view.d.ts +4 -2
- package/generated/components/scroll-view.js +179 -64
- package/generated/components/search-view.d.ts +7 -0
- package/generated/components/search-view.js +30 -0
- package/generated/components/section-view.d.ts +9 -0
- package/generated/components/section-view.js +85 -0
- package/generated/components/sheet-view.d.ts +3 -4
- package/generated/components/sheet-view.js +53 -17
- package/generated/components/sidebar-toggle.d.ts +1 -1
- package/generated/components/sidebar-toggle.js +76 -72
- package/generated/components/sidebar-view.d.ts +2 -4
- package/generated/components/sidebar-view.js +25 -17
- package/generated/components/sticky-container.d.ts +6 -0
- package/generated/components/sticky-container.js +26 -0
- package/generated/components/tab-bar.d.ts +5 -4
- package/generated/components/tab-bar.js +34 -17
- package/generated/components/tab-item.d.ts +4 -3
- package/generated/components/tab-item.js +125 -29
- package/generated/components/tab-view.d.ts +17 -2
- package/generated/components/tab-view.js +252 -17
- package/generated/components/table-view.d.ts +12 -0
- package/generated/components/table-view.js +153 -0
- package/generated/components/text-field.d.ts +29 -0
- package/generated/components/text-field.js +496 -0
- package/generated/components/tool-bar-item-group.d.ts +5 -0
- package/generated/components/tool-bar-item-group.js +28 -0
- package/generated/components/tool-bar-item.d.ts +8 -0
- package/generated/components/tool-bar-item.js +66 -0
- package/generated/components/tool-bar.d.ts +19 -0
- package/generated/components/tool-bar.js +93 -0
- package/generated/components/v-keyboard.d.ts +4 -0
- package/generated/components/v-keyboard.js +72 -70
- package/generated/components/v-stack.d.ts +13 -0
- package/generated/components/v-stack.js +22 -0
- package/generated/css/index.css +8847 -0
- package/generated/events/alert-dialog.d.ts +8 -0
- package/generated/events/confirmation-dialog.d.ts +9 -0
- package/generated/events/confirmation-dialog.js +1 -0
- package/generated/events/date-picker.d.ts +8 -0
- package/generated/events/date-picker.js +1 -0
- package/generated/events/index.d.ts +8 -0
- package/generated/events/index.js +8 -0
- package/generated/events/lifecycle-observer.d.ts +10 -0
- package/generated/events/lifecycle-observer.js +1 -0
- package/generated/events/picker-view.d.ts +15 -0
- package/generated/events/picker-view.js +1 -0
- package/generated/events/scroll-view.d.ts +10 -0
- package/generated/events/scroll-view.js +1 -0
- package/generated/events/tab-view.d.ts +28 -0
- package/generated/events/tab-view.js +1 -0
- package/generated/events/text-field.d.ts +8 -0
- package/generated/events/text-field.js +1 -0
- package/generated/i18n/index.d.ts +34 -0
- package/generated/i18n/index.js +167 -0
- package/generated/i18n/locales/el.d.ts +16 -0
- package/generated/i18n/locales/el.js +16 -0
- package/generated/i18n/locales/en.d.ts +16 -0
- package/generated/i18n/locales/en.js +16 -0
- package/generated/i18n/locales/index.d.ts +4 -0
- package/generated/i18n/locales/index.js +4 -0
- package/generated/internal/class/cleanup-registry.d.ts +5 -0
- package/generated/internal/class/cleanup-registry.js +38 -0
- package/generated/internal/class/css-style-observer.d.ts +8 -0
- package/generated/internal/class/css-style-observer.js +26 -0
- package/generated/internal/class/form-associated-base.d.ts +16 -0
- package/generated/internal/class/form-associated-base.js +78 -0
- package/generated/internal/class/mutation-observer-set.d.ts +9 -0
- package/generated/internal/class/mutation-observer-set.js +42 -0
- package/generated/internal/class/mutation-observer-singleton.d.ts +10 -0
- package/generated/internal/class/mutation-observer-singleton.js +64 -0
- package/generated/internal/class/navigation-path.d.ts +15 -0
- package/generated/internal/class/navigation-path.js +84 -0
- package/generated/internal/class/navigation-view.d.ts +8 -0
- package/generated/internal/class/navigation-view.js +72 -0
- package/generated/internal/class/resize-observer-singleton.d.ts +7 -0
- package/generated/internal/class/resize-observer-singleton.js +22 -0
- package/generated/internal/decorators/adaptive-slot.d.ts +1 -0
- package/generated/internal/decorators/adaptive-slot.js +50 -0
- package/generated/internal/decorators/custom-element.d.ts +5 -0
- package/generated/internal/decorators/custom-element.js +5 -0
- package/generated/internal/decorators/index.d.ts +6 -0
- package/generated/internal/decorators/index.js +6 -0
- package/generated/internal/decorators/microtask-on-connected.d.ts +39 -0
- package/generated/internal/decorators/microtask-on-connected.js +67 -0
- package/generated/internal/privateNamespace.d.ts +14 -0
- package/generated/internal/privateNamespace.js +168 -0
- package/generated/internal/utils/add.d.ts +1 -0
- package/generated/internal/utils/add.js +7 -0
- package/generated/internal/utils/cash/ancestors.d.ts +1 -0
- package/generated/internal/utils/cash/ancestors.js +27 -0
- package/generated/internal/utils/cash/index.d.ts +23 -0
- package/generated/internal/utils/cash/index.js +25 -0
- package/generated/internal/utils/cash/next-all.d.ts +1 -0
- package/generated/internal/utils/cash/next-all.js +10 -0
- package/generated/internal/utils/cash/next.d.ts +1 -0
- package/generated/internal/utils/cash/next.js +9 -0
- package/generated/internal/utils/cash/prev-all.d.ts +1 -0
- package/generated/internal/utils/cash/prev-all.js +10 -0
- package/generated/internal/utils/cash/prev.d.ts +1 -0
- package/generated/internal/utils/cash/prev.js +9 -0
- package/generated/internal/utils/cash/prop.d.ts +18 -0
- package/generated/internal/utils/cash/prop.js +30 -0
- package/generated/internal/utils/cash/siblings.d.ts +1 -0
- package/generated/internal/utils/cash/siblings.js +10 -0
- package/generated/internal/utils/clamp.d.ts +1 -0
- package/generated/internal/utils/clamp.js +4 -0
- package/generated/internal/utils/compare-big-decimals.d.ts +1 -0
- package/generated/internal/utils/compare-big-decimals.js +90 -0
- package/generated/internal/utils/debounce.d.ts +1 -0
- package/generated/internal/utils/debounce.js +13 -0
- package/generated/internal/utils/dev-flags.d.ts +3 -0
- package/generated/internal/utils/dev-flags.js +5 -0
- package/generated/internal/utils/ensure-placeholder.d.ts +1 -0
- package/generated/internal/utils/ensure-placeholder.js +55 -0
- package/generated/internal/utils/frame.d.ts +1 -0
- package/generated/internal/utils/frame.js +6 -0
- package/generated/internal/utils/index.d.ts +21 -1
- package/generated/internal/utils/index.js +24 -1
- package/generated/internal/utils/is-inside.d.ts +1 -0
- package/generated/internal/utils/is-inside.js +4 -0
- package/generated/internal/utils/kebab-case.d.ts +1 -1
- package/generated/internal/utils/list-active.d.ts +7 -0
- package/generated/internal/utils/list-active.js +83 -0
- package/generated/internal/utils/microtask.d.ts +1 -0
- package/generated/internal/utils/microtask.js +3 -0
- package/generated/internal/utils/onoff.d.ts +45 -0
- package/generated/internal/utils/onoff.js +31 -0
- package/generated/internal/utils/render-label-icon.d.ts +2 -0
- package/generated/internal/utils/render-label-icon.js +19 -0
- package/generated/internal/utils/render-label-title.d.ts +2 -0
- package/generated/internal/utils/render-label-title.js +16 -0
- package/generated/internal/utils/render-label.d.ts +1 -0
- package/generated/internal/utils/render-label.js +19 -0
- package/generated/internal/utils/set.d.ts +1 -0
- package/generated/internal/utils/set.js +7 -0
- package/generated/internal/utils/sleep.d.ts +1 -0
- package/generated/internal/utils/sleep.js +3 -0
- package/generated/internal/utils/slow-hide-show.d.ts +1 -0
- package/generated/internal/utils/slow-hide-show.js +16 -0
- package/generated/internal/utils/timeout.d.ts +5 -0
- package/generated/internal/utils/timeout.js +16 -0
- package/generated/internal/utils/touch-glass.d.ts +7 -0
- package/generated/internal/utils/touch-glass.js +19 -0
- package/generated/namespace-browser/base.d.ts +45 -0
- package/generated/namespace-browser/base.js +115 -0
- package/generated/namespace-browser/index.d.ts +7 -0
- package/generated/namespace-browser/index.js +1 -0
- package/generated/snapshot/index.d.ts +4 -11
- package/generated/snapshot/index.js +55 -145
- package/package.json +33 -9
- package/scss/_components.scss +60 -13
- package/scss/_final.scss +1 -0
- package/scss/_functions.scss +10 -0
- package/scss/_mixins.scss +4 -169
- package/scss/_placeholders.scss +3 -0
- package/scss/_transitions.scss +22 -1
- package/scss/_utils.scss +9 -0
- package/scss/_vars.scss +144 -23
- package/scss/base/_layout.scss +40 -16
- package/scss/base/_reboot.scss +151 -15
- package/scss/base/_root.scss +358 -25
- package/scss/colors/_index.scss +788 -70
- package/scss/components/_alert-dialog.scss +111 -0
- package/scss/components/_body-view.scss +12 -3
- package/scss/components/_bordered-button.scss +57 -0
- package/scss/components/_bordered-prominent-button.scss +64 -0
- package/scss/components/_borderless-button.scss +36 -6
- package/scss/components/_confirmation-dialog.scss +102 -0
- package/scss/components/_content-unavailable-view.scss +54 -0
- package/scss/components/_date-picker.scss +30 -0
- package/scss/components/_detail-placeholder.scss +153 -0
- package/scss/components/_disclosure-group.scss +147 -48
- package/scss/components/_fine-tooltip.scss +84 -0
- package/scss/components/_form-view.scss +233 -0
- package/scss/components/_full-screen.scss +7 -5
- package/scss/components/_glass-button.scss +59 -0
- package/scss/components/_glass-prominent-button.scss +70 -0
- package/scss/components/_h-divider.scss +13 -0
- package/scss/components/_h-flex-stack.scss +23 -0
- package/scss/components/_h-stack.scss +29 -0
- package/scss/components/_image-view.scss +9 -0
- package/scss/components/_index.scss +239 -7
- package/scss/components/_label-view copy.scss.txt +420 -0
- package/scss/components/_label-view.scss +372 -0
- package/scss/components/_label-view.scss.txt +536 -0
- package/scss/components/_labeled-content.scss +67 -0
- package/scss/components/_list-view.scss +269 -0
- package/scss/components/_menu-view.scss +219 -0
- package/scss/components/_navigation-large-title.scss +27 -0
- package/scss/components/_navigation-split-view.scss +329 -269
- package/scss/components/_navigation-stack.scss +6 -6
- package/scss/components/_navigation-title.scss +10 -0
- package/scss/components/_picker-view.scss +307 -0
- package/scss/components/_plain-button.scss +18 -0
- package/scss/components/_progress-view.scss +98 -0
- package/scss/components/_scroll-view-proxy.scss +79 -0
- package/scss/components/_scroll-view-toolbars.scss +126 -0
- package/scss/components/_scroll-view.scss +114 -66
- package/scss/components/_search-view.scss +22 -0
- package/scss/components/_section-view.scss +119 -0
- package/scss/components/_sheet-view.scss +78 -35
- package/scss/components/_sidebar-toggle.scss +87 -27
- package/scss/components/_sidebar-view.scss +30 -40
- package/scss/components/_sticky-container.scss +42 -0
- package/scss/components/_tab-bar.scss +211 -84
- package/scss/components/_tab-item.scss +25 -0
- package/scss/components/_tab-view.scss +270 -126
- package/scss/components/_table-column.scss +54 -0
- package/scss/components/_table-row.scss +240 -0
- package/scss/components/_table-view.scss +231 -0
- package/scss/components/_text-field.scss +53 -0
- package/scss/components/_tool-bar-item-group.scss +30 -19
- package/scss/components/_tool-bar-item.scss +81 -71
- package/scss/components/_tool-bar.scss +126 -63
- package/scss/components/_v-divider.scss +13 -0
- package/scss/components/_v-flex-stack.scss +29 -0
- package/scss/components/_v-keyboard.scss +6 -4
- package/scss/components/_v-stack.scss +15 -9
- package/scss/final/_touch-glass.scss +91 -0
- package/scss/index.scss +6 -2
- package/scss/mixins/_button.scss +44 -0
- package/scss/mixins/_color.scss +16 -0
- package/scss/mixins/_dialog.scss +89 -0
- package/scss/mixins/_index.scss +453 -0
- package/scss/placeholders/_buttons.scss +117 -0
- package/scss/placeholders/_lists.scss +594 -0
- package/scss/transitions/_alert-dialog.scss +18 -0
- package/scss/transitions/_bwd.navbar.scss +3 -13
- package/scss/transitions/_bwd.scss +4 -20
- package/scss/transitions/_confirmation-dialog.scss +27 -0
- package/scss/transitions/_disclosure-group.scss +35 -0
- package/scss/transitions/_fine-tooltip.scss +21 -0
- package/scss/transitions/_fwd.navbar.scss +4 -9
- package/scss/transitions/_fwd.scss +4 -34
- package/scss/transitions/_glass-button.scss +12 -0
- package/scss/transitions/_glass-prominent-button.scss +12 -0
- package/scss/transitions/_index.scss +35 -143
- package/scss/transitions/_menu-view.scss +26 -0
- package/scss/transitions/_navigation-split-view.scss +23 -0
- package/scss/transitions/_progress-view.scss +23 -0
- package/scss/transitions/_sheet-view.scss +30 -0
- package/scss/transitions/_sidebar-view.scss +36 -0
- package/scss/transitions/_tab-bar.scss +20 -0
- package/scss/utils/_frame.scss +91 -0
- package/scss/utils/_index.scss +78 -0
- package/scss/utils/_scroll-view.scss +14 -0
- package/scss/utils/_spacing.scss +25 -0
- package/scss/utils/_stacks.scss +222 -0
- package/web-components.html-data/en.json +721 -0
- package/generated/components/bottom-bar.d.ts +0 -10
- package/generated/components/bottom-bar.js +0 -73
- package/generated/components/navigation-bar.d.ts +0 -10
- package/generated/components/navigation-bar.js +0 -80
- package/generated/internal/class.d.ts +0 -18
- package/generated/internal/class.js +0 -18
- package/generated/namespace/index.d.ts +0 -6
- package/generated/styles.css +0 -1305
- package/scss/_dev.scss +0 -68
- package/scss/components/_tab-bar-stack.scss +0 -101
- package/scss/components/_toolbars.scss +0 -100
- package/scss/transitions/_dialog.scss +0 -32
- /package/generated/{namespace/index.js → events/alert-dialog.js} +0 -0
|
@@ -1,29 +1,264 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
|
+
import { CSSStyleObserver } from '../internal/class/css-style-observer';
|
|
4
|
+
import { NavigationPath } from '../internal/class/navigation-path';
|
|
5
|
+
import { $, cssTime, debounce, devFlags, frame, onoff, timeout } from '../internal/utils';
|
|
6
|
+
import { Snapshot } from '../snapshot';
|
|
7
|
+
const TAB_BAR_PLACEMENTS = ['bottom-bar', 'ornament', 'sidebar', 'top-bar'];
|
|
8
|
+
/**
|
|
9
|
+
* @fires tabshow A Tab is shown
|
|
10
|
+
* @fires tabhide A Tab is hidden
|
|
11
|
+
* @fires tab-view:toggle
|
|
12
|
+
* @fires tab-view:adaptable-tab-bar-placement-change
|
|
13
|
+
*/
|
|
1
14
|
export class TabView extends HTMLElement {
|
|
15
|
+
#debouncedHandler;
|
|
16
|
+
#cssStyleObserver;
|
|
17
|
+
#afterTabRevealDelay = timeout();
|
|
18
|
+
#cachedAdaptableTabBarPlacement = 'bottom-bar';
|
|
19
|
+
static gatherTab(newTab) {
|
|
20
|
+
const possibleParentNs = newTab?.parentElement?.closest('navigation-stack,navigation-split-view');
|
|
21
|
+
return [possibleParentNs, newTab].filter(Boolean);
|
|
22
|
+
}
|
|
2
23
|
constructor() {
|
|
3
24
|
super();
|
|
25
|
+
this.#debouncedHandler = debounce(this.#handleSelectionChange, 1);
|
|
4
26
|
}
|
|
5
27
|
disconnectedCallback() {
|
|
6
|
-
|
|
28
|
+
if (devFlags.debug)
|
|
29
|
+
console.debug(`${_a.name} ⚡️ disconnect`);
|
|
30
|
+
this.#afterTabRevealDelay.cancel();
|
|
31
|
+
this.#cssStyleObserver?.disconnect();
|
|
32
|
+
CleanupRegistry.unregister(this);
|
|
7
33
|
}
|
|
8
|
-
|
|
9
|
-
|
|
34
|
+
get tabBarPlacement() {
|
|
35
|
+
return this.#cachedAdaptableTabBarPlacement;
|
|
10
36
|
}
|
|
11
|
-
get
|
|
12
|
-
|
|
13
|
-
return selectedTab;
|
|
37
|
+
get moreTab() {
|
|
38
|
+
return this.querySelector(':scope>navigation-stack:has(> navigation-stack,> navigation-split-view)');
|
|
14
39
|
}
|
|
15
|
-
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
|
|
40
|
+
connectedCallback() {
|
|
41
|
+
if (devFlags.debug)
|
|
42
|
+
console.debug(`${_a.name} ⚡️ connect`);
|
|
43
|
+
this.#cssStyleObserver = new CSSStyleObserver({
|
|
44
|
+
properties: ['--adaptable-tab-bar-placement-index'],
|
|
45
|
+
});
|
|
46
|
+
this.#cssStyleObserver.observe(this, this.#handleStyleChange);
|
|
47
|
+
Snapshot.waitReady.then(() => self.requestAnimationFrame(this.#handleStyleChange)); // Snapshot.waitReady.then(this.#handleStyleChange)
|
|
48
|
+
// NOTE: wait for config
|
|
49
|
+
// Snapshot.waitReady.then(() => { // FIXME: Check this removed!
|
|
50
|
+
// for (const [or, w, handler] of [
|
|
51
|
+
// ['portrait', `max-width:${Snapshot.config!['ipad-portrait-bp-max']}`, this.#handleMediaChange],
|
|
52
|
+
// ['landscape', `max-width:${Snapshot.config!['ipad-landscape-bp-max']}`, this.#handleMediaChange],
|
|
53
|
+
// ['portrait', `min-width:${Snapshot.config!['ipad-portrait-bp-min']}`, this.#handleMediaChange],
|
|
54
|
+
// ['landscape', `min-width:${Snapshot.config!['ipad-landscape-bp-min']}`, this.#handleMediaChange],
|
|
55
|
+
// ]) {
|
|
56
|
+
// const mediaQueryList = self.matchMedia(`(orientation:${or}) and (${w})`)
|
|
57
|
+
// if (mediaQueryList.matches)
|
|
58
|
+
// this.#handleMediaChange(
|
|
59
|
+
// new MediaQueryListEvent('media-change', {
|
|
60
|
+
// matches: mediaQueryList.matches,
|
|
61
|
+
// })
|
|
62
|
+
// ) // Initial check
|
|
63
|
+
// CleanupRegistry.register(this, onoff('change', handler as EventListener, mediaQueryList).on())
|
|
64
|
+
// }
|
|
65
|
+
CleanupRegistry.register(this, onoff([
|
|
66
|
+
{ types: 'tabreveal tabswap', listener: this.#debouncedHandler },
|
|
67
|
+
{ types: 'beforetabreveal beforetabswap', listener: this.#addAnimations },
|
|
68
|
+
{ types: 'tab-view:adaptable-tab-bar-placement-change', listener: this.#handleAdaptableTabBarPlacementChange },
|
|
69
|
+
{ types: 'pagereveal', listener: this.#handleTabViewPagereveal },
|
|
70
|
+
{
|
|
71
|
+
types: 'click',
|
|
72
|
+
listener: this.#handleSummaryClick,
|
|
73
|
+
},
|
|
74
|
+
], this).on());
|
|
75
|
+
// })
|
|
76
|
+
}
|
|
77
|
+
#handleSummaryClick = ({ target }) => {
|
|
78
|
+
if (!(target instanceof HTMLElement))
|
|
79
|
+
return;
|
|
80
|
+
const summary = target.closest('summary');
|
|
81
|
+
if (!summary)
|
|
82
|
+
return;
|
|
83
|
+
if (0 === $.siblings('[aria-selected=true]', summary).length)
|
|
84
|
+
return;
|
|
85
|
+
if (!summary.closest('scroll-view')?.matches('tab-view > [is=sidebar-view] > scroll-view'))
|
|
19
86
|
return;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
87
|
+
const form = summary.closest('[is=form-view]');
|
|
88
|
+
if (!form)
|
|
89
|
+
return;
|
|
90
|
+
const style = self.getComputedStyle(form);
|
|
91
|
+
if ('sidebar' !== style.getPropertyValue('--list-style'))
|
|
92
|
+
return;
|
|
93
|
+
this.#addAnimations(new CustomEvent('beforetabreveal', { detail: { tag: '', ms: cssTime(`${this.computedStyleMap().get(`--tabbar-after-tabreveal-duration`)}`) }, bubbles: true, composed: true }));
|
|
94
|
+
};
|
|
95
|
+
#handleTabViewPagereveal = (evt) => {
|
|
96
|
+
if (devFlags.debug)
|
|
97
|
+
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
98
|
+
void this.#syncBodyFace();
|
|
99
|
+
};
|
|
100
|
+
#handleStyleChange = () => {
|
|
101
|
+
if (devFlags.debug)
|
|
102
|
+
console.debug(`${_a.name} ⚡️ style`);
|
|
103
|
+
const style = self.getComputedStyle(this);
|
|
104
|
+
const placement = style.getPropertyValue('--adaptable-tab-bar-placement'), // or do it manually without any computedstyle
|
|
105
|
+
newValue = TAB_BAR_PLACEMENTS.includes(placement) ? placement : 'bottom-bar';
|
|
106
|
+
if (newValue !== this.#cachedAdaptableTabBarPlacement) {
|
|
107
|
+
const oldValue = this.#cachedAdaptableTabBarPlacement;
|
|
108
|
+
this.#cachedAdaptableTabBarPlacement = newValue;
|
|
109
|
+
this.dispatchEvent(new CustomEvent('tab-view:adaptable-tab-bar-placement-change', {
|
|
110
|
+
detail: { oldValue, newValue },
|
|
111
|
+
bubbles: true,
|
|
112
|
+
composed: true,
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
// #handleMediaChange: (evt: MediaQueryListEvent) => void = (evt) => {
|
|
117
|
+
// if (devFlags.debug) console.debug(`${TabView.name} ⚡️ ${evt?.type}`)
|
|
118
|
+
// if (!evt.matches) return
|
|
119
|
+
// this.#handleStyleChange()
|
|
120
|
+
// // if (evt.matches) {
|
|
121
|
+
// // const placement = self.getComputedStyle(this).getPropertyValue('--adaptable-tab-bar-placement'), // or do it manually without any computedstyle
|
|
122
|
+
// // newValue = (TAB_BAR_PLACEMENTS as readonly string[]).includes(placement) ? (placement as (typeof TAB_BAR_PLACEMENTS)[number]) : 'bottom-bar'
|
|
123
|
+
// // if (newValue !== this.#cachedAdaptableTabBarPlacement) {
|
|
124
|
+
// // const oldValue = this.#cachedAdaptableTabBarPlacement
|
|
125
|
+
// // this.#cachedAdaptableTabBarPlacement = newValue
|
|
126
|
+
// // this.dispatchEvent(
|
|
127
|
+
// // new CustomEvent<TabViewAdaptableTabBarPlacementDetail>('tab-view:adaptable-tab-bar-placement-change', {
|
|
128
|
+
// // detail: { oldValue, newValue },
|
|
129
|
+
// // bubbles: true,
|
|
130
|
+
// // composed: true,
|
|
131
|
+
// // })
|
|
132
|
+
// // )
|
|
133
|
+
// // }
|
|
134
|
+
// // }
|
|
135
|
+
// // // trigger more-stack (dis)allowed event
|
|
136
|
+
// // if (evt.matches !== this.#moreStackAllowed) {
|
|
137
|
+
// // this.#moreStackAllowed = evt.matches
|
|
138
|
+
// // const eventType = evt.matches ? 'tab-view:more-tab-allowed' : 'tab-view:more-tab-disallowed'
|
|
139
|
+
// // this.dispatchEvent(new CustomEvent<TabMoreStackAllowanceDetail>(eventType, { detail: { moreTab: this.moreTab }, bubbles: true, composed: true }))
|
|
140
|
+
// // }
|
|
141
|
+
// // if (evt.matches) return // no button triggers should happen, already on iphone portrait
|
|
142
|
+
// // const innerSelection = this.moreTab?.querySelector(':scope>navigation-stack:not([hidden]),:scope>navigation-split-view:not([hidden])')?.id
|
|
143
|
+
// // if (innerSelection) {
|
|
144
|
+
// // const btn = this.querySelector<HTMLButtonElement>(`[is="tab-item"][value="${CSS.escape(innerSelection)}"]`)
|
|
145
|
+
// // // NOTE: simulate btn click BU WITHOUT tabroot functionality!
|
|
146
|
+
// // if (btn) {
|
|
147
|
+
// // const newTab = this.querySelector<NavigationStack | NavigationSplitView>(`#${btn.getAttribute('value')}`)
|
|
148
|
+
// // if (newTab) {
|
|
149
|
+
// // this.selectedTab = TabView.gatherTab(newTab)
|
|
150
|
+
// // return
|
|
151
|
+
// // }
|
|
152
|
+
// // }
|
|
153
|
+
// // }
|
|
154
|
+
// // const outerSelection = this?.querySelector(':scope>navigation-stack:not([hidden]),:scope>navigation-split-view:not([hidden])')?.id
|
|
155
|
+
// // if (outerSelection && outerSelection === this.moreTab?.id) {
|
|
156
|
+
// // const btn = this.querySelector<HTMLButtonElement>(`[is="tab-item"]:not([value="${CSS.escape(outerSelection)}"])`)
|
|
157
|
+
// // // NOTE: simulate btn click BU WITHOUT tabroot functionality!
|
|
158
|
+
// // if (btn) {
|
|
159
|
+
// // const newTab = this.querySelector<NavigationStack | NavigationSplitView>(`#${btn.getAttribute('value')}`)
|
|
160
|
+
// // if (newTab) {
|
|
161
|
+
// // this.selectedTab = TabView.gatherTab(newTab)
|
|
162
|
+
// // return
|
|
163
|
+
// // }
|
|
164
|
+
// // }
|
|
165
|
+
// // }
|
|
166
|
+
// }
|
|
167
|
+
#handleAdaptableTabBarPlacementChange = (evt) => {
|
|
168
|
+
if (devFlags.debug)
|
|
169
|
+
console.debug(`${_a.name} ⚡️ ${evt?.type}`);
|
|
170
|
+
if ('bottom-bar' !== evt.detail.oldValue)
|
|
171
|
+
return; // button triggers should happen, ONLY when going FROM bottom-bar TO anything else
|
|
172
|
+
const innerSelection = this.moreTab?.querySelector(':scope>navigation-stack:not([hidden]),:scope>navigation-split-view:not([hidden])')?.id;
|
|
173
|
+
if (innerSelection) {
|
|
174
|
+
const btn = this.querySelector(`[is="tab-item"][value="${CSS.escape(innerSelection)}"]`);
|
|
175
|
+
// NOTE: simulate btn click BU WITHOUT tabroot functionality!
|
|
176
|
+
if (btn) {
|
|
177
|
+
const newTab = this.querySelector(`#${btn.getAttribute('value')}`);
|
|
178
|
+
if (newTab) {
|
|
179
|
+
this.selectedTab = _a.gatherTab(newTab);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const outerSelection = this?.querySelector(':scope>navigation-stack:not([hidden]),:scope>navigation-split-view:not([hidden])')?.id;
|
|
185
|
+
if (outerSelection && outerSelection === this.moreTab?.id) {
|
|
186
|
+
const btn = this.querySelector(`[is="tab-item"]:not([value="${CSS.escape(outerSelection)}"])`);
|
|
187
|
+
// NOTE: simulate btn click BU WITHOUT tabroot functionality!
|
|
188
|
+
if (btn) {
|
|
189
|
+
const newTab = this.querySelector(`#${btn.getAttribute('value')}`);
|
|
190
|
+
if (newTab) {
|
|
191
|
+
this.selectedTab = _a.gatherTab(newTab);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
25
195
|
}
|
|
26
|
-
|
|
27
|
-
|
|
196
|
+
};
|
|
197
|
+
get selectedTab() {
|
|
198
|
+
// return this.querySelector<NavigationStack | NavigationSplitView>(':scope>navigation-stack:not([hidden]),:scope>navigation-split-view:not([hidden])')
|
|
199
|
+
return [...this.querySelectorAll('navigation-stack:not([hidden]),navigation-split-view:not([hidden])')];
|
|
28
200
|
}
|
|
201
|
+
set selectedTab(tabs) {
|
|
202
|
+
const valid = [...tabs].every((el, i, arr) => !i || arr[i - 1].contains(el));
|
|
203
|
+
if (0 === tabs.length)
|
|
204
|
+
throw new Error('Element not found');
|
|
205
|
+
if (!valid)
|
|
206
|
+
throw new Error('selectedTab[] must be in order of parent>child. You provided an element that contains the previous sibling.');
|
|
207
|
+
//
|
|
208
|
+
const selectors = [':not(:is(:scope>{{tag}}))', ':is(:scope>{{tag}})']; // first nested ones, then root ones
|
|
209
|
+
const ms = cssTime(`${this.computedStyleMap().get(`--tabbar-after-tabreveal-duration`)}`);
|
|
210
|
+
for (const selector of selectors)
|
|
211
|
+
for (const ns of this.querySelectorAll(`navigation-stack:not([hidden])${selector.replace('{{tag}}', 'navigation-stack')},navigation-split-view:not([hidden])${selector.replace('{{tag}}', 'navigation-split-view')}`)) {
|
|
212
|
+
if (!tabs.some((tab) => !ns.contains(tab)))
|
|
213
|
+
continue; // shouldRun
|
|
214
|
+
ns.dispatchEvent(new CustomEvent('beforetabswap', { detail: { tag: ns.id, ms }, bubbles: true, composed: true }));
|
|
215
|
+
ns.hidden = true; // triggers
|
|
216
|
+
}
|
|
217
|
+
for (const selector of selectors.reverse())
|
|
218
|
+
for (const ns of this.querySelectorAll(`navigation-stack[hidden]${selector.replace('{{tag}}', 'navigation-stack')},navigation-split-view[hidden]${selector.replace('{{tag}}', 'navigation-split-view')}`)) {
|
|
219
|
+
if (!tabs.some((tab) => ns.contains(tab)))
|
|
220
|
+
continue; // shouldRun
|
|
221
|
+
ns.dispatchEvent(new CustomEvent('beforetabreveal', { detail: { tag: ns.id, ms }, bubbles: true, composed: true }));
|
|
222
|
+
ns.hidden = false; // triggers
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
#addAnimations = (evt) => {
|
|
226
|
+
this.setAttribute('js-aftertabreveal', '');
|
|
227
|
+
// const ms = cssTime(`${this.computedStyleMap().get(`--tabbar-after-tabreveal-duration`)}`)
|
|
228
|
+
this.#afterTabRevealDelay.next(() => {
|
|
229
|
+
this.removeAttribute('js-aftertabreveal');
|
|
230
|
+
}, evt.detail.ms);
|
|
231
|
+
};
|
|
232
|
+
#handleSelectionChange = (evt) => {
|
|
233
|
+
this.#triggerToggleEvent(evt);
|
|
234
|
+
};
|
|
235
|
+
#triggerToggleEvent = (evt) => {
|
|
236
|
+
const eventType = 'tab-view:toggle';
|
|
237
|
+
void this.#syncBodyFace();
|
|
238
|
+
if (devFlags.debug)
|
|
239
|
+
console.debug(`${_a.name} 💡 ${eventType}`);
|
|
240
|
+
this.dispatchEvent(new CustomEvent(eventType, { detail: { selection: this.selectedTab }, bubbles: true, composed: true }));
|
|
241
|
+
};
|
|
242
|
+
#syncBodyFace = async () => {
|
|
243
|
+
if (!(await frame(this)))
|
|
244
|
+
return;
|
|
245
|
+
const tab = this.selectedTab.at(-1), //event.detail.selection.at(-1), //document.querySelector(`#${}`),
|
|
246
|
+
path = new NavigationPath(tab), sv = [path, ...path.children()]
|
|
247
|
+
.filter((item) => item.component?.matches(':not(dialog)'))
|
|
248
|
+
.map((item) => item.body)
|
|
249
|
+
.filter(Boolean)
|
|
250
|
+
.at(-1); //queryBodyAll(tab).at(-1)
|
|
251
|
+
if (!sv)
|
|
252
|
+
return;
|
|
253
|
+
// const style = self.getComputedStyle(sv),
|
|
254
|
+
// hostStyle = self.getComputedStyle(document.documentElement)
|
|
255
|
+
// console.log(999, tab, style.getPropertyValue('--face'), hostStyle.getPropertyValue('--face'))
|
|
256
|
+
if (!sv.style.getPropertyValue('--face'))
|
|
257
|
+
return document.body.style.removeProperty('--face');
|
|
258
|
+
// if (style.getPropertyValue('--face') === hostStyle.getPropertyValue('--face'))
|
|
259
|
+
document.body.style.setProperty('--face', sv.style.getPropertyValue('--face'));
|
|
260
|
+
// if (tab?.matches('tab-view>navigation-stack>:scope')) return document.body.style.setProperty('--face', style.getPropertyValue('--face'))
|
|
261
|
+
// if (tab?.matches('tab-view>:scope')) return document.body.style.setProperty('--face', style.getPropertyValue('--face'))
|
|
262
|
+
};
|
|
29
263
|
}
|
|
264
|
+
_a = TabView;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @summary Display selectable, sortable data arranged in rows and columns.
|
|
3
|
+
*
|
|
4
|
+
* @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template - Sets the template areas when the table is in compact mode
|
|
5
|
+
*/
|
|
6
|
+
export declare class TableView extends HTMLElement {
|
|
7
|
+
#private;
|
|
8
|
+
static get template(): DocumentFragment;
|
|
9
|
+
constructor();
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
|
+
import { CSSStyleObserver } from '../internal/class/css-style-observer';
|
|
4
|
+
import { MutationObserverSet } from '../internal/class/mutation-observer-set';
|
|
5
|
+
import { $, devFlags, listActive, onoff, renderLabelTitle } from '../internal/utils';
|
|
6
|
+
import { Snapshot } from '../snapshot';
|
|
7
|
+
/**
|
|
8
|
+
* @summary Display selectable, sortable data arranged in rows and columns.
|
|
9
|
+
*
|
|
10
|
+
* @attr {title:trailing:subtitle|trailing:title:subtitle|title:subtitle:trailing|*} preferred-compact-template - Sets the template areas when the table is in compact mode
|
|
11
|
+
*/
|
|
12
|
+
export class TableView extends HTMLElement {
|
|
13
|
+
#styleObserver;
|
|
14
|
+
#compactToolbarItem;
|
|
15
|
+
static #template;
|
|
16
|
+
static get template() {
|
|
17
|
+
return (this.#template ??= $(String.raw `
|
|
18
|
+
<div part="root table-container">
|
|
19
|
+
<div part="root table-header-stack">
|
|
20
|
+
<div part="root table-header-leading-stack">
|
|
21
|
+
<slot name="header-leading"></slot>
|
|
22
|
+
</div>
|
|
23
|
+
<div part="root table-header-principal-stack">
|
|
24
|
+
<slot name="header-principal"></slot>
|
|
25
|
+
</div>
|
|
26
|
+
<div part="root table-header-trailing-stack">
|
|
27
|
+
<slot name="header-trailing"></slot>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div part="root table-column-stack">
|
|
31
|
+
<slot name="column"></slot>
|
|
32
|
+
</div>
|
|
33
|
+
<slot><p>empty</p></slot>
|
|
34
|
+
<div part="root table-footer-stack">
|
|
35
|
+
<div part="root table-footer-leading-stack">
|
|
36
|
+
<slot name="footer-leading"></slot>
|
|
37
|
+
</div>
|
|
38
|
+
<div part="root table-footer-principal-stack">
|
|
39
|
+
<slot name="footer-principal"></slot>
|
|
40
|
+
</div>
|
|
41
|
+
<div part="root table-footer-trailing-stack">
|
|
42
|
+
<slot name="footer-trailing"></slot>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>`));
|
|
46
|
+
}
|
|
47
|
+
#shadowRoot;
|
|
48
|
+
#slots = new Map();
|
|
49
|
+
constructor() {
|
|
50
|
+
super();
|
|
51
|
+
this.#shadowRoot = this.attachShadow({ mode: 'closed' });
|
|
52
|
+
this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
|
|
53
|
+
for (const slot of this.#shadowRoot.querySelectorAll('slot'))
|
|
54
|
+
this.#slots?.set(slot.name, slot);
|
|
55
|
+
CleanupRegistry.register(this, () => {
|
|
56
|
+
this.#slots = new Map();
|
|
57
|
+
});
|
|
58
|
+
this.#slots?.get('column')?.addEventListener('slotchange', this.#handleColumnSlotchange);
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
if (devFlags.debug)
|
|
62
|
+
console.debug(`${_a.name} ⚡️ disconnect`);
|
|
63
|
+
CleanupRegistry.unregister(this);
|
|
64
|
+
this.#styleObserver?.disconnect();
|
|
65
|
+
this.#observers.unobserveAll();
|
|
66
|
+
this.#compactToolbarItem = undefined;
|
|
67
|
+
}
|
|
68
|
+
connectedCallback() {
|
|
69
|
+
if (devFlags.debug)
|
|
70
|
+
console.debug(`${_a.name} ⚡️ connect`);
|
|
71
|
+
CleanupRegistry.register(this, onoff(listActive(this), this).on());
|
|
72
|
+
this.#styleObserver = new CSSStyleObserver({
|
|
73
|
+
properties: ['--adaptable-table-style-index'],
|
|
74
|
+
});
|
|
75
|
+
const target = this.#shadowRoot.querySelector('[part*=table-container]') ?? undefined;
|
|
76
|
+
if (!target)
|
|
77
|
+
return;
|
|
78
|
+
this.#styleObserver.observe(target, this.#handleStyleChange);
|
|
79
|
+
Snapshot.waitReady.then(() => self.requestAnimationFrame(this.#handleStyleChange));
|
|
80
|
+
}
|
|
81
|
+
#handleColumnSlotchange = ({ type, target: slot }) => {
|
|
82
|
+
if (devFlags.debug)
|
|
83
|
+
console.debug(`${_a.name} ⚡️ ${type}`);
|
|
84
|
+
if (!(slot instanceof HTMLSlotElement))
|
|
85
|
+
return;
|
|
86
|
+
const assigned = slot.assignedElements();
|
|
87
|
+
this.#observers.syncObservations(assigned);
|
|
88
|
+
// if (0 < assigned.length)
|
|
89
|
+
this.#renderColumns([]);
|
|
90
|
+
};
|
|
91
|
+
#renderColumns = (entries) => {
|
|
92
|
+
if (devFlags.debug)
|
|
93
|
+
console.debug(`${_a.name} ⚡️ mutation`);
|
|
94
|
+
if (!this.#compactToolbarItem) {
|
|
95
|
+
this.#compactToolbarItem = $(`<menu-view tabindex="0" slot="header-trailing"></menu-view>`, '>1');
|
|
96
|
+
CleanupRegistry.unregister(this, 'compact_toolbar');
|
|
97
|
+
CleanupRegistry.register(this, onoff('click', this.#handleMenuClick, this.#compactToolbarItem).on(), 'compact_toolbar');
|
|
98
|
+
}
|
|
99
|
+
this.#compactToolbarItem.innerHTML = `<label-view slot="label" system-image="dots-three"></label-view>`;
|
|
100
|
+
for (const node of this.#slots?.get('column')?.assignedElements({ flatten: true }) ?? []) {
|
|
101
|
+
if (!node.matches('[is=table-column]'))
|
|
102
|
+
continue;
|
|
103
|
+
const btn = $(`<button type="button" tabindex="0">
|
|
104
|
+
<v-stack spacing="0" alignment="leading">
|
|
105
|
+
<label-view></label-view>
|
|
106
|
+
<label-view font="callout" foreground="secondary"></label-view>
|
|
107
|
+
</v-stack>
|
|
108
|
+
</button>`, '>1'), title = btn.querySelector('label-view:first-child'), subTitle = btn.querySelector('label-view:last-child');
|
|
109
|
+
if (title)
|
|
110
|
+
renderLabelTitle(title, node.textContent.trim()); //title?.setAttribute('title', node.textContent.trim())
|
|
111
|
+
if (subTitle)
|
|
112
|
+
renderLabelTitle(subTitle, node.ariaSort ?? ''); //subTitle?.setAttribute('title', node.ariaSort ?? '')
|
|
113
|
+
this.#compactToolbarItem.appendChild(btn);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
#observers = new MutationObserverSet(this.#renderColumns);
|
|
117
|
+
#handleStyleChange = () => {
|
|
118
|
+
if (devFlags.debug)
|
|
119
|
+
console.debug(`${_a.name} ⚡️ style`);
|
|
120
|
+
const target = this.#shadowRoot.querySelector('[part*=table-container]') ?? undefined;
|
|
121
|
+
if (!target)
|
|
122
|
+
return;
|
|
123
|
+
const style = self.getComputedStyle(target);
|
|
124
|
+
const adaptableTableStyle = style.getPropertyValue('--adaptable-table-style') || 'compact';
|
|
125
|
+
switch (adaptableTableStyle) {
|
|
126
|
+
case 'expanded':
|
|
127
|
+
if (this.#compactToolbarItem?.isConnected)
|
|
128
|
+
this.#compactToolbarItem?.remove();
|
|
129
|
+
break;
|
|
130
|
+
default:
|
|
131
|
+
if (!this.#compactToolbarItem)
|
|
132
|
+
break;
|
|
133
|
+
if (!this.#slots
|
|
134
|
+
?.get('column')
|
|
135
|
+
?.assignedElements()
|
|
136
|
+
.filter((el) => el.matches(':is(button[is=table-column])')).length)
|
|
137
|
+
break;
|
|
138
|
+
if (!this.#compactToolbarItem?.isConnected)
|
|
139
|
+
this.insertAdjacentElement('beforeend', this.#compactToolbarItem);
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
#handleMenuClick = ({ target }) => {
|
|
144
|
+
if (!(target instanceof HTMLElement))
|
|
145
|
+
return;
|
|
146
|
+
const btn = target.closest('button');
|
|
147
|
+
if (!btn)
|
|
148
|
+
return;
|
|
149
|
+
const siblings = [...(btn.parentNode?.querySelectorAll(':scope>button') ?? [])], index = siblings.indexOf(btn);
|
|
150
|
+
this.querySelector(`:scope>[slot=column]:nth-of-type(${index + 1})`)?.click();
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
_a = TableView;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FormAssociatedBase } from '../internal/class/form-associated-base';
|
|
2
|
+
declare const keyboardTypes: readonly ["decimal-pad", "number-pad", "default"];
|
|
3
|
+
export type KeyboardType = (typeof keyboardTypes)[number];
|
|
4
|
+
/**
|
|
5
|
+
* @slot label
|
|
6
|
+
* @slot validity-options
|
|
7
|
+
*/
|
|
8
|
+
export declare class TextField extends FormAssociatedBase {
|
|
9
|
+
#private;
|
|
10
|
+
static get observedAttributes(): string[];
|
|
11
|
+
static get template(): DocumentFragment;
|
|
12
|
+
constructor();
|
|
13
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
14
|
+
disconnectedCallback(): void;
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
get keyboardType(): KeyboardType;
|
|
17
|
+
get text(): string;
|
|
18
|
+
set text(v: string);
|
|
19
|
+
get name(): string;
|
|
20
|
+
get value(): string;
|
|
21
|
+
get valueAsNumber(): number | "";
|
|
22
|
+
get negativeNumbersAllowed(): boolean;
|
|
23
|
+
setValidity: (flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement) => void;
|
|
24
|
+
setCustomValidity: (message: string) => void;
|
|
25
|
+
formAssociatedCallback: (form: HTMLFormElement) => void;
|
|
26
|
+
formDisabledCallback: (disabled: boolean) => void;
|
|
27
|
+
formResetCallback: () => void;
|
|
28
|
+
}
|
|
29
|
+
export {};
|