@luzmo/analytics-components-kit 1.0.3-beta.2 → 1.0.3-beta.4
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/components/ai-chat/ai-chat.d.ts +5 -0
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.js +1 -1
- package/components/{ai-chat-B3XMQ4FF.js → ai-chat-D2L9_kci.js} +13 -4
- package/components/{ai-chat-BKbda6Jf.cjs → ai-chat-O_MP_k1b.cjs} +4 -3
- package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +5 -0
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +1 -1
- package/components/{ai-interaction-textarea-DN_4VEGt.js → ai-interaction-textarea-BJHzUcBF.js} +8 -5
- package/components/{ai-interaction-textarea-5NRTJJHU.cjs → ai-interaction-textarea-Bd1AGBmB.cjs} +3 -3
- package/components/dataset-icon/index.cjs +1 -1
- package/components/dataset-icon/index.js +1 -1
- package/components/dataset-icon-DCvy3NSz.cjs +64 -0
- package/components/dataset-icon-DVvk1RBl.js +125 -0
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +1 -1
- package/components/{dataset-selector-list-CDnscsCR.js → dataset-selector-list-CXnDkIe2.js} +1 -1
- package/components/{dataset-selector-list-qAMl0vM_.cjs → dataset-selector-list-DbCmavOc.cjs} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +1 -1
- package/components/{dataset-selector-row-BEb7JPYp.cjs → dataset-selector-row-D1U4ltKv.cjs} +6 -3
- package/components/{dataset-selector-row-CREcjG-H.js → dataset-selector-row-HFt4sJN8.js} +7 -4
- package/components/index.cjs +1 -1
- package/components/index.js +5 -5
- package/custom-elements.json +46 -0
- package/package.json +1 -1
- package/components/dataset-icon-BmwtUZTc.js +0 -125
- package/components/dataset-icon-DF9jlsN0.cjs +0 -64
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
|
7
|
+
* This license allows users with a current active Luzmo account
|
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
+
*
|
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
+
* SOFTWARE.
|
|
19
|
+
* */
|
|
20
|
+
import { t as e } from "./decorate-DKLaHs_w.js";
|
|
21
|
+
import { luzmoFileUploadOutline as t, luzmoIcon as n, luzmoPlugin as r } from "@luzmo/icons";
|
|
22
|
+
import { LitElement as i, html as a, unsafeCSS as o } from "lit";
|
|
23
|
+
import { property as s } from "lit/decorators.js";
|
|
24
|
+
//#region src/components/dataset-icon/dataset-icon.module.scss?inline
|
|
25
|
+
var c = ".dataset-icon{flex-shrink:0;justify-content:center;align-items:center;display:flex}.dataset-icon .public-connector{overflow:hidden}.dataset-icon .public-connector img{object-fit:cover;display:block}.dataset-icon [class*=public-connector-]{background-position:50%;background-repeat:no-repeat;background-size:cover;width:100%;height:100%}.dataset-icon .public-connector-16,.dataset-icon .public-connector-24,.dataset-icon .public-connector-32{background-image:var(--connector-sprite-64x64)}.dataset-icon .public-connector-48,.dataset-icon .public-connector-64{background-image:var(--connector-sprite-96x96)}.dataset-icon .text-primary{color:var(--luzmo-primary,#007bff);justify-content:center;align-items:center;display:flex}.dataset-icon .text-primary.upload-icon,.dataset-icon .text-primary.plugin-icon{width:100%;height:100%}.public-connector-16.amazonathena{background-position:0 0}.public-connector-16.asana{background-position:0 -16px}.public-connector-16.bigquery{background-position:0 -32px}.public-connector-16.citybikes{background-position:0 -48px}.public-connector-16.clickhouse{background-position:0 -64px}.public-connector-16.demodataplugin{background-position:0 -80px}.public-connector-16.elasticsearch{background-position:0 -96px}.public-connector-16.exactonline,.public-connector-16.exactonlinenl{background-position:0 -112px}.public-connector-16.google{background-position:0 -128px}.public-connector-16.googleanalytics,.public-connector-16.googleanalyticsv4{background-position:0 -144px}.public-connector-16.googledrive{background-position:0 -160px}.public-connector-16.hubspot{background-position:0 -176px}.public-connector-16.lobbipad{background-position:0 -192px}.public-connector-16.mailchimp{background-position:0 -208px}.public-connector-16.mariadb{background-position:0 -224px}.public-connector-16.mongodb{background-position:0 -240px}.public-connector-16.mysql{background-position:0 -256px}.public-connector-16.oracle{background-position:0 -272px}.public-connector-16.panoply{background-position:0 -288px}.public-connector-16.pipedrive{background-position:0 -304px}.public-connector-16.pipelinedb{background-position:0 -320px}.public-connector-16.postgresql{background-position:0 -336px}.public-connector-16.presto{background-position:0 -352px}.public-connector-16.redshift{background-position:0 -368px}.public-connector-16.salesforce{background-position:0 -384px}.public-connector-16.saphana{background-position:0 -400px}.public-connector-16.snowflake{background-position:0 -416px}.public-connector-16.sqlserver{background-position:0 -432px}.public-connector-16.stardog{background-position:0 -448px}.public-connector-16.synapse{background-position:0 -464px}.public-connector-16.teamleader{background-position:0 -480px}.public-connector-16.trino{background-position:0 -496px}.public-connector-16.typeform{background-position:0 -512px}.public-connector-16.zendesk{background-position:0 -528px}.public-connector-24.amazonathena{background-position:0 0}.public-connector-24.asana{background-position:0 -24px}.public-connector-24.bigquery{background-position:0 -48px}.public-connector-24.citybikes{background-position:0 -72px}.public-connector-24.clickhouse{background-position:0 -96px}.public-connector-24.demodataplugin{background-position:0 -120px}.public-connector-24.elasticsearch{background-position:0 -144px}.public-connector-24.exactonline,.public-connector-24.exactonlinenl{background-position:0 -168px}.public-connector-24.google{background-position:0 -192px}.public-connector-24.googleanalytics,.public-connector-24.googleanalyticsv4{background-position:0 -216px}.public-connector-24.googledrive{background-position:0 -240px}.public-connector-24.hubspot{background-position:0 -264px}.public-connector-24.lobbipad{background-position:0 -288px}.public-connector-24.mailchimp{background-position:0 -312px}.public-connector-24.mariadb{background-position:0 -336px}.public-connector-24.mongodb{background-position:0 -360px}.public-connector-24.mysql{background-position:0 -384px}.public-connector-24.oracle{background-position:0 -408px}.public-connector-24.panoply{background-position:0 -432px}.public-connector-24.pipedrive{background-position:0 -456px}.public-connector-24.pipelinedb{background-position:0 -480px}.public-connector-24.postgresql{background-position:0 -504px}.public-connector-24.presto{background-position:0 -528px}.public-connector-24.redshift{background-position:0 -552px}.public-connector-24.salesforce{background-position:0 -576px}.public-connector-24.saphana{background-position:0 -600px}.public-connector-24.snowflake{background-position:0 -624px}.public-connector-24.sqlserver{background-position:0 -648px}.public-connector-24.stardog{background-position:0 -672px}.public-connector-24.synapse{background-position:0 -696px}.public-connector-24.teamleader{background-position:0 -720px}.public-connector-24.trino{background-position:0 -744px}.public-connector-24.typeform{background-position:0 -768px}.public-connector-24.zendesk{background-position:0 -792px}.public-connector-32.amazonathena{background-position:0 0}.public-connector-32.asana{background-position:0 -32px}.public-connector-32.bigquery{background-position:0 -64px}.public-connector-32.citybikes{background-position:0 -96px}.public-connector-32.clickhouse{background-position:0 -128px}.public-connector-32.demodataplugin{background-position:0 -160px}.public-connector-32.elasticsearch{background-position:0 -192px}.public-connector-32.exactonline,.public-connector-32.exactonlinenl{background-position:0 -224px}.public-connector-32.google{background-position:0 -256px}.public-connector-32.googleanalytics,.public-connector-32.googleanalyticsv4{background-position:0 -288px}.public-connector-32.googledrive{background-position:0 -320px}.public-connector-32.hubspot{background-position:0 -352px}.public-connector-32.lobbipad{background-position:0 -384px}.public-connector-32.mailchimp{background-position:0 -416px}.public-connector-32.mariadb{background-position:0 -448px}.public-connector-32.mongodb{background-position:0 -480px}.public-connector-32.mysql{background-position:0 -512px}.public-connector-32.oracle{background-position:0 -544px}.public-connector-32.panoply{background-position:0 -576px}.public-connector-32.pipedrive{background-position:0 -608px}.public-connector-32.pipelinedb{background-position:0 -640px}.public-connector-32.postgresql{background-position:0 -672px}.public-connector-32.presto{background-position:0 -704px}.public-connector-32.redshift{background-position:0 -736px}.public-connector-32.salesforce{background-position:0 -768px}.public-connector-32.saphana{background-position:0 -800px}.public-connector-32.snowflake{background-position:0 -832px}.public-connector-32.sqlserver{background-position:0 -864px}.public-connector-32.stardog{background-position:0 -896px}.public-connector-32.synapse{background-position:0 -928px}.public-connector-32.teamleader{background-position:0 -960px}.public-connector-32.trino{background-position:0 -992px}.public-connector-32.typeform{background-position:0 -1024px}.public-connector-32.zendesk{background-position:0 -1056px}.public-connector-48.amazonathena{background-position:0 0}.public-connector-48.asana{background-position:0 -48px}.public-connector-48.bigquery{background-position:0 -96px}.public-connector-48.citybikes{background-position:0 -144px}.public-connector-48.clickhouse{background-position:0 -192px}.public-connector-48.demodataplugin{background-position:0 -240px}.public-connector-48.elasticsearch{background-position:0 -288px}.public-connector-48.exactonline,.public-connector-48.exactonlinenl{background-position:0 -336px}.public-connector-48.google{background-position:0 -384px}.public-connector-48.googleanalytics,.public-connector-48.googleanalyticsv4{background-position:0 -432px}.public-connector-48.googledrive{background-position:0 -480px}.public-connector-48.hubspot{background-position:0 -528px}.public-connector-48.lobbipad{background-position:0 -576px}.public-connector-48.mailchimp{background-position:0 -624px}.public-connector-48.mariadb{background-position:0 -672px}.public-connector-48.mongodb{background-position:0 -720px}.public-connector-48.mysql{background-position:0 -768px}.public-connector-48.oracle{background-position:0 -816px}.public-connector-48.panoply{background-position:0 -864px}.public-connector-48.pipedrive{background-position:0 -912px}.public-connector-48.pipelinedb{background-position:0 -960px}.public-connector-48.postgresql{background-position:0 -1008px}.public-connector-48.presto{background-position:0 -1056px}.public-connector-48.redshift{background-position:0 -1104px}.public-connector-48.salesforce{background-position:0 -1152px}.public-connector-48.saphana{background-position:0 -1200px}.public-connector-48.snowflake{background-position:0 -1248px}.public-connector-48.sqlserver{background-position:0 -1296px}.public-connector-48.stardog{background-position:0 -1344px}.public-connector-48.synapse{background-position:0 -1392px}.public-connector-48.teamleader{background-position:0 -1440px}.public-connector-48.trino{background-position:0 -1488px}.public-connector-48.typeform{background-position:0 -1536px}.public-connector-48.zendesk{background-position:0 -1584px}.public-connector-64.amazonathena{background-position:0 0}.public-connector-64.asana{background-position:0 -64px}.public-connector-64.bigquery{background-position:0 -128px}.public-connector-64.citybikes{background-position:0 -192px}.public-connector-64.clickhouse{background-position:0 -256px}.public-connector-64.demodataplugin{background-position:0 -320px}.public-connector-64.elasticsearch{background-position:0 -384px}.public-connector-64.exactonline,.public-connector-64.exactonlinenl{background-position:0 -448px}.public-connector-64.google{background-position:0 -512px}.public-connector-64.googleanalytics,.public-connector-64.googleanalyticsv4{background-position:0 -576px}.public-connector-64.googledrive{background-position:0 -640px}.public-connector-64.hubspot{background-position:0 -704px}.public-connector-64.lobbipad{background-position:0 -768px}.public-connector-64.mailchimp{background-position:0 -832px}.public-connector-64.mariadb{background-position:0 -896px}.public-connector-64.mongodb{background-position:0 -960px}.public-connector-64.mysql{background-position:0 -1024px}.public-connector-64.oracle{background-position:0 -1088px}.public-connector-64.panoply{background-position:0 -1152px}.public-connector-64.pipedrive{background-position:0 -1216px}.public-connector-64.pipelinedb{background-position:0 -1280px}.public-connector-64.postgresql{background-position:0 -1344px}.public-connector-64.presto{background-position:0 -1408px}.public-connector-64.redshift{background-position:0 -1472px}.public-connector-64.salesforce{background-position:0 -1536px}.public-connector-64.saphana{background-position:0 -1600px}.public-connector-64.snowflake{background-position:0 -1664px}.public-connector-64.sqlserver{background-position:0 -1728px}.public-connector-64.stardog{background-position:0 -1792px}.public-connector-64.synapse{background-position:0 -1856px}.public-connector-64.teamleader{background-position:0 -1920px}.public-connector-64.trino{background-position:0 -1984px}.public-connector-64.typeform{background-position:0 -2048px}.public-connector-64.zendesk{background-position:0 -2112px}", l = /* @__PURE__ */ "amazonathena.asana.bigquery.citybikes.clickhouse.demodataplugin.elasticsearch.exact.exactonline.exactonlinenl.google.googleanalytics.googleanalyticsv4.googledrive.hubspot.mailchimp.mariadb.mongodb.mysql.oracle.panoply.pipedrive.pipelinedb.postgresql.presto.redshift.salesforce.saphana.snowflake.sqlserver.stardog.synapse.teamleader.trino.typeform.zendesk".split(".");
|
|
26
|
+
function u(e) {
|
|
27
|
+
let t = {};
|
|
28
|
+
return e.forEach((e) => {
|
|
29
|
+
(e.size === "32px" || e.size === "64px") && (t[e.size] = e.url);
|
|
30
|
+
}), t;
|
|
31
|
+
}
|
|
32
|
+
var d = class extends i {
|
|
33
|
+
constructor(...e) {
|
|
34
|
+
super(...e), this.size = "32px", this.appUrl = "", this._subtype = "", this._isPublicConnector = !1, this._thumbnails = {}, this.thumbnailSizeMap = {
|
|
35
|
+
"16px": "32px",
|
|
36
|
+
"24px": "32px",
|
|
37
|
+
"32px": "32px",
|
|
38
|
+
"48px": "64px",
|
|
39
|
+
"64px": "64px"
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static {
|
|
43
|
+
this.styles = o(c);
|
|
44
|
+
}
|
|
45
|
+
static {
|
|
46
|
+
this.tagName = "luzmo-dataset-icon";
|
|
47
|
+
}
|
|
48
|
+
willUpdate(e) {
|
|
49
|
+
(e.has("datasetInfo") || e.has("size")) && this._updateDatasetProperties();
|
|
50
|
+
}
|
|
51
|
+
_updateDatasetProperties() {
|
|
52
|
+
if (!this.datasetInfo) {
|
|
53
|
+
this._subtype = "", this._isPublicConnector = !1, this._thumbnails = {};
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this._subtype = this.datasetInfo.subtype || "", this._isPublicConnector = this.datasetInfo.subtype !== "api" && this.datasetInfo.subtype !== "upload" && l.includes(this.datasetInfo.subtype), this._thumbnails = this.datasetInfo.account?.plugin?.thumbnails ? u(this.datasetInfo.account.plugin.thumbnails) : {};
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
if (!this.datasetInfo) return a`
|
|
60
|
+
|
|
61
|
+
`;
|
|
62
|
+
let e = this.thumbnailSizeMap[this.size], i = !!this._thumbnails[e], o = this.size.slice(0, -2), s = this.appUrl ? `${this.appUrl}/assets/images/connectors/sprites/all-connectors.64x64.png` : "", c = this.appUrl ? `${this.appUrl}/assets/images/connectors/sprites/all-connectors.96x96.png` : "";
|
|
63
|
+
if (this._subtype !== "upload" && i) {
|
|
64
|
+
let t = this._thumbnails[e], n = t ? `${this.appUrl}/${t}` : "";
|
|
65
|
+
return a`
|
|
66
|
+
<div
|
|
67
|
+
class="position-relative dataset-icon d-flex justify-content-center"
|
|
68
|
+
style="width: ${this.size}; height: ${this.size};"
|
|
69
|
+
>
|
|
70
|
+
<div class="public-connector">
|
|
71
|
+
<img
|
|
72
|
+
src=${n}
|
|
73
|
+
style="width: ${this.size}; height: ${this.size};"
|
|
74
|
+
alt="Dataset icon"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
return this._isPublicConnector && this._subtype !== "upload" && !i ? a`
|
|
81
|
+
<div
|
|
82
|
+
class="position-relative dataset-icon d-flex justify-content-center"
|
|
83
|
+
style="width: ${this.size}; height: ${this.size}; --connector-sprite-64x64: url('${s}'); --connector-sprite-96x96: url('${c}');"
|
|
84
|
+
>
|
|
85
|
+
<div
|
|
86
|
+
class="public-connector-${o} ${this._subtype}"
|
|
87
|
+
></div>
|
|
88
|
+
</div>
|
|
89
|
+
` : !this._isPublicConnector && this._subtype === "upload" ? a`
|
|
90
|
+
<div
|
|
91
|
+
class="position-relative dataset-icon d-flex justify-content-center"
|
|
92
|
+
style="width: ${this.size}; height: ${this.size};"
|
|
93
|
+
>
|
|
94
|
+
<div class="text-primary d-flex align-items-center" style="font-size: ${this.size};">
|
|
95
|
+
${n(t)}
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
` : !this._isPublicConnector && this._subtype !== "upload" && !i ? a`
|
|
99
|
+
<div
|
|
100
|
+
class="position-relative dataset-icon d-flex justify-content-center"
|
|
101
|
+
style="width: ${this.size}; height: ${this.size};"
|
|
102
|
+
>
|
|
103
|
+
<div class="text-primary ${this._subtype}" style="font-size: ${this.size};">
|
|
104
|
+
${n(r)}
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
` : a`
|
|
108
|
+
|
|
109
|
+
`;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/components/dataset-icon/index.ts
|
|
114
|
+
e([s({
|
|
115
|
+
type: Object,
|
|
116
|
+
attribute: "dataset"
|
|
117
|
+
})], d.prototype, "datasetInfo", void 0), e([s({
|
|
118
|
+
type: String,
|
|
119
|
+
reflect: !0
|
|
120
|
+
})], d.prototype, "size", void 0), e([s({
|
|
121
|
+
type: String,
|
|
122
|
+
attribute: "app-url"
|
|
123
|
+
})], d.prototype, "appUrl", void 0), customElements.get("luzmo-dataset-icon") || customElements.define("luzmo-dataset-icon", d);
|
|
124
|
+
//#endregion
|
|
125
|
+
export { d as t };
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../dataset-selector-list-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../dataset-selector-list-DbCmavOc.cjs`);exports.LuzmoDatasetSelectorList=e.t;
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
e.setAttribute("data-luzmo-vars", ""), e.textContent = "html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-background-color-alt-1: rgb(250, 250, 250);--luzmo-background-color-alt-2: rgb(239, 239, 239);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-scrollbar-size: 6px;--luzmo-scrollbar-width: thin;--luzmo-scrollbar-track-background: transparent;--luzmo-scrollbar-track-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-background: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-scrollbar-thumb-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-hover-background: rgba(var(--luzmo-border-color-rgb), 0.4);--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-secondary-outline: rgba(255, 0, 255, 0.2);--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}", document.head.appendChild(e);
|
|
25
25
|
}
|
|
26
26
|
})();
|
|
27
|
-
import { t as e } from "../dataset-selector-list-
|
|
27
|
+
import { t as e } from "../dataset-selector-list-CXnDkIe2.js";
|
|
28
28
|
export { e as LuzmoDatasetSelectorList };
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { t as e } from "./decorate-DKLaHs_w.js";
|
|
21
21
|
import { t } from "./data-broker-CW4ZQUct.js";
|
|
22
22
|
import { t as n } from "./get-dataset-name-7FdLQo10.js";
|
|
23
|
-
import "./dataset-icon-
|
|
23
|
+
import "./dataset-icon-DVvk1RBl.js";
|
|
24
24
|
import { LitElement as r, html as i, nothing as a, unsafeCSS as o } from "lit";
|
|
25
25
|
import { property as s, state as c } from "lit/decorators.js";
|
|
26
26
|
import { repeat as l } from "lit/directives/repeat.js";
|
package/components/{dataset-selector-list-qAMl0vM_.cjs → dataset-selector-list-DbCmavOc.cjs}
RENAMED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
require(`./chunk-i8uDWG73.cjs`);const e=require(`./decorate-BfLyr4NV.cjs`),t=require(`./data-broker-CIVFcrOy.cjs`),n=require(`./get-dataset-name-CrWWViwN.cjs`);require(`./dataset-icon-DF9jlsN0.cjs`);let r=require(`lit`),i=require(`lit/decorators.js`),a=require(`lit/directives/repeat.js`);var o=`:host{box-sizing:border-box;height:100%;font-family:var(--luzmo-dataset-selector-list-font-family,var(--dataset-selector-list-font-family));color:var(--luzmo-dataset-selector-list-color);flex-direction:column;display:flex}:host .dataset-selector-list{gap:var(--luzmo-dataset-selector-list-gap,var(--dataset-selector-list-gap));background:var(--luzmo-dataset-selector-list-background,var(--dataset-selector-list-background));height:100%;padding:var(--luzmo-dataset-selector-list-padding,var(--dataset-selector-list-padding));border-radius:var(--luzmo-dataset-selector-list-border-radius,var(--dataset-selector-list-border-radius));flex-direction:column;display:flex}:host .search-input{background-color:var(--luzmo-dataset-selector-list-input-background,var(--dataset-selector-list-input-background));border:none;border-bottom:1px solid var(--luzmo-dataset-selector-list-input-border-color,var(--dataset-selector-list-input-border-color));color:var(--luzmo-dataset-selector-list-input-color,var(--dataset-selector-list-input-color));line-height:var(--luzmo-dataset-selector-list-input-line-height,var(--dataset-selector-list-input-line-height));font-size:var(--luzmo-dataset-selector-list-input-font-size,var(--dataset-selector-list-input-font-size));padding:var(--luzmo-dataset-selector-list-input-padding,var(--dataset-selector-list-input-padding));box-sizing:border-box;outline:none;width:100%;margin:0}:host .search-input::placeholder{color:var(--luzmo-font-color-tertiary,#999)}:host .datasets-scroll-container{flex:1;min-height:0;overflow:hidden auto}:host .datasets-scroll-container::-webkit-scrollbar{width:var(--luzmo-dataset-selector-list-scrollbar-width,var(--dataset-selector-list-scrollbar-width))}:host .datasets-scroll-container::-webkit-scrollbar-track{background:var(--luzmo-dataset-selector-list-scrollbar-track-background,var(--dataset-selector-list-scrollbar-track-background));border-radius:var(--luzmo-dataset-selector-list-scrollbar-track-border-radius,var(--dataset-selector-list-scrollbar-track-border-radius))}:host .datasets-scroll-container::-webkit-scrollbar-thumb{background:var(--luzmo-dataset-selector-list-scrollbar-thumb-background,var(--dataset-selector-list-scrollbar-thumb-background));border-radius:var(--luzmo-dataset-selector-list-scrollbar-thumb-border-radius,var(--dataset-selector-list-scrollbar-thumb-border-radius))}:host .datasets-scroll-container::-webkit-scrollbar-thumb:hover{background:var(--luzmo-dataset-selector-list-scrollbar-thumb-hover-background,var(--dataset-selector-list-scrollbar-thumb-hover-background))}:host .datasets-scroll-container{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-dataset-selector-list-scrollbar-thumb-background,var(--dataset-selector-list-scrollbar-thumb-background)) var(--luzmo-dataset-selector-list-scrollbar-track-background,var(--dataset-selector-list-scrollbar-track-background))}:host .datasets-list{flex-direction:column;display:flex}:host .available-dataset-item{padding:var(--luzmo-dataset-selector-list-item-padding,var(--dataset-selector-list-item-padding));color:var(--luzmo-dataset-selector-available-dataset-color,var(--dataset-selector-available-dataset-color));align-items:center;gap:var(--luzmo-dataset-selector-list-item-gap,var(--dataset-selector-list-item-gap));cursor:pointer;border-radius:var(--luzmo-dataset-selector-list-item-border-radius,var(--dataset-selector-list-item-border-radius));flex-direction:row;transition:background-color .15s;display:flex}:host .available-dataset-item:hover{background-color:var(--luzmo-dataset-selector-list-item-hover-background,var(--dataset-selector-list-item-hover-background))}:host .available-dataset-item:focus{outline:none}:host .available-dataset-item .dataset-icon{flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;display:flex}:host .available-dataset-item .dataset-icon luzmo-icon{display:flex}:host .available-dataset-item .dataset-icon-img{object-fit:contain;width:16px;height:16px}:host .available-dataset-item .dataset-name{line-height:var(--luzmo-dataset-selector-list-item-line-height,var(--dataset-selector-list-item-line-height));font-size:var(--luzmo-dataset-selector-list-item-font-size,var(--dataset-selector-list-item-font-size));text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}:host .available-dataset-item .dataset-name .dataset-name-search-highlight{background:var(--luzmo-dataset-selector-list-search-highlight-background,var(--dataset-selector-list-search-highlight-background));color:var(--luzmo-dataset-selector-list-search-highlight-color,var(--dataset-selector-list-search-highlight-color));border-radius:var(--luzmo-border-radius-s);padding:0}:host .no-datasets-found{height:50%;color:var(--luzmo-dataset-selector-list-no-datasets-color,var(--dataset-selector-list-no-datasets-color));font-size:var(--luzmo-dataset-selector-list-no-datasets-font-size,var(--dataset-selector-list-no-datasets-font-size));text-align:center;padding:var(--luzmo-spacing-4,1rem);justify-content:center;align-items:center;display:flex}:host .loader{padding:var(--luzmo-spacing-5,1.25rem) 0;justify-content:center;align-items:center;display:flex}:host .loader .spinner{width:var(--luzmo-dataset-selector-list-loader-size,var(--dataset-selector-list-loader-size));height:var(--luzmo-dataset-selector-list-loader-size,var(--dataset-selector-list-loader-size));border:2px solid var(--luzmo-border-color-light,#e0e0e0);border-top-color:var(--luzmo-dataset-selector-list-loader-color,var(--dataset-selector-list-loader-color));border-radius:50%;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){:host .available-dataset-item{transition:none}:host .loader .spinner{animation:none}}:host{--dataset-selector-list-background:var(--luzmo-background-color);--dataset-selector-list-padding:0;--dataset-selector-list-gap:var(--luzmo-spacing-2);--dataset-selector-list-border-radius:var(--luzmo-border-radius-m);--dataset-selector-list-font-family:var(--luzmo-font-family);--dataset-selector-list-input-background:var(--luzmo-background-color);--dataset-selector-list-input-border-color:var(--luzmo-border-color-light,#0000000d);--dataset-selector-list-input-color:var(--luzmo-font-color);--dataset-selector-list-input-padding:0 var(--luzmo-spacing-4) var(--luzmo-spacing-2);--dataset-selector-list-input-font-size:var(--luzmo-font-size-s);--dataset-selector-list-input-line-height:1.5rem;--dataset-selector-list-item-padding:var(--luzmo-spacing-1) var(--luzmo-spacing-4);--dataset-selector-list-item-gap:var(--luzmo-spacing-3);--dataset-selector-list-item-hover-background:var(--luzmo-background-color-highlight);--dataset-selector-list-item-font-size:var(--luzmo-font-size-s);--dataset-selector-list-item-line-height:1.5rem;--dataset-selector-list-item-border-radius:var(--luzmo-border-radius-s);--dataset-selector-list-search-highlight-background:rgba(var(--luzmo-primary-rgb), .15);--dataset-selector-list-search-highlight-color:var(--luzmo-primary);--dataset-selector-list-scrollbar-width:var(--luzmo-scrollbar-size);--dataset-selector-list-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--dataset-selector-list-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--dataset-selector-list-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--dataset-selector-list-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--dataset-selector-list-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--dataset-selector-list-loader-size:24px;--dataset-selector-list-loader-color:var(--luzmo-primary);--dataset-selector-list-no-datasets-color:var(--luzmo-font-color);--dataset-selector-list-no-datasets-font-size:var(--luzmo-font-size-s);--dataset-selector-available-dataset-color:var(--luzmo-font-color)}`,s=7,c=600,l=5,u=class extends r.LitElement{constructor(...e){super(...e),this._selectedDatasets=new Set,this.showSearch=!0,this.searchPlaceholder=`Search datasets...`,this.noDatasetsMessage=`No datasets found`,this.highlightSearchMatches=!0,this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.flagOpendata=!1,this._availableDatasets=[],this._status={allDatasetsLoaded:!1,paging:!1,busy:!0,error:!1},this._searchValue=``,this._currentOffset=0,this._searchDebounceTimer=null,this._queryCache=new Map,this._calculatedQueryLimit=null,this._hasLoadedEmptyPage=!1}static{this.styles=(0,r.unsafeCSS)(o)}set selectedDatasets(e){this._selectedDatasets=e,this._shouldLoadMoreDatasetsForViewport()&&this._loadAvailableDatasets({append:!0})}get selectedDatasets(){return this._selectedDatasets}connectedCallback(){super.connectedCallback?.(),this._configureBroker(),this._waitForContainerHeightAndLoad()}_configureBroker(){(this.authKey||this.authToken||this.apiUrl)&&t.t.configure({authKey:this.authKey,authToken:this.authToken,apiUrl:this.apiUrl})}_waitForContainerHeightAndLoad(){requestAnimationFrame(()=>{this._loadAvailableDatasets({append:!1})})}_calculateOptimalQueryLimit(){if(this._calculatedQueryLimit!==null)return this._calculatedQueryLimit;let e=this.shadowRoot?.querySelector(`.dataset-selector-list`);if(!e)return s;let t=getComputedStyle(e),n=e.clientHeight,r=Number.parseFloat(t.height),i=Math.max(n,r);if(i<=0)return s;let a=Math.floor(i/24),o=Math.max(a+l,s);return this._calculatedQueryLimit=o,o}get _filteredDatasets(){return this._selectedDatasets.size===0?this._availableDatasets:this._availableDatasets.filter(e=>!this._selectedDatasets.has(e.id))}_handleSearchInput(e){let t=e.target;this._searchValue=t.value,this._searchDebounceTimer!==null&&clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._loadAvailableDatasets({append:!1})},c)}_handleScroll(e){let t=e.target,n=t.scrollTop,r=t.scrollHeight;n+t.clientHeight>=r-50&&!this._status.allDatasetsLoaded&&!this._status.busy&&this._loadAvailableDatasets({append:!0})}async _loadAvailableDatasets({append:e}){e||(this._calculatedQueryLimit=null,this._hasLoadedEmptyPage=!1),this._status={...this._status,busy:!0,allDatasetsLoaded:e?this._status.allDatasetsLoaded:!1,paging:e};let n=this._generateQuery(e),r=JSON.stringify(n),i=this._queryCache.has(r);try{let a;i?a=this._queryCache.get(r):(a=await t.t.fetchApi(`/securable`,{action:`get`,version:`0.1.0`,find:n}),this._queryCache.set(r,a)),this._onDatasetsLoaded(e,a),this._shouldLoadMoreDatasetsForViewport()&&await this._loadAvailableDatasets({append:!0})}catch(e){console.error(`Error loading datasets:`,e),this._status={...this._status,busy:!1,paging:!1,error:!0}}finally{this._status={...this._status,busy:!1,paging:!1}}}_generateQuery(e){let t=this._calculateOptimalQueryLimit();e?this._currentOffset+=t:this._currentOffset=0;let n=this._searchValue?{search:{match_types:[`name`,`description`],keyphrase:this._searchValue,securable_types:`dataset`},order:[[`name`,`asc`]]}:{order:[[`updated_at`,`desc`]]};return{attributes:[`id`,`updated_at`,`name`,`subtype`],include:[{model:`Collection`,attributes:[`id`,`favorite`],where:{favorite:!0}},{model:`Account`,attributes:[`id`,`provider`,`name`],include:[{model:`Plugin`,attributes:[`id`],include:[{model:`Thumbnail`,where:{size:`32px`}}]}]}],where:{type:`dataset`},limit:t,offset:this._currentOffset,...n,...this.flagOpendata?{public:null}:{}}}_onDatasetsLoaded(e,{rows:t,count:n}){let r;if(e){let e=new Set(this._availableDatasets.map(e=>e.id)),n=t.filter(t=>!e.has(t.id));r=[...this._availableDatasets,...n]}else r=t||[];e&&t.length===0?this._hasLoadedEmptyPage=!0:t.length>0&&(this._hasLoadedEmptyPage=!1);let i=r.reduce((e,t)=>(e.some(e=>e.id===t.id)||e.push(t),e),[]),a=r.length,o=this._hasLoadedEmptyPage||a>=n;this._status={...this._status,allDatasetsLoaded:o},this._availableDatasets=i}_shouldLoadMoreDatasetsForViewport(){if(this._status.allDatasetsLoaded||this._hasLoadedEmptyPage||this._status.busy)return!1;let e=this.shadowRoot?.querySelector(`.datasets-scroll-container`);if(!e)return!1;let t=e.clientHeight,n=Math.ceil(t/24),r=Math.ceil(n*1.5);return this._filteredDatasets.length<r}_getDatasetName(e){return n.t(e)}_escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}_renderHighlightedDatasetName(e){let t=this._getDatasetName(e),n=this._searchValue.trim();if(!this.highlightSearchMatches||!n)return t;let i=this._escapeRegExp(n),a=RegExp(`(${i})`,`gi`),o=t.split(a),s=n.toLowerCase();return o.length===1?t:r.html`${o.map(e=>e.toLowerCase()===s?r.html`<span class="dataset-name-search-highlight">${e}</span>`:e)}`}_selectDataset(e){this.dispatchEvent(new CustomEvent(`dataset-selected`,{detail:e,bubbles:!0,composed:!0}))}_handleDatasetClick(e){let t=e.currentTarget.dataset.datasetId,n=this._filteredDatasets.find(e=>e.id===t);n&&this._selectDataset(n)}_handleDatasetKeydown(e){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=e.currentTarget.dataset.datasetId,n=this._filteredDatasets.find(e=>e.id===t);n&&this._selectDataset(n)}}_renderLoader(){return r.html`
|
|
20
|
+
require(`./chunk-i8uDWG73.cjs`);const e=require(`./decorate-BfLyr4NV.cjs`),t=require(`./data-broker-CIVFcrOy.cjs`),n=require(`./get-dataset-name-CrWWViwN.cjs`);require(`./dataset-icon-DCvy3NSz.cjs`);let r=require(`lit`),i=require(`lit/decorators.js`),a=require(`lit/directives/repeat.js`);var o=`:host{box-sizing:border-box;height:100%;font-family:var(--luzmo-dataset-selector-list-font-family,var(--dataset-selector-list-font-family));color:var(--luzmo-dataset-selector-list-color);flex-direction:column;display:flex}:host .dataset-selector-list{gap:var(--luzmo-dataset-selector-list-gap,var(--dataset-selector-list-gap));background:var(--luzmo-dataset-selector-list-background,var(--dataset-selector-list-background));height:100%;padding:var(--luzmo-dataset-selector-list-padding,var(--dataset-selector-list-padding));border-radius:var(--luzmo-dataset-selector-list-border-radius,var(--dataset-selector-list-border-radius));flex-direction:column;display:flex}:host .search-input{background-color:var(--luzmo-dataset-selector-list-input-background,var(--dataset-selector-list-input-background));border:none;border-bottom:1px solid var(--luzmo-dataset-selector-list-input-border-color,var(--dataset-selector-list-input-border-color));color:var(--luzmo-dataset-selector-list-input-color,var(--dataset-selector-list-input-color));line-height:var(--luzmo-dataset-selector-list-input-line-height,var(--dataset-selector-list-input-line-height));font-size:var(--luzmo-dataset-selector-list-input-font-size,var(--dataset-selector-list-input-font-size));padding:var(--luzmo-dataset-selector-list-input-padding,var(--dataset-selector-list-input-padding));box-sizing:border-box;outline:none;width:100%;margin:0}:host .search-input::placeholder{color:var(--luzmo-font-color-tertiary,#999)}:host .datasets-scroll-container{flex:1;min-height:0;overflow:hidden auto}:host .datasets-scroll-container::-webkit-scrollbar{width:var(--luzmo-dataset-selector-list-scrollbar-width,var(--dataset-selector-list-scrollbar-width))}:host .datasets-scroll-container::-webkit-scrollbar-track{background:var(--luzmo-dataset-selector-list-scrollbar-track-background,var(--dataset-selector-list-scrollbar-track-background));border-radius:var(--luzmo-dataset-selector-list-scrollbar-track-border-radius,var(--dataset-selector-list-scrollbar-track-border-radius))}:host .datasets-scroll-container::-webkit-scrollbar-thumb{background:var(--luzmo-dataset-selector-list-scrollbar-thumb-background,var(--dataset-selector-list-scrollbar-thumb-background));border-radius:var(--luzmo-dataset-selector-list-scrollbar-thumb-border-radius,var(--dataset-selector-list-scrollbar-thumb-border-radius))}:host .datasets-scroll-container::-webkit-scrollbar-thumb:hover{background:var(--luzmo-dataset-selector-list-scrollbar-thumb-hover-background,var(--dataset-selector-list-scrollbar-thumb-hover-background))}:host .datasets-scroll-container{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-dataset-selector-list-scrollbar-thumb-background,var(--dataset-selector-list-scrollbar-thumb-background)) var(--luzmo-dataset-selector-list-scrollbar-track-background,var(--dataset-selector-list-scrollbar-track-background))}:host .datasets-list{flex-direction:column;display:flex}:host .available-dataset-item{padding:var(--luzmo-dataset-selector-list-item-padding,var(--dataset-selector-list-item-padding));color:var(--luzmo-dataset-selector-available-dataset-color,var(--dataset-selector-available-dataset-color));align-items:center;gap:var(--luzmo-dataset-selector-list-item-gap,var(--dataset-selector-list-item-gap));cursor:pointer;border-radius:var(--luzmo-dataset-selector-list-item-border-radius,var(--dataset-selector-list-item-border-radius));flex-direction:row;transition:background-color .15s;display:flex}:host .available-dataset-item:hover{background-color:var(--luzmo-dataset-selector-list-item-hover-background,var(--dataset-selector-list-item-hover-background))}:host .available-dataset-item:focus{outline:none}:host .available-dataset-item .dataset-icon{flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;display:flex}:host .available-dataset-item .dataset-icon luzmo-icon{display:flex}:host .available-dataset-item .dataset-icon-img{object-fit:contain;width:16px;height:16px}:host .available-dataset-item .dataset-name{line-height:var(--luzmo-dataset-selector-list-item-line-height,var(--dataset-selector-list-item-line-height));font-size:var(--luzmo-dataset-selector-list-item-font-size,var(--dataset-selector-list-item-font-size));text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}:host .available-dataset-item .dataset-name .dataset-name-search-highlight{background:var(--luzmo-dataset-selector-list-search-highlight-background,var(--dataset-selector-list-search-highlight-background));color:var(--luzmo-dataset-selector-list-search-highlight-color,var(--dataset-selector-list-search-highlight-color));border-radius:var(--luzmo-border-radius-s);padding:0}:host .no-datasets-found{height:50%;color:var(--luzmo-dataset-selector-list-no-datasets-color,var(--dataset-selector-list-no-datasets-color));font-size:var(--luzmo-dataset-selector-list-no-datasets-font-size,var(--dataset-selector-list-no-datasets-font-size));text-align:center;padding:var(--luzmo-spacing-4,1rem);justify-content:center;align-items:center;display:flex}:host .loader{padding:var(--luzmo-spacing-5,1.25rem) 0;justify-content:center;align-items:center;display:flex}:host .loader .spinner{width:var(--luzmo-dataset-selector-list-loader-size,var(--dataset-selector-list-loader-size));height:var(--luzmo-dataset-selector-list-loader-size,var(--dataset-selector-list-loader-size));border:2px solid var(--luzmo-border-color-light,#e0e0e0);border-top-color:var(--luzmo-dataset-selector-list-loader-color,var(--dataset-selector-list-loader-color));border-radius:50%;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){:host .available-dataset-item{transition:none}:host .loader .spinner{animation:none}}:host{--dataset-selector-list-background:var(--luzmo-background-color);--dataset-selector-list-padding:0;--dataset-selector-list-gap:var(--luzmo-spacing-2);--dataset-selector-list-border-radius:var(--luzmo-border-radius-m);--dataset-selector-list-font-family:var(--luzmo-font-family);--dataset-selector-list-input-background:var(--luzmo-background-color);--dataset-selector-list-input-border-color:var(--luzmo-border-color-light,#0000000d);--dataset-selector-list-input-color:var(--luzmo-font-color);--dataset-selector-list-input-padding:0 var(--luzmo-spacing-4) var(--luzmo-spacing-2);--dataset-selector-list-input-font-size:var(--luzmo-font-size-s);--dataset-selector-list-input-line-height:1.5rem;--dataset-selector-list-item-padding:var(--luzmo-spacing-1) var(--luzmo-spacing-4);--dataset-selector-list-item-gap:var(--luzmo-spacing-3);--dataset-selector-list-item-hover-background:var(--luzmo-background-color-highlight);--dataset-selector-list-item-font-size:var(--luzmo-font-size-s);--dataset-selector-list-item-line-height:1.5rem;--dataset-selector-list-item-border-radius:var(--luzmo-border-radius-s);--dataset-selector-list-search-highlight-background:rgba(var(--luzmo-primary-rgb), .15);--dataset-selector-list-search-highlight-color:var(--luzmo-primary);--dataset-selector-list-scrollbar-width:var(--luzmo-scrollbar-size);--dataset-selector-list-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--dataset-selector-list-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--dataset-selector-list-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--dataset-selector-list-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--dataset-selector-list-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--dataset-selector-list-loader-size:24px;--dataset-selector-list-loader-color:var(--luzmo-primary);--dataset-selector-list-no-datasets-color:var(--luzmo-font-color);--dataset-selector-list-no-datasets-font-size:var(--luzmo-font-size-s);--dataset-selector-available-dataset-color:var(--luzmo-font-color)}`,s=7,c=600,l=5,u=class extends r.LitElement{constructor(...e){super(...e),this._selectedDatasets=new Set,this.showSearch=!0,this.searchPlaceholder=`Search datasets...`,this.noDatasetsMessage=`No datasets found`,this.highlightSearchMatches=!0,this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.flagOpendata=!1,this._availableDatasets=[],this._status={allDatasetsLoaded:!1,paging:!1,busy:!0,error:!1},this._searchValue=``,this._currentOffset=0,this._searchDebounceTimer=null,this._queryCache=new Map,this._calculatedQueryLimit=null,this._hasLoadedEmptyPage=!1}static{this.styles=(0,r.unsafeCSS)(o)}set selectedDatasets(e){this._selectedDatasets=e,this._shouldLoadMoreDatasetsForViewport()&&this._loadAvailableDatasets({append:!0})}get selectedDatasets(){return this._selectedDatasets}connectedCallback(){super.connectedCallback?.(),this._configureBroker(),this._waitForContainerHeightAndLoad()}_configureBroker(){(this.authKey||this.authToken||this.apiUrl)&&t.t.configure({authKey:this.authKey,authToken:this.authToken,apiUrl:this.apiUrl})}_waitForContainerHeightAndLoad(){requestAnimationFrame(()=>{this._loadAvailableDatasets({append:!1})})}_calculateOptimalQueryLimit(){if(this._calculatedQueryLimit!==null)return this._calculatedQueryLimit;let e=this.shadowRoot?.querySelector(`.dataset-selector-list`);if(!e)return s;let t=getComputedStyle(e),n=e.clientHeight,r=Number.parseFloat(t.height),i=Math.max(n,r);if(i<=0)return s;let a=Math.floor(i/24),o=Math.max(a+l,s);return this._calculatedQueryLimit=o,o}get _filteredDatasets(){return this._selectedDatasets.size===0?this._availableDatasets:this._availableDatasets.filter(e=>!this._selectedDatasets.has(e.id))}_handleSearchInput(e){let t=e.target;this._searchValue=t.value,this._searchDebounceTimer!==null&&clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._loadAvailableDatasets({append:!1})},c)}_handleScroll(e){let t=e.target,n=t.scrollTop,r=t.scrollHeight;n+t.clientHeight>=r-50&&!this._status.allDatasetsLoaded&&!this._status.busy&&this._loadAvailableDatasets({append:!0})}async _loadAvailableDatasets({append:e}){e||(this._calculatedQueryLimit=null,this._hasLoadedEmptyPage=!1),this._status={...this._status,busy:!0,allDatasetsLoaded:e?this._status.allDatasetsLoaded:!1,paging:e};let n=this._generateQuery(e),r=JSON.stringify(n),i=this._queryCache.has(r);try{let a;i?a=this._queryCache.get(r):(a=await t.t.fetchApi(`/securable`,{action:`get`,version:`0.1.0`,find:n}),this._queryCache.set(r,a)),this._onDatasetsLoaded(e,a),this._shouldLoadMoreDatasetsForViewport()&&await this._loadAvailableDatasets({append:!0})}catch(e){console.error(`Error loading datasets:`,e),this._status={...this._status,busy:!1,paging:!1,error:!0}}finally{this._status={...this._status,busy:!1,paging:!1}}}_generateQuery(e){let t=this._calculateOptimalQueryLimit();e?this._currentOffset+=t:this._currentOffset=0;let n=this._searchValue?{search:{match_types:[`name`,`description`],keyphrase:this._searchValue,securable_types:`dataset`},order:[[`name`,`asc`]]}:{order:[[`updated_at`,`desc`]]};return{attributes:[`id`,`updated_at`,`name`,`subtype`],include:[{model:`Collection`,attributes:[`id`,`favorite`],where:{favorite:!0}},{model:`Account`,attributes:[`id`,`provider`,`name`],include:[{model:`Plugin`,attributes:[`id`],include:[{model:`Thumbnail`,where:{size:`32px`}}]}]}],where:{type:`dataset`},limit:t,offset:this._currentOffset,...n,...this.flagOpendata?{public:null}:{}}}_onDatasetsLoaded(e,{rows:t,count:n}){let r;if(e){let e=new Set(this._availableDatasets.map(e=>e.id)),n=t.filter(t=>!e.has(t.id));r=[...this._availableDatasets,...n]}else r=t||[];e&&t.length===0?this._hasLoadedEmptyPage=!0:t.length>0&&(this._hasLoadedEmptyPage=!1);let i=r.reduce((e,t)=>(e.some(e=>e.id===t.id)||e.push(t),e),[]),a=r.length,o=this._hasLoadedEmptyPage||a>=n;this._status={...this._status,allDatasetsLoaded:o},this._availableDatasets=i}_shouldLoadMoreDatasetsForViewport(){if(this._status.allDatasetsLoaded||this._hasLoadedEmptyPage||this._status.busy)return!1;let e=this.shadowRoot?.querySelector(`.datasets-scroll-container`);if(!e)return!1;let t=e.clientHeight,n=Math.ceil(t/24),r=Math.ceil(n*1.5);return this._filteredDatasets.length<r}_getDatasetName(e){return n.t(e)}_escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}_renderHighlightedDatasetName(e){let t=this._getDatasetName(e),n=this._searchValue.trim();if(!this.highlightSearchMatches||!n)return t;let i=this._escapeRegExp(n),a=RegExp(`(${i})`,`gi`),o=t.split(a),s=n.toLowerCase();return o.length===1?t:r.html`${o.map(e=>e.toLowerCase()===s?r.html`<span class="dataset-name-search-highlight">${e}</span>`:e)}`}_selectDataset(e){this.dispatchEvent(new CustomEvent(`dataset-selected`,{detail:e,bubbles:!0,composed:!0}))}_handleDatasetClick(e){let t=e.currentTarget.dataset.datasetId,n=this._filteredDatasets.find(e=>e.id===t);n&&this._selectDataset(n)}_handleDatasetKeydown(e){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=e.currentTarget.dataset.datasetId,n=this._filteredDatasets.find(e=>e.id===t);n&&this._selectDataset(n)}}_renderLoader(){return r.html`
|
|
21
21
|
<div class="loader">
|
|
22
22
|
<div class="spinner"></div>
|
|
23
23
|
</div>
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../dataset-selector-row-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../dataset-selector-row-D1U4ltKv.cjs`);Object.defineProperty(exports,`LuzmoDatasetSelectorRow`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
e.setAttribute("data-luzmo-vars", ""), e.textContent = "html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-background-color-alt-1: rgb(250, 250, 250);--luzmo-background-color-alt-2: rgb(239, 239, 239);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-scrollbar-size: 6px;--luzmo-scrollbar-width: thin;--luzmo-scrollbar-track-background: transparent;--luzmo-scrollbar-track-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-background: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-scrollbar-thumb-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-hover-background: rgba(var(--luzmo-border-color-rgb), 0.4);--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-secondary-outline: rgba(255, 0, 255, 0.2);--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}", document.head.appendChild(e);
|
|
25
25
|
}
|
|
26
26
|
})();
|
|
27
|
-
import { t as e } from "../dataset-selector-row-
|
|
27
|
+
import { t as e } from "../dataset-selector-row-HFt4sJN8.js";
|
|
28
28
|
export { e as LuzmoDatasetSelectorRow };
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
require(`./chunk-i8uDWG73.cjs`);const e=require(`./decorate-BfLyr4NV.cjs`),t=require(`./data-broker-CIVFcrOy.cjs`),n=require(`./get-dataset-name-CrWWViwN.cjs`);require(`./dataset-icon-
|
|
20
|
+
require(`./chunk-i8uDWG73.cjs`);const e=require(`./decorate-BfLyr4NV.cjs`),t=require(`./data-broker-CIVFcrOy.cjs`),n=require(`./get-dataset-name-CrWWViwN.cjs`);require(`./dataset-icon-DCvy3NSz.cjs`);let r=require(`@luzmo/icons`),i=require(`lit`),a=require(`lit/decorators.js`),o=require(`@lit/localize`);require(`@luzmo/lucero/icon`),require(`@luzmo/lucero/select`),require(`@luzmo/lucero/tags`),require(`@luzmo/lucero/tooltip`);let s=require(`lit/directives/repeat.js`);var c=`:host([disabled]){pointer-events:none}:host{box-sizing:border-box;gap:var(--luzmo-dataset-selector-row-gap,var(--dataset-selector-row-gap));min-height:var(--luzmo-dataset-selector-row-min-height,var(--dataset-selector-row-min-height));font-size:var(--luzmo-dataset-selector-row-font-size,var(--dataset-selector-row-font-size));color:var(--luzmo-dataset-selector-row-color,var(--dataset-selector-row-color));font-family:var(--luzmo-dataset-selector-row-font-family,var(--dataset-selector-row-font-family));flex-flow:wrap;align-items:flex-start;display:flex}:host .dataset-search{--luzmo-select-inline-size:fit-content;flex:none;align-self:flex-start;inline-size:auto}:host .dataset-search .dataset-search-trigger-layout{align-items:center;gap:var(--luzmo-spacing-2);--luzmo-icon-vertical-align:top;min-inline-size:0;display:flex}:host .dataset-search .dataset-search-trigger-label{white-space:nowrap;line-height:1}:host .dataset-search{max-inline-size:var(--luzmo-dataset-selector-row-search-max-width,var(--dataset-selector-row-search-max-width));--luzmo-popover-max-height:var(--luzmo-dataset-selector-row-search-popover-max-height,var(--dataset-selector-row-search-popover-max-height,var(--luzmo-popover-max-height)));--select-minimum-width-multiplier:1}:host .selected-dataset-tag{--luzmo-tag-max-inline-size:180px;--luzmo-tag-height:var(--luzmo-component-height);--luzmo-tag-spacing-inline-start:var(--luzmo-spacing-3);--luzmo-tag-icon-spacing-inline-end:var(--luzmo-spacing-3);--luzmo-tag-label-spacing-inline-end:var(--luzmo-spacing-2);--luzmo-tag-clear-button-spacing-inline-start:.375rem;--luzmo-tag-clear-button-spacing-inline-end:.375rem;margin:0}:host .selected-datasets-tags{--luzmo-tag-group-item-margin-block:0;--luzmo-tag-group-item-margin-inline:0;display:contents}:host .selected-dataset-tag .dataset-tag-label{align-items:center;line-height:1}:host .sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}:host{--dataset-selector-row-gap:var(--luzmo-spacing-2);--dataset-selector-row-min-height:1.75rem;--dataset-selector-row-font-size:.75rem;--dataset-selector-row-color:var(--luzmo-font-color-extra-dimmed);--dataset-selector-row-font-family:var(--luzmo-font-family);--dataset-selector-row-search-max-width:23.75rem;--dataset-selector-row-search-popover-max-height:400px}`,l=400,u=50,d=class extends i.LitElement{constructor(...e){super(...e),this.selectedDatasets=[],this.buttonLabel=(0,o.msg)(`Add dataset`,{desc:`Label for the control that opens dataset search to add a dataset`}),this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.flagOpendata=!1,this.disabled=!1,this.hideDatasetIcons=!1,this._availableDatasets=[],this._removalAnnouncement=``,this._selectValue=[],this._retrieving=!1,this._searchValue=``,this._activeSearchRequestId=0,this._searchDebounceTimer=null,this._renderDatasetOptionIcon=e=>{if(this.hideDatasetIcons)return null;let t=e.value;if(typeof t!=`string`)return null;let n=this._availableDatasets.find(e=>e.id===t);return n?i.html`
|
|
21
21
|
<luzmo-dataset-icon
|
|
22
22
|
slot="icon"
|
|
23
23
|
.datasetInfo=${n}
|
|
@@ -62,8 +62,11 @@ require(`./chunk-i8uDWG73.cjs`);const e=require(`./decorate-BfLyr4NV.cjs`),t=req
|
|
|
62
62
|
@luzmo-opened=${this._handleSearchOpened}
|
|
63
63
|
@luzmo-closed=${this._handleSearchClosed}
|
|
64
64
|
>
|
|
65
|
-
<
|
|
66
|
-
|
|
65
|
+
<span slot="label" class="dataset-search-trigger-layout">
|
|
66
|
+
<luzmo-icon .icon=${r.luzmoPlus} size="s" aria-hidden="true"></luzmo-icon>
|
|
67
|
+
${this.selectedDatasets.length===0?i.html`<span class="dataset-search-trigger-label">${this.buttonLabel}</span>`:i.nothing}
|
|
68
|
+
</span>
|
|
69
|
+
${this.selectedDatasets.length>0?i.html`<luzmo-tooltip slot="tooltip" self-managed placement="top" size="s">${this.buttonLabel}</luzmo-tooltip>`:i.nothing}
|
|
67
70
|
</luzmo-select>
|
|
68
71
|
`}_createDatasetRemovedHandler(e){return()=>this._handleDatasetRemoved(e)}render(){return i.html`
|
|
69
72
|
${this.disabled?i.nothing:this._renderDatasetSearch()}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { t as e } from "./decorate-DKLaHs_w.js";
|
|
21
21
|
import { t } from "./data-broker-CW4ZQUct.js";
|
|
22
22
|
import { t as n } from "./get-dataset-name-7FdLQo10.js";
|
|
23
|
-
import "./dataset-icon-
|
|
23
|
+
import "./dataset-icon-DVvk1RBl.js";
|
|
24
24
|
import { luzmoFileUploadOutline as r, luzmoPlugin as i, luzmoPlus as a } from "@luzmo/icons";
|
|
25
25
|
import { LitElement as o, html as s, nothing as c, unsafeCSS as l } from "lit";
|
|
26
26
|
import { property as u, state as d } from "lit/decorators.js";
|
|
@@ -31,7 +31,7 @@ import "@luzmo/lucero/tags";
|
|
|
31
31
|
import "@luzmo/lucero/tooltip";
|
|
32
32
|
import { repeat as h } from "lit/directives/repeat.js";
|
|
33
33
|
//#region src/components/dataset-selector-row/dataset-selector-row.module.scss?inline
|
|
34
|
-
var g = ":host([disabled]){pointer-events:none}:host{box-sizing:border-box;gap:var(--luzmo-dataset-selector-row-gap,var(--dataset-selector-row-gap));min-height:var(--luzmo-dataset-selector-row-min-height,var(--dataset-selector-row-min-height));font-size:var(--luzmo-dataset-selector-row-font-size,var(--dataset-selector-row-font-size));color:var(--luzmo-dataset-selector-row-color,var(--dataset-selector-row-color));font-family:var(--luzmo-dataset-selector-row-font-family,var(--dataset-selector-row-font-family));flex-flow:wrap;align-items:flex-start;display:flex}:host .dataset-search{--luzmo-select-inline-size:fit-content;inline-size:auto;max-inline-size:var(--luzmo-dataset-selector-row-search-max-width,var(--dataset-selector-row-search-max-width));--luzmo-popover-max-height:var(--luzmo-dataset-selector-row-search-popover-max-height,var(--dataset-selector-row-search-popover-max-height,var(--luzmo-popover-max-height)));--select-minimum-width-multiplier:1
|
|
34
|
+
var g = ":host([disabled]){pointer-events:none}:host{box-sizing:border-box;gap:var(--luzmo-dataset-selector-row-gap,var(--dataset-selector-row-gap));min-height:var(--luzmo-dataset-selector-row-min-height,var(--dataset-selector-row-min-height));font-size:var(--luzmo-dataset-selector-row-font-size,var(--dataset-selector-row-font-size));color:var(--luzmo-dataset-selector-row-color,var(--dataset-selector-row-color));font-family:var(--luzmo-dataset-selector-row-font-family,var(--dataset-selector-row-font-family));flex-flow:wrap;align-items:flex-start;display:flex}:host .dataset-search{--luzmo-select-inline-size:fit-content;flex:none;align-self:flex-start;inline-size:auto}:host .dataset-search .dataset-search-trigger-layout{align-items:center;gap:var(--luzmo-spacing-2);--luzmo-icon-vertical-align:top;min-inline-size:0;display:flex}:host .dataset-search .dataset-search-trigger-label{white-space:nowrap;line-height:1}:host .dataset-search{max-inline-size:var(--luzmo-dataset-selector-row-search-max-width,var(--dataset-selector-row-search-max-width));--luzmo-popover-max-height:var(--luzmo-dataset-selector-row-search-popover-max-height,var(--dataset-selector-row-search-popover-max-height,var(--luzmo-popover-max-height)));--select-minimum-width-multiplier:1}:host .selected-dataset-tag{--luzmo-tag-max-inline-size:180px;--luzmo-tag-height:var(--luzmo-component-height);--luzmo-tag-spacing-inline-start:var(--luzmo-spacing-3);--luzmo-tag-icon-spacing-inline-end:var(--luzmo-spacing-3);--luzmo-tag-label-spacing-inline-end:var(--luzmo-spacing-2);--luzmo-tag-clear-button-spacing-inline-start:.375rem;--luzmo-tag-clear-button-spacing-inline-end:.375rem;margin:0}:host .selected-datasets-tags{--luzmo-tag-group-item-margin-block:0;--luzmo-tag-group-item-margin-inline:0;display:contents}:host .selected-dataset-tag .dataset-tag-label{align-items:center;line-height:1}:host .sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}:host{--dataset-selector-row-gap:var(--luzmo-spacing-2);--dataset-selector-row-min-height:1.75rem;--dataset-selector-row-font-size:.75rem;--dataset-selector-row-color:var(--luzmo-font-color-extra-dimmed);--dataset-selector-row-font-family:var(--luzmo-font-family);--dataset-selector-row-search-max-width:23.75rem;--dataset-selector-row-search-popover-max-height:400px}", _ = 400, v = 50, y = class extends o {
|
|
35
35
|
constructor(...e) {
|
|
36
36
|
super(...e), this.selectedDatasets = [], this.buttonLabel = p("Add dataset", { desc: "Label for the control that opens dataset search to add a dataset" }), this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.flagOpendata = !1, this.disabled = !1, this.hideDatasetIcons = !1, this._availableDatasets = [], this._removalAnnouncement = "", this._selectValue = [], this._retrieving = !1, this._searchValue = "", this._activeSearchRequestId = 0, this._searchDebounceTimer = null, this._renderDatasetOptionIcon = (e) => {
|
|
37
37
|
if (this.hideDatasetIcons) return null;
|
|
@@ -216,8 +216,11 @@ var g = ":host([disabled]){pointer-events:none}:host{box-sizing:border-box;gap:v
|
|
|
216
216
|
@luzmo-opened=${this._handleSearchOpened}
|
|
217
217
|
@luzmo-closed=${this._handleSearchClosed}
|
|
218
218
|
>
|
|
219
|
-
<
|
|
220
|
-
|
|
219
|
+
<span slot="label" class="dataset-search-trigger-layout">
|
|
220
|
+
<luzmo-icon .icon=${a} size="s" aria-hidden="true"></luzmo-icon>
|
|
221
|
+
${this.selectedDatasets.length === 0 ? s`<span class="dataset-search-trigger-label">${this.buttonLabel}</span>` : c}
|
|
222
|
+
</span>
|
|
223
|
+
${this.selectedDatasets.length > 0 ? s`<luzmo-tooltip slot="tooltip" self-managed placement="top" size="s">${this.buttonLabel}</luzmo-tooltip>` : c}
|
|
221
224
|
</luzmo-select>
|
|
222
225
|
`;
|
|
223
226
|
}
|
package/components/index.cjs
CHANGED
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./set-locale-MCuEsOOu.cjs`),t=require(`./ai-chat-BKbda6Jf.cjs`),n=require(`./localize-BKptOXuV.cjs`),r=require(`./dataset-icon-DF9jlsN0.cjs`),i=require(`./dataset-selector-row-BEb7JPYp.cjs`),a=require(`./ai-interaction-textarea-5NRTJJHU.cjs`),o=require(`./dataset-selector-list-qAMl0vM_.cjs`),s=require(`./formatter-BblIPq_5.cjs`),c=require(`./decompose-numeric-format-DuZkAMnU.cjs`),l=require(`./display-settings-BLf7lBww.cjs`),u=require(`./display-settings-binning-BAg6FoqJ.cjs`),d=require(`./display-settings-datetime-BzeNlKLC.cjs`),f=require(`./display-settings-grand-totals-HDpr3IJ5.cjs`),p=require(`./display-settings-numeric-DSs20wUu.cjs`),m=require(`./period-over-period-condition.const-BkZf5SbF.cjs`),h=require(`./display-settings-period-over-period-CcX7vQnt.cjs`),g=require(`./data-field-level-6npuFtQo.cjs`),_=require(`./data-field-97uH3l6o.cjs`),v=require(`./convert-datasets-to-data-fields-Cw51cEmZ.cjs`),y=require(`./load-data-fields-for-datasets-Co30ufjO.cjs`),b=require(`./data-field-panel-Dv5nfM0z.cjs`),x=require(`./item-slot-drop-panel-CoRFds3a.cjs`),S=require(`./item-option-ChsD18x9.cjs`),C=require(`./slot-menu-CDAAPyFj.cjs`),w=require(`./item-grid-CxblVEy3.cjs`),T=require(`./slot-menu-list-DbWiuJDF.cjs`),E=require(`./item-slot-drop-CYRVCWF0.cjs`),D=require(`./themes-D20ABfIw.cjs`),O=require(`./item-option-panel-B26_sDcj.cjs`),ee=require(`./filters-8ehwgopC.cjs`),k=require(`./filter-expression-picker-BMJkgHu9.cjs`),A=require(`./data-fields-select-B7vJTdZO.cjs`),j=require(`./filter-value-picker-YIkbsWDP.cjs`),M=require(`./filter-value-picker-datetime-BrrmcjIE.cjs`),N=require(`./utils-DKSE_5u1.cjs`),P=require(`./filter-value-picker-hierarchy-B9gDxYna.cjs`),F=require(`./filter-value-picker-numeric-D_dgITCq.cjs`),I=require(`./filter-item-D9m378Qo.cjs`),L=require(`./item-option-action-button-group-Cw9EDbG-.cjs`),R=require(`./item-option-color-palette-picker-gZvk4ODA.cjs`),z=require(`./item-option-color-picker-DCnGqBgT.cjs`),B=require(`./item-option-color-range-B24EAbUi.cjs`),V=require(`./item-option-multi-language-field-DDIu7Hns.cjs`),H=require(`./item-option-number-field-CqrO1Xu0.cjs`),U=require(`./item-option-picker-B86AqAWp.cjs`),W=require(`./item-option-position-picker-Cbi2OygH.cjs`),G=require(`./item-option-positions-number-field-BbIkX6wM.cjs`),K=require(`./item-option-radio-button-group-BtYYhQyI.cjs`),q=require(`./item-option-slider-32oGS1fd.cjs`),J=require(`./item-option-switch-BFk3biK9.cjs`),Y=require(`./item-option-text-field-CWvgQ3pJ.cjs`),X=require(`./item-slot-picker-CmnJSYIF.cjs`),Z=require(`./item-slot-picker-panel-DzKodYTM.cjs`),Q=require(`./viz-item-menu-yr7TQY8-.cjs`);require(`./types.cjs`);var $=[{key:`general`,label:`General`},{key:`filters`,label:`Filters`},{key:`bar-column`,label:`Bar & Column Charts`},{key:`line`,label:`Line Charts`},{key:`scatter-bubble`,label:`Scatter & Bubble Plots`},{key:`area`,label:`Area Charts`},{key:`pie-donut`,label:`Pie & Donut`},{key:`gauges`,label:`Gauges`},{key:`map`,label:`Map Charts`},{key:`hierarchical`,label:`Hierarchical Charts`},{key:`special`,label:`Special Charts`},{key:`financial`,label:`Financial Charts`}],te=[{type:`area-chart`,label:`Area Chart`},{type:`bar-chart`,label:`Bar Chart`},{type:`box-plot`,label:`Box Plot`},{type:`bubble-chart`,label:`Bubble Chart`},{type:`bullet-chart`,label:`Bullet Chart`},{type:`choropleth-map`,label:`Choropleth Map`},{type:`circle-pack-chart`,label:`Circle Pack Chart`},{type:`circular-gauge`,label:`Circular Gauge`},{type:`column-chart`,label:`Column Chart`},{type:`combination-chart`,label:`Combination Chart`},{type:`conditional-number`,label:`Conditional Number`},{type:`date-comparison-filter`,label:`Date Comparison Filter`},{type:`date-filter`,label:`Date Filter`},{type:`donut-chart`,label:`Donut Chart`},{type:`dropdown-filter`,label:`Dropdown Filter`},{type:`evolution-number`,label:`Evolution Number`},{type:`funnel-chart`,label:`Funnel Chart`},{type:`heat-map`,label:`Heat Map`},{type:`heat-table`,label:`Heat Table`},{type:`hexbin-map`,label:`Hexbin Map`},{type:`image`,label:`Image`},{type:`line-chart`,label:`Line Chart`},{type:`marker-map`,label:`Marker Map`},{type:`ohlc-chart`,label:`OHLC Chart`},{type:`parallel-coordinates-plot`,label:`Parallel Coordinates Plot`},{type:`pivot-table`,label:`Pivot Table`},{type:`pyramid-chart`,label:`Pyramid Chart`},{type:`radar-chart`,label:`Radar Chart`},{type:`regular-table`,label:`Regular Table`},{type:`route-map`,label:`Route Map`},{type:`sankey-diagram`,label:`Sankey Diagram`},{type:`scatter-plot`,label:`Scatter Plot`},{type:`search-filter`,label:`Search Filter`},{type:`slicer-filter`,label:`Slicer Filter`},{type:`slider-filter`,label:`Slider Filter`},{type:`speedometer-chart`,label:`Speedometer Chart`},{type:`spike-map`,label:`Spike Map`},{type:`strip-plot`,label:`Strip Plot`},{type:`sunburst-chart`,label:`Sunburst Chart`},{type:`symbol-map`,label:`Symbol Map`},{type:`text`,label:`Text`},{type:`treemap-chart`,label:`Treemap Chart`},{type:`video`,label:`Video`},{type:`wordcloud-chart`,label:`Wordcloud Chart`}],ne=[{item:`text`,type:`text`,label:`Text`,group:`general`},{item:`image`,type:`image`,label:`Image`,group:`general`},{item:`evolution-number`,type:`evolution-number`,label:`Number with evolution`,group:`general`},{item:`video`,type:`video`,label:`Video`,group:`general`},{item:`regular-table`,type:`regular-table`,label:`Regular Table`,group:`general`},{item:`pivot-table`,type:`pivot-table`,label:`Pivot Table`,group:`general`},{item:`spacer`,type:`spacer`,label:`Spacer`,group:`general`},{item:`date-comparison-filter`,type:`date-comparison-filter`,label:`Date Comparison Filter`,group:`filters`},{item:`date-filter`,type:`date-filter`,label:`Date Filter`,group:`filters`},{item:`slider-filter`,type:`slider-filter`,label:`Slider Filter`,group:`filters`},{item:`search-filter`,type:`search-filter`,label:`Search Filter`,group:`filters`},{item:`dropdown-filter`,type:`dropdown-filter`,label:`Dropdown Filter`,group:`filters`},{item:`slicer-filter-vertical`,type:`slicer`,label:`Slicer Filter`,group:`filters`,options:{layout:{alignment:`vertical`}}},{item:`slicer-filter-horizontal`,type:`slicer`,label:`Slicer Filter Horizontal`,group:`filters`,options:{layout:{alignment:`horizontal`}}},{item:`slicer-filter-table`,type:`slicer`,label:`Slicer Filter Table`,group:`filters`,options:{layout:{alignment:`table`}}},{item:`rank-slicer-filter`,type:`slicer`,label:`Rank Slicer Filter`,group:`filters`,options:{layout:{alignment:`rank-vertical`}}},{item:`bar-chart`,type:`bar-chart`,label:`Bar Chart`,group:`bar-column`},{item:`grouped-bar-chart`,type:`bar-chart`,label:`Grouped Bar Chart`,group:`bar-column`,options:{mode:`grouped`}},{item:`stacked-bar-chart`,type:`bar-chart`,label:`Stacked Bar Chart`,group:`bar-column`,options:{mode:`stacked`}},{item:`column-chart`,type:`column-chart`,label:`Column Chart`,group:`bar-column`},{item:`grouped-column-chart`,type:`column-chart`,label:`Grouped Column Chart`,group:`bar-column`,options:{mode:`grouped`}},{item:`stacked-column-chart`,type:`column-chart`,label:`Stacked Column Chart`,group:`bar-column`,options:{mode:`stacked`}},{item:`line-chart`,type:`line-chart`,label:`Line Chart`,group:`line`},{item:`grouped-line-chart`,type:`line-chart`,label:`Grouped Line Chart`,group:`line`,options:{mode:`grouped`}},{item:`scatter-plot`,type:`scatter-plot`,label:`Scatter Plot`,group:`scatter-bubble`},{item:`scatter-group`,type:`scatter-plot`,label:`Scatter Group`,group:`scatter-bubble`},{item:`bubble-plot`,type:`scatter-plot`,label:`Bubble Plot`,group:`scatter-bubble`},{item:`colored-bubble-plot`,type:`scatter-plot`,label:`Colored Bubble Plot`,group:`scatter-bubble`},{item:`area-chart`,type:`area-chart`,label:`Area Chart`,group:`area`},{item:`stacked-area-chart`,type:`area-chart`,label:`Stacked Area Chart`,group:`area`,options:{mode:`stacked`}},{item:`100-area-chart`,type:`area-chart`,label:`100% Stacked Area Chart`,group:`area`,options:{mode:`100%`}},{item:`streamgraph`,type:`area-chart`,label:`Streamgraph`,group:`area`},{item:`pie-chart`,type:`donut-chart`,label:`Pie Chart`,group:`pie-donut`},{item:`donut-chart`,type:`donut-chart`,label:`Donut Chart`,group:`pie-donut`},{item:`semi-pie-chart`,type:`donut-chart`,label:`Semi Pie Chart`,group:`pie-donut`},{item:`semi-donut-chart`,type:`donut-chart`,label:`Semi Donut Chart`,group:`pie-donut`},{item:`bullet-chart`,type:`bullet-chart`,label:`Bullet Chart`,group:`gauges`},{item:`circular-gauge`,type:`circular-gauge`,label:`Circular Gauge`,group:`gauges`},{item:`conditional-number`,type:`conditional-number`,label:`Conditional Number`,group:`gauges`},{item:`speedometer-chart`,type:`speedometer-chart`,label:`Speedometer`,group:`gauges`},{item:`choropleth-map`,type:`choropleth-map`,label:`Choropleth Map`,group:`map`},{item:`symbol-map`,type:`symbol-map`,label:`Symbol Map`,group:`map`},{item:`marker-map`,type:`marker-map`,label:`Marker Map`,group:`map`},{item:`hexbin-map`,type:`hexbin-map`,label:`Hexbin Map`,group:`map`},{item:`heat-map`,type:`heat-map`,label:`Heat Map`,group:`map`},{item:`route-map`,type:`route-map`,label:`Route Map`,group:`map`},{item:`spike-map`,type:`spike-map`,label:`Spike Map`,group:`map`},{item:`treemap-chart`,type:`treemap-chart`,label:`Treemap Chart`,group:`hierarchical`},{item:`sunburst-chart`,type:`sunburst-chart`,label:`Sunburst Chart`,group:`hierarchical`},{item:`circle-pack-chart`,type:`circle-pack-chart`,label:`Circle Pack Chart`,group:`hierarchical`},{item:`combination-chart`,type:`combination-chart`,label:`Combination Chart`,group:`special`},{item:`parallel-coordinates-plot`,type:`parallel-coordinates-plot`,label:`Parallel Coordinates Plot`,group:`special`},{item:`bubble-chart`,type:`bubble-chart`,label:`Bubble Chart`,group:`special`},{item:`strip-plot`,type:`strip-plot`,label:`Strip Plot`,group:`special`},{item:`radar-chart`,type:`radar-chart`,label:`Radar Chart`,group:`special`},{item:`pyramid-chart`,type:`pyramid-chart`,label:`Pyramid Chart`,group:`special`},{item:`funnel-chart`,type:`funnel-chart`,label:`Funnel Chart`,group:`special`},{item:`alluvial-diagram`,type:`alluvial-diagram`,label:`Alluvial Diagram`,group:`special`},{item:`sankey-diagram`,type:`sankey-diagram`,label:`Sankey Diagram`,group:`special`},{item:`venn-diagram`,type:`venn-diagram`,label:`Venn Diagram`,group:`special`},{item:`box-plot`,type:`box-plot`,label:`Box Plot`,group:`special`},{item:`heat-table`,type:`heat-table`,label:`Heat Table`,group:`special`},{item:`wordcloud-chart`,type:`wordcloud-chart`,label:`Wordcloud Chart`,group:`special`},{item:`ohlc-chart`,type:`ohlc-chart`,label:`OHLC Chart`,group:`financial`},{item:`candlestick-chart`,type:`ohlc-chart`,label:`Candlestick Chart`,group:`financial`}];exports.LuzmoAiChat=t.t,Object.defineProperty(exports,`LuzmoAiInteractionTextarea`,{enumerable:!0,get:function(){return a.t}}),Object.defineProperty(exports,`LuzmoDataField`,{enumerable:!0,get:function(){return _.t}}),exports.LuzmoDataFieldLevel=g.t,Object.defineProperty(exports,`LuzmoDataFieldPanel`,{enumerable:!0,get:function(){return b.t}}),Object.defineProperty(exports,`LuzmoDataFieldsSelect`,{enumerable:!0,get:function(){return A.t}}),exports.LuzmoDatasetIcon=r.t,exports.LuzmoDatasetSelectorList=o.t,Object.defineProperty(exports,`LuzmoDatasetSelectorRow`,{enumerable:!0,get:function(){return i.t}}),exports.LuzmoDisplaySettings=l.t,Object.defineProperty(exports,`LuzmoDisplaySettingsBinning`,{enumerable:!0,get:function(){return u.t}}),Object.defineProperty(exports,`LuzmoDisplaySettingsDatetime`,{enumerable:!0,get:function(){return d.t}}),Object.defineProperty(exports,`LuzmoDisplaySettingsGrandTotals`,{enumerable:!0,get:function(){return f.t}}),Object.defineProperty(exports,`LuzmoDisplaySettingsNumeric`,{enumerable:!0,get:function(){return p.t}}),Object.defineProperty(exports,`LuzmoDisplaySettingsPeriodOverPeriod`,{enumerable:!0,get:function(){return h.t}}),Object.defineProperty(exports,`LuzmoFilterExpressionPicker`,{enumerable:!0,get:function(){return k.t}}),Object.defineProperty(exports,`LuzmoFilterItem`,{enumerable:!0,get:function(){return I.t}}),exports.LuzmoFilterValuePicker=j.t,Object.defineProperty(exports,`LuzmoFilterValuePickerDatetime`,{enumerable:!0,get:function(){return M.t}}),Object.defineProperty(exports,`LuzmoFilterValuePickerHierarchy`,{enumerable:!0,get:function(){return P.t}}),Object.defineProperty(exports,`LuzmoFilterValuePickerNumeric`,{enumerable:!0,get:function(){return F.t}}),Object.defineProperty(exports,`LuzmoFilters`,{enumerable:!0,get:function(){return ee.t}}),exports.LuzmoItemGrid=w.t,Object.defineProperty(exports,`LuzmoItemGridItemActionsMenu`,{enumerable:!0,get:function(){return w.n}}),exports.LuzmoItemOption=S.t,exports.LuzmoItemOptionActionButtonGroup=L.t,exports.LuzmoItemOptionColorPalettePicker=R.t,exports.LuzmoItemOptionColorPicker=z.t,exports.LuzmoItemOptionColorRange=B.t,exports.LuzmoItemOptionMultiLangField=V.t,exports.LuzmoItemOptionNumberField=H.t,exports.LuzmoItemOptionPanel=O.t,exports.LuzmoItemOptionPicker=U.t,exports.LuzmoItemOptionPositionPicker=W.t,exports.LuzmoItemOptionPositionsNumberField=G.t,exports.LuzmoItemOptionRadioButtonGroup=K.t,exports.LuzmoItemOptionSlider=q.t,exports.LuzmoItemOptionSwitch=J.t,exports.LuzmoItemOptionTextField=Y.t,Object.defineProperty(exports,`LuzmoItemSlotDrop`,{enumerable:!0,get:function(){return E.t}}),Object.defineProperty(exports,`LuzmoItemSlotDropPanel`,{enumerable:!0,get:function(){return x.t}}),Object.defineProperty(exports,`LuzmoItemSlotPicker`,{enumerable:!0,get:function(){return X.t}}),Object.defineProperty(exports,`LuzmoItemSlotPickerPanel`,{enumerable:!0,get:function(){return Z.t}}),exports.LuzmoSlotMenu=C.t,exports.LuzmoSlotMenuList=T.t,Object.defineProperty(exports,`LuzmoVizItemMenu`,{enumerable:!0,get:function(){return Q.t}}),exports.PeriodOverPeriodCondition=m.t,exports.buildAiMessageDeleteRequest=t.n,exports.buildAiMessageRequest=t.r,exports.convertDatasetsToDataFields=v.t,exports.createInitialProgress=t.i,exports.decomposeNumericFormat=c.t,exports.fetchStreamingResponse=t.a,exports.formatter=s.t,exports.getLocale=e.t,exports.getTheme=D.t,exports.hasProgressChunk=t.o,exports.itemGroups=$,exports.itemList=ne,exports.itemTypes=te,exports.loadDataFieldsForDatasets=y.t,exports.localize=n.t,exports.readNdjsonStream=t.s,exports.setLocale=e.n,exports.switchItem=N.t,exports.systemThemeIds=D.n,exports.targetLocales=e.r;
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./set-locale-MCuEsOOu.cjs`),t=require(`./ai-chat-O_MP_k1b.cjs`),n=require(`./localize-BKptOXuV.cjs`),r=require(`./dataset-icon-DCvy3NSz.cjs`),i=require(`./dataset-selector-row-D1U4ltKv.cjs`),a=require(`./ai-interaction-textarea-Bd1AGBmB.cjs`),o=require(`./dataset-selector-list-DbCmavOc.cjs`),s=require(`./formatter-BblIPq_5.cjs`),c=require(`./decompose-numeric-format-DuZkAMnU.cjs`),l=require(`./display-settings-BLf7lBww.cjs`),u=require(`./display-settings-binning-BAg6FoqJ.cjs`),d=require(`./display-settings-datetime-BzeNlKLC.cjs`),f=require(`./display-settings-grand-totals-HDpr3IJ5.cjs`),p=require(`./display-settings-numeric-DSs20wUu.cjs`),m=require(`./period-over-period-condition.const-BkZf5SbF.cjs`),h=require(`./display-settings-period-over-period-CcX7vQnt.cjs`),g=require(`./data-field-level-6npuFtQo.cjs`),_=require(`./data-field-97uH3l6o.cjs`),v=require(`./convert-datasets-to-data-fields-Cw51cEmZ.cjs`),y=require(`./load-data-fields-for-datasets-Co30ufjO.cjs`),b=require(`./data-field-panel-Dv5nfM0z.cjs`),x=require(`./item-slot-drop-panel-CoRFds3a.cjs`),S=require(`./item-option-ChsD18x9.cjs`),C=require(`./slot-menu-CDAAPyFj.cjs`),w=require(`./item-grid-CxblVEy3.cjs`),T=require(`./slot-menu-list-DbWiuJDF.cjs`),E=require(`./item-slot-drop-CYRVCWF0.cjs`),D=require(`./themes-D20ABfIw.cjs`),O=require(`./item-option-panel-B26_sDcj.cjs`),ee=require(`./filters-8ehwgopC.cjs`),k=require(`./filter-expression-picker-BMJkgHu9.cjs`),A=require(`./data-fields-select-B7vJTdZO.cjs`),j=require(`./filter-value-picker-YIkbsWDP.cjs`),M=require(`./filter-value-picker-datetime-BrrmcjIE.cjs`),N=require(`./utils-DKSE_5u1.cjs`),P=require(`./filter-value-picker-hierarchy-B9gDxYna.cjs`),F=require(`./filter-value-picker-numeric-D_dgITCq.cjs`),I=require(`./filter-item-D9m378Qo.cjs`),L=require(`./item-option-action-button-group-Cw9EDbG-.cjs`),R=require(`./item-option-color-palette-picker-gZvk4ODA.cjs`),z=require(`./item-option-color-picker-DCnGqBgT.cjs`),B=require(`./item-option-color-range-B24EAbUi.cjs`),V=require(`./item-option-multi-language-field-DDIu7Hns.cjs`),H=require(`./item-option-number-field-CqrO1Xu0.cjs`),U=require(`./item-option-picker-B86AqAWp.cjs`),W=require(`./item-option-position-picker-Cbi2OygH.cjs`),G=require(`./item-option-positions-number-field-BbIkX6wM.cjs`),K=require(`./item-option-radio-button-group-BtYYhQyI.cjs`),q=require(`./item-option-slider-32oGS1fd.cjs`),J=require(`./item-option-switch-BFk3biK9.cjs`),Y=require(`./item-option-text-field-CWvgQ3pJ.cjs`),X=require(`./item-slot-picker-CmnJSYIF.cjs`),Z=require(`./item-slot-picker-panel-DzKodYTM.cjs`),Q=require(`./viz-item-menu-yr7TQY8-.cjs`);require(`./types.cjs`);var $=[{key:`general`,label:`General`},{key:`filters`,label:`Filters`},{key:`bar-column`,label:`Bar & Column Charts`},{key:`line`,label:`Line Charts`},{key:`scatter-bubble`,label:`Scatter & Bubble Plots`},{key:`area`,label:`Area Charts`},{key:`pie-donut`,label:`Pie & Donut`},{key:`gauges`,label:`Gauges`},{key:`map`,label:`Map Charts`},{key:`hierarchical`,label:`Hierarchical Charts`},{key:`special`,label:`Special Charts`},{key:`financial`,label:`Financial Charts`}],te=[{type:`area-chart`,label:`Area Chart`},{type:`bar-chart`,label:`Bar Chart`},{type:`box-plot`,label:`Box Plot`},{type:`bubble-chart`,label:`Bubble Chart`},{type:`bullet-chart`,label:`Bullet Chart`},{type:`choropleth-map`,label:`Choropleth Map`},{type:`circle-pack-chart`,label:`Circle Pack Chart`},{type:`circular-gauge`,label:`Circular Gauge`},{type:`column-chart`,label:`Column Chart`},{type:`combination-chart`,label:`Combination Chart`},{type:`conditional-number`,label:`Conditional Number`},{type:`date-comparison-filter`,label:`Date Comparison Filter`},{type:`date-filter`,label:`Date Filter`},{type:`donut-chart`,label:`Donut Chart`},{type:`dropdown-filter`,label:`Dropdown Filter`},{type:`evolution-number`,label:`Evolution Number`},{type:`funnel-chart`,label:`Funnel Chart`},{type:`heat-map`,label:`Heat Map`},{type:`heat-table`,label:`Heat Table`},{type:`hexbin-map`,label:`Hexbin Map`},{type:`image`,label:`Image`},{type:`line-chart`,label:`Line Chart`},{type:`marker-map`,label:`Marker Map`},{type:`ohlc-chart`,label:`OHLC Chart`},{type:`parallel-coordinates-plot`,label:`Parallel Coordinates Plot`},{type:`pivot-table`,label:`Pivot Table`},{type:`pyramid-chart`,label:`Pyramid Chart`},{type:`radar-chart`,label:`Radar Chart`},{type:`regular-table`,label:`Regular Table`},{type:`route-map`,label:`Route Map`},{type:`sankey-diagram`,label:`Sankey Diagram`},{type:`scatter-plot`,label:`Scatter Plot`},{type:`search-filter`,label:`Search Filter`},{type:`slicer-filter`,label:`Slicer Filter`},{type:`slider-filter`,label:`Slider Filter`},{type:`speedometer-chart`,label:`Speedometer Chart`},{type:`spike-map`,label:`Spike Map`},{type:`strip-plot`,label:`Strip Plot`},{type:`sunburst-chart`,label:`Sunburst Chart`},{type:`symbol-map`,label:`Symbol Map`},{type:`text`,label:`Text`},{type:`treemap-chart`,label:`Treemap Chart`},{type:`video`,label:`Video`},{type:`wordcloud-chart`,label:`Wordcloud Chart`}],ne=[{item:`text`,type:`text`,label:`Text`,group:`general`},{item:`image`,type:`image`,label:`Image`,group:`general`},{item:`evolution-number`,type:`evolution-number`,label:`Number with evolution`,group:`general`},{item:`video`,type:`video`,label:`Video`,group:`general`},{item:`regular-table`,type:`regular-table`,label:`Regular Table`,group:`general`},{item:`pivot-table`,type:`pivot-table`,label:`Pivot Table`,group:`general`},{item:`spacer`,type:`spacer`,label:`Spacer`,group:`general`},{item:`date-comparison-filter`,type:`date-comparison-filter`,label:`Date Comparison Filter`,group:`filters`},{item:`date-filter`,type:`date-filter`,label:`Date Filter`,group:`filters`},{item:`slider-filter`,type:`slider-filter`,label:`Slider Filter`,group:`filters`},{item:`search-filter`,type:`search-filter`,label:`Search Filter`,group:`filters`},{item:`dropdown-filter`,type:`dropdown-filter`,label:`Dropdown Filter`,group:`filters`},{item:`slicer-filter-vertical`,type:`slicer`,label:`Slicer Filter`,group:`filters`,options:{layout:{alignment:`vertical`}}},{item:`slicer-filter-horizontal`,type:`slicer`,label:`Slicer Filter Horizontal`,group:`filters`,options:{layout:{alignment:`horizontal`}}},{item:`slicer-filter-table`,type:`slicer`,label:`Slicer Filter Table`,group:`filters`,options:{layout:{alignment:`table`}}},{item:`rank-slicer-filter`,type:`slicer`,label:`Rank Slicer Filter`,group:`filters`,options:{layout:{alignment:`rank-vertical`}}},{item:`bar-chart`,type:`bar-chart`,label:`Bar Chart`,group:`bar-column`},{item:`grouped-bar-chart`,type:`bar-chart`,label:`Grouped Bar Chart`,group:`bar-column`,options:{mode:`grouped`}},{item:`stacked-bar-chart`,type:`bar-chart`,label:`Stacked Bar Chart`,group:`bar-column`,options:{mode:`stacked`}},{item:`column-chart`,type:`column-chart`,label:`Column Chart`,group:`bar-column`},{item:`grouped-column-chart`,type:`column-chart`,label:`Grouped Column Chart`,group:`bar-column`,options:{mode:`grouped`}},{item:`stacked-column-chart`,type:`column-chart`,label:`Stacked Column Chart`,group:`bar-column`,options:{mode:`stacked`}},{item:`line-chart`,type:`line-chart`,label:`Line Chart`,group:`line`},{item:`grouped-line-chart`,type:`line-chart`,label:`Grouped Line Chart`,group:`line`,options:{mode:`grouped`}},{item:`scatter-plot`,type:`scatter-plot`,label:`Scatter Plot`,group:`scatter-bubble`},{item:`scatter-group`,type:`scatter-plot`,label:`Scatter Group`,group:`scatter-bubble`},{item:`bubble-plot`,type:`scatter-plot`,label:`Bubble Plot`,group:`scatter-bubble`},{item:`colored-bubble-plot`,type:`scatter-plot`,label:`Colored Bubble Plot`,group:`scatter-bubble`},{item:`area-chart`,type:`area-chart`,label:`Area Chart`,group:`area`},{item:`stacked-area-chart`,type:`area-chart`,label:`Stacked Area Chart`,group:`area`,options:{mode:`stacked`}},{item:`100-area-chart`,type:`area-chart`,label:`100% Stacked Area Chart`,group:`area`,options:{mode:`100%`}},{item:`streamgraph`,type:`area-chart`,label:`Streamgraph`,group:`area`},{item:`pie-chart`,type:`donut-chart`,label:`Pie Chart`,group:`pie-donut`},{item:`donut-chart`,type:`donut-chart`,label:`Donut Chart`,group:`pie-donut`},{item:`semi-pie-chart`,type:`donut-chart`,label:`Semi Pie Chart`,group:`pie-donut`},{item:`semi-donut-chart`,type:`donut-chart`,label:`Semi Donut Chart`,group:`pie-donut`},{item:`bullet-chart`,type:`bullet-chart`,label:`Bullet Chart`,group:`gauges`},{item:`circular-gauge`,type:`circular-gauge`,label:`Circular Gauge`,group:`gauges`},{item:`conditional-number`,type:`conditional-number`,label:`Conditional Number`,group:`gauges`},{item:`speedometer-chart`,type:`speedometer-chart`,label:`Speedometer`,group:`gauges`},{item:`choropleth-map`,type:`choropleth-map`,label:`Choropleth Map`,group:`map`},{item:`symbol-map`,type:`symbol-map`,label:`Symbol Map`,group:`map`},{item:`marker-map`,type:`marker-map`,label:`Marker Map`,group:`map`},{item:`hexbin-map`,type:`hexbin-map`,label:`Hexbin Map`,group:`map`},{item:`heat-map`,type:`heat-map`,label:`Heat Map`,group:`map`},{item:`route-map`,type:`route-map`,label:`Route Map`,group:`map`},{item:`spike-map`,type:`spike-map`,label:`Spike Map`,group:`map`},{item:`treemap-chart`,type:`treemap-chart`,label:`Treemap Chart`,group:`hierarchical`},{item:`sunburst-chart`,type:`sunburst-chart`,label:`Sunburst Chart`,group:`hierarchical`},{item:`circle-pack-chart`,type:`circle-pack-chart`,label:`Circle Pack Chart`,group:`hierarchical`},{item:`combination-chart`,type:`combination-chart`,label:`Combination Chart`,group:`special`},{item:`parallel-coordinates-plot`,type:`parallel-coordinates-plot`,label:`Parallel Coordinates Plot`,group:`special`},{item:`bubble-chart`,type:`bubble-chart`,label:`Bubble Chart`,group:`special`},{item:`strip-plot`,type:`strip-plot`,label:`Strip Plot`,group:`special`},{item:`radar-chart`,type:`radar-chart`,label:`Radar Chart`,group:`special`},{item:`pyramid-chart`,type:`pyramid-chart`,label:`Pyramid Chart`,group:`special`},{item:`funnel-chart`,type:`funnel-chart`,label:`Funnel Chart`,group:`special`},{item:`alluvial-diagram`,type:`alluvial-diagram`,label:`Alluvial Diagram`,group:`special`},{item:`sankey-diagram`,type:`sankey-diagram`,label:`Sankey Diagram`,group:`special`},{item:`venn-diagram`,type:`venn-diagram`,label:`Venn Diagram`,group:`special`},{item:`box-plot`,type:`box-plot`,label:`Box Plot`,group:`special`},{item:`heat-table`,type:`heat-table`,label:`Heat Table`,group:`special`},{item:`wordcloud-chart`,type:`wordcloud-chart`,label:`Wordcloud Chart`,group:`special`},{item:`ohlc-chart`,type:`ohlc-chart`,label:`OHLC Chart`,group:`financial`},{item:`candlestick-chart`,type:`ohlc-chart`,label:`Candlestick Chart`,group:`financial`}];exports.LuzmoAiChat=t.t,Object.defineProperty(exports,`LuzmoAiInteractionTextarea`,{enumerable:!0,get:function(){return a.t}}),Object.defineProperty(exports,`LuzmoDataField`,{enumerable:!0,get:function(){return _.t}}),exports.LuzmoDataFieldLevel=g.t,Object.defineProperty(exports,`LuzmoDataFieldPanel`,{enumerable:!0,get:function(){return b.t}}),Object.defineProperty(exports,`LuzmoDataFieldsSelect`,{enumerable:!0,get:function(){return A.t}}),exports.LuzmoDatasetIcon=r.t,exports.LuzmoDatasetSelectorList=o.t,Object.defineProperty(exports,`LuzmoDatasetSelectorRow`,{enumerable:!0,get:function(){return i.t}}),exports.LuzmoDisplaySettings=l.t,Object.defineProperty(exports,`LuzmoDisplaySettingsBinning`,{enumerable:!0,get:function(){return u.t}}),Object.defineProperty(exports,`LuzmoDisplaySettingsDatetime`,{enumerable:!0,get:function(){return d.t}}),Object.defineProperty(exports,`LuzmoDisplaySettingsGrandTotals`,{enumerable:!0,get:function(){return f.t}}),Object.defineProperty(exports,`LuzmoDisplaySettingsNumeric`,{enumerable:!0,get:function(){return p.t}}),Object.defineProperty(exports,`LuzmoDisplaySettingsPeriodOverPeriod`,{enumerable:!0,get:function(){return h.t}}),Object.defineProperty(exports,`LuzmoFilterExpressionPicker`,{enumerable:!0,get:function(){return k.t}}),Object.defineProperty(exports,`LuzmoFilterItem`,{enumerable:!0,get:function(){return I.t}}),exports.LuzmoFilterValuePicker=j.t,Object.defineProperty(exports,`LuzmoFilterValuePickerDatetime`,{enumerable:!0,get:function(){return M.t}}),Object.defineProperty(exports,`LuzmoFilterValuePickerHierarchy`,{enumerable:!0,get:function(){return P.t}}),Object.defineProperty(exports,`LuzmoFilterValuePickerNumeric`,{enumerable:!0,get:function(){return F.t}}),Object.defineProperty(exports,`LuzmoFilters`,{enumerable:!0,get:function(){return ee.t}}),exports.LuzmoItemGrid=w.t,Object.defineProperty(exports,`LuzmoItemGridItemActionsMenu`,{enumerable:!0,get:function(){return w.n}}),exports.LuzmoItemOption=S.t,exports.LuzmoItemOptionActionButtonGroup=L.t,exports.LuzmoItemOptionColorPalettePicker=R.t,exports.LuzmoItemOptionColorPicker=z.t,exports.LuzmoItemOptionColorRange=B.t,exports.LuzmoItemOptionMultiLangField=V.t,exports.LuzmoItemOptionNumberField=H.t,exports.LuzmoItemOptionPanel=O.t,exports.LuzmoItemOptionPicker=U.t,exports.LuzmoItemOptionPositionPicker=W.t,exports.LuzmoItemOptionPositionsNumberField=G.t,exports.LuzmoItemOptionRadioButtonGroup=K.t,exports.LuzmoItemOptionSlider=q.t,exports.LuzmoItemOptionSwitch=J.t,exports.LuzmoItemOptionTextField=Y.t,Object.defineProperty(exports,`LuzmoItemSlotDrop`,{enumerable:!0,get:function(){return E.t}}),Object.defineProperty(exports,`LuzmoItemSlotDropPanel`,{enumerable:!0,get:function(){return x.t}}),Object.defineProperty(exports,`LuzmoItemSlotPicker`,{enumerable:!0,get:function(){return X.t}}),Object.defineProperty(exports,`LuzmoItemSlotPickerPanel`,{enumerable:!0,get:function(){return Z.t}}),exports.LuzmoSlotMenu=C.t,exports.LuzmoSlotMenuList=T.t,Object.defineProperty(exports,`LuzmoVizItemMenu`,{enumerable:!0,get:function(){return Q.t}}),exports.PeriodOverPeriodCondition=m.t,exports.buildAiMessageDeleteRequest=t.n,exports.buildAiMessageRequest=t.r,exports.convertDatasetsToDataFields=v.t,exports.createInitialProgress=t.i,exports.decomposeNumericFormat=c.t,exports.fetchStreamingResponse=t.a,exports.formatter=s.t,exports.getLocale=e.t,exports.getTheme=D.t,exports.hasProgressChunk=t.o,exports.itemGroups=$,exports.itemList=ne,exports.itemTypes=te,exports.loadDataFieldsForDatasets=y.t,exports.localize=n.t,exports.readNdjsonStream=t.s,exports.setLocale=e.n,exports.switchItem=N.t,exports.systemThemeIds=D.n,exports.targetLocales=e.r;
|
package/components/index.js
CHANGED
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
}
|
|
26
26
|
})();
|
|
27
27
|
import { n as e, r as t, t as n } from "./set-locale-CXnxhP_B.js";
|
|
28
|
-
import { a as r, i, n as a, o, r as s, s as c, t as l } from "./ai-chat-
|
|
28
|
+
import { a as r, i, n as a, o, r as s, s as c, t as l } from "./ai-chat-D2L9_kci.js";
|
|
29
29
|
import { t as u } from "./localize-BTLmwb_o.js";
|
|
30
|
-
import { t as d } from "./dataset-icon-
|
|
31
|
-
import { t as f } from "./dataset-selector-row-
|
|
32
|
-
import { t as p } from "./ai-interaction-textarea-
|
|
33
|
-
import { t as m } from "./dataset-selector-list-
|
|
30
|
+
import { t as d } from "./dataset-icon-DVvk1RBl.js";
|
|
31
|
+
import { t as f } from "./dataset-selector-row-HFt4sJN8.js";
|
|
32
|
+
import { t as p } from "./ai-interaction-textarea-BJHzUcBF.js";
|
|
33
|
+
import { t as m } from "./dataset-selector-list-CXnDkIe2.js";
|
|
34
34
|
import { t as h } from "./formatter-B-7UHTKd.js";
|
|
35
35
|
import { t as g } from "./decompose-numeric-format-bSRd_jIJ.js";
|
|
36
36
|
import { t as _ } from "./display-settings-BLMrlvMS.js";
|
package/custom-elements.json
CHANGED
|
@@ -277,6 +277,16 @@
|
|
|
277
277
|
"description": "When true, disables @ trigger mentions for dataset fields in the input",
|
|
278
278
|
"attribute": "disable-column-mentions"
|
|
279
279
|
},
|
|
280
|
+
{
|
|
281
|
+
"kind": "field",
|
|
282
|
+
"name": "requireDataset",
|
|
283
|
+
"type": {
|
|
284
|
+
"text": "boolean"
|
|
285
|
+
},
|
|
286
|
+
"default": "false",
|
|
287
|
+
"description": "When true, at least one dataset must be selected before the prompt can be submitted",
|
|
288
|
+
"attribute": "require-dataset"
|
|
289
|
+
},
|
|
280
290
|
{
|
|
281
291
|
"kind": "field",
|
|
282
292
|
"name": "modelPreference",
|
|
@@ -767,6 +777,15 @@
|
|
|
767
777
|
"description": "When true, disables @ trigger mentions for dataset fields in the input",
|
|
768
778
|
"fieldName": "disableColumnMentions"
|
|
769
779
|
},
|
|
780
|
+
{
|
|
781
|
+
"name": "require-dataset",
|
|
782
|
+
"type": {
|
|
783
|
+
"text": "boolean"
|
|
784
|
+
},
|
|
785
|
+
"default": "false",
|
|
786
|
+
"description": "When true, at least one dataset must be selected before the prompt can be submitted",
|
|
787
|
+
"fieldName": "requireDataset"
|
|
788
|
+
},
|
|
770
789
|
{
|
|
771
790
|
"name": "model-preference",
|
|
772
791
|
"type": {
|
|
@@ -1158,6 +1177,16 @@
|
|
|
1158
1177
|
"description": "When true, retains the input value after submitting a prompt (default: false)\nWhen false (default), clears the textarea value after submission",
|
|
1159
1178
|
"attribute": "retain-on-submit"
|
|
1160
1179
|
},
|
|
1180
|
+
{
|
|
1181
|
+
"kind": "field",
|
|
1182
|
+
"name": "requireDataset",
|
|
1183
|
+
"type": {
|
|
1184
|
+
"text": "boolean"
|
|
1185
|
+
},
|
|
1186
|
+
"default": "false",
|
|
1187
|
+
"description": "When true, at least one dataset must be selected before the prompt can be submitted",
|
|
1188
|
+
"attribute": "require-dataset"
|
|
1189
|
+
},
|
|
1161
1190
|
{
|
|
1162
1191
|
"type": {
|
|
1163
1192
|
"text": "boolean"
|
|
@@ -1222,6 +1251,14 @@
|
|
|
1222
1251
|
"name": "retain-on-submit",
|
|
1223
1252
|
"kind": "field"
|
|
1224
1253
|
},
|
|
1254
|
+
{
|
|
1255
|
+
"type": {
|
|
1256
|
+
"text": "boolean"
|
|
1257
|
+
},
|
|
1258
|
+
"description": "When true, at least one dataset must be selected before the prompt can be submitted",
|
|
1259
|
+
"name": "require-dataset",
|
|
1260
|
+
"kind": "field"
|
|
1261
|
+
},
|
|
1225
1262
|
{
|
|
1226
1263
|
"type": {
|
|
1227
1264
|
"text": "string"
|
|
@@ -1393,6 +1430,15 @@
|
|
|
1393
1430
|
"default": "false",
|
|
1394
1431
|
"description": "When true, retains the input value after submitting a prompt (default: false)\nWhen false (default), clears the textarea value after submission",
|
|
1395
1432
|
"fieldName": "retainOnSubmit"
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"name": "require-dataset",
|
|
1436
|
+
"type": {
|
|
1437
|
+
"text": "boolean"
|
|
1438
|
+
},
|
|
1439
|
+
"default": "false",
|
|
1440
|
+
"description": "When true, at least one dataset must be selected before the prompt can be submitted",
|
|
1441
|
+
"fieldName": "requireDataset"
|
|
1396
1442
|
}
|
|
1397
1443
|
],
|
|
1398
1444
|
"superclass": {
|