@uxland/primary-shell 7.41.5 → 7.41.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{component-oKefFHGe.js → component-KfK2npE5.js} +2 -2
- package/dist/{component-oKefFHGe.js.map → component-KfK2npE5.js.map} +1 -1
- package/dist/{index-HxUANPyC.js → index-0V-xXwce.js} +42 -25
- package/dist/{index-HxUANPyC.js.map → index-0V-xXwce.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +4 -4
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s, t as d, k as l, h as p, r as m, i as g, a as h } from "./index-
|
|
1
|
+
import { s, t as d, k as l, h as p, r as m, i as g, a as h } from "./index-0V-xXwce.js";
|
|
2
2
|
const v = ".container{background-color:#fff;display:flex;flex-direction:column;min-width:500px;width:95vw;height:95vh;border-radius:var(--dss-radius-sm);overflow:hidden}.content{display:grid;flex:1;min-height:0;grid-template-columns:1fr 1fr;gap:16px;padding:16px}.content>primaria-region{width:100%;height:100%;min-height:0}.content primaria-region>div{width:100%;height:100%;border:1px solid var(--color-neutral-200);border-radius:8px;padding:16px;box-sizing:border-box}.content>primaria-region[name=import-data-region]>div{overflow-y:auto}.content>primaria-region[name=import-data-activity-history-region]>div{display:flex;flex-direction:column;gap:16px;overflow:hidden}.content>primaria-region[name=import-data-activity-history-region]>div>*{flex-shrink:0}.content>primaria-region[name=import-data-activity-history-region]>div>*:last-child{flex:1;min-height:0}.footer{display:flex;flex-direction:row;align-items:center;background:#fff;justify-content:end;gap:12px;height:56px;border-top:1px solid var(--color-neutral-100);padding:var(--dss-spacing-sm)}", f = (i) => l`
|
|
3
3
|
<div class="container">
|
|
4
4
|
<div class="content">
|
|
@@ -49,4 +49,4 @@ t = x([
|
|
|
49
49
|
export {
|
|
50
50
|
t as ImportDataManagerModal
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=component-
|
|
52
|
+
//# sourceMappingURL=component-KfK2npE5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-KfK2npE5.js","sources":["../src/api/import-data-manager/component/template.ts","../src/api/import-data-manager/component/component.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { translate } from \"../../../locales\";\nimport { shellApi } from \"../../api\";\nimport { ImportDataManagerModal } from \"./component\";\n\nexport const template = (props: ImportDataManagerModal) => {\n return html`\n <div class=\"container\">\n <div class=\"content\">\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importDataActivityHistory}\"></primaria-region>\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importData}\"></primaria-region>\n </div>\n <div class=\"footer\">\n <dss-button\n label=\"${translate(\"importDataManager.actions.cancel\")}\"\n @click=\"${() => {\n props.cancel();\n }}\"\n size=\"md\"\n variant=\"secondary\"\n ></dss-button>\n <dss-button\n label=\"${translate(\"importDataManager.actions.import\")}\"\n @click=\"${() => {\n props._accept();\n }}\"\n size=\"md\"\n variant=\"primary\"\n ></dss-button>\n </div>\n </div>\n `;\n};\n","import { LitElement, css, html, unsafeCSS } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { ConfirmationContentProps } from \"../../interaction-service\";\nimport styles from \"./styles.css?inline\";\nimport { template } from \"./template\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal extends LitElement implements ConfirmationContentProps<undefined, undefined> {\n data: undefined;\n setResult: (result: undefined) => void;\n setIsValid: (isValid: boolean) => void;\n confirm: () => void;\n cancel: () => void;\n\n render() {\n return html`${template(this)}`;\n }\n\n static styles = css`\n ${unsafeCSS(styles)}\n `;\n\n _accept = () => {\n this.confirm();\n };\n}\n"],"names":["template","props","html","shellApi","translate","ImportDataManagerModal","LitElement","css","unsafeCSS","styles","__decorateClass","customElement"],"mappings":";kiCAKaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA,iCAGwBC,EAAS,cAAc,QAAQ,MAAM,yBAAyB;AAAA,iCAC9DA,EAAS,cAAc,QAAQ,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,mBAI7DC,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAH,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,mBAKQG,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAH,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AClBJ,IAAMI,IAAN,cAAqCC,EAAqE;AAAA,EAA1G,cAAA;AAAA,UAAA,GAAA,SAAA,GAeL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AAlBaK,EAWJ,SAASE;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAZVJ,IAANK,EAAA;AAAA,EADNC,EAAc,2BAA2B;AAAA,GAC7BN,CAAA;"}
|
|
@@ -9751,7 +9751,7 @@ class ImportDataManagerImpl {
|
|
|
9751
9751
|
async import(W, J) {
|
|
9752
9752
|
this.currentImporterId = W, this.currentImportParams = J, this.selectedItems = {}, this.pluginTexts = {};
|
|
9753
9753
|
try {
|
|
9754
|
-
const { ImportDataManagerModal: te } = await import("./component-
|
|
9754
|
+
const { ImportDataManagerModal: te } = await import("./component-KfK2npE5.js"), { confirmed: re } = await this.interactionService.confirm(
|
|
9755
9755
|
void 0,
|
|
9756
9756
|
{ component: te },
|
|
9757
9757
|
{
|
|
@@ -16762,29 +16762,22 @@ const bootstrapActivityHistoryItem = (X) => {
|
|
|
16762
16762
|
}))
|
|
16763
16763
|
);
|
|
16764
16764
|
}, INITIAL_SCROLLER_STATE = {
|
|
16765
|
-
|
|
16766
|
-
|
|
16767
|
-
totalHeight: 0,
|
|
16768
|
-
visibleRange: { start: 0, end: 0 },
|
|
16769
|
-
containerOffset: 0,
|
|
16770
|
-
visibleItems: []
|
|
16765
|
+
virtualItems: [],
|
|
16766
|
+
totalHeight: 0
|
|
16771
16767
|
};
|
|
16772
16768
|
class ScrollerController {
|
|
16773
16769
|
/** Setup or update the scroller with the current items. No-op until the
|
|
16774
16770
|
* viewport and content elements exist. Detects viewport swaps and re-setups. */
|
|
16775
16771
|
sync({
|
|
16776
16772
|
viewport: W,
|
|
16777
|
-
|
|
16778
|
-
|
|
16779
|
-
|
|
16780
|
-
estimatedItemHeight: oe = 200,
|
|
16781
|
-
bufferSize: ne = 50
|
|
16773
|
+
items: J,
|
|
16774
|
+
onStateChange: te,
|
|
16775
|
+
estimatedItemHeight: re = 200
|
|
16782
16776
|
}) {
|
|
16783
|
-
return
|
|
16784
|
-
items:
|
|
16785
|
-
estimatedItemHeight:
|
|
16786
|
-
|
|
16787
|
-
}), this._cleanup = this._scroller.setup(W, J, re)), this._lastViewport = W, this._scroller.getState());
|
|
16777
|
+
return W ? (this._scroller && W !== this._lastViewport && this.teardown(), this._scroller ? this._scroller.updateItems(J, te) : (this._scroller = new VirtualScroller({
|
|
16778
|
+
items: J,
|
|
16779
|
+
estimatedItemHeight: re
|
|
16780
|
+
}), this._cleanup = this._scroller.setup(W, te)), this._lastViewport = W, this._scroller.getState()) : this._scroller?.getState() ?? INITIAL_SCROLLER_STATE;
|
|
16788
16781
|
}
|
|
16789
16782
|
teardown() {
|
|
16790
16783
|
this._cleanup?.(), this._cleanup = void 0, this._scroller = void 0, this._lastViewport = void 0;
|
|
@@ -16873,7 +16866,7 @@ const isToday = (X) => {
|
|
|
16873
16866
|
`, listTemplate = (X) => X.filteredGroups?.length ? ke$1`
|
|
16874
16867
|
<div class="virtual-container">
|
|
16875
16868
|
<div class="virtual-viewport">
|
|
16876
|
-
<div class="virtual-content">
|
|
16869
|
+
<div class="virtual-content" style="height: ${X._totalHeight}px;">
|
|
16877
16870
|
<div class="virtual-items" style="transform: translateY(${X._containerOffset}px)">
|
|
16878
16871
|
${Qt(
|
|
16879
16872
|
X._visibleItems,
|
|
@@ -17033,11 +17026,39 @@ let ActivityHistoryImporter = class extends h$q {
|
|
|
17033
17026
|
diagnosticsOptions() {
|
|
17034
17027
|
return this.availableDiagnostics.map((X) => ({ label: X.description, value: X.code }));
|
|
17035
17028
|
}
|
|
17029
|
+
/**
|
|
17030
|
+
* Maps virtual scroller indices to actual filtered groups for rendering.
|
|
17031
|
+
*
|
|
17032
|
+
* The virtual scroller tells us which item positions are visible (e.g., items 5-7).
|
|
17033
|
+
* This getter translates those position numbers into the actual group objects
|
|
17034
|
+
* from filteredGroups that need to be displayed.
|
|
17035
|
+
* @example
|
|
17036
|
+
* virtualItems = [{ index: 0 }, { index: 1 }, { index: 2 }, { index: 3 }] // 4 items visible at positions 0, 1, 2, 3
|
|
17037
|
+
* returns [filteredGroups[0], [filteredGroups[1], [filteredGroups[2], [filteredGroups[3], ...] // the actual groups to render
|
|
17038
|
+
*
|
|
17039
|
+
* @returns The activity history groups currently visible in the viewport
|
|
17040
|
+
*/
|
|
17036
17041
|
get _visibleItems() {
|
|
17037
|
-
return this._virtualScrollerState.
|
|
17042
|
+
return this._virtualScrollerState.virtualItems.map((X) => this.filteredGroups?.[X.index]).filter(Boolean);
|
|
17038
17043
|
}
|
|
17044
|
+
/**
|
|
17045
|
+
* Calculates the vertical offset (in pixels) to position the visible items.
|
|
17046
|
+
*
|
|
17047
|
+
* When scrolling, visible items are positioned using CSS `transform: translateY()`.
|
|
17048
|
+
* This getter returns how many pixels to shift the container down so the visible
|
|
17049
|
+
* items appear in the correct scroll position.
|
|
17050
|
+
*
|
|
17051
|
+
* @example
|
|
17052
|
+
* First visible item is at pixel 5000 → returns 5000
|
|
17053
|
+
* CSS applies: transform: translateY(5000px)
|
|
17054
|
+
*
|
|
17055
|
+
* @returns Vertical offset in pixels for the items container
|
|
17056
|
+
*/
|
|
17039
17057
|
get _containerOffset() {
|
|
17040
|
-
return this._virtualScrollerState.
|
|
17058
|
+
return this._virtualScrollerState.virtualItems[0]?.start ?? 0;
|
|
17059
|
+
}
|
|
17060
|
+
get _totalHeight() {
|
|
17061
|
+
return this._virtualScrollerState.totalHeight;
|
|
17041
17062
|
}
|
|
17042
17063
|
// ── Private helpers ─────────────────────────────────────────────────────
|
|
17043
17064
|
_clearSearchTimeout() {
|
|
@@ -17067,7 +17088,6 @@ let ActivityHistoryImporter = class extends h$q {
|
|
|
17067
17088
|
_syncVirtualScroller() {
|
|
17068
17089
|
this._virtualScrollerState = this._scrollerController.sync({
|
|
17069
17090
|
viewport: this._viewport,
|
|
17070
|
-
content: this._content,
|
|
17071
17091
|
items: this.filteredGroups,
|
|
17072
17092
|
onStateChange: (X) => {
|
|
17073
17093
|
this._virtualScrollerState = X, this.requestUpdate();
|
|
@@ -17142,9 +17162,6 @@ __decorateClass$k([
|
|
|
17142
17162
|
__decorateClass$k([
|
|
17143
17163
|
e$Q(".virtual-viewport")
|
|
17144
17164
|
], ActivityHistoryImporter.prototype, "_viewport", 2);
|
|
17145
|
-
__decorateClass$k([
|
|
17146
|
-
e$Q(".virtual-content")
|
|
17147
|
-
], ActivityHistoryImporter.prototype, "_content", 2);
|
|
17148
17165
|
__decorateClass$k([
|
|
17149
17166
|
r$I()
|
|
17150
17167
|
], ActivityHistoryImporter.prototype, "_virtualScrollerState", 2);
|
|
@@ -53085,4 +53102,4 @@ export {
|
|
|
53085
53102
|
l as y,
|
|
53086
53103
|
PrimariaInteractionService as z
|
|
53087
53104
|
};
|
|
53088
|
-
//# sourceMappingURL=index-
|
|
53105
|
+
//# sourceMappingURL=index-0V-xXwce.js.map
|