@pacem/pacem 1.0.0-bernoulli → 1.0.0-bessel
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 +3 -3
- package/dist/browser/pacem-2d.js +1 -1
- package/dist/browser/pacem-2d.min.js +1 -2
- package/dist/browser/pacem-3d.js +1 -1
- package/dist/browser/pacem-3d.min.js +1 -2
- package/dist/browser/pacem-charts.js +1 -1
- package/dist/browser/pacem-charts.min.js +1 -2
- package/dist/browser/pacem-cms.js +1 -1
- package/dist/browser/pacem-cms.min.js +1 -2
- package/dist/browser/pacem-core.js +50 -24
- package/dist/browser/pacem-core.js.map +1 -1
- package/dist/browser/pacem-core.min.js +2 -3
- package/dist/browser/pacem-foundation.js +1 -1
- package/dist/browser/pacem-foundation.min.js +1 -2
- package/dist/browser/pacem-fx.js +1 -1
- package/dist/browser/pacem-fx.min.js +1 -2
- package/dist/browser/pacem-logging.js +1 -1
- package/dist/browser/pacem-logging.min.js +1 -2
- package/dist/browser/pacem-maps.js +1 -1
- package/dist/browser/pacem-maps.min.js +1 -2
- package/dist/browser/pacem-media.js +1 -1
- package/dist/browser/pacem-media.min.js +1 -2
- package/dist/browser/pacem-networking.js +1 -1
- package/dist/browser/pacem-networking.min.js +1 -2
- package/dist/browser/pacem-numerical.js +1 -1
- package/dist/browser/pacem-numerical.min.js +1 -2
- package/dist/browser/pacem-plus.js +188 -74
- package/dist/browser/pacem-plus.js.map +1 -1
- package/dist/browser/pacem-plus.min.js +2 -3
- package/dist/browser/pacem-scaffolding.js +1 -1
- package/dist/browser/pacem-scaffolding.min.js +1 -2
- package/dist/browser/pacem-ui.js +24 -2
- package/dist/browser/pacem-ui.js.map +1 -1
- package/dist/browser/pacem-ui.min.js +2 -3
- package/dist/bundle/pacem.min.mjs +184 -184
- package/dist/bundle/pacem.mjs +359 -215
- package/dist/bundle/pacem.mjs.map +4 -4
- package/dist/typings/index.d.ts +64 -11
- package/dist/vscode.html-custom.json +33 -0
- package/package.json +1 -1
- package/dist/browser/pacem-2d.min.js.map +0 -1
- package/dist/browser/pacem-3d.min.js.map +0 -1
- package/dist/browser/pacem-charts.min.js.map +0 -1
- package/dist/browser/pacem-cms.min.js.map +0 -1
- package/dist/browser/pacem-core.min.js.map +0 -1
- package/dist/browser/pacem-foundation.min.js.map +0 -1
- package/dist/browser/pacem-fx.min.js.map +0 -1
- package/dist/browser/pacem-logging.min.js.map +0 -1
- package/dist/browser/pacem-maps.min.js.map +0 -1
- package/dist/browser/pacem-media.min.js.map +0 -1
- package/dist/browser/pacem-networking.min.js.map +0 -1
- package/dist/browser/pacem-numerical.min.js.map +0 -1
- package/dist/browser/pacem-plus.min.js.map +0 -1
- package/dist/browser/pacem-scaffolding.min.js.map +0 -1
- package/dist/browser/pacem-ui.min.js.map +0 -1
package/dist/bundle/pacem.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @pacem/pacem v1.0.0-
|
|
2
|
+
* @pacem/pacem v1.0.0-bessel (https://js.pacem.it)
|
|
3
3
|
* Pacem (https://pacem.it)
|
|
4
4
|
* Licensed under Apache-2.0
|
|
5
5
|
*/
|
|
@@ -5500,6 +5500,13 @@ var Utils4 = class _Utils {
|
|
|
5500
5500
|
static set scrollLeft(x) {
|
|
5501
5501
|
window.scrollTo(x, _Utils.scrollTop);
|
|
5502
5502
|
}
|
|
5503
|
+
static scrollTo(x, y = true, smooth = true) {
|
|
5504
|
+
const yFirst = _Utils.isNull(y) || typeof y === "boolean";
|
|
5505
|
+
const left = yFirst ? _Utils.scrollLeft : x;
|
|
5506
|
+
const top = yFirst ? x : y;
|
|
5507
|
+
const behavior = (yFirst ? y : smooth) ? "smooth" : "instant";
|
|
5508
|
+
window.scrollTo({ behavior, left, top });
|
|
5509
|
+
}
|
|
5503
5510
|
static get scrollTop() {
|
|
5504
5511
|
return window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
5505
5512
|
}
|
|
@@ -6597,6 +6604,18 @@ var PropertyChangeEvent = class extends CustomTypedEvent {
|
|
|
6597
6604
|
super(PropertyChangeEventName, args);
|
|
6598
6605
|
}
|
|
6599
6606
|
};
|
|
6607
|
+
var RouterNavigatingEventName = "navigating";
|
|
6608
|
+
var RouterNavigateEventName = "navigate";
|
|
6609
|
+
var RouterNavigateEvent = class extends CustomTypedEvent {
|
|
6610
|
+
constructor(path) {
|
|
6611
|
+
super(RouterNavigateEventName, typeof path === "string" ? { path } : path, { cancelable: false, bubbles: false });
|
|
6612
|
+
}
|
|
6613
|
+
};
|
|
6614
|
+
var RouterNavigatingEvent = class extends CustomTypedEvent {
|
|
6615
|
+
constructor(path) {
|
|
6616
|
+
super(RouterNavigatingEventName, path, { cancelable: true, bubbles: false });
|
|
6617
|
+
}
|
|
6618
|
+
};
|
|
6600
6619
|
|
|
6601
6620
|
// packages/core/src/adapter.ts
|
|
6602
6621
|
var CurrentIndexChangeEvent = class extends CustomTypedEvent {
|
|
@@ -9876,6 +9895,7 @@ __export(index_components_exports, {
|
|
|
9876
9895
|
PacemRotateElement: () => PacemRotateElement,
|
|
9877
9896
|
PacemRouterElement: () => PacemRouterElement,
|
|
9878
9897
|
PacemRouterHashStateElement: () => PacemRouterHashStateElement,
|
|
9898
|
+
PacemRouterViewScrollElement: () => PacemRouterViewScrollElement,
|
|
9879
9899
|
PacemSafeContentElement: () => PacemSafeContentElement,
|
|
9880
9900
|
PacemScrollAwareElement: () => PacemScrollAwareElement,
|
|
9881
9901
|
PacemSearchElement: () => PacemSearchElement,
|
|
@@ -9903,10 +9923,6 @@ __export(index_components_exports, {
|
|
|
9903
9923
|
RepeaterItemRemoveEventName: () => RepeaterItemRemoveEventName,
|
|
9904
9924
|
ResizeEvent: () => ResizeEvent,
|
|
9905
9925
|
ResizeEventName: () => ResizeEventName,
|
|
9906
|
-
RouterNavigateEvent: () => RouterNavigateEvent,
|
|
9907
|
-
RouterNavigateEventName: () => RouterNavigateEventName,
|
|
9908
|
-
RouterNavigatingEvent: () => RouterNavigatingEvent,
|
|
9909
|
-
RouterNavigatingEventName: () => RouterNavigatingEventName,
|
|
9910
9926
|
Scaffolding: () => index_components_scaffolding_exports,
|
|
9911
9927
|
ScrollEvent: () => ScrollEvent,
|
|
9912
9928
|
ScrollEventName: () => ScrollEventName,
|
|
@@ -12066,18 +12082,6 @@ PacemResizeElement = __decorateClass([
|
|
|
12066
12082
|
], PacemResizeElement);
|
|
12067
12083
|
|
|
12068
12084
|
// packages/core/src/components/basic/router.ts
|
|
12069
|
-
var RouterNavigatingEventName = "navigating";
|
|
12070
|
-
var RouterNavigateEventName = "navigate";
|
|
12071
|
-
var RouterNavigateEvent = class extends CustomTypedEvent {
|
|
12072
|
-
constructor(path) {
|
|
12073
|
-
super(RouterNavigateEventName, typeof path === "string" ? { path } : path, { cancelable: false, bubbles: false });
|
|
12074
|
-
}
|
|
12075
|
-
};
|
|
12076
|
-
var RouterNavigatingEvent = class extends CustomTypedEvent {
|
|
12077
|
-
constructor(path) {
|
|
12078
|
-
super(RouterNavigatingEventName, path, { cancelable: true, bubbles: false });
|
|
12079
|
-
}
|
|
12080
|
-
};
|
|
12081
12085
|
var CHECK_PATTERN = /^([\w\.]:)?\/\/[^\/]+/;
|
|
12082
12086
|
var _cancelingNavigation, _template;
|
|
12083
12087
|
var PacemRouterElement = class extends PacemEventTarget {
|
|
@@ -12085,9 +12089,18 @@ var PacemRouterElement = class extends PacemEventTarget {
|
|
|
12085
12089
|
super(...arguments);
|
|
12086
12090
|
__privateAdd(this, _cancelingNavigation);
|
|
12087
12091
|
__privateAdd(this, _template);
|
|
12092
|
+
this._onScroll = (e) => {
|
|
12093
|
+
const scrollRestoration = this.scrollRestoration ?? true;
|
|
12094
|
+
if (!scrollRestoration) {
|
|
12095
|
+
return;
|
|
12096
|
+
}
|
|
12097
|
+
const y = Math.floor(Utils4.scrollTop);
|
|
12098
|
+
window.history.replaceState(Utils4.extend({}, window.history.state, { $scrollY: y }), document.title);
|
|
12099
|
+
};
|
|
12088
12100
|
this._onPopState = (evt) => {
|
|
12089
12101
|
if (!Utils4.isNull(evt.state) && !__privateGet(this, _cancelingNavigation)) {
|
|
12090
|
-
|
|
12102
|
+
const state = evt.state;
|
|
12103
|
+
this.path = state.$path;
|
|
12091
12104
|
}
|
|
12092
12105
|
};
|
|
12093
12106
|
}
|
|
@@ -12128,12 +12141,13 @@ var PacemRouterElement = class extends PacemEventTarget {
|
|
|
12128
12141
|
this.path = from;
|
|
12129
12142
|
return;
|
|
12130
12143
|
}
|
|
12131
|
-
|
|
12144
|
+
const newState = !poppingState ? Utils4.extend({ $scrollY: 0 }, state) : Utils4.extend({ $scrollY: 0 }, window.history.state, state);
|
|
12145
|
+
this.state = newState;
|
|
12146
|
+
window.history.scrollRestoration = this.scrollRestoration ?? true ? "manual" : "auto";
|
|
12132
12147
|
if (poppingState) {
|
|
12133
|
-
window.history.
|
|
12134
|
-
window.history.replaceState(state, title);
|
|
12148
|
+
window.history.replaceState(newState, document.title);
|
|
12135
12149
|
} else {
|
|
12136
|
-
window.history.pushState(
|
|
12150
|
+
window.history.pushState(newState, title, path);
|
|
12137
12151
|
}
|
|
12138
12152
|
if (!Utils4.isNullOrEmpty(title)) {
|
|
12139
12153
|
document.title = title;
|
|
@@ -12158,6 +12172,7 @@ var PacemRouterElement = class extends PacemEventTarget {
|
|
|
12158
12172
|
connectedCallback() {
|
|
12159
12173
|
super.connectedCallback();
|
|
12160
12174
|
window.addEventListener("popstate", this._onPopState, false);
|
|
12175
|
+
document.addEventListener("scroll", this._onScroll, false);
|
|
12161
12176
|
}
|
|
12162
12177
|
viewActivatedCallback() {
|
|
12163
12178
|
super.viewActivatedCallback();
|
|
@@ -12167,6 +12182,7 @@ var PacemRouterElement = class extends PacemEventTarget {
|
|
|
12167
12182
|
}
|
|
12168
12183
|
}
|
|
12169
12184
|
disconnectedCallback() {
|
|
12185
|
+
document.removeEventListener("scroll", this._onScroll, false);
|
|
12170
12186
|
window.removeEventListener("popstate", this._onPopState, false);
|
|
12171
12187
|
super.disconnectedCallback();
|
|
12172
12188
|
}
|
|
@@ -12222,6 +12238,9 @@ __decorateClass([
|
|
|
12222
12238
|
__decorateClass([
|
|
12223
12239
|
Watch({ emit: false, converter: PropertyConverters.String })
|
|
12224
12240
|
], PacemRouterElement.prototype, "path", 2);
|
|
12241
|
+
__decorateClass([
|
|
12242
|
+
Watch({ emit: false, reflectBack: true, converter: PropertyConverters.Boolean })
|
|
12243
|
+
], PacemRouterElement.prototype, "scrollRestoration", 2);
|
|
12225
12244
|
PacemRouterElement = __decorateClass([
|
|
12226
12245
|
CustomElement({ tagName: P + "-router" })
|
|
12227
12246
|
], PacemRouterElement);
|
|
@@ -20374,7 +20393,7 @@ PacemVibrateElement = __decorateClass([
|
|
|
20374
20393
|
], PacemVibrateElement);
|
|
20375
20394
|
|
|
20376
20395
|
// packages/ui/src/view.ts
|
|
20377
|
-
import { P as P41, CustomElement as CustomElement40, Watch as Watch41, PacemEventTarget as PacemEventTarget11, Components as Components37, Utils as Utils48, PropertyConverters as PropertyConverters39, Logging as Logging7 } from "@pacem/pacem-core";
|
|
20396
|
+
import { P as P41, CustomElement as CustomElement40, Watch as Watch41, PacemEventTarget as PacemEventTarget11, Components as Components37, Utils as Utils48, PropertyConverters as PropertyConverters39, Logging as Logging7, CustomElementUtils as CustomElementUtils12 } from "@pacem/pacem-core";
|
|
20378
20397
|
var ANIM_TIMEOUT = 500;
|
|
20379
20398
|
var ElementOrStringPropertyConverter = {
|
|
20380
20399
|
convert: (attr, element) => {
|
|
@@ -20387,7 +20406,7 @@ var ElementOrStringPropertyConverter = {
|
|
|
20387
20406
|
convertBack: (prop) => prop instanceof Element && prop.id ? "#" + prop.id : prop,
|
|
20388
20407
|
retryConversionWhenReady: true
|
|
20389
20408
|
};
|
|
20390
|
-
var _aborter2;
|
|
20409
|
+
var _aborter2, _resizeHandle;
|
|
20391
20410
|
var PacemViewElement = class extends PacemEventTarget11 {
|
|
20392
20411
|
constructor() {
|
|
20393
20412
|
super(...arguments);
|
|
@@ -20396,6 +20415,22 @@ var PacemViewElement = class extends PacemEventTarget11 {
|
|
|
20396
20415
|
this._setTmpl(tmplProxy.target);
|
|
20397
20416
|
};
|
|
20398
20417
|
__privateAdd(this, _aborter2);
|
|
20418
|
+
__privateAdd(this, _resizeHandle);
|
|
20419
|
+
this._debounceDispatchHandler = (e) => {
|
|
20420
|
+
clearTimeout(__privateGet(this, _resizeHandle));
|
|
20421
|
+
__privateSet(this, _resizeHandle, setTimeout(
|
|
20422
|
+
() => {
|
|
20423
|
+
if (e) {
|
|
20424
|
+
const resizer = e.srcElement;
|
|
20425
|
+
resizer.removeEventListener(Components37.ResizeEventName, this._debounceDispatchHandler);
|
|
20426
|
+
resizer.remove();
|
|
20427
|
+
}
|
|
20428
|
+
this.dispatchEvent(new CustomEvent("render"));
|
|
20429
|
+
},
|
|
20430
|
+
100
|
|
20431
|
+
/* tenth of a second limit */
|
|
20432
|
+
));
|
|
20433
|
+
};
|
|
20399
20434
|
}
|
|
20400
20435
|
propertyChangedCallback(name, old, val, first) {
|
|
20401
20436
|
super.propertyChangedCallback(name, old, val, first);
|
|
@@ -20454,6 +20489,7 @@ var PacemViewElement = class extends PacemEventTarget11 {
|
|
|
20454
20489
|
_setTmpl(tmpl) {
|
|
20455
20490
|
cancelAnimationFrame(this._renderHandle);
|
|
20456
20491
|
this.innerHTML = "";
|
|
20492
|
+
this._dispatchPrerender();
|
|
20457
20493
|
this._renderHandle = requestAnimationFrame(() => {
|
|
20458
20494
|
if (Utils48.isNull(tmpl)) {
|
|
20459
20495
|
this.log(Logging7.LogLevel.Error, `Template element not found.`);
|
|
@@ -20514,6 +20550,7 @@ var PacemViewElement = class extends PacemEventTarget11 {
|
|
|
20514
20550
|
cancelAnimationFrame(this._renderHandle);
|
|
20515
20551
|
this.scrollTo({ top: 0, left: 0, behavior: "instant" });
|
|
20516
20552
|
this.innerHTML = "";
|
|
20553
|
+
this._dispatchPrerender();
|
|
20517
20554
|
this._renderHandle = requestAnimationFrame(() => {
|
|
20518
20555
|
this.innerHTML = result;
|
|
20519
20556
|
this.fetching = false;
|
|
@@ -20524,10 +20561,18 @@ var PacemViewElement = class extends PacemEventTarget11 {
|
|
|
20524
20561
|
});
|
|
20525
20562
|
}
|
|
20526
20563
|
_dispatchRender() {
|
|
20527
|
-
|
|
20564
|
+
const resizer = new Components37.PacemResizeElement();
|
|
20565
|
+
resizer.target = this;
|
|
20566
|
+
resizer.addEventListener(Components37.ResizeEventName, this._debounceDispatchHandler);
|
|
20567
|
+
CustomElementUtils12.findAncestorShell(this).appendChild(resizer);
|
|
20568
|
+
this._debounceDispatchHandler();
|
|
20569
|
+
}
|
|
20570
|
+
_dispatchPrerender() {
|
|
20571
|
+
this.dispatchEvent(new CustomEvent("prerender"));
|
|
20528
20572
|
}
|
|
20529
20573
|
};
|
|
20530
20574
|
_aborter2 = new WeakMap();
|
|
20575
|
+
_resizeHandle = new WeakMap();
|
|
20531
20576
|
__decorateClass([
|
|
20532
20577
|
Watch41({ reflectBack: true, converter: ElementOrStringPropertyConverter })
|
|
20533
20578
|
], PacemViewElement.prototype, "url", 2);
|
|
@@ -20553,7 +20598,7 @@ PacemViewElement = __decorateClass([
|
|
|
20553
20598
|
], PacemViewElement);
|
|
20554
20599
|
|
|
20555
20600
|
// packages/ui/src/window.ts
|
|
20556
|
-
import { P as P42, PCSS as PCSS28, CustomElement as CustomElement41, Watch as Watch42, Components as Components38, UI as UI5, Utils as Utils49, PropertyConverters as PropertyConverters40, Defaults as Defaults12, CustomElementUtils as
|
|
20601
|
+
import { P as P42, PCSS as PCSS28, CustomElement as CustomElement41, Watch as Watch42, Components as Components38, UI as UI5, Utils as Utils49, PropertyConverters as PropertyConverters40, Defaults as Defaults12, CustomElementUtils as CustomElementUtils13, PropertyChangeEventName as PropertyChangeEventName4 } from "@pacem/pacem-core";
|
|
20557
20602
|
var HANDLE_CSS = "window-title";
|
|
20558
20603
|
var PacemWindowAreaElement = class extends Components38.PacemIterativeElement {
|
|
20559
20604
|
constructor() {
|
|
@@ -20594,7 +20639,7 @@ var PacemWindowAreaElement = class extends Components38.PacemIterativeElement {
|
|
|
20594
20639
|
}
|
|
20595
20640
|
connectedCallback() {
|
|
20596
20641
|
super.connectedCallback();
|
|
20597
|
-
let shell =
|
|
20642
|
+
let shell = CustomElementUtils13.findAncestorShell(this);
|
|
20598
20643
|
this._behaviors = [
|
|
20599
20644
|
shell.appendChild(this._dragDrop = document.createElement(P42 + "-drag-drop")),
|
|
20600
20645
|
shell.appendChild(this._rescale = document.createElement(P42 + "-rescale"))
|
|
@@ -20829,10 +20874,10 @@ import { CustomTypedEvent as CustomTypedEvent7, CustomEventUtils as CustomEventU
|
|
|
20829
20874
|
import { HistoryService as HistoryService3 } from "@pacem/pacem-foundation";
|
|
20830
20875
|
|
|
20831
20876
|
// packages/scaffolding/src/types-components.ts
|
|
20832
|
-
import { P as P44, PCSS as PCSS30, CustomElementUtils as
|
|
20877
|
+
import { P as P44, PCSS as PCSS30, CustomElementUtils as CustomElementUtils15, Utils as Utils51, Components as Components40, PropertyConverters as PropertyConverters42, CustomElement as CustomElement43, Watch as Watch44, stopPropagationHandler as stopPropagationHandler5, DefaultComparer as DefaultComparer2, PropertyChangeEventName as PropertyChangeEventName6, Debounce as Debounce8 } from "@pacem/pacem-core";
|
|
20833
20878
|
|
|
20834
20879
|
// packages/scaffolding/src/form.ts
|
|
20835
|
-
import { P as P43, PCSS as PCSS29, CustomElement as CustomElement42, Watch as Watch43, Utils as Utils50, PropertyConverters as PropertyConverters41, CustomTypedEvent as CustomTypedEvent6, CommandEventName as CommandEventName2, Components as Components39, Net as Net5, Debounce as Debounce7, avoidHandler as avoidHandler7, PropertyChangeEvent as PropertyChangeEvent9, PropertyChangeEventName as PropertyChangeEventName5, DeferPromise as DeferPromise2, Logging as Logging8, CustomElementUtils as
|
|
20880
|
+
import { P as P43, PCSS as PCSS29, CustomElement as CustomElement42, Watch as Watch43, Utils as Utils50, PropertyConverters as PropertyConverters41, CustomTypedEvent as CustomTypedEvent6, CommandEventName as CommandEventName2, Components as Components39, Net as Net5, Debounce as Debounce7, avoidHandler as avoidHandler7, PropertyChangeEvent as PropertyChangeEvent9, PropertyChangeEventName as PropertyChangeEventName5, DeferPromise as DeferPromise2, Logging as Logging8, CustomElementUtils as CustomElementUtils14 } from "@pacem/pacem-core";
|
|
20836
20881
|
var FormSubmitEventName = "submit";
|
|
20837
20882
|
var FormResetEventName = "reset";
|
|
20838
20883
|
var FormSubmitEvent = class extends CustomTypedEvent6 {
|
|
@@ -20868,7 +20913,7 @@ var FormEventEmitter = class {
|
|
|
20868
20913
|
var PacemFormRelevantElement = class extends Components39.PacemElement {
|
|
20869
20914
|
viewActivatedCallback() {
|
|
20870
20915
|
super.viewActivatedCallback();
|
|
20871
|
-
this.form =
|
|
20916
|
+
this.form = CustomElementUtils14.findAncestorOfType(this, PacemFormElement);
|
|
20872
20917
|
}
|
|
20873
20918
|
};
|
|
20874
20919
|
__decorateClass([
|
|
@@ -21482,10 +21527,10 @@ var _PacemModelElement = class _PacemModelElement extends PacemFormRelevantEleme
|
|
|
21482
21527
|
super.disconnectedCallback();
|
|
21483
21528
|
}
|
|
21484
21529
|
get originalValue() {
|
|
21485
|
-
return
|
|
21530
|
+
return CustomElementUtils15.getAttachedPropertyValue(this, ORIGINAL_VALUE_FIELD);
|
|
21486
21531
|
}
|
|
21487
21532
|
_setAsOriginalValue(v) {
|
|
21488
|
-
|
|
21533
|
+
CustomElementUtils15.setAttachedPropertyValue(this, ORIGINAL_VALUE_FIELD, v);
|
|
21489
21534
|
}
|
|
21490
21535
|
reset() {
|
|
21491
21536
|
this.value = this.originalValue;
|
|
@@ -21716,7 +21761,7 @@ var PacemItemElement2 = class extends Components40.PacemElement {
|
|
|
21716
21761
|
#container;
|
|
21717
21762
|
/** @overridable */
|
|
21718
21763
|
findContainer() {
|
|
21719
|
-
return
|
|
21764
|
+
return CustomElementUtils15.findAncestor(this, (n) => n instanceof PacemItemsContainerBaseElement);
|
|
21720
21765
|
}
|
|
21721
21766
|
get container() {
|
|
21722
21767
|
return this.#container;
|
|
@@ -23284,7 +23329,7 @@ PacemContenteditableWrapCommandElement = __decorateClass([
|
|
|
23284
23329
|
], PacemContenteditableWrapCommandElement);
|
|
23285
23330
|
|
|
23286
23331
|
// packages/scaffolding/src/calendar-picker.ts
|
|
23287
|
-
import { Components as Components43, CustomElement as CustomElement53, CustomElementUtils as
|
|
23332
|
+
import { Components as Components43, CustomElement as CustomElement53, CustomElementUtils as CustomElementUtils17, CustomEventUtils as CustomEventUtils4, Defaults as Defaults22, P as P55, PCSS as PCSS36, PropertyConverters as PropertyConverters51, stopPropagationHandler as stopPropagationHandler7, Utils as Utils63, ViewChild as ViewChild24, Watch as Watch54 } from "@pacem/pacem-core";
|
|
23288
23333
|
import { Components as ComponentsUI } from "@pacem/pacem-ui";
|
|
23289
23334
|
var JsonOrStringConverter = {
|
|
23290
23335
|
convert: (attr, el) => {
|
|
@@ -23516,7 +23561,7 @@ var PacemCalendarPickerElement = class extends PacemBaseElement {
|
|
|
23516
23561
|
monthPicker.behaviors.push(swiper);
|
|
23517
23562
|
yearPicker.behaviors.push(swiper);
|
|
23518
23563
|
swiper.addEventListener("swipe", this._swipeHandler, false);
|
|
23519
|
-
const body =
|
|
23564
|
+
const body = CustomElementUtils17.findAncestorShell(this);
|
|
23520
23565
|
this._swiper = body.appendChild(swiper);
|
|
23521
23566
|
}
|
|
23522
23567
|
disconnectedCallback() {
|
|
@@ -24411,7 +24456,7 @@ PacemDatetimePickerElement = __decorateClass([
|
|
|
24411
24456
|
], PacemDatetimePickerElement);
|
|
24412
24457
|
|
|
24413
24458
|
// packages/scaffolding/src/formfield.ts
|
|
24414
|
-
import { Logging as Logging10, PropertyConverters as PropertyConverters56, Net as Net8, Utils as Utils69, P as P61, PCSS as PCSS42, CustomElement as CustomElement59, Watch as Watch59, PropertyChangeEvent as PropertyChangeEvent14, PropertyChangeEventName as PropertyChangeEventName10, ViewChild as ViewChild30, CustomElementUtils as
|
|
24459
|
+
import { Logging as Logging10, PropertyConverters as PropertyConverters56, Net as Net8, Utils as Utils69, P as P61, PCSS as PCSS42, CustomElement as CustomElement59, Watch as Watch59, PropertyChangeEvent as PropertyChangeEvent14, PropertyChangeEventName as PropertyChangeEventName10, ViewChild as ViewChild30, CustomElementUtils as CustomElementUtils18, JsonFunctionConversion as JsonFunctionConversion2 } from "@pacem/pacem-core";
|
|
24415
24460
|
import { Components as ComponentsUI2 } from "@pacem/pacem-ui";
|
|
24416
24461
|
|
|
24417
24462
|
// packages/scaffolding/src/validators.ts
|
|
@@ -24886,7 +24931,7 @@ var PacemFormFieldElement = class extends PacemFormRelevantElement {
|
|
|
24886
24931
|
align: tooltip.align || ComponentsUI2.UI.BalloonAlignment.Auto
|
|
24887
24932
|
};
|
|
24888
24933
|
Utils69.addClass(balloon2, PCSS42 + "-field-tooltip");
|
|
24889
|
-
var shell =
|
|
24934
|
+
var shell = CustomElementUtils18.findAncestorShell(this);
|
|
24890
24935
|
shell.appendChild(this._balloon = balloon2);
|
|
24891
24936
|
}
|
|
24892
24937
|
const balloon = this._balloon;
|
|
@@ -24976,7 +25021,7 @@ var PacemFormFieldElement = class extends PacemFormRelevantElement {
|
|
|
24976
25021
|
if (evt.detail.propertyName === "value") {
|
|
24977
25022
|
const value2 = evt.detail.currentValue, prop = this.metadata.prop;
|
|
24978
25023
|
if (this.entity instanceof HTMLElement) {
|
|
24979
|
-
let attr =
|
|
25024
|
+
let attr = CustomElementUtils18.camelToKebab(prop);
|
|
24980
25025
|
if (Utils69.isNullOrEmpty(value2)) {
|
|
24981
25026
|
this.entity.removeAttribute(attr);
|
|
24982
25027
|
} else {
|
|
@@ -25054,8 +25099,8 @@ var PacemFormFieldElement = class extends PacemFormRelevantElement {
|
|
|
25054
25099
|
}
|
|
25055
25100
|
if (!Utils69.isNullOrEmpty(depAttrs.disabledAttr)) {
|
|
25056
25101
|
disabledAttr = depAttrs.disabledAttr;
|
|
25057
|
-
if (
|
|
25058
|
-
dependingDisabling =
|
|
25102
|
+
if (CustomElementUtils18.isBindingAttribute(disabledAttr)) {
|
|
25103
|
+
dependingDisabling = CustomElementUtils18.extractBindingAttributeExpression(disabledAttr);
|
|
25059
25104
|
}
|
|
25060
25105
|
}
|
|
25061
25106
|
if (!Utils69.isNullOrEmpty(depAttrs.parameterAttrs)) {
|
|
@@ -25932,7 +25977,7 @@ PacemGeolocateElement = __decorateClass([
|
|
|
25932
25977
|
], PacemGeolocateElement);
|
|
25933
25978
|
|
|
25934
25979
|
// packages/scaffolding/src/hierarchy.ts
|
|
25935
|
-
import { Components as Components49, PropertyConverters as PropertyConverters58, Utils as Utils71, P as P63, PCSS as PCSS43, CustomElement as CustomElement61, Watch as Watch61, Defaults as Defaults28, ViewChild as ViewChild32, CustomEventUtils as CustomEventUtils5, CustomElementUtils as
|
|
25980
|
+
import { Components as Components49, PropertyConverters as PropertyConverters58, Utils as Utils71, P as P63, PCSS as PCSS43, CustomElement as CustomElement61, Watch as Watch61, Defaults as Defaults28, ViewChild as ViewChild32, CustomEventUtils as CustomEventUtils5, CustomElementUtils as CustomElementUtils19, avoidHandler as avoidHandler9, UI as UI10 } from "@pacem/pacem-core";
|
|
25936
25981
|
import { Components as ComponentsUI3 } from "@pacem/pacem-ui";
|
|
25937
25982
|
var HierarchyChangeEvent = class extends CustomEvent {
|
|
25938
25983
|
constructor(v) {
|
|
@@ -26047,7 +26092,7 @@ var PacemHierarchyElement = class extends PacemBaseElement {
|
|
|
26047
26092
|
}
|
|
26048
26093
|
viewActivatedCallback() {
|
|
26049
26094
|
super.viewActivatedCallback();
|
|
26050
|
-
__privateSet(this, _shell4,
|
|
26095
|
+
__privateSet(this, _shell4, CustomElementUtils19.findAncestorShell(this));
|
|
26051
26096
|
this._setupItemTemplate();
|
|
26052
26097
|
this._setupDragger();
|
|
26053
26098
|
this._setupBalloon();
|
|
@@ -26420,7 +26465,7 @@ PacemHierarchyElement = __decorateClass([
|
|
|
26420
26465
|
], PacemHierarchyElement);
|
|
26421
26466
|
|
|
26422
26467
|
// packages/scaffolding/src/input.ts
|
|
26423
|
-
import { PropertyConverters as PropertyConverters59, Utils as Utils72, Watch as Watch62, CustomElementUtils as
|
|
26468
|
+
import { PropertyConverters as PropertyConverters59, Utils as Utils72, Watch as Watch62, CustomElementUtils as CustomElementUtils20 } from "@pacem/pacem-core";
|
|
26424
26469
|
var ChangePolicy = /* @__PURE__ */ ((ChangePolicy2) => {
|
|
26425
26470
|
ChangePolicy2["Input"] = "input";
|
|
26426
26471
|
ChangePolicy2["Blur"] = "blur";
|
|
@@ -26502,10 +26547,10 @@ var PacemBaseInputElement = class extends PacemBaseElement {
|
|
|
26502
26547
|
if (!(field instanceof HTMLInputElement) && !(field instanceof HTMLTextAreaElement)) {
|
|
26503
26548
|
continue;
|
|
26504
26549
|
}
|
|
26505
|
-
if (
|
|
26550
|
+
if (CustomElementUtils20.getAttachedPropertyValue(field, INPUT_FIELD_ACTIVATED_PROP, "off") === "on") {
|
|
26506
26551
|
continue;
|
|
26507
26552
|
}
|
|
26508
|
-
|
|
26553
|
+
CustomElementUtils20.setAttachedPropertyValue(field, INPUT_FIELD_ACTIVATED_PROP, "on");
|
|
26509
26554
|
if ("size" in field) {
|
|
26510
26555
|
field.size = 1;
|
|
26511
26556
|
}
|
|
@@ -26520,10 +26565,10 @@ var PacemBaseInputElement = class extends PacemBaseElement {
|
|
|
26520
26565
|
inputFields = [inputFields];
|
|
26521
26566
|
}
|
|
26522
26567
|
for (let field of inputFields ?? []) {
|
|
26523
|
-
if (
|
|
26568
|
+
if (CustomElementUtils20.getAttachedPropertyValue(field, INPUT_FIELD_ACTIVATED_PROP) !== "on") {
|
|
26524
26569
|
continue;
|
|
26525
26570
|
}
|
|
26526
|
-
|
|
26571
|
+
CustomElementUtils20.deleteAttachedPropertyValue(field, INPUT_FIELD_ACTIVATED_PROP);
|
|
26527
26572
|
field.removeEventListener("input", this.changeHandler, false);
|
|
26528
26573
|
field.removeEventListener("focus", this._focusHandler, false);
|
|
26529
26574
|
}
|
|
@@ -28757,7 +28802,7 @@ PacemNameValueListElement = __decorateClass([
|
|
|
28757
28802
|
], PacemNameValueListElement);
|
|
28758
28803
|
|
|
28759
28804
|
// packages/scaffolding/src/property-picker.ts
|
|
28760
|
-
import { P as P79, ViewChild as ViewChild47, CustomElement as CustomElement77, Watch as Watch75, Utils as Utils82, PropertyConverters as PropertyConverters67, Defaults as Defaults44, CustomElementUtils as
|
|
28805
|
+
import { P as P79, ViewChild as ViewChild47, CustomElement as CustomElement77, Watch as Watch75, Utils as Utils82, PropertyConverters as PropertyConverters67, Defaults as Defaults44, CustomElementUtils as CustomElementUtils21 } from "@pacem/pacem-core";
|
|
28761
28806
|
var PacemPropertyPickerElement = class extends PacemBaseElement {
|
|
28762
28807
|
get inputFields() {
|
|
28763
28808
|
return [this._select];
|
|
@@ -28804,7 +28849,7 @@ var PacemPropertyPickerElement = class extends PacemBaseElement {
|
|
|
28804
28849
|
};
|
|
28805
28850
|
let src = this.target;
|
|
28806
28851
|
if (!Utils82.isNull(src)) {
|
|
28807
|
-
let observed =
|
|
28852
|
+
let observed = CustomElementUtils21.getWatchedProperties(src);
|
|
28808
28853
|
for (let obs of observed) {
|
|
28809
28854
|
let name = obs.name;
|
|
28810
28855
|
props.push(name);
|
|
@@ -29345,7 +29390,7 @@ PacemSliderElement = __decorateClass([
|
|
|
29345
29390
|
], PacemSliderElement);
|
|
29346
29391
|
|
|
29347
29392
|
// packages/scaffolding/src/suggest.ts
|
|
29348
|
-
import { CustomTypedEvent as CustomTypedEvent10, CustomElement as CustomElement82, Watch as Watch79, ViewChild as ViewChild52, Defaults as Defaults49, PCSS as PCSS62, P as P84, Components as Components60, PropertyConverters as PropertyConverters71, Utils as Utils87, avoidHandler as avoidHandler15, Logging as Logging12, CustomElementUtils as
|
|
29393
|
+
import { CustomTypedEvent as CustomTypedEvent10, CustomElement as CustomElement82, Watch as Watch79, ViewChild as ViewChild52, Defaults as Defaults49, PCSS as PCSS62, P as P84, Components as Components60, PropertyConverters as PropertyConverters71, Utils as Utils87, avoidHandler as avoidHandler15, Logging as Logging12, CustomElementUtils as CustomElementUtils22 } from "@pacem/pacem-core";
|
|
29349
29394
|
import { Components as ComponentsUI6 } from "@pacem/pacem-ui";
|
|
29350
29395
|
var SuggestionSelectEvent = class extends CustomTypedEvent10 {
|
|
29351
29396
|
constructor(value2) {
|
|
@@ -29523,7 +29568,7 @@ var PacemSuggestElement = class extends PacemDataSourceElement {
|
|
|
29523
29568
|
var balloon = this._createBalloon();
|
|
29524
29569
|
balloon.appendChild(this._repeater);
|
|
29525
29570
|
this._checkBalloon(balloon);
|
|
29526
|
-
const shell =
|
|
29571
|
+
const shell = CustomElementUtils22.findAncestorShell(this);
|
|
29527
29572
|
shell.appendChild(balloon);
|
|
29528
29573
|
this._balloon = balloon;
|
|
29529
29574
|
this._input.addEventListener("mousedown", this._focusHandler, false);
|
|
@@ -30138,7 +30183,7 @@ __export(index_components_charts_exports, {
|
|
|
30138
30183
|
});
|
|
30139
30184
|
|
|
30140
30185
|
// packages/charts/src/types.ts
|
|
30141
|
-
import { CustomElement as CustomElement86, Watch as Watch83, PropertyConverters as PropertyConverters75, P as P88, PCSS as PCSS66, Components as Components63, CustomUIEvent as CustomUIEvent6, CustomElementUtils as
|
|
30186
|
+
import { CustomElement as CustomElement86, Watch as Watch83, PropertyConverters as PropertyConverters75, P as P88, PCSS as PCSS66, Components as Components63, CustomUIEvent as CustomUIEvent6, CustomElementUtils as CustomElementUtils23, Utils as Utils89, Throttle as Throttle3, PropertyChangeEventName as PropertyChangeEventName13 } from "@pacem/pacem-core";
|
|
30142
30187
|
var MANAGED_EVENTS = ["keydown", "keyup", "click", "dblclick", "mouseover", "mouseout", "mouseenter", "mouseleave", "mousedown", "mouseup", "mousemove", "contextmenu"];
|
|
30143
30188
|
var MSECS_PER_DAY2 = 1e3 * 60 * 60 * 24;
|
|
30144
30189
|
var MAX_X_LABELS = 10;
|
|
@@ -30273,13 +30318,13 @@ var PacemSeriesChartElement = class extends Components63.PacemItemsContainerElem
|
|
|
30273
30318
|
// #endregion
|
|
30274
30319
|
this._broadcastHandler = (e) => {
|
|
30275
30320
|
const element = e.currentTarget;
|
|
30276
|
-
const dataItem =
|
|
30321
|
+
const dataItem = CustomElementUtils23.getAttachedPropertyValue(element, SERIES_DATAITEM);
|
|
30277
30322
|
if (Utils89.isNull(dataItem)) {
|
|
30278
30323
|
return;
|
|
30279
30324
|
}
|
|
30280
30325
|
const chart = this, anchorPoint = chart.getAnchorPoint(element);
|
|
30281
30326
|
const evt = new ChartEvent("item" + e.type, { detail: { dataItem, anchorPoint } }, e);
|
|
30282
|
-
const series =
|
|
30327
|
+
const series = CustomElementUtils23.getAttachedPropertyValue(element, SERIES_SERIES);
|
|
30283
30328
|
if (series instanceof PacemChartSeriesElement) {
|
|
30284
30329
|
series.dispatchEvent(evt);
|
|
30285
30330
|
}
|
|
@@ -30366,7 +30411,7 @@ var PacemSeriesChartElement = class extends Components63.PacemItemsContainerElem
|
|
|
30366
30411
|
}
|
|
30367
30412
|
_ensureResizer(target = this.target || this._div) {
|
|
30368
30413
|
if (Utils89.isNull(this._resizer)) {
|
|
30369
|
-
const shell =
|
|
30414
|
+
const shell = CustomElementUtils23.findAncestorShell(this);
|
|
30370
30415
|
const resizer = this._resizer = shell.appendChild(new Components63.PacemResizeElement());
|
|
30371
30416
|
resizer.addEventListener(Components63.ResizeEventName, this._resizeHandler, false);
|
|
30372
30417
|
}
|
|
@@ -30395,10 +30440,10 @@ var PacemSeriesChartElement = class extends Components63.PacemItemsContainerElem
|
|
|
30395
30440
|
return this._div;
|
|
30396
30441
|
}
|
|
30397
30442
|
assignUiBehaviors(ui, series, data, color) {
|
|
30398
|
-
const alreadyRegistered = !Utils89.isNull(
|
|
30443
|
+
const alreadyRegistered = !Utils89.isNull(CustomElementUtils23.getAttachedPropertyValue(ui, SERIES_DATAITEM));
|
|
30399
30444
|
const item = Utils89.extend({ series: series.label, color: color || series.color }, data);
|
|
30400
|
-
|
|
30401
|
-
|
|
30445
|
+
CustomElementUtils23.setAttachedPropertyValue(ui, SERIES_DATAITEM, item);
|
|
30446
|
+
CustomElementUtils23.setAttachedPropertyValue(ui, SERIES_SERIES, series);
|
|
30402
30447
|
if (!alreadyRegistered) {
|
|
30403
30448
|
MANAGED_EVENTS.forEach((type) => {
|
|
30404
30449
|
ui.addEventListener(type, this._broadcastHandler);
|
|
@@ -30406,8 +30451,8 @@ var PacemSeriesChartElement = class extends Components63.PacemItemsContainerElem
|
|
|
30406
30451
|
}
|
|
30407
30452
|
}
|
|
30408
30453
|
disposeUiBehaviors(ui) {
|
|
30409
|
-
|
|
30410
|
-
|
|
30454
|
+
CustomElementUtils23.deleteAttachedPropertyValue(ui, SERIES_DATAITEM);
|
|
30455
|
+
CustomElementUtils23.deleteAttachedPropertyValue(ui, SERIES_SERIES);
|
|
30411
30456
|
MANAGED_EVENTS.forEach((type) => {
|
|
30412
30457
|
ui.removeEventListener(type, this._broadcastHandler);
|
|
30413
30458
|
});
|
|
@@ -30603,7 +30648,7 @@ __decorateClass([
|
|
|
30603
30648
|
], PacemSeriesChartElement.prototype, "draw", 1);
|
|
30604
30649
|
|
|
30605
30650
|
// packages/charts/src/generic.ts
|
|
30606
|
-
import { CustomElement as CustomElement87, Watch as Watch84, PropertyConverters as PropertyConverters76, P as P89, PCSS as PCSS67, Utils as Utils90, CustomElementUtils as
|
|
30651
|
+
import { CustomElement as CustomElement87, Watch as Watch84, PropertyConverters as PropertyConverters76, P as P89, PCSS as PCSS67, Utils as Utils90, CustomElementUtils as CustomElementUtils24, Logging as Logging13 } from "@pacem/pacem-core";
|
|
30607
30652
|
function getSplineCtrlPoints(p, p0, p1) {
|
|
30608
30653
|
let c0 = p, c1 = p;
|
|
30609
30654
|
const p0Null = Utils90.isNull(p0), p1Null = Utils90.isNull(p1);
|
|
@@ -30624,9 +30669,9 @@ function getSplineCtrlPoints(p, p0, p1) {
|
|
|
30624
30669
|
}
|
|
30625
30670
|
return { c0, c1 };
|
|
30626
30671
|
}
|
|
30627
|
-
var GET_VAL8 =
|
|
30628
|
-
var SET_VAL8 =
|
|
30629
|
-
var DEL_VAL6 =
|
|
30672
|
+
var GET_VAL8 = CustomElementUtils24.getAttachedPropertyValue;
|
|
30673
|
+
var SET_VAL8 = CustomElementUtils24.setAttachedPropertyValue;
|
|
30674
|
+
var DEL_VAL6 = CustomElementUtils24.deleteAttachedPropertyValue;
|
|
30630
30675
|
var PADDING_PIXELS = 24;
|
|
30631
30676
|
var SERIES_MAGNITUDE = "pacem:chart-series:area";
|
|
30632
30677
|
var SVG_NS2 = "http://www.w3.org/2000/svg";
|
|
@@ -31268,7 +31313,7 @@ PacemColumnChartElement = __decorateClass([
|
|
|
31268
31313
|
], PacemColumnChartElement);
|
|
31269
31314
|
|
|
31270
31315
|
// packages/charts/src/pie.ts
|
|
31271
|
-
import { CustomElement as CustomElement89, Watch as Watch86, PropertyConverters as PropertyConverters78, P as P91, PCSS as PCSS68, Components as Components64, Utils as Utils92, CustomElementUtils as
|
|
31316
|
+
import { CustomElement as CustomElement89, Watch as Watch86, PropertyConverters as PropertyConverters78, P as P91, PCSS as PCSS68, Components as Components64, Utils as Utils92, CustomElementUtils as CustomElementUtils25, Debounce as Debounce12 } from "@pacem/pacem-core";
|
|
31272
31317
|
var PacemPieSliceElement = class extends Components64.PacemItemElement {
|
|
31273
31318
|
constructor() {
|
|
31274
31319
|
super(...arguments);
|
|
@@ -31277,7 +31322,7 @@ var PacemPieSliceElement = class extends Components64.PacemItemElement {
|
|
|
31277
31322
|
};
|
|
31278
31323
|
}
|
|
31279
31324
|
findContainer() {
|
|
31280
|
-
return
|
|
31325
|
+
return CustomElementUtils25.findAncestorOfType(this, PacemPieChartElement);
|
|
31281
31326
|
}
|
|
31282
31327
|
get chart() {
|
|
31283
31328
|
return this.container;
|
|
@@ -31587,7 +31632,7 @@ __export(index_components_maps_exports, {
|
|
|
31587
31632
|
});
|
|
31588
31633
|
|
|
31589
31634
|
// packages/maps/src/types-components.ts
|
|
31590
|
-
import { P as P92, PCSS as PCSS69, CustomElement as CustomElement90, Watch as Watch87, Utils as Utils93, PropertyConverters as PropertyConverters79, CustomTypedEvent as CustomTypedEvent12, PropertyChangeEvent as PropertyChangeEvent18, CustomElementUtils as
|
|
31635
|
+
import { P as P92, PCSS as PCSS69, CustomElement as CustomElement90, Watch as Watch87, Utils as Utils93, PropertyConverters as PropertyConverters79, CustomTypedEvent as CustomTypedEvent12, PropertyChangeEvent as PropertyChangeEvent18, CustomElementUtils as CustomElementUtils26, Debounce as Debounce13, PropertyChangeEventName as PropertyChangeEventName14, PacemEventTarget as PacemEventTarget14 } from "@pacem/pacem-core";
|
|
31591
31636
|
var MapType = /* @__PURE__ */ ((MapType2) => {
|
|
31592
31637
|
MapType2["ROAD"] = "road";
|
|
31593
31638
|
MapType2["SATELLITE"] = "satellite";
|
|
@@ -31673,7 +31718,7 @@ var MapUtils = class {
|
|
|
31673
31718
|
};
|
|
31674
31719
|
var MapRelevantElement = class extends PacemEventTarget14 {
|
|
31675
31720
|
get map() {
|
|
31676
|
-
return this["_map"] = this["_map"] ||
|
|
31721
|
+
return this["_map"] = this["_map"] || CustomElementUtils26.findAncestorOfType(this, PacemMapElement);
|
|
31677
31722
|
}
|
|
31678
31723
|
propertyChangedCallback(name, old, val, first) {
|
|
31679
31724
|
super.propertyChangedCallback(name, old, val, first);
|
|
@@ -32598,7 +32643,7 @@ var PacemMapElement = class extends PacemEventTarget14 {
|
|
|
32598
32643
|
this._initialized = false;
|
|
32599
32644
|
this._afterInit = (_, old) => {
|
|
32600
32645
|
this._initialized = true;
|
|
32601
|
-
for (var child of
|
|
32646
|
+
for (var child of CustomElementUtils26.findDescendants(this, (n) => n instanceof MapRelevantElement)) {
|
|
32602
32647
|
this._erase(child, old);
|
|
32603
32648
|
this._draw(child);
|
|
32604
32649
|
}
|
|
@@ -32920,7 +32965,7 @@ PacemMapGeolocateElement = __decorateClass([
|
|
|
32920
32965
|
], PacemMapGeolocateElement);
|
|
32921
32966
|
|
|
32922
32967
|
// packages/maps/src/azure.ts
|
|
32923
|
-
import { Utils as Utils95, CustomElement as CustomElement92, Watch as Watch89, P as P94, PropertyConverters as PropertyConverters81, CustomElementUtils as
|
|
32968
|
+
import { Utils as Utils95, CustomElement as CustomElement92, Watch as Watch89, P as P94, PropertyConverters as PropertyConverters81, CustomElementUtils as CustomElementUtils27, Debounce as Debounce14 } from "@pacem/pacem-core";
|
|
32924
32969
|
var consts2 = {
|
|
32925
32970
|
TIMEOUT: 1e3,
|
|
32926
32971
|
API_JS: "https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.js",
|
|
@@ -33321,8 +33366,8 @@ var PacemAzureMapAdapterElement = class extends PacemMapAdapterElement {
|
|
|
33321
33366
|
}
|
|
33322
33367
|
async init(container) {
|
|
33323
33368
|
await Promise.all([
|
|
33324
|
-
|
|
33325
|
-
|
|
33369
|
+
CustomElementUtils27.importjs(consts2.API_JS),
|
|
33370
|
+
CustomElementUtils27.importcss(consts2.API_CSS, void 0, true)
|
|
33326
33371
|
]);
|
|
33327
33372
|
const ctrl = container;
|
|
33328
33373
|
const scale = ctrl.scale;
|
|
@@ -33443,7 +33488,7 @@ PacemAzureMapAdapterElement = __decorateClass([
|
|
|
33443
33488
|
], PacemAzureMapAdapterElement);
|
|
33444
33489
|
|
|
33445
33490
|
// packages/maps/src/leaflet.ts
|
|
33446
|
-
import { Utils as Utils96, CustomElement as CustomElement93, Watch as Watch90, P as P95, PropertyConverters as PropertyConverters82, Debounce as Debounce15, CustomTypedEvent as CustomTypedEvent13, CustomElementUtils as
|
|
33491
|
+
import { Utils as Utils96, CustomElement as CustomElement93, Watch as Watch90, P as P95, PropertyConverters as PropertyConverters82, Debounce as Debounce15, CustomTypedEvent as CustomTypedEvent13, CustomElementUtils as CustomElementUtils28 } from "@pacem/pacem-core";
|
|
33447
33492
|
var consts3 = {
|
|
33448
33493
|
API_JS: "https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.min.js",
|
|
33449
33494
|
//'https://unpkg.com/leaflet@1.5.1/dist/leaflet.js',
|
|
@@ -33745,8 +33790,8 @@ var PacemLeafletMapAdapterElement = class extends PacemMapAdapterElement {
|
|
|
33745
33790
|
}
|
|
33746
33791
|
async init(container) {
|
|
33747
33792
|
await Promise.all([
|
|
33748
|
-
|
|
33749
|
-
|
|
33793
|
+
CustomElementUtils28.importjs(consts3.API_JS, consts3.API_JS_INTEGRITY, true),
|
|
33794
|
+
CustomElementUtils28.importcss(consts3.API_CSS, consts3.API_CSS_INTEGRITY, true)
|
|
33750
33795
|
]);
|
|
33751
33796
|
const ctrl = container;
|
|
33752
33797
|
var scale = ctrl.scale;
|
|
@@ -35281,7 +35326,7 @@ PacemFxListElement = __decorateClass([
|
|
|
35281
35326
|
], PacemFxListElement);
|
|
35282
35327
|
|
|
35283
35328
|
// packages/fx/src/gradient.ts
|
|
35284
|
-
import { CustomElement as CustomElement99, Watch as Watch94, PropertyConverters as PropertyConverters86, P as P101, PCSS as PCSS73, Components as Components67, CustomElementUtils as
|
|
35329
|
+
import { CustomElement as CustomElement99, Watch as Watch94, PropertyConverters as PropertyConverters86, P as P101, PCSS as PCSS73, Components as Components67, CustomElementUtils as CustomElementUtils29, Utils as Utils102, Debounce as Debounce17 } from "@pacem/pacem-core";
|
|
35285
35330
|
import { Size as Size3, Colors as Colors5 } from "@pacem/pacem-foundation";
|
|
35286
35331
|
var GradientChangeEventName = "gradientchange";
|
|
35287
35332
|
var GradientChangeEvent = class extends Event {
|
|
@@ -35303,7 +35348,7 @@ function pctFormatter(v) {
|
|
|
35303
35348
|
}
|
|
35304
35349
|
var PacemFxGradientStopElement = class extends Components67.PacemItemElement {
|
|
35305
35350
|
findContainer() {
|
|
35306
|
-
return
|
|
35351
|
+
return CustomElementUtils29.findAncestor(this, (i) => i instanceof PacemFxGradientItemElement);
|
|
35307
35352
|
}
|
|
35308
35353
|
propertyChangedCallback(name, old, val, first) {
|
|
35309
35354
|
super.propertyChangedCallback(name, old, val, first);
|
|
@@ -35658,7 +35703,7 @@ __export(index_components_networking_exports, {
|
|
|
35658
35703
|
});
|
|
35659
35704
|
|
|
35660
35705
|
// packages/networking/src/hub-proxy.ts
|
|
35661
|
-
import { P as P103, CustomElement as CustomElement101, Watch as Watch96, PropertyConverters as PropertyConverters88, Utils as Utils104, PropertyChangeEventName as PropertyChangeEventName15, CustomElementUtils as
|
|
35706
|
+
import { P as P103, CustomElement as CustomElement101, Watch as Watch96, PropertyConverters as PropertyConverters88, Utils as Utils104, PropertyChangeEventName as PropertyChangeEventName15, CustomElementUtils as CustomElementUtils30, Components as Components68 } from "@pacem/pacem-core";
|
|
35662
35707
|
var API_JS = "https://cdn.jsdelivr.net/npm/@microsoft/signalr@10.0.0/dist/browser/signalr.min.js";
|
|
35663
35708
|
var consts5 = { API_JS };
|
|
35664
35709
|
var _streamSubscription;
|
|
@@ -35842,7 +35887,7 @@ var PacemHubProxyElement = class extends Components68.PacemItemsContainerElement
|
|
|
35842
35887
|
if ("signalR" in window) {
|
|
35843
35888
|
return;
|
|
35844
35889
|
}
|
|
35845
|
-
await
|
|
35890
|
+
await CustomElementUtils30.importjs(consts5.API_JS);
|
|
35846
35891
|
}
|
|
35847
35892
|
async _setupProxy() {
|
|
35848
35893
|
const listeners = this.items || [];
|
|
@@ -36331,7 +36376,7 @@ __export(index_components_drawing_exports, {
|
|
|
36331
36376
|
});
|
|
36332
36377
|
|
|
36333
36378
|
// packages/2d/src/drawable-element.ts
|
|
36334
|
-
import { Components as Components71, CustomElementUtils as
|
|
36379
|
+
import { Components as Components71, CustomElementUtils as CustomElementUtils31, PropertyConverters as PropertyConverters93, Watch as Watch101 } from "@pacem/pacem-core";
|
|
36335
36380
|
|
|
36336
36381
|
// packages/2d/src/stage.ts
|
|
36337
36382
|
import { CustomElement as CustomElement105, Watch as Watch100, ViewChild as ViewChild58, Debounce as Debounce19, PCSS as PCSS75, P as P107, Utils as Utils107, PropertyConverters as PropertyConverters92, PropertyChangeEvent as PropertyChangeEvent23, CustomEventUtils as CustomEventUtils9, avoidHandler as avoidHandler16, EventKeyModifier as EventKeyModifier2, Components as Components70 } from "@pacem/pacem-core";
|
|
@@ -36696,10 +36741,10 @@ var _DrawableElement = class _DrawableElement extends Components71.PacemCrossIte
|
|
|
36696
36741
|
return this.parent || this.stage;
|
|
36697
36742
|
}
|
|
36698
36743
|
get stage() {
|
|
36699
|
-
return this["_scene"] = this["_scene"] ||
|
|
36744
|
+
return this["_scene"] = this["_scene"] || CustomElementUtils31.findAncestorOfType(this, Pacem2DElement);
|
|
36700
36745
|
}
|
|
36701
36746
|
get parent() {
|
|
36702
|
-
return this["_drawableParent"] = this["_drawableParent"] ||
|
|
36747
|
+
return this["_drawableParent"] = this["_drawableParent"] || CustomElementUtils31.findAncestor(this, (i) => i instanceof _DrawableElement);
|
|
36703
36748
|
}
|
|
36704
36749
|
disconnectedCallback() {
|
|
36705
36750
|
delete this["_scene"];
|
|
@@ -37555,7 +37600,7 @@ var AdapterUtils = class {
|
|
|
37555
37600
|
};
|
|
37556
37601
|
|
|
37557
37602
|
// packages/2d/src/adapters/canvasadapter.ts
|
|
37558
|
-
import { CustomElement as CustomElement115, P as P117, CustomElementUtils as
|
|
37603
|
+
import { CustomElement as CustomElement115, P as P117, CustomElementUtils as CustomElementUtils32, Utils as Utils118, Logging as Logging15, CustomEventUtils as CustomEventUtils10, UI as UI13, avoidHandler as avoidHandler17 } from "@pacem/pacem-core";
|
|
37559
37604
|
import { Matrix2D as Matrix2D11, Rect as Rect12 } from "@pacem/pacem-foundation";
|
|
37560
37605
|
|
|
37561
37606
|
// packages/2d/src/adapter.ts
|
|
@@ -37580,8 +37625,8 @@ var Pacem2DAdapterElement = class extends PacemEventTarget20 {
|
|
|
37580
37625
|
var CANVAS_SCENE_VAR = "pacem:2d-canvas-scene";
|
|
37581
37626
|
var PARENT_MATRIX_VAR = "pacem:2d-parent-matrix";
|
|
37582
37627
|
var WORLD_MATRIX_VAR = "pacem:2d-world-matrix";
|
|
37583
|
-
var SETVAR =
|
|
37584
|
-
var GETVAR =
|
|
37628
|
+
var SETVAR = CustomElementUtils32.setAttachedPropertyValue;
|
|
37629
|
+
var GETVAR = CustomElementUtils32.getAttachedPropertyValue;
|
|
37585
37630
|
function isNone(fillOrStroke) {
|
|
37586
37631
|
return fillOrStroke === "none" || Utils118.isNullOrEmpty(fillOrStroke);
|
|
37587
37632
|
}
|
|
@@ -37728,7 +37773,7 @@ var PacemCanvasAdapterElement = class extends Pacem2DAdapterElement {
|
|
|
37728
37773
|
const floater = document.createElement("div");
|
|
37729
37774
|
floater.hidden = true;
|
|
37730
37775
|
dragDrop.floater = floater;
|
|
37731
|
-
const shell =
|
|
37776
|
+
const shell = CustomElementUtils32.findAncestorShell(this);
|
|
37732
37777
|
shell.appendChild(dragDrop);
|
|
37733
37778
|
dragDrop.addEventListener(UI13.DragDropEventType.Init, this._dragInitHandler, false);
|
|
37734
37779
|
dragDrop.addEventListener(UI13.DragDropEventType.Drag, this._draggingHandler, false);
|
|
@@ -38129,14 +38174,14 @@ PacemCanvasAdapterElement = __decorateClass([
|
|
|
38129
38174
|
], PacemCanvasAdapterElement);
|
|
38130
38175
|
|
|
38131
38176
|
// packages/2d/src/adapters/svgadapter.ts
|
|
38132
|
-
import { CustomElement as CustomElement116, P as P118, CustomElementUtils as
|
|
38177
|
+
import { CustomElement as CustomElement116, P as P118, CustomElementUtils as CustomElementUtils33, CustomEventUtils as CustomEventUtils11, Utils as Utils119, UI as UI14, avoidHandler as avoidHandler18 } from "@pacem/pacem-core";
|
|
38133
38178
|
import { Matrix2D as Matrix2D12 } from "@pacem/pacem-foundation";
|
|
38134
38179
|
var SVG_NS5 = "http://www.w3.org/2000/svg";
|
|
38135
38180
|
var DRAWABLE_VAR = "pacem:2-svg-drawable";
|
|
38136
38181
|
var STAGE_VAR = "pacem:2d-svg-stage";
|
|
38137
|
-
var GETVAR2 =
|
|
38138
|
-
var SETVAR2 =
|
|
38139
|
-
var DELVAR =
|
|
38182
|
+
var GETVAR2 = CustomElementUtils33.getAttachedPropertyValue;
|
|
38183
|
+
var SETVAR2 = CustomElementUtils33.setAttachedPropertyValue;
|
|
38184
|
+
var DELVAR = CustomElementUtils33.deleteAttachedPropertyValue;
|
|
38140
38185
|
function fallback2(v, f) {
|
|
38141
38186
|
return Utils119.isNull(v) ? f : v;
|
|
38142
38187
|
}
|
|
@@ -38289,7 +38334,7 @@ var PacemSvgAdapterElement = class extends Pacem2DAdapterElement {
|
|
|
38289
38334
|
super.viewActivatedCallback();
|
|
38290
38335
|
const dragDrop = __privateSet(this, _dragger2, document.createElement(P118 + "-drag-drop"));
|
|
38291
38336
|
dragDrop.mode = UI14.DragDataMode.Self;
|
|
38292
|
-
const shell =
|
|
38337
|
+
const shell = CustomElementUtils33.findAncestorShell(this);
|
|
38293
38338
|
shell.appendChild(dragDrop);
|
|
38294
38339
|
dragDrop.addEventListener(UI14.DragDropEventType.Init, this._dragInitHandler, false);
|
|
38295
38340
|
dragDrop.addEventListener(UI14.DragDropEventType.Drag, this._draggingHandler, false);
|
|
@@ -40492,7 +40537,7 @@ var AdapterUtils2 = class _AdapterUtils {
|
|
|
40492
40537
|
};
|
|
40493
40538
|
|
|
40494
40539
|
// packages/3d/src/adapters/threejsadapter.ts
|
|
40495
|
-
import { CustomElement as CustomElement130, P as P132, Watch as Watch125, PropertyConverters as PropertyConverters116, Utils as Utils126, CustomElementUtils as
|
|
40540
|
+
import { CustomElement as CustomElement130, P as P132, Watch as Watch125, PropertyConverters as PropertyConverters116, Utils as Utils126, CustomElementUtils as CustomElementUtils34 } from "@pacem/pacem-core";
|
|
40496
40541
|
import { Colors as Colors6 } from "@pacem/pacem-foundation";
|
|
40497
40542
|
import { Geometry as Geometry5 } from "@pacem/pacem-numerical";
|
|
40498
40543
|
function flattenVectorArray(array) {
|
|
@@ -40899,10 +40944,10 @@ var Pacem3DThreeAdapterElement = class extends Pacem3DAdapterElement2 {
|
|
|
40899
40944
|
wrapper.innerHTML = "";
|
|
40900
40945
|
wrapper.appendChild(stage);
|
|
40901
40946
|
if (!isTHREEAvailable()) {
|
|
40902
|
-
await
|
|
40947
|
+
await CustomElementUtils34.importjs(consts6.API_URI);
|
|
40903
40948
|
await whenTHREEAvailable();
|
|
40904
40949
|
await Promise.all(
|
|
40905
|
-
[
|
|
40950
|
+
[CustomElementUtils34.importjs(consts6.ORBIT_URI)].concat(consts6.LOADERS.map((js) => CustomElementUtils34.importjs(js)))
|
|
40906
40951
|
);
|
|
40907
40952
|
}
|
|
40908
40953
|
this._scene = new THREE.Scene();
|
|
@@ -41117,7 +41162,7 @@ Pacem3DThreeAdapterElement = __decorateClass([
|
|
|
41117
41162
|
|
|
41118
41163
|
// packages/3d/src/adapters/webgpu/webgpuadapter.ts
|
|
41119
41164
|
import {
|
|
41120
|
-
CustomElementUtils as
|
|
41165
|
+
CustomElementUtils as CustomElementUtils35,
|
|
41121
41166
|
CustomElement as CustomElement131,
|
|
41122
41167
|
P as P134,
|
|
41123
41168
|
Watch as Watch126,
|
|
@@ -44590,9 +44635,9 @@ var RendererClass = class {
|
|
|
44590
44635
|
// packages/3d/src/adapters/webgpu/webgpuadapter.ts
|
|
44591
44636
|
var WEBGPU_RAYCAST_CALLBACK_PROP = "WebGPURaycastCallback";
|
|
44592
44637
|
var WEBGPU_RAYCAST_PIXEL_PROP = "WebGPURaycastPixel";
|
|
44593
|
-
var GETVAL =
|
|
44594
|
-
var SETVAL =
|
|
44595
|
-
var DELVAL =
|
|
44638
|
+
var GETVAL = CustomElementUtils35.getAttachedPropertyValue;
|
|
44639
|
+
var SETVAL = CustomElementUtils35.setAttachedPropertyValue;
|
|
44640
|
+
var DELVAL = CustomElementUtils35.deleteAttachedPropertyValue;
|
|
44596
44641
|
var _version2, _observer3;
|
|
44597
44642
|
var Pacem3DWgslScriptElement = class extends Components74.PacemItemElement {
|
|
44598
44643
|
constructor() {
|
|
@@ -44603,7 +44648,7 @@ var Pacem3DWgslScriptElement = class extends Components74.PacemItemElement {
|
|
|
44603
44648
|
}));
|
|
44604
44649
|
}
|
|
44605
44650
|
findContainer() {
|
|
44606
|
-
return
|
|
44651
|
+
return CustomElementUtils35.findAncestor(this, (n) => n instanceof Pacem3DWebgpuAdapterElement);
|
|
44607
44652
|
}
|
|
44608
44653
|
get version() {
|
|
44609
44654
|
return __privateGet(this, _version2);
|
|
@@ -45307,7 +45352,7 @@ import {
|
|
|
45307
45352
|
Watch as Watch129,
|
|
45308
45353
|
PropertyConverters as PropertyConverters120,
|
|
45309
45354
|
Utils as Utils142,
|
|
45310
|
-
CustomElementUtils as
|
|
45355
|
+
CustomElementUtils as CustomElementUtils36,
|
|
45311
45356
|
avoidHandler as avoidHandler20,
|
|
45312
45357
|
Debounce as Debounce21,
|
|
45313
45358
|
ViewChild as ViewChild60,
|
|
@@ -45484,7 +45529,7 @@ var PacemContextMenuElement = class extends Components75.PacemItemsContainerElem
|
|
|
45484
45529
|
if (!Utils142.isNull(balloon)) {
|
|
45485
45530
|
return balloon;
|
|
45486
45531
|
}
|
|
45487
|
-
const shell =
|
|
45532
|
+
const shell = CustomElementUtils36.findAncestorShell(this);
|
|
45488
45533
|
if (Utils142.isNull(shell)) {
|
|
45489
45534
|
return null;
|
|
45490
45535
|
}
|
|
@@ -46553,9 +46598,104 @@ PacemRouterHashStateElement = __decorateClass([
|
|
|
46553
46598
|
CustomElement138({ tagName: P141 + "-router-hash-state" })
|
|
46554
46599
|
], PacemRouterHashStateElement);
|
|
46555
46600
|
|
|
46601
|
+
// packages/plus/src/router-view-scroll.ts
|
|
46602
|
+
import { CustomElement as CustomElement139, P as P142, Watch as Watch134, PropertyConverters as PropertyConverters125, Utils as Utils147, PacemEventTarget as PacemEventTarget23 } from "@pacem/pacem-core";
|
|
46603
|
+
var PacemRouterViewScrollElement = class extends PacemEventTarget23 {
|
|
46604
|
+
constructor() {
|
|
46605
|
+
super(...arguments);
|
|
46606
|
+
/** The old content is already gone and the new content hasn't landed yet - jump to the top now, instantly, so the transition never shows a scrolled-down blank/stale view. */
|
|
46607
|
+
this._prerenderHandler = (_) => {
|
|
46608
|
+
Utils147.scrollTo(0, false);
|
|
46609
|
+
};
|
|
46610
|
+
/**
|
|
46611
|
+
* New content has landed and its size has settled (see class remarks on `render`'s debounce). Restores the
|
|
46612
|
+
* router's persisted scroll position for this entry, if any: `$scrollY` is `undefined` (or `0`) for a
|
|
46613
|
+
* freshly-pushed page - never explicitly set on push, only captured when *leaving* a page - so this
|
|
46614
|
+
* correctly leaves new pages at the top without any special-casing.
|
|
46615
|
+
*/
|
|
46616
|
+
this._renderHandler = (_) => {
|
|
46617
|
+
const state = this.router?.state;
|
|
46618
|
+
if (state.$scrollY > 0) {
|
|
46619
|
+
const smooth = this.scrollBehavior != "instant";
|
|
46620
|
+
Utils147.scrollTo(state.$scrollY, smooth);
|
|
46621
|
+
}
|
|
46622
|
+
};
|
|
46623
|
+
}
|
|
46624
|
+
viewActivatedCallback() {
|
|
46625
|
+
super.viewActivatedCallback();
|
|
46626
|
+
this._setupRouter();
|
|
46627
|
+
this._setupView();
|
|
46628
|
+
}
|
|
46629
|
+
propertyChangedCallback(name, old, val, first) {
|
|
46630
|
+
super.propertyChangedCallback(name, old, val, first);
|
|
46631
|
+
if (first) {
|
|
46632
|
+
return;
|
|
46633
|
+
}
|
|
46634
|
+
switch (name) {
|
|
46635
|
+
case "router":
|
|
46636
|
+
if (!Utils147.isNull(old)) {
|
|
46637
|
+
this._disposeRouter(old);
|
|
46638
|
+
}
|
|
46639
|
+
if (!Utils147.isNull(val)) {
|
|
46640
|
+
this._setupRouter(val);
|
|
46641
|
+
}
|
|
46642
|
+
break;
|
|
46643
|
+
case "view":
|
|
46644
|
+
if (!Utils147.isNull(old)) {
|
|
46645
|
+
this._disposeView(old);
|
|
46646
|
+
}
|
|
46647
|
+
if (!Utils147.isNull(val)) {
|
|
46648
|
+
this._setupView(val);
|
|
46649
|
+
}
|
|
46650
|
+
break;
|
|
46651
|
+
}
|
|
46652
|
+
}
|
|
46653
|
+
disconnectedCallback() {
|
|
46654
|
+
this._disposeRouter();
|
|
46655
|
+
this._disposeView();
|
|
46656
|
+
super.disconnectedCallback();
|
|
46657
|
+
}
|
|
46658
|
+
/** Turns on the router's own scroll-position bookkeeping (capturing `state.$scrollY` per history entry); see `PacemRouterElement.scrollRestoration`. */
|
|
46659
|
+
_setupRouter(router = this.router) {
|
|
46660
|
+
if (Utils147.isNull(router)) {
|
|
46661
|
+
return;
|
|
46662
|
+
}
|
|
46663
|
+
router.scrollRestoration = true;
|
|
46664
|
+
}
|
|
46665
|
+
/** No-op: `_setupRouter` only flips a flag on the router, there's no subscription to tear down. Kept for symmetry with `_disposeView`, and in case this grows one later. */
|
|
46666
|
+
_disposeRouter(router = this.router) {
|
|
46667
|
+
}
|
|
46668
|
+
_setupView(view2 = this.view) {
|
|
46669
|
+
if (Utils147.isNull(view2)) {
|
|
46670
|
+
return;
|
|
46671
|
+
}
|
|
46672
|
+
view2.addEventListener("prerender", this._prerenderHandler, false);
|
|
46673
|
+
view2.addEventListener("render", this._renderHandler, false);
|
|
46674
|
+
}
|
|
46675
|
+
_disposeView(view2 = this.view) {
|
|
46676
|
+
if (Utils147.isNull(view2)) {
|
|
46677
|
+
return;
|
|
46678
|
+
}
|
|
46679
|
+
view2.removeEventListener("prerender", this._prerenderHandler);
|
|
46680
|
+
view2.removeEventListener("render", this._renderHandler);
|
|
46681
|
+
}
|
|
46682
|
+
};
|
|
46683
|
+
__decorateClass([
|
|
46684
|
+
Watch134({ converter: PropertyConverters125.Element, emit: false })
|
|
46685
|
+
], PacemRouterViewScrollElement.prototype, "router", 2);
|
|
46686
|
+
__decorateClass([
|
|
46687
|
+
Watch134({ converter: PropertyConverters125.Element, emit: false })
|
|
46688
|
+
], PacemRouterViewScrollElement.prototype, "view", 2);
|
|
46689
|
+
__decorateClass([
|
|
46690
|
+
Watch134({ converter: PropertyConverters125.String, emit: false })
|
|
46691
|
+
], PacemRouterViewScrollElement.prototype, "scrollBehavior", 2);
|
|
46692
|
+
PacemRouterViewScrollElement = __decorateClass([
|
|
46693
|
+
CustomElement139({ tagName: P142 + "-router-view-scroll" })
|
|
46694
|
+
], PacemRouterViewScrollElement);
|
|
46695
|
+
|
|
46556
46696
|
// packages/plus/src/search.ts
|
|
46557
|
-
import { CustomElement as
|
|
46558
|
-
var PacemSearchElement = class extends
|
|
46697
|
+
import { CustomElement as CustomElement140, Defaults as Defaults58, P as P143, Watch as Watch135, PropertyConverters as PropertyConverters126, ViewChild as ViewChild63, Components as Components81 } from "@pacem/pacem-core";
|
|
46698
|
+
var PacemSearchElement = class extends Components81.PacemElement {
|
|
46559
46699
|
constructor() {
|
|
46560
46700
|
super(...arguments);
|
|
46561
46701
|
this.hintParameter = "q";
|
|
@@ -46570,37 +46710,37 @@ var PacemSearchElement = class extends Components80.PacemElement {
|
|
|
46570
46710
|
}
|
|
46571
46711
|
};
|
|
46572
46712
|
__decorateClass([
|
|
46573
|
-
ViewChild63(
|
|
46713
|
+
ViewChild63(P143 + "-fetch")
|
|
46574
46714
|
], PacemSearchElement.prototype, "_fetcher", 2);
|
|
46575
46715
|
__decorateClass([
|
|
46576
|
-
|
|
46716
|
+
Watch135()
|
|
46577
46717
|
], PacemSearchElement.prototype, "datasource", 2);
|
|
46578
46718
|
__decorateClass([
|
|
46579
|
-
|
|
46719
|
+
Watch135({ converter: PropertyConverters126.String })
|
|
46580
46720
|
], PacemSearchElement.prototype, "hint", 2);
|
|
46581
46721
|
__decorateClass([
|
|
46582
|
-
|
|
46722
|
+
Watch135({ converter: PropertyConverters126.String })
|
|
46583
46723
|
], PacemSearchElement.prototype, "url", 2);
|
|
46584
46724
|
__decorateClass([
|
|
46585
|
-
|
|
46725
|
+
Watch135({ converter: PropertyConverters126.String })
|
|
46586
46726
|
], PacemSearchElement.prototype, "method", 2);
|
|
46587
46727
|
__decorateClass([
|
|
46588
|
-
|
|
46728
|
+
Watch135({ emit: false, converter: PropertyConverters126.String })
|
|
46589
46729
|
], PacemSearchElement.prototype, "hintParameter", 2);
|
|
46590
46730
|
PacemSearchElement = __decorateClass([
|
|
46591
|
-
|
|
46592
|
-
tagName:
|
|
46731
|
+
CustomElement140({
|
|
46732
|
+
tagName: P143 + "-search",
|
|
46593
46733
|
shadow: Defaults58.USE_SHADOW_ROOT,
|
|
46594
|
-
template: `<${
|
|
46595
|
-
</${
|
|
46596
|
-
<${
|
|
46597
|
-
<${
|
|
46598
|
-
</${
|
|
46734
|
+
template: `<${P143}-fetch debounce="800" url="{{ :host.url }}" method="{{ :host.method }}">
|
|
46735
|
+
</${P143}-fetch><${P143}-input-search value="{{ :host.hint, twoway }}"></${P143}-input-search>
|
|
46736
|
+
<${P143}-repeater datasource="{{ ::_fetch.result }}">
|
|
46737
|
+
<${P143}-content></${P143}-content>
|
|
46738
|
+
</${P143}-repeater>`
|
|
46599
46739
|
})
|
|
46600
46740
|
], PacemSearchElement);
|
|
46601
46741
|
|
|
46602
46742
|
// packages/plus/src/datagrid/datacell.ts
|
|
46603
|
-
import { CustomElement as
|
|
46743
|
+
import { CustomElement as CustomElement141, P as P144, PCSS as PCSS81, Watch as Watch136, PropertyConverters as PropertyConverters127, Utils as Utils148, CustomElementUtils as CustomElementUtils37, ViewChild as ViewChild64 } from "@pacem/pacem-core";
|
|
46604
46744
|
var DataRowSelectChangeEventName = "datarowselectchange";
|
|
46605
46745
|
var DataRowSelectChangeEvent = class extends CustomEvent {
|
|
46606
46746
|
constructor(detail) {
|
|
@@ -46615,7 +46755,7 @@ var PacemDataCellElement = class extends PacemBaseCellElement {
|
|
|
46615
46755
|
}
|
|
46616
46756
|
connectedCallback() {
|
|
46617
46757
|
super.connectedCallback();
|
|
46618
|
-
|
|
46758
|
+
Utils148.addClass(this, PCSS81 + "-datacell");
|
|
46619
46759
|
}
|
|
46620
46760
|
propertyChangedCallback(name, old, val, first) {
|
|
46621
46761
|
super.propertyChangedCallback(name, old, val, first);
|
|
@@ -46633,7 +46773,7 @@ var PacemDataCellElement = class extends PacemBaseCellElement {
|
|
|
46633
46773
|
}
|
|
46634
46774
|
_updateTooltipJustInCase() {
|
|
46635
46775
|
const tip = this.metadata.dataCell?.autoTooltip ?? true;
|
|
46636
|
-
if (tip && !
|
|
46776
|
+
if (tip && !Utils148.isNullOrEmpty(this._contentTooltip)) {
|
|
46637
46777
|
this.setAttribute("tooltip", this._contentTooltip);
|
|
46638
46778
|
} else {
|
|
46639
46779
|
this.removeAttribute("tooltip");
|
|
@@ -46645,7 +46785,7 @@ var PacemDataCellElement = class extends PacemBaseCellElement {
|
|
|
46645
46785
|
const nullValue = metadata.dataCell?.null ?? "";
|
|
46646
46786
|
if (typeof format === "function") {
|
|
46647
46787
|
const htmlOrNode = format(this, metadata, item, index);
|
|
46648
|
-
if (
|
|
46788
|
+
if (Utils148.isNullOrEmpty(htmlOrNode)) {
|
|
46649
46789
|
return nullValue;
|
|
46650
46790
|
}
|
|
46651
46791
|
if (typeof htmlOrNode === "string") {
|
|
@@ -46653,19 +46793,19 @@ var PacemDataCellElement = class extends PacemBaseCellElement {
|
|
|
46653
46793
|
}
|
|
46654
46794
|
return htmlOrNode;
|
|
46655
46795
|
}
|
|
46656
|
-
const tget =
|
|
46796
|
+
const tget = CustomElementUtils37.resolvePath(metadata.prop, item)?.target;
|
|
46657
46797
|
const plainValue = tget?.value;
|
|
46658
|
-
if (
|
|
46798
|
+
if (Utils148.isNullOrEmpty(plainValue)) {
|
|
46659
46799
|
return nullValue;
|
|
46660
46800
|
}
|
|
46661
|
-
const culture =
|
|
46801
|
+
const culture = Utils148.lang(this);
|
|
46662
46802
|
switch (metadata.dataType) {
|
|
46663
46803
|
case "boolean":
|
|
46664
|
-
return `<${
|
|
46804
|
+
return `<${P144}-icon icon="material ${!plainValue ? "radio_button_unchecked" : "check_circle_outline"} text-big-steady"></${P144}-icon>`;
|
|
46665
46805
|
case "time":
|
|
46666
46806
|
case "date":
|
|
46667
46807
|
case "datetime":
|
|
46668
|
-
return this._contentTooltip =
|
|
46808
|
+
return this._contentTooltip = Utils148.core.date(plainValue, format, culture);
|
|
46669
46809
|
case "byte":
|
|
46670
46810
|
case "int16":
|
|
46671
46811
|
case "int32":
|
|
@@ -46679,20 +46819,20 @@ var PacemDataCellElement = class extends PacemBaseCellElement {
|
|
|
46679
46819
|
case "float":
|
|
46680
46820
|
case "single":
|
|
46681
46821
|
case "number":
|
|
46682
|
-
return this._contentTooltip =
|
|
46822
|
+
return this._contentTooltip = Utils148.core.number(plainValue, format || "", culture);
|
|
46683
46823
|
case "currency":
|
|
46684
46824
|
format ??= "EUR";
|
|
46685
46825
|
if (typeof format === "string") {
|
|
46686
|
-
return this._contentTooltip =
|
|
46826
|
+
return this._contentTooltip = Utils148.core.currency(plainValue, format, culture);
|
|
46687
46827
|
}
|
|
46688
|
-
return this._contentTooltip =
|
|
46828
|
+
return this._contentTooltip = Utils148.core.number(plainValue, format, culture);
|
|
46689
46829
|
case "percent":
|
|
46690
46830
|
case "percentage":
|
|
46691
46831
|
format ??= { style: "percent", maximumFractionDigits: 2 };
|
|
46692
46832
|
if (typeof format === "string") {
|
|
46693
|
-
return this._contentTooltip =
|
|
46833
|
+
return this._contentTooltip = Utils148.core.currency(plainValue, format, culture);
|
|
46694
46834
|
}
|
|
46695
|
-
return this._contentTooltip =
|
|
46835
|
+
return this._contentTooltip = Utils148.core.number(plainValue, format, culture);
|
|
46696
46836
|
case "url":
|
|
46697
46837
|
case "emailaddress":
|
|
46698
46838
|
case "phonenumber":
|
|
@@ -46703,7 +46843,7 @@ var PacemDataCellElement = class extends PacemBaseCellElement {
|
|
|
46703
46843
|
}
|
|
46704
46844
|
// @Debounce(true)
|
|
46705
46845
|
_inflateCssClass(item = this.dataitem, index = this.rowindex, metadata = this.metadata, datasource) {
|
|
46706
|
-
if (
|
|
46846
|
+
if (Utils148.isNull(item) || Utils148.isNullOrEmpty(metadata)) {
|
|
46707
46847
|
return EMPTY_CSSCLASS;
|
|
46708
46848
|
}
|
|
46709
46849
|
const cssClass = metadata.dataCell && metadata.dataCell.cssClass || EMPTY_CSSCLASS;
|
|
@@ -46747,7 +46887,7 @@ var PacemDataCellElement = class extends PacemBaseCellElement {
|
|
|
46747
46887
|
return retval;
|
|
46748
46888
|
}
|
|
46749
46889
|
_inflateCss(item = this.dataitem, index = this.rowindex, metadata = this.metadata) {
|
|
46750
|
-
if (
|
|
46890
|
+
if (Utils148.isNull(item) || Utils148.isNullOrEmpty(metadata)) {
|
|
46751
46891
|
return EMPTY_CSS;
|
|
46752
46892
|
}
|
|
46753
46893
|
const css = metadata.dataCell && metadata.dataCell.css || EMPTY_CSS;
|
|
@@ -46775,30 +46915,30 @@ var PacemDataCellElement = class extends PacemBaseCellElement {
|
|
|
46775
46915
|
_updateSelection() {
|
|
46776
46916
|
const selectedRows = this.gridState?.selectedRows ?? [];
|
|
46777
46917
|
if (selectedRows.indexOf(this.rowindex) >= 0) {
|
|
46778
|
-
|
|
46918
|
+
Utils148.addClass(this, "datarow-selected datacell-filled datacell-primary");
|
|
46779
46919
|
} else {
|
|
46780
|
-
|
|
46920
|
+
Utils148.removeClass(this, "datarow-selected datacell-filled datacell-primary");
|
|
46781
46921
|
}
|
|
46782
46922
|
}
|
|
46783
46923
|
};
|
|
46784
46924
|
__decorateClass([
|
|
46785
|
-
|
|
46925
|
+
Watch136({ emit: false, converter: PropertyConverters127.Eval })
|
|
46786
46926
|
], PacemDataCellElement.prototype, "dataitem", 2);
|
|
46787
46927
|
__decorateClass([
|
|
46788
|
-
|
|
46928
|
+
Watch136({ emit: false, converter: PropertyConverters127.Number })
|
|
46789
46929
|
], PacemDataCellElement.prototype, "rowindex", 2);
|
|
46790
46930
|
__decorateClass([
|
|
46791
|
-
|
|
46931
|
+
Watch136({ emit: false, converter: PropertyConverters127.String, debounce: 200 })
|
|
46792
46932
|
], PacemDataCellElement.prototype, "_contentTooltip", 2);
|
|
46793
46933
|
__decorateClass([
|
|
46794
|
-
ViewChild64(
|
|
46934
|
+
ViewChild64(P144 + "-span")
|
|
46795
46935
|
], PacemDataCellElement.prototype, "_content", 2);
|
|
46796
46936
|
PacemDataCellElement = __decorateClass([
|
|
46797
|
-
|
|
46937
|
+
CustomElement141({ tagName: P144 + "-datacell", shadow: false, template: `<${P144}-span content="{{ :host._inflateContent(^item, ^index, :host.metadata) }}"></${P144}-span>` })
|
|
46798
46938
|
], PacemDataCellElement);
|
|
46799
46939
|
|
|
46800
46940
|
// packages/plus/src/datagrid/headcell.ts
|
|
46801
|
-
import { CustomElement as
|
|
46941
|
+
import { CustomElement as CustomElement142, P as P145, PCSS as PCSS82, Utils as Utils149, CustomElementUtils as CustomElementUtils38, Components as Components83, UI as CoreUI } from "@pacem/pacem-core";
|
|
46802
46942
|
import { Components as UIPkgComponents } from "@pacem/pacem-ui";
|
|
46803
46943
|
var UI20 = UIPkgComponents.UI;
|
|
46804
46944
|
var DataColumnSortEventName = "datacolumnsort";
|
|
@@ -46830,14 +46970,14 @@ var PacemHeadCellElement = class extends PacemBaseCellElement {
|
|
|
46830
46970
|
this.dispatchEvent(new DataColumnRescaleEvent({ width }));
|
|
46831
46971
|
};
|
|
46832
46972
|
this._rescaleStartHandler = (evt) => {
|
|
46833
|
-
this._columnBBox =
|
|
46973
|
+
this._columnBBox = Utils149.offsetRect(this);
|
|
46834
46974
|
};
|
|
46835
46975
|
this._rescaleEndHandler = (evt) => {
|
|
46836
46976
|
};
|
|
46837
46977
|
}
|
|
46838
46978
|
connectedCallback() {
|
|
46839
46979
|
super.connectedCallback();
|
|
46840
|
-
|
|
46980
|
+
Utils149.addClass(this, PCSS82 + "-headcell");
|
|
46841
46981
|
}
|
|
46842
46982
|
propertyChangedCallback(name, old, val, first) {
|
|
46843
46983
|
super.propertyChangedCallback(name, old, val, first);
|
|
@@ -46861,50 +47001,50 @@ var PacemHeadCellElement = class extends PacemBaseCellElement {
|
|
|
46861
47001
|
const btn = new UI20.PacemButtonElement();
|
|
46862
47002
|
btn.className = `button-flat headcell-sort ${PCSS82}-inert`;
|
|
46863
47003
|
this.addEventListener("click", this._sortButtonClickHandler, false);
|
|
46864
|
-
|
|
47004
|
+
Utils149.addClass(this, PCSS82 + "-clickable");
|
|
46865
47005
|
return btn;
|
|
46866
47006
|
}
|
|
46867
47007
|
_disposeSortButton(btn = this._sortButton) {
|
|
46868
|
-
if (
|
|
47008
|
+
if (Utils149.isNull(btn)) {
|
|
46869
47009
|
return;
|
|
46870
47010
|
}
|
|
46871
|
-
|
|
47011
|
+
Utils149.removeClass(this, PCSS82 + "-clickable");
|
|
46872
47012
|
this.removeEventListener("click", this._sortButtonClickHandler, false);
|
|
46873
47013
|
btn.remove();
|
|
46874
47014
|
this._sortButton = null;
|
|
46875
47015
|
}
|
|
46876
47016
|
_updateSortButtonIconGlyph(btn = this._sortButton, state = this.gridState, metadata = this.metadata) {
|
|
46877
|
-
if (
|
|
47017
|
+
if (Utils149.isNull(btn) || Utils149.isNullOrEmpty(metadata)) {
|
|
46878
47018
|
return;
|
|
46879
47019
|
}
|
|
46880
47020
|
btn.iconGlyph = state?.sort?.column === metadata.prop ? state.sort.dir === "desc" ? "arrow_drop_down" : "arrow_drop_up" : "";
|
|
46881
47021
|
}
|
|
46882
47022
|
_ensureRescaler() {
|
|
46883
|
-
if (
|
|
46884
|
-
const r = this._rescaler = this._rescaler || new
|
|
47023
|
+
if (Utils149.isNull(this._rescaler)) {
|
|
47024
|
+
const r = this._rescaler = this._rescaler || new Components83.PacemRescaleElement();
|
|
46885
47025
|
r.handles = [CoreUI.RescaleHandle.Right];
|
|
46886
47026
|
r.addEventListener(CoreUI.RescaleEventType.Rescale, this._rescaleHandler, false);
|
|
46887
47027
|
r.addEventListener(CoreUI.RescaleEventType.Start, this._rescaleStartHandler, false);
|
|
46888
47028
|
r.addEventListener(CoreUI.RescaleEventType.End, this._rescaleEndHandler, false);
|
|
46889
|
-
|
|
47029
|
+
CustomElementUtils38.findAncestorShell(this).appendChild(r);
|
|
46890
47030
|
}
|
|
46891
47031
|
}
|
|
46892
47032
|
_setupRescaleContainer() {
|
|
46893
47033
|
this._ensureRescaler();
|
|
46894
|
-
const c = new
|
|
47034
|
+
const c = new Components83.PacemPanelElement();
|
|
46895
47035
|
c.className = "headcell-rescale";
|
|
46896
47036
|
c.behaviors = [this._rescaler];
|
|
46897
47037
|
return c;
|
|
46898
47038
|
}
|
|
46899
47039
|
_disposeRescaleContainer(c = this._rescaleContainer) {
|
|
46900
|
-
if (
|
|
47040
|
+
if (Utils149.isNull(c)) {
|
|
46901
47041
|
return;
|
|
46902
47042
|
}
|
|
46903
47043
|
c.remove();
|
|
46904
47044
|
this._rescaleContainer = null;
|
|
46905
47045
|
}
|
|
46906
47046
|
_disposeRescaler(r = this._rescaler) {
|
|
46907
|
-
if (
|
|
47047
|
+
if (Utils149.isNull(r)) {
|
|
46908
47048
|
return;
|
|
46909
47049
|
}
|
|
46910
47050
|
r.removeEventListener(CoreUI.RescaleEventType.Rescale, this._rescaleHandler, false);
|
|
@@ -46921,13 +47061,13 @@ var PacemHeadCellElement = class extends PacemBaseCellElement {
|
|
|
46921
47061
|
const cssClass = truncate ? ["text-truncate"] : [];
|
|
46922
47062
|
switch (metadata.headCell?.verticalAlign?.toLowerCase()) {
|
|
46923
47063
|
case "top":
|
|
46924
|
-
|
|
47064
|
+
Utils149.addClass(this, "headcell-top");
|
|
46925
47065
|
break;
|
|
46926
47066
|
case "bottom":
|
|
46927
|
-
|
|
47067
|
+
Utils149.addClass(this, "headcell-bottom");
|
|
46928
47068
|
break;
|
|
46929
47069
|
case "middle":
|
|
46930
|
-
|
|
47070
|
+
Utils149.addClass(this, "headcell-middle");
|
|
46931
47071
|
break;
|
|
46932
47072
|
}
|
|
46933
47073
|
switch (metadata.headCell?.horizontalAlign?.toLowerCase()) {
|
|
@@ -46943,7 +47083,7 @@ var PacemHeadCellElement = class extends PacemBaseCellElement {
|
|
|
46943
47083
|
break;
|
|
46944
47084
|
}
|
|
46945
47085
|
this.removeAttribute("content");
|
|
46946
|
-
const css = !
|
|
47086
|
+
const css = !Utils149.isNullOrEmpty(cssClass) ? ` class="${cssClass.join(" ")}"` : "";
|
|
46947
47087
|
const headContent = metadata.headCell?.name ?? metadata.prop;
|
|
46948
47088
|
this.innerHTML = `<div${css}>${headContent}</div>`;
|
|
46949
47089
|
if (metadata.isSortable) {
|
|
@@ -46970,8 +47110,8 @@ var PacemHeadCellElement = class extends PacemBaseCellElement {
|
|
|
46970
47110
|
}
|
|
46971
47111
|
_ensureBalloon() {
|
|
46972
47112
|
var innerText, tooltip;
|
|
46973
|
-
const noBalloon = (tooltip = this._normalizeTooltip()).type === false ||
|
|
46974
|
-
if (
|
|
47113
|
+
const noBalloon = (tooltip = this._normalizeTooltip()).type === false || Utils149.isNullOrEmpty(innerText = this.metadata.headCell?.description);
|
|
47114
|
+
if (Utils149.isNull(this._balloon) && !noBalloon) {
|
|
46975
47115
|
let balloon2 = new UI20.PacemBalloonElement();
|
|
46976
47116
|
balloon2.options = {
|
|
46977
47117
|
behavior: UI20.BalloonBehavior.Tooltip,
|
|
@@ -46981,12 +47121,12 @@ var PacemHeadCellElement = class extends PacemBaseCellElement {
|
|
|
46981
47121
|
hoverTimeout: 50,
|
|
46982
47122
|
align: tooltip.align || UI20.BalloonAlignment.Auto
|
|
46983
47123
|
};
|
|
46984
|
-
|
|
46985
|
-
var shell =
|
|
47124
|
+
Utils149.addClass(balloon2, PCSS82 + "-headcell-tooltip");
|
|
47125
|
+
var shell = CustomElementUtils38.findAncestorShell(this);
|
|
46986
47126
|
shell.appendChild(this._balloon = balloon2);
|
|
46987
47127
|
}
|
|
46988
47128
|
const balloon = this._balloon;
|
|
46989
|
-
if (!
|
|
47129
|
+
if (!Utils149.isNull(balloon)) {
|
|
46990
47130
|
balloon.target = this;
|
|
46991
47131
|
if (!(balloon.disabled = noBalloon)) {
|
|
46992
47132
|
const content = innerText || "";
|
|
@@ -47006,7 +47146,7 @@ var PacemHeadCellElement = class extends PacemBaseCellElement {
|
|
|
47006
47146
|
}
|
|
47007
47147
|
}
|
|
47008
47148
|
_disposeBalloon() {
|
|
47009
|
-
if (!
|
|
47149
|
+
if (!Utils149.isNull(this._balloon)) {
|
|
47010
47150
|
this._balloon.remove();
|
|
47011
47151
|
this._balloon = null;
|
|
47012
47152
|
}
|
|
@@ -47014,22 +47154,22 @@ var PacemHeadCellElement = class extends PacemBaseCellElement {
|
|
|
47014
47154
|
//#endregion
|
|
47015
47155
|
};
|
|
47016
47156
|
PacemHeadCellElement = __decorateClass([
|
|
47017
|
-
|
|
47157
|
+
CustomElement142({ tagName: P145 + "-headcell" })
|
|
47018
47158
|
], PacemHeadCellElement);
|
|
47019
47159
|
|
|
47020
47160
|
// packages/plus/src/datagrid/datagrid.ts
|
|
47021
47161
|
import {
|
|
47022
|
-
CustomElement as
|
|
47023
|
-
P as
|
|
47162
|
+
CustomElement as CustomElement143,
|
|
47163
|
+
P as P146,
|
|
47024
47164
|
PCSS as PCSS83,
|
|
47025
|
-
Watch as
|
|
47026
|
-
PropertyConverters as
|
|
47027
|
-
Utils as
|
|
47165
|
+
Watch as Watch138,
|
|
47166
|
+
PropertyConverters as PropertyConverters129,
|
|
47167
|
+
Utils as Utils150,
|
|
47028
47168
|
Debounce as Debounce22,
|
|
47029
47169
|
ViewChild as ViewChild65,
|
|
47030
47170
|
CommandEventName as CommandEventName4,
|
|
47031
47171
|
CustomUIEvent as CustomUIEvent7,
|
|
47032
|
-
Components as
|
|
47172
|
+
Components as Components84,
|
|
47033
47173
|
Logging as Logging19
|
|
47034
47174
|
} from "@pacem/pacem-core";
|
|
47035
47175
|
var DataColumnRebuildEventName = "datacolumnchange";
|
|
@@ -47053,7 +47193,7 @@ var DataCellUIEvent = class extends CustomUIEvent7 {
|
|
|
47053
47193
|
super(type, detail, { bubbles: false, cancelable: true }, orig);
|
|
47054
47194
|
}
|
|
47055
47195
|
};
|
|
47056
|
-
var PacemDataColumnElement = class extends
|
|
47196
|
+
var PacemDataColumnElement = class extends Components84.PacemItemElement {
|
|
47057
47197
|
propertyChangedCallback(name, old, val, first) {
|
|
47058
47198
|
super.propertyChangedCallback(name, old, val, first);
|
|
47059
47199
|
if (!first) {
|
|
@@ -47078,56 +47218,56 @@ var PacemDataColumnElement = class extends Components83.PacemItemElement {
|
|
|
47078
47218
|
}
|
|
47079
47219
|
};
|
|
47080
47220
|
__decorateClass([
|
|
47081
|
-
|
|
47221
|
+
Watch138({ emit: false, converter: PropertyConverters129.String })
|
|
47082
47222
|
], PacemDataColumnElement.prototype, "field", 2);
|
|
47083
47223
|
__decorateClass([
|
|
47084
|
-
|
|
47224
|
+
Watch138({ emit: false, converter: PropertyConverters129.String })
|
|
47085
47225
|
], PacemDataColumnElement.prototype, "label", 2);
|
|
47086
47226
|
__decorateClass([
|
|
47087
|
-
|
|
47227
|
+
Watch138({ emit: false, converter: PropertyConverters129.Boolean })
|
|
47088
47228
|
], PacemDataColumnElement.prototype, "resizable", 2);
|
|
47089
47229
|
__decorateClass([
|
|
47090
|
-
|
|
47230
|
+
Watch138({ emit: false, converter: PropertyConverters129.Boolean })
|
|
47091
47231
|
], PacemDataColumnElement.prototype, "togglable", 2);
|
|
47092
47232
|
__decorateClass([
|
|
47093
|
-
|
|
47233
|
+
Watch138({ emit: false, converter: PropertyConverters129.Boolean })
|
|
47094
47234
|
], PacemDataColumnElement.prototype, "sortable", 2);
|
|
47095
47235
|
__decorateClass([
|
|
47096
|
-
|
|
47236
|
+
Watch138({ emit: false, converter: PropertyConverters129.Number })
|
|
47097
47237
|
], PacemDataColumnElement.prototype, "order", 2);
|
|
47098
47238
|
__decorateClass([
|
|
47099
|
-
|
|
47239
|
+
Watch138({
|
|
47100
47240
|
emit: false,
|
|
47101
|
-
converter:
|
|
47241
|
+
converter: PropertyConverters129.Json
|
|
47102
47242
|
/*OrString (TODO)*/
|
|
47103
47243
|
})
|
|
47104
47244
|
], PacemDataColumnElement.prototype, "format", 2);
|
|
47105
47245
|
__decorateClass([
|
|
47106
|
-
|
|
47246
|
+
Watch138({ emit: false, converter: PropertyConverters129.Number })
|
|
47107
47247
|
], PacemDataColumnElement.prototype, "headcellCss", 2);
|
|
47108
47248
|
__decorateClass([
|
|
47109
|
-
|
|
47249
|
+
Watch138({ emit: false, converter: PropertyConverters129.Number })
|
|
47110
47250
|
], PacemDataColumnElement.prototype, "headcellCssClass", 2);
|
|
47111
47251
|
__decorateClass([
|
|
47112
|
-
|
|
47252
|
+
Watch138({ emit: false, converter: PropertyConverters129.Number })
|
|
47113
47253
|
], PacemDataColumnElement.prototype, "datacellCss", 2);
|
|
47114
47254
|
__decorateClass([
|
|
47115
|
-
|
|
47255
|
+
Watch138({ emit: false, converter: PropertyConverters129.Number })
|
|
47116
47256
|
], PacemDataColumnElement.prototype, "datacellCssClass", 2);
|
|
47117
47257
|
PacemDataColumnElement = __decorateClass([
|
|
47118
|
-
|
|
47258
|
+
CustomElement143({ tagName: P146 + "-datacolumn" })
|
|
47119
47259
|
], PacemDataColumnElement);
|
|
47120
47260
|
function headColumnHtml(c) {
|
|
47121
|
-
return `<${
|
|
47261
|
+
return `<${P146}-headcell metadata="{{ :host._getColumnMetadata('${c.prop}') }}" state="{{ :host._columnState.${c.prop} }}" grid-state="{{ :host._gridState }}"
|
|
47122
47262
|
on-${DataColumnSortEventName}=":host._broadcastSortCommand($event)"
|
|
47123
|
-
on-${DataColumnRescaleEventName}=":host._broadcastRescaleCommand($event)"></${
|
|
47263
|
+
on-${DataColumnRescaleEventName}=":host._broadcastRescaleCommand($event)"></${P146}-headcell>`;
|
|
47124
47264
|
}
|
|
47125
47265
|
function dataColumnHtml(c, extra) {
|
|
47126
|
-
return `<${
|
|
47127
|
-
dataitem="{{ ^item }}" rowindex="{{ ^index }}" ${extra}></${
|
|
47266
|
+
return `<${P146}-datacell metadata="{{ :host._getColumnMetadata('${c.prop}') }}" state="{{ :host._columnState.${c.prop} }}" grid-state="{{ :host._gridState }}"
|
|
47267
|
+
dataitem="{{ ^item }}" rowindex="{{ ^index }}" ${extra}></${P146}-datacell>`;
|
|
47128
47268
|
}
|
|
47129
|
-
var PacemDataGridElement = class extends
|
|
47130
|
-
constructor(_key3 =
|
|
47269
|
+
var PacemDataGridElement = class extends Components84.PacemItemsContainerElement {
|
|
47270
|
+
constructor(_key3 = Utils150.uniqueCode()) {
|
|
47131
47271
|
super();
|
|
47132
47272
|
this._key = _key3;
|
|
47133
47273
|
this.state = {};
|
|
@@ -47212,7 +47352,7 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47212
47352
|
this.dispatchEvent(evt);
|
|
47213
47353
|
if (!evt.defaultPrevented) {
|
|
47214
47354
|
let retval = evt.detail.selectedRows;
|
|
47215
|
-
if (!
|
|
47355
|
+
if (!Utils150.isArray(retval)) {
|
|
47216
47356
|
retval = [];
|
|
47217
47357
|
}
|
|
47218
47358
|
this._doSetRowSelection(retval.map((i) => i?.index ?? -1).filter((i) => i >= 0));
|
|
@@ -47229,8 +47369,8 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47229
47369
|
_mergeState(state = this.state) {
|
|
47230
47370
|
state ??= {};
|
|
47231
47371
|
const normalizedState = { selectedRows: (state.selectedRows || []).map((i) => typeof i === "number" ? i : i.index) };
|
|
47232
|
-
const newState = this._gridState =
|
|
47233
|
-
this.state =
|
|
47372
|
+
const newState = this._gridState = Utils150.extend({}, this._gridState, state, normalizedState);
|
|
47373
|
+
this.state = Utils150.extend(this.state ?? {}, newState);
|
|
47234
47374
|
}
|
|
47235
47375
|
_adaptColumnMetadata(items = this.items, metadata = this.metadata) {
|
|
47236
47376
|
const output = Array.prototype.concat.apply((items || []).map((i) => {
|
|
@@ -47264,20 +47404,20 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47264
47404
|
}
|
|
47265
47405
|
_buildUpGrid(metadata) {
|
|
47266
47406
|
const container = this._tableContainer;
|
|
47267
|
-
if (
|
|
47407
|
+
if (Utils150.isNull(container)) {
|
|
47268
47408
|
return;
|
|
47269
47409
|
}
|
|
47270
|
-
if (
|
|
47410
|
+
if (Utils150.isNullOrEmpty(metadata)) {
|
|
47271
47411
|
container.innerHTML = "";
|
|
47272
47412
|
return;
|
|
47273
47413
|
}
|
|
47274
|
-
const options = this.options =
|
|
47275
|
-
let css = multiSelect ? "auto " : "", headcells = multiSelect ? `<div class="${PCSS83}-headcell"></div>` : "", datacells = multiSelect ? `<${
|
|
47414
|
+
const options = this.options = Utils150.extend({}, DataGridConsts.Defaults, this.options || {}), hasCommands = options.allowDelete || options.allowEdit || options.allowSelect, multiSelect = options.allowMultiSelect && hasCommands;
|
|
47415
|
+
let css = multiSelect ? "auto " : "", headcells = multiSelect ? `<div class="${PCSS83}-headcell"></div>` : "", datacells = multiSelect ? `<${P146}-panel class="${PCSS83}-datacell" style="grid-column: 1;" css="{{ {'grid-row': ^index+2} }}"></${P146}-panel>` : "", footcells = multiSelect ? `<div class="${PCSS83}-footcell"></div>` : "";
|
|
47276
47416
|
let colIndex = multiSelect ? 2 : 1;
|
|
47277
47417
|
const colCount = multiSelect ? metadata.length + 2 : hasCommands ? metadata.length + 1 : metadata.length;
|
|
47278
47418
|
this._gridState.orderedColumns = metadata.sort((i, j) => (i.order ?? 0) - (j.order ?? 0)).map((i) => i.prop);
|
|
47279
47419
|
let extraUi = "";
|
|
47280
|
-
for (let evtType of
|
|
47420
|
+
for (let evtType of Components84.PacemElement.emittedEventTypes) {
|
|
47281
47421
|
extraUi += ` on-${evtType}=":host._broadcastUiEvent(^item, ^index, $event)"`;
|
|
47282
47422
|
}
|
|
47283
47423
|
for (let c of metadata) {
|
|
@@ -47289,19 +47429,19 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47289
47429
|
datacells += dataColumnHtml(c, extraUi);
|
|
47290
47430
|
colIndex++;
|
|
47291
47431
|
}
|
|
47292
|
-
datacells += `<${
|
|
47293
|
-
const html = `<${
|
|
47294
|
-
<${
|
|
47432
|
+
datacells += `<${P146}-panel class="${PCSS83}-datarow" css-class="{{ {'datarow-alt': ^index % 2 === 1, 'datarow-first': ^index === 0, 'datarow-last': ^index === (:host.datasource.length - 1), 'datarow-selected': :host._gridState.selectedRows.indexOf(^index) >= 0 } }}" style="grid-column: 1 /span ${colCount};" css="{{ {'grid-row': ^index+2} }}"></${P146}-panel>`;
|
|
47433
|
+
const html = `<${P146}-repeater datasource="{{ :host.datasource }}">
|
|
47434
|
+
<${P146}-panel class="${PCSS83}-datatable" css="{{ {'grid-template-columns': :host._getColumnSizes(:host._columnState, '${css.trimEnd()}', :host._gridState) } }}">
|
|
47295
47435
|
${headcells}
|
|
47296
47436
|
<template>
|
|
47297
47437
|
${datacells}
|
|
47298
47438
|
</template>
|
|
47299
47439
|
${footcells}
|
|
47300
|
-
</${
|
|
47440
|
+
</${P146}-panel>`;
|
|
47301
47441
|
container.innerHTML = html;
|
|
47302
47442
|
}
|
|
47303
47443
|
_getColumnSizes(state = this._columnState, css, grid = this._gridState) {
|
|
47304
|
-
if (
|
|
47444
|
+
if (Utils150.isNullOrEmpty(state)) {
|
|
47305
47445
|
return css;
|
|
47306
47446
|
}
|
|
47307
47447
|
const split = css.split(" ");
|
|
@@ -47337,11 +47477,11 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47337
47477
|
//#endregion
|
|
47338
47478
|
//#region events
|
|
47339
47479
|
_onCommand(evt) {
|
|
47340
|
-
this.dispatchEvent(new
|
|
47480
|
+
this.dispatchEvent(new Components84.ItemCommandEvent(
|
|
47341
47481
|
/* 'originalEvent' */
|
|
47342
47482
|
evt
|
|
47343
47483
|
));
|
|
47344
|
-
this.dispatchEvent(new
|
|
47484
|
+
this.dispatchEvent(new Components84.CustomItemCommandEvent(
|
|
47345
47485
|
/* 'originalEvent' */
|
|
47346
47486
|
evt
|
|
47347
47487
|
));
|
|
@@ -47374,7 +47514,7 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47374
47514
|
if (typeof event.detail.dir === "string") {
|
|
47375
47515
|
sort2.dir = event.detail.dir === "desc" ? "desc" : "asc";
|
|
47376
47516
|
}
|
|
47377
|
-
this._gridState =
|
|
47517
|
+
this._gridState = Utils150.extend(
|
|
47378
47518
|
{},
|
|
47379
47519
|
this._gridState,
|
|
47380
47520
|
/* let it be manipulated on the "other side" */
|
|
@@ -47394,7 +47534,7 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47394
47534
|
const column = evt.srcElement.metadata;
|
|
47395
47535
|
const newState = {};
|
|
47396
47536
|
newState[column.prop] = { pixelWidth: width2 };
|
|
47397
|
-
this._columnState =
|
|
47537
|
+
this._columnState = Utils150.extend({}, this._columnState, newState);
|
|
47398
47538
|
}
|
|
47399
47539
|
}
|
|
47400
47540
|
_broadcastSelectCommand(toggledRowIndex) {
|
|
@@ -47412,7 +47552,7 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47412
47552
|
} else {
|
|
47413
47553
|
trigger = false;
|
|
47414
47554
|
const msg = `Cannot select the row at index ${toggledRowIndex} since datagrid options do not allow any row selection.`;
|
|
47415
|
-
if (
|
|
47555
|
+
if (Utils150.isNull(this.logger)) {
|
|
47416
47556
|
console.warn(msg);
|
|
47417
47557
|
} else {
|
|
47418
47558
|
this.log(Logging19.LogLevel.Warn, msg);
|
|
@@ -47426,34 +47566,34 @@ var PacemDataGridElement = class extends Components83.PacemItemsContainerElement
|
|
|
47426
47566
|
//#endregion
|
|
47427
47567
|
};
|
|
47428
47568
|
__decorateClass([
|
|
47429
|
-
|
|
47569
|
+
Watch138({ emit: false, converter: PropertyConverters129.Json })
|
|
47430
47570
|
], PacemDataGridElement.prototype, "metadata", 2);
|
|
47431
47571
|
__decorateClass([
|
|
47432
|
-
|
|
47572
|
+
Watch138({ emit: false, converter: PropertyConverters129.Json })
|
|
47433
47573
|
], PacemDataGridElement.prototype, "options", 2);
|
|
47434
47574
|
__decorateClass([
|
|
47435
|
-
|
|
47575
|
+
Watch138({ emit: false, converter: PropertyConverters129.Json })
|
|
47436
47576
|
], PacemDataGridElement.prototype, "state", 2);
|
|
47437
47577
|
__decorateClass([
|
|
47438
|
-
|
|
47578
|
+
Watch138({ emit: true, converter: PropertyConverters129.Json })
|
|
47439
47579
|
], PacemDataGridElement.prototype, "datasource", 2);
|
|
47440
47580
|
__decorateClass([
|
|
47441
47581
|
ViewChild65("." + PCSS83 + "-datagrid")
|
|
47442
47582
|
], PacemDataGridElement.prototype, "_tableContainer", 2);
|
|
47443
47583
|
__decorateClass([
|
|
47444
|
-
|
|
47584
|
+
Watch138()
|
|
47445
47585
|
], PacemDataGridElement.prototype, "_adaptedColumnMetadata", 2);
|
|
47446
47586
|
__decorateClass([
|
|
47447
|
-
|
|
47587
|
+
Watch138()
|
|
47448
47588
|
], PacemDataGridElement.prototype, "_columnState", 2);
|
|
47449
47589
|
__decorateClass([
|
|
47450
|
-
|
|
47590
|
+
Watch138()
|
|
47451
47591
|
], PacemDataGridElement.prototype, "_gridState", 2);
|
|
47452
47592
|
__decorateClass([
|
|
47453
47593
|
Debounce22()
|
|
47454
47594
|
], PacemDataGridElement.prototype, "_adaptColumnMetadata", 1);
|
|
47455
47595
|
PacemDataGridElement = __decorateClass([
|
|
47456
|
-
|
|
47596
|
+
CustomElement143({ tagName: P146 + "-datagrid", shadow: false, template: `<div class="${PCSS83}-datagrid"></div><${P146}-content></${P146}-content>` })
|
|
47457
47597
|
], PacemDataGridElement);
|
|
47458
47598
|
export {
|
|
47459
47599
|
Angle,
|
|
@@ -47511,6 +47651,10 @@ export {
|
|
|
47511
47651
|
Regex,
|
|
47512
47652
|
Repeater,
|
|
47513
47653
|
RepeaterItem2 as RepeaterItem,
|
|
47654
|
+
RouterNavigateEvent,
|
|
47655
|
+
RouterNavigateEventName,
|
|
47656
|
+
RouterNavigatingEvent,
|
|
47657
|
+
RouterNavigatingEventName,
|
|
47514
47658
|
index_scaffolding_exports as Scaffolding,
|
|
47515
47659
|
Size,
|
|
47516
47660
|
Storage,
|