@endge/ui-vue 0.23.13 → 0.25.2

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.
Files changed (26) hide show
  1. package/dist/{edit.utils-Dnnbd0xG-CzKoj46-.js → edit.utils-3ZbhQCv_-CBOvR_lX.js} +1 -1
  2. package/dist/{main-DL0N54th.js → main-DaAnRozo.js} +7009 -6022
  3. package/dist/revo-grid.entry-raK8rO6x.js +1793 -0
  4. package/dist/{revogr-attribution_7.entry-9jgtacZw.js → revogr-attribution_7.entry-BT5lTuRW.js} +147 -127
  5. package/dist/{revogr-clipboard_3.entry-xeNDm0Ry.js → revogr-clipboard_3.entry-C-dE9MUm.js} +6 -6
  6. package/dist/{revogr-data_4.entry-Ci95TT-j.js → revogr-data_4.entry-C9qNfzLe.js} +232 -178
  7. package/dist/revogr-filter-panel.entry-Belk-lw4.js +335 -0
  8. package/dist/throttle-3rhqdcLy-E1CC2r0m.js +183 -0
  9. package/dist/ui/filter/EndgeFilterField.vue.d.ts +3 -2
  10. package/dist/ui/filter/EndgeFilterRenderer.vue.d.ts +2 -1
  11. package/dist/ui/layout/EndgeShell.vue.d.ts +13 -15
  12. package/dist/ui/overlay/EndgeContextMenuRoot.vue.d.ts +2 -3
  13. package/dist/ui/overlay/context-menu-manager.d.ts +1 -0
  14. package/dist/ui/overlay/tooltip/EndgeTooltipRoot.vue.d.ts +2 -3
  15. package/dist/ui/render/entities/EndgePage.vue.d.ts +1098 -1219
  16. package/dist/ui/render/sfc/NativeMultiSelect.vue.d.ts +2 -6
  17. package/dist/ui/render/sfc/SFC_Renderer.vue.d.ts +2 -1
  18. package/dist/ui/render/sfc/SFC_RuntimeRenderer.vue.d.ts +2 -1
  19. package/dist/ui/table/NativeTablePagination.vue.d.ts +3 -2
  20. package/dist/vue.css +1 -1
  21. package/dist/vue.js +32 -32
  22. package/package.json +15 -14
  23. package/dist/revo-grid.entry-C90sIVoA.js +0 -1602
  24. package/dist/revogr-filter-panel.entry-DKMCmYqv.js +0 -314
  25. package/dist/store/domain.d.ts +0 -91
  26. package/dist/throttle-CaUDyxyU-DHZPo3J7.js +0 -180
