@arcgis/portal-components 5.2.0-next.25 → 5.2.0-next.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{PZJAY7AM.js → 32CZ4VLI.js} +1 -1
- package/dist/cdn/{ZRFGH6MY.js → 3BJVGCJG.js} +82 -82
- package/dist/cdn/{EOSO2N3D.js → 47NPIL2S.js} +1 -1
- package/dist/cdn/{IANXXLKE.js → BZTVED5W.js} +1 -1
- package/dist/cdn/{4PKNGQ3Q.js → CHSZSBO6.js} +1 -1
- package/dist/cdn/DY5G63YO.js +2 -0
- package/dist/cdn/ECNI2A4K.js +2 -0
- package/dist/cdn/{IVD6XJNI.js → FRDK7SCC.js} +1 -1
- package/dist/cdn/{SY6RBNVT.js → GDZZCADX.js} +1 -1
- package/dist/cdn/GJ26ZIE5.js +2 -0
- package/dist/cdn/GNS7NA7V.js +2 -0
- package/dist/cdn/HB7GO6ST.js +2 -0
- package/dist/cdn/M7ABAD7K.js +2 -0
- package/dist/cdn/O7ICV6C7.js +2 -0
- package/dist/cdn/OKHKS5RH.js +2 -0
- package/dist/cdn/{PDL3DPMG.js → PFCDINAN.js} +1 -1
- package/dist/cdn/QOFH6DQT.js +2 -0
- package/dist/cdn/RJPBPB45.js +2 -0
- package/dist/cdn/VSKX2QMZ.js +2 -0
- package/dist/cdn/{GDYQWDWB.js → VTLIQOV4.js} +1 -1
- package/dist/cdn/{EZZ66WTI.js → YGKPNY5R.js} +1 -1
- package/dist/cdn/assets/portal-browser/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/components/arcgis-portal-browser/customElement.d.ts +30 -0
- package/dist/components/arcgis-portal-browser/customElement.js +4 -1
- package/dist/components/arcgis-portal-browser/utils/store.d.ts +2 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +57 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.js +34 -0
- package/dist/components/arcgis-portal-browser-filter/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter/index.js +4 -0
- package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +121 -0
- package/dist/components/arcgis-portal-browser-filter-date/customElement.js +117 -0
- package/dist/components/arcgis-portal-browser-filter-date/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter-date/index.js +5 -0
- package/dist/components/arcgis-portal-browser-filter-status/customElement.d.ts +64 -8
- package/dist/components/arcgis-portal-browser-filter-status/customElement.js +26 -25
- package/dist/components/arcgis-portal-browser-filters/customElement.d.ts +7 -0
- package/dist/components/arcgis-portal-browser-filters/customElement.js +29 -0
- package/dist/components/arcgis-portal-browser-filters/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filters/index.js +2 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +24 -0
- package/dist/loader.js +6 -3
- package/dist/types/lumina.d.ts +18 -1
- package/dist/types/preact.d.ts +21 -1
- package/dist/types/react.d.ts +24 -1
- package/dist/types/stencil.d.ts +18 -1
- package/package.json +4 -4
- package/dist/cdn/R2ULEQSR.js +0 -2
- package/dist/cdn/RFZCHE7J.js +0 -2
- package/dist/cdn/XDMQ36GP.js +0 -2
- package/dist/cdn/XPYGLVPT.js +0 -2
|
@@ -1,25 +1,81 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { PortalBrowserFilterDetail } from "../arcgis-portal-browser/utils/store.js";
|
|
4
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
4
5
|
|
|
5
6
|
export abstract class ArcgisPortalBrowserFilterStatus extends LitElement {
|
|
7
|
+
/** @internal */
|
|
8
|
+
protected _messages: {
|
|
9
|
+
browser: {
|
|
10
|
+
refineContent: string;
|
|
11
|
+
close: string;
|
|
12
|
+
loading: string;
|
|
13
|
+
};
|
|
14
|
+
range: {
|
|
15
|
+
summary: string;
|
|
16
|
+
announcement: string;
|
|
17
|
+
};
|
|
18
|
+
filterStatus: {
|
|
19
|
+
filters: string;
|
|
20
|
+
additional: string;
|
|
21
|
+
clearAllFilters: string;
|
|
22
|
+
};
|
|
23
|
+
filterDate: {
|
|
24
|
+
title: {
|
|
25
|
+
created: string;
|
|
26
|
+
modified: string;
|
|
27
|
+
};
|
|
28
|
+
clear: string;
|
|
29
|
+
created: string;
|
|
30
|
+
modified: string;
|
|
31
|
+
today: string;
|
|
32
|
+
yesterday: string;
|
|
33
|
+
last7: string;
|
|
34
|
+
last30: string;
|
|
35
|
+
never: string;
|
|
36
|
+
custom: string;
|
|
37
|
+
};
|
|
38
|
+
} & T9nMeta<{
|
|
39
|
+
browser: {
|
|
40
|
+
refineContent: string;
|
|
41
|
+
close: string;
|
|
42
|
+
loading: string;
|
|
43
|
+
};
|
|
44
|
+
range: {
|
|
45
|
+
summary: string;
|
|
46
|
+
announcement: string;
|
|
47
|
+
};
|
|
48
|
+
filterStatus: {
|
|
49
|
+
filters: string;
|
|
50
|
+
additional: string;
|
|
51
|
+
clearAllFilters: string;
|
|
52
|
+
};
|
|
53
|
+
filterDate: {
|
|
54
|
+
title: {
|
|
55
|
+
created: string;
|
|
56
|
+
modified: string;
|
|
57
|
+
};
|
|
58
|
+
clear: string;
|
|
59
|
+
created: string;
|
|
60
|
+
modified: string;
|
|
61
|
+
today: string;
|
|
62
|
+
yesterday: string;
|
|
63
|
+
last7: string;
|
|
64
|
+
last30: string;
|
|
65
|
+
never: string;
|
|
66
|
+
custom: string;
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
6
69
|
/** Pass the width of the browser from state */
|
|
7
70
|
accessor browserWidth: number | undefined;
|
|
8
71
|
/** Pass the width of the component container */
|
|
9
72
|
accessor componentWidth: number | undefined;
|
|
10
73
|
accessor filters: Record<string, PortalBrowserFilterDetail>;
|
|
11
74
|
accessor hiddenFilterIds: string[];
|
|
12
|
-
accessor t9n: FilterStatusT9n;
|
|
13
75
|
readonly arcgisBrowserFilterClear: import("@arcgis/lumina").TargetedEvent<this, null>;
|
|
14
76
|
readonly arcgisBrowserFilterRemove: import("@arcgis/lumina").TargetedEvent<this, string>;
|
|
15
77
|
readonly "@eventTypes": {
|
|
16
78
|
arcgisBrowserFilterClear: ArcgisPortalBrowserFilterStatus["arcgisBrowserFilterClear"]["detail"];
|
|
17
79
|
arcgisBrowserFilterRemove: ArcgisPortalBrowserFilterStatus["arcgisBrowserFilterRemove"]["detail"];
|
|
18
80
|
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type FilterStatusT9n = {
|
|
22
|
-
filters: string;
|
|
23
|
-
additional: string;
|
|
24
|
-
clearAllFilters: string;
|
|
25
|
-
};
|
|
81
|
+
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { keyed as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { css as
|
|
6
|
-
import { b } from "../../chunks/ui.js";
|
|
7
|
-
import { g
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { c as u } from "../../chunks/runtime.js";
|
|
3
|
+
import { keyed as p } from "lit/directives/keyed.js";
|
|
4
|
+
import { LitElement as m, createEvent as d } from "@arcgis/lumina";
|
|
5
|
+
import { css as b, html as e } from "lit";
|
|
6
|
+
import { b as f } from "../../chunks/ui.js";
|
|
7
|
+
import { g } from "../../chunks/dom.js";
|
|
8
|
+
import { u as w } from "../../chunks/useT9n.js";
|
|
9
|
+
const B = b`:host{display:flex;align-items:center}.status-list{display:flex;align-items:center;max-width:100%}.status-chip{max-width:100%;--calcite-color-foreground-2: var(--calcite-color-foreground-1)}.chip-group{max-width:100%;min-width:0}.status-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-content{max-width:28rem;padding:.75rem}.clear-button{margin-inline-start:.25rem}`;
|
|
10
|
+
class v extends m {
|
|
10
11
|
constructor() {
|
|
11
|
-
super(...arguments), this.inBounds = [], this.outOfBounds = [], this.filters = {}, this.hiddenFilterIds = [], this.arcgisBrowserFilterClear =
|
|
12
|
+
super(...arguments), this._messages = w({ name: "portal-browser", blocking: !0 }), this.inBounds = [], this.outOfBounds = [], this.filters = {}, this.hiddenFilterIds = [], this.arcgisBrowserFilterClear = d(), this.arcgisBrowserFilterRemove = d();
|
|
12
13
|
}
|
|
13
14
|
static {
|
|
14
|
-
this.properties = { inBounds: 16, outOfBounds: 16, filters: 0, hiddenFilterIds: 0,
|
|
15
|
+
this.properties = { inBounds: 16, outOfBounds: 16, filters: 0, hiddenFilterIds: 0, componentWidth: 9, browserWidth: 9 };
|
|
15
16
|
}
|
|
16
17
|
static {
|
|
17
|
-
this.styles =
|
|
18
|
+
this.styles = B;
|
|
18
19
|
}
|
|
19
20
|
connectedCallback() {
|
|
20
21
|
super.connectedCallback(), this.processValidFilters();
|
|
@@ -26,30 +27,30 @@ class B extends p {
|
|
|
26
27
|
return this.hiddenFilterIds.includes(t.id) ? !1 : t.id === "collaborations" && "additionalParams" in t ? !!(t.additionalParams && t.label) : !!(t.value && t.label);
|
|
27
28
|
}
|
|
28
29
|
processValidFilters() {
|
|
29
|
-
const t = Object.values(this.filters).filter(this.isFilterValid.bind(this)),
|
|
30
|
-
if ((this.browserWidth ?? window.innerWidth) <
|
|
30
|
+
const t = Object.values(this.filters).filter(this.isFilterValid.bind(this)), s = this.componentWidth ?? 0;
|
|
31
|
+
if ((this.browserWidth ?? window.innerWidth) < f.sm) {
|
|
31
32
|
this.inBounds = t, this.outOfBounds = [];
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
34
|
-
const
|
|
35
|
-
let
|
|
36
|
-
const
|
|
37
|
-
t.forEach((
|
|
38
|
-
const
|
|
39
|
-
!
|
|
40
|
-
}), this.inBounds =
|
|
35
|
+
const h = Math.max(s - 460, 0);
|
|
36
|
+
let a = 0;
|
|
37
|
+
const l = [], n = [];
|
|
38
|
+
t.forEach((r) => {
|
|
39
|
+
const c = g({ text: r.label });
|
|
40
|
+
!s || a + c <= h ? (l.push(r), a += c) : n.push(r);
|
|
41
|
+
}), this.inBounds = l, this.outOfBounds = n;
|
|
41
42
|
}
|
|
42
43
|
renderChip(t) {
|
|
43
|
-
return
|
|
44
|
+
return p(t.id, e`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${() => {
|
|
44
45
|
this.arcgisBrowserFilterRemove.emit(t.id);
|
|
45
46
|
}}><span class="status-chip__label">${t.label}</span></calcite-chip>`);
|
|
46
47
|
}
|
|
47
48
|
render() {
|
|
48
|
-
const t = this.outOfBounds.length > 0,
|
|
49
|
-
return
|
|
49
|
+
const t = this._messages.filterStatus, s = this.outOfBounds.length > 0, o = this.inBounds.length + this.outOfBounds.length;
|
|
50
|
+
return o ? e`<div class="status-list"><calcite-chip-group class="chip-group" .label=${t.filters} scale=s>${this.inBounds.map((i) => this.renderChip(i))}${s && e`<calcite-button id=popover-button round kind=neutral appearance=outline scale=s>+ ${this.outOfBounds.length}</calcite-button>` || ""}</calcite-chip-group>${s && e`<calcite-popover .label=${t.additional} reference-element=popover-button placement=bottom-end><div class="popover-content"><calcite-chip-group .label=${t.additional} scale=s>${this.outOfBounds.map((i) => this.renderChip(i))}</calcite-chip-group></div></calcite-popover>` || ""}${o > 1 && e`<calcite-button class="clear-button" scale=s appearance=transparent kind=brand @click=${() => this.arcgisBrowserFilterClear.emit(null)}>${t.clearAllFilters}</calcite-button>` || ""}</div>` : null;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
+
u("arcgis-portal-browser-filter-status", v);
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
v as ArcgisPortalBrowserFilterStatus
|
|
55
56
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { PortalBrowserStore } from "../arcgis-portal-browser/utils/store.js";
|
|
4
|
+
|
|
5
|
+
export abstract class ArcgisPortalBrowserFilters extends LitElement {
|
|
6
|
+
accessor store: PortalBrowserStore | undefined;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as e } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as o, html as r } from "lit";
|
|
4
|
+
import { LitElement as i, safeClassMap as l } from "@arcgis/lumina";
|
|
5
|
+
import { createRef as a, ref as c } from "lit/directives/ref.js";
|
|
6
|
+
import { b as n } from "../../chunks/ui.js";
|
|
7
|
+
const p = o`:host{display:block}.filters-shell{display:block}.filters-shell__top{padding:0}.filters-shell__top--padded{padding:0 1rem 1rem}`;
|
|
8
|
+
class d extends i {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this._accordionRef = a();
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.properties = { store: 0 };
|
|
14
|
+
}
|
|
15
|
+
static {
|
|
16
|
+
this.styles = p;
|
|
17
|
+
}
|
|
18
|
+
updated() {
|
|
19
|
+
this.store && this._accordionRef.value && (this.store.filterElement = this._accordionRef.value);
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
const t = this.store, s = !!t?.panel || (t?.width ?? 0) < n.sm;
|
|
23
|
+
return r`<div class="filters-shell" .inert=${!!t?.preview}><div class=${l({ "filters-shell__top": !0, "filters-shell__top--padded": s })}><slot name=top></slot></div><slot name=primary></slot><slot name=title></slot><calcite-accordion appearance=transparent icon-type=chevron icon-position=start scale=m ${c(this._accordionRef)}><slot></slot></calcite-accordion><slot name=bottom></slot></div>`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
e("arcgis-portal-browser-filters", d);
|
|
27
|
+
export {
|
|
28
|
+
d as ArcgisPortalBrowserFilters
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|