@keenmate/web-grid 1.0.0-rc02 → 1.0.0-rc04
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 +10 -6
- package/component-variables.manifest.json +4 -4
- package/dist/grid.d.ts +11 -2
- package/dist/modules/tooltip/tooltip.d.ts +2 -2
- package/dist/types.d.ts +14 -1
- package/dist/web-component.d.ts +7 -1
- package/dist/web-grid.js +896 -787
- package/dist/web-grid.umd.js +52 -52
- package/package.json +1 -1
- package/src/css/_variables.css +7 -7
package/dist/web-grid.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (t, e, o) =>
|
|
4
|
-
class
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
|
+
var Ne = (t, e, o) => e in t ? Ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var w = (t, e, o) => Ne(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
class Ue {
|
|
5
5
|
constructor() {
|
|
6
6
|
// ==========================================================================
|
|
7
7
|
// Configuration Props
|
|
8
8
|
// ==========================================================================
|
|
9
9
|
w(this, "_items", []);
|
|
10
10
|
w(this, "_columns", []);
|
|
11
|
-
w(this, "
|
|
11
|
+
w(this, "_sortMode", "none");
|
|
12
12
|
w(this, "_filterable", !1);
|
|
13
13
|
w(this, "_pageable", !1);
|
|
14
14
|
w(this, "_pageSize", 10);
|
|
@@ -17,6 +17,7 @@ class Ve {
|
|
|
17
17
|
w(this, "_hoverable", !0);
|
|
18
18
|
w(this, "_editable", !1);
|
|
19
19
|
w(this, "_editTrigger", "dblclick");
|
|
20
|
+
w(this, "_editStartSelection", "mousePosition");
|
|
20
21
|
w(this, "_mode", "excel");
|
|
21
22
|
w(this, "_dropdownToggleVisibility", "always");
|
|
22
23
|
w(this, "_dropdownShowOnFocus", !0);
|
|
@@ -37,6 +38,7 @@ class Ve {
|
|
|
37
38
|
w(this, "_onroweditstart");
|
|
38
39
|
w(this, "_onroweditcancel");
|
|
39
40
|
w(this, "_onvalidationerror");
|
|
41
|
+
w(this, "_validationTooltipCallback");
|
|
40
42
|
w(this, "_ontoolbarclick");
|
|
41
43
|
w(this, "_onrowaction");
|
|
42
44
|
w(this, "_oncontextmenuopen");
|
|
@@ -100,11 +102,18 @@ class Ve {
|
|
|
100
102
|
set columns(e) {
|
|
101
103
|
this._columns = e, this.requestUpdate();
|
|
102
104
|
}
|
|
105
|
+
get sortMode() {
|
|
106
|
+
return this._sortMode;
|
|
107
|
+
}
|
|
108
|
+
set sortMode(e) {
|
|
109
|
+
this._sortMode = e, this.requestUpdate();
|
|
110
|
+
}
|
|
111
|
+
/** @deprecated Use sortMode instead. sortable=true maps to sortMode="multi", sortable=false maps to sortMode="none" */
|
|
103
112
|
get sortable() {
|
|
104
|
-
return this.
|
|
113
|
+
return this._sortMode !== "none";
|
|
105
114
|
}
|
|
106
115
|
set sortable(e) {
|
|
107
|
-
this.
|
|
116
|
+
this._sortMode = e ? "multi" : "none", this.requestUpdate();
|
|
108
117
|
}
|
|
109
118
|
get filterable() {
|
|
110
119
|
return this._filterable;
|
|
@@ -154,6 +163,12 @@ class Ve {
|
|
|
154
163
|
set editTrigger(e) {
|
|
155
164
|
this._editTrigger = e, this.requestUpdate();
|
|
156
165
|
}
|
|
166
|
+
get editStartSelection() {
|
|
167
|
+
return this._editStartSelection;
|
|
168
|
+
}
|
|
169
|
+
set editStartSelection(e) {
|
|
170
|
+
this._editStartSelection = e;
|
|
171
|
+
}
|
|
157
172
|
get mode() {
|
|
158
173
|
return this._mode;
|
|
159
174
|
}
|
|
@@ -415,6 +430,12 @@ class Ve {
|
|
|
415
430
|
set onvalidationerror(e) {
|
|
416
431
|
this._onvalidationerror = e;
|
|
417
432
|
}
|
|
433
|
+
get validationTooltipCallback() {
|
|
434
|
+
return this._validationTooltipCallback;
|
|
435
|
+
}
|
|
436
|
+
set validationTooltipCallback(e) {
|
|
437
|
+
this._validationTooltipCallback = e;
|
|
438
|
+
}
|
|
418
439
|
get ontoolbarclick() {
|
|
419
440
|
return this._ontoolbarclick;
|
|
420
441
|
}
|
|
@@ -720,8 +741,8 @@ class Ve {
|
|
|
720
741
|
this._focusedCell = null;
|
|
721
742
|
}
|
|
722
743
|
}
|
|
723
|
-
const qe = ':host{--wg-rem: 10px;font-family:var(--wg-font-family, var(--base-font-family, system-ui, -apple-system, sans-serif));display:block;--wg-accent-color: var(--base-accent-color, #0078d4);--wg-accent-color-hover: var(--base-accent-color-hover, #106ebe);--wg-accent-color-active: var(--base-accent-color-active, #005a9e);--wg-accent-color-light: var(--base-accent-color-light, #e6f2ff);--wg-text-color-1: var(--base-text-color-1, #242424);--wg-text-color-2: var(--base-text-color-2, #424242);--wg-text-color-3: var(--base-text-color-3, #707070);--wg-text-on-accent: var(--base-text-on-accent, #ffffff);--wg-surface-1: var(--base-surface-1, #ffffff);--wg-surface-2: var(--base-surface-2, #f5f5f5);--wg-surface-3: var(--base-surface-3, #ebebeb);--wg-surface-floating: var(--base-dropdown-bg, var(--base-surface-1, #ffffff));--wg-border-color: var(--base-border-color, #e0e0e0);--wg-border-color-hover: var(--base-border-color, #d1d1d1);--wg-input-bg: var(--base-input-bg, #ffffff);--wg-input-color: var(--base-input-color, var(--wg-text-color-1));--wg-input-border: var(--base-input-border, 1px solid #d1d1d1);--wg-input-border-hover: var(--base-input-border-hover, 1px solid #0078d4);--wg-input-border-focus: var(--base-input-border-focus, 1px solid #0078d4);--wg-input-placeholder-color: var(--base-input-placeholder-color, #707070);--wg-danger-color: var(--base-danger-color, #d13438);--wg-danger-bg-light: var(--base-danger-bg-light, #fde7e9);--wg-hover-bg: var(--base-surface-3, #f0f0f0);--wg-active-bg: var(--base-surface-3, #e0e0e0);--wg-font-size-base: calc(var(--base-font-size-base, 1.4) * var(--wg-rem));--wg-font-size-sm: calc(var(--base-font-size-sm, 1.2) * var(--wg-rem));--wg-font-size-xs: calc(var(--base-font-size-xs, 1.1) * var(--wg-rem));--wg-font-size-lg: calc(var(--base-font-size-lg, 1.6) * var(--wg-rem));--wg-line-height-base: calc(var(--base-line-height-normal, 2) * var(--wg-rem));--wg-font-weight-normal: var(--base-font-weight-normal, 400);--wg-font-weight-semibold: var(--base-font-weight-semibold, 600);--wg-border-radius-sm: calc(var(--base-border-radius-sm, .4) * var(--wg-rem));--wg-border-radius-md: calc(var(--base-border-radius-md, .6) * var(--wg-rem));--wg-border-radius-lg: calc(var(--base-border-radius-lg, .8) * var(--wg-rem));--wg-spacing-xs: calc(.4 * var(--wg-rem));--wg-spacing-sm: calc(.8 * var(--wg-rem));--wg-spacing-md: calc(1.2 * var(--wg-rem));--wg-spacing-lg: calc(1.6 * var(--wg-rem));--wg-spacing-xl: calc(2.4 * var(--wg-rem));--wg-table-bg: var(--wg-surface-1);--wg-table-border: 1px solid var(--wg-border-color);--wg-header-bg: var(--wg-surface-2);--wg-header-bg-hover: var(--wg-surface-3);--wg-header-bg-sorted: var(--wg-surface-3);--wg-header-color: var(--wg-text-color-1);--wg-header-border: 2px solid var(--wg-border-color);--wg-header-padding: var(--wg-spacing-sm) var(--wg-spacing-md);--wg-header-font-weight: var(--wg-font-weight-semibold);--wg-cell-padding: var(--wg-spacing-sm) var(--wg-spacing-md);--wg-cell-color: var(--wg-text-color-1);--wg-cell-border: 1px solid var(--wg-border-color);--wg-cell-bg-hover: var(--wg-hover-bg);--wg-cell-bg-editing: var(--wg-surface-1);--wg-cell-readonly-bg: var(--wg-surface-2);--wg-row-border: 1px solid var(--wg-border-color);--wg-row-bg-even: var(--wg-surface-2);--wg-row-bg-hover: var(--wg-surface-3);--wg-filter-bg: var(--wg-surface-1);--wg-filter-border: 1px solid var(--wg-border-color);--wg-filter-padding: var(--wg-spacing-xs) var(--wg-spacing-sm);--wg-filter-input-padding: calc(.4 * var(--wg-rem)) calc(.8 * var(--wg-rem));--wg-filter-input-bg: var(--wg-input-bg);--wg-filter-input-border: var(--wg-input-border);--wg-filter-input-border-focus: var(--wg-input-border-focus);--wg-filter-input-border-radius: var(--wg-border-radius-sm);--wg-filter-input-font-size: var(--wg-font-size-sm);--wg-sort-indicator-size: calc(1.4 * var(--wg-rem));--wg-sort-indicator-opacity: .9;--wg-sort-placeholder-opacity: .3;--wg-sort-priority-size: calc(1.1 * var(--wg-rem));--wg-pagination-padding: var(--wg-spacing-md);--wg-pagination-gap: calc(1.6 * var(--wg-rem));--wg-pagination-bg: var(--wg-surface-1);--wg-pagination-border: 1px solid var(--wg-border-color);--wg-pagination-btn-padding: calc(.6 * var(--wg-rem)) calc(1.6 * var(--wg-rem));--wg-pagination-btn-bg: var(--wg-surface-1);--wg-pagination-btn-bg-hover: var(--wg-surface-2);--wg-pagination-btn-bg-active: var(--wg-surface-3);--wg-pagination-btn-border: 1px solid var(--wg-border-color);--wg-pagination-btn-border-hover: 1px solid var(--wg-border-color-hover);--wg-pagination-btn-border-radius: var(--wg-border-radius-sm);--wg-pagination-btn-disabled-opacity: .4;--wg-empty-padding: var(--wg-spacing-xl);--wg-empty-color: var(--wg-text-color-3);--wg-error-cell-bg: var(--wg-danger-bg-light);--wg-error-cell-border: 1px solid var(--wg-danger-color);--wg-error-message-color: var(--wg-danger-color);--wg-error-message-font-size: var(--wg-font-size-xs);--wg-error-indicator-color: var(--wg-danger-color);--wg-editor-bg: var(--wg-surface-1);--wg-editor-outline: 2px solid var(--wg-accent-color);--wg-editor-outline-offset: -2px;--wg-editor-validating-opacity: .7;--wg-dropdown-toggle-right: var(--wg-spacing-md);--wg-dropdown-toggle-size: calc(1.2 * var(--wg-rem));--wg-dropdown-toggle-hitbox: calc(2.4 * var(--wg-rem));--wg-toolbar-bg: var(--wg-surface-floating);--wg-toolbar-border: 1px solid var(--wg-border-color);--wg-toolbar-border-radius: var(--wg-border-radius-sm);--wg-toolbar-shadow: var(--base-dropdown-box-shadow, 0 2px 8px rgba(0, 0, 0, .15));--wg-toolbar-divider-color: var(--wg-border-color);--wg-toolbar-btn-min-width: calc(2.4 * var(--wg-rem));--wg-toolbar-btn-padding: 0 calc(.4 * var(--wg-rem));--wg-toolbar-btn-border-radius: var(--wg-border-radius-sm);--wg-toolbar-btn-bg-hover: var(--wg-hover-bg);--wg-toolbar-btn-bg-active: var(--wg-active-bg);--wg-toolbar-btn-color: var(--wg-text-color-1);--wg-toolbar-trigger-color: var(--wg-text-color-3);--wg-toolbar-trigger-color-hover: var(--wg-text-color-1);--wg-toolbar-trigger-bg-hover: var(--wg-hover-bg);--wg-tooltip-bg: var(--base-tooltip-bg, #333);--wg-context-menu-z-index: 1001;--wg-context-menu-min-width: calc(16 * var(--wg-rem));--wg-focus-outline: 2px solid var(--wg-accent-color);--wg-focus-outline-offset: -2px;--wg-focus-bg: var(--wg-hover-bg);--wg-transition-fast: .1s ease;--wg-transition-normal: .15s ease;--wg-z-dropdown: 9999;--wg-z-toolbar: 1000;--wg-z-context-menu: 1001}web-grid:not(:defined){display:block;min-height:calc(10 * var(--wg-rem));color:transparent!important;background:transparent}.wg{position:relative;width:100%;max-height:inherit;overflow:auto;overscroll-behavior:contain;border:var(--wg-table-border)}.wg__table{width:max-content;min-width:100%;border-collapse:collapse;table-layout:fixed;background:var(--wg-table-bg);font-size:var(--wg-font-size-base);line-height:var(--wg-line-height-base)}.wg__table tbody tr{border-bottom:var(--wg-row-border)}.wg__row-number-header,.wg__row-number{width:40px;min-width:40px;max-width:40px;text-align:center;color:var(--wg-text-color-secondary);background:var(--wg-header-bg);-webkit-user-select:none;user-select:none;font-size:var(--wg-font-size-sm)}.wg__row-number{border-right:var(--wg-cell-border)}.wg__actions-column{width:32px;min-width:32px;max-width:32px;padding:0!important;text-align:center}thead .wg__actions-column{background:var(--wg-header-bg);border-bottom:var(--wg-header-border)}.wg__filter-row .wg__actions-column{background:var(--wg-filter-bg);border-bottom:var(--wg-filter-border)}.wg__header{position:sticky;top:0;z-index:1;background:var(--wg-header-bg);color:var(--wg-header-color);font-weight:var(--wg-header-font-weight);padding:var(--wg-header-padding);border-bottom:var(--wg-header-border);text-align:left;-webkit-user-select:none;user-select:none}.wg__header--sortable{cursor:pointer}.wg__header--sortable:hover{background:var(--wg-header-bg-hover)}.wg__header--sorted{background:var(--wg-header-bg-sorted)}.wg__header-content{display:flex;align-items:center;gap:4px;justify-content:space-between}.wg__header-title{flex:1}.wg__sort-indicator{font-size:var(--wg-sort-indicator-size);opacity:var(--wg-sort-indicator-opacity);min-width:16px;text-align:center;display:inline-flex;align-items:center}.wg__sort-placeholder{opacity:var(--wg-sort-placeholder-opacity)}.wg__sort-priority{font-size:var(--wg-sort-priority-size);font-weight:600;margin-left:2px;vertical-align:super;line-height:1}.wg__header-info{display:inline-flex;align-items:center;color:var(--wg-accent-color);cursor:help;opacity:.7;margin-left:4px;vertical-align:middle}.wg__header-info:hover{opacity:1}.wg__filter-row th{padding:var(--wg-filter-padding);background:var(--wg-filter-bg);border-bottom:var(--wg-filter-border)}.wg__filter-input{width:100%;padding:var(--wg-filter-input-padding);border:var(--wg-filter-input-border);border-radius:var(--wg-filter-input-border-radius);background:var(--wg-surface-1);color:var(--wg-text-color-1);font-size:var(--wg-filter-input-font-size);box-sizing:border-box}.wg__filter-input:focus{outline:none;border:var(--wg-filter-input-border-focus);box-shadow:0 0 0 1px var(--wg-accent-color)}.wg__cell{padding:var(--wg-cell-padding);color:var(--wg-cell-color);scroll-margin-top:3rem;scroll-margin-bottom:.5rem}.wg__cell-text{-webkit-user-select:none;user-select:none}.wg__cell--ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__cell--editable{cursor:pointer;position:relative}.wg__cell--editable:hover{background:var(--wg-cell-bg-hover)}.wg__cell--editable:hover:after{content:"";position:absolute;top:2px;right:2px;bottom:2px;left:2px;border:1px dashed var(--wg-border-color);border-radius:2px;pointer-events:none}.wg__cell--editing{position:relative;background:var(--wg-surface-1);outline:2px solid var(--wg-accent-color);outline-offset:-2px}.wg__cell--editing:after{display:none}.wg__cell--invalid{background:var(--wg-danger-bg-light, #fee);box-shadow:inset 0 0 0 2px var(--wg-danger-color, #c00)}.wg--navigate-mode .wg__cell:not(.wg__cell--editable){background:var(--wg-cell-readonly-bg, #f5f5f5)}.wg__editor{position:absolute;top:0;left:0;right:0;width:100%;padding:var(--wg-cell-padding);border:none;background:transparent;color:var(--wg-text-color-1);font-size:var(--wg-font-size-base);font-family:inherit;line-height:inherit;box-sizing:border-box}.wg__editor:focus,.wg__editor:focus-visible{outline:none;box-shadow:none}.wg__editor--text{text-align:inherit}.wg__editor--number{text-align:right}.wg__editor--date{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:var(--wg-editor-bg)}.wg__date-input{flex:1;min-width:0;height:100%;border:none;background:transparent;font:inherit;padding:var(--wg-cell-padding-block) var(--wg-cell-padding-inline);outline:none;color:inherit}.wg__date-trigger{width:var(--wg-date-trigger-size, 28px);height:100%;display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--wg-text-secondary, #666);cursor:pointer;padding:0;flex-shrink:0}.wg__date-trigger:hover{color:var(--wg-accent-color, #0078d4);background:var(--wg-hover-bg, rgba(0, 0, 0, .05))}.wg__editor--checkbox{width:auto;height:auto;margin:0 auto}.wg__editor--custom{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:var(--wg-editor-bg);padding:var(--wg-cell-padding-block) var(--wg-cell-padding-inline);cursor:pointer}.wg__editor--custom:focus{outline:none}.wg__custom-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;cursor:pointer}.wg__editor--combobox,.wg__editor--autocomplete{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;padding:var(--wg-cell-padding);padding-right:0;background:transparent;box-sizing:border-box}.wg__combobox-input,.wg__autocomplete-input{flex:1;width:100%;height:100%;padding:0 24px 0 0;border:none;background:transparent;color:var(--wg-text-color-1);font-size:var(--wg-font-size-base);font-family:inherit;line-height:var(--wg-line-height-base);outline:none;box-sizing:border-box;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wg__combobox-input:focus,.wg__autocomplete-input:focus{outline:none}.wg__combobox-toggle{position:absolute;right:var(--wg-dropdown-toggle-right);top:50%;transform:translateY(-50%);font-size:var(--wg-dropdown-toggle-size);color:var(--wg-text-color-2);pointer-events:auto;cursor:pointer}.wg__combobox-toggle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:48px}.wg__loading-indicator{position:absolute;right:var(--wg-dropdown-toggle-right);top:50%;transform:translateY(-50%);font-size:12px;animation:wg-pulse 1s infinite}@keyframes wg-pulse{0%,to{opacity:1}50%{opacity:.4}}.wg__select-trigger{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:transparent}.wg__select-trigger:focus,.wg__select-trigger:focus-visible{outline:none;box-shadow:none}.wg__select-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__select-toggle{position:relative;font-size:var(--wg-dropdown-toggle-size);opacity:.6;margin-left:4px;flex-shrink:0;pointer-events:auto;cursor:pointer}.wg__select-toggle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:48px}.wg__cell-dropdown-display{display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer}.wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle{opacity:0}.wg__cell:hover .wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle,.wg__cell--focused .wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle{opacity:.6}.wg__cell-date-display{display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer}.wg__cell-date-display .wg__date-trigger{position:relative;background:none;border:none;padding:0;margin:0;cursor:pointer;opacity:.6;display:flex;align-items:center;justify-content:center;color:inherit}.wg__cell-date-display .wg__date-trigger:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:48px}.wg__cell-date-display--toggle-on-focus .wg__date-trigger{opacity:0}.wg__cell:hover .wg__cell-date-display--toggle-on-focus .wg__date-trigger,.wg__cell--focused .wg__cell-date-display--toggle-on-focus .wg__date-trigger{opacity:.6}.wg__dropdown{background:var(--wg-surface-floating, #fff);border:1px solid var(--wg-border-color, #d1d1d1);border-radius:4px;box-shadow:var(--wg-toolbar-shadow);max-height:200px;overflow-y:auto;font-size:var(--wg-font-size-base);font-family:inherit;line-height:var(--wg-line-height-base)}.wg__dropdown-option{display:flex;align-items:center;gap:var(--wg-spacing-sm);padding:6px 12px;cursor:pointer;color:var(--wg-text-color-1)}.wg__dropdown-option:hover,.wg__dropdown-option--highlighted{background:var(--wg-hover-bg, #f0f0f0)}.wg__dropdown-option--selected{background:var(--wg-accent-color-light, #e6f2ff)}.wg__dropdown-option--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.wg__dropdown-option-icon{flex-shrink:0;width:1.5em;text-align:center}.wg__dropdown-option-content{flex:1;min-width:0;overflow:hidden}.wg__dropdown-option-label{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wg__dropdown-option-subtitle{display:block;font-size:var(--wg-font-size-sm);color:var(--wg-text-color-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wg__dropdown-empty{padding:8px 12px;color:var(--wg-text-color-2);font-style:italic;text-align:center}.wg--navigate-mode .wg__cell{cursor:cell}.wg--navigate-mode .wg__cell:focus{outline:none}.wg--navigate-mode .wg__cell.wg__cell--focused{outline:2px solid var(--wg-focus-border-color, #217346);outline-offset:-2px}.wg__cell--focused:after{display:none}.wg__pagination{display:flex;align-items:center;justify-content:center;gap:var(--wg-pagination-gap);padding:var(--wg-pagination-padding);border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg)}.wg__pagination-btn{padding:var(--wg-pagination-btn-padding);background:var(--wg-pagination-btn-bg);border:var(--wg-pagination-btn-border);border-radius:var(--wg-pagination-btn-border-radius);color:var(--wg-cell-color);font-size:var(--wg-font-size-base);cursor:pointer;transition:all var(--wg-transition-fast)}.wg__pagination-btn:hover:not(:disabled){background:var(--wg-pagination-btn-bg-hover);border:var(--wg-pagination-btn-border-hover)}.wg__pagination-btn:active:not(:disabled){background:var(--wg-pagination-btn-bg-active)}.wg__pagination-btn:disabled{opacity:var(--wg-pagination-btn-disabled-opacity);cursor:not-allowed}.wg__pagination-info{font-size:var(--wg-font-size-base);color:var(--wg-cell-color)}.wg__pagination-count{font-size:var(--wg-font-size-sm);color:var(--wg-text-color-3);margin-left:4px}.wg__pagination-pagesize{display:flex;align-items:center;gap:6px}.wg__pagination-select{padding:4px 8px;background:var(--wg-pagination-btn-bg);border:var(--wg-pagination-btn-border);border-radius:var(--wg-pagination-btn-border-radius);color:var(--wg-cell-color);font-size:var(--wg-font-size-base);cursor:pointer}.wg__pagination-select:hover{background:var(--wg-pagination-btn-bg-hover);border:var(--wg-pagination-btn-border-hover)}.wg__pagination-select:focus{outline:2px solid var(--wg-accent-color);outline-offset:-2px}.wg__pagination-label{font-size:var(--wg-font-size-sm);color:var(--wg-text-color-3)}.wg__pagination--left{justify-content:flex-start}.wg__pagination--right{justify-content:flex-end}.wg__pagination--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__summary{display:flex;align-items:center;padding:var(--wg-pagination-padding);border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg);font-size:var(--wg-font-size-base);color:var(--wg-cell-color)}.wg__summary--left{justify-content:flex-start}.wg__summary--right{justify-content:flex-end}.wg__summary--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__footer{display:flex;align-items:center;justify-content:space-between;border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg)}.wg__footer--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__footer .wg__summary,.wg__footer .wg__pagination{border:none}.wg__footer .wg__summary{flex:0 0 auto}.wg__footer .wg__pagination{flex:0 0 auto;margin-left:auto}.wg__toolbar-container{position:fixed;z-index:var(--wg-z-toolbar, 1000)}.wg__toolbar{display:flex;flex-direction:column-reverse;gap:0;padding:0;background:var(--wg-toolbar-bg);border:var(--wg-toolbar-border);border-radius:var(--wg-toolbar-border-radius);box-shadow:var(--wg-toolbar-shadow)}.wg__toolbar-row{display:flex;gap:2px;align-items:center;height:calc(var(--wg-design-unit, 4) * 4px + 21px);padding:0 4px}.wg__toolbar-row+.wg__toolbar-row{border-top:1px solid var(--wg-toolbar-divider-color)}.wg__toolbar-divider{width:1px;height:16px;background:var(--wg-toolbar-divider-color);margin:0 4px;flex-shrink:0}.wg__toolbar-btn{min-width:var(--wg-toolbar-btn-min-width);height:100%;border:none;border-radius:var(--wg-toolbar-btn-border-radius);background:transparent;color:var(--wg-toolbar-btn-color);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:4px;font-size:var(--wg-font-size-base);font-weight:500;padding:var(--wg-toolbar-btn-padding);transition:background .1s ease}.wg__toolbar-btn:hover{background:var(--wg-toolbar-btn-bg-hover)}.wg__toolbar-btn:active{background:var(--wg-toolbar-btn-bg-active)}.wg__toolbar-btn:disabled{opacity:.5;cursor:not-allowed}.wg__toolbar-btn:disabled:hover{background:transparent}.wg__toolbar-btn--danger:hover{background:var(--wg-danger-bg-light);color:var(--wg-danger-color)}.wg__toolbar-label{font-size:12px;white-space:nowrap}.wg__actions-column{width:24px;min-width:24px;max-width:24px;padding:0!important;text-align:center}.wg__header .wg__actions-column{background:var(--wg-header-bg)}.wg__filter-row .wg__actions-column{background:var(--wg-filter-bg)}.wg__toolbar-trigger{position:relative;padding:0;background:transparent;border:none;border-radius:var(--wg-border-radius-sm);cursor:pointer;font-size:var(--wg-font-size-base);line-height:1;color:var(--wg-toolbar-trigger-color)}.wg__toolbar-trigger:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:48px}.wg__toolbar-trigger:hover,.wg__toolbar-trigger--active{color:var(--wg-toolbar-trigger-color-hover);background:var(--wg-toolbar-trigger-bg-hover)}.wg--striped tbody tr:nth-child(2n){background:var(--wg-row-bg-even)}.wg--hoverable tbody tr:hover{background:var(--wg-row-bg-hover)}.wg__empty{text-align:center;padding:var(--wg-empty-padding);color:var(--wg-empty-color);font-style:italic}.wg__loading-more{text-align:center;padding:var(--wg-cell-padding);color:var(--wg-text-color-2);font-size:var(--wg-font-size-sm)}.wg__tooltip{position:fixed;z-index:var(--wg-z-tooltip, 10000);max-width:300px;padding:6px 10px;background:var(--wg-tooltip-bg, #333);color:var(--wg-tooltip-color, #fff);font-size:var(--wg-font-size-sm);line-height:1.4;border-radius:var(--wg-border-radius-sm);box-shadow:0 2px 8px #0003;pointer-events:none;opacity:0;transition:opacity var(--wg-transition-fast)}.wg__tooltip--visible{opacity:1}.wg__tooltip-arrow{position:absolute;width:8px;height:8px;background:var(--wg-tooltip-bg, #333);transform:rotate(45deg)}.wg__tooltip[data-placement^=top] .wg__tooltip-arrow{bottom:-4px}.wg__tooltip[data-placement^=bottom] .wg__tooltip-arrow{top:-4px}.wg__tooltip[data-placement^=left] .wg__tooltip-arrow{right:-4px}.wg__tooltip[data-placement^=right] .wg__tooltip-arrow{left:-4px}.wg__goto-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.wg__goto-dialog{background:var(--wg-surface-1);border-radius:var(--wg-border-radius);padding:var(--wg-spacing-lg);box-shadow:0 4px 20px #00000026;min-width:250px}.wg__goto-label{display:block;margin-bottom:var(--wg-spacing-sm);font-size:var(--wg-font-size-base);color:var(--wg-text-color-1)}.wg__goto-input{width:100%;padding:var(--wg-spacing-sm) var(--wg-spacing-md);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);font-size:var(--wg-font-size-base);margin-bottom:var(--wg-spacing-md);box-sizing:border-box}.wg__goto-input:focus{outline:none;border-color:var(--wg-accent-color);box-shadow:0 0 0 2px #0078d433}.wg__goto-buttons{display:flex;gap:var(--wg-spacing-sm);justify-content:flex-end}.wg__goto-btn{padding:var(--wg-spacing-sm) var(--wg-spacing-md);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);font-size:var(--wg-font-size-sm);cursor:pointer;background:var(--wg-surface-1);color:var(--wg-text-color-1)}.wg__goto-btn:hover{background:var(--wg-surface-2)}.wg__goto-btn--go{background:var(--wg-accent-color);border-color:var(--wg-accent-color);color:#fff}.wg__goto-btn--go:hover{background:var(--wg-accent-color-hover, #106ebe)}.wg__spacer-top td,.wg__spacer-bottom td{padding:0;border:none;background:transparent;height:inherit;line-height:0}@media (prefers-color-scheme: dark){:host{--wg-surface-1: #1f1f1f;--wg-surface-2: #2b2b2b;--wg-surface-3: #333333;--wg-surface-floating: #2b2b2b;--wg-text-color-1: #e0e0e0;--wg-text-color-2: #c0c0c0;--wg-text-color-3: #a0a0a0;--wg-border-color: #3d3d3d;--wg-border-color-hover: #5a5a5a;--wg-input-bg: #1f1f1f;--wg-input-border: 1px solid #5a5a5a;--wg-hover-bg: #3a3a3a;--wg-active-bg: #4a4a4a;--wg-danger-bg-light: #442726;--wg-danger-color: #f87c86}}:host([data-theme="dark"]),[data-theme=dark] :host,:host([data-bs-theme="dark"]),[data-bs-theme=dark] :host,.dark :host{--wg-surface-1: #1f1f1f;--wg-surface-2: #2b2b2b;--wg-surface-3: #333333;--wg-surface-floating: #2b2b2b;--wg-text-color-1: #e0e0e0;--wg-text-color-2: #c0c0c0;--wg-text-color-3: #a0a0a0;--wg-border-color: #3d3d3d;--wg-border-color-hover: #5a5a5a;--wg-input-bg: #1f1f1f;--wg-input-border: 1px solid #5a5a5a;--wg-hover-bg: #3a3a3a;--wg-active-bg: #4a4a4a;--wg-danger-bg-light: #442726;--wg-danger-color: #f87c86}';
|
|
724
|
-
function
|
|
744
|
+
const je = ':host{--wg-rem: 10px;font-family:var(--wg-font-family, var(--base-font-family, system-ui, -apple-system, sans-serif));display:block;--wg-accent-color: var(--base-accent-color, #0078d4);--wg-accent-color-hover: var(--base-accent-color-hover, #106ebe);--wg-accent-color-active: var(--base-accent-color-active, #005a9e);--wg-accent-color-light: var(--base-accent-color-light, #e6f2ff);--wg-text-color-1: var(--base-text-color-1, #242424);--wg-text-color-2: var(--base-text-color-2, #424242);--wg-text-color-3: var(--base-text-color-3, #707070);--wg-text-on-accent: var(--base-text-color-on-accent, #ffffff);--wg-surface-1: var(--base-main-bg, #ffffff);--wg-surface-2: var(--base-elevated-bg, #f5f5f5);--wg-surface-3: var(--base-hover-bg, #ebebeb);--wg-surface-floating: var(--base-dropdown-bg, var(--base-main-bg, #ffffff));--wg-border-color: var(--base-border-color, #e0e0e0);--wg-border-color-hover: var(--base-border-color, #d1d1d1);--wg-input-bg: var(--base-input-bg, #ffffff);--wg-input-color: var(--base-input-color, var(--wg-text-color-1));--wg-input-border: var(--base-input-border, 1px solid #d1d1d1);--wg-input-border-hover: var(--base-input-border-hover, 1px solid #0078d4);--wg-input-border-focus: var(--base-input-border-focus, 1px solid #0078d4);--wg-input-placeholder-color: var(--base-input-placeholder-color, #707070);--wg-danger-color: var(--base-danger-color, #d13438);--wg-danger-bg-light: var(--base-danger-bg-light, #fde7e9);--wg-hover-bg: var(--base-hover-bg, #f0f0f0);--wg-active-bg: var(--base-hover-bg, #e0e0e0);--wg-font-size-base: calc(var(--base-font-size-base, 1.4) * var(--wg-rem));--wg-font-size-sm: calc(var(--base-font-size-sm, 1.2) * var(--wg-rem));--wg-font-size-xs: calc(var(--base-font-size-xs, 1.1) * var(--wg-rem));--wg-font-size-lg: calc(var(--base-font-size-lg, 1.6) * var(--wg-rem));--wg-line-height-base: calc(var(--base-line-height-normal, 2) * var(--wg-rem));--wg-font-weight-normal: var(--base-font-weight-normal, 400);--wg-font-weight-semibold: var(--base-font-weight-semibold, 600);--wg-border-radius-sm: calc(var(--base-border-radius-sm, .4) * var(--wg-rem));--wg-border-radius-md: calc(var(--base-border-radius-md, .6) * var(--wg-rem));--wg-border-radius-lg: calc(var(--base-border-radius-lg, .8) * var(--wg-rem));--wg-spacing-xs: calc(.4 * var(--wg-rem));--wg-spacing-sm: calc(.8 * var(--wg-rem));--wg-spacing-md: calc(1.2 * var(--wg-rem));--wg-spacing-lg: calc(1.6 * var(--wg-rem));--wg-spacing-xl: calc(2.4 * var(--wg-rem));--wg-table-bg: var(--wg-surface-1);--wg-table-border: 1px solid var(--wg-border-color);--wg-header-bg: var(--wg-surface-2);--wg-header-bg-hover: var(--wg-surface-3);--wg-header-bg-sorted: var(--wg-surface-3);--wg-header-color: var(--wg-text-color-1);--wg-header-border: 2px solid var(--wg-border-color);--wg-header-padding: var(--wg-spacing-sm) var(--wg-spacing-md);--wg-header-font-weight: var(--wg-font-weight-semibold);--wg-cell-padding: var(--wg-spacing-sm) var(--wg-spacing-md);--wg-cell-color: var(--wg-text-color-1);--wg-cell-border: 1px solid var(--wg-border-color);--wg-cell-bg-hover: var(--wg-hover-bg);--wg-cell-bg-editing: var(--wg-surface-1);--wg-cell-readonly-bg: var(--wg-surface-2);--wg-row-border: 1px solid var(--wg-border-color);--wg-row-bg-even: var(--wg-surface-2);--wg-row-bg-hover: var(--wg-surface-3);--wg-filter-bg: var(--wg-surface-1);--wg-filter-border: 1px solid var(--wg-border-color);--wg-filter-padding: var(--wg-spacing-xs) var(--wg-spacing-sm);--wg-filter-input-padding: calc(.4 * var(--wg-rem)) calc(.8 * var(--wg-rem));--wg-filter-input-bg: var(--wg-input-bg);--wg-filter-input-border: var(--wg-input-border);--wg-filter-input-border-focus: var(--wg-input-border-focus);--wg-filter-input-border-radius: var(--wg-border-radius-sm);--wg-filter-input-font-size: var(--wg-font-size-sm);--wg-sort-indicator-size: calc(1.4 * var(--wg-rem));--wg-sort-indicator-opacity: .9;--wg-sort-placeholder-opacity: .3;--wg-sort-priority-size: calc(1.1 * var(--wg-rem));--wg-pagination-padding: var(--wg-spacing-md);--wg-pagination-gap: calc(1.6 * var(--wg-rem));--wg-pagination-bg: var(--wg-surface-1);--wg-pagination-border: 1px solid var(--wg-border-color);--wg-pagination-btn-padding: calc(.6 * var(--wg-rem)) calc(1.6 * var(--wg-rem));--wg-pagination-btn-bg: var(--wg-surface-1);--wg-pagination-btn-bg-hover: var(--wg-surface-2);--wg-pagination-btn-bg-active: var(--wg-surface-3);--wg-pagination-btn-border: 1px solid var(--wg-border-color);--wg-pagination-btn-border-hover: 1px solid var(--wg-border-color-hover);--wg-pagination-btn-border-radius: var(--wg-border-radius-sm);--wg-pagination-btn-disabled-opacity: .4;--wg-empty-padding: var(--wg-spacing-xl);--wg-empty-color: var(--wg-text-color-3);--wg-error-cell-bg: var(--wg-danger-bg-light);--wg-error-cell-border: 1px solid var(--wg-danger-color);--wg-error-message-color: var(--wg-danger-color);--wg-error-message-font-size: var(--wg-font-size-xs);--wg-error-indicator-color: var(--wg-danger-color);--wg-editor-bg: var(--wg-surface-1);--wg-editor-outline: 2px solid var(--wg-accent-color);--wg-editor-outline-offset: -2px;--wg-editor-validating-opacity: .7;--wg-dropdown-toggle-right: var(--wg-spacing-md);--wg-dropdown-toggle-size: calc(1.2 * var(--wg-rem));--wg-dropdown-toggle-hitbox: calc(2.4 * var(--wg-rem));--wg-toolbar-bg: var(--wg-surface-floating);--wg-toolbar-border: 1px solid var(--wg-border-color);--wg-toolbar-border-radius: var(--wg-border-radius-sm);--wg-toolbar-shadow: var(--base-dropdown-box-shadow, 0 2px 8px rgba(0, 0, 0, .15));--wg-toolbar-divider-color: var(--wg-border-color);--wg-toolbar-btn-min-width: calc(2.4 * var(--wg-rem));--wg-toolbar-btn-padding: 0 calc(.4 * var(--wg-rem));--wg-toolbar-btn-border-radius: var(--wg-border-radius-sm);--wg-toolbar-btn-bg-hover: var(--wg-hover-bg);--wg-toolbar-btn-bg-active: var(--wg-active-bg);--wg-toolbar-btn-color: var(--wg-text-color-1);--wg-toolbar-trigger-color: var(--wg-text-color-3);--wg-toolbar-trigger-color-hover: var(--wg-text-color-1);--wg-toolbar-trigger-bg-hover: var(--wg-hover-bg);--wg-tooltip-bg: var(--base-tooltip-bg, #333);--wg-context-menu-z-index: 1001;--wg-context-menu-min-width: calc(16 * var(--wg-rem));--wg-focus-outline: 2px solid var(--wg-accent-color);--wg-focus-outline-offset: -2px;--wg-focus-bg: var(--wg-hover-bg);--wg-transition-fast: .1s ease;--wg-transition-normal: .15s ease;--wg-z-dropdown: 9999;--wg-z-toolbar: 1000;--wg-z-context-menu: 1001}web-grid:not(:defined){display:block;min-height:calc(10 * var(--wg-rem));color:transparent!important;background:transparent}.wg{position:relative;width:100%;max-height:inherit;overflow:auto;overscroll-behavior:contain;border:var(--wg-table-border)}.wg__table{width:max-content;min-width:100%;border-collapse:collapse;table-layout:fixed;background:var(--wg-table-bg);font-size:var(--wg-font-size-base);line-height:var(--wg-line-height-base)}.wg__table tbody tr{border-bottom:var(--wg-row-border)}.wg__row-number-header,.wg__row-number{width:40px;min-width:40px;max-width:40px;text-align:center;color:var(--wg-text-color-secondary);background:var(--wg-header-bg);-webkit-user-select:none;user-select:none;font-size:var(--wg-font-size-sm)}.wg__row-number{border-right:var(--wg-cell-border)}.wg__actions-column{width:32px;min-width:32px;max-width:32px;padding:0!important;text-align:center}thead .wg__actions-column{background:var(--wg-header-bg);border-bottom:var(--wg-header-border)}.wg__filter-row .wg__actions-column{background:var(--wg-filter-bg);border-bottom:var(--wg-filter-border)}.wg__header{position:sticky;top:0;z-index:1;background:var(--wg-header-bg);color:var(--wg-header-color);font-weight:var(--wg-header-font-weight);padding:var(--wg-header-padding);border-bottom:var(--wg-header-border);text-align:left;-webkit-user-select:none;user-select:none}.wg__header--sortable{cursor:pointer}.wg__header--sortable:hover{background:var(--wg-header-bg-hover)}.wg__header--sorted{background:var(--wg-header-bg-sorted)}.wg__header-content{display:flex;align-items:center;gap:4px;justify-content:space-between}.wg__header-title{flex:1}.wg__sort-indicator{font-size:var(--wg-sort-indicator-size);opacity:var(--wg-sort-indicator-opacity);min-width:16px;text-align:center;display:inline-flex;align-items:center}.wg__sort-placeholder{opacity:var(--wg-sort-placeholder-opacity)}.wg__sort-priority{font-size:var(--wg-sort-priority-size);font-weight:600;margin-left:2px;vertical-align:super;line-height:1}.wg__header-info{display:inline-flex;align-items:center;color:var(--wg-accent-color);cursor:help;opacity:.7;margin-left:4px;vertical-align:middle}.wg__header-info:hover{opacity:1}.wg__filter-row th{padding:var(--wg-filter-padding);background:var(--wg-filter-bg);border-bottom:var(--wg-filter-border)}.wg__filter-input{width:100%;padding:var(--wg-filter-input-padding);border:var(--wg-filter-input-border);border-radius:var(--wg-filter-input-border-radius);background:var(--wg-surface-1);color:var(--wg-text-color-1);font-size:var(--wg-filter-input-font-size);box-sizing:border-box}.wg__filter-input:focus{outline:none;border:var(--wg-filter-input-border-focus);box-shadow:0 0 0 1px var(--wg-accent-color)}.wg__cell{padding:var(--wg-cell-padding);color:var(--wg-cell-color);scroll-margin-top:3rem;scroll-margin-bottom:.5rem}.wg__cell-text{-webkit-user-select:none;user-select:none}.wg__cell--ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__cell--editable{cursor:pointer;position:relative}.wg__cell--editable:hover{background:var(--wg-cell-bg-hover)}.wg__cell--editable:hover:after{content:"";position:absolute;top:2px;right:2px;bottom:2px;left:2px;border:1px dashed var(--wg-border-color);border-radius:2px;pointer-events:none}.wg__cell--editing{position:relative;background:var(--wg-surface-1);outline:2px solid var(--wg-accent-color);outline-offset:-2px}.wg__cell--editing:after{display:none}.wg__cell--invalid{background:var(--wg-danger-bg-light, #fee);box-shadow:inset 0 0 0 2px var(--wg-danger-color, #c00)}.wg--navigate-mode .wg__cell:not(.wg__cell--editable){background:var(--wg-cell-readonly-bg, #f5f5f5)}.wg__editor{position:absolute;top:0;left:0;right:0;width:100%;padding:var(--wg-cell-padding);border:none;background:transparent;color:var(--wg-text-color-1);font-size:var(--wg-font-size-base);font-family:inherit;line-height:inherit;box-sizing:border-box}.wg__editor:focus,.wg__editor:focus-visible{outline:none;box-shadow:none}.wg__editor--text{text-align:inherit}.wg__editor--number{text-align:right}.wg__editor--date{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:var(--wg-editor-bg)}.wg__date-input{flex:1;min-width:0;height:100%;border:none;background:transparent;font:inherit;padding:var(--wg-cell-padding-block) var(--wg-cell-padding-inline);outline:none;color:inherit}.wg__date-trigger{width:var(--wg-date-trigger-size, 28px);height:100%;display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--wg-text-secondary, #666);cursor:pointer;padding:0;flex-shrink:0}.wg__date-trigger:hover{color:var(--wg-accent-color, #0078d4);background:var(--wg-hover-bg, rgba(0, 0, 0, .05))}.wg__editor--checkbox{width:auto;height:auto;margin:0 auto}.wg__editor--custom{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:var(--wg-editor-bg);padding:var(--wg-cell-padding-block) var(--wg-cell-padding-inline);cursor:pointer}.wg__editor--custom:focus{outline:none}.wg__custom-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;cursor:pointer}.wg__editor--combobox,.wg__editor--autocomplete{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;padding:var(--wg-cell-padding);padding-right:0;background:transparent;box-sizing:border-box}.wg__combobox-input,.wg__autocomplete-input{flex:1;width:100%;height:100%;padding:0 24px 0 0;border:none;background:transparent;color:var(--wg-text-color-1);font-size:var(--wg-font-size-base);font-family:inherit;line-height:var(--wg-line-height-base);outline:none;box-sizing:border-box;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wg__combobox-input:focus,.wg__autocomplete-input:focus{outline:none}.wg__combobox-toggle{position:absolute;right:var(--wg-dropdown-toggle-right);top:50%;transform:translateY(-50%);font-size:var(--wg-dropdown-toggle-size);color:var(--wg-text-color-2);pointer-events:auto;cursor:pointer}.wg__combobox-toggle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:48px}.wg__loading-indicator{position:absolute;right:var(--wg-dropdown-toggle-right);top:50%;transform:translateY(-50%);font-size:12px;animation:wg-pulse 1s infinite}@keyframes wg-pulse{0%,to{opacity:1}50%{opacity:.4}}.wg__select-trigger{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:transparent}.wg__select-trigger:focus,.wg__select-trigger:focus-visible{outline:none;box-shadow:none}.wg__select-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__select-toggle{position:relative;font-size:var(--wg-dropdown-toggle-size);opacity:.6;margin-left:4px;flex-shrink:0;pointer-events:auto;cursor:pointer}.wg__select-toggle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:48px}.wg__cell-dropdown-display{display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer}.wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle{opacity:0}.wg__cell:hover .wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle,.wg__cell--focused .wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle{opacity:.6}.wg__cell-date-display{display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer}.wg__cell-date-display .wg__date-trigger{position:relative;background:none;border:none;padding:0;margin:0;cursor:pointer;opacity:.6;display:flex;align-items:center;justify-content:center;color:inherit}.wg__cell-date-display .wg__date-trigger:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:48px}.wg__cell-date-display--toggle-on-focus .wg__date-trigger{opacity:0}.wg__cell:hover .wg__cell-date-display--toggle-on-focus .wg__date-trigger,.wg__cell--focused .wg__cell-date-display--toggle-on-focus .wg__date-trigger{opacity:.6}.wg__dropdown{background:var(--wg-surface-floating, #fff);border:1px solid var(--wg-border-color, #d1d1d1);border-radius:4px;box-shadow:var(--wg-toolbar-shadow);max-height:200px;overflow-y:auto;font-size:var(--wg-font-size-base);font-family:inherit;line-height:var(--wg-line-height-base)}.wg__dropdown-option{display:flex;align-items:center;gap:var(--wg-spacing-sm);padding:6px 12px;cursor:pointer;color:var(--wg-text-color-1)}.wg__dropdown-option:hover,.wg__dropdown-option--highlighted{background:var(--wg-hover-bg, #f0f0f0)}.wg__dropdown-option--selected{background:var(--wg-accent-color-light, #e6f2ff)}.wg__dropdown-option--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.wg__dropdown-option-icon{flex-shrink:0;width:1.5em;text-align:center}.wg__dropdown-option-content{flex:1;min-width:0;overflow:hidden}.wg__dropdown-option-label{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wg__dropdown-option-subtitle{display:block;font-size:var(--wg-font-size-sm);color:var(--wg-text-color-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wg__dropdown-empty{padding:8px 12px;color:var(--wg-text-color-2);font-style:italic;text-align:center}.wg--navigate-mode .wg__cell{cursor:cell}.wg--navigate-mode .wg__cell:focus{outline:none}.wg--navigate-mode .wg__cell.wg__cell--focused{outline:2px solid var(--wg-focus-border-color, #217346);outline-offset:-2px}.wg__cell--focused:after{display:none}.wg__pagination{display:flex;align-items:center;justify-content:center;gap:var(--wg-pagination-gap);padding:var(--wg-pagination-padding);border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg)}.wg__pagination-btn{padding:var(--wg-pagination-btn-padding);background:var(--wg-pagination-btn-bg);border:var(--wg-pagination-btn-border);border-radius:var(--wg-pagination-btn-border-radius);color:var(--wg-cell-color);font-size:var(--wg-font-size-base);cursor:pointer;transition:all var(--wg-transition-fast)}.wg__pagination-btn:hover:not(:disabled){background:var(--wg-pagination-btn-bg-hover);border:var(--wg-pagination-btn-border-hover)}.wg__pagination-btn:active:not(:disabled){background:var(--wg-pagination-btn-bg-active)}.wg__pagination-btn:disabled{opacity:var(--wg-pagination-btn-disabled-opacity);cursor:not-allowed}.wg__pagination-info{font-size:var(--wg-font-size-base);color:var(--wg-cell-color)}.wg__pagination-count{font-size:var(--wg-font-size-sm);color:var(--wg-text-color-3);margin-left:4px}.wg__pagination-pagesize{display:flex;align-items:center;gap:6px}.wg__pagination-select{padding:4px 8px;background:var(--wg-pagination-btn-bg);border:var(--wg-pagination-btn-border);border-radius:var(--wg-pagination-btn-border-radius);color:var(--wg-cell-color);font-size:var(--wg-font-size-base);cursor:pointer}.wg__pagination-select:hover{background:var(--wg-pagination-btn-bg-hover);border:var(--wg-pagination-btn-border-hover)}.wg__pagination-select:focus{outline:2px solid var(--wg-accent-color);outline-offset:-2px}.wg__pagination-label{font-size:var(--wg-font-size-sm);color:var(--wg-text-color-3)}.wg__pagination--left{justify-content:flex-start}.wg__pagination--right{justify-content:flex-end}.wg__pagination--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__summary{display:flex;align-items:center;padding:var(--wg-pagination-padding);border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg);font-size:var(--wg-font-size-base);color:var(--wg-cell-color)}.wg__summary--left{justify-content:flex-start}.wg__summary--right{justify-content:flex-end}.wg__summary--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__footer{display:flex;align-items:center;justify-content:space-between;border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg)}.wg__footer--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__footer .wg__summary,.wg__footer .wg__pagination{border:none}.wg__footer .wg__summary{flex:0 0 auto}.wg__footer .wg__pagination{flex:0 0 auto;margin-left:auto}.wg__toolbar-container{position:fixed;z-index:var(--wg-z-toolbar, 1000)}.wg__toolbar{display:flex;flex-direction:column-reverse;gap:0;padding:0;background:var(--wg-toolbar-bg);border:var(--wg-toolbar-border);border-radius:var(--wg-toolbar-border-radius);box-shadow:var(--wg-toolbar-shadow)}.wg__toolbar-row{display:flex;gap:2px;align-items:center;height:calc(var(--wg-design-unit, 4) * 4px + 21px);padding:0 4px}.wg__toolbar-row+.wg__toolbar-row{border-top:1px solid var(--wg-toolbar-divider-color)}.wg__toolbar-divider{width:1px;height:16px;background:var(--wg-toolbar-divider-color);margin:0 4px;flex-shrink:0}.wg__toolbar-btn{min-width:var(--wg-toolbar-btn-min-width);height:100%;border:none;border-radius:var(--wg-toolbar-btn-border-radius);background:transparent;color:var(--wg-toolbar-btn-color);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:4px;font-size:var(--wg-font-size-base);font-weight:500;padding:var(--wg-toolbar-btn-padding);transition:background .1s ease}.wg__toolbar-btn:hover{background:var(--wg-toolbar-btn-bg-hover)}.wg__toolbar-btn:active{background:var(--wg-toolbar-btn-bg-active)}.wg__toolbar-btn:disabled{opacity:.5;cursor:not-allowed}.wg__toolbar-btn:disabled:hover{background:transparent}.wg__toolbar-btn--danger:hover{background:var(--wg-danger-bg-light);color:var(--wg-danger-color)}.wg__toolbar-label{font-size:12px;white-space:nowrap}.wg__actions-column{width:24px;min-width:24px;max-width:24px;padding:0!important;text-align:center}.wg__header .wg__actions-column{background:var(--wg-header-bg)}.wg__filter-row .wg__actions-column{background:var(--wg-filter-bg)}.wg__toolbar-trigger{position:relative;padding:0;background:transparent;border:none;border-radius:var(--wg-border-radius-sm);cursor:pointer;font-size:var(--wg-font-size-base);line-height:1;color:var(--wg-toolbar-trigger-color)}.wg__toolbar-trigger:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:48px}.wg__toolbar-trigger:hover,.wg__toolbar-trigger--active{color:var(--wg-toolbar-trigger-color-hover);background:var(--wg-toolbar-trigger-bg-hover)}.wg--striped tbody tr:nth-child(2n){background:var(--wg-row-bg-even)}.wg--hoverable tbody tr:hover{background:var(--wg-row-bg-hover)}.wg__empty{text-align:center;padding:var(--wg-empty-padding);color:var(--wg-empty-color);font-style:italic}.wg__loading-more{text-align:center;padding:var(--wg-cell-padding);color:var(--wg-text-color-2);font-size:var(--wg-font-size-sm)}.wg__tooltip{position:fixed;z-index:var(--wg-z-tooltip, 10000);max-width:300px;padding:6px 10px;background:var(--wg-tooltip-bg, #333);color:var(--wg-tooltip-color, #fff);font-size:var(--wg-font-size-sm);line-height:1.4;border-radius:var(--wg-border-radius-sm);box-shadow:0 2px 8px #0003;pointer-events:none;opacity:0;transition:opacity var(--wg-transition-fast)}.wg__tooltip--visible{opacity:1}.wg__tooltip-arrow{position:absolute;width:8px;height:8px;background:var(--wg-tooltip-bg, #333);transform:rotate(45deg)}.wg__tooltip[data-placement^=top] .wg__tooltip-arrow{bottom:-4px}.wg__tooltip[data-placement^=bottom] .wg__tooltip-arrow{top:-4px}.wg__tooltip[data-placement^=left] .wg__tooltip-arrow{right:-4px}.wg__tooltip[data-placement^=right] .wg__tooltip-arrow{left:-4px}.wg__goto-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.wg__goto-dialog{background:var(--wg-surface-1);border-radius:var(--wg-border-radius);padding:var(--wg-spacing-lg);box-shadow:0 4px 20px #00000026;min-width:250px}.wg__goto-label{display:block;margin-bottom:var(--wg-spacing-sm);font-size:var(--wg-font-size-base);color:var(--wg-text-color-1)}.wg__goto-input{width:100%;padding:var(--wg-spacing-sm) var(--wg-spacing-md);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);font-size:var(--wg-font-size-base);margin-bottom:var(--wg-spacing-md);box-sizing:border-box}.wg__goto-input:focus{outline:none;border-color:var(--wg-accent-color);box-shadow:0 0 0 2px #0078d433}.wg__goto-buttons{display:flex;gap:var(--wg-spacing-sm);justify-content:flex-end}.wg__goto-btn{padding:var(--wg-spacing-sm) var(--wg-spacing-md);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);font-size:var(--wg-font-size-sm);cursor:pointer;background:var(--wg-surface-1);color:var(--wg-text-color-1)}.wg__goto-btn:hover{background:var(--wg-surface-2)}.wg__goto-btn--go{background:var(--wg-accent-color);border-color:var(--wg-accent-color);color:#fff}.wg__goto-btn--go:hover{background:var(--wg-accent-color-hover, #106ebe)}.wg__spacer-top td,.wg__spacer-bottom td{padding:0;border:none;background:transparent;height:inherit;line-height:0}@media (prefers-color-scheme: dark){:host{--wg-surface-1: #1f1f1f;--wg-surface-2: #2b2b2b;--wg-surface-3: #333333;--wg-surface-floating: #2b2b2b;--wg-text-color-1: #e0e0e0;--wg-text-color-2: #c0c0c0;--wg-text-color-3: #a0a0a0;--wg-border-color: #3d3d3d;--wg-border-color-hover: #5a5a5a;--wg-input-bg: #1f1f1f;--wg-input-border: 1px solid #5a5a5a;--wg-hover-bg: #3a3a3a;--wg-active-bg: #4a4a4a;--wg-danger-bg-light: #442726;--wg-danger-color: #f87c86}}:host([data-theme="dark"]),[data-theme=dark] :host,:host([data-bs-theme="dark"]),[data-bs-theme=dark] :host,.dark :host{--wg-surface-1: #1f1f1f;--wg-surface-2: #2b2b2b;--wg-surface-3: #333333;--wg-surface-floating: #2b2b2b;--wg-text-color-1: #e0e0e0;--wg-text-color-2: #c0c0c0;--wg-text-color-3: #a0a0a0;--wg-border-color: #3d3d3d;--wg-border-color-hover: #5a5a5a;--wg-input-bg: #1f1f1f;--wg-input-border: 1px solid #5a5a5a;--wg-hover-bg: #3a3a3a;--wg-active-bg: #4a4a4a;--wg-danger-bg-light: #442726;--wg-danger-color: #f87c86}';
|
|
745
|
+
function Jt(t, e, o) {
|
|
725
746
|
const i = o.valueMember || "value", r = o.displayMember || "label", s = e.find((n) => n[i] === t);
|
|
726
747
|
return s ? String(s[r] ?? "") : t != null ? String(t) : "";
|
|
727
748
|
}
|
|
@@ -730,92 +751,92 @@ function yt(t, e) {
|
|
|
730
751
|
const o = e.displayMember || "label";
|
|
731
752
|
return String(t[o] ?? t.label ?? "");
|
|
732
753
|
}
|
|
733
|
-
function
|
|
754
|
+
function at(t, e) {
|
|
734
755
|
if (e.getValueCallback) return e.getValueCallback(t);
|
|
735
756
|
const o = e.valueMember || "value";
|
|
736
757
|
return t[o] ?? t.value;
|
|
737
758
|
}
|
|
738
|
-
function
|
|
759
|
+
function Be(t, e) {
|
|
739
760
|
return e.getIconCallback ? e.getIconCallback(t) : e.iconMember && t[e.iconMember] || null;
|
|
740
761
|
}
|
|
741
|
-
function
|
|
762
|
+
function Ke(t, e) {
|
|
742
763
|
return e.getSubtitleCallback ? e.getSubtitleCallback(t) : e.subtitleMember && t[e.subtitleMember] || null;
|
|
743
764
|
}
|
|
744
765
|
function mt(t, e) {
|
|
745
766
|
return e.getDisabledCallback ? e.getDisabledCallback(t) : e.disabledMember ? !!t[e.disabledMember] : !1;
|
|
746
767
|
}
|
|
747
|
-
const
|
|
768
|
+
const it = Math.min, q = Math.max, xt = Math.round, St = Math.floor, G = (t) => ({
|
|
748
769
|
x: t,
|
|
749
770
|
y: t
|
|
750
|
-
}),
|
|
771
|
+
}), We = {
|
|
751
772
|
left: "right",
|
|
752
773
|
right: "left",
|
|
753
774
|
bottom: "top",
|
|
754
775
|
top: "bottom"
|
|
755
|
-
},
|
|
776
|
+
}, Xe = {
|
|
756
777
|
start: "end",
|
|
757
778
|
end: "start"
|
|
758
779
|
};
|
|
759
|
-
function
|
|
760
|
-
return
|
|
780
|
+
function Ut(t, e, o) {
|
|
781
|
+
return q(t, it(e, o));
|
|
761
782
|
}
|
|
762
|
-
function
|
|
783
|
+
function pt(t, e) {
|
|
763
784
|
return typeof t == "function" ? t(e) : t;
|
|
764
785
|
}
|
|
765
|
-
function
|
|
786
|
+
function rt(t) {
|
|
766
787
|
return t.split("-")[0];
|
|
767
788
|
}
|
|
768
|
-
function
|
|
789
|
+
function ft(t) {
|
|
769
790
|
return t.split("-")[1];
|
|
770
791
|
}
|
|
771
|
-
function
|
|
792
|
+
function Se(t) {
|
|
772
793
|
return t === "x" ? "y" : "x";
|
|
773
794
|
}
|
|
774
|
-
function
|
|
795
|
+
function Zt(t) {
|
|
775
796
|
return t === "y" ? "height" : "width";
|
|
776
797
|
}
|
|
777
|
-
const
|
|
798
|
+
const Qe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
778
799
|
function tt(t) {
|
|
779
|
-
return
|
|
800
|
+
return Qe.has(rt(t)) ? "y" : "x";
|
|
780
801
|
}
|
|
781
|
-
function
|
|
782
|
-
return
|
|
802
|
+
function te(t) {
|
|
803
|
+
return Se(tt(t));
|
|
783
804
|
}
|
|
784
|
-
function
|
|
805
|
+
function Ge(t, e, o) {
|
|
785
806
|
o === void 0 && (o = !1);
|
|
786
|
-
const i =
|
|
807
|
+
const i = ft(t), r = te(t), s = Zt(r);
|
|
787
808
|
let n = r === "x" ? i === (o ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
788
809
|
return e.reference[s] > e.floating[s] && (n = kt(n)), [n, kt(n)];
|
|
789
810
|
}
|
|
790
|
-
function
|
|
811
|
+
function Je(t) {
|
|
791
812
|
const e = kt(t);
|
|
792
|
-
return [
|
|
813
|
+
return [jt(t), e, jt(e)];
|
|
793
814
|
}
|
|
794
|
-
function
|
|
795
|
-
return t.replace(/start|end/g, (e) =>
|
|
815
|
+
function jt(t) {
|
|
816
|
+
return t.replace(/start|end/g, (e) => Xe[e]);
|
|
796
817
|
}
|
|
797
|
-
const
|
|
798
|
-
function
|
|
818
|
+
const ae = ["left", "right"], le = ["right", "left"], Ze = ["top", "bottom"], to = ["bottom", "top"];
|
|
819
|
+
function eo(t, e, o) {
|
|
799
820
|
switch (t) {
|
|
800
821
|
case "top":
|
|
801
822
|
case "bottom":
|
|
802
|
-
return o ? e ?
|
|
823
|
+
return o ? e ? le : ae : e ? ae : le;
|
|
803
824
|
case "left":
|
|
804
825
|
case "right":
|
|
805
|
-
return e ?
|
|
826
|
+
return e ? Ze : to;
|
|
806
827
|
default:
|
|
807
828
|
return [];
|
|
808
829
|
}
|
|
809
830
|
}
|
|
810
|
-
function
|
|
811
|
-
const r =
|
|
812
|
-
let s =
|
|
813
|
-
return r && (s = s.map((n) => n + "-" + r), e && (s = s.concat(s.map(
|
|
831
|
+
function oo(t, e, o, i) {
|
|
832
|
+
const r = ft(t);
|
|
833
|
+
let s = eo(rt(t), o === "start", i);
|
|
834
|
+
return r && (s = s.map((n) => n + "-" + r), e && (s = s.concat(s.map(jt)))), s;
|
|
814
835
|
}
|
|
815
836
|
function kt(t) {
|
|
816
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
837
|
+
return t.replace(/left|right|bottom|top/g, (e) => We[e]);
|
|
817
838
|
}
|
|
818
|
-
function
|
|
839
|
+
function io(t) {
|
|
819
840
|
return {
|
|
820
841
|
top: 0,
|
|
821
842
|
right: 0,
|
|
@@ -824,8 +845,8 @@ function Ze(t) {
|
|
|
824
845
|
...t
|
|
825
846
|
};
|
|
826
847
|
}
|
|
827
|
-
function
|
|
828
|
-
return typeof t != "number" ?
|
|
848
|
+
function xe(t) {
|
|
849
|
+
return typeof t != "number" ? io(t) : {
|
|
829
850
|
top: t,
|
|
830
851
|
right: t,
|
|
831
852
|
bottom: t,
|
|
@@ -850,12 +871,12 @@ function Dt(t) {
|
|
|
850
871
|
y: o
|
|
851
872
|
};
|
|
852
873
|
}
|
|
853
|
-
function
|
|
874
|
+
function de(t, e, o) {
|
|
854
875
|
let {
|
|
855
876
|
reference: i,
|
|
856
877
|
floating: r
|
|
857
878
|
} = t;
|
|
858
|
-
const s = tt(e), n =
|
|
879
|
+
const s = tt(e), n = te(e), d = Zt(n), a = rt(e), c = s === "y", l = i.x + i.width / 2 - r.width / 2, g = i.y + i.height / 2 - r.height / 2, h = i[d] / 2 - r[d] / 2;
|
|
859
880
|
let u;
|
|
860
881
|
switch (a) {
|
|
861
882
|
case "top":
|
|
@@ -888,7 +909,7 @@ function ae(t, e, o) {
|
|
|
888
909
|
y: i.y
|
|
889
910
|
};
|
|
890
911
|
}
|
|
891
|
-
switch (
|
|
912
|
+
switch (ft(e)) {
|
|
892
913
|
case "start":
|
|
893
914
|
u[n] -= h * (o && c ? -1 : 1);
|
|
894
915
|
break;
|
|
@@ -898,7 +919,7 @@ function ae(t, e, o) {
|
|
|
898
919
|
}
|
|
899
920
|
return u;
|
|
900
921
|
}
|
|
901
|
-
const
|
|
922
|
+
const ro = async (t, e, o) => {
|
|
902
923
|
const {
|
|
903
924
|
placement: i = "bottom",
|
|
904
925
|
strategy: r = "absolute",
|
|
@@ -912,17 +933,17 @@ const to = async (t, e, o) => {
|
|
|
912
933
|
}), {
|
|
913
934
|
x: l,
|
|
914
935
|
y: g
|
|
915
|
-
} =
|
|
936
|
+
} = de(c, i, a), h = i, u = {}, p = 0;
|
|
916
937
|
for (let m = 0; m < d.length; m++) {
|
|
917
938
|
const {
|
|
918
939
|
name: f,
|
|
919
|
-
fn:
|
|
940
|
+
fn: v
|
|
920
941
|
} = d[m], {
|
|
921
|
-
x:
|
|
942
|
+
x: b,
|
|
922
943
|
y: _,
|
|
923
|
-
data:
|
|
944
|
+
data: S,
|
|
924
945
|
reset: y
|
|
925
|
-
} = await
|
|
946
|
+
} = await v({
|
|
926
947
|
x: l,
|
|
927
948
|
y: g,
|
|
928
949
|
initialPlacement: i,
|
|
@@ -936,11 +957,11 @@ const to = async (t, e, o) => {
|
|
|
936
957
|
floating: e
|
|
937
958
|
}
|
|
938
959
|
});
|
|
939
|
-
l =
|
|
960
|
+
l = b ?? l, g = _ ?? g, u = {
|
|
940
961
|
...u,
|
|
941
962
|
[f]: {
|
|
942
963
|
...u[f],
|
|
943
|
-
...
|
|
964
|
+
...S
|
|
944
965
|
}
|
|
945
966
|
}, y && p <= 50 && (p++, typeof y == "object" && (y.placement && (h = y.placement), y.rects && (c = y.rects === !0 ? await n.getElementRects({
|
|
946
967
|
reference: t,
|
|
@@ -949,7 +970,7 @@ const to = async (t, e, o) => {
|
|
|
949
970
|
}) : y.rects), {
|
|
950
971
|
x: l,
|
|
951
972
|
y: g
|
|
952
|
-
} =
|
|
973
|
+
} = de(c, h, a)), m = -1);
|
|
953
974
|
}
|
|
954
975
|
return {
|
|
955
976
|
x: l,
|
|
@@ -959,7 +980,7 @@ const to = async (t, e, o) => {
|
|
|
959
980
|
middlewareData: u
|
|
960
981
|
};
|
|
961
982
|
};
|
|
962
|
-
async function
|
|
983
|
+
async function ee(t, e) {
|
|
963
984
|
var o;
|
|
964
985
|
e === void 0 && (e = {});
|
|
965
986
|
const {
|
|
@@ -975,17 +996,17 @@ async function te(t, e) {
|
|
|
975
996
|
elementContext: g = "floating",
|
|
976
997
|
altBoundary: h = !1,
|
|
977
998
|
padding: u = 0
|
|
978
|
-
} =
|
|
999
|
+
} = pt(e, t), p = xe(u), f = d[h ? g === "floating" ? "reference" : "floating" : g], v = Dt(await s.getClippingRect({
|
|
979
1000
|
element: (o = await (s.isElement == null ? void 0 : s.isElement(f))) == null || o ? f : f.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(d.floating)),
|
|
980
1001
|
boundary: c,
|
|
981
1002
|
rootBoundary: l,
|
|
982
1003
|
strategy: a
|
|
983
|
-
})),
|
|
1004
|
+
})), b = g === "floating" ? {
|
|
984
1005
|
x: i,
|
|
985
1006
|
y: r,
|
|
986
1007
|
width: n.floating.width,
|
|
987
1008
|
height: n.floating.height
|
|
988
|
-
} : n.reference, _ = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(d.floating)),
|
|
1009
|
+
} : n.reference, _ = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(d.floating)), S = await (s.isElement == null ? void 0 : s.isElement(_)) ? await (s.getScale == null ? void 0 : s.getScale(_)) || {
|
|
989
1010
|
x: 1,
|
|
990
1011
|
y: 1
|
|
991
1012
|
} : {
|
|
@@ -993,18 +1014,18 @@ async function te(t, e) {
|
|
|
993
1014
|
y: 1
|
|
994
1015
|
}, y = Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
995
1016
|
elements: d,
|
|
996
|
-
rect:
|
|
1017
|
+
rect: b,
|
|
997
1018
|
offsetParent: _,
|
|
998
1019
|
strategy: a
|
|
999
|
-
}) :
|
|
1020
|
+
}) : b);
|
|
1000
1021
|
return {
|
|
1001
|
-
top: (
|
|
1002
|
-
bottom: (y.bottom -
|
|
1003
|
-
left: (
|
|
1004
|
-
right: (y.right -
|
|
1022
|
+
top: (v.top - y.top + p.top) / S.y,
|
|
1023
|
+
bottom: (y.bottom - v.bottom + p.bottom) / S.y,
|
|
1024
|
+
left: (v.left - y.left + p.left) / S.x,
|
|
1025
|
+
right: (y.right - v.right + p.right) / S.x
|
|
1005
1026
|
};
|
|
1006
1027
|
}
|
|
1007
|
-
const
|
|
1028
|
+
const no = (t) => ({
|
|
1008
1029
|
name: "arrow",
|
|
1009
1030
|
options: t,
|
|
1010
1031
|
async fn(e) {
|
|
@@ -1019,29 +1040,29 @@ const eo = (t) => ({
|
|
|
1019
1040
|
} = e, {
|
|
1020
1041
|
element: c,
|
|
1021
1042
|
padding: l = 0
|
|
1022
|
-
} =
|
|
1043
|
+
} = pt(t, e) || {};
|
|
1023
1044
|
if (c == null)
|
|
1024
1045
|
return {};
|
|
1025
|
-
const g =
|
|
1046
|
+
const g = xe(l), h = {
|
|
1026
1047
|
x: o,
|
|
1027
1048
|
y: i
|
|
1028
|
-
}, u =
|
|
1029
|
-
let x =
|
|
1030
|
-
(!x || !await (n.isElement == null ? void 0 : n.isElement(
|
|
1031
|
-
const
|
|
1049
|
+
}, u = te(r), p = Zt(u), m = await n.getDimensions(c), f = u === "y", v = f ? "top" : "left", b = f ? "bottom" : "right", _ = f ? "clientHeight" : "clientWidth", S = s.reference[p] + s.reference[u] - h[u] - s.floating[p], y = h[u] - s.reference[u], D = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(c));
|
|
1050
|
+
let x = D ? D[_] : 0;
|
|
1051
|
+
(!x || !await (n.isElement == null ? void 0 : n.isElement(D))) && (x = d.floating[_] || s.floating[p]);
|
|
1052
|
+
const C = S / 2 - y / 2, T = x / 2 - m[p] / 2 - 1, k = it(g[v], T), I = it(g[b], T), M = k, Q = x - m[p] - I, A = x / 2 - m[p] / 2 + C, O = Ut(M, A, Q), U = !a.arrow && ft(r) != null && A !== O && s.reference[p] / 2 - (A < M ? k : I) - m[p] / 2 < 0, P = U ? A < M ? A - M : A - Q : 0;
|
|
1032
1053
|
return {
|
|
1033
|
-
[u]: h[u] +
|
|
1054
|
+
[u]: h[u] + P,
|
|
1034
1055
|
data: {
|
|
1035
|
-
[u]:
|
|
1036
|
-
centerOffset:
|
|
1037
|
-
...
|
|
1038
|
-
alignmentOffset:
|
|
1056
|
+
[u]: O,
|
|
1057
|
+
centerOffset: A - O - P,
|
|
1058
|
+
...U && {
|
|
1059
|
+
alignmentOffset: P
|
|
1039
1060
|
}
|
|
1040
1061
|
},
|
|
1041
|
-
reset:
|
|
1062
|
+
reset: U
|
|
1042
1063
|
};
|
|
1043
1064
|
}
|
|
1044
|
-
}),
|
|
1065
|
+
}), so = function(t) {
|
|
1045
1066
|
return t === void 0 && (t = {}), {
|
|
1046
1067
|
name: "flip",
|
|
1047
1068
|
options: t,
|
|
@@ -1062,73 +1083,73 @@ const eo = (t) => ({
|
|
|
1062
1083
|
fallbackAxisSideDirection: p = "none",
|
|
1063
1084
|
flipAlignment: m = !0,
|
|
1064
1085
|
...f
|
|
1065
|
-
} =
|
|
1086
|
+
} = pt(t, e);
|
|
1066
1087
|
if ((o = s.arrow) != null && o.alignmentOffset)
|
|
1067
1088
|
return {};
|
|
1068
|
-
const
|
|
1069
|
-
!h &&
|
|
1070
|
-
const x = [d, ...y],
|
|
1071
|
-
let
|
|
1072
|
-
if (l && T.push(
|
|
1073
|
-
const
|
|
1074
|
-
T.push(
|
|
1089
|
+
const v = rt(r), b = tt(d), _ = rt(d) === d, S = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), y = h || (_ || !m ? [kt(d)] : Je(d)), D = p !== "none";
|
|
1090
|
+
!h && D && y.push(...oo(d, m, p, S));
|
|
1091
|
+
const x = [d, ...y], C = await ee(e, f), T = [];
|
|
1092
|
+
let k = ((i = s.flip) == null ? void 0 : i.overflows) || [];
|
|
1093
|
+
if (l && T.push(C[v]), g) {
|
|
1094
|
+
const A = Ge(r, n, S);
|
|
1095
|
+
T.push(C[A[0]], C[A[1]]);
|
|
1075
1096
|
}
|
|
1076
|
-
if (
|
|
1097
|
+
if (k = [...k, {
|
|
1077
1098
|
placement: r,
|
|
1078
1099
|
overflows: T
|
|
1079
|
-
}], !T.every((
|
|
1080
|
-
var
|
|
1081
|
-
const
|
|
1082
|
-
if (
|
|
1100
|
+
}], !T.every((A) => A <= 0)) {
|
|
1101
|
+
var I, M;
|
|
1102
|
+
const A = (((I = s.flip) == null ? void 0 : I.index) || 0) + 1, O = x[A];
|
|
1103
|
+
if (O && (!(g === "alignment" ? b !== tt(O) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1083
1104
|
// overflows the main axis.
|
|
1084
|
-
|
|
1105
|
+
k.every((H) => tt(H.placement) === b ? H.overflows[0] > 0 : !0)))
|
|
1085
1106
|
return {
|
|
1086
1107
|
data: {
|
|
1087
|
-
index:
|
|
1088
|
-
overflows:
|
|
1108
|
+
index: A,
|
|
1109
|
+
overflows: k
|
|
1089
1110
|
},
|
|
1090
1111
|
reset: {
|
|
1091
|
-
placement:
|
|
1112
|
+
placement: O
|
|
1092
1113
|
}
|
|
1093
1114
|
};
|
|
1094
|
-
let
|
|
1095
|
-
if (!
|
|
1115
|
+
let U = (M = k.filter((P) => P.overflows[0] <= 0).sort((P, H) => P.overflows[1] - H.overflows[1])[0]) == null ? void 0 : M.placement;
|
|
1116
|
+
if (!U)
|
|
1096
1117
|
switch (u) {
|
|
1097
1118
|
case "bestFit": {
|
|
1098
|
-
var
|
|
1099
|
-
const
|
|
1100
|
-
if (
|
|
1101
|
-
const
|
|
1102
|
-
return
|
|
1119
|
+
var Q;
|
|
1120
|
+
const P = (Q = k.filter((H) => {
|
|
1121
|
+
if (D) {
|
|
1122
|
+
const R = tt(H.placement);
|
|
1123
|
+
return R === b || // Create a bias to the `y` side axis due to horizontal
|
|
1103
1124
|
// reading directions favoring greater width.
|
|
1104
|
-
|
|
1125
|
+
R === "y";
|
|
1105
1126
|
}
|
|
1106
1127
|
return !0;
|
|
1107
|
-
}).map((
|
|
1108
|
-
|
|
1128
|
+
}).map((H) => [H.placement, H.overflows.filter((R) => R > 0).reduce((R, z) => R + z, 0)]).sort((H, R) => H[1] - R[1])[0]) == null ? void 0 : Q[0];
|
|
1129
|
+
P && (U = P);
|
|
1109
1130
|
break;
|
|
1110
1131
|
}
|
|
1111
1132
|
case "initialPlacement":
|
|
1112
|
-
|
|
1133
|
+
U = d;
|
|
1113
1134
|
break;
|
|
1114
1135
|
}
|
|
1115
|
-
if (r !==
|
|
1136
|
+
if (r !== U)
|
|
1116
1137
|
return {
|
|
1117
1138
|
reset: {
|
|
1118
|
-
placement:
|
|
1139
|
+
placement: U
|
|
1119
1140
|
}
|
|
1120
1141
|
};
|
|
1121
1142
|
}
|
|
1122
1143
|
return {};
|
|
1123
1144
|
}
|
|
1124
1145
|
};
|
|
1125
|
-
},
|
|
1126
|
-
async function
|
|
1146
|
+
}, ao = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1147
|
+
async function lo(t, e) {
|
|
1127
1148
|
const {
|
|
1128
1149
|
placement: o,
|
|
1129
1150
|
platform: i,
|
|
1130
1151
|
elements: r
|
|
1131
|
-
} = t, s = await (i.isRTL == null ? void 0 : i.isRTL(r.floating)), n =
|
|
1152
|
+
} = t, s = await (i.isRTL == null ? void 0 : i.isRTL(r.floating)), n = rt(o), d = ft(o), a = tt(o) === "y", c = ao.has(n) ? -1 : 1, l = s && a ? -1 : 1, g = pt(e, t);
|
|
1132
1153
|
let {
|
|
1133
1154
|
mainAxis: h,
|
|
1134
1155
|
crossAxis: u,
|
|
@@ -1150,7 +1171,7 @@ async function ro(t, e) {
|
|
|
1150
1171
|
y: u * l
|
|
1151
1172
|
};
|
|
1152
1173
|
}
|
|
1153
|
-
const
|
|
1174
|
+
const co = function(t) {
|
|
1154
1175
|
return t === void 0 && (t = 0), {
|
|
1155
1176
|
name: "offset",
|
|
1156
1177
|
options: t,
|
|
@@ -1161,7 +1182,7 @@ const no = function(t) {
|
|
|
1161
1182
|
y: s,
|
|
1162
1183
|
placement: n,
|
|
1163
1184
|
middlewareData: d
|
|
1164
|
-
} = e, a = await
|
|
1185
|
+
} = e, a = await lo(e, t);
|
|
1165
1186
|
return n === ((o = d.offset) == null ? void 0 : o.placement) && (i = d.arrow) != null && i.alignmentOffset ? {} : {
|
|
1166
1187
|
x: r + a.x,
|
|
1167
1188
|
y: s + a.y,
|
|
@@ -1172,7 +1193,7 @@ const no = function(t) {
|
|
|
1172
1193
|
};
|
|
1173
1194
|
}
|
|
1174
1195
|
};
|
|
1175
|
-
},
|
|
1196
|
+
}, go = function(t) {
|
|
1176
1197
|
return t === void 0 && (t = {}), {
|
|
1177
1198
|
name: "shift",
|
|
1178
1199
|
options: t,
|
|
@@ -1187,28 +1208,28 @@ const no = function(t) {
|
|
|
1187
1208
|
limiter: d = {
|
|
1188
1209
|
fn: (f) => {
|
|
1189
1210
|
let {
|
|
1190
|
-
x:
|
|
1191
|
-
y:
|
|
1211
|
+
x: v,
|
|
1212
|
+
y: b
|
|
1192
1213
|
} = f;
|
|
1193
1214
|
return {
|
|
1194
|
-
x:
|
|
1195
|
-
y:
|
|
1215
|
+
x: v,
|
|
1216
|
+
y: b
|
|
1196
1217
|
};
|
|
1197
1218
|
}
|
|
1198
1219
|
},
|
|
1199
1220
|
...a
|
|
1200
|
-
} =
|
|
1221
|
+
} = pt(t, e), c = {
|
|
1201
1222
|
x: o,
|
|
1202
1223
|
y: i
|
|
1203
|
-
}, l = await
|
|
1224
|
+
}, l = await ee(e, a), g = tt(rt(r)), h = Se(g);
|
|
1204
1225
|
let u = c[h], p = c[g];
|
|
1205
1226
|
if (s) {
|
|
1206
|
-
const f = h === "y" ? "top" : "left",
|
|
1207
|
-
u =
|
|
1227
|
+
const f = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", b = u + l[f], _ = u - l[v];
|
|
1228
|
+
u = Ut(b, u, _);
|
|
1208
1229
|
}
|
|
1209
1230
|
if (n) {
|
|
1210
|
-
const f = g === "y" ? "top" : "left",
|
|
1211
|
-
p =
|
|
1231
|
+
const f = g === "y" ? "top" : "left", v = g === "y" ? "bottom" : "right", b = p + l[f], _ = p - l[v];
|
|
1232
|
+
p = Ut(b, p, _);
|
|
1212
1233
|
}
|
|
1213
1234
|
const m = d.fn({
|
|
1214
1235
|
...e,
|
|
@@ -1228,7 +1249,7 @@ const no = function(t) {
|
|
|
1228
1249
|
};
|
|
1229
1250
|
}
|
|
1230
1251
|
};
|
|
1231
|
-
},
|
|
1252
|
+
}, uo = function(t) {
|
|
1232
1253
|
return t === void 0 && (t = {}), {
|
|
1233
1254
|
name: "size",
|
|
1234
1255
|
options: t,
|
|
@@ -1243,21 +1264,21 @@ const no = function(t) {
|
|
|
1243
1264
|
apply: a = () => {
|
|
1244
1265
|
},
|
|
1245
1266
|
...c
|
|
1246
|
-
} =
|
|
1267
|
+
} = pt(t, e), l = await ee(e, c), g = rt(r), h = ft(r), u = tt(r) === "y", {
|
|
1247
1268
|
width: p,
|
|
1248
1269
|
height: m
|
|
1249
1270
|
} = s.floating;
|
|
1250
|
-
let f,
|
|
1251
|
-
g === "top" || g === "bottom" ? (f = g,
|
|
1252
|
-
const
|
|
1253
|
-
let x =
|
|
1254
|
-
if ((o = e.middlewareData.shift) != null && o.enabled.x && (
|
|
1255
|
-
const
|
|
1256
|
-
u ?
|
|
1271
|
+
let f, v;
|
|
1272
|
+
g === "top" || g === "bottom" ? (f = g, v = h === (await (n.isRTL == null ? void 0 : n.isRTL(d.floating)) ? "start" : "end") ? "left" : "right") : (v = g, f = h === "end" ? "top" : "bottom");
|
|
1273
|
+
const b = m - l.top - l.bottom, _ = p - l.left - l.right, S = it(m - l[f], b), y = it(p - l[v], _), D = !e.middlewareData.shift;
|
|
1274
|
+
let x = S, C = y;
|
|
1275
|
+
if ((o = e.middlewareData.shift) != null && o.enabled.x && (C = _), (i = e.middlewareData.shift) != null && i.enabled.y && (x = b), D && !h) {
|
|
1276
|
+
const k = q(l.left, 0), I = q(l.right, 0), M = q(l.top, 0), Q = q(l.bottom, 0);
|
|
1277
|
+
u ? C = p - 2 * (k !== 0 || I !== 0 ? k + I : q(l.left, l.right)) : x = m - 2 * (M !== 0 || Q !== 0 ? M + Q : q(l.top, l.bottom));
|
|
1257
1278
|
}
|
|
1258
1279
|
await a({
|
|
1259
1280
|
...e,
|
|
1260
|
-
availableWidth:
|
|
1281
|
+
availableWidth: C,
|
|
1261
1282
|
availableHeight: x
|
|
1262
1283
|
});
|
|
1263
1284
|
const T = await n.getDimensions(d.floating);
|
|
@@ -1272,46 +1293,46 @@ const no = function(t) {
|
|
|
1272
1293
|
function Mt() {
|
|
1273
1294
|
return typeof window < "u";
|
|
1274
1295
|
}
|
|
1275
|
-
function
|
|
1276
|
-
return
|
|
1296
|
+
function wt(t) {
|
|
1297
|
+
return ke(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1277
1298
|
}
|
|
1278
|
-
function
|
|
1299
|
+
function Y(t) {
|
|
1279
1300
|
var e;
|
|
1280
1301
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1281
1302
|
}
|
|
1282
|
-
function
|
|
1303
|
+
function Z(t) {
|
|
1283
1304
|
var e;
|
|
1284
|
-
return (e = (
|
|
1305
|
+
return (e = (ke(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1285
1306
|
}
|
|
1286
|
-
function
|
|
1287
|
-
return Mt() ? t instanceof Node || t instanceof
|
|
1307
|
+
function ke(t) {
|
|
1308
|
+
return Mt() ? t instanceof Node || t instanceof Y(t).Node : !1;
|
|
1288
1309
|
}
|
|
1289
|
-
function
|
|
1290
|
-
return Mt() ? t instanceof Element || t instanceof
|
|
1310
|
+
function W(t) {
|
|
1311
|
+
return Mt() ? t instanceof Element || t instanceof Y(t).Element : !1;
|
|
1291
1312
|
}
|
|
1292
|
-
function
|
|
1293
|
-
return Mt() ? t instanceof HTMLElement || t instanceof
|
|
1313
|
+
function J(t) {
|
|
1314
|
+
return Mt() ? t instanceof HTMLElement || t instanceof Y(t).HTMLElement : !1;
|
|
1294
1315
|
}
|
|
1295
|
-
function
|
|
1296
|
-
return !Mt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
1316
|
+
function ce(t) {
|
|
1317
|
+
return !Mt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof Y(t).ShadowRoot;
|
|
1297
1318
|
}
|
|
1298
|
-
const
|
|
1319
|
+
const ho = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1299
1320
|
function Ct(t) {
|
|
1300
1321
|
const {
|
|
1301
1322
|
overflow: e,
|
|
1302
1323
|
overflowX: o,
|
|
1303
1324
|
overflowY: i,
|
|
1304
1325
|
display: r
|
|
1305
|
-
} =
|
|
1306
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + i + o) && !
|
|
1326
|
+
} = X(t);
|
|
1327
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + i + o) && !ho.has(r);
|
|
1307
1328
|
}
|
|
1308
|
-
const
|
|
1309
|
-
function
|
|
1310
|
-
return
|
|
1329
|
+
const po = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1330
|
+
function fo(t) {
|
|
1331
|
+
return po.has(wt(t));
|
|
1311
1332
|
}
|
|
1312
|
-
const
|
|
1333
|
+
const wo = [":popover-open", ":modal"];
|
|
1313
1334
|
function At(t) {
|
|
1314
|
-
return
|
|
1335
|
+
return wo.some((e) => {
|
|
1315
1336
|
try {
|
|
1316
1337
|
return t.matches(e);
|
|
1317
1338
|
} catch {
|
|
@@ -1319,34 +1340,34 @@ function At(t) {
|
|
|
1319
1340
|
}
|
|
1320
1341
|
});
|
|
1321
1342
|
}
|
|
1322
|
-
const
|
|
1323
|
-
function
|
|
1324
|
-
const e =
|
|
1325
|
-
return
|
|
1343
|
+
const mo = ["transform", "translate", "scale", "rotate", "perspective"], bo = ["transform", "translate", "scale", "rotate", "perspective", "filter"], vo = ["paint", "layout", "strict", "content"];
|
|
1344
|
+
function oe(t) {
|
|
1345
|
+
const e = ie(), o = W(t) ? X(t) : t;
|
|
1346
|
+
return mo.some((i) => o[i] ? o[i] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || bo.some((i) => (o.willChange || "").includes(i)) || vo.some((i) => (o.contain || "").includes(i));
|
|
1326
1347
|
}
|
|
1327
|
-
function
|
|
1328
|
-
let e =
|
|
1329
|
-
for (;
|
|
1330
|
-
if (
|
|
1348
|
+
function _o(t) {
|
|
1349
|
+
let e = nt(t);
|
|
1350
|
+
for (; J(e) && !ht(e); ) {
|
|
1351
|
+
if (oe(e))
|
|
1331
1352
|
return e;
|
|
1332
1353
|
if (At(e))
|
|
1333
1354
|
return null;
|
|
1334
|
-
e =
|
|
1355
|
+
e = nt(e);
|
|
1335
1356
|
}
|
|
1336
1357
|
return null;
|
|
1337
1358
|
}
|
|
1338
|
-
function
|
|
1359
|
+
function ie() {
|
|
1339
1360
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1340
1361
|
}
|
|
1341
|
-
const
|
|
1342
|
-
function
|
|
1343
|
-
return
|
|
1362
|
+
const yo = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1363
|
+
function ht(t) {
|
|
1364
|
+
return yo.has(wt(t));
|
|
1344
1365
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return
|
|
1366
|
+
function X(t) {
|
|
1367
|
+
return Y(t).getComputedStyle(t);
|
|
1347
1368
|
}
|
|
1348
1369
|
function Ot(t) {
|
|
1349
|
-
return
|
|
1370
|
+
return W(t) ? {
|
|
1350
1371
|
scrollLeft: t.scrollLeft,
|
|
1351
1372
|
scrollTop: t.scrollTop
|
|
1352
1373
|
} : {
|
|
@@ -1354,87 +1375,87 @@ function Ot(t) {
|
|
|
1354
1375
|
scrollTop: t.scrollY
|
|
1355
1376
|
};
|
|
1356
1377
|
}
|
|
1357
|
-
function
|
|
1358
|
-
if (
|
|
1378
|
+
function nt(t) {
|
|
1379
|
+
if (wt(t) === "html")
|
|
1359
1380
|
return t;
|
|
1360
1381
|
const e = (
|
|
1361
1382
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1362
1383
|
t.assignedSlot || // DOM Element detected.
|
|
1363
1384
|
t.parentNode || // ShadowRoot detected.
|
|
1364
|
-
|
|
1365
|
-
|
|
1385
|
+
ce(t) && t.host || // Fallback.
|
|
1386
|
+
Z(t)
|
|
1366
1387
|
);
|
|
1367
|
-
return
|
|
1388
|
+
return ce(e) ? e.host : e;
|
|
1368
1389
|
}
|
|
1369
|
-
function
|
|
1370
|
-
const e =
|
|
1371
|
-
return
|
|
1390
|
+
function De(t) {
|
|
1391
|
+
const e = nt(t);
|
|
1392
|
+
return ht(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : J(e) && Ct(e) ? e : De(e);
|
|
1372
1393
|
}
|
|
1373
1394
|
function vt(t, e, o) {
|
|
1374
1395
|
var i;
|
|
1375
1396
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
1376
|
-
const r =
|
|
1397
|
+
const r = De(t), s = r === ((i = t.ownerDocument) == null ? void 0 : i.body), n = Y(r);
|
|
1377
1398
|
if (s) {
|
|
1378
|
-
const d =
|
|
1399
|
+
const d = Bt(n);
|
|
1379
1400
|
return e.concat(n, n.visualViewport || [], Ct(r) ? r : [], d && o ? vt(d) : []);
|
|
1380
1401
|
}
|
|
1381
1402
|
return e.concat(r, vt(r, [], o));
|
|
1382
1403
|
}
|
|
1383
|
-
function
|
|
1404
|
+
function Bt(t) {
|
|
1384
1405
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
1385
1406
|
}
|
|
1386
|
-
function
|
|
1387
|
-
const e =
|
|
1407
|
+
function Te(t) {
|
|
1408
|
+
const e = X(t);
|
|
1388
1409
|
let o = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
|
1389
|
-
const r =
|
|
1410
|
+
const r = J(t), s = r ? t.offsetWidth : o, n = r ? t.offsetHeight : i, d = xt(o) !== s || xt(i) !== n;
|
|
1390
1411
|
return d && (o = s, i = n), {
|
|
1391
1412
|
width: o,
|
|
1392
1413
|
height: i,
|
|
1393
1414
|
$: d
|
|
1394
1415
|
};
|
|
1395
1416
|
}
|
|
1396
|
-
function
|
|
1397
|
-
return
|
|
1417
|
+
function re(t) {
|
|
1418
|
+
return W(t) ? t : t.contextElement;
|
|
1398
1419
|
}
|
|
1399
|
-
function
|
|
1400
|
-
const e =
|
|
1401
|
-
if (!
|
|
1402
|
-
return
|
|
1420
|
+
function ut(t) {
|
|
1421
|
+
const e = re(t);
|
|
1422
|
+
if (!J(e))
|
|
1423
|
+
return G(1);
|
|
1403
1424
|
const o = e.getBoundingClientRect(), {
|
|
1404
1425
|
width: i,
|
|
1405
1426
|
height: r,
|
|
1406
1427
|
$: s
|
|
1407
|
-
} =
|
|
1428
|
+
} = Te(e);
|
|
1408
1429
|
let n = (s ? xt(o.width) : o.width) / i, d = (s ? xt(o.height) : o.height) / r;
|
|
1409
1430
|
return (!n || !Number.isFinite(n)) && (n = 1), (!d || !Number.isFinite(d)) && (d = 1), {
|
|
1410
1431
|
x: n,
|
|
1411
1432
|
y: d
|
|
1412
1433
|
};
|
|
1413
1434
|
}
|
|
1414
|
-
const
|
|
1415
|
-
function
|
|
1416
|
-
const e =
|
|
1417
|
-
return !
|
|
1435
|
+
const Co = /* @__PURE__ */ G(0);
|
|
1436
|
+
function Ee(t) {
|
|
1437
|
+
const e = Y(t);
|
|
1438
|
+
return !ie() || !e.visualViewport ? Co : {
|
|
1418
1439
|
x: e.visualViewport.offsetLeft,
|
|
1419
1440
|
y: e.visualViewport.offsetTop
|
|
1420
1441
|
};
|
|
1421
1442
|
}
|
|
1422
|
-
function
|
|
1423
|
-
return e === void 0 && (e = !1), !o || e && o !==
|
|
1443
|
+
function So(t, e, o) {
|
|
1444
|
+
return e === void 0 && (e = !1), !o || e && o !== Y(t) ? !1 : e;
|
|
1424
1445
|
}
|
|
1425
|
-
function
|
|
1446
|
+
function lt(t, e, o, i) {
|
|
1426
1447
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
1427
|
-
const r = t.getBoundingClientRect(), s =
|
|
1428
|
-
let n =
|
|
1429
|
-
e && (i ?
|
|
1430
|
-
const d =
|
|
1448
|
+
const r = t.getBoundingClientRect(), s = re(t);
|
|
1449
|
+
let n = G(1);
|
|
1450
|
+
e && (i ? W(i) && (n = ut(i)) : n = ut(t));
|
|
1451
|
+
const d = So(s, o, i) ? Ee(s) : G(0);
|
|
1431
1452
|
let a = (r.left + d.x) / n.x, c = (r.top + d.y) / n.y, l = r.width / n.x, g = r.height / n.y;
|
|
1432
1453
|
if (s) {
|
|
1433
|
-
const h =
|
|
1434
|
-
let p = h, m =
|
|
1454
|
+
const h = Y(s), u = i && W(i) ? Y(i) : i;
|
|
1455
|
+
let p = h, m = Bt(p);
|
|
1435
1456
|
for (; m && i && u !== p; ) {
|
|
1436
|
-
const f =
|
|
1437
|
-
a *= f.x, c *= f.y, l *= f.x, g *= f.y, a += _, c +=
|
|
1457
|
+
const f = ut(m), v = m.getBoundingClientRect(), b = X(m), _ = v.left + (m.clientLeft + parseFloat(b.paddingLeft)) * f.x, S = v.top + (m.clientTop + parseFloat(b.paddingTop)) * f.y;
|
|
1458
|
+
a *= f.x, c *= f.y, l *= f.x, g *= f.y, a += _, c += S, p = Y(m), m = Bt(p);
|
|
1438
1459
|
}
|
|
1439
1460
|
}
|
|
1440
1461
|
return Dt({
|
|
@@ -1446,35 +1467,35 @@ function at(t, e, o, i) {
|
|
|
1446
1467
|
}
|
|
1447
1468
|
function Rt(t, e) {
|
|
1448
1469
|
const o = Ot(t).scrollLeft;
|
|
1449
|
-
return e ? e.left + o :
|
|
1470
|
+
return e ? e.left + o : lt(Z(t)).left + o;
|
|
1450
1471
|
}
|
|
1451
|
-
function
|
|
1472
|
+
function $e(t, e) {
|
|
1452
1473
|
const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - Rt(t, o), r = o.top + e.scrollTop;
|
|
1453
1474
|
return {
|
|
1454
1475
|
x: i,
|
|
1455
1476
|
y: r
|
|
1456
1477
|
};
|
|
1457
1478
|
}
|
|
1458
|
-
function
|
|
1479
|
+
function xo(t) {
|
|
1459
1480
|
let {
|
|
1460
1481
|
elements: e,
|
|
1461
1482
|
rect: o,
|
|
1462
1483
|
offsetParent: i,
|
|
1463
1484
|
strategy: r
|
|
1464
1485
|
} = t;
|
|
1465
|
-
const s = r === "fixed", n =
|
|
1486
|
+
const s = r === "fixed", n = Z(i), d = e ? At(e.floating) : !1;
|
|
1466
1487
|
if (i === n || d && s)
|
|
1467
1488
|
return o;
|
|
1468
1489
|
let a = {
|
|
1469
1490
|
scrollLeft: 0,
|
|
1470
1491
|
scrollTop: 0
|
|
1471
|
-
}, c =
|
|
1472
|
-
const l =
|
|
1473
|
-
if ((g || !g && !s) && ((
|
|
1474
|
-
const u =
|
|
1475
|
-
c =
|
|
1492
|
+
}, c = G(1);
|
|
1493
|
+
const l = G(0), g = J(i);
|
|
1494
|
+
if ((g || !g && !s) && ((wt(i) !== "body" || Ct(n)) && (a = Ot(i)), J(i))) {
|
|
1495
|
+
const u = lt(i);
|
|
1496
|
+
c = ut(i), l.x = u.x + i.clientLeft, l.y = u.y + i.clientTop;
|
|
1476
1497
|
}
|
|
1477
|
-
const h = n && !g && !s ?
|
|
1498
|
+
const h = n && !g && !s ? $e(n, a) : G(0);
|
|
1478
1499
|
return {
|
|
1479
1500
|
width: o.width * c.x,
|
|
1480
1501
|
height: o.height * c.y,
|
|
@@ -1482,34 +1503,34 @@ function _o(t) {
|
|
|
1482
1503
|
y: o.y * c.y - a.scrollTop * c.y + l.y + h.y
|
|
1483
1504
|
};
|
|
1484
1505
|
}
|
|
1485
|
-
function
|
|
1506
|
+
function ko(t) {
|
|
1486
1507
|
return Array.from(t.getClientRects());
|
|
1487
1508
|
}
|
|
1488
|
-
function
|
|
1489
|
-
const e =
|
|
1509
|
+
function Do(t) {
|
|
1510
|
+
const e = Z(t), o = Ot(t), i = t.ownerDocument.body, r = q(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), s = q(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
|
|
1490
1511
|
let n = -o.scrollLeft + Rt(t);
|
|
1491
1512
|
const d = -o.scrollTop;
|
|
1492
|
-
return
|
|
1513
|
+
return X(i).direction === "rtl" && (n += q(e.clientWidth, i.clientWidth) - r), {
|
|
1493
1514
|
width: r,
|
|
1494
1515
|
height: s,
|
|
1495
1516
|
x: n,
|
|
1496
1517
|
y: d
|
|
1497
1518
|
};
|
|
1498
1519
|
}
|
|
1499
|
-
const
|
|
1500
|
-
function
|
|
1501
|
-
const o =
|
|
1520
|
+
const ge = 25;
|
|
1521
|
+
function To(t, e) {
|
|
1522
|
+
const o = Y(t), i = Z(t), r = o.visualViewport;
|
|
1502
1523
|
let s = i.clientWidth, n = i.clientHeight, d = 0, a = 0;
|
|
1503
1524
|
if (r) {
|
|
1504
1525
|
s = r.width, n = r.height;
|
|
1505
|
-
const l =
|
|
1526
|
+
const l = ie();
|
|
1506
1527
|
(!l || l && e === "fixed") && (d = r.offsetLeft, a = r.offsetTop);
|
|
1507
1528
|
}
|
|
1508
1529
|
const c = Rt(i);
|
|
1509
1530
|
if (c <= 0) {
|
|
1510
1531
|
const l = i.ownerDocument, g = l.body, h = getComputedStyle(g), u = l.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, p = Math.abs(i.clientWidth - g.clientWidth - u);
|
|
1511
|
-
p <=
|
|
1512
|
-
} else c <=
|
|
1532
|
+
p <= ge && (s -= p);
|
|
1533
|
+
} else c <= ge && (s += c);
|
|
1513
1534
|
return {
|
|
1514
1535
|
width: s,
|
|
1515
1536
|
height: n,
|
|
@@ -1517,9 +1538,9 @@ function So(t, e) {
|
|
|
1517
1538
|
y: a
|
|
1518
1539
|
};
|
|
1519
1540
|
}
|
|
1520
|
-
const
|
|
1521
|
-
function
|
|
1522
|
-
const o =
|
|
1541
|
+
const Eo = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1542
|
+
function $o(t, e) {
|
|
1543
|
+
const o = lt(t, !0, e === "fixed"), i = o.top + t.clientTop, r = o.left + t.clientLeft, s = J(t) ? ut(t) : G(1), n = t.clientWidth * s.x, d = t.clientHeight * s.y, a = r * s.x, c = i * s.y;
|
|
1523
1544
|
return {
|
|
1524
1545
|
width: n,
|
|
1525
1546
|
height: d,
|
|
@@ -1527,16 +1548,16 @@ function ko(t, e) {
|
|
|
1527
1548
|
y: c
|
|
1528
1549
|
};
|
|
1529
1550
|
}
|
|
1530
|
-
function
|
|
1551
|
+
function ue(t, e, o) {
|
|
1531
1552
|
let i;
|
|
1532
1553
|
if (e === "viewport")
|
|
1533
|
-
i =
|
|
1554
|
+
i = To(t, o);
|
|
1534
1555
|
else if (e === "document")
|
|
1535
|
-
i =
|
|
1536
|
-
else if (
|
|
1537
|
-
i =
|
|
1556
|
+
i = Do(Z(t));
|
|
1557
|
+
else if (W(e))
|
|
1558
|
+
i = $o(e, o);
|
|
1538
1559
|
else {
|
|
1539
|
-
const r =
|
|
1560
|
+
const r = Ee(t);
|
|
1540
1561
|
i = {
|
|
1541
1562
|
x: e.x - r.x,
|
|
1542
1563
|
y: e.y - r.y,
|
|
@@ -1546,34 +1567,34 @@ function ce(t, e, o) {
|
|
|
1546
1567
|
}
|
|
1547
1568
|
return Dt(i);
|
|
1548
1569
|
}
|
|
1549
|
-
function
|
|
1550
|
-
const o =
|
|
1551
|
-
return o === e || !
|
|
1570
|
+
function Me(t, e) {
|
|
1571
|
+
const o = nt(t);
|
|
1572
|
+
return o === e || !W(o) || ht(o) ? !1 : X(o).position === "fixed" || Me(o, e);
|
|
1552
1573
|
}
|
|
1553
|
-
function
|
|
1574
|
+
function Mo(t, e) {
|
|
1554
1575
|
const o = e.get(t);
|
|
1555
1576
|
if (o)
|
|
1556
1577
|
return o;
|
|
1557
|
-
let i = vt(t, [], !1).filter((d) =>
|
|
1558
|
-
const s =
|
|
1559
|
-
let n = s ?
|
|
1560
|
-
for (;
|
|
1561
|
-
const d =
|
|
1562
|
-
!a && d.position === "fixed" && (r = null), (s ? !a && !r : !a && d.position === "static" && !!r &&
|
|
1578
|
+
let i = vt(t, [], !1).filter((d) => W(d) && wt(d) !== "body"), r = null;
|
|
1579
|
+
const s = X(t).position === "fixed";
|
|
1580
|
+
let n = s ? nt(t) : t;
|
|
1581
|
+
for (; W(n) && !ht(n); ) {
|
|
1582
|
+
const d = X(n), a = oe(n);
|
|
1583
|
+
!a && d.position === "fixed" && (r = null), (s ? !a && !r : !a && d.position === "static" && !!r && Eo.has(r.position) || Ct(n) && !a && Me(t, n)) ? i = i.filter((l) => l !== n) : r = d, n = nt(n);
|
|
1563
1584
|
}
|
|
1564
1585
|
return e.set(t, i), i;
|
|
1565
1586
|
}
|
|
1566
|
-
function
|
|
1587
|
+
function Ao(t) {
|
|
1567
1588
|
let {
|
|
1568
1589
|
element: e,
|
|
1569
1590
|
boundary: o,
|
|
1570
1591
|
rootBoundary: i,
|
|
1571
1592
|
strategy: r
|
|
1572
1593
|
} = t;
|
|
1573
|
-
const n = [...o === "clippingAncestors" ? At(e) ? [] :
|
|
1574
|
-
const g =
|
|
1575
|
-
return c.top =
|
|
1576
|
-
},
|
|
1594
|
+
const n = [...o === "clippingAncestors" ? At(e) ? [] : Mo(e, this._c) : [].concat(o), i], d = n[0], a = n.reduce((c, l) => {
|
|
1595
|
+
const g = ue(e, l, r);
|
|
1596
|
+
return c.top = q(g.top, c.top), c.right = it(g.right, c.right), c.bottom = it(g.bottom, c.bottom), c.left = q(g.left, c.left), c;
|
|
1597
|
+
}, ue(e, d, r));
|
|
1577
1598
|
return {
|
|
1578
1599
|
width: a.right - a.left,
|
|
1579
1600
|
height: a.bottom - a.top,
|
|
@@ -1581,33 +1602,33 @@ function To(t) {
|
|
|
1581
1602
|
y: a.top
|
|
1582
1603
|
};
|
|
1583
1604
|
}
|
|
1584
|
-
function
|
|
1605
|
+
function Oo(t) {
|
|
1585
1606
|
const {
|
|
1586
1607
|
width: e,
|
|
1587
1608
|
height: o
|
|
1588
|
-
} =
|
|
1609
|
+
} = Te(t);
|
|
1589
1610
|
return {
|
|
1590
1611
|
width: e,
|
|
1591
1612
|
height: o
|
|
1592
1613
|
};
|
|
1593
1614
|
}
|
|
1594
|
-
function
|
|
1595
|
-
const i =
|
|
1615
|
+
function Ro(t, e, o) {
|
|
1616
|
+
const i = J(e), r = Z(e), s = o === "fixed", n = lt(t, !0, s, e);
|
|
1596
1617
|
let d = {
|
|
1597
1618
|
scrollLeft: 0,
|
|
1598
1619
|
scrollTop: 0
|
|
1599
1620
|
};
|
|
1600
|
-
const a =
|
|
1621
|
+
const a = G(0);
|
|
1601
1622
|
function c() {
|
|
1602
1623
|
a.x = Rt(r);
|
|
1603
1624
|
}
|
|
1604
1625
|
if (i || !i && !s)
|
|
1605
|
-
if ((
|
|
1606
|
-
const u =
|
|
1626
|
+
if ((wt(e) !== "body" || Ct(r)) && (d = Ot(e)), i) {
|
|
1627
|
+
const u = lt(e, !0, s, e);
|
|
1607
1628
|
a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
|
|
1608
1629
|
} else r && c();
|
|
1609
1630
|
s && !i && r && c();
|
|
1610
|
-
const l = r && !i && !s ?
|
|
1631
|
+
const l = r && !i && !s ? $e(r, d) : G(0), g = n.left + d.scrollLeft - a.x - l.x, h = n.top + d.scrollTop - a.y - l.y;
|
|
1611
1632
|
return {
|
|
1612
1633
|
x: g,
|
|
1613
1634
|
y: h,
|
|
@@ -1616,38 +1637,38 @@ function $o(t, e, o) {
|
|
|
1616
1637
|
};
|
|
1617
1638
|
}
|
|
1618
1639
|
function Ht(t) {
|
|
1619
|
-
return
|
|
1640
|
+
return X(t).position === "static";
|
|
1620
1641
|
}
|
|
1621
|
-
function
|
|
1622
|
-
if (!
|
|
1642
|
+
function he(t, e) {
|
|
1643
|
+
if (!J(t) || X(t).position === "fixed")
|
|
1623
1644
|
return null;
|
|
1624
1645
|
if (e)
|
|
1625
1646
|
return e(t);
|
|
1626
1647
|
let o = t.offsetParent;
|
|
1627
|
-
return
|
|
1648
|
+
return Z(t) === o && (o = o.ownerDocument.body), o;
|
|
1628
1649
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const o =
|
|
1650
|
+
function Ae(t, e) {
|
|
1651
|
+
const o = Y(t);
|
|
1631
1652
|
if (At(t))
|
|
1632
1653
|
return o;
|
|
1633
|
-
if (!
|
|
1634
|
-
let r =
|
|
1635
|
-
for (; r && !
|
|
1636
|
-
if (
|
|
1654
|
+
if (!J(t)) {
|
|
1655
|
+
let r = nt(t);
|
|
1656
|
+
for (; r && !ht(r); ) {
|
|
1657
|
+
if (W(r) && !Ht(r))
|
|
1637
1658
|
return r;
|
|
1638
|
-
r =
|
|
1659
|
+
r = nt(r);
|
|
1639
1660
|
}
|
|
1640
1661
|
return o;
|
|
1641
1662
|
}
|
|
1642
|
-
let i =
|
|
1643
|
-
for (; i &&
|
|
1644
|
-
i =
|
|
1645
|
-
return i &&
|
|
1663
|
+
let i = he(t, e);
|
|
1664
|
+
for (; i && fo(i) && Ht(i); )
|
|
1665
|
+
i = he(i, e);
|
|
1666
|
+
return i && ht(i) && Ht(i) && !oe(i) ? o : i || _o(t) || o;
|
|
1646
1667
|
}
|
|
1647
|
-
const
|
|
1648
|
-
const e = this.getOffsetParent ||
|
|
1668
|
+
const Lo = async function(t) {
|
|
1669
|
+
const e = this.getOffsetParent || Ae, o = this.getDimensions, i = await o(t.floating);
|
|
1649
1670
|
return {
|
|
1650
|
-
reference:
|
|
1671
|
+
reference: Ro(t.reference, await e(t.floating), t.strategy),
|
|
1651
1672
|
floating: {
|
|
1652
1673
|
x: 0,
|
|
1653
1674
|
y: 0,
|
|
@@ -1656,27 +1677,27 @@ const Mo = async function(t) {
|
|
|
1656
1677
|
}
|
|
1657
1678
|
};
|
|
1658
1679
|
};
|
|
1659
|
-
function
|
|
1660
|
-
return
|
|
1661
|
-
}
|
|
1662
|
-
const
|
|
1663
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1664
|
-
getDocumentElement:
|
|
1665
|
-
getClippingRect:
|
|
1666
|
-
getOffsetParent:
|
|
1667
|
-
getElementRects:
|
|
1668
|
-
getClientRects:
|
|
1669
|
-
getDimensions:
|
|
1670
|
-
getScale:
|
|
1671
|
-
isElement:
|
|
1672
|
-
isRTL:
|
|
1680
|
+
function Io(t) {
|
|
1681
|
+
return X(t).direction === "rtl";
|
|
1682
|
+
}
|
|
1683
|
+
const Po = {
|
|
1684
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: xo,
|
|
1685
|
+
getDocumentElement: Z,
|
|
1686
|
+
getClippingRect: Ao,
|
|
1687
|
+
getOffsetParent: Ae,
|
|
1688
|
+
getElementRects: Lo,
|
|
1689
|
+
getClientRects: ko,
|
|
1690
|
+
getDimensions: Oo,
|
|
1691
|
+
getScale: ut,
|
|
1692
|
+
isElement: W,
|
|
1693
|
+
isRTL: Io
|
|
1673
1694
|
};
|
|
1674
|
-
function
|
|
1695
|
+
function Oe(t, e) {
|
|
1675
1696
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1676
1697
|
}
|
|
1677
|
-
function
|
|
1698
|
+
function Ho(t, e) {
|
|
1678
1699
|
let o = null, i;
|
|
1679
|
-
const r =
|
|
1700
|
+
const r = Z(t);
|
|
1680
1701
|
function s() {
|
|
1681
1702
|
var d;
|
|
1682
1703
|
clearTimeout(i), (d = o) == null || d.disconnect(), o = null;
|
|
@@ -1691,21 +1712,21 @@ function Ro(t, e) {
|
|
|
1691
1712
|
} = c;
|
|
1692
1713
|
if (d || e(), !h || !u)
|
|
1693
1714
|
return;
|
|
1694
|
-
const p = St(g), m = St(r.clientWidth - (l + h)), f = St(r.clientHeight - (g + u)),
|
|
1695
|
-
rootMargin: -p + "px " + -m + "px " + -f + "px " + -
|
|
1696
|
-
threshold:
|
|
1715
|
+
const p = St(g), m = St(r.clientWidth - (l + h)), f = St(r.clientHeight - (g + u)), v = St(l), _ = {
|
|
1716
|
+
rootMargin: -p + "px " + -m + "px " + -f + "px " + -v + "px",
|
|
1717
|
+
threshold: q(0, it(1, a)) || 1
|
|
1697
1718
|
};
|
|
1698
|
-
let
|
|
1699
|
-
function y(
|
|
1700
|
-
const x =
|
|
1719
|
+
let S = !0;
|
|
1720
|
+
function y(D) {
|
|
1721
|
+
const x = D[0].intersectionRatio;
|
|
1701
1722
|
if (x !== a) {
|
|
1702
|
-
if (!
|
|
1723
|
+
if (!S)
|
|
1703
1724
|
return n();
|
|
1704
1725
|
x ? n(!1, x) : i = setTimeout(() => {
|
|
1705
1726
|
n(!1, 1e-7);
|
|
1706
1727
|
}, 1e3);
|
|
1707
1728
|
}
|
|
1708
|
-
x === 1 &&
|
|
1729
|
+
x === 1 && !Oe(c, t.getBoundingClientRect()) && n(), S = !1;
|
|
1709
1730
|
}
|
|
1710
1731
|
try {
|
|
1711
1732
|
o = new IntersectionObserver(y, {
|
|
@@ -1720,7 +1741,7 @@ function Ro(t, e) {
|
|
|
1720
1741
|
}
|
|
1721
1742
|
return n(!0), s;
|
|
1722
1743
|
}
|
|
1723
|
-
function
|
|
1744
|
+
function zo(t, e, o, i) {
|
|
1724
1745
|
i === void 0 && (i = {});
|
|
1725
1746
|
const {
|
|
1726
1747
|
ancestorScroll: r = !0,
|
|
@@ -1728,50 +1749,50 @@ function Io(t, e, o, i) {
|
|
|
1728
1749
|
elementResize: n = typeof ResizeObserver == "function",
|
|
1729
1750
|
layoutShift: d = typeof IntersectionObserver == "function",
|
|
1730
1751
|
animationFrame: a = !1
|
|
1731
|
-
} = i, c =
|
|
1732
|
-
l.forEach((
|
|
1733
|
-
r &&
|
|
1752
|
+
} = i, c = re(t), l = r || s ? [...c ? vt(c) : [], ...vt(e)] : [];
|
|
1753
|
+
l.forEach((v) => {
|
|
1754
|
+
r && v.addEventListener("scroll", o, {
|
|
1734
1755
|
passive: !0
|
|
1735
|
-
}), s &&
|
|
1756
|
+
}), s && v.addEventListener("resize", o);
|
|
1736
1757
|
});
|
|
1737
|
-
const g = c && d ?
|
|
1758
|
+
const g = c && d ? Ho(c, o) : null;
|
|
1738
1759
|
let h = -1, u = null;
|
|
1739
|
-
n && (u = new ResizeObserver((
|
|
1740
|
-
let [
|
|
1741
|
-
|
|
1760
|
+
n && (u = new ResizeObserver((v) => {
|
|
1761
|
+
let [b] = v;
|
|
1762
|
+
b && b.target === c && u && (u.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1742
1763
|
var _;
|
|
1743
1764
|
(_ = u) == null || _.observe(e);
|
|
1744
1765
|
})), o();
|
|
1745
1766
|
}), c && !a && u.observe(c), u.observe(e));
|
|
1746
|
-
let p, m = a ?
|
|
1767
|
+
let p, m = a ? lt(t) : null;
|
|
1747
1768
|
a && f();
|
|
1748
1769
|
function f() {
|
|
1749
|
-
const
|
|
1750
|
-
m &&
|
|
1770
|
+
const v = lt(t);
|
|
1771
|
+
m && !Oe(m, v) && o(), m = v, p = requestAnimationFrame(f);
|
|
1751
1772
|
}
|
|
1752
1773
|
return o(), () => {
|
|
1753
|
-
var
|
|
1754
|
-
l.forEach((
|
|
1755
|
-
r &&
|
|
1756
|
-
}), g == null || g(), (
|
|
1774
|
+
var v;
|
|
1775
|
+
l.forEach((b) => {
|
|
1776
|
+
r && b.removeEventListener("scroll", o), s && b.removeEventListener("resize", o);
|
|
1777
|
+
}), g == null || g(), (v = u) == null || v.disconnect(), u = null, a && cancelAnimationFrame(p);
|
|
1757
1778
|
};
|
|
1758
1779
|
}
|
|
1759
|
-
const
|
|
1780
|
+
const Lt = co, Re = go, It = so, Fo = uo, Vo = no, Pt = (t, e, o) => {
|
|
1760
1781
|
const i = /* @__PURE__ */ new Map(), r = {
|
|
1761
|
-
platform:
|
|
1782
|
+
platform: Po,
|
|
1762
1783
|
...o
|
|
1763
1784
|
}, s = {
|
|
1764
1785
|
...r.platform,
|
|
1765
1786
|
_c: i
|
|
1766
1787
|
};
|
|
1767
|
-
return
|
|
1788
|
+
return ro(t, e, {
|
|
1768
1789
|
...r,
|
|
1769
1790
|
platform: s
|
|
1770
1791
|
});
|
|
1771
1792
|
};
|
|
1772
|
-
function
|
|
1793
|
+
function dt(t, e, o, i) {
|
|
1773
1794
|
var s;
|
|
1774
|
-
|
|
1795
|
+
L(t);
|
|
1775
1796
|
const r = document.createElement("div");
|
|
1776
1797
|
if (r.className = "wg__dropdown", r.style.cssText = `
|
|
1777
1798
|
position: fixed;
|
|
@@ -1785,19 +1806,19 @@ function lt(t, e, o, i) {
|
|
|
1785
1806
|
else {
|
|
1786
1807
|
const n = t.grid.editingCell, d = n ? (s = t.grid.displayItems[n.rowIndex]) == null ? void 0 : s[n.field] : void 0;
|
|
1787
1808
|
r.innerHTML = o.map((a, c) => {
|
|
1788
|
-
const l = c === t.highlightedIndex, g =
|
|
1809
|
+
const l = c === t.highlightedIndex, g = at(a, i) === d, h = mt(a, i);
|
|
1789
1810
|
if (i.renderOptionCallback) {
|
|
1790
1811
|
const _ = { index: c, isHighlighted: l, isSelected: g, isDisabled: h };
|
|
1791
1812
|
return i.renderOptionCallback(a, _);
|
|
1792
1813
|
}
|
|
1793
|
-
const u = yt(a, i), p =
|
|
1814
|
+
const u = yt(a, i), p = Be(a, i), m = Ke(a, i), f = ["wg__dropdown-option"];
|
|
1794
1815
|
l && f.push("wg__dropdown-option--highlighted"), g && f.push("wg__dropdown-option--selected"), h && f.push("wg__dropdown-option--disabled");
|
|
1795
|
-
const
|
|
1816
|
+
const v = p ? `<span class="wg__dropdown-option-icon">${t.escapeHtml(p)}</span>` : "", b = m ? `<span class="wg__dropdown-option-subtitle">${t.escapeHtml(m)}</span>` : "";
|
|
1796
1817
|
return `<div class="${f.join(" ")}" data-index="${c}" ${h ? 'data-disabled="true"' : ""}>
|
|
1797
|
-
${
|
|
1818
|
+
${v}
|
|
1798
1819
|
<div class="wg__dropdown-option-content">
|
|
1799
1820
|
<span class="wg__dropdown-option-label">${t.escapeHtml(u)}</span>
|
|
1800
|
-
${
|
|
1821
|
+
${b}
|
|
1801
1822
|
</div>
|
|
1802
1823
|
</div>`;
|
|
1803
1824
|
}).join("");
|
|
@@ -1807,9 +1828,9 @@ function lt(t, e, o, i) {
|
|
|
1807
1828
|
placement: "bottom-start",
|
|
1808
1829
|
middleware: [
|
|
1809
1830
|
// Add 1px gap to prevent sub-pixel overlap with cell border
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1831
|
+
Lt(1),
|
|
1832
|
+
It({ fallbackPlacements: ["top-start"] }),
|
|
1833
|
+
Fo({
|
|
1813
1834
|
apply({ rects: n }) {
|
|
1814
1835
|
Object.assign(r.style, {
|
|
1815
1836
|
width: `${n.reference.width}px`
|
|
@@ -1824,19 +1845,19 @@ function lt(t, e, o, i) {
|
|
|
1824
1845
|
});
|
|
1825
1846
|
}), r;
|
|
1826
1847
|
}
|
|
1827
|
-
function
|
|
1848
|
+
function L(t) {
|
|
1828
1849
|
const e = t.shadow.querySelector(".wg__dropdown");
|
|
1829
1850
|
e == null || e.remove(), t.dropdownOpen = !1, t.highlightedIndex = -1, t.filterText = "";
|
|
1830
1851
|
}
|
|
1831
|
-
function
|
|
1852
|
+
function Le(t, e, o = !0) {
|
|
1832
1853
|
const i = t.dropdownOptions[e];
|
|
1833
1854
|
if (!i) return;
|
|
1834
1855
|
const r = t.grid.editingCell;
|
|
1835
1856
|
if (!r) return;
|
|
1836
1857
|
const s = t.getCurrentEditorOptions();
|
|
1837
1858
|
if (mt(i, s)) return;
|
|
1838
|
-
const n =
|
|
1839
|
-
if (s.onselect && a && s.onselect(i, a), t.justSelected = !0, t.isCommittingFromKeyboard = !0,
|
|
1859
|
+
const n = at(i, s), d = t.grid.columns.findIndex((c) => String(c.field) === r.field), a = t.grid.displayItems[r.rowIndex];
|
|
1860
|
+
if (s.onselect && a && s.onselect(i, a), t.justSelected = !0, t.isCommittingFromKeyboard = !0, L(t), t.grid.commitEdit(r.rowIndex, r.field, n), o)
|
|
1840
1861
|
t.moveFocusAfterCommit(r.rowIndex, r.field, "down");
|
|
1841
1862
|
else {
|
|
1842
1863
|
const c = t.shadow.querySelector(
|
|
@@ -1855,17 +1876,17 @@ function et(t) {
|
|
|
1855
1876
|
i.classList.toggle("wg__dropdown-option--highlighted", r === t.highlightedIndex);
|
|
1856
1877
|
});
|
|
1857
1878
|
}
|
|
1858
|
-
function
|
|
1879
|
+
function pe(t) {
|
|
1859
1880
|
const e = t.shadow.querySelector(".wg__dropdown-option--highlighted");
|
|
1860
1881
|
e == null || e.scrollIntoView({ block: "nearest" });
|
|
1861
1882
|
}
|
|
1862
|
-
function
|
|
1883
|
+
function fe(t, e) {
|
|
1863
1884
|
const o = t.shadow.querySelector(".wg__loading-indicator");
|
|
1864
1885
|
o && (o.style.display = e ? "inline" : "none");
|
|
1865
1886
|
const i = t.shadow.querySelector(".wg__editor--autocomplete .wg__combobox-toggle");
|
|
1866
1887
|
i && (i.style.display = e ? "none" : "inline");
|
|
1867
1888
|
}
|
|
1868
|
-
function
|
|
1889
|
+
function K(t) {
|
|
1869
1890
|
if (t.justSelected) return;
|
|
1870
1891
|
const e = t.getCurrentEditingColumn();
|
|
1871
1892
|
if (!e) return;
|
|
@@ -1881,7 +1902,7 @@ function X(t) {
|
|
|
1881
1902
|
const d = t.grid.editingCell;
|
|
1882
1903
|
if (d) {
|
|
1883
1904
|
const a = t.grid.displayItems[d.rowIndex], c = a ? a[d.field] : void 0, l = t.dropdownOptions.findIndex(
|
|
1884
|
-
(g) =>
|
|
1905
|
+
(g) => at(g, o) === c
|
|
1885
1906
|
);
|
|
1886
1907
|
r = l >= 0 ? l : 0;
|
|
1887
1908
|
} else
|
|
@@ -1895,7 +1916,7 @@ function X(t) {
|
|
|
1895
1916
|
a = l ? l[d.field] : void 0;
|
|
1896
1917
|
}
|
|
1897
1918
|
const c = n.findIndex(
|
|
1898
|
-
(l) =>
|
|
1919
|
+
(l) => at(l, o) === a
|
|
1899
1920
|
);
|
|
1900
1921
|
if (c >= 0)
|
|
1901
1922
|
t.dropdownOptions = n, r = c;
|
|
@@ -1916,42 +1937,42 @@ function X(t) {
|
|
|
1916
1937
|
if (s && t.dropdownOptions.length > 0) {
|
|
1917
1938
|
const n = t.filterText;
|
|
1918
1939
|
t.isOpeningDropdown = !0;
|
|
1919
|
-
const d =
|
|
1920
|
-
|
|
1940
|
+
const d = dt(t, s, t.dropdownOptions, o);
|
|
1941
|
+
ct(t, d), t.filterText = n, t.highlightedIndex = r, et(t);
|
|
1921
1942
|
const a = t.shadow.querySelector(".wg__select-trigger"), c = t.shadow.querySelector(".wg__combobox-input, .wg__autocomplete-input"), l = a || c;
|
|
1922
1943
|
l && l.focus(), requestAnimationFrame(() => {
|
|
1923
1944
|
t.isOpeningDropdown = !1;
|
|
1924
1945
|
});
|
|
1925
1946
|
}
|
|
1926
1947
|
}
|
|
1927
|
-
function
|
|
1928
|
-
t.dropdownOpen ?
|
|
1948
|
+
function we(t) {
|
|
1949
|
+
t.dropdownOpen ? L(t) : K(t);
|
|
1929
1950
|
}
|
|
1930
|
-
function
|
|
1951
|
+
function ct(t, e) {
|
|
1931
1952
|
e.addEventListener("mousedown", (o) => {
|
|
1932
1953
|
o.preventDefault();
|
|
1933
1954
|
const i = o.target.closest(".wg__dropdown-option");
|
|
1934
1955
|
if (i && !i.hasAttribute("data-disabled")) {
|
|
1935
1956
|
const r = parseInt(i.getAttribute("data-index") || "0", 10);
|
|
1936
|
-
|
|
1957
|
+
Le(t, r, !1);
|
|
1937
1958
|
}
|
|
1938
1959
|
}), e.addEventListener("mouseover", (o) => {
|
|
1939
1960
|
const i = o.target.closest(".wg__dropdown-option");
|
|
1940
1961
|
i && !i.hasAttribute("data-disabled") && (t.highlightedIndex = parseInt(i.getAttribute("data-index") || "0", 10), et(t));
|
|
1941
1962
|
});
|
|
1942
1963
|
}
|
|
1943
|
-
function
|
|
1964
|
+
function me(t, e) {
|
|
1944
1965
|
const o = e.options || [], i = t.filterText.toLowerCase(), r = t.filterText;
|
|
1945
1966
|
t.dropdownOptions = o.filter((n) => yt(n, e).toLowerCase().includes(i)), t.highlightedIndex = t.dropdownOptions.length > 0 ? 0 : -1;
|
|
1946
1967
|
const s = t.shadow.querySelector(".wg__editor--select");
|
|
1947
1968
|
if (s)
|
|
1948
1969
|
if (t.dropdownOptions.length > 0) {
|
|
1949
|
-
const n =
|
|
1950
|
-
|
|
1970
|
+
const n = dt(t, s, t.dropdownOptions, e);
|
|
1971
|
+
ct(t, n), t.filterText = r, t.highlightedIndex = 0, et(t);
|
|
1951
1972
|
} else
|
|
1952
|
-
|
|
1973
|
+
L(t);
|
|
1953
1974
|
}
|
|
1954
|
-
function
|
|
1975
|
+
function qo(t, e) {
|
|
1955
1976
|
const o = e.target;
|
|
1956
1977
|
t.filterText = o.value, t.isUserFiltering = !0;
|
|
1957
1978
|
const i = t.getCurrentEditingColumn();
|
|
@@ -1965,11 +1986,11 @@ function Ho(t, e) {
|
|
|
1965
1986
|
t.highlightedIndex = t.dropdownOptions.length > 0 ? 0 : -1;
|
|
1966
1987
|
const n = o.closest(".wg__editor--combobox");
|
|
1967
1988
|
if (n) {
|
|
1968
|
-
const d =
|
|
1969
|
-
|
|
1989
|
+
const d = dt(t, n, t.dropdownOptions, r);
|
|
1990
|
+
ct(t, d), t.highlightedIndex = t.dropdownOptions.length > 0 ? 0 : -1, et(t);
|
|
1970
1991
|
}
|
|
1971
1992
|
}
|
|
1972
|
-
function
|
|
1993
|
+
function Yo(t, e) {
|
|
1973
1994
|
const o = e.target;
|
|
1974
1995
|
t.filterText = o.value;
|
|
1975
1996
|
const i = t.getCurrentEditingColumn();
|
|
@@ -1979,26 +2000,26 @@ function zo(t, e) {
|
|
|
1979
2000
|
const d = o.closest(".wg__editor--autocomplete");
|
|
1980
2001
|
if (!t.dropdownOpen && d) {
|
|
1981
2002
|
t.dropdownOptions = r.initialOptions || [];
|
|
1982
|
-
const a =
|
|
1983
|
-
|
|
2003
|
+
const a = dt(t, d, t.dropdownOptions, r);
|
|
2004
|
+
ct(t, a), t.highlightedIndex = t.dropdownOptions.length > 0 ? 0 : -1, et(t);
|
|
1984
2005
|
}
|
|
1985
2006
|
if (t.filterText.length < n) {
|
|
1986
2007
|
if (t.dropdownOptions = r.initialOptions || [], d) {
|
|
1987
|
-
const a =
|
|
1988
|
-
|
|
2008
|
+
const a = dt(t, d, t.dropdownOptions, r);
|
|
2009
|
+
ct(t, a), t.highlightedIndex = t.dropdownOptions.length > 0 ? 0 : -1, et(t);
|
|
1989
2010
|
}
|
|
1990
2011
|
return;
|
|
1991
2012
|
}
|
|
1992
2013
|
t.searchDebounceTimer = setTimeout(() => {
|
|
1993
|
-
|
|
2014
|
+
No(t, t.filterText, i);
|
|
1994
2015
|
}, s);
|
|
1995
2016
|
}
|
|
1996
|
-
async function
|
|
2017
|
+
async function No(t, e, o) {
|
|
1997
2018
|
const i = o.editorOptions || {};
|
|
1998
2019
|
if (!i.onSearchCallback) return;
|
|
1999
2020
|
t.searchAbortController && t.searchAbortController.abort(), t.searchAbortController = new AbortController();
|
|
2000
2021
|
const r = t.searchAbortController.signal;
|
|
2001
|
-
t.isSearching = !0,
|
|
2022
|
+
t.isSearching = !0, fe(t, !0);
|
|
2002
2023
|
try {
|
|
2003
2024
|
const s = t.grid.editingCell;
|
|
2004
2025
|
if (!s) return;
|
|
@@ -2007,8 +2028,8 @@ async function Fo(t, e, o) {
|
|
|
2007
2028
|
t.dropdownOptions = d;
|
|
2008
2029
|
const a = t.shadow.querySelector(".wg__editor--autocomplete");
|
|
2009
2030
|
if (a) {
|
|
2010
|
-
const c =
|
|
2011
|
-
|
|
2031
|
+
const c = dt(t, a, t.dropdownOptions, i);
|
|
2032
|
+
ct(t, c), t.highlightedIndex = d.length > 0 ? 0 : -1, et(t);
|
|
2012
2033
|
}
|
|
2013
2034
|
}
|
|
2014
2035
|
} catch (s) {
|
|
@@ -2017,20 +2038,20 @@ async function Fo(t, e, o) {
|
|
|
2017
2038
|
console.error("Autocomplete search failed:", s), t.dropdownOptions = [];
|
|
2018
2039
|
const n = t.shadow.querySelector(".wg__editor--autocomplete");
|
|
2019
2040
|
if (n) {
|
|
2020
|
-
const d =
|
|
2021
|
-
|
|
2041
|
+
const d = dt(t, n, t.dropdownOptions, i);
|
|
2042
|
+
ct(t, d);
|
|
2022
2043
|
}
|
|
2023
2044
|
} finally {
|
|
2024
|
-
r.aborted || (t.isSearching = !1,
|
|
2045
|
+
r.aborted || (t.isSearching = !1, fe(t, !1));
|
|
2025
2046
|
}
|
|
2026
2047
|
}
|
|
2027
|
-
function
|
|
2028
|
-
const
|
|
2048
|
+
function be(t, e, o, i, r) {
|
|
2049
|
+
const s = i ?? t.tooltipShowDelay;
|
|
2029
2050
|
t.tooltipHideTimer && (clearTimeout(t.tooltipHideTimer), t.tooltipHideTimer = null), !(t.tooltipElement && t.tooltipAnchor === e) && (t.tooltipShowTimer && clearTimeout(t.tooltipShowTimer), t.tooltipShowTimer = setTimeout(() => {
|
|
2030
|
-
|
|
2031
|
-
},
|
|
2051
|
+
jo(t, e, o, r);
|
|
2052
|
+
}, s));
|
|
2032
2053
|
}
|
|
2033
|
-
function
|
|
2054
|
+
function Uo(t, e) {
|
|
2034
2055
|
const o = e ?? t.tooltipHideDelay;
|
|
2035
2056
|
t.tooltipShowTimer && (clearTimeout(t.tooltipShowTimer), t.tooltipShowTimer = null), t.tooltipElement && (t.tooltipHideTimer = setTimeout(() => {
|
|
2036
2057
|
t.tooltipElement && (t.tooltipElement.classList.remove("wg__tooltip--visible"), setTimeout(() => {
|
|
@@ -2039,33 +2060,35 @@ function qo(t, e) {
|
|
|
2039
2060
|
}, 100));
|
|
2040
2061
|
}, o));
|
|
2041
2062
|
}
|
|
2042
|
-
function
|
|
2043
|
-
var
|
|
2044
|
-
(
|
|
2045
|
-
const i = document.createElement("div");
|
|
2046
|
-
i.className = "wg__tooltip", i.textContent = o;
|
|
2063
|
+
function jo(t, e, o, i) {
|
|
2064
|
+
var d;
|
|
2065
|
+
(d = t.tooltipElement) == null || d.remove();
|
|
2047
2066
|
const r = document.createElement("div");
|
|
2048
|
-
r.className = "wg__tooltip
|
|
2067
|
+
r.className = "wg__tooltip";
|
|
2068
|
+
const s = document.createElement("div");
|
|
2069
|
+
s.className = "wg__tooltip-content", i ? s.innerHTML = o : s.textContent = o, r.appendChild(s);
|
|
2070
|
+
const n = document.createElement("div");
|
|
2071
|
+
n.className = "wg__tooltip-arrow", r.appendChild(n), t.shadow.appendChild(r), t.tooltipElement = r, t.tooltipArrowElement = n, t.tooltipAnchor = e, Pt(e, r, {
|
|
2049
2072
|
strategy: "fixed",
|
|
2050
2073
|
placement: "top",
|
|
2051
2074
|
middleware: [
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2075
|
+
Lt(8),
|
|
2076
|
+
It({ fallbackPlacements: ["bottom", "left", "right"] }),
|
|
2077
|
+
Vo({ element: n })
|
|
2055
2078
|
]
|
|
2056
|
-
}).then(({ x:
|
|
2057
|
-
if (
|
|
2058
|
-
const { x:
|
|
2059
|
-
|
|
2079
|
+
}).then(({ x: a, y: c, placement: l, middlewareData: g }) => {
|
|
2080
|
+
if (r.style.left = `${a}px`, r.style.top = `${c}px`, r.setAttribute("data-placement", l), g.arrow) {
|
|
2081
|
+
const { x: h, y: u } = g.arrow;
|
|
2082
|
+
h != null && (n.style.left = `${h}px`), u != null && (n.style.top = `${u}px`);
|
|
2060
2083
|
}
|
|
2061
2084
|
requestAnimationFrame(() => {
|
|
2062
|
-
|
|
2085
|
+
r.classList.add("wg__tooltip--visible");
|
|
2063
2086
|
});
|
|
2064
2087
|
});
|
|
2065
2088
|
}
|
|
2066
|
-
function
|
|
2089
|
+
function Bo(t, e, o) {
|
|
2067
2090
|
if (t.grid.shouldUseVirtualScroll()) {
|
|
2068
|
-
|
|
2091
|
+
Ko(t, e);
|
|
2069
2092
|
const n = t.shadow.querySelector(
|
|
2070
2093
|
`[data-row="${e}"][data-col="${o}"]`
|
|
2071
2094
|
);
|
|
@@ -2086,19 +2109,19 @@ function No(t, e, o) {
|
|
|
2086
2109
|
}
|
|
2087
2110
|
}
|
|
2088
2111
|
}
|
|
2089
|
-
function
|
|
2112
|
+
function Ko(t, e) {
|
|
2090
2113
|
const o = t.shadow.querySelector(".wg");
|
|
2091
2114
|
if (!o) return;
|
|
2092
2115
|
const i = t.grid.virtualScrollRowHeight, r = o.scrollTop, s = o.clientHeight, n = t.shadow.querySelector(".wg__header"), d = (n == null ? void 0 : n.offsetHeight) || 0, a = e * i, c = a + i, l = r + d, g = r + s;
|
|
2093
2116
|
a < l ? o.scrollTop = a - d : c > g && (o.scrollTop = c - s);
|
|
2094
2117
|
}
|
|
2095
|
-
function
|
|
2118
|
+
function st(t, e) {
|
|
2096
2119
|
const o = t.shadow.querySelector(".wg");
|
|
2097
2120
|
if (!o) return;
|
|
2098
2121
|
const i = t.grid.virtualScrollRowHeight, r = Math.max(0, (e - 1) * i), s = Math.max(0, o.scrollHeight - o.clientHeight);
|
|
2099
2122
|
o.scrollTop = Math.min(r, s);
|
|
2100
2123
|
}
|
|
2101
|
-
function
|
|
2124
|
+
function B(t, e, o) {
|
|
2102
2125
|
if (e) {
|
|
2103
2126
|
const i = t.shadow.querySelector(
|
|
2104
2127
|
`[data-row="${e.rowIndex}"][data-col="${e.colIndex}"]`
|
|
@@ -2112,7 +2135,7 @@ function U(t, e, o) {
|
|
|
2112
2135
|
i == null || i.classList.add("wg__cell--focused");
|
|
2113
2136
|
}
|
|
2114
2137
|
}
|
|
2115
|
-
function
|
|
2138
|
+
function F(t) {
|
|
2116
2139
|
const e = t.grid.editingCell;
|
|
2117
2140
|
if (e) {
|
|
2118
2141
|
const o = t.grid.columns.findIndex((r) => String(r.field) === e.field), i = t.shadow.querySelector(
|
|
@@ -2121,23 +2144,23 @@ function P(t) {
|
|
|
2121
2144
|
i && i.classList.remove("wg__cell--editing");
|
|
2122
2145
|
}
|
|
2123
2146
|
}
|
|
2124
|
-
function
|
|
2147
|
+
function Wo(t, e, o) {
|
|
2125
2148
|
if (!t.grid.isNavigateMode) return;
|
|
2126
2149
|
const i = t.grid.focusedCell, r = { rowIndex: e, colIndex: o };
|
|
2127
|
-
t.grid.setFocusedCell(e, o),
|
|
2150
|
+
t.grid.setFocusedCell(e, o), B(t, i, r);
|
|
2128
2151
|
}
|
|
2129
2152
|
function E(t, e, o) {
|
|
2130
2153
|
const i = t.grid.focusedCell, r = { rowIndex: e, colIndex: o };
|
|
2131
|
-
t.grid.setFocusedCell(e, o),
|
|
2154
|
+
t.grid.setFocusedCell(e, o), B(t, i, r), Bo(t, e, o);
|
|
2132
2155
|
}
|
|
2133
|
-
function
|
|
2156
|
+
function j(t, e, o, i) {
|
|
2134
2157
|
const s = t.grid.columns[o];
|
|
2135
2158
|
if (!s || !t.grid.isCellEditable(s))
|
|
2136
2159
|
return;
|
|
2137
2160
|
const n = String(s.field);
|
|
2138
2161
|
t.grid.startEdit(e, n, i);
|
|
2139
2162
|
}
|
|
2140
|
-
function
|
|
2163
|
+
function zt(t, e) {
|
|
2141
2164
|
const o = e.querySelector(".wg__cell-text");
|
|
2142
2165
|
if (!o) return null;
|
|
2143
2166
|
const i = o.textContent || "";
|
|
@@ -2164,14 +2187,14 @@ function Bo(t, e) {
|
|
|
2164
2187
|
}
|
|
2165
2188
|
return a;
|
|
2166
2189
|
}
|
|
2167
|
-
function
|
|
2190
|
+
function Xo(t, e) {
|
|
2168
2191
|
const o = e.relatedTarget, i = t.shadow.querySelector(".wg__table");
|
|
2169
2192
|
if (!o || !(i != null && i.contains(o))) {
|
|
2170
2193
|
const r = t.grid.focusedCell;
|
|
2171
|
-
t.grid.clearFocusedCell(),
|
|
2194
|
+
t.grid.clearFocusedCell(), B(t, r, null);
|
|
2172
2195
|
}
|
|
2173
2196
|
}
|
|
2174
|
-
function
|
|
2197
|
+
function Qo(t, e) {
|
|
2175
2198
|
if (!t) return null;
|
|
2176
2199
|
const [o, i, r] = t.split("-").map(Number), s = new Date(o, i - 1, r);
|
|
2177
2200
|
if (isNaN(s.getTime())) return null;
|
|
@@ -2192,14 +2215,14 @@ function Tt(t, e) {
|
|
|
2192
2215
|
if (e.type === "checkbox") {
|
|
2193
2216
|
const s = JSON.parse(e.dataset.trueValue || "true"), n = JSON.parse(e.dataset.falseValue || "false");
|
|
2194
2217
|
r = e.checked ? s : n;
|
|
2195
|
-
} else e.classList.contains("wg__editor--number") ? r = e.value === "" ? null : parseFloat(e.value) : e.type === "date" ? r =
|
|
2218
|
+
} else e.classList.contains("wg__editor--number") ? r = e.value === "" ? null : parseFloat(e.value) : e.type === "date" ? r = Qo(e.value, e.dataset.outputFormat || "iso") : r = e.value;
|
|
2196
2219
|
else e instanceof HTMLSelectElement && (r = e.value);
|
|
2197
2220
|
t.grid.commitEdit(o, i, r);
|
|
2198
2221
|
}
|
|
2199
|
-
function
|
|
2222
|
+
function Go(t, e) {
|
|
2200
2223
|
Tt(t, e);
|
|
2201
2224
|
}
|
|
2202
|
-
function
|
|
2225
|
+
function Jo(t, e, o) {
|
|
2203
2226
|
const i = t.grid.columns[o];
|
|
2204
2227
|
if (!i) return;
|
|
2205
2228
|
const r = String(i.field), s = t.grid.displayItems[e];
|
|
@@ -2211,10 +2234,10 @@ function Qo(t, e, o) {
|
|
|
2211
2234
|
E(t, e + 1, o);
|
|
2212
2235
|
});
|
|
2213
2236
|
}
|
|
2214
|
-
function
|
|
2237
|
+
function Zo(t, e) {
|
|
2215
2238
|
t.isCommittingFromKeyboard || t.grid.editingCell && Tt(t, e);
|
|
2216
2239
|
}
|
|
2217
|
-
function
|
|
2240
|
+
function Ft(t, e, o, i) {
|
|
2218
2241
|
const s = t.grid.columns.findIndex((c) => String(c.field) === o), n = t.grid.displayItems;
|
|
2219
2242
|
let d = e, a = s;
|
|
2220
2243
|
if (i === "down")
|
|
@@ -2229,35 +2252,35 @@ function zt(t, e, o, i) {
|
|
|
2229
2252
|
E(t, d, a), t.isCommittingFromKeyboard = !1;
|
|
2230
2253
|
});
|
|
2231
2254
|
}
|
|
2232
|
-
function
|
|
2255
|
+
function ti(t, e, o) {
|
|
2233
2256
|
const r = t.grid.columns.findIndex((s) => String(s.field) === o);
|
|
2234
2257
|
r >= 0 && requestAnimationFrame(() => {
|
|
2235
2258
|
E(t, e, r), t.isCommittingFromKeyboard = !1;
|
|
2236
2259
|
});
|
|
2237
2260
|
}
|
|
2238
|
-
function
|
|
2261
|
+
function Ie(t, e, o, i) {
|
|
2239
2262
|
const r = String(i.field), s = t.grid.displayItems[e], n = t.grid.getCellRawValue(s, e, r);
|
|
2240
2263
|
switch (i.editor || "text") {
|
|
2241
2264
|
case "checkbox":
|
|
2242
|
-
return
|
|
2265
|
+
return ni(t, e, r, n, i);
|
|
2243
2266
|
case "number":
|
|
2244
|
-
return
|
|
2267
|
+
return oi(t, e, r, n, i);
|
|
2245
2268
|
case "date":
|
|
2246
|
-
return
|
|
2269
|
+
return ii(t, e, r, n, i);
|
|
2247
2270
|
case "select":
|
|
2248
|
-
return
|
|
2271
|
+
return si(t, e, r, n, i);
|
|
2249
2272
|
case "combobox":
|
|
2250
|
-
return
|
|
2273
|
+
return ai(t, e, r, n, i);
|
|
2251
2274
|
case "autocomplete":
|
|
2252
|
-
return
|
|
2275
|
+
return li(t, e, r, n, i);
|
|
2253
2276
|
case "custom":
|
|
2254
|
-
return
|
|
2277
|
+
return di(t, e, r, n, i);
|
|
2255
2278
|
case "text":
|
|
2256
2279
|
default:
|
|
2257
|
-
return
|
|
2280
|
+
return ei(t, e, r, n, i);
|
|
2258
2281
|
}
|
|
2259
2282
|
}
|
|
2260
|
-
function
|
|
2283
|
+
function ei(t, e, o, i, r) {
|
|
2261
2284
|
var a;
|
|
2262
2285
|
const s = r.editorOptions || {}, n = (a = t.grid.editingCell) == null ? void 0 : a.initialSearchQuery, d = n !== void 0 ? n : i != null ? String(i) : "";
|
|
2263
2286
|
return `
|
|
@@ -2273,7 +2296,7 @@ function Zo(t, e, o, i, r) {
|
|
|
2273
2296
|
/>
|
|
2274
2297
|
`;
|
|
2275
2298
|
}
|
|
2276
|
-
function
|
|
2299
|
+
function oi(t, e, o, i, r) {
|
|
2277
2300
|
var d;
|
|
2278
2301
|
r.editorOptions;
|
|
2279
2302
|
const s = (d = t.grid.editingCell) == null ? void 0 : d.initialSearchQuery;
|
|
@@ -2288,9 +2311,9 @@ function ti(t, e, o, i, r) {
|
|
|
2288
2311
|
/>
|
|
2289
2312
|
`;
|
|
2290
2313
|
}
|
|
2291
|
-
function
|
|
2314
|
+
function ii(t, e, o, i, r) {
|
|
2292
2315
|
var c;
|
|
2293
|
-
const s = r.editorOptions || {}, n = (c = t.grid.editingCell) == null ? void 0 : c.initialSearchQuery, d =
|
|
2316
|
+
const s = r.editorOptions || {}, n = (c = t.grid.editingCell) == null ? void 0 : c.initialSearchQuery, d = Vt(i), a = n !== void 0 ? n : ri(i, s.dateFormat);
|
|
2294
2317
|
return `
|
|
2295
2318
|
<div class="wg__editor wg__editor--date" data-row="${e}" data-field="${o}">
|
|
2296
2319
|
<input
|
|
@@ -2302,8 +2325,8 @@ function ei(t, e, o, i, r) {
|
|
|
2302
2325
|
data-date-value="${d}"
|
|
2303
2326
|
data-output-format="${s.outputFormat || "iso"}"
|
|
2304
2327
|
data-date-format="${s.dateFormat || "YYYY-MM-DD"}"
|
|
2305
|
-
${s.minDate ? `data-min-date="${
|
|
2306
|
-
${s.maxDate ? `data-max-date="${
|
|
2328
|
+
${s.minDate ? `data-min-date="${Vt(s.minDate)}"` : ""}
|
|
2329
|
+
${s.maxDate ? `data-max-date="${Vt(s.maxDate)}"` : ""}
|
|
2307
2330
|
placeholder="${t.escapeHtml(s.dateFormat || "YYYY-MM-DD")}"
|
|
2308
2331
|
/>
|
|
2309
2332
|
<button type="button" class="wg__date-trigger" tabindex="-1">
|
|
@@ -2312,21 +2335,21 @@ function ei(t, e, o, i, r) {
|
|
|
2312
2335
|
</div>
|
|
2313
2336
|
`;
|
|
2314
2337
|
}
|
|
2315
|
-
function
|
|
2338
|
+
function ri(t, e) {
|
|
2316
2339
|
if (!t) return "";
|
|
2317
2340
|
let o = null;
|
|
2318
2341
|
if (t instanceof Date ? o = t : typeof t == "number" ? o = new Date(t) : typeof t == "string" && (o = new Date(t)), !o || isNaN(o.getTime())) return "";
|
|
2319
2342
|
const i = e || "YYYY-MM-DD", r = o.getFullYear(), s = String(o.getMonth() + 1).padStart(2, "0"), n = String(o.getDate()).padStart(2, "0");
|
|
2320
2343
|
return i.replace("YYYY", String(r)).replace("YY", String(r).slice(-2)).replace("MM", s).replace("DD", n);
|
|
2321
2344
|
}
|
|
2322
|
-
function
|
|
2345
|
+
function Vt(t) {
|
|
2323
2346
|
if (!t) return "";
|
|
2324
2347
|
let e = null;
|
|
2325
2348
|
if (t instanceof Date ? e = t : typeof t == "number" ? e = new Date(t) : typeof t == "string" && (e = new Date(t)), !e || isNaN(e.getTime())) return "";
|
|
2326
2349
|
const o = e.getFullYear(), i = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0");
|
|
2327
2350
|
return `${o}-${i}-${r}`;
|
|
2328
2351
|
}
|
|
2329
|
-
function
|
|
2352
|
+
function ni(t, e, o, i, r) {
|
|
2330
2353
|
const s = r.editorOptions || {}, n = s.trueValue !== void 0 ? s.trueValue : !0;
|
|
2331
2354
|
return `
|
|
2332
2355
|
<input
|
|
@@ -2340,10 +2363,10 @@ function ii(t, e, o, i, r) {
|
|
|
2340
2363
|
/>
|
|
2341
2364
|
`;
|
|
2342
2365
|
}
|
|
2343
|
-
function
|
|
2366
|
+
function si(t, e, o, i, r) {
|
|
2344
2367
|
var c;
|
|
2345
|
-
const s = r.editorOptions || {}, n = s.options || [], d =
|
|
2346
|
-
return t.dropdownOptions = n, t.filterText = a || "", t.highlightedIndex = n.findIndex((l) =>
|
|
2368
|
+
const s = r.editorOptions || {}, n = s.options || [], d = Jt(i, n, s), a = (c = t.grid.editingCell) == null ? void 0 : c.initialSearchQuery;
|
|
2369
|
+
return t.dropdownOptions = n, t.filterText = a || "", t.highlightedIndex = n.findIndex((l) => at(l, s) === i), t.highlightedIndex < 0 && n.length > 0 && (t.highlightedIndex = 0), `
|
|
2347
2370
|
<div
|
|
2348
2371
|
class="wg__editor wg__editor--select wg__select-trigger"
|
|
2349
2372
|
tabindex="0"
|
|
@@ -2357,9 +2380,9 @@ function ri(t, e, o, i, r) {
|
|
|
2357
2380
|
</div>
|
|
2358
2381
|
`;
|
|
2359
2382
|
}
|
|
2360
|
-
function
|
|
2383
|
+
function ai(t, e, o, i, r) {
|
|
2361
2384
|
var l;
|
|
2362
|
-
const s = r.editorOptions || {}, n = s.options || [], d =
|
|
2385
|
+
const s = r.editorOptions || {}, n = s.options || [], d = Jt(i, n, s), a = (l = t.grid.editingCell) == null ? void 0 : l.initialSearchQuery, c = a !== void 0 ? a : d;
|
|
2363
2386
|
return t.dropdownOptions = n, t.filterText = c, t.highlightedIndex = n.length > 0 ? 0 : -1, `
|
|
2364
2387
|
<div class="wg__editor wg__editor--combobox" data-row="${e}" data-field="${o}">
|
|
2365
2388
|
<input
|
|
@@ -2373,9 +2396,9 @@ function ni(t, e, o, i, r) {
|
|
|
2373
2396
|
</div>
|
|
2374
2397
|
`;
|
|
2375
2398
|
}
|
|
2376
|
-
function
|
|
2399
|
+
function li(t, e, o, i, r) {
|
|
2377
2400
|
var l;
|
|
2378
|
-
const s = r.editorOptions || {}, n = s.initialOptions || s.options || [], d =
|
|
2401
|
+
const s = r.editorOptions || {}, n = s.initialOptions || s.options || [], d = Jt(i, n, s), a = (l = t.grid.editingCell) == null ? void 0 : l.initialSearchQuery, c = a !== void 0 ? a : d;
|
|
2379
2402
|
return t.dropdownOptions = n, t.filterText = c, t.highlightedIndex = n.length > 0 ? 0 : -1, `
|
|
2380
2403
|
<div class="wg__editor wg__editor--autocomplete" data-row="${e}" data-field="${o}">
|
|
2381
2404
|
<input
|
|
@@ -2391,7 +2414,7 @@ function si(t, e, o, i, r) {
|
|
|
2391
2414
|
</div>
|
|
2392
2415
|
`;
|
|
2393
2416
|
}
|
|
2394
|
-
function
|
|
2417
|
+
function di(t, e, o, i, r) {
|
|
2395
2418
|
const s = r.formatCallback ? r.formatCallback(i, t.grid.displayItems[e]) : i != null ? String(i) : "";
|
|
2396
2419
|
return `
|
|
2397
2420
|
<div
|
|
@@ -2404,7 +2427,7 @@ function ai(t, e, o, i, r) {
|
|
|
2404
2427
|
</div>
|
|
2405
2428
|
`;
|
|
2406
2429
|
}
|
|
2407
|
-
function
|
|
2430
|
+
function Pe(t, e, o, i, r, s) {
|
|
2408
2431
|
const n = i.editor === "select" || i.editor === "combobox" || i.editor === "autocomplete", d = i.editor === "date", a = String(i.field);
|
|
2409
2432
|
return n ? `
|
|
2410
2433
|
<div class="wg__cell-dropdown-display ${t.grid.getEffectiveToggleVisibility(i) === "on-focus" ? "wg__cell-dropdown-display--toggle-on-focus" : ""}" data-row="${e}" data-field="${a}">
|
|
@@ -2420,22 +2443,22 @@ function Re(t, e, o, i, r, s) {
|
|
|
2420
2443
|
</div>
|
|
2421
2444
|
` : i.templateCallback ? `<span class="wg__cell-text">${r}</span>` : `<span class="wg__cell-text">${t.escapeHtml(r)}</span>`;
|
|
2422
2445
|
}
|
|
2423
|
-
let
|
|
2446
|
+
let V = {
|
|
2424
2447
|
path: null,
|
|
2425
2448
|
arrowPos: null,
|
|
2426
2449
|
arrowDir: "right"
|
|
2427
2450
|
};
|
|
2428
|
-
const
|
|
2451
|
+
const ci = {
|
|
2429
2452
|
add: { icon: "+", title: "Add row" },
|
|
2430
2453
|
delete: { icon: "−", title: "Delete row", danger: !0 },
|
|
2431
2454
|
duplicate: { icon: "⧉", title: "Duplicate row" },
|
|
2432
2455
|
moveUp: { icon: "↑", title: "Move up" },
|
|
2433
2456
|
moveDown: { icon: "↓", title: "Move down" }
|
|
2434
2457
|
};
|
|
2435
|
-
function
|
|
2458
|
+
function gi(t) {
|
|
2436
2459
|
return t.map((e, o) => {
|
|
2437
2460
|
if (typeof e == "string") {
|
|
2438
|
-
const i =
|
|
2461
|
+
const i = ci[e];
|
|
2439
2462
|
return i ? {
|
|
2440
2463
|
id: e,
|
|
2441
2464
|
icon: i.icon,
|
|
@@ -2460,7 +2483,7 @@ function di(t) {
|
|
|
2460
2483
|
};
|
|
2461
2484
|
}).filter((e) => e !== null);
|
|
2462
2485
|
}
|
|
2463
|
-
function
|
|
2486
|
+
function ui(t) {
|
|
2464
2487
|
const e = /* @__PURE__ */ new Map();
|
|
2465
2488
|
for (const r of t) {
|
|
2466
2489
|
const s = r.row;
|
|
@@ -2484,8 +2507,8 @@ function ci(t) {
|
|
|
2484
2507
|
}
|
|
2485
2508
|
return o;
|
|
2486
2509
|
}
|
|
2487
|
-
function
|
|
2488
|
-
return `<div class="wg__toolbar">${
|
|
2510
|
+
function hi(t, e, o) {
|
|
2511
|
+
return `<div class="wg__toolbar">${ui(t).map(({ groups: s }) => `<div class="wg__toolbar-row">${s.map(({ items: d }, a) => {
|
|
2489
2512
|
const c = a > 0 ? '<div class="wg__toolbar-divider"></div>' : "", l = d.map((g) => {
|
|
2490
2513
|
const h = typeof g.disabled == "function" ? g.disabled(e, o) : g.disabled, u = [
|
|
2491
2514
|
"wg__toolbar-btn",
|
|
@@ -2502,9 +2525,9 @@ function gi(t, e, o) {
|
|
|
2502
2525
|
}).join("")}</div>`).join("")}</div>`;
|
|
2503
2526
|
}
|
|
2504
2527
|
let $ = null;
|
|
2505
|
-
function
|
|
2528
|
+
function pi(t, e, o, i, r, s, n) {
|
|
2506
2529
|
Et();
|
|
2507
|
-
const d =
|
|
2530
|
+
const d = hi(i, r, o), a = document.createElement("div");
|
|
2508
2531
|
a.className = "wg__toolbar-container", a.innerHTML = d, t.shadow.appendChild(a);
|
|
2509
2532
|
const c = a.querySelector(".wg__toolbar");
|
|
2510
2533
|
let l = "left";
|
|
@@ -2514,21 +2537,21 @@ function ui(t, e, o, i, r, s, n) {
|
|
|
2514
2537
|
Et();
|
|
2515
2538
|
return;
|
|
2516
2539
|
}
|
|
2517
|
-
const u = h.getBoundingClientRect(), p = c.getBoundingClientRect(), m = t.shadow.querySelector(".wg__table"), f = m == null ? void 0 : m.getBoundingClientRect(),
|
|
2518
|
-
f && (f.left >=
|
|
2519
|
-
let
|
|
2540
|
+
const u = h.getBoundingClientRect(), p = c.getBoundingClientRect(), m = t.shadow.querySelector(".wg__table"), f = m == null ? void 0 : m.getBoundingClientRect(), v = 100;
|
|
2541
|
+
f && (f.left >= v ? l = "left" : window.innerWidth - f.right >= v ? l = "right" : l = "top");
|
|
2542
|
+
let b, _;
|
|
2520
2543
|
if (l === "left")
|
|
2521
|
-
|
|
2544
|
+
b = u.left - p.width, _ = u.top + (u.height - p.height) / 2;
|
|
2522
2545
|
else if (l === "right")
|
|
2523
|
-
|
|
2546
|
+
b = u.right, _ = u.top + (u.height - p.height) / 2;
|
|
2524
2547
|
else {
|
|
2525
2548
|
_ = u.top - p.height;
|
|
2526
|
-
const
|
|
2527
|
-
|
|
2549
|
+
const S = t.grid.toolbarTopPosition;
|
|
2550
|
+
S === "start" ? b = u.left : S === "end" ? b = u.right - p.width : S === "cursor" && n !== void 0 ? b = n - p.width / 2 : b = u.left + (u.width - p.width) / 2;
|
|
2528
2551
|
}
|
|
2529
|
-
l !== "top" && t.grid.toolbarAlign === "top" && (_ = u.top),
|
|
2552
|
+
l !== "top" && t.grid.toolbarAlign === "top" && (_ = u.top), b + p.width > window.innerWidth - 8 && (b = window.innerWidth - p.width - 8), b < 8 && (b = 8), _ + p.height > window.innerHeight - 8 && (_ = window.innerHeight - p.height - 8), _ < 8 && (_ = 8), Object.assign(c.style, {
|
|
2530
2553
|
position: "fixed",
|
|
2531
|
-
left: `${
|
|
2554
|
+
left: `${b}px`,
|
|
2532
2555
|
top: `${_}px`
|
|
2533
2556
|
}), $ && ($.position = l);
|
|
2534
2557
|
});
|
|
@@ -2550,95 +2573,95 @@ function ui(t, e, o, i, r, s, n) {
|
|
|
2550
2573
|
cleanup: () => {
|
|
2551
2574
|
a.removeEventListener("click", g), a.remove();
|
|
2552
2575
|
}
|
|
2553
|
-
},
|
|
2576
|
+
}, V = { path: null, arrowPos: null, arrowDir: "right" };
|
|
2554
2577
|
}
|
|
2555
2578
|
function Et() {
|
|
2556
|
-
$ && ($.cleanup(), $ = null),
|
|
2579
|
+
$ && ($.cleanup(), $ = null), V = { path: null, arrowPos: null, arrowDir: "right" };
|
|
2557
2580
|
}
|
|
2558
2581
|
function $t() {
|
|
2559
2582
|
return ($ == null ? void 0 : $.rowIndex) ?? null;
|
|
2560
2583
|
}
|
|
2561
|
-
function
|
|
2584
|
+
function fi(t) {
|
|
2562
2585
|
return ($ == null ? void 0 : $.container.getRootNode()) === t;
|
|
2563
2586
|
}
|
|
2564
|
-
function
|
|
2587
|
+
function qt(t) {
|
|
2565
2588
|
return ($ == null ? void 0 : $.rowIndex) === t;
|
|
2566
2589
|
}
|
|
2567
|
-
function
|
|
2568
|
-
return
|
|
2590
|
+
function wi() {
|
|
2591
|
+
return V;
|
|
2569
2592
|
}
|
|
2570
|
-
function
|
|
2593
|
+
function mi(t, e) {
|
|
2571
2594
|
if (!$) {
|
|
2572
|
-
|
|
2595
|
+
V = { path: null, arrowPos: null, arrowDir: "right" };
|
|
2573
2596
|
return;
|
|
2574
2597
|
}
|
|
2575
|
-
const { toolbar: o, rowItem: i, position: r } = $, s = e.findIndex((
|
|
2598
|
+
const { toolbar: o, rowItem: i, position: r } = $, s = e.findIndex((b) => b === i);
|
|
2576
2599
|
if (s === -1) {
|
|
2577
|
-
|
|
2600
|
+
V = { path: null, arrowPos: null, arrowDir: "right" };
|
|
2578
2601
|
return;
|
|
2579
2602
|
}
|
|
2580
2603
|
const n = t.shadow.querySelector(`tr[data-row-index="${s}"]`);
|
|
2581
2604
|
if (!n) {
|
|
2582
|
-
|
|
2605
|
+
V = { path: null, arrowPos: null, arrowDir: "right" };
|
|
2583
2606
|
return;
|
|
2584
2607
|
}
|
|
2585
2608
|
if (s === $.rowIndex || ($.hasRowMoved = !0), !$.hasRowMoved) {
|
|
2586
|
-
|
|
2609
|
+
V = { path: null, arrowPos: null, arrowDir: "right" };
|
|
2587
2610
|
return;
|
|
2588
2611
|
}
|
|
2589
2612
|
const a = o.getBoundingClientRect(), c = n.getBoundingClientRect(), l = t.shadow.querySelector(".wg__table"), g = l == null ? void 0 : l.getBoundingClientRect();
|
|
2590
2613
|
if (!g) {
|
|
2591
|
-
|
|
2614
|
+
V = { path: null, arrowPos: null, arrowDir: "right" };
|
|
2592
2615
|
return;
|
|
2593
2616
|
}
|
|
2594
2617
|
const h = document.dir === "rtl" || document.documentElement.dir === "rtl";
|
|
2595
2618
|
c.bottom < a.top || c.top > a.bottom;
|
|
2596
2619
|
const u = h ? g.right + 15 : g.left - 15, p = h ? c.right + 8 : c.left - 8, m = c.top + c.height / 2;
|
|
2597
|
-
let f,
|
|
2620
|
+
let f, v = h ? "left" : "right";
|
|
2598
2621
|
if (r === "left") {
|
|
2599
|
-
const
|
|
2600
|
-
f = `M ${
|
|
2622
|
+
const b = a.right, _ = a.top + a.height / 2;
|
|
2623
|
+
f = `M ${b} ${_} H ${u} V ${m} H ${p}`;
|
|
2601
2624
|
} else if (r === "right") {
|
|
2602
|
-
const
|
|
2603
|
-
f = `M ${
|
|
2625
|
+
const b = a.left, _ = a.top + a.height / 2;
|
|
2626
|
+
f = `M ${b} ${_} H ${u} V ${m} H ${p}`;
|
|
2604
2627
|
} else {
|
|
2605
|
-
const _ = a.right,
|
|
2606
|
-
if (
|
|
2607
|
-
const
|
|
2608
|
-
f = `M ${_} ${
|
|
2628
|
+
const _ = a.right, S = a.top + a.height / 2, y = _ + 48, D = s - $.rowIndex, x = 8;
|
|
2629
|
+
if (D === 0) {
|
|
2630
|
+
const C = c.top - x;
|
|
2631
|
+
f = `M ${_} ${S} H ${y} V ${C}`, V = { path: f, arrowPos: { x: y, y: C }, arrowDir: "down" };
|
|
2609
2632
|
return;
|
|
2610
|
-
} else if (
|
|
2611
|
-
const T = a.top + a.height * 0.25,
|
|
2612
|
-
f = `M ${a.right} ${T} H ${
|
|
2633
|
+
} else if (D === -1) {
|
|
2634
|
+
const T = a.top + a.height * 0.25, k = a.top + a.height * 0.75, I = a.right + 24, M = a.right + x;
|
|
2635
|
+
f = `M ${a.right} ${T} H ${I} V ${k} H ${M}`, V = { path: f, arrowPos: { x: M, y: k }, arrowDir: "left" };
|
|
2613
2636
|
return;
|
|
2614
|
-
} else if (
|
|
2615
|
-
const
|
|
2616
|
-
f = `M ${_} ${
|
|
2637
|
+
} else if (D < 0) {
|
|
2638
|
+
const C = c.bottom + x;
|
|
2639
|
+
f = `M ${_} ${S} H ${y} V ${C}`, V = { path: f, arrowPos: { x: y, y: C }, arrowDir: "up" };
|
|
2617
2640
|
return;
|
|
2618
2641
|
} else {
|
|
2619
|
-
const
|
|
2620
|
-
f = `M ${_} ${
|
|
2642
|
+
const C = c.top - x;
|
|
2643
|
+
f = `M ${_} ${S} H ${y} V ${C}`, V = { path: f, arrowPos: { x: y, y: C }, arrowDir: "down" };
|
|
2621
2644
|
return;
|
|
2622
2645
|
}
|
|
2623
2646
|
}
|
|
2624
|
-
|
|
2647
|
+
V = { path: f, arrowPos: { x: p, y: m }, arrowDir: v };
|
|
2625
2648
|
}
|
|
2626
|
-
function
|
|
2649
|
+
function He(t, e) {
|
|
2627
2650
|
return `<button
|
|
2628
2651
|
class="wg__toolbar-trigger ${e ? "wg__toolbar-trigger--active" : ""}"
|
|
2629
2652
|
data-toolbar-trigger="${t}"
|
|
2630
2653
|
title="Row actions"
|
|
2631
2654
|
>⋮</button>`;
|
|
2632
2655
|
}
|
|
2633
|
-
function
|
|
2656
|
+
function bi(t) {
|
|
2634
2657
|
const e = ["wg"];
|
|
2635
2658
|
return t.grid.striped && e.push("wg--striped"), t.grid.hoverable && e.push("wg--hoverable"), t.grid.editable && e.push("wg--editable"), t.grid.isNavigateMode && e.push("wg--navigate-mode"), e.join(" ");
|
|
2636
2659
|
}
|
|
2637
|
-
function
|
|
2660
|
+
function vi(t) {
|
|
2638
2661
|
const e = t.grid.columns;
|
|
2639
2662
|
if (e.length === 0) return "";
|
|
2640
2663
|
const o = t.grid.showRowNumbers ? '<th class="wg__header wg__row-number-header">#</th>' : "", r = t.grid.showRowToolbar && t.grid.toolbarTrigger === "button" ? '<th class="wg__header wg__actions-column"></th>' : "", s = e.map((n) => {
|
|
2641
|
-
const d = String(n.field), a = n.sortable !== !1 && t.grid.
|
|
2664
|
+
const d = String(n.field), a = n.sortable !== !1 && t.grid.sortMode !== "none", c = t.grid.getColumnSortState(d), l = t.grid.getColumnSortPriority(d), g = c !== void 0, h = ["wg__header"];
|
|
2642
2665
|
a && h.push("wg__header--sortable"), g && h.push("wg__header--sorted");
|
|
2643
2666
|
const u = n.width || n.maxWidth, m = `style="${[
|
|
2644
2667
|
u ? `width: ${u}` : "",
|
|
@@ -2648,16 +2671,16 @@ function mi(t) {
|
|
|
2648
2671
|
let f = "";
|
|
2649
2672
|
if (a)
|
|
2650
2673
|
if (g) {
|
|
2651
|
-
const
|
|
2652
|
-
f = `<span class="wg__sort-indicator">${
|
|
2674
|
+
const b = c.direction === "asc" ? "▲" : "▼", _ = t.grid.sort.length > 1 ? `<sup class="wg__sort-priority">${l}</sup>` : "";
|
|
2675
|
+
f = `<span class="wg__sort-indicator">${b}${_}</span>`;
|
|
2653
2676
|
} else
|
|
2654
2677
|
f = '<span class="wg__sort-indicator wg__sort-placeholder">⬍</span>';
|
|
2655
|
-
let
|
|
2656
|
-
return n.headerInfo && (
|
|
2678
|
+
let v = "";
|
|
2679
|
+
return n.headerInfo && (v = `<span class="wg__header-info" data-tooltip="${t.escapeHtml(n.headerInfo)}"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg></span>`), `
|
|
2657
2680
|
<th class="${h.join(" ")}" ${m} data-field="${d}">
|
|
2658
2681
|
<div class="wg__header-content">
|
|
2659
2682
|
<span class="wg__header-title">${t.escapeHtml(n.title)}</span>
|
|
2660
|
-
${
|
|
2683
|
+
${v}
|
|
2661
2684
|
${f}
|
|
2662
2685
|
</div>
|
|
2663
2686
|
</th>
|
|
@@ -2665,7 +2688,7 @@ function mi(t) {
|
|
|
2665
2688
|
}).join("");
|
|
2666
2689
|
return `<tr>${o}${r}${s}</tr>`;
|
|
2667
2690
|
}
|
|
2668
|
-
function
|
|
2691
|
+
function _i(t) {
|
|
2669
2692
|
const e = t.grid.displayItems, o = t.grid.columns, i = t.grid.showRowNumbers, r = t.grid.showRowToolbar && t.grid.toolbarTrigger === "button", s = o.length + (r ? 1 : 0) + (i ? 1 : 0);
|
|
2670
2693
|
if (e.length === 0)
|
|
2671
2694
|
return `
|
|
@@ -2681,40 +2704,57 @@ function bi(t) {
|
|
|
2681
2704
|
let l = "";
|
|
2682
2705
|
r && (l = `
|
|
2683
2706
|
<td class="wg__cell wg__actions-column">
|
|
2684
|
-
${
|
|
2707
|
+
${He(a, n === a)}
|
|
2685
2708
|
</td>
|
|
2686
2709
|
`);
|
|
2687
2710
|
const g = o.map((u, p) => {
|
|
2688
|
-
const m = String(u.field), f = t.grid.getCellValue(d, u, a),
|
|
2689
|
-
if (
|
|
2690
|
-
const T = t.grid.getCellRawValue(d, a, m),
|
|
2691
|
-
|
|
2711
|
+
const m = String(u.field), f = t.grid.getCellValue(d, u, a), v = u.align || "left", b = t.grid.isCellEditable(u), _ = t.grid.isCellFocused(a, p), S = ["wg__cell"], y = t.grid.isEditing(a, m);
|
|
2712
|
+
if (b && S.push("wg__cell--editable"), _ && !y && S.push("wg__cell--focused"), u.textOverflow === "ellipsis" && S.push("wg__cell--ellipsis"), y && S.push("wg__cell--editing"), t.grid.isCellInvalid(a, m) && S.push("wg__cell--invalid"), u.cellClass && S.push(u.cellClass), u.cellClassCallback) {
|
|
2713
|
+
const T = t.grid.getCellRawValue(d, a, m), k = u.cellClassCallback(T, d);
|
|
2714
|
+
k && S.push(k);
|
|
2692
2715
|
}
|
|
2693
|
-
const
|
|
2694
|
-
`text-align: ${
|
|
2716
|
+
const D = [
|
|
2717
|
+
`text-align: ${v}`,
|
|
2695
2718
|
u.width ? `width: ${u.width}` : "",
|
|
2696
2719
|
u.minWidth ? `min-width: ${u.minWidth}` : "",
|
|
2697
2720
|
u.maxWidth ? `max-width: ${u.maxWidth}` : ""
|
|
2698
2721
|
].filter(Boolean).join("; "), x = t.grid.isNavigateMode ? 'tabindex="0"' : "";
|
|
2699
|
-
let
|
|
2722
|
+
let C = "";
|
|
2700
2723
|
if (u.tooltipCallback) {
|
|
2701
|
-
const T = t.grid.getCellRawValue(d, a, m),
|
|
2702
|
-
|
|
2724
|
+
const T = t.grid.getCellRawValue(d, a, m), k = u.tooltipCallback(T, d);
|
|
2725
|
+
k && (C = `data-tooltip="${t.escapeHtml(k)}"`);
|
|
2703
2726
|
} else if (u.tooltipMember) {
|
|
2704
2727
|
const T = d[u.tooltipMember];
|
|
2705
|
-
T && typeof T == "string" && (
|
|
2728
|
+
T && typeof T == "string" && (C = `data-tooltip="${t.escapeHtml(T)}"`);
|
|
2729
|
+
}
|
|
2730
|
+
if (!C && t.grid.isCellInvalid(a, m)) {
|
|
2731
|
+
const T = t.grid.getCellValidationError(a, m);
|
|
2732
|
+
if (T) {
|
|
2733
|
+
const k = u.validationTooltipCallback || t.grid.validationTooltipCallback;
|
|
2734
|
+
if (k) {
|
|
2735
|
+
const I = t.grid.getCellRawValue(d, a, m), M = k({
|
|
2736
|
+
field: m,
|
|
2737
|
+
error: T,
|
|
2738
|
+
value: I,
|
|
2739
|
+
row: d,
|
|
2740
|
+
rowIndex: a
|
|
2741
|
+
});
|
|
2742
|
+
M && (C = `data-tooltip-html="${t.escapeHtml(M)}"`);
|
|
2743
|
+
}
|
|
2744
|
+
C || (C = `data-tooltip="${t.escapeHtml(T)}"`);
|
|
2745
|
+
}
|
|
2706
2746
|
}
|
|
2707
2747
|
return `
|
|
2708
2748
|
<td
|
|
2709
|
-
class="${
|
|
2710
|
-
style="${
|
|
2749
|
+
class="${S.join(" ")}"
|
|
2750
|
+
style="${D}"
|
|
2711
2751
|
data-row="${a}"
|
|
2712
2752
|
data-col="${p}"
|
|
2713
2753
|
data-field="${m}"
|
|
2714
2754
|
${x}
|
|
2715
|
-
${
|
|
2755
|
+
${C}
|
|
2716
2756
|
>
|
|
2717
|
-
${t.grid.isEditing(a, m) ?
|
|
2757
|
+
${t.grid.isEditing(a, m) ? Ie(t, a, p, u) : Pe(t, a, p, u, f)}
|
|
2718
2758
|
</td>
|
|
2719
2759
|
`;
|
|
2720
2760
|
}).join(""), h = ["wg__row"];
|
|
@@ -2725,7 +2765,7 @@ function bi(t) {
|
|
|
2725
2765
|
return `<tr class="${h.join(" ")}" data-row-index="${a}">${c}${l}${g}</tr>`;
|
|
2726
2766
|
}).join("");
|
|
2727
2767
|
}
|
|
2728
|
-
function
|
|
2768
|
+
function ve(t, e) {
|
|
2729
2769
|
const o = t.grid.displayItems, i = t.grid.columns, { startIndex: r, endIndex: s, rowHeight: n, totalItems: d } = e, a = t.grid.showRowNumbers, c = t.grid.showRowToolbar && t.grid.toolbarTrigger === "button", l = i.length + (c ? 1 : 0) + (a ? 1 : 0);
|
|
2730
2770
|
if (o.length === 0)
|
|
2731
2771
|
return `
|
|
@@ -2736,58 +2776,75 @@ function we(t, e) {
|
|
|
2736
2776
|
</tr>
|
|
2737
2777
|
`;
|
|
2738
2778
|
const g = $t(), h = r * n, u = (d - s) * n, p = h > 0 ? `<tr class="wg__spacer-top"><td colspan="${l}" style="height: ${h}px"></td></tr>` : "", m = [];
|
|
2739
|
-
for (let
|
|
2740
|
-
const
|
|
2779
|
+
for (let v = r; v < s && v < o.length; v++) {
|
|
2780
|
+
const b = o[v], _ = v, S = a ? `<td class="wg__cell wg__row-number">${_ + 1}</td>` : "";
|
|
2741
2781
|
let y = "";
|
|
2742
2782
|
c && (y = `
|
|
2743
2783
|
<td class="wg__cell wg__actions-column">
|
|
2744
|
-
${
|
|
2784
|
+
${He(_, g === _)}
|
|
2745
2785
|
</td>
|
|
2746
2786
|
`);
|
|
2747
|
-
const
|
|
2748
|
-
const
|
|
2749
|
-
if (
|
|
2750
|
-
const
|
|
2751
|
-
|
|
2787
|
+
const D = i.map((C, T) => {
|
|
2788
|
+
const k = String(C.field), I = t.grid.getCellValue(b, C, _), M = C.align || "left", Q = t.grid.isCellEditable(C), A = t.grid.isCellFocused(_, T), O = ["wg__cell"], U = t.grid.isEditing(_, k);
|
|
2789
|
+
if (Q && O.push("wg__cell--editable"), A && !U && O.push("wg__cell--focused"), C.textOverflow === "ellipsis" && O.push("wg__cell--ellipsis"), U && O.push("wg__cell--editing"), t.grid.isCellInvalid(_, k) && O.push("wg__cell--invalid"), C.cellClass && O.push(C.cellClass), C.cellClassCallback) {
|
|
2790
|
+
const z = t.grid.getCellRawValue(b, _, k), ot = C.cellClassCallback(z, b);
|
|
2791
|
+
ot && O.push(ot);
|
|
2752
2792
|
}
|
|
2753
|
-
const
|
|
2754
|
-
`text-align: ${
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
].filter(Boolean).join("; "),
|
|
2759
|
-
let
|
|
2760
|
-
if (
|
|
2761
|
-
const
|
|
2762
|
-
|
|
2763
|
-
} else if (
|
|
2764
|
-
const
|
|
2765
|
-
|
|
2793
|
+
const P = [
|
|
2794
|
+
`text-align: ${M}`,
|
|
2795
|
+
C.width ? `width: ${C.width}` : "",
|
|
2796
|
+
C.minWidth ? `min-width: ${C.minWidth}` : "",
|
|
2797
|
+
C.maxWidth ? `max-width: ${C.maxWidth}` : ""
|
|
2798
|
+
].filter(Boolean).join("; "), H = t.grid.isNavigateMode ? 'tabindex="0"' : "";
|
|
2799
|
+
let R = "";
|
|
2800
|
+
if (C.tooltipCallback) {
|
|
2801
|
+
const z = t.grid.getCellRawValue(b, _, k), ot = C.tooltipCallback(z, b);
|
|
2802
|
+
ot && (R = `data-tooltip="${t.escapeHtml(ot)}"`);
|
|
2803
|
+
} else if (C.tooltipMember) {
|
|
2804
|
+
const z = b[C.tooltipMember];
|
|
2805
|
+
z && typeof z == "string" && (R = `data-tooltip="${t.escapeHtml(z)}"`);
|
|
2806
|
+
}
|
|
2807
|
+
if (!R && t.grid.isCellInvalid(_, k)) {
|
|
2808
|
+
const z = t.grid.getCellValidationError(_, k);
|
|
2809
|
+
if (z) {
|
|
2810
|
+
const ot = C.validationTooltipCallback || t.grid.validationTooltipCallback;
|
|
2811
|
+
if (ot) {
|
|
2812
|
+
const qe = t.grid.getCellRawValue(b, _, k), se = ot({
|
|
2813
|
+
field: k,
|
|
2814
|
+
error: z,
|
|
2815
|
+
value: qe,
|
|
2816
|
+
row: b,
|
|
2817
|
+
rowIndex: _
|
|
2818
|
+
});
|
|
2819
|
+
se && (R = `data-tooltip-html="${t.escapeHtml(se)}"`);
|
|
2820
|
+
}
|
|
2821
|
+
R || (R = `data-tooltip="${t.escapeHtml(z)}"`);
|
|
2822
|
+
}
|
|
2766
2823
|
}
|
|
2767
2824
|
return `
|
|
2768
2825
|
<td
|
|
2769
|
-
class="${
|
|
2770
|
-
style="${
|
|
2826
|
+
class="${O.join(" ")}"
|
|
2827
|
+
style="${P}"
|
|
2771
2828
|
data-row="${_}"
|
|
2772
2829
|
data-col="${T}"
|
|
2773
|
-
data-field="${
|
|
2774
|
-
${
|
|
2775
|
-
${
|
|
2830
|
+
data-field="${k}"
|
|
2831
|
+
${H}
|
|
2832
|
+
${R}
|
|
2776
2833
|
>
|
|
2777
|
-
${t.grid.isEditing(_,
|
|
2834
|
+
${t.grid.isEditing(_, k) ? Ie(t, _, T, C) : Pe(t, _, T, C, I)}
|
|
2778
2835
|
</td>
|
|
2779
2836
|
`;
|
|
2780
2837
|
}).join(""), x = ["wg__row"];
|
|
2781
2838
|
if (t.grid.rowClassCallback) {
|
|
2782
|
-
const
|
|
2783
|
-
|
|
2839
|
+
const C = t.grid.rowClassCallback(b, _);
|
|
2840
|
+
C && x.push(C);
|
|
2784
2841
|
}
|
|
2785
|
-
m.push(`<tr class="${x.join(" ")}" data-row-index="${_}">${
|
|
2842
|
+
m.push(`<tr class="${x.join(" ")}" data-row-index="${_}">${S}${y}${D}</tr>`);
|
|
2786
2843
|
}
|
|
2787
2844
|
const f = u > 0 ? `<tr class="wg__spacer-bottom"><td colspan="${l}" style="height: ${u}px"></td></tr>` : "";
|
|
2788
2845
|
return p + m.join("") + f;
|
|
2789
2846
|
}
|
|
2790
|
-
function
|
|
2847
|
+
function Yt(t, e = "bottom-center") {
|
|
2791
2848
|
const o = t.grid.showPagination;
|
|
2792
2849
|
if (!t.grid.pageable || o === !1 || o === "auto" && t.grid.totalPages <= 1) return "";
|
|
2793
2850
|
const i = t.grid.currentPage, r = t.grid.totalPages, s = t.grid.pageSize, n = t.grid.pageSizes, d = t.grid.totalItems !== null ? t.grid.totalItems : t.grid.sortedItems.length, a = {
|
|
@@ -2831,16 +2888,16 @@ function qt(t, e = "bottom-center") {
|
|
|
2831
2888
|
<div class="wg__pagination-pagesize">
|
|
2832
2889
|
<select class="wg__pagination-select" data-action="pagesize">
|
|
2833
2890
|
${n.map(
|
|
2834
|
-
(
|
|
2891
|
+
(b) => `<option value="${b}" ${b === s ? "selected" : ""}>${b}</option>`
|
|
2835
2892
|
).join("")}
|
|
2836
2893
|
</select>
|
|
2837
2894
|
<span class="wg__pagination-label">${g.perPage}</span>
|
|
2838
2895
|
</div>
|
|
2839
2896
|
` : ""
|
|
2840
|
-
},
|
|
2841
|
-
return `<div class="${p.join(" ")}">${
|
|
2897
|
+
}, v = t.grid.paginationLayout.split("|").map((b) => b.trim()).map((b) => m[b] || "").join("");
|
|
2898
|
+
return `<div class="${p.join(" ")}">${v}</div>`;
|
|
2842
2899
|
}
|
|
2843
|
-
function
|
|
2900
|
+
function Nt(t, e) {
|
|
2844
2901
|
const o = t.grid.summaryContentCallback;
|
|
2845
2902
|
if (!o) return "";
|
|
2846
2903
|
const i = t.grid.currentPage, r = t.grid.pageSize, s = t.grid.sortedItems, n = t.grid.displayItems, d = t.grid.totalItems !== null ? t.grid.totalItems : s.length, a = o({
|
|
@@ -2853,7 +2910,7 @@ function Yt(t, e) {
|
|
|
2853
2910
|
}), c = e.startsWith("top-"), l = e.replace("top-", "").replace("bottom-", ""), g = ["wg__summary"];
|
|
2854
2911
|
return l === "left" ? g.push("wg__summary--left") : l === "right" && g.push("wg__summary--right"), c && g.push("wg__summary--top"), `<div class="${g.join(" ")}">${a}</div>`;
|
|
2855
2912
|
}
|
|
2856
|
-
const
|
|
2913
|
+
const ze = {
|
|
2857
2914
|
today: "Today",
|
|
2858
2915
|
clear: "Clear",
|
|
2859
2916
|
monthNames: [
|
|
@@ -2895,7 +2952,7 @@ const Le = {
|
|
|
2895
2952
|
],
|
|
2896
2953
|
weekdayNamesShort: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
|
|
2897
2954
|
};
|
|
2898
|
-
function
|
|
2955
|
+
function Kt(t) {
|
|
2899
2956
|
const e = {};
|
|
2900
2957
|
let o = "";
|
|
2901
2958
|
return t.includes("-") ? o = "-" : t.includes("/") ? o = "/" : t.includes(".") && (o = "."), t.split(o).forEach((r, s) => {
|
|
@@ -2907,14 +2964,14 @@ function Bt(t) {
|
|
|
2907
2964
|
maxLength: t.length
|
|
2908
2965
|
};
|
|
2909
2966
|
}
|
|
2910
|
-
function
|
|
2967
|
+
function Fe(t, e) {
|
|
2911
2968
|
if (!t || isNaN(t.getTime())) return "";
|
|
2912
2969
|
const o = t.getFullYear(), i = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0"), { separator: s, parts: n } = e, d = [];
|
|
2913
2970
|
for (let a = 0; a < 3; a++)
|
|
2914
2971
|
n.year && n.year.index === a ? d.push(n.year.length === 2 ? String(o).slice(-2) : o) : n.month && n.month.index === a ? d.push(i) : n.day && n.day.index === a && d.push(r);
|
|
2915
2972
|
return d.join(s);
|
|
2916
2973
|
}
|
|
2917
|
-
function
|
|
2974
|
+
function yi(t, e) {
|
|
2918
2975
|
if (!t) return null;
|
|
2919
2976
|
const { separator: o, parts: i } = e, r = t.split(o);
|
|
2920
2977
|
let s = null, n = null, d = null;
|
|
@@ -2936,7 +2993,7 @@ function vi(t, e) {
|
|
|
2936
2993
|
const a = new Date(s, n - 1, d);
|
|
2937
2994
|
return a.getMonth() !== n - 1 || a.getDate() !== d ? null : a;
|
|
2938
2995
|
}
|
|
2939
|
-
function
|
|
2996
|
+
function N(t) {
|
|
2940
2997
|
if (!t) return null;
|
|
2941
2998
|
let e;
|
|
2942
2999
|
if (typeof t == "string") {
|
|
@@ -2946,23 +3003,23 @@ function V(t) {
|
|
|
2946
3003
|
e = new Date(t);
|
|
2947
3004
|
return e.setHours(0, 0, 0, 0), isNaN(e.getTime()) ? null : e;
|
|
2948
3005
|
}
|
|
2949
|
-
function
|
|
3006
|
+
function Wt(t) {
|
|
2950
3007
|
const e = t.getFullYear(), o = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0");
|
|
2951
3008
|
return `${e}-${o}-${i}`;
|
|
2952
3009
|
}
|
|
2953
3010
|
function _t(t, e) {
|
|
2954
3011
|
return !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
|
|
2955
3012
|
}
|
|
2956
|
-
function
|
|
3013
|
+
function Ci(t) {
|
|
2957
3014
|
return _t(t, /* @__PURE__ */ new Date());
|
|
2958
3015
|
}
|
|
2959
|
-
function
|
|
3016
|
+
function gt(t, e) {
|
|
2960
3017
|
return new Date(t, e + 1, 0).getDate();
|
|
2961
3018
|
}
|
|
2962
|
-
function
|
|
3019
|
+
function Si(t, e) {
|
|
2963
3020
|
return new Date(t, e, 1).getDay();
|
|
2964
3021
|
}
|
|
2965
|
-
function
|
|
3022
|
+
function xi(t, e) {
|
|
2966
3023
|
if (!t)
|
|
2967
3024
|
return { min: e - 10, max: e + 10 };
|
|
2968
3025
|
if (t.includes("-")) {
|
|
@@ -2972,8 +3029,8 @@ function Ci(t, e) {
|
|
|
2972
3029
|
const o = parseInt(t, 10);
|
|
2973
3030
|
return { min: o, max: o };
|
|
2974
3031
|
}
|
|
2975
|
-
function
|
|
2976
|
-
const i =
|
|
3032
|
+
function ki(t, e, o = ze) {
|
|
3033
|
+
const i = Di(t, o), r = Ti(t, e, o), s = Ei(t, e, o), n = e.showTodayButton !== !1 ? Ai(o) : "";
|
|
2977
3034
|
return `
|
|
2978
3035
|
<div class="wg-datepicker">
|
|
2979
3036
|
<div class="wg-datepicker__header">
|
|
@@ -2989,7 +3046,7 @@ function Si(t, e, o = Le) {
|
|
|
2989
3046
|
</div>
|
|
2990
3047
|
`;
|
|
2991
3048
|
}
|
|
2992
|
-
function
|
|
3049
|
+
function Di(t, e) {
|
|
2993
3050
|
return `
|
|
2994
3051
|
<button type="button" class="wg-datepicker__nav wg-datepicker__nav--prev" data-action="prev-month">
|
|
2995
3052
|
<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>
|
|
@@ -3002,8 +3059,8 @@ function xi(t, e) {
|
|
|
3002
3059
|
</button>
|
|
3003
3060
|
`;
|
|
3004
3061
|
}
|
|
3005
|
-
function
|
|
3006
|
-
const i =
|
|
3062
|
+
function Ti(t, e, o) {
|
|
3063
|
+
const i = xi(e.rollingYearRange, (/* @__PURE__ */ new Date()).getFullYear());
|
|
3007
3064
|
let r = "";
|
|
3008
3065
|
for (let n = i.min; n <= i.max; n++) {
|
|
3009
3066
|
const d = n === t.viewYear ? " wg-datepicker__rolling-item--selected" : "";
|
|
@@ -3025,8 +3082,8 @@ function ki(t, e, o) {
|
|
|
3025
3082
|
</div>
|
|
3026
3083
|
`;
|
|
3027
3084
|
}
|
|
3028
|
-
function
|
|
3029
|
-
const i =
|
|
3085
|
+
function Ei(t, e, o) {
|
|
3086
|
+
const i = $i(o), r = Ve(t, e);
|
|
3030
3087
|
return `
|
|
3031
3088
|
<div class="wg-datepicker__weekdays">
|
|
3032
3089
|
${i}
|
|
@@ -3036,45 +3093,45 @@ function Di(t, e, o) {
|
|
|
3036
3093
|
</div>
|
|
3037
3094
|
`;
|
|
3038
3095
|
}
|
|
3039
|
-
function
|
|
3096
|
+
function $i(t) {
|
|
3040
3097
|
return t.weekdayNamesShort.map((e) => `<div class="wg-datepicker__weekday">${e}</div>`).join("");
|
|
3041
3098
|
}
|
|
3042
|
-
function
|
|
3043
|
-
const { viewYear: o, viewMonth: i, selectedDate: r, focusedDate: s } = t, n = e.minDate ?
|
|
3099
|
+
function Ve(t, e) {
|
|
3100
|
+
const { viewYear: o, viewMonth: i, selectedDate: r, focusedDate: s } = t, n = e.minDate ? N(e.minDate) : null, d = e.maxDate ? N(e.maxDate) : null, a = Si(o, i), c = gt(o, i), l = gt(o, i - 1), g = new Date(o, i - 1, 1), h = g.getFullYear(), u = g.getMonth(), p = new Date(o, i + 1, 1), m = p.getFullYear(), f = p.getMonth(), v = [];
|
|
3044
3101
|
for (let y = a - 1; y >= 0; y--) {
|
|
3045
|
-
const
|
|
3046
|
-
|
|
3047
|
-
date: new Date(h, u,
|
|
3048
|
-
day:
|
|
3102
|
+
const D = l - y;
|
|
3103
|
+
v.push({
|
|
3104
|
+
date: new Date(h, u, D),
|
|
3105
|
+
day: D,
|
|
3049
3106
|
isOtherMonth: !0
|
|
3050
3107
|
});
|
|
3051
3108
|
}
|
|
3052
3109
|
for (let y = 1; y <= c; y++)
|
|
3053
|
-
|
|
3110
|
+
v.push({
|
|
3054
3111
|
date: new Date(o, i, y),
|
|
3055
3112
|
day: y,
|
|
3056
3113
|
isOtherMonth: !1
|
|
3057
3114
|
});
|
|
3058
|
-
const _ = Math.ceil((a + c) / 7) * 7 -
|
|
3115
|
+
const _ = Math.ceil((a + c) / 7) * 7 - v.length;
|
|
3059
3116
|
for (let y = 1; y <= _; y++)
|
|
3060
|
-
|
|
3117
|
+
v.push({
|
|
3061
3118
|
date: new Date(m, f, y),
|
|
3062
3119
|
day: y,
|
|
3063
3120
|
isOtherMonth: !0
|
|
3064
3121
|
});
|
|
3065
|
-
let
|
|
3066
|
-
for (const y of
|
|
3067
|
-
const
|
|
3068
|
-
y.isOtherMonth &&
|
|
3069
|
-
const
|
|
3070
|
-
|
|
3122
|
+
let S = "";
|
|
3123
|
+
for (const y of v) {
|
|
3124
|
+
const D = ["wg-datepicker__day"];
|
|
3125
|
+
y.isOtherMonth && D.push("wg-datepicker__day--other-month"), Mi(y.date, n, d) && D.push("wg-datepicker__day--disabled"), Ci(y.date) && D.push("wg-datepicker__day--today"), _t(y.date, r) && D.push("wg-datepicker__day--selected"), _t(y.date, s) && D.push("wg-datepicker__day--focused");
|
|
3126
|
+
const C = Wt(y.date);
|
|
3127
|
+
S += `<div class="${D.join(" ")}" data-date="${C}">${y.day}</div>`;
|
|
3071
3128
|
}
|
|
3072
|
-
return
|
|
3129
|
+
return S;
|
|
3073
3130
|
}
|
|
3074
|
-
function
|
|
3131
|
+
function Mi(t, e, o) {
|
|
3075
3132
|
return !!(e && t < e || o && t > o);
|
|
3076
3133
|
}
|
|
3077
|
-
function
|
|
3134
|
+
function Ai(t) {
|
|
3078
3135
|
return `
|
|
3079
3136
|
<div class="wg-datepicker__footer">
|
|
3080
3137
|
<button type="button" class="wg-datepicker__today-btn" data-action="today">
|
|
@@ -3083,22 +3140,22 @@ function $i(t) {
|
|
|
3083
3140
|
</div>
|
|
3084
3141
|
`;
|
|
3085
3142
|
}
|
|
3086
|
-
function
|
|
3143
|
+
function Oi(t, e, o) {
|
|
3087
3144
|
const i = t.querySelector(".wg-datepicker__days");
|
|
3088
|
-
i && (i.innerHTML =
|
|
3145
|
+
i && (i.innerHTML = Ve(e, o));
|
|
3089
3146
|
}
|
|
3090
|
-
function
|
|
3147
|
+
function Ri(t, e, o) {
|
|
3091
3148
|
const i = t.querySelector(".wg-datepicker__month-year");
|
|
3092
3149
|
if (i) {
|
|
3093
3150
|
const r = o.monthNames[e.viewMonth];
|
|
3094
3151
|
i.textContent = `${r} ${e.viewYear}`;
|
|
3095
3152
|
}
|
|
3096
3153
|
}
|
|
3097
|
-
function
|
|
3154
|
+
function Li(t, e) {
|
|
3098
3155
|
const o = t.querySelector(".wg-datepicker__rolling-selector"), i = t.querySelector(".wg-datepicker__calendar");
|
|
3099
3156
|
o && o.classList.toggle("wg-datepicker__rolling-selector--visible", e), i && i.classList.toggle("wg-datepicker__calendar--hidden", e);
|
|
3100
3157
|
}
|
|
3101
|
-
function
|
|
3158
|
+
function Ii(t, e) {
|
|
3102
3159
|
t.querySelectorAll("[data-year]").forEach((r) => {
|
|
3103
3160
|
const s = parseInt(r.dataset.year || "0", 10);
|
|
3104
3161
|
r.classList.toggle("wg-datepicker__rolling-item--selected", s === e.viewYear);
|
|
@@ -3107,7 +3164,7 @@ function Ri(t, e) {
|
|
|
3107
3164
|
r.classList.toggle("wg-datepicker__rolling-item--selected", s === e.viewMonth);
|
|
3108
3165
|
});
|
|
3109
3166
|
}
|
|
3110
|
-
function
|
|
3167
|
+
function _e(t) {
|
|
3111
3168
|
const e = t.querySelector("[data-year].wg-datepicker__rolling-item--selected"), o = t.querySelector("[data-month].wg-datepicker__rolling-item--selected");
|
|
3112
3169
|
if (e) {
|
|
3113
3170
|
const i = e.parentElement;
|
|
@@ -3124,28 +3181,28 @@ function me(t) {
|
|
|
3124
3181
|
}
|
|
3125
3182
|
}
|
|
3126
3183
|
}
|
|
3127
|
-
function
|
|
3184
|
+
function Xt(t) {
|
|
3128
3185
|
t.viewMonth === 0 ? (t.viewMonth = 11, t.viewYear--) : t.viewMonth--;
|
|
3129
3186
|
}
|
|
3130
|
-
function
|
|
3187
|
+
function Qt(t) {
|
|
3131
3188
|
t.viewMonth === 11 ? (t.viewMonth = 0, t.viewYear++) : t.viewMonth++;
|
|
3132
3189
|
}
|
|
3133
|
-
function
|
|
3190
|
+
function Pi(t, e, o, i) {
|
|
3134
3191
|
var s, n, d, a;
|
|
3135
3192
|
const { key: r } = t;
|
|
3136
3193
|
if (r === "Escape")
|
|
3137
3194
|
return (s = i.onClose) == null || s.call(i), !0;
|
|
3138
3195
|
if (e.rollingSelectorOpen)
|
|
3139
|
-
return
|
|
3196
|
+
return zi(t, e);
|
|
3140
3197
|
if ((r === "ArrowLeft" || r === "ArrowRight") && (t.ctrlKey || t.metaKey)) {
|
|
3141
|
-
if (t.preventDefault(), r === "ArrowLeft" ?
|
|
3142
|
-
const c = Math.min(e.focusedDate.getDate(),
|
|
3198
|
+
if (t.preventDefault(), r === "ArrowLeft" ? Xt(e) : Qt(e), e.focusedDate) {
|
|
3199
|
+
const c = Math.min(e.focusedDate.getDate(), gt(e.viewYear, e.viewMonth));
|
|
3143
3200
|
e.focusedDate = new Date(e.viewYear, e.viewMonth, c);
|
|
3144
3201
|
}
|
|
3145
3202
|
return !0;
|
|
3146
3203
|
}
|
|
3147
3204
|
if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(r))
|
|
3148
|
-
return t.preventDefault(),
|
|
3205
|
+
return t.preventDefault(), Hi(e, r, o), !0;
|
|
3149
3206
|
if (r === "Enter")
|
|
3150
3207
|
return t.preventDefault(), e.focusedDate && ((n = i.onSelect) == null || n.call(i, e.focusedDate, "down")), !0;
|
|
3151
3208
|
if (r === "Tab")
|
|
@@ -3155,7 +3212,7 @@ function Ii(t, e, o, i) {
|
|
|
3155
3212
|
let c = e.viewYear;
|
|
3156
3213
|
const l = new Date(c, 0, 1);
|
|
3157
3214
|
if (e.focusedDate && _t(e.focusedDate, l) && c--, o.minDate) {
|
|
3158
|
-
const g =
|
|
3215
|
+
const g = N(o.minDate);
|
|
3159
3216
|
g && c < g.getFullYear() && (c = g.getFullYear());
|
|
3160
3217
|
}
|
|
3161
3218
|
e.viewMonth = 0, e.viewYear = c, e.focusedDate = new Date(c, 0, 1);
|
|
@@ -3168,38 +3225,38 @@ function Ii(t, e, o, i) {
|
|
|
3168
3225
|
let c = e.viewYear;
|
|
3169
3226
|
const l = new Date(c, 11, 31);
|
|
3170
3227
|
if (e.focusedDate && _t(e.focusedDate, l) && c++, o.maxDate) {
|
|
3171
|
-
const g =
|
|
3228
|
+
const g = N(o.maxDate);
|
|
3172
3229
|
g && c > g.getFullYear() && (c = g.getFullYear());
|
|
3173
3230
|
}
|
|
3174
3231
|
e.viewMonth = 11, e.viewYear = c, e.focusedDate = new Date(c, 11, 31);
|
|
3175
3232
|
} else {
|
|
3176
|
-
const c =
|
|
3233
|
+
const c = gt(e.viewYear, e.viewMonth);
|
|
3177
3234
|
e.focusedDate = new Date(e.viewYear, e.viewMonth, c);
|
|
3178
3235
|
}
|
|
3179
3236
|
return !0;
|
|
3180
3237
|
}
|
|
3181
3238
|
if (r === "PageUp") {
|
|
3182
|
-
if (t.preventDefault(),
|
|
3183
|
-
const c = Math.min(e.focusedDate.getDate(),
|
|
3239
|
+
if (t.preventDefault(), Xt(e), e.focusedDate) {
|
|
3240
|
+
const c = Math.min(e.focusedDate.getDate(), gt(e.viewYear, e.viewMonth));
|
|
3184
3241
|
e.focusedDate = new Date(e.viewYear, e.viewMonth, c);
|
|
3185
3242
|
}
|
|
3186
3243
|
return !0;
|
|
3187
3244
|
}
|
|
3188
3245
|
if (r === "PageDown") {
|
|
3189
|
-
if (t.preventDefault(),
|
|
3190
|
-
const c = Math.min(e.focusedDate.getDate(),
|
|
3246
|
+
if (t.preventDefault(), Qt(e), e.focusedDate) {
|
|
3247
|
+
const c = Math.min(e.focusedDate.getDate(), gt(e.viewYear, e.viewMonth));
|
|
3191
3248
|
e.focusedDate = new Date(e.viewYear, e.viewMonth, c);
|
|
3192
3249
|
}
|
|
3193
3250
|
return !0;
|
|
3194
3251
|
}
|
|
3195
3252
|
return !1;
|
|
3196
3253
|
}
|
|
3197
|
-
function
|
|
3254
|
+
function Hi(t, e, o) {
|
|
3198
3255
|
if (!t.focusedDate) {
|
|
3199
3256
|
t.focusedDate = t.selectedDate ? new Date(t.selectedDate) : new Date(t.viewYear, t.viewMonth, 1);
|
|
3200
3257
|
return;
|
|
3201
3258
|
}
|
|
3202
|
-
const i = new Date(t.focusedDate), r = o.minDate ?
|
|
3259
|
+
const i = new Date(t.focusedDate), r = o.minDate ? N(o.minDate) : null, s = o.maxDate ? N(o.maxDate) : null;
|
|
3203
3260
|
switch (e) {
|
|
3204
3261
|
case "ArrowLeft":
|
|
3205
3262
|
i.setDate(i.getDate() - 1);
|
|
@@ -3216,7 +3273,7 @@ function Li(t, e, o) {
|
|
|
3216
3273
|
}
|
|
3217
3274
|
r && i < r || s && i > s || (t.focusedDate = i, (i.getMonth() !== t.viewMonth || i.getFullYear() !== t.viewYear) && (t.viewMonth = i.getMonth(), t.viewYear = i.getFullYear()));
|
|
3218
3275
|
}
|
|
3219
|
-
function
|
|
3276
|
+
function zi(t, e) {
|
|
3220
3277
|
const { key: o } = t;
|
|
3221
3278
|
if (o === "ArrowUp" || o === "ArrowDown") {
|
|
3222
3279
|
t.preventDefault();
|
|
@@ -3230,7 +3287,7 @@ function Pi(t, e) {
|
|
|
3230
3287
|
}
|
|
3231
3288
|
return o === "ArrowLeft" || o === "ArrowRight" ? (t.preventDefault(), e.rollingSelectorMode = e.rollingSelectorMode === "month" ? "year" : "month", !0) : o === "Enter" || o === "Escape" ? (t.preventDefault(), e.rollingSelectorOpen = !1, !0) : !1;
|
|
3232
3289
|
}
|
|
3233
|
-
function
|
|
3290
|
+
function Fi(t) {
|
|
3234
3291
|
if (t.selectedDate)
|
|
3235
3292
|
t.focusedDate = new Date(t.selectedDate), t.viewYear = t.selectedDate.getFullYear(), t.viewMonth = t.selectedDate.getMonth();
|
|
3236
3293
|
else {
|
|
@@ -3238,28 +3295,28 @@ function Hi(t) {
|
|
|
3238
3295
|
t.focusedDate = new Date(t.viewYear, t.viewMonth, e.getDate());
|
|
3239
3296
|
}
|
|
3240
3297
|
}
|
|
3241
|
-
function
|
|
3298
|
+
function Vi(t, e, o) {
|
|
3242
3299
|
const i = t.dataset.date;
|
|
3243
3300
|
if (!i || t.classList.contains("wg-datepicker__day--disabled"))
|
|
3244
3301
|
return null;
|
|
3245
|
-
const [r, s, n] = i.split("-").map(Number), d = new Date(r, s - 1, n), a = o.minDate ?
|
|
3302
|
+
const [r, s, n] = i.split("-").map(Number), d = new Date(r, s - 1, n), a = o.minDate ? N(o.minDate) : null, c = o.maxDate ? N(o.maxDate) : null;
|
|
3246
3303
|
return a && d < a || c && d > c ? null : (e.selectedDate = d, e.focusedDate = d, d);
|
|
3247
3304
|
}
|
|
3248
|
-
function
|
|
3305
|
+
function qi(t, e) {
|
|
3249
3306
|
const o = /* @__PURE__ */ new Date();
|
|
3250
3307
|
o.setHours(0, 0, 0, 0);
|
|
3251
|
-
const i = e.minDate ?
|
|
3308
|
+
const i = e.minDate ? N(e.minDate) : null, r = e.maxDate ? N(e.maxDate) : null;
|
|
3252
3309
|
return i && o < i || r && o > r ? null : (t.selectedDate = o, t.focusedDate = o, t.viewYear = o.getFullYear(), t.viewMonth = o.getMonth(), o);
|
|
3253
3310
|
}
|
|
3254
|
-
function
|
|
3311
|
+
function Yi(t, e) {
|
|
3255
3312
|
const o = t.dataset.month;
|
|
3256
3313
|
o !== void 0 && (e.viewMonth = parseInt(o, 10));
|
|
3257
3314
|
}
|
|
3258
|
-
function
|
|
3315
|
+
function Ni(t, e) {
|
|
3259
3316
|
const o = t.dataset.year;
|
|
3260
3317
|
o !== void 0 && (e.viewYear = parseInt(o, 10));
|
|
3261
3318
|
}
|
|
3262
|
-
function
|
|
3319
|
+
function Gt(t, e) {
|
|
3263
3320
|
var g, h, u, p;
|
|
3264
3321
|
const { separator: o, parts: i, maxLength: r } = e, s = o.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = t.replace(new RegExp(s, "g"), ""), d = ((g = i.year) == null ? void 0 : g.length) ?? 4, a = [
|
|
3265
3322
|
{ type: "year", pos: ((h = i.year) == null ? void 0 : h.index) ?? 0, length: d },
|
|
@@ -3268,14 +3325,14 @@ function Qt(t, e) {
|
|
|
3268
3325
|
].sort((m, f) => m.pos - f.pos);
|
|
3269
3326
|
let c = "", l = 0;
|
|
3270
3327
|
for (let m = 0; m < a.length; m++) {
|
|
3271
|
-
const f = a[m],
|
|
3272
|
-
if (!
|
|
3273
|
-
c +=
|
|
3328
|
+
const f = a[m], v = n.substring(l, l + f.length);
|
|
3329
|
+
if (!v) break;
|
|
3330
|
+
c += v, l += v.length, m < a.length - 1 && v.length === f.length && (c += o);
|
|
3274
3331
|
}
|
|
3275
3332
|
return c.substring(0, r);
|
|
3276
3333
|
}
|
|
3277
|
-
function
|
|
3278
|
-
const i = t.value, r = t.selectionStart || 0, s = i.length < o.length, { separator: n } = e, d = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a = i.replace(new RegExp(`[^0-9${d}]`, "g"), ""), c =
|
|
3334
|
+
function Ui(t, e, o) {
|
|
3335
|
+
const i = t.value, r = t.selectionStart || 0, s = i.length < o.length, { separator: n } = e, d = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a = i.replace(new RegExp(`[^0-9${d}]`, "g"), ""), c = Gt(a, e);
|
|
3279
3336
|
if (c !== i) {
|
|
3280
3337
|
t.value = c;
|
|
3281
3338
|
let l = r;
|
|
@@ -3291,7 +3348,7 @@ function Yi(t, e, o) {
|
|
|
3291
3348
|
}
|
|
3292
3349
|
return c;
|
|
3293
3350
|
}
|
|
3294
|
-
function
|
|
3351
|
+
function ji(t, e) {
|
|
3295
3352
|
const { key: o, ctrlKey: i, metaKey: r } = t, { separator: s } = e;
|
|
3296
3353
|
if ([
|
|
3297
3354
|
"Backspace",
|
|
@@ -3326,23 +3383,23 @@ function Ni(t, e) {
|
|
|
3326
3383
|
}
|
|
3327
3384
|
return !/^\d$/.test(o) && o !== s ? (t.preventDefault(), !0) : !1;
|
|
3328
3385
|
}
|
|
3329
|
-
function
|
|
3386
|
+
function Bi(t, e, o) {
|
|
3330
3387
|
var u;
|
|
3331
3388
|
t.preventDefault();
|
|
3332
|
-
const i = ((u = t.clipboardData) == null ? void 0 : u.getData("text")) || "", { separator: r } = o, s = r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = i.replace(new RegExp(`[^0-9${s}]`, "g"), ""), d =
|
|
3333
|
-
e.value =
|
|
3389
|
+
const i = ((u = t.clipboardData) == null ? void 0 : u.getData("text")) || "", { separator: r } = o, s = r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = i.replace(new RegExp(`[^0-9${s}]`, "g"), ""), d = Gt(n, o), a = e.selectionStart || 0, c = e.selectionEnd || 0, l = e.value, g = l.substring(0, a) + d + l.substring(c);
|
|
3390
|
+
e.value = Gt(g, o);
|
|
3334
3391
|
const h = a + d.length;
|
|
3335
3392
|
e.setSelectionRange(h, h);
|
|
3336
3393
|
}
|
|
3337
|
-
function
|
|
3394
|
+
function Ki(t, e, o, i) {
|
|
3338
3395
|
if (!t || t.length < e.maxLength)
|
|
3339
3396
|
return !1;
|
|
3340
|
-
const r =
|
|
3397
|
+
const r = yi(t, e);
|
|
3341
3398
|
if (!r) return !1;
|
|
3342
|
-
const s = i.minDate ?
|
|
3399
|
+
const s = i.minDate ? N(i.minDate) : null, n = i.maxDate ? N(i.maxDate) : null;
|
|
3343
3400
|
return s && r < s || n && r > n ? !1 : (o.selectedDate = r, o.focusedDate = r, o.viewYear = r.getFullYear(), o.viewMonth = r.getMonth(), !0);
|
|
3344
3401
|
}
|
|
3345
|
-
const
|
|
3402
|
+
const Wi = `
|
|
3346
3403
|
.wg-datepicker-container {
|
|
3347
3404
|
position: fixed;
|
|
3348
3405
|
z-index: var(--wg-dp-z-index, 9999);
|
|
@@ -3593,8 +3650,8 @@ const Bi = `
|
|
|
3593
3650
|
background-color: color-mix(in srgb, var(--wg-dp-accent-color) 10%, transparent);
|
|
3594
3651
|
}
|
|
3595
3652
|
`;
|
|
3596
|
-
let
|
|
3597
|
-
class
|
|
3653
|
+
let ye = !1;
|
|
3654
|
+
class ne {
|
|
3598
3655
|
constructor(e = {}) {
|
|
3599
3656
|
w(this, "options");
|
|
3600
3657
|
w(this, "state");
|
|
@@ -3621,7 +3678,7 @@ class re {
|
|
|
3621
3678
|
rollingSelectorOpen: !1,
|
|
3622
3679
|
rollingSelectorMode: "month",
|
|
3623
3680
|
focusedDate: null
|
|
3624
|
-
}, this.localeStrings = this.initLocaleStrings(e.locale), this.formatInfo =
|
|
3681
|
+
}, this.localeStrings = this.initLocaleStrings(e.locale), this.formatInfo = Kt(this.options.dateFormat || "YYYY-MM-DD"), this.boundHandleClickOutside = this.handleClickOutside.bind(this), this.boundHandleKeyDown = this.handleKeyDown.bind(this);
|
|
3625
3682
|
}
|
|
3626
3683
|
/**
|
|
3627
3684
|
* Initialize locale strings (use browser Intl API if available)
|
|
@@ -3651,30 +3708,30 @@ class re {
|
|
|
3651
3708
|
weekdayNamesShort: l
|
|
3652
3709
|
};
|
|
3653
3710
|
} catch {
|
|
3654
|
-
return
|
|
3711
|
+
return ze;
|
|
3655
3712
|
}
|
|
3656
3713
|
}
|
|
3657
3714
|
/**
|
|
3658
3715
|
* Inject datepicker styles into document head (once)
|
|
3659
3716
|
*/
|
|
3660
3717
|
static injectStyles() {
|
|
3661
|
-
if (
|
|
3718
|
+
if (ye) return;
|
|
3662
3719
|
const e = document.createElement("style");
|
|
3663
|
-
e.id = "wg-datepicker-styles", e.textContent =
|
|
3720
|
+
e.id = "wg-datepicker-styles", e.textContent = Wi, document.head.appendChild(e), ye = !0;
|
|
3664
3721
|
}
|
|
3665
3722
|
/**
|
|
3666
3723
|
* Open the date picker
|
|
3667
3724
|
*/
|
|
3668
3725
|
open(e, o = null) {
|
|
3669
|
-
|
|
3670
|
-
const i =
|
|
3726
|
+
ne.injectStyles(), this.state.isOpen && this.close(), this.anchor = e;
|
|
3727
|
+
const i = N(o);
|
|
3671
3728
|
if (i)
|
|
3672
3729
|
this.state.selectedDate = i, this.state.viewYear = i.getFullYear(), this.state.viewMonth = i.getMonth();
|
|
3673
3730
|
else {
|
|
3674
3731
|
const r = /* @__PURE__ */ new Date();
|
|
3675
3732
|
this.state.viewYear = r.getFullYear(), this.state.viewMonth = r.getMonth();
|
|
3676
3733
|
}
|
|
3677
|
-
|
|
3734
|
+
Fi(this.state), this.element = document.createElement("div"), this.element.className = "wg-datepicker-container", this.element.innerHTML = ki(this.state, this.options, this.localeStrings), document.body.appendChild(this.element), this.position(), this.attachListeners(), this.state.isOpen = !0, this.state.rollingSelectorOpen && _e(this.element);
|
|
3678
3735
|
}
|
|
3679
3736
|
/**
|
|
3680
3737
|
* Close the date picker
|
|
@@ -3700,7 +3757,7 @@ class re {
|
|
|
3700
3757
|
* Get formatted value
|
|
3701
3758
|
*/
|
|
3702
3759
|
getFormattedValue() {
|
|
3703
|
-
return
|
|
3760
|
+
return Fe(this.state.selectedDate, this.formatInfo);
|
|
3704
3761
|
}
|
|
3705
3762
|
/**
|
|
3706
3763
|
* Position the picker using Floating UI
|
|
@@ -3708,13 +3765,13 @@ class re {
|
|
|
3708
3765
|
position() {
|
|
3709
3766
|
if (!this.element || !this.anchor) return;
|
|
3710
3767
|
const e = this.element.querySelector(".wg-datepicker");
|
|
3711
|
-
e && (this.cleanupAutoUpdate =
|
|
3768
|
+
e && (this.cleanupAutoUpdate = zo(this.anchor, e, () => {
|
|
3712
3769
|
Pt(this.anchor, e, {
|
|
3713
3770
|
placement: "bottom-start",
|
|
3714
3771
|
middleware: [
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3772
|
+
Lt(4),
|
|
3773
|
+
It({ fallbackPlacements: ["top-start", "bottom-end", "top-end"] }),
|
|
3774
|
+
Re({ padding: 8 })
|
|
3718
3775
|
]
|
|
3719
3776
|
}).then(({ x: o, y: i }) => {
|
|
3720
3777
|
Object.assign(e.style, {
|
|
@@ -3739,38 +3796,38 @@ class re {
|
|
|
3739
3796
|
var d;
|
|
3740
3797
|
const o = e.target, i = (d = o.closest("[data-action]")) == null ? void 0 : d.getAttribute("data-action");
|
|
3741
3798
|
if (i === "prev-month") {
|
|
3742
|
-
e.preventDefault(),
|
|
3799
|
+
e.preventDefault(), Xt(this.state), this.render();
|
|
3743
3800
|
return;
|
|
3744
3801
|
}
|
|
3745
3802
|
if (i === "next-month") {
|
|
3746
|
-
e.preventDefault(),
|
|
3803
|
+
e.preventDefault(), Qt(this.state), this.render();
|
|
3747
3804
|
return;
|
|
3748
3805
|
}
|
|
3749
3806
|
if (i === "toggle-rolling") {
|
|
3750
|
-
e.preventDefault(), this.state.rollingSelectorOpen = !this.state.rollingSelectorOpen, this.render(), this.state.rollingSelectorOpen && this.element &&
|
|
3807
|
+
e.preventDefault(), this.state.rollingSelectorOpen = !this.state.rollingSelectorOpen, this.render(), this.state.rollingSelectorOpen && this.element && _e(this.element);
|
|
3751
3808
|
return;
|
|
3752
3809
|
}
|
|
3753
3810
|
if (i === "today") {
|
|
3754
3811
|
e.preventDefault();
|
|
3755
|
-
const a =
|
|
3812
|
+
const a = qi(this.state, this.options);
|
|
3756
3813
|
a && this.selectDate(a);
|
|
3757
3814
|
return;
|
|
3758
3815
|
}
|
|
3759
3816
|
const r = o.closest(".wg-datepicker__day");
|
|
3760
3817
|
if (r) {
|
|
3761
3818
|
e.preventDefault();
|
|
3762
|
-
const a =
|
|
3819
|
+
const a = Vi(r, this.state, this.options);
|
|
3763
3820
|
a && this.selectDate(a);
|
|
3764
3821
|
return;
|
|
3765
3822
|
}
|
|
3766
3823
|
const s = o.closest("[data-month]");
|
|
3767
3824
|
if (s && this.state.rollingSelectorOpen) {
|
|
3768
|
-
e.preventDefault(),
|
|
3825
|
+
e.preventDefault(), Yi(s, this.state), this.render();
|
|
3769
3826
|
return;
|
|
3770
3827
|
}
|
|
3771
3828
|
const n = o.closest("[data-year]");
|
|
3772
3829
|
if (n && this.state.rollingSelectorOpen) {
|
|
3773
|
-
e.preventDefault(),
|
|
3830
|
+
e.preventDefault(), Ni(n, this.state), this.render();
|
|
3774
3831
|
return;
|
|
3775
3832
|
}
|
|
3776
3833
|
}
|
|
@@ -3786,7 +3843,7 @@ class re {
|
|
|
3786
3843
|
* Handle keyboard events
|
|
3787
3844
|
*/
|
|
3788
3845
|
handleKeyDown(e) {
|
|
3789
|
-
|
|
3846
|
+
Pi(e, this.state, this.options, {
|
|
3790
3847
|
onSelect: (i, r) => this.selectDate(i, r),
|
|
3791
3848
|
onClose: () => this.close()
|
|
3792
3849
|
}) && this.render();
|
|
@@ -3804,24 +3861,24 @@ class re {
|
|
|
3804
3861
|
render() {
|
|
3805
3862
|
if (!this.element) return;
|
|
3806
3863
|
const e = this.element.querySelector(".wg-datepicker");
|
|
3807
|
-
e && (
|
|
3864
|
+
e && (Ri(e, this.state, this.localeStrings), Li(e, this.state.rollingSelectorOpen), this.state.rollingSelectorOpen ? Ii(e, this.state) : Oi(e, this.state, this.options));
|
|
3808
3865
|
}
|
|
3809
3866
|
/**
|
|
3810
3867
|
* Connect an input field for masked input
|
|
3811
3868
|
*/
|
|
3812
3869
|
connectInput(e) {
|
|
3813
3870
|
this.input = e, this.previousInputValue = e.value, e.addEventListener("input", () => {
|
|
3814
|
-
this.previousInputValue =
|
|
3871
|
+
this.previousInputValue = Ui(e, this.formatInfo, this.previousInputValue), Ki(e.value, this.formatInfo, this.state, this.options);
|
|
3815
3872
|
}), e.addEventListener("keydown", (o) => {
|
|
3816
|
-
|
|
3873
|
+
ji(o, this.formatInfo);
|
|
3817
3874
|
}), e.addEventListener("paste", (o) => {
|
|
3818
|
-
|
|
3875
|
+
Bi(o, e, this.formatInfo);
|
|
3819
3876
|
}), e.addEventListener("focus", () => {
|
|
3820
3877
|
!this.state.isOpen && this.anchor && this.open(this.anchor, e.value);
|
|
3821
3878
|
});
|
|
3822
3879
|
}
|
|
3823
3880
|
}
|
|
3824
|
-
const
|
|
3881
|
+
const Xi = `
|
|
3825
3882
|
.wg-context-menu-container {
|
|
3826
3883
|
position: fixed;
|
|
3827
3884
|
z-index: var(--wg-cm-z-index, 10000);
|
|
@@ -3910,13 +3967,13 @@ const Ki = `
|
|
|
3910
3967
|
margin: var(--wg-cm-padding) 0;
|
|
3911
3968
|
}
|
|
3912
3969
|
`;
|
|
3913
|
-
let
|
|
3914
|
-
function
|
|
3915
|
-
if (
|
|
3970
|
+
let Ce = !1;
|
|
3971
|
+
function Qi() {
|
|
3972
|
+
if (Ce) return;
|
|
3916
3973
|
const t = document.createElement("style");
|
|
3917
|
-
t.id = "wg-context-menu-styles", t.textContent =
|
|
3974
|
+
t.id = "wg-context-menu-styles", t.textContent = Xi, document.head.appendChild(t), Ce = !0;
|
|
3918
3975
|
}
|
|
3919
|
-
function
|
|
3976
|
+
function Gi(t, e) {
|
|
3920
3977
|
const o = t.filter((r) => r.visible === void 0 ? !0 : typeof r.visible == "function" ? r.visible(e) : r.visible);
|
|
3921
3978
|
return o.length === 0 ? "" : `<div class="wg-context-menu">${o.map((r, s) => {
|
|
3922
3979
|
const n = typeof r.label == "function" ? r.label(e) : r.label, d = typeof r.icon == "function" ? r.icon(e) : r.icon, a = typeof r.disabled == "function" ? r.disabled(e) : r.disabled, c = r.danger === !0, l = [
|
|
@@ -3927,9 +3984,9 @@ function Xi(t, e) {
|
|
|
3927
3984
|
return `${g}<div class="${l}" data-item-id="${r.id}" data-disabled="${a ? "true" : "false"}">${h}<span class="wg-context-menu__label">${n}</span></div>`;
|
|
3928
3985
|
}).join("")}</div>`;
|
|
3929
3986
|
}
|
|
3930
|
-
function
|
|
3931
|
-
|
|
3932
|
-
const d =
|
|
3987
|
+
function Ji(t, e, o, i, r, s, n) {
|
|
3988
|
+
Qi();
|
|
3989
|
+
const d = Gi(i, r);
|
|
3933
3990
|
if (!d) return null;
|
|
3934
3991
|
const a = document.createElement("div");
|
|
3935
3992
|
a.className = "wg-context-menu-container", a.innerHTML = d, document.body.appendChild(a);
|
|
@@ -3948,9 +4005,9 @@ function Qi(t, e, o, i, r, s, n) {
|
|
|
3948
4005
|
}, c, {
|
|
3949
4006
|
placement: "bottom-start",
|
|
3950
4007
|
middleware: [
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
4008
|
+
Lt(4),
|
|
4009
|
+
It({ fallbackPlacements: ["top-start", "bottom-end", "top-end"] }),
|
|
4010
|
+
Re({ padding: 8 })
|
|
3954
4011
|
]
|
|
3955
4012
|
}).then(({ x: u, y: p }) => {
|
|
3956
4013
|
Object.assign(c.style, {
|
|
@@ -3978,7 +4035,7 @@ function bt(t, e, o) {
|
|
|
3978
4035
|
const i = t._cleanup;
|
|
3979
4036
|
i && (i.handleOutsideClick && document.removeEventListener("mousedown", i.handleOutsideClick), i.handleKeyDown && document.removeEventListener("keydown", i.handleKeyDown)), t.remove();
|
|
3980
4037
|
}
|
|
3981
|
-
class
|
|
4038
|
+
class Zi extends HTMLElement {
|
|
3982
4039
|
constructor() {
|
|
3983
4040
|
super();
|
|
3984
4041
|
// Core grid logic (composition)
|
|
@@ -4055,7 +4112,7 @@ class Gi extends HTMLElement {
|
|
|
4055
4112
|
const a = String(s.field);
|
|
4056
4113
|
this.grid.commitEdit(i, a, d), this.render();
|
|
4057
4114
|
});
|
|
4058
|
-
this.shadow = this.attachShadow({ mode: "open" }), this.grid = new
|
|
4115
|
+
this.shadow = this.attachShadow({ mode: "open" }), this.grid = new Ue(), this.styleElement = document.createElement("style"), this.styleElement.textContent = je, this.shadow.appendChild(this.styleElement), this.grid.requestUpdate = () => this.requestUpdate();
|
|
4059
4116
|
}
|
|
4060
4117
|
get tooltipShowDelay() {
|
|
4061
4118
|
return this._tooltipShowDelay;
|
|
@@ -4147,6 +4204,12 @@ class Gi extends HTMLElement {
|
|
|
4147
4204
|
set editTrigger(o) {
|
|
4148
4205
|
this.grid.editTrigger = o;
|
|
4149
4206
|
}
|
|
4207
|
+
get editStartSelection() {
|
|
4208
|
+
return this.grid.editStartSelection;
|
|
4209
|
+
}
|
|
4210
|
+
set editStartSelection(o) {
|
|
4211
|
+
this.grid.editStartSelection = o;
|
|
4212
|
+
}
|
|
4150
4213
|
get mode() {
|
|
4151
4214
|
return this.grid.mode;
|
|
4152
4215
|
}
|
|
@@ -4251,6 +4314,12 @@ class Gi extends HTMLElement {
|
|
|
4251
4314
|
set onvalidationerror(o) {
|
|
4252
4315
|
this.grid.onvalidationerror = o;
|
|
4253
4316
|
}
|
|
4317
|
+
get validationTooltipCallback() {
|
|
4318
|
+
return this.grid.validationTooltipCallback;
|
|
4319
|
+
}
|
|
4320
|
+
set validationTooltipCallback(o) {
|
|
4321
|
+
this.grid.validationTooltipCallback = o;
|
|
4322
|
+
}
|
|
4254
4323
|
set ontoolbarclick(o) {
|
|
4255
4324
|
this.grid.ontoolbarclick = o;
|
|
4256
4325
|
}
|
|
@@ -4279,6 +4348,12 @@ class Gi extends HTMLElement {
|
|
|
4279
4348
|
set sort(o) {
|
|
4280
4349
|
this.grid.sort = o;
|
|
4281
4350
|
}
|
|
4351
|
+
get sortMode() {
|
|
4352
|
+
return this.grid.sortMode;
|
|
4353
|
+
}
|
|
4354
|
+
set sortMode(o) {
|
|
4355
|
+
this.grid.sortMode = o;
|
|
4356
|
+
}
|
|
4282
4357
|
get currentPage() {
|
|
4283
4358
|
return this.grid.currentPage;
|
|
4284
4359
|
}
|
|
@@ -4445,7 +4520,7 @@ class Gi extends HTMLElement {
|
|
|
4445
4520
|
}
|
|
4446
4521
|
// Delegate to module function - needed for lifecycle module
|
|
4447
4522
|
moveFocusAfterCommit(o, i, r) {
|
|
4448
|
-
|
|
4523
|
+
Ft(this, o, i, r);
|
|
4449
4524
|
}
|
|
4450
4525
|
// ==========================================================================
|
|
4451
4526
|
// Update Mechanism
|
|
@@ -4522,9 +4597,9 @@ class Gi extends HTMLElement {
|
|
|
4522
4597
|
if (o.preventDefault(), o.ctrlKey)
|
|
4523
4598
|
if (this.grid.shouldUseVirtualScroll()) {
|
|
4524
4599
|
const l = this.grid.focusedCell;
|
|
4525
|
-
this.grid.setFocusedCell(0, 0),
|
|
4600
|
+
this.grid.setFocusedCell(0, 0), st(this, 0);
|
|
4526
4601
|
const g = this.shadow.querySelector('td[data-row="0"][data-col="0"]');
|
|
4527
|
-
g && (g.focus({ preventScroll: !0 }),
|
|
4602
|
+
g && (g.focus({ preventScroll: !0 }), B(this, l, { rowIndex: 0, colIndex: 0 }));
|
|
4528
4603
|
} else
|
|
4529
4604
|
E(this, 0, 0);
|
|
4530
4605
|
else
|
|
@@ -4535,9 +4610,9 @@ class Gi extends HTMLElement {
|
|
|
4535
4610
|
const l = n.length - 1, g = s.length - 1;
|
|
4536
4611
|
if (this.grid.shouldUseVirtualScroll()) {
|
|
4537
4612
|
const h = this.grid.focusedCell;
|
|
4538
|
-
this.grid.setFocusedCell(l, g),
|
|
4613
|
+
this.grid.setFocusedCell(l, g), st(this, l);
|
|
4539
4614
|
const u = this.shadow.querySelector(`td[data-row="${l}"][data-col="${g}"]`);
|
|
4540
|
-
u && (u.focus({ preventScroll: !0 }),
|
|
4615
|
+
u && (u.focus({ preventScroll: !0 }), B(this, h, { rowIndex: l, colIndex: g }));
|
|
4541
4616
|
} else
|
|
4542
4617
|
E(this, l, g);
|
|
4543
4618
|
} else
|
|
@@ -4547,18 +4622,18 @@ class Gi extends HTMLElement {
|
|
|
4547
4622
|
if (o.preventDefault(), o.ctrlKey)
|
|
4548
4623
|
if (this.grid.shouldUseVirtualScroll()) {
|
|
4549
4624
|
const l = this.grid.focusedCell;
|
|
4550
|
-
this.grid.setFocusedCell(0, r),
|
|
4625
|
+
this.grid.setFocusedCell(0, r), st(this, 0);
|
|
4551
4626
|
const g = this.shadow.querySelector(`td[data-row="0"][data-col="${r}"]`);
|
|
4552
|
-
g && (g.focus({ preventScroll: !0 }),
|
|
4627
|
+
g && (g.focus({ preventScroll: !0 }), B(this, l, { rowIndex: 0, colIndex: r }));
|
|
4553
4628
|
} else
|
|
4554
4629
|
E(this, 0, r);
|
|
4555
4630
|
else {
|
|
4556
4631
|
const l = Math.max(0, i - 10);
|
|
4557
4632
|
if (this.grid.shouldUseVirtualScroll()) {
|
|
4558
4633
|
const g = this.grid.focusedCell;
|
|
4559
|
-
this.grid.setFocusedCell(l, r),
|
|
4634
|
+
this.grid.setFocusedCell(l, r), st(this, l);
|
|
4560
4635
|
const h = this.shadow.querySelector(`td[data-row="${l}"][data-col="${r}"]`);
|
|
4561
|
-
h && (h.focus({ preventScroll: !0 }),
|
|
4636
|
+
h && (h.focus({ preventScroll: !0 }), B(this, g, { rowIndex: l, colIndex: r }));
|
|
4562
4637
|
} else
|
|
4563
4638
|
E(this, l, r);
|
|
4564
4639
|
}
|
|
@@ -4568,18 +4643,18 @@ class Gi extends HTMLElement {
|
|
|
4568
4643
|
const l = n.length - 1;
|
|
4569
4644
|
if (this.grid.shouldUseVirtualScroll()) {
|
|
4570
4645
|
const g = this.grid.focusedCell;
|
|
4571
|
-
this.grid.setFocusedCell(l, r),
|
|
4646
|
+
this.grid.setFocusedCell(l, r), st(this, l);
|
|
4572
4647
|
const h = this.shadow.querySelector(`td[data-row="${l}"][data-col="${r}"]`);
|
|
4573
|
-
h && (h.focus({ preventScroll: !0 }),
|
|
4648
|
+
h && (h.focus({ preventScroll: !0 }), B(this, g, { rowIndex: l, colIndex: r }));
|
|
4574
4649
|
} else
|
|
4575
4650
|
E(this, l, r);
|
|
4576
4651
|
} else {
|
|
4577
4652
|
const l = Math.min(n.length - 1, i + 10);
|
|
4578
4653
|
if (this.grid.shouldUseVirtualScroll()) {
|
|
4579
4654
|
const g = this.grid.focusedCell;
|
|
4580
|
-
this.grid.setFocusedCell(l, r),
|
|
4655
|
+
this.grid.setFocusedCell(l, r), st(this, l);
|
|
4581
4656
|
const h = this.shadow.querySelector(`td[data-row="${l}"][data-col="${r}"]`);
|
|
4582
|
-
h && (h.focus({ preventScroll: !0 }),
|
|
4657
|
+
h && (h.focus({ preventScroll: !0 }), B(this, g, { rowIndex: l, colIndex: r }));
|
|
4583
4658
|
} else
|
|
4584
4659
|
E(this, l, r);
|
|
4585
4660
|
}
|
|
@@ -4591,16 +4666,16 @@ class Gi extends HTMLElement {
|
|
|
4591
4666
|
case "Enter": {
|
|
4592
4667
|
o.preventDefault();
|
|
4593
4668
|
const l = s[r];
|
|
4594
|
-
((l == null ? void 0 : l.editor) === "select" || (l == null ? void 0 : l.editor) === "combobox" || (l == null ? void 0 : l.editor) === "autocomplete") && this.grid.getEffectiveOpenDropdownOnEnter(l) ? (
|
|
4595
|
-
this.dropdownOpen ||
|
|
4669
|
+
((l == null ? void 0 : l.editor) === "select" || (l == null ? void 0 : l.editor) === "combobox" || (l == null ? void 0 : l.editor) === "autocomplete") && this.grid.getEffectiveOpenDropdownOnEnter(l) ? (j(this, i, r), requestAnimationFrame(() => {
|
|
4670
|
+
this.dropdownOpen || K(this);
|
|
4596
4671
|
})) : i < n.length - 1 && E(this, i + 1, r);
|
|
4597
4672
|
break;
|
|
4598
4673
|
}
|
|
4599
4674
|
case "F2": {
|
|
4600
4675
|
o.preventDefault();
|
|
4601
4676
|
const l = s[r], g = (l == null ? void 0 : l.editor) === "select" || (l == null ? void 0 : l.editor) === "combobox" || (l == null ? void 0 : l.editor) === "autocomplete", h = (l == null ? void 0 : l.editor) === "custom";
|
|
4602
|
-
|
|
4603
|
-
this.dropdownOpen ||
|
|
4677
|
+
j(this, i, r), g ? requestAnimationFrame(() => {
|
|
4678
|
+
this.dropdownOpen || K(this);
|
|
4604
4679
|
}) : h && requestAnimationFrame(() => {
|
|
4605
4680
|
this.openCustomEditor(i, r);
|
|
4606
4681
|
});
|
|
@@ -4609,25 +4684,25 @@ class Gi extends HTMLElement {
|
|
|
4609
4684
|
case " ": {
|
|
4610
4685
|
o.preventDefault();
|
|
4611
4686
|
const l = s[r], g = (l == null ? void 0 : l.editor) === "checkbox", h = (l == null ? void 0 : l.editor) === "select" || (l == null ? void 0 : l.editor) === "combobox" || (l == null ? void 0 : l.editor) === "autocomplete", u = (l == null ? void 0 : l.editor) === "date", p = (l == null ? void 0 : l.editor) === "custom";
|
|
4612
|
-
g ?
|
|
4613
|
-
this.dropdownOpen ||
|
|
4614
|
-
})) : u ? (
|
|
4615
|
-
var
|
|
4616
|
-
const m = (
|
|
4687
|
+
g ? Jo(this, i, r) : h ? (j(this, i, r), requestAnimationFrame(() => {
|
|
4688
|
+
this.dropdownOpen || K(this);
|
|
4689
|
+
})) : u ? (j(this, i, r), requestAnimationFrame(() => {
|
|
4690
|
+
var b;
|
|
4691
|
+
const m = (b = this.shadowRoot) == null ? void 0 : b.querySelector(
|
|
4617
4692
|
`.wg__cell[data-row="${i}"][data-col="${r}"]`
|
|
4618
|
-
), f = m == null ? void 0 : m.querySelector(".wg__date-input"),
|
|
4619
|
-
f &&
|
|
4620
|
-
})) : p && (
|
|
4693
|
+
), f = m == null ? void 0 : m.querySelector(".wg__date-input"), v = m == null ? void 0 : m.querySelector(".wg__editor--date");
|
|
4694
|
+
f && v && this.openDatePicker(f, v);
|
|
4695
|
+
})) : p && (j(this, i, r), requestAnimationFrame(() => {
|
|
4621
4696
|
this.openCustomEditor(i, r);
|
|
4622
4697
|
}));
|
|
4623
4698
|
break;
|
|
4624
4699
|
}
|
|
4625
4700
|
case "Escape":
|
|
4626
4701
|
if (o.preventDefault(), this.grid.editingCell)
|
|
4627
|
-
|
|
4702
|
+
F(this), this.grid.cancelEdit();
|
|
4628
4703
|
else {
|
|
4629
4704
|
const l = this.grid.focusedCell;
|
|
4630
|
-
this.grid.clearFocusedCell(),
|
|
4705
|
+
this.grid.clearFocusedCell(), B(this, l, null), (c = o.target) == null || c.blur();
|
|
4631
4706
|
}
|
|
4632
4707
|
break;
|
|
4633
4708
|
case "Delete": {
|
|
@@ -4652,7 +4727,7 @@ class Gi extends HTMLElement {
|
|
|
4652
4727
|
const l = s[r];
|
|
4653
4728
|
if ((l == null ? void 0 : l.editor) === "number" && !/[\d.\-]/.test(o.key))
|
|
4654
4729
|
return;
|
|
4655
|
-
|
|
4730
|
+
j(this, i, r, { initialSearchQuery: o.key }), o.preventDefault();
|
|
4656
4731
|
}
|
|
4657
4732
|
break;
|
|
4658
4733
|
}
|
|
@@ -4667,7 +4742,7 @@ class Gi extends HTMLElement {
|
|
|
4667
4742
|
const r = parseInt(i.dataset.row || "0", 10), s = i.dataset.field || "", n = this.grid.columns.find((l) => l.field === s), d = (n == null ? void 0 : n.editor) || "text", a = d === "select" || d === "combobox" || d === "autocomplete", c = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Home", "End"];
|
|
4668
4743
|
if (a && !this.dropdownOpen && c.includes(o.key)) {
|
|
4669
4744
|
o.preventDefault(), o.stopPropagation();
|
|
4670
|
-
const l = this.grid.columns.findIndex((
|
|
4745
|
+
const l = this.grid.columns.findIndex((v) => v.field === s), g = this.grid.columns.map((v, b) => ({ index: b, column: v })).filter((v) => v.column.editable !== !1), h = g.findIndex((v) => v.index === l), u = this.grid.displayItems;
|
|
4671
4746
|
let p = r, m = l, f = !1;
|
|
4672
4747
|
switch (o.key) {
|
|
4673
4748
|
case "ArrowUp":
|
|
@@ -4695,7 +4770,7 @@ class Gi extends HTMLElement {
|
|
|
4695
4770
|
o.ctrlKey ? (p = u.length - 1, m = this.grid.columns.length - 1) : m = this.grid.columns.length - 1, f = !0;
|
|
4696
4771
|
break;
|
|
4697
4772
|
}
|
|
4698
|
-
f && (
|
|
4773
|
+
f && (F(this), this.grid.cancelEdit(), queueMicrotask(() => {
|
|
4699
4774
|
E(this, p, m);
|
|
4700
4775
|
}));
|
|
4701
4776
|
return;
|
|
@@ -4708,7 +4783,7 @@ class Gi extends HTMLElement {
|
|
|
4708
4783
|
let g = this.highlightedIndex + 1;
|
|
4709
4784
|
for (; g < this.dropdownOptions.length && mt(this.dropdownOptions[g], l); )
|
|
4710
4785
|
g++;
|
|
4711
|
-
g < this.dropdownOptions.length && (this.highlightedIndex = g, et(this),
|
|
4786
|
+
g < this.dropdownOptions.length && (this.highlightedIndex = g, et(this), pe(this));
|
|
4712
4787
|
}
|
|
4713
4788
|
break;
|
|
4714
4789
|
case "ArrowUp":
|
|
@@ -4718,13 +4793,13 @@ class Gi extends HTMLElement {
|
|
|
4718
4793
|
let g = this.highlightedIndex - 1;
|
|
4719
4794
|
for (; g >= 0 && mt(this.dropdownOptions[g], l); )
|
|
4720
4795
|
g--;
|
|
4721
|
-
g >= 0 && (this.highlightedIndex = g, et(this),
|
|
4796
|
+
g >= 0 && (this.highlightedIndex = g, et(this), pe(this));
|
|
4722
4797
|
}
|
|
4723
4798
|
break;
|
|
4724
4799
|
case "Enter":
|
|
4725
4800
|
if (this.datepicker)
|
|
4726
4801
|
return;
|
|
4727
|
-
o.preventDefault(), o.stopPropagation(), this.dropdownOpen && this.highlightedIndex >= 0 ?
|
|
4802
|
+
o.preventDefault(), o.stopPropagation(), this.dropdownOpen && this.highlightedIndex >= 0 ? Le(this, this.highlightedIndex) : a && !this.dropdownOpen ? K(this) : (this.isCommittingFromKeyboard = !0, L(this), d === "date" && i instanceof HTMLInputElement ? this.commitDateEditor(i) : Tt(this, i), Ft(this, r, s, "down"));
|
|
4728
4803
|
break;
|
|
4729
4804
|
case "Tab":
|
|
4730
4805
|
if (this.datepicker)
|
|
@@ -4732,25 +4807,25 @@ class Gi extends HTMLElement {
|
|
|
4732
4807
|
if (o.preventDefault(), o.stopPropagation(), this.isCommittingFromKeyboard = !0, this.dropdownOpen && this.highlightedIndex >= 0 && a) {
|
|
4733
4808
|
const l = this.dropdownOptions[this.highlightedIndex], g = this.getCurrentEditorOptions();
|
|
4734
4809
|
if (l && !mt(l, g)) {
|
|
4735
|
-
const h =
|
|
4810
|
+
const h = at(l, g);
|
|
4736
4811
|
this.grid.commitEdit(r, s, h);
|
|
4737
4812
|
}
|
|
4738
|
-
|
|
4813
|
+
L(this);
|
|
4739
4814
|
} else
|
|
4740
|
-
|
|
4741
|
-
|
|
4815
|
+
L(this), d === "date" && i instanceof HTMLInputElement ? this.commitDateEditor(i) : a || Tt(this, i);
|
|
4816
|
+
Ft(this, r, s, o.shiftKey ? "prev" : "next");
|
|
4742
4817
|
break;
|
|
4743
4818
|
case "Escape":
|
|
4744
|
-
o.preventDefault(), o.stopPropagation(), this.dropdownOpen &&
|
|
4819
|
+
o.preventDefault(), o.stopPropagation(), this.dropdownOpen && L(this), this.datepicker && (this.datepicker.close(!0), this.datepicker = null), this.isCommittingFromKeyboard = !0, F(this), this.grid.cancelEdit(), ti(this, r, s);
|
|
4745
4820
|
break;
|
|
4746
4821
|
case "F2":
|
|
4747
|
-
o.preventDefault(), o.stopPropagation(), a && !this.dropdownOpen &&
|
|
4822
|
+
o.preventDefault(), o.stopPropagation(), a && !this.dropdownOpen && K(this);
|
|
4748
4823
|
break;
|
|
4749
4824
|
case "Backspace":
|
|
4750
|
-
d === "select" && (o.preventDefault(), o.stopPropagation(), this.filterText.length > 0 && (this.filterText = this.filterText.slice(0, -1),
|
|
4825
|
+
d === "select" && (o.preventDefault(), o.stopPropagation(), this.filterText.length > 0 && (this.filterText = this.filterText.slice(0, -1), me(this, n.editorOptions || {})));
|
|
4751
4826
|
break;
|
|
4752
4827
|
default:
|
|
4753
|
-
d === "select" && o.key.length === 1 && !o.ctrlKey && !o.altKey && !o.metaKey && (o.preventDefault(), o.stopPropagation(), this.filterText += o.key,
|
|
4828
|
+
d === "select" && o.key.length === 1 && !o.ctrlKey && !o.altKey && !o.metaKey && (o.preventDefault(), o.stopPropagation(), this.filterText += o.key, me(this, n.editorOptions || {}));
|
|
4754
4829
|
break;
|
|
4755
4830
|
}
|
|
4756
4831
|
}
|
|
@@ -4765,11 +4840,11 @@ class Gi extends HTMLElement {
|
|
|
4765
4840
|
const n = s.target;
|
|
4766
4841
|
if (n.matches(".wg__cell")) {
|
|
4767
4842
|
const a = parseInt(n.dataset.row || "0", 10), c = parseInt(n.dataset.col || "0", 10);
|
|
4768
|
-
|
|
4843
|
+
Wo(this, a, c);
|
|
4769
4844
|
}
|
|
4770
4845
|
if (n.matches(".wg__select-trigger, .wg__combobox-input, .wg__autocomplete-input") && !this.justSelected && !this.dropdownOpen) {
|
|
4771
4846
|
const a = n.dataset.field || "", c = this.grid.columns.find((h) => h.field === a), l = (c == null ? void 0 : c.editorOptions) || {};
|
|
4772
|
-
(((d = this.grid.editingCell) == null ? void 0 : d.initialSearchQuery) !== void 0 || l.showOnFocus !== !1) &&
|
|
4847
|
+
(((d = this.grid.editingCell) == null ? void 0 : d.initialSearchQuery) !== void 0 || l.showOnFocus !== !1) && K(this);
|
|
4773
4848
|
}
|
|
4774
4849
|
}, !0), o.addEventListener("keydown", (s) => {
|
|
4775
4850
|
const n = s.target;
|
|
@@ -4782,7 +4857,7 @@ class Gi extends HTMLElement {
|
|
|
4782
4857
|
this.handleCellKeyDown(s, d, a);
|
|
4783
4858
|
}
|
|
4784
4859
|
}), o.addEventListener("focusout", (s) => {
|
|
4785
|
-
|
|
4860
|
+
Xo(this, s);
|
|
4786
4861
|
}), o.addEventListener("dblclick", (s) => {
|
|
4787
4862
|
s.preventDefault();
|
|
4788
4863
|
const d = s.target.closest(".wg__cell");
|
|
@@ -4791,17 +4866,33 @@ class Gi extends HTMLElement {
|
|
|
4791
4866
|
if (l) {
|
|
4792
4867
|
const g = l.editTrigger || this.grid.editTrigger;
|
|
4793
4868
|
if (g === "dblclick" || g === "navigate") {
|
|
4794
|
-
const h =
|
|
4795
|
-
|
|
4869
|
+
const h = zt(s, d);
|
|
4870
|
+
j(this, a, c, { cursorPosition: h ?? void 0 });
|
|
4796
4871
|
const u = l.editor;
|
|
4797
4872
|
u === "select" || u === "combobox" || u === "autocomplete" ? requestAnimationFrame(() => {
|
|
4798
|
-
this.dropdownOpen ||
|
|
4873
|
+
this.dropdownOpen || K(this);
|
|
4799
4874
|
}) : u === "custom" && requestAnimationFrame(() => {
|
|
4800
4875
|
this.openCustomEditor(a, c);
|
|
4801
4876
|
});
|
|
4802
4877
|
}
|
|
4803
4878
|
}
|
|
4804
4879
|
}
|
|
4880
|
+
}), o.addEventListener("click", (s) => {
|
|
4881
|
+
const d = s.target.closest(".wg__cell");
|
|
4882
|
+
if (d && !d.classList.contains("wg__cell--editing")) {
|
|
4883
|
+
const a = parseInt(d.dataset.row || "0", 10), c = parseInt(d.dataset.col || "0", 10), l = this.grid.columns[c];
|
|
4884
|
+
if (l && (l.editTrigger || this.grid.editTrigger) === "click") {
|
|
4885
|
+
s.preventDefault();
|
|
4886
|
+
const h = zt(s, d);
|
|
4887
|
+
j(this, a, c, { cursorPosition: h ?? void 0 });
|
|
4888
|
+
const u = l.editor;
|
|
4889
|
+
u === "select" || u === "combobox" || u === "autocomplete" ? requestAnimationFrame(() => {
|
|
4890
|
+
this.dropdownOpen || K(this);
|
|
4891
|
+
}) : u === "custom" && requestAnimationFrame(() => {
|
|
4892
|
+
this.openCustomEditor(a, c);
|
|
4893
|
+
});
|
|
4894
|
+
}
|
|
4895
|
+
}
|
|
4805
4896
|
}), o.addEventListener("mousedown", (s) => {
|
|
4806
4897
|
const n = s.target;
|
|
4807
4898
|
if (n.closest(".wg__date-trigger")) {
|
|
@@ -4812,7 +4903,7 @@ class Gi extends HTMLElement {
|
|
|
4812
4903
|
l && this.openDatePicker(l, c);
|
|
4813
4904
|
} else if (a) {
|
|
4814
4905
|
const l = parseInt(a.dataset.row || "0", 10), g = a.dataset.field || "", h = this.grid.columns.findIndex((u) => String(u.field) === g);
|
|
4815
|
-
h >= 0 && (this.isTransitioningCells = !0, this.grid.editingCell && (
|
|
4906
|
+
h >= 0 && (this.isTransitioningCells = !0, this.grid.editingCell && (L(this), F(this), this.grid.cancelEdit()), j(this, l, h), requestAnimationFrame(() => {
|
|
4816
4907
|
var f;
|
|
4817
4908
|
this.isTransitioningCells = !1;
|
|
4818
4909
|
const u = (f = this.shadowRoot) == null ? void 0 : f.querySelector(
|
|
@@ -4830,8 +4921,16 @@ class Gi extends HTMLElement {
|
|
|
4830
4921
|
if (g && !h) {
|
|
4831
4922
|
const u = this.grid.columns.findIndex((p) => String(p.field) === g.field);
|
|
4832
4923
|
if (c !== g.rowIndex || l !== u) {
|
|
4833
|
-
s.preventDefault(), this.isTransitioningCells = !0,
|
|
4834
|
-
|
|
4924
|
+
s.preventDefault(), this.isTransitioningCells = !0, L(this), F(this), this.grid.cancelEdit();
|
|
4925
|
+
const p = this.grid.columns[l], m = (p == null ? void 0 : p.editTrigger) || this.grid.editTrigger, v = s.clientX;
|
|
4926
|
+
requestAnimationFrame(() => {
|
|
4927
|
+
if (this.isTransitioningCells = !1, m === "click" && p && this.grid.isCellEditable(p)) {
|
|
4928
|
+
const b = this.shadow.querySelector(
|
|
4929
|
+
`td[data-row="${c}"][data-col="${l}"]`
|
|
4930
|
+
), _ = b ? zt({ clientX: v }, b) : void 0;
|
|
4931
|
+
j(this, c, l, { cursorPosition: _ ?? void 0 });
|
|
4932
|
+
} else
|
|
4933
|
+
E(this, c, l);
|
|
4835
4934
|
});
|
|
4836
4935
|
return;
|
|
4837
4936
|
}
|
|
@@ -4842,11 +4941,11 @@ class Gi extends HTMLElement {
|
|
|
4842
4941
|
s.preventDefault(), s.stopPropagation();
|
|
4843
4942
|
const a = n.closest(".wg__cell-dropdown-display");
|
|
4844
4943
|
if (n.closest(".wg__editor--select, .wg__editor--combobox, .wg__editor--autocomplete"))
|
|
4845
|
-
|
|
4944
|
+
we(this);
|
|
4846
4945
|
else if (a) {
|
|
4847
4946
|
const l = parseInt(a.dataset.row || "0", 10), g = a.dataset.field || "", h = this.grid.columns.findIndex((u) => String(u.field) === g);
|
|
4848
|
-
h >= 0 && (this.isTransitioningCells = !0, this.grid.editingCell && (
|
|
4849
|
-
this.isTransitioningCells = !1, this.dropdownOpen ||
|
|
4947
|
+
h >= 0 && (this.isTransitioningCells = !0, this.grid.editingCell && (L(this), F(this), this.grid.cancelEdit()), j(this, l, h), requestAnimationFrame(() => {
|
|
4948
|
+
this.isTransitioningCells = !1, this.dropdownOpen || K(this);
|
|
4850
4949
|
}));
|
|
4851
4950
|
}
|
|
4852
4951
|
}
|
|
@@ -4855,65 +4954,71 @@ class Gi extends HTMLElement {
|
|
|
4855
4954
|
const a = n.closest(".wg__cell-dropdown-display");
|
|
4856
4955
|
if (a) {
|
|
4857
4956
|
const c = parseInt(a.dataset.row || "0", 10), l = a.dataset.field || "", g = this.grid.columns.findIndex((h) => String(h.field) === l);
|
|
4858
|
-
g >= 0 && (this.isTransitioningCells = !0, this.grid.editingCell && (
|
|
4859
|
-
this.isTransitioningCells = !1, this.dropdownOpen ||
|
|
4957
|
+
g >= 0 && (this.isTransitioningCells = !0, this.grid.editingCell && (L(this), F(this), this.grid.cancelEdit()), j(this, c, g), requestAnimationFrame(() => {
|
|
4958
|
+
this.isTransitioningCells = !1, this.dropdownOpen || K(this);
|
|
4860
4959
|
}));
|
|
4861
4960
|
}
|
|
4862
4961
|
}
|
|
4863
4962
|
}), o.addEventListener("click", (s) => {
|
|
4864
|
-
s.target.matches(".wg__select-trigger, .wg__select-value") && (s.preventDefault(), s.stopPropagation(),
|
|
4963
|
+
s.target.matches(".wg__select-trigger, .wg__select-value") && (s.preventDefault(), s.stopPropagation(), we(this));
|
|
4865
4964
|
}), o.addEventListener("click", (s) => {
|
|
4866
4965
|
const n = s, a = n.target.closest(".wg__header--sortable");
|
|
4867
4966
|
if (a) {
|
|
4868
4967
|
const c = a.dataset.field;
|
|
4869
4968
|
if (!c) return;
|
|
4870
4969
|
const l = [...this.grid.sort], g = l.findIndex((u) => u.column === c);
|
|
4871
|
-
n.ctrlKey || n.metaKey ? g >= 0 ? l[g].direction === "asc" ? l[g] = { column: c, direction: "desc" } : l.splice(g, 1) : l.push({ column: c, direction: "asc" }) : g >= 0 && l.length === 1 ? l[0].direction === "asc" ? l[0] = { column: c, direction: "desc" } : l.length = 0 : (l.length = 0, l.push({ column: c, direction: "asc" })), this.grid.sort = l, this.grid.pageable && (this.grid.currentPage = 1), this.grid.fireDataRequest("sort"), this.render();
|
|
4970
|
+
(n.ctrlKey || n.metaKey) && this.grid.sortMode === "multi" ? g >= 0 ? l[g].direction === "asc" ? l[g] = { column: c, direction: "desc" } : l.splice(g, 1) : l.push({ column: c, direction: "asc" }) : g >= 0 && l.length === 1 ? l[0].direction === "asc" ? l[0] = { column: c, direction: "desc" } : l.length = 0 : (l.length = 0, l.push({ column: c, direction: "asc" })), this.grid.sort = l, this.grid.pageable && (this.grid.currentPage = 1), this.grid.fireDataRequest("sort"), this.render();
|
|
4872
4971
|
}
|
|
4873
4972
|
}), o.addEventListener("contextmenu", (s) => {
|
|
4874
4973
|
this.handleContextMenu(s);
|
|
4875
4974
|
}), o.addEventListener("change", (s) => {
|
|
4876
4975
|
const n = s.target;
|
|
4877
|
-
n.matches(".wg__editor--checkbox") &&
|
|
4976
|
+
n.matches(".wg__editor--checkbox") && Go(this, n);
|
|
4878
4977
|
}), o.addEventListener("input", (s) => {
|
|
4879
4978
|
const n = s.target;
|
|
4880
|
-
n.matches(".wg__combobox-input") ?
|
|
4979
|
+
n.matches(".wg__combobox-input") ? qo(this, s) : n.matches(".wg__autocomplete-input") && Yo(this, s);
|
|
4881
4980
|
}), o.addEventListener("blur", (s) => {
|
|
4882
4981
|
const n = s.target;
|
|
4883
|
-
if (n.matches(".wg__editor--text, .wg__editor--number") &&
|
|
4982
|
+
if (n.matches(".wg__editor--text, .wg__editor--number") && Zo(this, n), n.matches(".wg__date-input") && !this.datepicker && !this.isCommittingFromKeyboard && !this.isTransitioningCells && this.commitDateEditor(n), n.matches(".wg__select-trigger") && !this.isCommittingFromKeyboard && !this.isTransitioningCells && !this.dropdownOpen && !this.isOpeningDropdown && (L(this), F(this), this.grid.cancelEdit()), n.matches(".wg__combobox-input, .wg__autocomplete-input")) {
|
|
4884
4983
|
if (this.isCommittingFromKeyboard || this.isTransitioningCells)
|
|
4885
4984
|
return;
|
|
4886
|
-
if (
|
|
4985
|
+
if (L(this), this.grid.editingCell) {
|
|
4887
4986
|
const d = n, a = this.getCurrentEditingColumn();
|
|
4888
4987
|
if (a) {
|
|
4889
4988
|
const c = a.editorOptions || {}, g = (c.options || c.initialOptions || []).find(
|
|
4890
4989
|
(h) => yt(h, c).toLowerCase() === d.value.toLowerCase()
|
|
4891
4990
|
);
|
|
4892
|
-
g ? this.grid.commitEdit(this.grid.editingCell.rowIndex, this.grid.editingCell.field,
|
|
4991
|
+
g ? this.grid.commitEdit(this.grid.editingCell.rowIndex, this.grid.editingCell.field, at(g, c)) : this.grid.commitEdit(this.grid.editingCell.rowIndex, this.grid.editingCell.field, d.value);
|
|
4893
4992
|
}
|
|
4894
4993
|
}
|
|
4895
4994
|
}
|
|
4896
4995
|
}, !0);
|
|
4897
4996
|
const i = this.shadow.querySelector(".wg");
|
|
4898
4997
|
i && i.addEventListener("scroll", () => {
|
|
4899
|
-
this.dropdownOpen && !this.isTransitioningCells && !this.isOpeningDropdown && (
|
|
4998
|
+
this.dropdownOpen && !this.isTransitioningCells && !this.isOpeningDropdown && (L(this), F(this), this.grid.cancelEdit()), this.grid.shouldUseVirtualScroll() && this.handleVirtualScroll(i), this.grid.infiniteScroll && this.grid.hasMoreItems && !this.isLoadingMoreItems && this.handleInfiniteScroll(i);
|
|
4900
4999
|
}), this.wheelListenerAdded || (this.wheelListenerAdded = !0, window.addEventListener("scroll", () => {
|
|
4901
|
-
this.dropdownOpen && !this.isTransitioningCells && (
|
|
5000
|
+
this.dropdownOpen && !this.isTransitioningCells && (L(this), F(this), this.grid.cancelEdit());
|
|
4902
5001
|
}, { passive: !0, capture: !0 })), o.addEventListener("mouseenter", (s) => {
|
|
4903
|
-
const
|
|
5002
|
+
const n = s.target, d = n.closest("[data-tooltip-html]");
|
|
4904
5003
|
if (d) {
|
|
4905
|
-
const
|
|
4906
|
-
|
|
5004
|
+
const c = d.getAttribute("data-tooltip-html");
|
|
5005
|
+
be(this, d, c, this._tooltipShowDelay, !0);
|
|
5006
|
+
return;
|
|
5007
|
+
}
|
|
5008
|
+
const a = n.closest("[data-tooltip]");
|
|
5009
|
+
if (a) {
|
|
5010
|
+
const c = a.getAttribute("data-tooltip");
|
|
5011
|
+
be(this, a, c, this._tooltipShowDelay, !1);
|
|
4907
5012
|
}
|
|
4908
5013
|
}, !0), o.addEventListener("mouseleave", (s) => {
|
|
4909
|
-
const n = s, d = n.target, a = n.relatedTarget, c = d.closest("[data-tooltip]");
|
|
4910
|
-
c && (a == null ? void 0 : a.closest("[data-tooltip]")) === c || c &&
|
|
5014
|
+
const n = s, d = n.target, a = n.relatedTarget, c = d.closest("[data-tooltip], [data-tooltip-html]");
|
|
5015
|
+
c && (a == null ? void 0 : a.closest("[data-tooltip], [data-tooltip-html]")) === c || c && Uo(this, this._tooltipHideDelay);
|
|
4911
5016
|
}, !0), o.addEventListener("click", (s) => {
|
|
4912
5017
|
const d = s.target.closest(".wg__toolbar-trigger");
|
|
4913
5018
|
if (d && this.grid.toolbarTrigger === "button") {
|
|
4914
5019
|
s.preventDefault(), s.stopPropagation();
|
|
4915
5020
|
const a = parseInt(d.dataset.toolbarTrigger || "0", 10), c = o.querySelector(`tr[data-row-index="${a}"]`);
|
|
4916
|
-
c && (
|
|
5021
|
+
c && (qt(a) ? (this.closeToolbarAndReset(), this.render()) : this.showToolbarForRow(c, a));
|
|
4917
5022
|
}
|
|
4918
5023
|
}), o.addEventListener("mouseenter", (s) => {
|
|
4919
5024
|
if (this.grid.toolbarTrigger !== "hover") return;
|
|
@@ -4921,7 +5026,7 @@ class Gi extends HTMLElement {
|
|
|
4921
5026
|
const n = s, a = n.target.closest(".wg__row");
|
|
4922
5027
|
if (a) {
|
|
4923
5028
|
const c = parseInt(a.dataset.rowIndex || "0", 10);
|
|
4924
|
-
|
|
5029
|
+
qt(c) || this.showToolbarForRow(a, c, n.clientX);
|
|
4925
5030
|
}
|
|
4926
5031
|
}, !0), o.addEventListener("mouseleave", (s) => {
|
|
4927
5032
|
if (this.grid.toolbarTrigger !== "hover") return;
|
|
@@ -4937,10 +5042,10 @@ class Gi extends HTMLElement {
|
|
|
4937
5042
|
const n = s, d = n.target, a = d.closest(".wg__row");
|
|
4938
5043
|
if (a && !d.closest(".wg__cell--editing")) {
|
|
4939
5044
|
const c = parseInt(a.dataset.rowIndex || "0", 10);
|
|
4940
|
-
|
|
5045
|
+
qt(c) ? (this.closeToolbarAndReset(), this.render()) : this.showToolbarForRow(a, c, n.clientX);
|
|
4941
5046
|
}
|
|
4942
5047
|
}), this.toolbarOutsideClickAdded || (this.toolbarOutsideClickAdded = !0, document.addEventListener("click", (s) => {
|
|
4943
|
-
if (!
|
|
5048
|
+
if (!fi(this.shadow))
|
|
4944
5049
|
return;
|
|
4945
5050
|
const n = s.composedPath(), d = n.some((l) => {
|
|
4946
5051
|
var g;
|
|
@@ -4998,12 +5103,12 @@ class Gi extends HTMLElement {
|
|
|
4998
5103
|
rowHeight: this.grid.virtualScrollRowHeight,
|
|
4999
5104
|
totalItems: r.length
|
|
5000
5105
|
}, n = this.grid.focusedCell;
|
|
5001
|
-
if (i.innerHTML =
|
|
5106
|
+
if (i.innerHTML = ve(this, s), n) {
|
|
5002
5107
|
this.grid.setFocusedCell(n.rowIndex, n.colIndex);
|
|
5003
5108
|
const d = i.querySelector(
|
|
5004
5109
|
`td[data-row="${n.rowIndex}"][data-col="${n.colIndex}"]`
|
|
5005
5110
|
);
|
|
5006
|
-
d && (d.focus({ preventScroll: !0 }),
|
|
5111
|
+
d && (d.focus({ preventScroll: !0 }), B(this, null, n));
|
|
5007
5112
|
}
|
|
5008
5113
|
}
|
|
5009
5114
|
/**
|
|
@@ -5021,43 +5126,43 @@ class Gi extends HTMLElement {
|
|
|
5021
5126
|
const o = this.shadow.querySelector(".wg"), i = (o == null ? void 0 : o.scrollTop) || 0, r = (o == null ? void 0 : o.scrollLeft) || 0, s = this.grid.focusedCell;
|
|
5022
5127
|
o && o.remove();
|
|
5023
5128
|
const n = document.createElement("div");
|
|
5024
|
-
n.className =
|
|
5025
|
-
const d = this.grid.paginationPosition.split("|").map((f) => f.trim()), a = this.grid.summaryPosition ? this.grid.summaryPosition.split("|").map((f) => f.trim()) : [], c = (f,
|
|
5026
|
-
const
|
|
5027
|
-
(x) =>
|
|
5129
|
+
n.className = bi(this);
|
|
5130
|
+
const d = this.grid.paginationPosition.split("|").map((f) => f.trim()), a = this.grid.summaryPosition ? this.grid.summaryPosition.split("|").map((f) => f.trim()) : [], c = (f, v) => {
|
|
5131
|
+
const b = d.filter(
|
|
5132
|
+
(x) => v ? x.startsWith("top-") : x.startsWith("bottom-")
|
|
5028
5133
|
), _ = a.filter(
|
|
5029
|
-
(x) =>
|
|
5030
|
-
),
|
|
5031
|
-
return !
|
|
5032
|
-
${
|
|
5033
|
-
${
|
|
5034
|
-
</div>` : [.../* @__PURE__ */ new Set([...
|
|
5035
|
-
const
|
|
5036
|
-
return T &&
|
|
5134
|
+
(x) => v ? x.startsWith("top-") : x.startsWith("bottom-")
|
|
5135
|
+
), S = b.length > 0, y = _.length > 0;
|
|
5136
|
+
return !S && !y ? "" : y && S && this.grid.summaryInline ? `<div class="wg__footer${v ? " wg__footer--top" : ""}">
|
|
5137
|
+
${Nt(this, _[0])}
|
|
5138
|
+
${Yt(this, b[0])}
|
|
5139
|
+
</div>` : [.../* @__PURE__ */ new Set([...b, ..._])].map((x) => {
|
|
5140
|
+
const C = b.includes(x), T = _.includes(x);
|
|
5141
|
+
return T && C ? `<div class="wg__footer${v ? " wg__footer--top" : ""}">
|
|
5142
|
+
${Nt(this, x)}
|
|
5037
5143
|
${Yt(this, x)}
|
|
5038
|
-
|
|
5039
|
-
</div>` : T ? Yt(this, x) : qt(this, x);
|
|
5144
|
+
</div>` : T ? Nt(this, x) : Yt(this, x);
|
|
5040
5145
|
}).join("");
|
|
5041
5146
|
}, l = c(d, !0), g = c(d, !1), h = this.grid.shouldUseVirtualScroll();
|
|
5042
5147
|
let u;
|
|
5043
5148
|
if (h) {
|
|
5044
|
-
const f = this.grid.displayItems,
|
|
5045
|
-
this.virtualScrollStart =
|
|
5149
|
+
const f = this.grid.displayItems, v = this.grid.virtualScrollRowHeight, b = this.grid.virtualScrollBuffer, _ = (o == null ? void 0 : o.clientHeight) || 400, S = Math.max(0, Math.floor(i / v) - b), y = Math.ceil(_ / v) + b * 2, D = Math.min(f.length, S + y);
|
|
5150
|
+
this.virtualScrollStart = S, this.virtualScrollEnd = D;
|
|
5046
5151
|
const x = {
|
|
5047
|
-
startIndex:
|
|
5048
|
-
endIndex:
|
|
5049
|
-
rowHeight:
|
|
5152
|
+
startIndex: S,
|
|
5153
|
+
endIndex: D,
|
|
5154
|
+
rowHeight: v,
|
|
5050
5155
|
totalItems: f.length
|
|
5051
5156
|
};
|
|
5052
|
-
u =
|
|
5157
|
+
u = ve(this, x);
|
|
5053
5158
|
} else
|
|
5054
|
-
u =
|
|
5159
|
+
u = _i(this);
|
|
5055
5160
|
h && n.classList.add("wg--virtual-scroll");
|
|
5056
5161
|
const p = `
|
|
5057
5162
|
${l}
|
|
5058
5163
|
<table class="wg__table">
|
|
5059
5164
|
<thead>
|
|
5060
|
-
${
|
|
5165
|
+
${vi(this)}
|
|
5061
5166
|
</thead>
|
|
5062
5167
|
<tbody>
|
|
5063
5168
|
${u}
|
|
@@ -5073,15 +5178,19 @@ class Gi extends HTMLElement {
|
|
|
5073
5178
|
if (n.scrollLeft = r, this.attachEventListeners(), this.grid.editingCell) {
|
|
5074
5179
|
let f = this.shadow.querySelector(".wg__combobox-input, .wg__autocomplete-input, .wg__select-trigger, .wg__date-input");
|
|
5075
5180
|
if (f || (f = this.shadow.querySelector(".wg__editor")), f && (f.focus(), f instanceof HTMLInputElement && f.type === "text")) {
|
|
5076
|
-
const
|
|
5077
|
-
if (
|
|
5078
|
-
const
|
|
5079
|
-
f.setSelectionRange(
|
|
5080
|
-
} else if (this.grid.editingCell.initialSearchQuery !== void 0) {
|
|
5081
|
-
const C = f.value.length;
|
|
5082
|
-
f.setSelectionRange(C, C);
|
|
5181
|
+
const v = this.grid.editingCell.cursorPosition, b = this.getCurrentEditingColumn(), _ = ((m = b == null ? void 0 : b.editorOptions) == null ? void 0 : m.editStartSelection) || this.grid.editStartSelection;
|
|
5182
|
+
if (this.grid.editingCell.initialSearchQuery !== void 0) {
|
|
5183
|
+
const S = f.value.length;
|
|
5184
|
+
f.setSelectionRange(S, S);
|
|
5083
5185
|
} else
|
|
5084
5186
|
switch (_) {
|
|
5187
|
+
case "mousePosition":
|
|
5188
|
+
if (v !== void 0) {
|
|
5189
|
+
const S = Math.min(v, f.value.length);
|
|
5190
|
+
f.setSelectionRange(S, S);
|
|
5191
|
+
} else
|
|
5192
|
+
f.setSelectionRange(f.value.length, f.value.length);
|
|
5193
|
+
break;
|
|
5085
5194
|
case "cursorAtStart":
|
|
5086
5195
|
f.setSelectionRange(0, 0);
|
|
5087
5196
|
break;
|
|
@@ -5112,7 +5221,7 @@ class Gi extends HTMLElement {
|
|
|
5112
5221
|
renderConnector() {
|
|
5113
5222
|
const o = this.shadow.querySelector(".wg__connector");
|
|
5114
5223
|
o && o.remove();
|
|
5115
|
-
const i =
|
|
5224
|
+
const i = wi();
|
|
5116
5225
|
if (!i.path || !i.arrowPos)
|
|
5117
5226
|
return;
|
|
5118
5227
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -5128,7 +5237,7 @@ class Gi extends HTMLElement {
|
|
|
5128
5237
|
openDatePicker(o, i) {
|
|
5129
5238
|
this.datepicker && (this.datepicker.close(!0), this.datepicker = null);
|
|
5130
5239
|
const r = o.dataset.dateFormat || "YYYY-MM-DD", s = o.dataset.minDate, n = o.dataset.maxDate, d = o.dataset.dateValue || "";
|
|
5131
|
-
this.datepicker = new
|
|
5240
|
+
this.datepicker = new ne({
|
|
5132
5241
|
dateFormat: r,
|
|
5133
5242
|
minDate: s || void 0,
|
|
5134
5243
|
maxDate: n || void 0,
|
|
@@ -5136,7 +5245,7 @@ class Gi extends HTMLElement {
|
|
|
5136
5245
|
this.handleDatePickerSelect(o, a, c);
|
|
5137
5246
|
},
|
|
5138
5247
|
onClose: () => {
|
|
5139
|
-
this.datepicker = null,
|
|
5248
|
+
this.datepicker = null, F(this), this.grid.cancelEdit();
|
|
5140
5249
|
}
|
|
5141
5250
|
}), this.datepicker.open(i, d || null);
|
|
5142
5251
|
}
|
|
@@ -5144,8 +5253,8 @@ class Gi extends HTMLElement {
|
|
|
5144
5253
|
* Handle date selection from the date picker
|
|
5145
5254
|
*/
|
|
5146
5255
|
handleDatePickerSelect(o, i, r) {
|
|
5147
|
-
const s = o.dataset.dateFormat || "YYYY-MM-DD", n =
|
|
5148
|
-
o.value =
|
|
5256
|
+
const s = o.dataset.dateFormat || "YYYY-MM-DD", n = Kt(s);
|
|
5257
|
+
o.value = Fe(i, n), o.dataset.dateValue = Wt(i), this.isCommittingFromKeyboard = !0, this.commitDateEditor(o);
|
|
5149
5258
|
const d = parseInt(o.dataset.row || "0", 10), a = o.dataset.field || "";
|
|
5150
5259
|
this.moveFocusAfterCommit(d, a, r || "down");
|
|
5151
5260
|
}
|
|
@@ -5154,7 +5263,7 @@ class Gi extends HTMLElement {
|
|
|
5154
5263
|
*/
|
|
5155
5264
|
commitDateEditor(o) {
|
|
5156
5265
|
if (!this.grid.editingCell) return;
|
|
5157
|
-
const i = parseInt(o.dataset.row || "0", 10), r = o.dataset.field || "", s = o.dataset.outputFormat || "iso", n = o.dataset.dateFormat || "YYYY-MM-DD", d =
|
|
5266
|
+
const i = parseInt(o.dataset.row || "0", 10), r = o.dataset.field || "", s = o.dataset.outputFormat || "iso", n = o.dataset.dateFormat || "YYYY-MM-DD", d = Kt(n), a = o.value ? this.parseDateInput(o.value, d) : null;
|
|
5158
5267
|
let c = null;
|
|
5159
5268
|
if (a)
|
|
5160
5269
|
switch (s) {
|
|
@@ -5166,7 +5275,7 @@ class Gi extends HTMLElement {
|
|
|
5166
5275
|
break;
|
|
5167
5276
|
case "iso":
|
|
5168
5277
|
default:
|
|
5169
|
-
c =
|
|
5278
|
+
c = Wt(a);
|
|
5170
5279
|
break;
|
|
5171
5280
|
}
|
|
5172
5281
|
this.grid.commitEdit(i, r, c);
|
|
@@ -5215,7 +5324,7 @@ class Gi extends HTMLElement {
|
|
|
5215
5324
|
a();
|
|
5216
5325
|
const g = l - 1, h = this.grid.focusedCell;
|
|
5217
5326
|
if (this.grid.setFocusedCell(g, o), this.grid.shouldUseVirtualScroll())
|
|
5218
|
-
|
|
5327
|
+
st(this, g), requestAnimationFrame(() => {
|
|
5219
5328
|
requestAnimationFrame(() => {
|
|
5220
5329
|
const u = this.shadow.querySelector(
|
|
5221
5330
|
`td[data-row="${g}"][data-col="${o}"]`
|
|
@@ -5227,7 +5336,7 @@ class Gi extends HTMLElement {
|
|
|
5227
5336
|
const u = this.shadow.querySelector(
|
|
5228
5337
|
`td[data-row="${g}"][data-col="${o}"]`
|
|
5229
5338
|
);
|
|
5230
|
-
u && (u.scrollIntoView({ block: "nearest", behavior: "auto" }), u.focus(),
|
|
5339
|
+
u && (u.scrollIntoView({ block: "nearest", behavior: "auto" }), u.focus(), B(this, h, { rowIndex: g, colIndex: o }));
|
|
5231
5340
|
}
|
|
5232
5341
|
};
|
|
5233
5342
|
n.addEventListener("click", c), d.addEventListener("click", a), r.addEventListener("click", (l) => {
|
|
@@ -5251,12 +5360,12 @@ class Gi extends HTMLElement {
|
|
|
5251
5360
|
rowIndex: o,
|
|
5252
5361
|
field: s,
|
|
5253
5362
|
commit: (c) => {
|
|
5254
|
-
this.grid.commitEdit(o, s, c),
|
|
5363
|
+
this.grid.commitEdit(o, s, c), F(this), requestAnimationFrame(() => {
|
|
5255
5364
|
E(this, o, i);
|
|
5256
5365
|
});
|
|
5257
5366
|
},
|
|
5258
5367
|
cancel: () => {
|
|
5259
|
-
|
|
5368
|
+
F(this), this.grid.cancelEdit(), requestAnimationFrame(() => {
|
|
5260
5369
|
E(this, o, i);
|
|
5261
5370
|
});
|
|
5262
5371
|
}
|
|
@@ -5285,7 +5394,7 @@ class Gi extends HTMLElement {
|
|
|
5285
5394
|
column: a,
|
|
5286
5395
|
cellValue: g
|
|
5287
5396
|
};
|
|
5288
|
-
this.grid.oncontextmenuopen && this.grid.oncontextmenuopen(h), this.contextMenuElement =
|
|
5397
|
+
this.grid.oncontextmenuopen && this.grid.oncontextmenuopen(h), this.contextMenuElement = Ji(
|
|
5289
5398
|
this,
|
|
5290
5399
|
o.clientX,
|
|
5291
5400
|
o.clientY,
|
|
@@ -5306,10 +5415,10 @@ class Gi extends HTMLElement {
|
|
|
5306
5415
|
showToolbarForRow(o, i, r) {
|
|
5307
5416
|
if (!this.grid.showRowToolbar || !this.grid.rowToolbar.length)
|
|
5308
5417
|
return;
|
|
5309
|
-
const s =
|
|
5418
|
+
const s = gi(this.grid.rowToolbar), n = this.grid.displayItems[i];
|
|
5310
5419
|
if (!n)
|
|
5311
5420
|
return;
|
|
5312
|
-
if (this.toolbarHideTimeout && (clearTimeout(this.toolbarHideTimeout), this.toolbarHideTimeout = null),
|
|
5421
|
+
if (this.toolbarHideTimeout && (clearTimeout(this.toolbarHideTimeout), this.toolbarHideTimeout = null), pi(
|
|
5313
5422
|
this,
|
|
5314
5423
|
o,
|
|
5315
5424
|
i,
|
|
@@ -5359,12 +5468,12 @@ class Gi extends HTMLElement {
|
|
|
5359
5468
|
this.closeToolbarAndReset(), this.render();
|
|
5360
5469
|
return;
|
|
5361
5470
|
}
|
|
5362
|
-
n ? (this.render(),
|
|
5471
|
+
n ? (this.render(), mi(this, this.grid.displayItems), this.renderConnector()) : this.render();
|
|
5363
5472
|
}
|
|
5364
5473
|
}
|
|
5365
|
-
typeof customElements < "u" && !customElements.get("web-grid") && customElements.define("web-grid",
|
|
5474
|
+
typeof customElements < "u" && !customElements.get("web-grid") && customElements.define("web-grid", Zi);
|
|
5366
5475
|
export {
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5476
|
+
Zi as GridElement,
|
|
5477
|
+
Ue as WebGrid,
|
|
5478
|
+
Zi as default
|
|
5370
5479
|
};
|