@@ -1,314 +0,0 @@
1
- import { r as F, c as v, l as I, J as w, h as s, K as C, L as k, M as D, H as E, f as O } from "./main-DL0N54th.js";
2
- /*!
3
- * Built by Revolist OU ❤️
4
- */
5
- (function() {
6
- Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector), Element.prototype.closest || (Element.prototype.closest = function(i) {
7
- let t = this;
8
- do {
9
- if (Element.prototype.matches.call(t, i))
10
- return t;
11
- t = t.parentElement || t.parentNode;
12
- } while (t !== null && t.nodeType === 1);
13
- return null;
14
- });
15
- })();
16
- const y = "text/revogrid-filter-id";
17
- function T(e, i) {
18
- e && (e.effectAllowed = "move", e.setData(y, String(i)), e.setData("text/plain", String(i)));
19
- }
20
- function A(e) {
21
- if (!e)
22
- return;
23
- const t = (e.getData(y) || e.getData("text/plain")).trim();
24
- if (!t)
25
- return;
26
- const r = Number(t);
27
- return Number.isFinite(r) ? r : void 0;
28
- }
29
- function b(e, i, t) {
30
- if (i === t)
31
- return !1;
32
- const r = e.findIndex((n) => n.id === i), a = e.findIndex((n) => n.id === t);
33
- if (r === -1 || a === -1 || r === a)
34
- return !1;
35
- const o = e.map((n) => {
36
- var d;
37
- return (d = n.relation) !== null && d !== void 0 ? d : "and";
38
- }), [l] = e.splice(r, 1);
39
- return e.splice(a, 0, l), e.forEach((n, d) => {
40
- var c;
41
- n.relation = d === e.length - 1 ? "and" : (c = o[d]) !== null && c !== void 0 ? c : "and";
42
- }), !0;
43
- }
44
- const S = () => '.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-filter-panel{display:block}revogr-filter-panel .filter-panel-dialog{position:fixed;top:0;left:0;z-index:100;max-height:calc(100vh - 16px);overflow:auto;opacity:1;transform:none;background-color:var(--revo-grid-filter-panel-bg, #fff);border:1px solid var(--revo-grid-filter-panel-border, #cecece);transform-origin:62px 0px;box-shadow:0 5px 18px -2px var(--revo-grid-filter-panel-shadow, rgba(0, 0, 0, 0.15));box-sizing:border-box;padding:10px;border-radius:8px;margin:0;min-width:220px;text-align:left;animation:revogr-filter-panel-open 140ms cubic-bezier(0.2, 0, 0, 1)}revogr-filter-panel .filter-panel-dialog .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel .filter-panel-dialog label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel .filter-panel-dialog select{width:100%}revogr-filter-panel .filter-panel-dialog input[type=text]{border:0;min-height:34px;margin:5px 0;background:var(--revo-grid-filter-panel-input-bg, #f3f3f3);border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel .filter-panel-dialog .filter-actions{position:sticky;right:0;bottom:-10px;left:0;z-index:1;text-align:right;margin:10px -10px -10px;padding:0 5px 10px 10px;background:var(--revo-grid-filter-panel-bg, #fff);border-top:1px solid var(--revo-grid-filter-panel-divider, #d9d9d9)}revogr-filter-panel .filter-panel-dialog .filter-actions button{margin-top:10px;margin-right:5px}@keyframes revogr-filter-panel-open{from{opacity:0;transform:translateY(-4px) scale(0.98)}to{opacity:1;transform:none}}@media (prefers-reduced-motion: reduce){revogr-filter-panel .filter-panel-dialog{animation:none}}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid var(--revo-grid-filter-panel-select-border, #d9d9d9);box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:var(--revo-grid-filter-panel-input-bg, #f3f3f3);background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.select-css:focus{border-color:var(--revo-grid-filter-panel-select-border-hover, #d9d9d9);box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-row{display:flex;align-items:center;gap:6px;position:relative}.multi-filter-list .multi-filter-list-row.filter-row-dragging{opacity:0.65}.multi-filter-list .multi-filter-list-row.filter-row-drag-over::before{content:"";position:absolute;top:-4px;right:0;left:0;z-index:2;height:2px;background:var(--revo-grid-filter-panel-reorder-accent, #007cb2);border-radius:999px;box-shadow:0 0 0 2px var(--revo-grid-filter-panel-bg, #fff)}.multi-filter-list .multi-filter-list-row.filter-row-drop-active .filter-row-drop-target{pointer-events:auto}.multi-filter-list .filter-row-drop-target{position:absolute;inset:0;z-index:1;padding:0;pointer-events:none;background:transparent;border:0}.multi-filter-list .multi-filter-list-action{display:flex;align-self:stretch;flex:0 0 auto;justify-content:flex-end;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.multi-filter-list .reorder-button{border:0;background:transparent;color:var(--revo-grid-filter-panel-reorder-color, #6b7280);cursor:grab;font-family:monospace;font-size:12px;letter-spacing:0;line-height:1;padding:6px 2px;transform:scaleX(0.8);width:16px}.multi-filter-list .reorder-button.filter-row-drag-over{color:var(--revo-grid-filter-panel-reorder-accent, #007cb2)}.multi-filter-list .reorder-button:active{cursor:grabbing}.multi-filter-list-container{padding:0;margin:0;list-style:none}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid var(--revo-grid-filter-panel-divider, #d9d9d9);height:10px}.select-input{display:flex;align-items:center;flex:1 1 auto;gap:6px;min-width:0}.select-input .select-filter,.select-input .filter-extra{flex:1 1 0;min-width:0}.select-input .select-filter{width:auto}.select-input .filter-extra{display:flex}.select-input .filter-extra>*{width:100%}.select-input input[type=text],.select-input input[type=date]{margin:0}', f = "none", _ = "multi-filter-list", L = "multi-filter-list-action", x = "add-filter", u = 8, R = class {
45
- constructor(e) {
46
- F(this, e), this.filterChange = v(this, "filterChange", 7), this.resetChange = v(this, "resetChange", 7), this.filterCaptionsInternal = {
47
- title: "Filter by",
48
- ok: "Close",
49
- save: "Save",
50
- // drops the filter
51
- reset: "Reset",
52
- cancel: "Cancel",
53
- add: "Add condition",
54
- placeholder: "Enter value...",
55
- and: "and",
56
- or: "or",
57
- filterCondition: "Filter condition",
58
- removeFilter: "Remove filter",
59
- reorderFilter: "Reorder filter"
60
- }, this.isFilterIdSet = !1, this.filterId = 0, this.currentFilterId = -1, this.currentFilterType = f, this.filterItems = {}, this.filterNames = {}, this.filterEntities = {}, this.disableDynamicFiltering = !1, this.closeOnOutsideClick = !0, this.debouncedApplyFilter = I(() => {
61
- this.filterChange.emit(this.filterItems);
62
- }, 400);
63
- }
64
- onMouseDown(e) {
65
- if (!this.changes)
66
- return;
67
- const i = e.composedPath(), t = document.getElementById(x);
68
- if (t instanceof HTMLSelectElement) {
69
- if (i.includes(t))
70
- return;
71
- t.value = f;
72
- }
73
- this.currentFilterType = f, this.changes && (this.changes.type = f), this.currentFilterId = -1;
74
- const r = !i.includes(this.element);
75
- e.target instanceof HTMLElement && r && !w(e.target) && this.closeOnOutsideClick && (this.changes = void 0);
76
- }
77
- async show(e) {
78
- this.changes = e, this.filterItems = (e == null ? void 0 : e.filterItems) || {}, this.changes && (this.changes.type = this.changes.type || f);
79
- }
80
- async getChanges() {
81
- return this.changes;
82
- }
83
- componentWillRender() {
84
- if (!this.isFilterIdSet) {
85
- this.isFilterIdSet = !0;
86
- const e = Object.keys(this.filterItems);
87
- for (const i of e)
88
- this.filterId += this.filterItems[i].length;
89
- }
90
- }
91
- getFilterItemsList() {
92
- var e, i;
93
- const t = (e = this.changes) === null || e === void 0 ? void 0 : e.prop;
94
- if (typeof t > "u")
95
- return "";
96
- const r = (i = this.filterItems[t]) !== null && i !== void 0 ? i : [], a = r.filter((l) => !l.hidden).length, o = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
97
- return s("div", { key: this.filterId }, s("ul", { class: "multi-filter-list-container" }, r.map((l, n) => {
98
- let d;
99
- if (l.hidden)
100
- return;
101
- n !== this.filterItems[t].length - 1 && (d = s(C, { text: l.relation === "and" ? o.and : o.or, onClick: () => this.toggleFilterAndOr(l.id) }));
102
- const c = this.renderExtra(t, n), h = this.draggedFilterId === l.id, p = this.dragOverFilterId === l.id && !h, m = a > 1;
103
- return s("li", { key: l.id, class: _, "aria-label": `${o.filterCondition} ${n + 1}` }, s("div", { class: {
104
- "multi-filter-list-row": !0,
105
- "filter-row-drop-active": this.draggedFilterId !== void 0 && !h,
106
- "filter-row-dragging": h,
107
- "filter-row-drag-over": p
108
- } }, m ? s("button", { type: "button", class: "filter-row-drop-target", tabIndex: -1, "aria-label": `${o.filterCondition} ${n + 1}`, onDragOver: (g) => this.onFilterDragOver(g, l.id), onDragLeave: () => this.onFilterDragLeave(l.id), onDrop: (g) => this.onFilterDrop(g, t, l.id) }) : "", m ? s(k, { ariaLabel: o.reorderFilter, dragging: h, dragOver: p, onDragStart: (g) => this.onFilterDragStart(g, l.id), onDragEnd: () => this.onFilterDragEnd(), onKeyDown: (g) => this.onFilterReorderKeyDown(g, t, l.id) }) : "", s("div", { class: { "select-input": !0 } }, s("select", { class: "select-css select-filter", onChange: (g) => this.onFilterTypeChange(g, t, n) }, this.renderSelectOptions(this.filterItems[t][n].type, !0)), c ? s("div", { class: "filter-extra" }, c) : ""), s("div", { class: L }, d, s(D, { ariaLabel: o.removeFilter, onClick: () => this.onRemoveFilter(l.id) }))));
109
- })), r.filter((l) => !l.hidden).length > 0 ? s("div", { class: "add-filter-divider" }) : "");
110
- }
111
- componentDidRender() {
112
- this.syncDialog();
113
- }
114
- syncDialog() {
115
- if (this.dialog) {
116
- if (!this.changes) {
117
- this.dialog.open && this.dialog.close();
118
- return;
119
- }
120
- this.dialog.open || this.dialog.show(), this.changes.autoCorrect !== !1 && (this.autoCorrect(this.dialog), requestAnimationFrame(() => this.autoCorrect(this.dialog)));
121
- }
122
- }
123
- autoCorrect(e) {
124
- var i;
125
- if (!e || !this.changes)
126
- return;
127
- e.style.maxHeight = "", e.style.left = `${this.changes.x}px`, e.style.top = `${this.changes.y}px`;
128
- const t = e.getBoundingClientRect(), r = (i = this.changes.anchorY) !== null && i !== void 0 ? i : this.changes.y, a = this.changes.y, o = Math.max(0, r - u), l = Math.max(0, window.innerHeight - a - u), n = t.height > l && o > l, d = Math.max(u, n ? o : l);
129
- e.style.maxHeight = `${d}px`;
130
- const c = e.getBoundingClientRect(), h = Math.max(u, window.innerWidth - c.width - u), p = Math.max(u, window.innerHeight - c.height - u), m = Math.min(Math.max(u, this.changes.x), h), g = Math.min(n ? Math.max(u, r - c.height) : Math.max(u, a), p);
131
- e.style.left = `${m}px`, e.style.top = `${g}px`;
132
- }
133
- onFilterTypeChange(e, i, t) {
134
- e.target instanceof HTMLSelectElement && (this.filterItems[i][t].type = e.target.value, this.filterId++, setTimeout(() => {
135
- const r = document.getElementById("filter-input-" + this.filterItems[i][t].id);
136
- r instanceof HTMLInputElement && r.focus();
137
- }, 0), this.disableDynamicFiltering || this.debouncedApplyFilter());
138
- }
139
- onAddNewFilter(e) {
140
- const i = e.target;
141
- this.currentFilterType = i.value, this.addNewFilterToProp();
142
- const t = document.getElementById("add-filter");
143
- t && (t.value = f, this.currentFilterType = f), this.disableDynamicFiltering || this.debouncedApplyFilter();
144
- }
145
- addNewFilterToProp() {
146
- var e;
147
- const i = (e = this.changes) === null || e === void 0 ? void 0 : e.prop;
148
- (i || i === 0) && (this.filterItems[i] || (this.filterItems[i] = []), this.currentFilterType !== "none" && (this.filterId++, this.currentFilterId = this.filterId, this.filterItems[i].push({
149
- id: this.currentFilterId,
150
- type: this.currentFilterType,
151
- value: "",
152
- relation: "and"
153
- }), setTimeout(() => {
154
- const t = document.getElementById("filter-input-" + this.currentFilterId);
155
- t && t.focus();
156
- }, 0)));
157
- }
158
- onSave() {
159
- this.filterChange.emit(this.filterItems);
160
- }
161
- onCancel() {
162
- this.changes = void 0;
163
- }
164
- onReset() {
165
- var e;
166
- this.assertChanges(), this.resetChange.emit((e = this.changes) === null || e === void 0 ? void 0 : e.prop), this.filterId++;
167
- }
168
- onRemoveFilter(e) {
169
- var i;
170
- this.assertChanges(), this.filterId++;
171
- const t = (i = this.changes) === null || i === void 0 ? void 0 : i.prop, r = this.filterItems[t ?? ""];
172
- if (!r)
173
- return;
174
- const a = r.findIndex((o) => o.id === e);
175
- a !== -1 && (r.splice(a, 1), r.length === 0 && delete this.filterItems[t ?? ""], this.disableDynamicFiltering || this.debouncedApplyFilter());
176
- }
177
- onFilterDragStart(e, i) {
178
- this.draggedFilterId = i, T(e.dataTransfer, i);
179
- }
180
- onFilterDragOver(e, i) {
181
- this.draggedFilterId === void 0 || this.draggedFilterId === i || (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), this.dragOverFilterId = i);
182
- }
183
- onFilterDragLeave(e) {
184
- this.dragOverFilterId === e && (this.dragOverFilterId = void 0);
185
- }
186
- onFilterDrop(e, i, t) {
187
- var r;
188
- e.preventDefault();
189
- const a = (r = this.draggedFilterId) !== null && r !== void 0 ? r : A(e.dataTransfer);
190
- if (this.onFilterDragEnd(), a === void 0)
191
- return;
192
- const o = this.filterItems[i];
193
- o && b(o, a, t) && (this.filterId++, this.disableDynamicFiltering || this.debouncedApplyFilter());
194
- }
195
- onFilterDragEnd() {
196
- this.draggedFilterId = void 0, this.dragOverFilterId = void 0;
197
- }
198
- onFilterReorderKeyDown(e, i, t) {
199
- let r = 0;
200
- if (e.key === "ArrowUp")
201
- r = -1;
202
- else if (e.key === "ArrowDown")
203
- r = 1;
204
- else
205
- return;
206
- const a = this.filterItems[i];
207
- if (!a)
208
- return;
209
- const o = a.filter((d) => !d.hidden), l = o.findIndex((d) => d.id === t);
210
- if (l === -1)
211
- return;
212
- e.preventDefault(), e.stopPropagation();
213
- const n = o[l + r];
214
- !n || !b(a, t, n.id) || (this.filterId++, this.disableDynamicFiltering || this.debouncedApplyFilter());
215
- }
216
- toggleFilterAndOr(e) {
217
- var i;
218
- this.assertChanges(), this.filterId++;
219
- const t = (i = this.changes) === null || i === void 0 ? void 0 : i.prop, r = this.filterItems[t ?? ""];
220
- if (!r)
221
- return;
222
- const a = r.findIndex((o) => o.id === e);
223
- a !== -1 && (r[a].relation = r[a].relation === "and" ? "or" : "and", this.disableDynamicFiltering || this.debouncedApplyFilter());
224
- }
225
- assertChanges() {
226
- if (!this.changes)
227
- throw new Error("Changes required per edit");
228
- }
229
- renderSelectOptions(e, i = !1) {
230
- if (!this.changes)
231
- return;
232
- const t = [], r = this.changes.prop, a = /* @__PURE__ */ new Set();
233
- if (Object.keys(this.filterItems).forEach((o) => {
234
- this.filterItems[o].forEach((n) => {
235
- n.hidden && a.add(n.type);
236
- });
237
- }), !i) {
238
- const o = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
239
- t.push(s("option", { selected: this.currentFilterType === f, value: f }, r && this.filterItems[r] && this.filterItems[r].length > 0 ? o.add : this.filterNames[f]));
240
- }
241
- for (let o in this.changes.filterTypes) {
242
- const l = this.changes.filterTypes[o].filter((n) => !a.has(n));
243
- l.length && (t.push(...l.map((n) => s("option", { value: n, selected: e === n }, this.filterNames[n]))), t.push(s("option", { disabled: !0 })));
244
- }
245
- return t;
246
- }
247
- renderExtra(e, i) {
248
- const t = this.filterItems[e];
249
- if (!t)
250
- return "";
251
- const r = (n) => {
252
- this.filterItems[e][i].value = n, this.disableDynamicFiltering || this.debouncedApplyFilter();
253
- }, a = () => {
254
- const n = document.getElementById("add-filter");
255
- n && (n.value = f, this.currentFilterType = f, this.addNewFilterToProp(), n.focus());
256
- }, o = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions), l = this.filterEntities[t[i].type].extra;
257
- return typeof l == "function" ? l(s, {
258
- value: t[i].value,
259
- filter: t[i],
260
- prop: e,
261
- index: i,
262
- placeholder: o.placeholder,
263
- onInput: (n) => {
264
- r(n);
265
- },
266
- onFocus: () => {
267
- a();
268
- }
269
- }) : l !== "input" && l !== "datepicker" ? "" : s("input", { id: `filter-input-${t[i].id}`, placeholder: o.placeholder, type: l === "datepicker" ? "date" : "text", value: t[i].value, onInput: (n) => {
270
- n.target instanceof HTMLInputElement && r(n.target.value);
271
- }, onKeyDown: (n) => {
272
- if (n.key.toLowerCase() === "enter") {
273
- document.getElementById("add-filter") && a();
274
- return;
275
- }
276
- n.stopPropagation();
277
- } });
278
- }
279
- render() {
280
- var e, i, t, r, a, o, l, n, d;
281
- const c = {
282
- left: `${(i = (e = this.changes) === null || e === void 0 ? void 0 : e.x) !== null && i !== void 0 ? i : 0}px`,
283
- top: `${(r = (t = this.changes) === null || t === void 0 ? void 0 : t.y) !== null && r !== void 0 ? r : 0}px`
284
- }, h = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
285
- return s(E, { key: "4e969f8b7033363c885c94b1f7770917786669f2" }, s("dialog", { key: "79b2713724684fa99f56621fe43645a0b0ad54bf", class: "filter-panel-dialog", style: c, ref: (p) => this.dialog = p, onCancel: (p) => {
286
- p.preventDefault(), this.onCancel();
287
- } }, this.changes && [
288
- s("slot", { key: "header-slot", slot: "header" }),
289
- ((o = (a = this.changes).extraContent) === null || o === void 0 ? void 0 : o.call(a, this.changes)) || "",
290
- ((l = this.changes) === null || l === void 0 ? void 0 : l.hideDefaultFilters) !== !0 && [
291
- s("label", { key: "filter-title" }, h.title),
292
- s("div", { key: "filter-holder", class: "filter-holder" }, this.getFilterItemsList()),
293
- s("div", { key: "add-filter", class: "add-filter" }, s("select", { key: "fc894bdfae1ff35d5c49adc7646dd3182b7bd49e", id: x, class: "select-css", onChange: (p) => this.onAddNewFilter(p) }, this.renderSelectOptions(this.currentFilterType)))
294
- ],
295
- s("slot", { key: "default-slot" }),
296
- ((d = (n = this.changes).extraBottomContent) === null || d === void 0 ? void 0 : d.call(n, this.changes)) || "",
297
- s("div", { key: "filter-actions", class: "filter-actions" }, this.disableDynamicFiltering && [
298
- s("button", { key: "save", id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, h.save),
299
- s("button", { key: "cancel", id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, h.cancel)
300
- ], !this.disableDynamicFiltering && [
301
- s("button", { key: "ok", id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, h.ok),
302
- s("button", { key: "reset", id: "revo-button-reset", "aria-label": "reset", class: "revo-button outline", onClick: () => this.onReset() }, h.reset)
303
- ]),
304
- s("slot", { key: "footer-slot", slot: "footer" })
305
- ]));
306
- }
307
- get element() {
308
- return O(this);
309
- }
310
- };
311
- R.style = S();
312
- export {
313
- R as revogr_filter_panel
314
- };
@@ -1,91 +0,0 @@
1
- export declare const useDomainStore: import('pinia').StoreDefinition<"endge-domain-store", Pick<{
2
- domain: import('vue').Ref<import('@endge/core').EndgeDomain, import('@endge/core').EndgeDomain>;
3
- projects: import('vue').ComputedRef<import('@endge/core/dist/domain/entities/reflect/RProject').RProject[]>;
4
- types: import('vue').ComputedRef<import('@endge/core').RType[]>;
5
- typesPrimitives: import('vue').ComputedRef<import('@endge/core').RType[]>;
6
- typesComplex: import('vue').ComputedRef<import('@endge/core').RType[]>;
7
- typeCatalog: import('vue').ComputedRef<import('@endge/core').TypeProgramCatalogEntry[]>;
8
- queries: import('vue').ComputedRef<import('@endge/core').RQuery[]>;
9
- components: import('vue').ComputedRef<import('@endge/core').RComponent[]>;
10
- componentSFCs: import('vue').ComputedRef<import('@endge/core').RComponentSFC[]>;
11
- actions: import('vue').ComputedRef<import('@endge/core').RAction[]>;
12
- converters: import('vue').ComputedRef<import('@endge/core').RConverter[]>;
13
- integrations: import('vue').ComputedRef<import('@endge/core').RIntegration[]>;
14
- pageTemplates: import('vue').ComputedRef<import('@endge/core').RPageTemplate[]>;
15
- pages: import('vue').ComputedRef<import('@endge/core').RPage[]>;
16
- navigations: import('vue').ComputedRef<import('@endge/core').RNavigation[]>;
17
- folders: import('vue').ComputedRef<import('@endge/core').RFolder[]>;
18
- queriesNames: import('vue').ComputedRef<string[]>;
19
- parameters: import('vue').ComputedRef<import('@endge/core').RParameter[]>;
20
- filters: import('vue').ComputedRef<import('@endge/core').RFilter[]>;
21
- compositions: import('vue').ComputedRef<import('@endge/core').RComposition[]>;
22
- environments: import('vue').ComputedRef<import('@endge/core').REnvironment[]>;
23
- tenants: import('vue').ComputedRef<import('@endge/core').RTenant[]>;
24
- policies: import('vue').ComputedRef<import('@endge/core').RPolicy[]>;
25
- styles: import('vue').ComputedRef<import('@endge/core').RStyle[]>;
26
- vocabs: import('vue').ComputedRef<import('@endge/core').RVocabs[]>;
27
- i18nBundles: import('vue').ComputedRef<import('@endge/core').RI18nBundle[]>;
28
- mocks: import('vue').ComputedRef<import('@endge/core').RMock[]>;
29
- authProfiles: import('vue').ComputedRef<import('@endge/core').RAuthProfile[]>;
30
- events: import('vue').ComputedRef<import('@endge/core').CachedEvent[]>;
31
- }, "domain">, Pick<{
32
- domain: import('vue').Ref<import('@endge/core').EndgeDomain, import('@endge/core').EndgeDomain>;
33
- projects: import('vue').ComputedRef<import('@endge/core/dist/domain/entities/reflect/RProject').RProject[]>;
34
- types: import('vue').ComputedRef<import('@endge/core').RType[]>;
35
- typesPrimitives: import('vue').ComputedRef<import('@endge/core').RType[]>;
36
- typesComplex: import('vue').ComputedRef<import('@endge/core').RType[]>;
37
- typeCatalog: import('vue').ComputedRef<import('@endge/core').TypeProgramCatalogEntry[]>;
38
- queries: import('vue').ComputedRef<import('@endge/core').RQuery[]>;
39
- components: import('vue').ComputedRef<import('@endge/core').RComponent[]>;
40
- componentSFCs: import('vue').ComputedRef<import('@endge/core').RComponentSFC[]>;
41
- actions: import('vue').ComputedRef<import('@endge/core').RAction[]>;
42
- converters: import('vue').ComputedRef<import('@endge/core').RConverter[]>;
43
- integrations: import('vue').ComputedRef<import('@endge/core').RIntegration[]>;
44
- pageTemplates: import('vue').ComputedRef<import('@endge/core').RPageTemplate[]>;
45
- pages: import('vue').ComputedRef<import('@endge/core').RPage[]>;
46
- navigations: import('vue').ComputedRef<import('@endge/core').RNavigation[]>;
47
- folders: import('vue').ComputedRef<import('@endge/core').RFolder[]>;
48
- queriesNames: import('vue').ComputedRef<string[]>;
49
- parameters: import('vue').ComputedRef<import('@endge/core').RParameter[]>;
50
- filters: import('vue').ComputedRef<import('@endge/core').RFilter[]>;
51
- compositions: import('vue').ComputedRef<import('@endge/core').RComposition[]>;
52
- environments: import('vue').ComputedRef<import('@endge/core').REnvironment[]>;
53
- tenants: import('vue').ComputedRef<import('@endge/core').RTenant[]>;
54
- policies: import('vue').ComputedRef<import('@endge/core').RPolicy[]>;
55
- styles: import('vue').ComputedRef<import('@endge/core').RStyle[]>;
56
- vocabs: import('vue').ComputedRef<import('@endge/core').RVocabs[]>;
57
- i18nBundles: import('vue').ComputedRef<import('@endge/core').RI18nBundle[]>;
58
- mocks: import('vue').ComputedRef<import('@endge/core').RMock[]>;
59
- authProfiles: import('vue').ComputedRef<import('@endge/core').RAuthProfile[]>;
60
- events: import('vue').ComputedRef<import('@endge/core').CachedEvent[]>;
61
- }, "components" | "filters" | "pages" | "actions" | "projects" | "types" | "typesPrimitives" | "typesComplex" | "typeCatalog" | "queries" | "componentSFCs" | "converters" | "integrations" | "pageTemplates" | "navigations" | "folders" | "queriesNames" | "parameters" | "compositions" | "environments" | "tenants" | "policies" | "styles" | "vocabs" | "i18nBundles" | "mocks" | "authProfiles" | "events">, Pick<{
62
- domain: import('vue').Ref<import('@endge/core').EndgeDomain, import('@endge/core').EndgeDomain>;
63
- projects: import('vue').ComputedRef<import('@endge/core/dist/domain/entities/reflect/RProject').RProject[]>;
64
- types: import('vue').ComputedRef<import('@endge/core').RType[]>;
65
- typesPrimitives: import('vue').ComputedRef<import('@endge/core').RType[]>;
66
- typesComplex: import('vue').ComputedRef<import('@endge/core').RType[]>;
67
- typeCatalog: import('vue').ComputedRef<import('@endge/core').TypeProgramCatalogEntry[]>;
68
- queries: import('vue').ComputedRef<import('@endge/core').RQuery[]>;
69
- components: import('vue').ComputedRef<import('@endge/core').RComponent[]>;
70
- componentSFCs: import('vue').ComputedRef<import('@endge/core').RComponentSFC[]>;
71
- actions: import('vue').ComputedRef<import('@endge/core').RAction[]>;
72
- converters: import('vue').ComputedRef<import('@endge/core').RConverter[]>;
73
- integrations: import('vue').ComputedRef<import('@endge/core').RIntegration[]>;
74
- pageTemplates: import('vue').ComputedRef<import('@endge/core').RPageTemplate[]>;
75
- pages: import('vue').ComputedRef<import('@endge/core').RPage[]>;
76
- navigations: import('vue').ComputedRef<import('@endge/core').RNavigation[]>;
77
- folders: import('vue').ComputedRef<import('@endge/core').RFolder[]>;
78
- queriesNames: import('vue').ComputedRef<string[]>;
79
- parameters: import('vue').ComputedRef<import('@endge/core').RParameter[]>;
80
- filters: import('vue').ComputedRef<import('@endge/core').RFilter[]>;
81
- compositions: import('vue').ComputedRef<import('@endge/core').RComposition[]>;
82
- environments: import('vue').ComputedRef<import('@endge/core').REnvironment[]>;
83
- tenants: import('vue').ComputedRef<import('@endge/core').RTenant[]>;
84
- policies: import('vue').ComputedRef<import('@endge/core').RPolicy[]>;
85
- styles: import('vue').ComputedRef<import('@endge/core').RStyle[]>;
86
- vocabs: import('vue').ComputedRef<import('@endge/core').RVocabs[]>;
87
- i18nBundles: import('vue').ComputedRef<import('@endge/core').RI18nBundle[]>;
88
- mocks: import('vue').ComputedRef<import('@endge/core').RMock[]>;
89
- authProfiles: import('vue').ComputedRef<import('@endge/core').RAuthProfile[]>;
90
- events: import('vue').ComputedRef<import('@endge/core').CachedEvent[]>;
91
- }, never>>;
@@ -1,180 +0,0 @@
1
- import { g as h } from "./viewport.helpers-CoCAvmZs-f555rwPU.js";
2
- import { as as g, l as d } from "./main-DL0N54th.js";
3
- /*!
4
- * Built by Revolist OU ❤️
5
- */
6
- const c = {
7
- contentSize: 0,
8
- clientSize: 0,
9
- virtualSize: 0,
10
- maxSize: 0
11
- }, e = -1;
12
- function v(a, i, t = 0) {
13
- return h({
14
- contentSize: a,
15
- clientSize: i,
16
- virtualSize: t
17
- }).physicalContentSize;
18
- }
19
- class C {
20
- constructor(i) {
21
- this.cfg = i, this.preventArtificialScroll = {
22
- rgRow: null,
23
- rgCol: null
24
- }, this.previousScroll = {
25
- rgRow: e,
26
- rgCol: e
27
- }, this.previousLogicalScroll = {
28
- rgRow: 0,
29
- rgCol: 0
30
- }, this.params = {
31
- rgRow: Object.assign({}, c),
32
- rgCol: Object.assign({}, c)
33
- };
34
- }
35
- setParams(i, t) {
36
- const o = h(i), l = o.physicalContentSize;
37
- this.params[t] = Object.assign(Object.assign({}, i), {
38
- maxSize: l - i.clientSize,
39
- virtualContentSize: l,
40
- scrollDimension: o
41
- });
42
- }
43
- // apply scroll values after scroll done
44
- async setScroll(i) {
45
- this.cancelScroll(i.dimension);
46
- const t = new Promise((o, l) => {
47
- if (this.cfg.skipAnimationFrame)
48
- return o();
49
- const r = window.requestAnimationFrame(() => {
50
- o();
51
- });
52
- this.preventArtificialScroll[i.dimension] = l.bind(null, r);
53
- });
54
- try {
55
- await t;
56
- const o = this.getParams(i.dimension);
57
- i.coordinate = Math.ceil(i.coordinate), this.previousLogicalScroll[i.dimension] = this.wrapLogicalCoordinate(i.coordinate, o);
58
- const l = this.toPhysicalCoordinate(i.coordinate, o);
59
- this.previousScroll[i.dimension] = this.wrapPhysicalCoordinate(l, o), this.preventArtificialScroll[i.dimension] = null, this.cfg.applyScroll(Object.assign(Object.assign({}, i), { coordinate: l }));
60
- } catch (o) {
61
- window.cancelAnimationFrame(o);
62
- }
63
- }
64
- async setScrollByDelta(i, t) {
65
- var o;
66
- const l = this.getParams(i.dimension), r = this.previousScroll[i.dimension] === e ? this.toLogicalCoordinate(t, l) : this.previousLogicalScroll[i.dimension], s = this.wrapLogicalCoordinate(r + ((o = i.delta) !== null && o !== void 0 ? o : 0), l), n = Object.assign(Object.assign({}, i), { coordinate: s });
67
- return await this.setScroll(n), n;
68
- }
69
- /**
70
- * On scroll event started
71
- */
72
- scroll(i, t, o = !1, l, r = !1) {
73
- if (this.cancelScroll(t), !o && this.previousScroll[t] === i) {
74
- this.previousScroll[t] = e;
75
- return;
76
- }
77
- const s = this.getParams(t), n = this.toLogicalScrollCoordinate(i, t, s, l);
78
- this.cfg.runScroll({
79
- dimension: t,
80
- coordinate: n,
81
- delta: l,
82
- outside: r
83
- }), this.previousLogicalScroll[t] = n;
84
- }
85
- getParams(i) {
86
- return this.params[i];
87
- }
88
- // check if scroll outside of region to avoid looping
89
- wrapPhysicalCoordinate(i, t) {
90
- return i < 0 ? e : typeof t.maxSize == "number" && i > t.maxSize ? t.maxSize : i;
91
- }
92
- wrapLogicalCoordinate(i, t) {
93
- var o, l;
94
- return i < 0 ? 0 : Math.min(i, (l = (o = t.scrollDimension) === null || o === void 0 ? void 0 : o.logicalScrollSize) !== null && l !== void 0 ? l : i);
95
- }
96
- // prevent already started scroll, performance optimization
97
- cancelScroll(i) {
98
- var t, o;
99
- (o = (t = this.preventArtificialScroll)[i]) === null || o === void 0 || o.call(t), this.preventArtificialScroll[i] = null;
100
- }
101
- toLogicalScrollCoordinate(i, t, o, l) {
102
- const r = o.scrollDimension;
103
- if (!r)
104
- return i;
105
- if (typeof l == "number" && r.isCompressed) {
106
- const s = this.previousScroll[t] === e ? r.toLogicalCoordinate(i - l) : this.previousLogicalScroll[t];
107
- return r.toLogicalCoordinate(r.toPhysicalCoordinate(s + l));
108
- }
109
- return r.toLogicalCoordinate(i);
110
- }
111
- toPhysicalCoordinate(i, t) {
112
- var o, l;
113
- return (l = (o = t.scrollDimension) === null || o === void 0 ? void 0 : o.toPhysicalCoordinate(i)) !== null && l !== void 0 ? l : i;
114
- }
115
- toLogicalCoordinate(i, t) {
116
- var o, l;
117
- return (l = (o = t.scrollDimension) === null || o === void 0 ? void 0 : o.toLogicalCoordinate(i)) !== null && l !== void 0 ? l : i;
118
- }
119
- }
120
- class p {
121
- constructor(i = 10) {
122
- this.scrollThrottling = i, this.mouseWheelScrollTimestamp = {
123
- rgCol: 0,
124
- rgRow: 0
125
- }, this.lastKnownScrollCoordinate = {
126
- rgCol: 0,
127
- rgRow: 0
128
- }, this.lastScrollUpdateCallbacks = {};
129
- }
130
- setCoordinate(i) {
131
- this.lastKnownScrollCoordinate[i.dimension] = i.coordinate;
132
- }
133
- /**
134
- * Remember last mw event time
135
- */
136
- latestScrollUpdate(i) {
137
- this.mouseWheelScrollTimestamp[i] = (/* @__PURE__ */ new Date()).getTime();
138
- }
139
- isReady(i, t) {
140
- return this.lastScrollUpdateCallbacks[i] && this.clearLastScrollUpdate(i), this.verifyChange(i, t);
141
- }
142
- verifyChange(i, t) {
143
- return (/* @__PURE__ */ new Date()).getTime() - this.mouseWheelScrollTimestamp[i] > this.scrollThrottling && t !== this.lastKnownScrollCoordinate[i];
144
- }
145
- clearLastScrollUpdate(i) {
146
- var t, o;
147
- clearTimeout((o = (t = this.lastScrollUpdateCallbacks[i]) === null || t === void 0 ? void 0 : t.timeout) !== null && o !== void 0 ? o : 0), delete this.lastScrollUpdateCallbacks[i];
148
- }
149
- throttleLastScrollUpdate(i, t, o) {
150
- if (this.scrollThrottling) {
151
- this.clearLastScrollUpdate(i);
152
- const l = this.lastScrollUpdateCallbacks[i] = {
153
- callback: o,
154
- timestamp: (/* @__PURE__ */ new Date()).getTime(),
155
- coordinate: t,
156
- timeout: 0
157
- };
158
- l.timeout = setTimeout(() => {
159
- this.clearLastScrollUpdate(i), this.mouseWheelScrollTimestamp[i] < l.timestamp && this.verifyChange(i, l.coordinate) && l.callback();
160
- }, this.scrollThrottling + 50);
161
- }
162
- }
163
- }
164
- var m = "Expected a function";
165
- function f(a, i, t) {
166
- var o = !0, l = !0;
167
- if (typeof a != "function")
168
- throw new TypeError(m);
169
- return g(t) && (o = "leading" in t ? !!t.leading : o, l = "trailing" in t ? !!t.trailing : l), d(a, i, {
170
- leading: o,
171
- maxWait: i,
172
- trailing: l
173
- });
174
- }
175
- export {
176
- p as L,
177
- C as a,
178
- v as g,
179
- f as t
180
- };