wj-elements 0.7.7 → 0.8.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/dist/animations.js +28 -51
- package/dist/animations.js.map +1 -1
- package/dist/base-path.js +19 -31
- package/dist/base-path.js.map +1 -1
- package/dist/custom-elements.json +11504 -11499
- package/dist/dark.css +1 -302
- package/dist/date.js +16 -36
- package/dist/date.js.map +1 -1
- package/dist/element-utils.js +20 -81
- package/dist/element-utils.js.map +1 -1
- package/dist/event.js +49 -165
- package/dist/event.js.map +1 -1
- package/dist/form-associated-element-BjeJn7j8.js +101 -0
- package/dist/{form-associated-element-DEQ4y-jn.js.map → form-associated-element-BjeJn7j8.js.map} +1 -1
- package/dist/icon-DmsqtDpL.js +102 -0
- package/dist/{icon-CReYMzAK.js.map → icon-DmsqtDpL.js.map} +1 -1
- package/dist/light.css +1 -731
- package/dist/localize.js +36 -111
- package/dist/localize.js.map +1 -1
- package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +3 -2
- package/dist/permissions.js +14 -41
- package/dist/permissions.js.map +1 -1
- package/dist/popup.element-CbkhthPP.js +806 -0
- package/dist/{popup.element-CwXvVFK7.js.map → popup.element-CbkhthPP.js.map} +1 -1
- package/dist/router-links-CNsJ-elb.js +105 -0
- package/dist/{router-links-wjqCnncc.js.map → router-links-CNsJ-elb.js.map} +1 -1
- package/dist/skeleton.css +1 -197
- package/dist/styles.css +1 -866
- package/dist/universal-service.js +48 -109
- package/dist/universal-service.js.map +1 -1
- package/dist/utils.js +11 -18
- package/dist/utils.js.map +1 -1
- package/dist/web-types.json +760 -760
- package/dist/wje-accordion-item.js +33 -106
- package/dist/wje-accordion-item.js.map +1 -1
- package/dist/wje-accordion.js +19 -84
- package/dist/wje-accordion.js.map +1 -1
- package/dist/wje-animation.js +37 -4258
- package/dist/wje-animation.js.map +1 -1
- package/dist/wje-aside.js +9 -34
- package/dist/wje-aside.js.map +1 -1
- package/dist/wje-avatar.js +36 -126
- package/dist/wje-avatar.js.map +1 -1
- package/dist/wje-badge.js +10 -52
- package/dist/wje-badge.js.map +1 -1
- package/dist/wje-breadcrumb.js +205 -672
- package/dist/wje-breadcrumb.js.map +1 -1
- package/dist/wje-breadcrumbs.js +177 -633
- package/dist/wje-breadcrumbs.js.map +1 -1
- package/dist/wje-button-group.js +48 -153
- package/dist/wje-button-group.js.map +1 -1
- package/dist/wje-button.js +92 -413
- package/dist/wje-button.js.map +1 -1
- package/dist/wje-card-content.js +7 -30
- package/dist/wje-card-content.js.map +1 -1
- package/dist/wje-card-controls.js +7 -30
- package/dist/wje-card-controls.js.map +1 -1
- package/dist/wje-card-header.js +7 -30
- package/dist/wje-card-header.js.map +1 -1
- package/dist/wje-card-subtitle.js +7 -34
- package/dist/wje-card-subtitle.js.map +1 -1
- package/dist/wje-card-title.js +7 -34
- package/dist/wje-card-title.js.map +1 -1
- package/dist/wje-card.js +15 -71
- package/dist/wje-card.js.map +1 -1
- package/dist/wje-carousel-item.js +12 -56
- package/dist/wje-carousel-item.js.map +1 -1
- package/dist/wje-carousel.js +154 -509
- package/dist/wje-carousel.js.map +1 -1
- package/dist/wje-checkbox.js +50 -227
- package/dist/wje-checkbox.js.map +1 -1
- package/dist/wje-chip.js +43 -160
- package/dist/wje-chip.js.map +1 -1
- package/dist/wje-col.js +7 -20
- package/dist/wje-col.js.map +1 -1
- package/dist/wje-color-picker.js +445 -1464
- package/dist/wje-color-picker.js.map +1 -1
- package/dist/wje-container.js +9 -35
- package/dist/wje-container.js.map +1 -1
- package/dist/wje-copy-button.js +64 -204
- package/dist/wje-copy-button.js.map +1 -1
- package/dist/wje-dialog.js +85 -553
- package/dist/wje-dialog.js.map +1 -1
- package/dist/wje-divider.js +7 -34
- package/dist/wje-divider.js.map +1 -1
- package/dist/wje-dropdown.js +78 -305
- package/dist/wje-dropdown.js.map +1 -1
- package/dist/wje-element.js +191 -700
- package/dist/wje-element.js.map +1 -1
- package/dist/wje-file-upload-item.js +51 -156
- package/dist/wje-file-upload-item.js.map +1 -1
- package/dist/wje-file-upload.js +181 -619
- package/dist/wje-file-upload.js.map +1 -1
- package/dist/wje-footer.js +7 -31
- package/dist/wje-footer.js.map +1 -1
- package/dist/wje-form.js +7 -32
- package/dist/wje-form.js.map +1 -1
- package/dist/wje-format-digital.js +26 -118
- package/dist/wje-format-digital.js.map +1 -1
- package/dist/wje-grid.js +7 -33
- package/dist/wje-grid.js.map +1 -1
- package/dist/wje-header.js +9 -35
- package/dist/wje-header.js.map +1 -1
- package/dist/wje-icon-library.js +12 -18
- package/dist/wje-icon-library.js.map +1 -1
- package/dist/wje-icon-picker.js +65 -320
- package/dist/wje-icon-picker.js.map +1 -1
- package/dist/wje-icon.js +1 -1
- package/dist/wje-img-comparer.js +37 -114
- package/dist/wje-img-comparer.js.map +1 -1
- package/dist/wje-img.js +50 -198
- package/dist/wje-img.js.map +1 -1
- package/dist/wje-infinite-scroll.js +94 -346
- package/dist/wje-infinite-scroll.js.map +1 -1
- package/dist/wje-input-file.js +23 -84
- package/dist/wje-input-file.js.map +1 -1
- package/dist/wje-input.js +78 -392
- package/dist/wje-input.js.map +1 -1
- package/dist/wje-item.js +11 -64
- package/dist/wje-item.js.map +1 -1
- package/dist/wje-kanban.js +124 -401
- package/dist/wje-kanban.js.map +1 -1
- package/dist/wje-label.js +9 -32
- package/dist/wje-label.js.map +1 -1
- package/dist/wje-level-indicator.js +38 -157
- package/dist/wje-level-indicator.js.map +1 -1
- package/dist/wje-list.js +10 -40
- package/dist/wje-list.js.map +1 -1
- package/dist/wje-main.js +7 -31
- package/dist/wje-main.js.map +1 -1
- package/dist/wje-masonry.js +66 -211
- package/dist/wje-masonry.js.map +1 -1
- package/dist/wje-master.js +45 -161
- package/dist/wje-master.js.map +1 -1
- package/dist/wje-menu-button.js +10 -38
- package/dist/wje-menu-button.js.map +1 -1
- package/dist/wje-menu-item.js +127 -577
- package/dist/wje-menu-item.js.map +1 -1
- package/dist/wje-menu-label.js +9 -35
- package/dist/wje-menu-label.js.map +1 -1
- package/dist/wje-menu.js +14 -49
- package/dist/wje-menu.js.map +1 -1
- package/dist/wje-option.js +48 -279
- package/dist/wje-option.js.map +1 -1
- package/dist/wje-options.js +130 -384
- package/dist/wje-options.js.map +1 -1
- package/dist/wje-orgchart-group.js +16 -52
- package/dist/wje-orgchart-group.js.map +1 -1
- package/dist/wje-orgchart-item.js +24 -93
- package/dist/wje-orgchart-item.js.map +1 -1
- package/dist/wje-orgchart.js +18 -68
- package/dist/wje-orgchart.js.map +1 -1
- package/dist/wje-pagination.js +113 -397
- package/dist/wje-pagination.js.map +1 -1
- package/dist/wje-popup.js +3 -3
- package/dist/wje-popup.js.map +1 -1
- package/dist/wje-progress-bar.js +53 -205
- package/dist/wje-progress-bar.js.map +1 -1
- package/dist/wje-qr-code.js +398 -2980
- package/dist/wje-qr-code.js.map +1 -1
- package/dist/wje-radio-group.js +52 -190
- package/dist/wje-radio-group.js.map +1 -1
- package/dist/wje-radio.js +24 -118
- package/dist/wje-radio.js.map +1 -1
- package/dist/wje-rate.js +62 -266
- package/dist/wje-rate.js.map +1 -1
- package/dist/wje-relative-time.js +24 -99
- package/dist/wje-relative-time.js.map +1 -1
- package/dist/wje-reorder-dropzone.js +9 -31
- package/dist/wje-reorder-dropzone.js.map +1 -1
- package/dist/wje-reorder-handle.js +67 -204
- package/dist/wje-reorder-handle.js.map +1 -1
- package/dist/wje-reorder-item.js +14 -44
- package/dist/wje-reorder-item.js.map +1 -1
- package/dist/wje-reorder.js +61 -246
- package/dist/wje-reorder.js.map +1 -1
- package/dist/wje-route.js +6 -24
- package/dist/wje-route.js.map +1 -1
- package/dist/wje-router-link.js +11 -39
- package/dist/wje-router-link.js.map +1 -1
- package/dist/wje-router-outlet.js +76 -172
- package/dist/wje-router-outlet.js.map +1 -1
- package/dist/wje-routerx.js +537 -1331
- package/dist/wje-routerx.js.map +1 -1
- package/dist/wje-row.js +9 -31
- package/dist/wje-row.js.map +1 -1
- package/dist/wje-select.js +326 -1152
- package/dist/wje-select.js.map +1 -1
- package/dist/wje-slider.js +44 -225
- package/dist/wje-slider.js.map +1 -1
- package/dist/wje-sliding-container.js +295 -1319
- package/dist/wje-sliding-container.js.map +1 -1
- package/dist/wje-split-view.js +35 -121
- package/dist/wje-split-view.js.map +1 -1
- package/dist/wje-status.js +14 -45
- package/dist/wje-status.js.map +1 -1
- package/dist/wje-step.js +9 -32
- package/dist/wje-step.js.map +1 -1
- package/dist/wje-stepper.js +109 -357
- package/dist/wje-stepper.js.map +1 -1
- package/dist/wje-store.js +67 -360
- package/dist/wje-store.js.map +1 -1
- package/dist/wje-tab-group.js +85 -314
- package/dist/wje-tab-group.js.map +1 -1
- package/dist/wje-tab-panel.js +7 -28
- package/dist/wje-tab-panel.js.map +1 -1
- package/dist/wje-tab.js +21 -198
- package/dist/wje-tab.js.map +1 -1
- package/dist/wje-textarea.js +64 -264
- package/dist/wje-textarea.js.map +1 -1
- package/dist/wje-thumbnail.js +10 -51
- package/dist/wje-thumbnail.js.map +1 -1
- package/dist/wje-toast.js +127 -632
- package/dist/wje-toast.js.map +1 -1
- package/dist/wje-toggle.js +52 -177
- package/dist/wje-toggle.js.map +1 -1
- package/dist/wje-toolbar-action.js +128 -456
- package/dist/wje-toolbar-action.js.map +1 -1
- package/dist/wje-toolbar.js +75 -270
- package/dist/wje-toolbar.js.map +1 -1
- package/dist/wje-tooltip.js +50 -161
- package/dist/wje-tooltip.js.map +1 -1
- package/dist/wje-tree-item.js +70 -301
- package/dist/wje-tree-item.js.map +1 -1
- package/dist/wje-tree.js +145 -489
- package/dist/wje-tree.js.map +1 -1
- package/dist/wje-visually-hidden.js +7 -34
- package/dist/wje-visually-hidden.js.map +1 -1
- package/package.json +3 -2
- package/dist/form-associated-element-DEQ4y-jn.js +0 -245
- package/dist/icon-CReYMzAK.js +0 -245
- package/dist/popup.element-CwXvVFK7.js +0 -2133
- package/dist/router-links-wjqCnncc.js +0 -156
|
@@ -1,534 +1,206 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const _ToolbarAction = class _ToolbarAction extends WJElement {
|
|
7
|
-
/**
|
|
8
|
-
* Creates an instance of ToolbarAction.
|
|
9
|
-
*/
|
|
4
|
+
import e from "./wje-element.js";
|
|
5
|
+
const _t = class _t extends e {
|
|
10
6
|
constructor() {
|
|
11
7
|
super();
|
|
12
|
-
/**
|
|
13
|
-
* The class name for the component.
|
|
14
|
-
* @type {string}
|
|
15
|
-
*/
|
|
16
8
|
__publicField(this, "className", "ToolbarAction");
|
|
17
|
-
this._managedHiddenActions = /* @__PURE__ */ new WeakSet();
|
|
18
|
-
|
|
19
|
-
this._managedOverflowNodes = /* @__PURE__ */ new WeakSet();
|
|
20
|
-
this._overflowRetryFrame = null;
|
|
21
|
-
this._applyOverflowFrame = null;
|
|
22
|
-
this._observedDropdown = null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Returns the CSS stylesheet for the component.
|
|
26
|
-
* @static
|
|
27
|
-
* @returns {CSSStyleSheet} The CSS stylesheet
|
|
28
|
-
*/
|
|
9
|
+
this._managedHiddenActions = /* @__PURE__ */ new WeakSet(), this._isCollapsedByBreakpoint = null, this._managedOverflowNodes = /* @__PURE__ */ new WeakSet(), this._overflowRetryFrame = null, this._applyOverflowFrame = null, this._observedDropdown = null;
|
|
10
|
+
}
|
|
29
11
|
static get cssStyleSheet() {
|
|
30
|
-
return
|
|
12
|
+
return ":host{--wje-toolbar-action-breakpoint-sm: 576px;--wje-toolbar-action-breakpoint-md: 768px;--wje-toolbar-action-breakpoint-lg: 992px;--wje-toolbar-action-breakpoint-xl: 1200px;--wje-toolbar-action-breakpoint-2xl: 1450px;--wje-toolbar-action-breakpoint-xxl: 1450px}:host .native-toolbar-action{display:flex;align-items:center;gap:var(--wje-toolbar-action-gap)}:host .toolbar-action-more{flex:0 0 auto}";
|
|
31
13
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Returns the list of observed attributes.
|
|
34
|
-
* @static
|
|
35
|
-
* @returns {Array} An empty array
|
|
36
|
-
*/
|
|
37
14
|
static get observedAttributes() {
|
|
38
15
|
return ["breakpoint", "max-items", "visible-items"];
|
|
39
16
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
set breakpoint(value) {
|
|
45
|
-
if (value) this.setAttribute("breakpoint", value);
|
|
46
|
-
else this.removeAttribute("breakpoint");
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Gets the collapse breakpoint token or value.
|
|
50
|
-
* @returns {string}
|
|
51
|
-
*/
|
|
17
|
+
set breakpoint(e2) {
|
|
18
|
+
e2 ? this.setAttribute("breakpoint", e2) : this.removeAttribute("breakpoint");
|
|
19
|
+
}
|
|
52
20
|
get breakpoint() {
|
|
53
21
|
return this.getAttribute("breakpoint") || "";
|
|
54
22
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*/
|
|
59
|
-
set maxItems(value) {
|
|
60
|
-
this.setAttribute("max-items", value || 0);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Gets the maximum number of visible actions.
|
|
64
|
-
* @returns {number}
|
|
65
|
-
*/
|
|
23
|
+
set maxItems(e2) {
|
|
24
|
+
this.setAttribute("max-items", e2 || 0);
|
|
25
|
+
}
|
|
66
26
|
get maxItems() {
|
|
67
27
|
return +this.getAttribute("max-items") || 0;
|
|
68
28
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
* @param {number|string} value The visible action count.
|
|
72
|
-
*/
|
|
73
|
-
set visibleItems(value) {
|
|
74
|
-
if (value === null || value === void 0 || value === "") {
|
|
75
|
-
this.removeAttribute("visible-items");
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
this.setAttribute("visible-items", value);
|
|
29
|
+
set visibleItems(e2) {
|
|
30
|
+
null != e2 && "" !== e2 ? this.setAttribute("visible-items", e2) : this.removeAttribute("visible-items");
|
|
79
31
|
}
|
|
80
|
-
/**
|
|
81
|
-
* Gets the responsive visible action count.
|
|
82
|
-
* @returns {number|null}
|
|
83
|
-
*/
|
|
84
32
|
get visibleItems() {
|
|
85
33
|
if (!this.hasAttribute("visible-items")) return null;
|
|
86
|
-
const
|
|
87
|
-
return Number.isFinite(
|
|
34
|
+
const e2 = +this.getAttribute("visible-items");
|
|
35
|
+
return Number.isFinite(e2) ? e2 : null;
|
|
88
36
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Sets up the attributes for the component.
|
|
91
|
-
*/
|
|
92
37
|
setupAttributes() {
|
|
93
38
|
this.isShadowRoot = "open";
|
|
94
39
|
}
|
|
95
|
-
/**
|
|
96
|
-
* Draws the component for the toolbar action.
|
|
97
|
-
* @returns {object} Document fragment
|
|
98
|
-
*/
|
|
99
40
|
draw() {
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
let
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
dropdown.hidden = true;
|
|
110
|
-
let trigger = document.createElement("wje-button");
|
|
111
|
-
trigger.setAttribute("slot", "trigger");
|
|
112
|
-
trigger.setAttribute("fill", "link");
|
|
113
|
-
trigger.setAttribute("label", "Show more actions");
|
|
114
|
-
trigger.innerHTML = '<wje-icon name="dots"></wje-icon>';
|
|
115
|
-
let menu = document.createElement("wje-menu");
|
|
116
|
-
menu.setAttribute("variant", "context");
|
|
117
|
-
dropdown.append(trigger, menu);
|
|
118
|
-
element.appendChild(slot);
|
|
119
|
-
element.appendChild(dropdown);
|
|
120
|
-
fragment.appendChild(element);
|
|
121
|
-
this.defaultSlot = slot;
|
|
122
|
-
this.native = element;
|
|
123
|
-
this.moreDropdown = dropdown;
|
|
124
|
-
this.moreMenu = menu;
|
|
125
|
-
return fragment;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Applies the current visible action limit after the component is drawn.
|
|
129
|
-
*/
|
|
41
|
+
let e2 = document.createDocumentFragment(), t2 = document.createElement("slot"), i = document.createElement("div");
|
|
42
|
+
i.setAttribute("part", "native"), i.classList.add("native-toolbar-action");
|
|
43
|
+
let o = document.createElement("wje-dropdown");
|
|
44
|
+
o.setAttribute("placement", "bottom-end"), o.setAttribute("collapsible", ""), o.classList.add("toolbar-action-more"), o.hidden = true;
|
|
45
|
+
let r = document.createElement("wje-button");
|
|
46
|
+
r.setAttribute("slot", "trigger"), r.setAttribute("fill", "link"), r.setAttribute("label", "Show more actions"), r.innerHTML = '<wje-icon name="dots"></wje-icon>';
|
|
47
|
+
let n = document.createElement("wje-menu");
|
|
48
|
+
return n.setAttribute("variant", "context"), o.append(r, n), i.appendChild(t2), i.appendChild(o), e2.appendChild(i), this.defaultSlot = t2, this.native = i, this.moreDropdown = o, this.moreMenu = n, e2;
|
|
49
|
+
}
|
|
130
50
|
afterDraw() {
|
|
131
51
|
var _a;
|
|
132
52
|
this.onSlotChange = () => {
|
|
133
|
-
this.observeExistingDropdown();
|
|
134
|
-
|
|
135
|
-
};
|
|
136
|
-
(_a = this.defaultSlot) == null ? void 0 : _a.addEventListener("slotchange", this.onSlotChange);
|
|
137
|
-
this.handleResize = () => this.handleBreakpointResize();
|
|
138
|
-
if (this.getBreakpointWidth()) {
|
|
139
|
-
window.addEventListener("resize", this.handleResize);
|
|
140
|
-
}
|
|
141
|
-
this.observeExistingDropdown();
|
|
142
|
-
this.scheduleOverflow(true);
|
|
53
|
+
this.observeExistingDropdown(), this.scheduleOverflow();
|
|
54
|
+
}, (_a = this.defaultSlot) == null ? void 0 : _a.addEventListener("slotchange", this.onSlotChange), this.handleResize = () => this.handleBreakpointResize(), this.getBreakpointWidth() && window.addEventListener("resize", this.handleResize), this.observeExistingDropdown(), this.scheduleOverflow(true);
|
|
143
55
|
}
|
|
144
|
-
/**
|
|
145
|
-
* Removes listeners after disconnect.
|
|
146
|
-
*/
|
|
147
56
|
afterDisconnect() {
|
|
148
57
|
var _a, _b;
|
|
149
|
-
(_a = this.defaultSlot) == null ? void 0 : _a.removeEventListener("slotchange", this.onSlotChange);
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
if (this._applyOverflowFrame) {
|
|
157
|
-
cancelAnimationFrame(this._applyOverflowFrame);
|
|
158
|
-
this._applyOverflowFrame = null;
|
|
159
|
-
}
|
|
160
|
-
(_b = this._dropdownObserver) == null ? void 0 : _b.disconnect();
|
|
161
|
-
this._dropdownObserver = null;
|
|
162
|
-
this._observedDropdown = null;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Schedules overflow application after layout settles.
|
|
166
|
-
* @param {boolean} [doubleFrame] Wait an extra frame for initial render/hydration.
|
|
167
|
-
*/
|
|
168
|
-
scheduleOverflow(doubleFrame = false) {
|
|
169
|
-
if (this._applyOverflowFrame) return;
|
|
170
|
-
this._applyOverflowFrame = requestAnimationFrame(() => {
|
|
171
|
-
this._applyOverflowFrame = null;
|
|
172
|
-
if (doubleFrame) {
|
|
173
|
-
this.scheduleOverflow(false);
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
this.applyOverflow();
|
|
177
|
-
});
|
|
58
|
+
(_a = this.defaultSlot) == null ? void 0 : _a.removeEventListener("slotchange", this.onSlotChange), window.removeEventListener("resize", this.handleResize), this._isCollapsedByBreakpoint = null, this._overflowRetryFrame && (cancelAnimationFrame(this._overflowRetryFrame), this._overflowRetryFrame = null), this._applyOverflowFrame && (cancelAnimationFrame(this._applyOverflowFrame), this._applyOverflowFrame = null), (_b = this._dropdownObserver) == null ? void 0 : _b.disconnect(), this._dropdownObserver = null, this._observedDropdown = null;
|
|
59
|
+
}
|
|
60
|
+
scheduleOverflow(e2 = false) {
|
|
61
|
+
this._applyOverflowFrame || (this._applyOverflowFrame = requestAnimationFrame(() => {
|
|
62
|
+
this._applyOverflowFrame = null, e2 ? this.scheduleOverflow(false) : this.applyOverflow();
|
|
63
|
+
}));
|
|
178
64
|
}
|
|
179
|
-
/**
|
|
180
|
-
* Returns the actions for the toolbar action.
|
|
181
|
-
* @returns {Array<HTMLElement>} Managed toolbar actions.
|
|
182
|
-
*/
|
|
183
65
|
getActions() {
|
|
184
|
-
return this.getAssignedElements().filter(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Returns direct children assigned to the default slot.
|
|
193
|
-
* @returns {Array<HTMLElement>}
|
|
194
|
-
*/
|
|
66
|
+
return this.getAssignedElements().filter((e2) => {
|
|
67
|
+
var _a;
|
|
68
|
+
return "trigger" !== e2.getAttribute("slot") && ("wje-button" === ((_a = e2.tagName) == null ? void 0 : _a.toLowerCase()) || e2.hasAttribute("data-toolbar-action"));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
195
71
|
getAssignedElements() {
|
|
196
72
|
var _a, _b;
|
|
197
73
|
return ((_b = (_a = this.defaultSlot) == null ? void 0 : _a.assignedElements) == null ? void 0 : _b.call(_a)) || Array.from(this.children);
|
|
198
74
|
}
|
|
199
|
-
/**
|
|
200
|
-
* Returns an existing top-level dropdown if present.
|
|
201
|
-
* @returns {HTMLElement|null}
|
|
202
|
-
*/
|
|
203
75
|
getExistingDropdown() {
|
|
204
|
-
return this.getAssignedElements().find((
|
|
76
|
+
return this.getAssignedElements().find((e2) => {
|
|
205
77
|
var _a;
|
|
206
|
-
return ((_a =
|
|
78
|
+
return "wje-dropdown" === ((_a = e2.tagName) == null ? void 0 : _a.toLowerCase());
|
|
207
79
|
}) || null;
|
|
208
80
|
}
|
|
209
|
-
/**
|
|
210
|
-
* Observes the external dropdown for late menu/content changes.
|
|
211
|
-
*/
|
|
212
81
|
observeExistingDropdown() {
|
|
213
82
|
var _a;
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
(_a = this._dropdownObserver) == null ? void 0 : _a.disconnect();
|
|
217
|
-
this._dropdownObserver = null;
|
|
218
|
-
this._observedDropdown = dropdown;
|
|
219
|
-
if (!dropdown || typeof MutationObserver !== "function") return;
|
|
220
|
-
this._dropdownObserver = new MutationObserver(() => this.scheduleOverflow());
|
|
221
|
-
this._dropdownObserver.observe(dropdown, {
|
|
222
|
-
childList: true,
|
|
223
|
-
subtree: false
|
|
224
|
-
});
|
|
83
|
+
const e2 = this.getExistingDropdown();
|
|
84
|
+
e2 !== this._observedDropdown && ((_a = this._dropdownObserver) == null ? void 0 : _a.disconnect(), this._dropdownObserver = null, this._observedDropdown = e2, e2 && "function" == typeof MutationObserver && (this._dropdownObserver = new MutationObserver(() => this.scheduleOverflow()), this._dropdownObserver.observe(e2, { childList: true, subtree: false })));
|
|
225
85
|
}
|
|
226
|
-
/**
|
|
227
|
-
* Returns the dropdown that should receive overflow items.
|
|
228
|
-
* @returns {HTMLElement}
|
|
229
|
-
*/
|
|
230
86
|
getOverflowDropdown() {
|
|
231
87
|
return this.getExistingDropdown() || this.moreDropdown;
|
|
232
88
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Returns the menu used for overflow items.
|
|
235
|
-
* @returns {HTMLElement|null}
|
|
236
|
-
*/
|
|
237
89
|
getOverflowMenu() {
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}) || null;
|
|
244
|
-
}
|
|
245
|
-
return this.moreMenu;
|
|
90
|
+
const e2 = this.getExistingDropdown();
|
|
91
|
+
return e2 ? Array.from(e2.children).find((e3) => {
|
|
92
|
+
var _a;
|
|
93
|
+
return "wje-menu" === ((_a = e3.tagName) == null ? void 0 : _a.toLowerCase());
|
|
94
|
+
}) || null : this.moreMenu;
|
|
246
95
|
}
|
|
247
|
-
/**
|
|
248
|
-
* Gets the number of actions that should stay visible.
|
|
249
|
-
* @returns {number}
|
|
250
|
-
*/
|
|
251
96
|
getVisibleLimit() {
|
|
252
|
-
const
|
|
253
|
-
if (this.isCollapsedByBreakpoint())
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
const visibleItems = this.visibleItems;
|
|
258
|
-
const limit = visibleItems === null ? maxItems : Math.min(visibleItems, maxItems);
|
|
259
|
-
return Math.max(0, Math.min(limit, actions.length));
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Returns whether the toolbar action should collapse based on the configured breakpoint.
|
|
263
|
-
* @returns {boolean}
|
|
264
|
-
*/
|
|
97
|
+
const e2 = this.getActions();
|
|
98
|
+
if (this.isCollapsedByBreakpoint()) return 0;
|
|
99
|
+
const t2 = this.maxItems > 0 ? this.maxItems : e2.length, i = this.visibleItems, o = null === i ? t2 : Math.min(i, t2);
|
|
100
|
+
return Math.max(0, Math.min(o, e2.length));
|
|
101
|
+
}
|
|
265
102
|
shouldCollapseByBreakpoint() {
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Returns the cached breakpoint collapse state.
|
|
272
|
-
* @returns {boolean}
|
|
273
|
-
*/
|
|
103
|
+
const e2 = this.getBreakpointWidth();
|
|
104
|
+
return !!e2 && window.innerWidth < e2;
|
|
105
|
+
}
|
|
274
106
|
isCollapsedByBreakpoint() {
|
|
275
|
-
if (!this.getBreakpointWidth())
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
const nextState = this.shouldCollapseByBreakpoint();
|
|
280
|
-
this._isCollapsedByBreakpoint = nextState;
|
|
281
|
-
return nextState;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Reacts to viewport resize only when the breakpoint mode actually changes.
|
|
285
|
-
* @returns {void}
|
|
286
|
-
*/
|
|
107
|
+
if (!this.getBreakpointWidth()) return this._isCollapsedByBreakpoint = false, false;
|
|
108
|
+
const e2 = this.shouldCollapseByBreakpoint();
|
|
109
|
+
return this._isCollapsedByBreakpoint = e2, e2;
|
|
110
|
+
}
|
|
287
111
|
handleBreakpointResize() {
|
|
288
112
|
if (!this.getBreakpointWidth()) return;
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.scheduleOverflow();
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Resolves the configured breakpoint to a pixel width.
|
|
296
|
-
* @returns {number|null}
|
|
297
|
-
*/
|
|
113
|
+
const e2 = this.shouldCollapseByBreakpoint();
|
|
114
|
+
this._isCollapsedByBreakpoint !== e2 && (this._isCollapsedByBreakpoint = e2, this.scheduleOverflow());
|
|
115
|
+
}
|
|
298
116
|
getBreakpointWidth() {
|
|
299
117
|
if (!this.breakpoint) return null;
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const cssNumber = parseFloat(cssValue);
|
|
305
|
-
if (Number.isFinite(cssNumber)) return cssNumber;
|
|
118
|
+
const e2 = this.breakpoint.trim().toLowerCase(), i = getComputedStyle(this).getPropertyValue(`--wje-toolbar-action-breakpoint-${e2}`).trim(), o = _t.BREAKPOINTS[e2];
|
|
119
|
+
if (i) {
|
|
120
|
+
const e3 = parseFloat(i);
|
|
121
|
+
if (Number.isFinite(e3)) return e3;
|
|
306
122
|
}
|
|
307
|
-
if (Number.isFinite(
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
const directNumber = parseFloat(token);
|
|
311
|
-
return Number.isFinite(directNumber) ? directNumber : null;
|
|
123
|
+
if (Number.isFinite(o)) return o;
|
|
124
|
+
const r = parseFloat(e2);
|
|
125
|
+
return Number.isFinite(r) ? r : null;
|
|
312
126
|
}
|
|
313
|
-
/**
|
|
314
|
-
* Updates visible actions and the overflow dropdown.
|
|
315
|
-
* @returns {void}
|
|
316
|
-
*/
|
|
317
127
|
applyOverflow() {
|
|
318
128
|
var _a;
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
this._overflowRetryFrame = requestAnimationFrame(() => {
|
|
332
|
-
this._overflowRetryFrame = null;
|
|
333
|
-
this.scheduleOverflow();
|
|
334
|
-
});
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
if (!existingDropdown) {
|
|
338
|
-
(_a = this.moreMenu) == null ? void 0 : _a.replaceChildren();
|
|
339
|
-
}
|
|
340
|
-
overflowActions.forEach((action) => {
|
|
341
|
-
action.hidden = true;
|
|
342
|
-
action.style.display = "none";
|
|
343
|
-
this._managedHiddenActions.add(action);
|
|
344
|
-
});
|
|
345
|
-
if (overflowMenu && existingDropdown && overflowActions.length > 0 && overflowMenu.children.length > 0) {
|
|
346
|
-
overflowMenu.append(this.createOverflowDivider());
|
|
347
|
-
}
|
|
348
|
-
overflowActions.forEach((action) => {
|
|
349
|
-
overflowMenu == null ? void 0 : overflowMenu.append(this.createMenuItem(action));
|
|
350
|
-
});
|
|
351
|
-
if (!existingDropdown && this.moreDropdown) {
|
|
352
|
-
this.moreDropdown.hidden = overflowActions.length === 0;
|
|
353
|
-
} else if (existingDropdown && this.moreDropdown) {
|
|
354
|
-
this.moreDropdown.hidden = true;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Restores buttons hidden by this component.
|
|
359
|
-
* @param {Array<HTMLElement>} actions Toolbar buttons.
|
|
360
|
-
*/
|
|
361
|
-
restoreManagedActions(actions = this.getActions()) {
|
|
362
|
-
actions.forEach((action) => {
|
|
363
|
-
if (this._managedHiddenActions.has(action)) {
|
|
364
|
-
action.hidden = false;
|
|
365
|
-
action.style.removeProperty("display");
|
|
366
|
-
this._managedHiddenActions.delete(action);
|
|
367
|
-
}
|
|
129
|
+
const e2 = this.getActions(), t2 = this.getVisibleLimit(), i = e2.slice(t2), o = this.getExistingDropdown(), r = this.getOverflowMenu();
|
|
130
|
+
this._overflowRetryFrame && (cancelAnimationFrame(this._overflowRetryFrame), this._overflowRetryFrame = null), this.restoreManagedActions(e2), this.restoreManagedOverflowContent(), o && i.length > 0 && !r ? this._overflowRetryFrame = requestAnimationFrame(() => {
|
|
131
|
+
this._overflowRetryFrame = null, this.scheduleOverflow();
|
|
132
|
+
}) : (o || ((_a = this.moreMenu) == null ? void 0 : _a.replaceChildren()), i.forEach((e3) => {
|
|
133
|
+
e3.hidden = true, e3.style.display = "none", this._managedHiddenActions.add(e3);
|
|
134
|
+
}), r && o && i.length > 0 && r.children.length > 0 && r.append(this.createOverflowDivider()), i.forEach((e3) => {
|
|
135
|
+
r == null ? void 0 : r.append(this.createMenuItem(e3));
|
|
136
|
+
}), !o && this.moreDropdown ? this.moreDropdown.hidden = 0 === i.length : o && this.moreDropdown && (this.moreDropdown.hidden = true));
|
|
137
|
+
}
|
|
138
|
+
restoreManagedActions(e2 = this.getActions()) {
|
|
139
|
+
e2.forEach((e3) => {
|
|
140
|
+
this._managedHiddenActions.has(e3) && (e3.hidden = false, e3.style.removeProperty("display"), this._managedHiddenActions.delete(e3));
|
|
368
141
|
});
|
|
369
142
|
}
|
|
370
|
-
/**
|
|
371
|
-
* Removes overflow menu nodes that were previously injected by this component.
|
|
372
|
-
*/
|
|
373
143
|
restoreManagedOverflowContent() {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
Array.from(menu.children).forEach((child) => {
|
|
379
|
-
if (this._managedOverflowNodes.has(child)) {
|
|
380
|
-
child.remove();
|
|
381
|
-
this._managedOverflowNodes.delete(child);
|
|
382
|
-
}
|
|
144
|
+
if (!this.getExistingDropdown()) return;
|
|
145
|
+
const e2 = this.getOverflowMenu();
|
|
146
|
+
e2 && Array.from(e2.children).forEach((e3) => {
|
|
147
|
+
this._managedOverflowNodes.has(e3) && (e3.remove(), this._managedOverflowNodes.delete(e3));
|
|
383
148
|
});
|
|
384
149
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
if (!menuItem.textContent.trim() && label) {
|
|
395
|
-
menuItem.append(document.createTextNode(label));
|
|
396
|
-
}
|
|
397
|
-
if (label) {
|
|
398
|
-
menuItem.setAttribute("aria-label", label);
|
|
399
|
-
}
|
|
400
|
-
if (action.hasAttribute("disabled") || action.getAttribute("aria-disabled") === "true") {
|
|
401
|
-
menuItem.setAttribute("disabled", "");
|
|
402
|
-
}
|
|
403
|
-
menuItem.addEventListener("wje-menu-item:click", (e) => this.handleMenuItemClick(e, action));
|
|
404
|
-
menuItem.addEventListener("click", (e) => this.handleMenuItemClick(e, action));
|
|
405
|
-
this._managedOverflowNodes.add(menuItem);
|
|
406
|
-
return menuItem;
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* Clones action content for menu usage and normalizes button icon slots.
|
|
410
|
-
* @param {Node} node The source action child node.
|
|
411
|
-
* @returns {Node}
|
|
412
|
-
*/
|
|
413
|
-
cloneActionMenuNode(node) {
|
|
414
|
-
const clone = node.cloneNode(true);
|
|
415
|
-
if (clone.nodeType === Node.ELEMENT_NODE) {
|
|
416
|
-
this.normalizeActionMenuIconSlot(clone);
|
|
417
|
-
}
|
|
418
|
-
return clone;
|
|
150
|
+
createMenuItem(e2) {
|
|
151
|
+
let t2 = document.createElement("wje-menu-item");
|
|
152
|
+
t2.replaceChildren(...Array.from(e2.childNodes).map((e3) => this.cloneActionMenuNode(e3)));
|
|
153
|
+
const i = this.getActionLabel(e2);
|
|
154
|
+
return !t2.textContent.trim() && i && t2.append(document.createTextNode(i)), i && t2.setAttribute("aria-label", i), (e2.hasAttribute("disabled") || "true" === e2.getAttribute("aria-disabled")) && t2.setAttribute("disabled", ""), t2.addEventListener("wje-menu-item:click", (t3) => this.handleMenuItemClick(t3, e2)), t2.addEventListener("click", (t3) => this.handleMenuItemClick(t3, e2)), this._managedOverflowNodes.add(t2), t2;
|
|
155
|
+
}
|
|
156
|
+
cloneActionMenuNode(e2) {
|
|
157
|
+
const t2 = e2.cloneNode(true);
|
|
158
|
+
return t2.nodeType === Node.ELEMENT_NODE && this.normalizeActionMenuIconSlot(t2), t2;
|
|
419
159
|
}
|
|
420
|
-
|
|
421
|
-
* Moves button-only icon slots to the menu item start slot.
|
|
422
|
-
* @param {Element} element The cloned action content node.
|
|
423
|
-
*/
|
|
424
|
-
normalizeActionMenuIconSlot(element) {
|
|
160
|
+
normalizeActionMenuIconSlot(e2) {
|
|
425
161
|
var _a;
|
|
426
|
-
if (((_a =
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
element.setAttribute("slot", "start");
|
|
430
|
-
}
|
|
162
|
+
if ("wje-icon" !== ((_a = e2.tagName) == null ? void 0 : _a.toLowerCase())) return;
|
|
163
|
+
const t2 = e2.getAttribute("slot");
|
|
164
|
+
t2 && "icon-only" !== t2 || e2.setAttribute("slot", "start");
|
|
431
165
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
* @returns {string}
|
|
436
|
-
*/
|
|
437
|
-
getActionLabel(action) {
|
|
438
|
-
if (!action) return "";
|
|
439
|
-
const explicitLabel = ["aria-label", "title", "label", "data-label", "tooltip"].map((attr) => {
|
|
166
|
+
getActionLabel(e2) {
|
|
167
|
+
if (!e2) return "";
|
|
168
|
+
const t2 = ["aria-label", "title", "label", "data-label", "tooltip"].map((t3) => {
|
|
440
169
|
var _a;
|
|
441
|
-
return (_a =
|
|
442
|
-
}).find((
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Creates a divider separating existing dropdown actions from responsive overflow actions.
|
|
448
|
-
* @returns {HTMLElement}
|
|
449
|
-
*/
|
|
170
|
+
return (_a = e2.getAttribute(t3)) == null ? void 0 : _a.trim();
|
|
171
|
+
}).find((e3) => e3 && "true" !== e3);
|
|
172
|
+
return t2 || e2.textContent.trim();
|
|
173
|
+
}
|
|
450
174
|
createOverflowDivider() {
|
|
451
|
-
const
|
|
452
|
-
this._managedOverflowNodes.add(
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Forwards menu item activation to the original button.
|
|
457
|
-
* @param {Event} e The menu event.
|
|
458
|
-
* @param {HTMLElement} action The original action button.
|
|
459
|
-
*/
|
|
460
|
-
handleMenuItemClick(e, action) {
|
|
175
|
+
const e2 = document.createElement("wje-divider");
|
|
176
|
+
return this._managedOverflowNodes.add(e2), e2;
|
|
177
|
+
}
|
|
178
|
+
handleMenuItemClick(e2, t2) {
|
|
461
179
|
var _a;
|
|
462
|
-
(_a =
|
|
463
|
-
|
|
464
|
-
if (!action || action.hasAttribute("disabled") || action.getAttribute("aria-disabled") === "true") return;
|
|
465
|
-
action.click();
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* Measures action widths while preserving current overflow state.
|
|
469
|
-
* @returns {{count: number, widths: number[], gap: number, moreWidth: number, getWidthForCount: Function}}
|
|
470
|
-
*/
|
|
180
|
+
(_a = e2.preventDefault) == null ? void 0 : _a.call(e2), e2.stopPropagation(), t2 && !t2.hasAttribute("disabled") && "true" !== t2.getAttribute("aria-disabled") && t2.click();
|
|
181
|
+
}
|
|
471
182
|
measureActionMetrics() {
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
this.
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
return {
|
|
481
|
-
count: actions.length,
|
|
482
|
-
widths,
|
|
483
|
-
gap,
|
|
484
|
-
moreWidth,
|
|
485
|
-
getWidthForCount: (visibleCount) => {
|
|
486
|
-
const count = Math.max(0, Math.min(visibleCount, actions.length));
|
|
487
|
-
const overflowCount = actions.length - count;
|
|
488
|
-
const visibleWidth = widths.slice(0, count).reduce((sum, width) => sum + width, 0);
|
|
489
|
-
const visibleGaps = Math.max(count - 1, 0) * gap;
|
|
490
|
-
const usesDropdown = hasExistingDropdown || overflowCount > 0;
|
|
491
|
-
const moreGap = count > 0 && usesDropdown ? gap : 0;
|
|
492
|
-
return visibleWidth + visibleGaps + (usesDropdown ? moreWidth + moreGap : 0);
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Measures the overflow dropdown trigger.
|
|
498
|
-
* @returns {number}
|
|
499
|
-
*/
|
|
183
|
+
const e2 = this.getActions(), t2 = !!this.getExistingDropdown();
|
|
184
|
+
this.restoreManagedActions(e2);
|
|
185
|
+
const i = e2.map((e3) => e3.getBoundingClientRect().width), o = this.native ? getComputedStyle(this.native) : null, r = o && parseFloat(o.columnGap || o.gap || "0") || 0, n = this.measureMoreWidth();
|
|
186
|
+
return this.applyOverflow(), { count: e2.length, widths: i, gap: r, moreWidth: n, getWidthForCount: (o2) => {
|
|
187
|
+
const s = Math.max(0, Math.min(o2, e2.length)), a = e2.length - s, l = i.slice(0, s).reduce((e3, t3) => e3 + t3, 0), d = Math.max(s - 1, 0) * r, h = t2 || a > 0;
|
|
188
|
+
return l + d + (h ? n + (s > 0 && h ? r : 0) : 0);
|
|
189
|
+
} };
|
|
190
|
+
}
|
|
500
191
|
measureMoreWidth() {
|
|
501
|
-
const
|
|
502
|
-
if (!
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
dropdown.hidden = false;
|
|
508
|
-
dropdown.style.visibility = "hidden";
|
|
509
|
-
}
|
|
510
|
-
const width = dropdown.getBoundingClientRect().width || 48;
|
|
511
|
-
if (isInternalDropdown && wasHidden) {
|
|
512
|
-
dropdown.hidden = true;
|
|
513
|
-
dropdown.style.visibility = previousVisibility;
|
|
514
|
-
}
|
|
515
|
-
if (dropdown === this.moreDropdown && this.getExistingDropdown()) {
|
|
516
|
-
this.moreDropdown.hidden = true;
|
|
517
|
-
}
|
|
518
|
-
return width;
|
|
192
|
+
const e2 = this.getOverflowDropdown();
|
|
193
|
+
if (!e2) return 48;
|
|
194
|
+
const t2 = e2 === this.moreDropdown, i = e2.hidden, o = e2.style.visibility;
|
|
195
|
+
t2 && i && (e2.hidden = false, e2.style.visibility = "hidden");
|
|
196
|
+
const r = e2.getBoundingClientRect().width || 48;
|
|
197
|
+
return t2 && i && (e2.hidden = true, e2.style.visibility = o), e2 === this.moreDropdown && this.getExistingDropdown() && (this.moreDropdown.hidden = true), r;
|
|
519
198
|
}
|
|
520
199
|
};
|
|
521
|
-
__publicField(
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
lg: 992,
|
|
525
|
-
xl: 1200,
|
|
526
|
-
"2xl": 1450,
|
|
527
|
-
xxl: 1450
|
|
528
|
-
});
|
|
529
|
-
let ToolbarAction = _ToolbarAction;
|
|
530
|
-
ToolbarAction.define("wje-toolbar-action", ToolbarAction);
|
|
200
|
+
__publicField(_t, "BREAKPOINTS", { sm: 576, md: 768, lg: 992, xl: 1200, "2xl": 1450, xxl: 1450 });
|
|
201
|
+
let t = _t;
|
|
202
|
+
t.define("wje-toolbar-action", t);
|
|
531
203
|
export {
|
|
532
|
-
|
|
204
|
+
t as default
|
|
533
205
|
};
|
|
534
206
|
//# sourceMappingURL=wje-toolbar-action.js.map
|