@uxland/primary-shell 7.44.1 → 7.44.3
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-C7UiE5Lw.js → component-VhfkTmHG.js} +2 -2
- package/dist/{component-C7UiE5Lw.js.map → component-VhfkTmHG.js.map} +1 -1
- package/dist/{index-DasFWYhc.js → index-D-GssSmM.js} +99 -82
- package/dist/index-D-GssSmM.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +15 -14
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/index-DasFWYhc.js.map +0 -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-D-GssSmM.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-VhfkTmHG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-VhfkTmHG.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;"}
|
|
@@ -9841,7 +9841,7 @@ class ImportDataManagerImpl {
|
|
|
9841
9841
|
async import(W, X) {
|
|
9842
9842
|
this.currentImporterId = W, this.currentImportParams = X, this.selectedItems = {}, this.pluginTexts = {};
|
|
9843
9843
|
try {
|
|
9844
|
-
const { ImportDataManagerModal: te } = await import("./component-
|
|
9844
|
+
const { ImportDataManagerModal: te } = await import("./component-VhfkTmHG.js"), { confirmed: re } = await this.interactionService.confirm(
|
|
9845
9845
|
void 0,
|
|
9846
9846
|
{ component: te },
|
|
9847
9847
|
{
|
|
@@ -11606,6 +11606,7 @@ const initializeLocalization = async (J) => {
|
|
|
11606
11606
|
refresh: "Actualitzar",
|
|
11607
11607
|
entryLegend: "Llegenda entrades",
|
|
11608
11608
|
maximizeButton: "Botó maximitzar",
|
|
11609
|
+
minimizeButton: "Botó minimitzar",
|
|
11609
11610
|
menuButton: "Botó menu"
|
|
11610
11611
|
},
|
|
11611
11612
|
modal: {
|
|
@@ -12198,23 +12199,19 @@ const groupActivityHistoryItems = (J) => {
|
|
|
12198
12199
|
const ne = re.items[0], de = oe.items[0];
|
|
12199
12200
|
return !ne || !de ? 0 : getDateObject(de.date).getTime() - getDateObject(ne.date).getTime();
|
|
12200
12201
|
}), groupByValidDiagnostics(te), te;
|
|
12202
|
+
}, getMostRecentDate = (J) => J.reduce((W, X) => {
|
|
12203
|
+
const te = new Date(X.date);
|
|
12204
|
+
return te > W ? te : W;
|
|
12205
|
+
}, /* @__PURE__ */ new Date(0)), getSubGroupMostRecentDate = (J) => getMostRecentDate(J.items), getGroupMostRecentDate = (J) => {
|
|
12206
|
+
const W = J.items.length > 0 ? [getMostRecentDate(J.items)] : [], X = J.subGroups.map(getSubGroupMostRecentDate), te = [...W, ...X];
|
|
12207
|
+
return te.length > 0 ? new Date(Math.max(...te.map((re) => re.getTime()))) : /* @__PURE__ */ new Date(0);
|
|
12201
12208
|
}, sortGroupsByMostRecentDate = (J) => {
|
|
12202
|
-
const W = (
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
};
|
|
12209
|
-
return J.forEach((oe) => {
|
|
12210
|
-
oe.items = X(oe.items), oe.subGroups.forEach((ne) => {
|
|
12211
|
-
ne.items = X(ne.items);
|
|
12212
|
-
}), oe.subGroups.sort(
|
|
12213
|
-
(ne, de) => te(de).getTime() - te(ne).getTime()
|
|
12214
|
-
);
|
|
12215
|
-
}), J.sort(
|
|
12216
|
-
(oe, ne) => re(ne).getTime() - re(oe).getTime()
|
|
12217
|
-
);
|
|
12209
|
+
const W = (X) => X.sort((te, re) => new Date(re.date).getTime() - new Date(te.date).getTime());
|
|
12210
|
+
return J.forEach((X) => {
|
|
12211
|
+
X.items = W(X.items), X.subGroups.forEach((te) => {
|
|
12212
|
+
te.items = W(te.items);
|
|
12213
|
+
}), X.subGroups.sort((te, re) => getSubGroupMostRecentDate(re).getTime() - getSubGroupMostRecentDate(te).getTime());
|
|
12214
|
+
}), J.sort((X, te) => getGroupMostRecentDate(te).getTime() - getGroupMostRecentDate(X).getTime());
|
|
12218
12215
|
}, activityHistorySearchStringSelector = (J) => J.activityHistoryFilters.searchString, activityHistoryCollectionsSelector = (J) => J.activityHistoryCollections.collections, historyDataImporterRulesByCollectionIdSelector = createSelector(
|
|
12219
12216
|
activityHistoryCollectionsSelector,
|
|
12220
12217
|
(J) => {
|
|
@@ -12653,27 +12650,6 @@ const bootstrapSetUpFilter = (J) => {
|
|
|
12653
12650
|
}, teardownFilters = () => {
|
|
12654
12651
|
teardownSetCommonFilter(), teardownAddCustomFilter(), teardownSetCustomFilterGroup(), teardownSetCustomFilterValue(), teardownSetCustomFilterAllValues(), teardownSetDiagnosticFilter(), teardownDeleteDiagnosticFilterValue(), teardownAddUpFilter(), teardownSetUpFilter(), teardownResetFilters();
|
|
12655
12652
|
};
|
|
12656
|
-
/**
|
|
12657
|
-
* @license
|
|
12658
|
-
* Copyright 2017 Google LLC
|
|
12659
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
12660
|
-
*/
|
|
12661
|
-
class le extends i$P {
|
|
12662
|
-
constructor(W) {
|
|
12663
|
-
if (super(W), this.it = D$4, W.type !== t$u.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
12664
|
-
}
|
|
12665
|
-
render(W) {
|
|
12666
|
-
if (W === D$4 || W == null) return this._t = void 0, this.it = W;
|
|
12667
|
-
if (W === R$5) return W;
|
|
12668
|
-
if (typeof W != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
12669
|
-
if (W === this.it) return this._t;
|
|
12670
|
-
this.it = W;
|
|
12671
|
-
const X = [W];
|
|
12672
|
-
return X.raw = X, this._t = { _$litType$: this.constructor.resultType, strings: X, values: [] };
|
|
12673
|
-
}
|
|
12674
|
-
}
|
|
12675
|
-
le.directiveName = "unsafeHTML", le.resultType = 1;
|
|
12676
|
-
const ae = e$O(le), styles$l = ":host{min-height:1px;display:flex;flex-direction:column;flex:1 1 0%}.virtual-container{height:100%;position:relative}.virtual-viewport{height:100%;overflow:auto;padding-inline:16px}.virtual-content{position:relative;width:100%}.virtual-items{position:relative}.container{min-height:1px;height:100%}.visit:first-child{margin-top:var(--dss-spacing-md)}.visit{width:calc(100% - var(--dss-spacing-md) - var(--dss-spacing-md));display:flex;flex-direction:column;gap:var(--dss-spacing-sm);background-color:#fff;border-radius:var(--dss-radius-sm);padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-md)}.visit .visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit .visit__header .title-date{font-weight:700}.visit .visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit .visit__header .highlight{background-color:#ff0;font-weight:700}.visit .visit__items{display:flex;flex-direction:column;gap:var(--dss-spacing-sm)}.visit .visit__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .visit__items .item[has-divider]:last-of-type{border:none}.visit .diagnostics{display:flex;flex-direction:column;gap:var(--dss-spacing-sm);border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics:last-of-type{border:none}.visit .diagnostics .diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap}.visit .diagnostics .diagnostics__items{display:flex;flex-direction:column}.visit .diagnostics .diagnostics__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics .diagnostics__items .item[has-divider]:last-of-type{border:none}.feedback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}";
|
|
12677
12653
|
function toDate(J) {
|
|
12678
12654
|
const W = Object.prototype.toString.call(J);
|
|
12679
12655
|
return J instanceof Date || typeof J == "object" && W === "[object Date]" ? new J.constructor(+J) : typeof J == "number" || W === "[object Number]" || typeof J == "string" || W === "[object String]" ? new Date(J) : /* @__PURE__ */ new Date(NaN);
|
|
@@ -15449,6 +15425,27 @@ function parse(J, W, X, te) {
|
|
|
15449
15425
|
function cleanEscapedString(J) {
|
|
15450
15426
|
return J.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
15451
15427
|
}
|
|
15428
|
+
/**
|
|
15429
|
+
* @license
|
|
15430
|
+
* Copyright 2017 Google LLC
|
|
15431
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
15432
|
+
*/
|
|
15433
|
+
class le extends i$P {
|
|
15434
|
+
constructor(W) {
|
|
15435
|
+
if (super(W), this.it = D$4, W.type !== t$u.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
15436
|
+
}
|
|
15437
|
+
render(W) {
|
|
15438
|
+
if (W === D$4 || W == null) return this._t = void 0, this.it = W;
|
|
15439
|
+
if (W === R$5) return W;
|
|
15440
|
+
if (typeof W != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
15441
|
+
if (W === this.it) return this._t;
|
|
15442
|
+
this.it = W;
|
|
15443
|
+
const X = [W];
|
|
15444
|
+
return X.raw = X, this._t = { _$litType$: this.constructor.resultType, strings: X, values: [] };
|
|
15445
|
+
}
|
|
15446
|
+
}
|
|
15447
|
+
le.directiveName = "unsafeHTML", le.resultType = 1;
|
|
15448
|
+
const ae = e$O(le), styles$l = ":host{min-height:1px;display:flex;flex-direction:column;flex:1 1 0%}.virtual-container{height:100%;position:relative}.virtual-viewport{height:100%;overflow:auto;padding-inline:16px}.virtual-content{position:relative;width:100%}.virtual-items{position:relative}.container{min-height:1px;height:100%}.visit:first-child{margin-top:var(--dss-spacing-md)}.visit{width:calc(100% - var(--dss-spacing-md) - var(--dss-spacing-md));display:flex;flex-direction:column;gap:var(--dss-spacing-sm);background-color:#fff;border-radius:var(--dss-radius-sm);padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-md)}.visit .visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit .visit__header .title-date{font-weight:700}.visit .visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit .visit__header .highlight{background-color:#ff0;font-weight:700}.visit .visit__items{display:flex;flex-direction:column;gap:var(--dss-spacing-sm)}.visit .visit__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .visit__items .item[has-divider]:last-of-type{border:none}.visit .diagnostics{display:flex;flex-direction:column;gap:var(--dss-spacing-sm);border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics:last-of-type{border:none}.visit .diagnostics .diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap}.visit .diagnostics .diagnostics__items{display:flex;flex-direction:column}.visit .diagnostics .diagnostics__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics .diagnostics__items .item[has-divider]:last-of-type{border:none}.feedback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}";
|
|
15452
15449
|
/**
|
|
15453
15450
|
* @license
|
|
15454
15451
|
* Copyright 2018 Google LLC
|
|
@@ -16340,8 +16337,17 @@ class VirtualScroller {
|
|
|
16340
16337
|
measureElement(W) {
|
|
16341
16338
|
this._virtualizer?.measureElement(W);
|
|
16342
16339
|
}
|
|
16343
|
-
scrollToIndex(W, X = "smooth") {
|
|
16344
|
-
this._virtualizer?.scrollToIndex(W, { behavior: X });
|
|
16340
|
+
scrollToIndex(W, X = "smooth", te = "auto") {
|
|
16341
|
+
this._virtualizer?.scrollToIndex(W, { behavior: X, align: te });
|
|
16342
|
+
}
|
|
16343
|
+
/**
|
|
16344
|
+
* Estimated `start` offset (px) of an item, using real measurements where
|
|
16345
|
+
* available and the size estimate for not-yet-rendered items. Used to jump
|
|
16346
|
+
* the viewport near a target before a precise DOM-based alignment, instead of
|
|
16347
|
+
* `scrollToIndex` (whose reconcile re-scrolls every frame and froze the UI).
|
|
16348
|
+
*/
|
|
16349
|
+
getOffsetForIndex(W) {
|
|
16350
|
+
return this._virtualizer?.getOffsetForIndex(W, "start")?.[0] ?? 0;
|
|
16345
16351
|
}
|
|
16346
16352
|
getState() {
|
|
16347
16353
|
return {
|
|
@@ -16349,13 +16355,6 @@ class VirtualScroller {
|
|
|
16349
16355
|
totalHeight: this._virtualizer?.getTotalSize() ?? 0
|
|
16350
16356
|
};
|
|
16351
16357
|
}
|
|
16352
|
-
findClosestIndex(W, X, te) {
|
|
16353
|
-
let re = -1, oe = Number.POSITIVE_INFINITY;
|
|
16354
|
-
return this._options.items.forEach((ne, de) => {
|
|
16355
|
-
const ce = Math.abs(te(W(ne), X));
|
|
16356
|
-
ce < oe && (oe = ce, re = de);
|
|
16357
|
-
}), re;
|
|
16358
|
-
}
|
|
16359
16358
|
}
|
|
16360
16359
|
var __defProp$o = Object.defineProperty, __getOwnPropDesc$d = Object.getOwnPropertyDescriptor, __decorateClass$r = (J, W, X, te) => {
|
|
16361
16360
|
for (var re = te > 1 ? void 0 : te ? __getOwnPropDesc$d(W, X) : W, oe = J.length - 1, ne; oe >= 0; oe--)
|
|
@@ -16413,18 +16412,40 @@ let ActivityHistoryTimeline = class extends h$p {
|
|
|
16413
16412
|
highlighted(J) {
|
|
16414
16413
|
return J ? ae(this.highlightMatch(J, this.searchString)) : null;
|
|
16415
16414
|
}
|
|
16416
|
-
// Public API
|
|
16415
|
+
// Public API: scroll the timeline to a given date ("Anar a data").
|
|
16416
|
+
//
|
|
16417
|
+
// The list is sorted newest -> oldest by `getGroupMostRecentDate` (the same key
|
|
16418
|
+
// is used here so the mapping date->index is monotonic). We compare at *day*
|
|
16419
|
+
// granularity because `selectedDate` is midnight while group dates carry a time
|
|
16420
|
+
// of day. We land on the first (topmost) group whose day is on or before the
|
|
16421
|
+
// requested day — i.e. the requested day if it has entries, otherwise the
|
|
16422
|
+
// closest earlier day (newer entries above, older below). Using an absolute
|
|
16423
|
+
// nearest-timestamp search here is what produced the "jumps to another year"
|
|
16424
|
+
// and "lands on the day before" bugs.
|
|
16417
16425
|
_scrollIntoDate(J) {
|
|
16418
|
-
if (!this._virtualScroller) return;
|
|
16419
|
-
const W = this.
|
|
16420
|
-
|
|
16421
|
-
|
|
16422
|
-
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
|
|
16426
|
-
|
|
16427
|
-
|
|
16426
|
+
if (!this._virtualScroller || !this._viewport) return;
|
|
16427
|
+
const W = this.historyGroups ?? [];
|
|
16428
|
+
if (!W.length) return;
|
|
16429
|
+
const X = startOfDay(J).getTime(), te = (oe) => startOfDay(getGroupMostRecentDate(oe)).getTime();
|
|
16430
|
+
let re = W.findIndex((oe) => te(oe) <= X);
|
|
16431
|
+
re === -1 && (re = W.length - 1), this._viewport.scrollTop = this._virtualScroller.getOffsetForIndex(re), this._alignGroupTop(re, 0);
|
|
16432
|
+
}
|
|
16433
|
+
// Align the top of group `index`'s rendered element with the top of the
|
|
16434
|
+
// viewport, using its real on-screen position (not the size estimate, which
|
|
16435
|
+
// is off for very tall visits). Bounded to a few frames so it converges
|
|
16436
|
+
// without ever turning into a scroll loop.
|
|
16437
|
+
_alignGroupTop(J, W) {
|
|
16438
|
+
W >= 4 || !this._viewport || requestAnimationFrame(() => {
|
|
16439
|
+
const X = this._viewport;
|
|
16440
|
+
if (!X) return;
|
|
16441
|
+
const te = this.renderRoot?.querySelector(`.visit[data-index="${J}"]`);
|
|
16442
|
+
if (!te) {
|
|
16443
|
+
this._alignGroupTop(J, W + 1);
|
|
16444
|
+
return;
|
|
16445
|
+
}
|
|
16446
|
+
const re = Math.round(te.getBoundingClientRect().top - X.getBoundingClientRect().top);
|
|
16447
|
+
Math.abs(re) <= 1 || (X.scrollTop += re, this._alignGroupTop(J, W + 1));
|
|
16448
|
+
});
|
|
16428
16449
|
}
|
|
16429
16450
|
// === VIRTUAL SCROLLER LOGIC ===
|
|
16430
16451
|
_setupVirtualScroller() {
|
|
@@ -16432,14 +16453,11 @@ let ActivityHistoryTimeline = class extends h$p {
|
|
|
16432
16453
|
items: this.historyGroups || [],
|
|
16433
16454
|
estimatedItemHeight: 200,
|
|
16434
16455
|
overscan: 8
|
|
16435
|
-
}), this._cleanupVirtualScroller = this._virtualScroller.setup(
|
|
16436
|
-
this.
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
|
|
16440
|
-
});
|
|
16441
|
-
}
|
|
16442
|
-
), this._virtualScrollerState = this._virtualScroller.getState());
|
|
16456
|
+
}), this._cleanupVirtualScroller = this._virtualScroller.setup(this._viewport, (J) => {
|
|
16457
|
+
this._virtualScrollerState = J, this.requestUpdate(), this.api?.broker && this.searchString && this.api.broker.publish(this.api.broker.events.activityHistory.searched, {
|
|
16458
|
+
searchQuery: this.searchString
|
|
16459
|
+
});
|
|
16460
|
+
}), this._virtualScrollerState = this._virtualScroller.getState());
|
|
16443
16461
|
}
|
|
16444
16462
|
_updateVirtualScroller() {
|
|
16445
16463
|
!this._virtualScroller || !this.historyGroups?.length || (this._virtualScroller.updateItems(this.historyGroups, (J) => {
|
|
@@ -16951,12 +16969,7 @@ const bootstrapActivityHistoryItem = (J) => {
|
|
|
16951
16969
|
class ScrollerController {
|
|
16952
16970
|
/** Setup or update the scroller with the current items. No-op until the
|
|
16953
16971
|
* viewport and content elements exist. Detects viewport swaps and re-setups. */
|
|
16954
|
-
sync({
|
|
16955
|
-
viewport: W,
|
|
16956
|
-
items: X,
|
|
16957
|
-
onStateChange: te,
|
|
16958
|
-
estimatedItemHeight: re = 200
|
|
16959
|
-
}) {
|
|
16972
|
+
sync({ viewport: W, items: X, onStateChange: te, estimatedItemHeight: re = 200 }) {
|
|
16960
16973
|
return W ? (this._scroller && W !== this._lastViewport && this.teardown(), this._scroller ? this._scroller.updateItems(X, te) : (this._scroller = new VirtualScroller({
|
|
16961
16974
|
items: X,
|
|
16962
16975
|
estimatedItemHeight: re
|
|
@@ -16973,9 +16986,6 @@ class ScrollerController {
|
|
|
16973
16986
|
measureElement(W) {
|
|
16974
16987
|
this._scroller?.measureElement(W);
|
|
16975
16988
|
}
|
|
16976
|
-
findClosestIndex(W, X, te) {
|
|
16977
|
-
return this._scroller?.findClosestIndex(W, X, te) ?? -1;
|
|
16978
|
-
}
|
|
16979
16989
|
}
|
|
16980
16990
|
const isToday = (J) => {
|
|
16981
16991
|
const W = new Date(J), X = /* @__PURE__ */ new Date();
|
|
@@ -17358,7 +17368,7 @@ __decorateClass$k([
|
|
|
17358
17368
|
ActivityHistoryImporter = __decorateClass$k([
|
|
17359
17369
|
t$x("activity-history-importer")
|
|
17360
17370
|
], ActivityHistoryImporter);
|
|
17361
|
-
const styles$c = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{display:flex;flex-direction:column;width:100%;border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm)}.container[maximized]{position:absolute;background:#fff;top:0;left:0;bottom:0;border:none}.container[maximized] .header-maximized-container{display:flex;flex-direction:column}.container[maximized] .header-maximized-container .header__maximized{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;padding-top:
|
|
17371
|
+
const styles$c = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{display:flex;flex-direction:column;width:100%;border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm)}.container[maximized]{position:absolute;background:#fff;top:0;left:0;bottom:0;border:none}.container[maximized] .header-maximized-container{display:flex;flex-direction:column}.container[maximized] .header-maximized-container .header__maximized{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;padding-top:12px;padding-bottom:12px;padding-inline:40px}.container[maximized] .header-maximized-container .header__maximized .header__maximized__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container[maximized] .header-maximized-container .header__maximized .title{color:var(--color-neutral-900);font-weight:700;font-size:20px;line-height:30px;white-space:nowrap}.container[maximized] .header-maximized-container .header__maximized .options{display:flex;align-items:center;color:var(--color-primary-400);font-weight:600;font-size:14px;line-height:24px;cursor:pointer}.container[maximized] .header-maximized-container .header__maximized .header__maximized__left{display:flex;flex-direction:row;gap:24px;align-items:center;width:100%}.container[maximized] .header-maximized-container .header__maximized .header__maximized__right{display:flex;flex-direction:row;gap:16px;align-items:center}.container[maximized] .wrapper{height:calc(100vh - 175px);border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm);margin-bottom:24px;margin-inline:40px;width:calc(100% - 80px)}.container .header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgb(189,189,189);gap:16px}.container .header .header__left{display:flex;flex-direction:row;align-items:center;flex:1;gap:16px}.container .header .header__left .title{color:var(--color-neutral-800);font-weight:700;font-size:16px;line-height:24px;white-space:nowrap}.container .header .header__right{display:flex;flex-direction:row;align-items:center;gap:8px}.container .header .header__right .action-icons{display:flex;align-items:center}.container .wrapper{display:flex;flex-direction:row;min-height:1px;width:100%;height:100%}.container .wrapper[maximized] .content{width:100%;background:var(--color-neutral-50);border-top-right-radius:var(--dss-radius-sm);display:flex;flex-direction:column}.container .wrapper .content{width:100%;background:var(--color-neutral-50);border-bottom-right-radius:var(--dss-radius-sm);overflow:hidden;display:flex;flex-direction:column}", template$d = (J) => ke$1`<div class="container" ?maximized=${J.maximized}>
|
|
17362
17372
|
${J.maximized ? ke$1`${headerMaximizedTemplate(J)}` : ke$1`<div class="header">
|
|
17363
17373
|
<div class="header__left">
|
|
17364
17374
|
<div class="title">${translate("activityHistory")}</div>
|
|
@@ -17372,8 +17382,8 @@ const styles$c = ":host{display:flex;min-height:1px;height:100%;width:100%}.cont
|
|
|
17372
17382
|
<div class="header__right">
|
|
17373
17383
|
<dss-icon-button tooltipFixed @click=${() => J._refreshHistory()} size="md" variant="primary" icon="refresh" label=${translate("actions.refresh")}></dss-icon-button>
|
|
17374
17384
|
<div>|</div>
|
|
17375
|
-
<dss-icon-button tooltipFixed @click=${() => J._maximize()} size="md" variant="primary" icon="
|
|
17376
|
-
|
|
17385
|
+
<dss-icon-button tooltipFixed @click=${() => J._maximize()} size="md" variant="primary" icon="open_in_full" label=${translate("actions.maximizeButton")}></dss-icon-button>
|
|
17386
|
+
${J.isAdministrative ? D$4 : ke$1`<div>|</div>
|
|
17377
17387
|
<div>
|
|
17378
17388
|
<dss-icon-button tooltipFixed size="md" variant="primary" icon="more_vert" label=${translate("actions.menuButton")}></dss-icon-button>
|
|
17379
17389
|
<dss-action-menu position="bottom-start">
|
|
@@ -17381,8 +17391,8 @@ const styles$c = ":host{display:flex;min-height:1px;height:100%;width:100%}.cont
|
|
|
17381
17391
|
<!-- <dss-action-menu-item lefticon="file_download" label=${translate("actions.exportPdf")} @click=${() => J.api.broker.send(new ExportPdf())}></dss-action-menu-item> -->
|
|
17382
17392
|
<!-- <dss-action-menu-item lefticon="info" label=${translate("actions.entryLegend")}></dss-action-menu-item> -->
|
|
17383
17393
|
</dss-action-menu>
|
|
17384
|
-
</div
|
|
17385
|
-
</div>
|
|
17394
|
+
</div>`}
|
|
17395
|
+
</div>
|
|
17386
17396
|
</div>`}
|
|
17387
17397
|
<div class="wrapper" ?maximized=${J.maximized}>
|
|
17388
17398
|
<activity-history-filters .wrapperMaximized=${J.maximized}></activity-history-filters>
|
|
@@ -17411,7 +17421,8 @@ const styles$c = ":host{display:flex;min-height:1px;height:100%;width:100%}.cont
|
|
|
17411
17421
|
</dss-action-menu>
|
|
17412
17422
|
</div> -->
|
|
17413
17423
|
<!-- <dss-button label="${translate("actions.entryLegend")}" size="md" variant="secondary" icon="info"></dss-button> -->
|
|
17414
|
-
|
|
17424
|
+
${J.isAdministrative ? D$4 : ke$1`<dss-button label="${translate("actions.cronogram")}" size="md" variant="primary" icon="view_timeline" @click=${J._raiseEcapCronogramEvent}></dss-button>`}
|
|
17425
|
+
<dss-icon-button tooltipFixed @click=${() => J._minimize()} size="md" variant="primary" icon="close_fullscreen" label=${translate("actions.minimizeButton")}></dss-icon-button>
|
|
17415
17426
|
</div>
|
|
17416
17427
|
</div>
|
|
17417
17428
|
</div>
|
|
@@ -17437,6 +17448,12 @@ let ActivityHistoryMain = class extends PrimariaRegionHost(h$p) {
|
|
|
17437
17448
|
firstUpdated() {
|
|
17438
17449
|
super.firstUpdated(), this._subscribeEvents();
|
|
17439
17450
|
}
|
|
17451
|
+
// Administrative users cannot trigger the cronogram action, so the actions
|
|
17452
|
+
// that expose it (the 3-dots menu and the maximized cronogram button) are
|
|
17453
|
+
// hidden for them.
|
|
17454
|
+
get isAdministrative() {
|
|
17455
|
+
return !!this.api?.userManager?.isUserRoleAdministrative();
|
|
17456
|
+
}
|
|
17440
17457
|
_maximize() {
|
|
17441
17458
|
this.maximized = !0;
|
|
17442
17459
|
}
|
|
@@ -53529,4 +53546,4 @@ export {
|
|
|
53529
53546
|
primariaApiFactory as y,
|
|
53530
53547
|
PrimariaContentSwitcher as z
|
|
53531
53548
|
};
|
|
53532
|
-
//# sourceMappingURL=index-
|
|
53549
|
+
//# sourceMappingURL=index-D-GssSmM.js.map
|