@arcgis/portal-components 6.0.0-next.2 → 6.0.0-next.21
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/{MKSFNVXL.js → 22TDAUX4.js} +1 -1
- package/dist/cdn/234TH32X.js +106 -0
- package/dist/cdn/2D3FQXJ4.js +2 -0
- package/dist/cdn/{BKD7JSV2.js → 2DXO6FVX.js} +1 -1
- package/dist/cdn/{TWCJJCPC.js → 2XJX2JUO.js} +1 -1
- package/dist/cdn/{SGDDFWCJ.js → 3EQGUCO4.js} +1 -1
- package/dist/cdn/{OR6T5SB3.js → 3J3ISO3E.js} +1 -1
- package/dist/cdn/3RTST3I6.js +2 -0
- package/dist/cdn/3XH3JHOI.js +2 -0
- package/dist/cdn/4ONCJSSP.js +2 -0
- package/dist/cdn/4QYVBXZT.js +2 -0
- package/dist/cdn/{K75JTQPW.js → 4VLEUN7I.js} +1 -1
- package/dist/cdn/4WQA7UAJ.js +2 -0
- package/dist/cdn/5OWIWCEQ.js +2 -0
- package/dist/cdn/{7ZWYUHGK.js → 5R4JJWGB.js} +1 -1
- package/dist/cdn/63HYFDRU.js +2 -0
- package/dist/cdn/6MATPHXT.js +79 -0
- package/dist/cdn/7IP3RVPH.js +2 -0
- package/dist/cdn/7ISSDO2T.js +2 -0
- package/dist/cdn/AKTIIRJQ.js +2 -0
- package/dist/cdn/ASID6YW7.js +135 -0
- package/dist/cdn/B3HV5JVN.js +2 -0
- package/dist/cdn/B6666VUQ.js +2 -0
- package/dist/cdn/BOO7GG5L.js +2 -0
- package/dist/cdn/CZ4FC4GM.js +2 -0
- package/dist/cdn/D3LZFIHV.js +2 -0
- package/dist/cdn/{NWVLGU2C.js → D3Q72PPN.js} +1 -1
- package/dist/cdn/DABNV2OO.js +2 -0
- package/dist/cdn/DELNTRCT.js +2 -0
- package/dist/cdn/DOCNBKQZ.js +2 -0
- package/dist/cdn/EP7NWEC5.js +2 -0
- package/dist/cdn/EQRBP6H6.js +66 -0
- package/dist/cdn/{ABORO35R.js → ESKKH4DE.js} +1 -1
- package/dist/cdn/EUQQZIRW.js +2 -0
- package/dist/cdn/F2HT5PVQ.js +2 -0
- package/dist/cdn/FE3O23SE.js +2 -0
- package/dist/cdn/FGRMURKX.js +2 -0
- package/dist/cdn/FN2QMDEW.js +2 -0
- package/dist/cdn/{I6IRHXWR.js → FYVATGMR.js} +1 -1
- package/dist/cdn/{RHCRPJWS.js → G3WDR53S.js} +1 -1
- package/dist/cdn/GAU6DNV5.js +2 -0
- package/dist/cdn/GPAIXN52.js +2 -0
- package/dist/cdn/GRSBU4PD.js +2 -0
- package/dist/cdn/{JWBUJT43.js → H7FA5HFE.js} +1 -1
- package/dist/cdn/HHGKNVCH.js +4 -0
- package/dist/cdn/HJLWIQDI.js +2 -0
- package/dist/cdn/I3EWDYTU.js +2 -0
- package/dist/cdn/{24QSQLRY.js → IKPVMXXW.js} +1 -1
- package/dist/cdn/{5HZNBMW6.js → IOFXDIWC.js} +1 -1
- package/dist/cdn/IPHBVKMY.js +2 -0
- package/dist/cdn/{GAF4YT5N.js → IUIFCQQU.js} +1 -1
- package/dist/cdn/{ZKZDKJ6D.js → IVDZGUNZ.js} +1 -1
- package/dist/cdn/J6SI4Z4F.js +2 -0
- package/dist/cdn/K3GAZFRI.js +63 -0
- package/dist/cdn/K7LYYLUF.js +2 -0
- package/dist/cdn/{74T6IXSN.js → KDORI7H4.js} +1 -1
- package/dist/cdn/KRORL7QC.js +2 -0
- package/dist/cdn/LGJWULAW.js +2 -0
- package/dist/cdn/LTMPXQTC.js +2 -0
- package/dist/cdn/M5STJJRX.js +2 -0
- package/dist/cdn/M7J7RAM4.js +2 -0
- package/dist/cdn/{AXOBMX3S.js → MLTZSPZQ.js} +1 -1
- package/dist/cdn/MSSJRDR7.js +2 -0
- package/dist/cdn/{L64UURQB.js → N4ZRMYZL.js} +1 -1
- package/dist/cdn/NBCYYUHP.js +2 -0
- package/dist/cdn/NHVPNSNH.js +2 -0
- package/dist/cdn/NQ2IAQKL.js +41 -0
- package/dist/cdn/NXGTEDK4.js +2 -0
- package/dist/cdn/{7LMZHJZG.js → NYOXMT6S.js} +1 -1
- package/dist/cdn/O3JP4FQ3.js +2 -0
- package/dist/cdn/O4YFPGD5.js +2 -0
- package/dist/cdn/{JIJO4CAS.js → ODSA6NNS.js} +1 -1
- package/dist/cdn/OHAQPQAP.js +2 -0
- package/dist/cdn/OOXTSCQT.js +2 -0
- package/dist/cdn/OQ2JULON.js +2 -0
- package/dist/cdn/OVH4YLTS.js +2 -0
- package/dist/cdn/QB5BGHLA.js +2 -0
- package/dist/cdn/QKCRNS75.js +2 -0
- package/dist/cdn/{2YZWRFCI.js → RKMW4FUN.js} +1 -1
- package/dist/cdn/RT26JZP5.js +2 -0
- package/dist/cdn/SKHFISBA.js +2 -0
- package/dist/cdn/SKIDJ4QI.js +2 -0
- package/dist/cdn/SRWFOV5W.js +2 -0
- package/dist/cdn/{IN4JPZTY.js → SSCKCDXD.js} +1 -1
- package/dist/cdn/T66G7GIR.js +2 -0
- package/dist/cdn/{RQYNPDN3.js → TIMYD2HM.js} +1 -1
- package/dist/cdn/{ROX3GKKA.js → TIPQ2ZWK.js} +1 -1
- package/dist/cdn/TJWJ3LTU.js +2 -0
- package/dist/cdn/{DHMNNIXZ.js → TMR4BRFI.js} +1 -1
- package/dist/cdn/{JN23JH3T.js → TTQGRN2V.js} +1 -1
- package/dist/cdn/{MLYQGIJU.js → U2HTYOBB.js} +13 -13
- package/dist/cdn/{YZTBAUIO.js → UHOW7Q65.js} +1 -1
- package/dist/cdn/ULGME5RT.js +2 -0
- package/dist/cdn/{Z6R3C4AK.js → US3N5L73.js} +1 -1
- package/dist/cdn/W5POIPYP.js +2 -0
- package/dist/cdn/{TLM457Z5.js → WJWWYBZ7.js} +1 -1
- package/dist/cdn/WNEPEEPZ.js +2 -0
- package/dist/cdn/WPAZDJHU.js +2 -0
- package/dist/cdn/WT72SOAU.js +2 -0
- package/dist/cdn/XJGKRAN5.js +2 -0
- package/dist/cdn/{JPUUMGX5.js → XS5EOWBK.js} +1 -1
- package/dist/cdn/Y5VUMGKH.js +3 -0
- package/dist/cdn/{EQDYQOOT.js → YCIFVZ4J.js} +1 -1
- package/dist/cdn/{3NSHGKZA.js → YDXJHNDI.js} +1 -1
- package/dist/cdn/{32BWFMTC.js → YIOJIA4Y.js} +1 -1
- package/dist/cdn/{K2XSYDAP.js → YK6FCXWU.js} +1 -1
- package/dist/cdn/YPDHSE2J.js +2 -0
- package/dist/cdn/{M5PPX4ZX.js → YQLFXHFG.js} +1 -1
- package/dist/cdn/YSVPB3BO.js +2 -0
- package/dist/cdn/YUOVGTP5.js +2 -0
- package/dist/cdn/Z5CA4C6H.js +2 -0
- package/dist/cdn/{TXC7YBGL.js → ZD6XJVGV.js} +1 -1
- package/dist/cdn/ZHQXYCPA.js +2 -0
- package/dist/cdn/{DLI4XKJ3.js → ZOX4RLS4.js} +1 -1
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-entity-picker/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-item-card-sublayer-select/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-share-summary/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/fieldAddDelete.js +7 -7
- package/dist/chunks/functionalities.js +14 -9
- package/dist/chunks/groups.js +8 -61
- package/dist/chunks/groups2.js +23 -8
- package/dist/chunks/info.js +2 -2
- package/dist/chunks/item.js +58 -26
- package/dist/chunks/item2.js +34 -30
- package/dist/chunks/itemThumbnail.js +21 -21
- package/dist/chunks/loadClassificationData.js +26 -27
- package/dist/chunks/portal-delete-items-review.js +1 -1
- package/dist/chunks/portal-item-badge.js +1 -1
- package/dist/chunks/portal-related-items-list-item.js +1 -1
- package/dist/chunks/portal.js +6 -6
- package/dist/chunks/portal2.js +11 -11
- package/dist/chunks/portalEntitySelection.js +54 -0
- package/dist/chunks/query.js +13 -13
- package/dist/chunks/request.js +49 -41
- package/dist/chunks/requests.js +7 -7
- package/dist/chunks/selectedMentions.js +25 -0
- package/dist/chunks/services.js +1 -1
- package/dist/chunks/string.js +14 -10
- package/dist/chunks/ui.js +1 -0
- package/dist/chunks/url.js +2 -2
- package/dist/chunks/user.js +10 -10
- package/dist/chunks/utils.js +35 -22
- package/dist/chunks/utils2.js +4 -4
- package/dist/chunks/utils3.js +88 -657
- package/dist/chunks/utils4.js +664 -0
- package/dist/components/arcgis-portal-account-switcher/customElement.js +28 -26
- package/dist/components/arcgis-portal-account-switcher-accounts/customElement.d.ts +4 -4
- package/dist/components/arcgis-portal-account-switcher-accounts/customElement.js +8 -8
- package/dist/components/arcgis-portal-account-switcher-list/customElement.d.ts +4 -4
- package/dist/components/arcgis-portal-account-switcher-list/customElement.js +6 -6
- package/dist/components/arcgis-portal-account-switcher-signout/customElement.d.ts +5 -5
- package/dist/components/arcgis-portal-account-switcher-signout/customElement.js +3 -3
- package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +6 -0
- package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +153 -130
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +25 -15
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +574 -2409
- package/dist/components/arcgis-portal-ai-assistant/index.js +4 -0
- package/dist/components/arcgis-portal-ai-assistant/tools/getItemTool.d.ts +11 -0
- package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +51 -0
- package/dist/components/arcgis-portal-ai-assistant/types/portalEntityTools.d.ts +14 -0
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +39 -0
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +63 -27
- package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +3 -1
- package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-config/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
- package/dist/components/arcgis-portal-delete-items/customElement.d.ts +69 -3
- package/dist/components/arcgis-portal-delete-items/customElement.js +446 -330
- package/dist/components/arcgis-portal-delete-items/index.js +1 -2
- package/dist/components/arcgis-portal-delete-items/types.d.ts +1 -0
- package/dist/components/arcgis-portal-entity-picker/customElement.d.ts +36 -0
- package/dist/components/arcgis-portal-entity-picker/customElement.js +202 -120
- package/dist/components/arcgis-portal-entity-picker/index.js +2 -0
- package/dist/components/arcgis-portal-field-delete/customElement.js +33 -31
- package/dist/components/arcgis-portal-field-delete/index.js +1 -1
- package/dist/components/arcgis-portal-group-badges/customElement.js +5 -5
- package/dist/components/arcgis-portal-group-browser/customElement.js +93 -99
- package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -7
- package/dist/components/arcgis-portal-group-browser-preview/customElement.js +2 -2
- package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-card/customElement.js +18 -18
- package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-card/customElement.d.ts +26 -10
- package/dist/components/arcgis-portal-item-card/customElement.js +101 -91
- package/dist/components/arcgis-portal-item-card/index.js +2 -1
- package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.d.ts +102 -0
- package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.js +352 -0
- package/dist/components/arcgis-portal-item-card-sublayer-select/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-card-sublayer-select/index.js +8 -0
- package/dist/components/arcgis-portal-item-card-sublayer-select/types.d.ts +22 -0
- package/dist/components/arcgis-portal-item-share-summary/customElement.d.ts +113 -0
- package/dist/components/arcgis-portal-item-share-summary/customElement.js +172 -0
- package/dist/components/arcgis-portal-item-share-summary/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-share-summary/index.js +5 -0
- package/dist/components/arcgis-portal-item-share-summary-editable/customElement.d.ts +33 -0
- package/dist/components/arcgis-portal-item-share-summary-editable/customElement.js +19 -0
- package/dist/components/arcgis-portal-item-share-summary-editable/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-share-summary-editable/index.js +2 -0
- package/dist/components/arcgis-portal-item-thumbnail/customElement.d.ts +1 -0
- package/dist/components/arcgis-portal-item-thumbnail/customElement.js +14 -14
- package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +61 -57
- package/dist/components/arcgis-portal-navigation/customElement.js +7 -8
- package/dist/components/arcgis-portal-navigation/index.js +1 -1
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +8 -8
- package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +333 -0
- package/dist/components/arcgis-portal-review-related-items/customElement.js +45 -18
- package/dist/components/arcgis-portal-review-related-items/index.js +2 -0
- package/dist/components/arcgis-portal-sublayer-type/customElement.js +13 -103
- package/dist/components/arcgis-portal-user-popup/customElement.js +28 -28
- package/dist/components/portal-group-browser-filters/customElement.js +15 -15
- package/dist/components/portal-related-items-list-item/customElement.js +16 -14
- package/dist/components/portal-related-items-list-item/index.js +1 -1
- 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 +30 -0
- package/dist/index.js +155 -6
- package/dist/loader.js +15 -12
- package/dist/services/groups.d.ts +9 -0
- package/dist/services/item.d.ts +9 -0
- package/dist/types/item.d.ts +9 -9
- package/dist/types/lumina.d.ts +36 -17
- package/dist/types/preact.d.ts +39 -17
- package/dist/types/react.d.ts +42 -17
- package/dist/types/services.d.ts +27 -1
- package/dist/types/stencil.d.ts +36 -17
- package/dist/utils/generateEmbeddings.d.ts +7 -0
- package/dist/utils/semanticSearch.d.ts +60 -0
- package/dist/utils/types.d.ts +10 -0
- package/package.json +10 -10
- package/dist/cdn/23FS4XTG.js +0 -2
- package/dist/cdn/2MPQ5IWJ.js +0 -2
- package/dist/cdn/3CQKCUM5.js +0 -2
- package/dist/cdn/3EYB5GQX.js +0 -2
- package/dist/cdn/3LEQ37YT.js +0 -68
- package/dist/cdn/46BUEBWS.js +0 -2
- package/dist/cdn/4AI52H7C.js +0 -2
- package/dist/cdn/4MUB6TL6.js +0 -2
- package/dist/cdn/4PRXQFCV.js +0 -2
- package/dist/cdn/4QFTKB6T.js +0 -2
- package/dist/cdn/4TSXFX3M.js +0 -2
- package/dist/cdn/5C5GHX4D.js +0 -2
- package/dist/cdn/5PPZNVWG.js +0 -2
- package/dist/cdn/66XWNGQ2.js +0 -2
- package/dist/cdn/6F4SJDRR.js +0 -2
- package/dist/cdn/6RZEXOK3.js +0 -2
- package/dist/cdn/A2SQ4EMZ.js +0 -2
- package/dist/cdn/AICPYLWE.js +0 -4
- package/dist/cdn/AJQT7UXB.js +0 -2
- package/dist/cdn/APSYZEPP.js +0 -209
- package/dist/cdn/AZOJHVAO.js +0 -2
- package/dist/cdn/BSTA5KI5.js +0 -2
- package/dist/cdn/CD5UWSCP.js +0 -2
- package/dist/cdn/CXXV6WJT.js +0 -2
- package/dist/cdn/DDBXEXOV.js +0 -2
- package/dist/cdn/DYO5P3F2.js +0 -2
- package/dist/cdn/E66BDC6N.js +0 -2
- package/dist/cdn/EEAVX4PP.js +0 -2
- package/dist/cdn/EITRZQSC.js +0 -2
- package/dist/cdn/EMJQI4MA.js +0 -2
- package/dist/cdn/FIBQAMJ3.js +0 -2
- package/dist/cdn/FIQZPIIK.js +0 -2
- package/dist/cdn/FNLBJ4ZQ.js +0 -2
- package/dist/cdn/FRE56NBG.js +0 -2
- package/dist/cdn/GSOBDGLK.js +0 -2
- package/dist/cdn/GUO7HKSP.js +0 -463
- package/dist/cdn/GX7U3727.js +0 -2
- package/dist/cdn/GXM3XY3J.js +0 -2
- package/dist/cdn/I273CANO.js +0 -2
- package/dist/cdn/I6NVKNZJ.js +0 -2
- package/dist/cdn/J5FKIZAM.js +0 -2
- package/dist/cdn/JL52W3Z4.js +0 -2
- package/dist/cdn/JOUR2FB2.js +0 -3
- package/dist/cdn/LISDTBEX.js +0 -2
- package/dist/cdn/LWFACY3F.js +0 -2
- package/dist/cdn/LYLQCBVX.js +0 -2
- package/dist/cdn/N4VOTJ25.js +0 -2
- package/dist/cdn/N5QLV56W.js +0 -2
- package/dist/cdn/NRMQDCM3.js +0 -2
- package/dist/cdn/OD5WXP7J.js +0 -2
- package/dist/cdn/OXPXXIWL.js +0 -2
- package/dist/cdn/PMRFXB4F.js +0 -2
- package/dist/cdn/PNIFJ5DQ.js +0 -2
- package/dist/cdn/PZDI5ZDC.js +0 -2
- package/dist/cdn/RVYSVTPQ.js +0 -2
- package/dist/cdn/SVROAT3Z.js +0 -2
- package/dist/cdn/TBZXKKGP.js +0 -2
- package/dist/cdn/TNUCSWBN.js +0 -2
- package/dist/cdn/TOICLGFK.js +0 -2
- package/dist/cdn/TOTWYGB3.js +0 -2
- package/dist/cdn/TUUUK3VX.js +0 -2
- package/dist/cdn/U3KMGSVH.js +0 -2
- package/dist/cdn/WC3FPLYQ.js +0 -2
- package/dist/cdn/XYMBRPC7.js +0 -2
- package/dist/cdn/YTODQCOG.js +0 -2
- package/dist/cdn/YYTEJVBL.js +0 -2
- package/dist/cdn/ZDDN7UKS.js +0 -2
- package/dist/chunks/functional.js +0 -9
- package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +0 -45
- /package/dist/cdn/{OUMTV5H5.js → KHKREBVZ.js} +0 -0
- /package/dist/components/arcgis-portal-ai-assistant/{agents/types.d.ts → types/navigation.d.ts} +0 -0
- /package/dist/components/arcgis-portal-ai-assistant/{agents → types}/portalRouteKeys.d.ts +0 -0
|
@@ -3,7 +3,7 @@ import { c as p } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { LitElement as m, nothing as f, safeStyleMap as g } from "@arcgis/lumina";
|
|
4
4
|
import { css as d, html as l } from "lit";
|
|
5
5
|
import { createRef as c, ref as h } from "lit/directives/ref.js";
|
|
6
|
-
import {
|
|
6
|
+
import { b as $, g as b } from "../../chunks/portal.js";
|
|
7
7
|
const x = /^#[0-9a-f]{3}$/iu, k = /^#[0-9a-f]{6}$/iu;
|
|
8
8
|
function u(r) {
|
|
9
9
|
return E(r) || I(r);
|
|
@@ -3,8 +3,11 @@ import type Portal from "@arcgis/core/portal/Portal.js";
|
|
|
3
3
|
import type PortalItem from "@arcgis/core/portal/PortalItem.js";
|
|
4
4
|
import type PortalUser from "@arcgis/core/portal/PortalUser.js";
|
|
5
5
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
|
+
import type { SearchResultSublayerGeometry } from "../../types/item.js";
|
|
7
|
+
import type { PortalGroupSourceJSON } from "../../types/group.js";
|
|
6
8
|
import type { InternalUIAction } from "../../types/tracking.js";
|
|
7
9
|
import type { PortalItemAction } from "../arcgis-portal-item-actions/customElement.js";
|
|
10
|
+
import type { PortalItemCardSelectedItem, PortalItemCardSelectErrorDetail, PortalItemCardSublayerSelectDetail } from "../arcgis-portal-item-card-sublayer-select/types.js";
|
|
8
11
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
9
12
|
|
|
10
13
|
/**
|
|
@@ -12,14 +15,15 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
|
12
15
|
*
|
|
13
16
|
* @slot [content-top] - Inserted content appears above the card body.
|
|
14
17
|
* @slot [content-end] - Inserted content appears beneath the card details.
|
|
15
|
-
* @slot [
|
|
16
|
-
* @slot [share-summary] - Legacy alias for sharing-summary.
|
|
18
|
+
* @slot [share-summary] - Custom sharing summary content.
|
|
17
19
|
* @slot [actions-start] - Inserted content appears in the footer before owner information.
|
|
18
20
|
* @slot [actions-end] - Inserted content appears in the footer end area.
|
|
19
21
|
*/
|
|
20
22
|
export abstract class ArcgisPortalItemCard extends LitElement {
|
|
21
23
|
/** Pass a set of actions to appear inside an ellipsis menu. */
|
|
22
24
|
accessor actions: PortalItemAction[];
|
|
25
|
+
/** Allowed sublayer geometries. An empty array permits all geometries. */
|
|
26
|
+
accessor allowedGeometries: SearchResultSublayerGeometry[];
|
|
23
27
|
/**
|
|
24
28
|
* Disable interaction when true.
|
|
25
29
|
*
|
|
@@ -32,6 +36,8 @@ export abstract class ArcgisPortalItemCard extends LitElement {
|
|
|
32
36
|
* @default false
|
|
33
37
|
*/
|
|
34
38
|
accessor disableSelection: boolean;
|
|
39
|
+
/** List of current user's groups the item is shared to */
|
|
40
|
+
accessor groups: string[] | undefined;
|
|
35
41
|
/**
|
|
36
42
|
* @default false
|
|
37
43
|
* @internal
|
|
@@ -96,13 +102,15 @@ export abstract class ArcgisPortalItemCard extends LitElement {
|
|
|
96
102
|
*/
|
|
97
103
|
accessor recycleBin: boolean;
|
|
98
104
|
/**
|
|
99
|
-
* Set to true to mark item as selected.
|
|
105
|
+
* Set to true to mark the whole item as selected. Sublayer modes use selectedItems instead.
|
|
100
106
|
*
|
|
101
107
|
* @default false
|
|
102
108
|
*/
|
|
103
109
|
accessor selected: boolean;
|
|
110
|
+
/** Parent-controlled item, sublayer, or task selections used by sublayer modes. Replace the array to accept arcgisItemCardSelect. */
|
|
111
|
+
accessor selectedItems: PortalItemCardSelectedItem[];
|
|
104
112
|
/**
|
|
105
|
-
* Type of selection behavior.
|
|
113
|
+
* Type of selection behavior. Sublayer modes render a built-in footer selector rather than a checkbox or radio.
|
|
106
114
|
*
|
|
107
115
|
* @default "none"
|
|
108
116
|
*/
|
|
@@ -173,8 +181,16 @@ export abstract class ArcgisPortalItemCard extends LitElement {
|
|
|
173
181
|
* @default true
|
|
174
182
|
*/
|
|
175
183
|
accessor showThumbnail: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Load thumbnails from production ArcGIS Online when viewing Online content in Enterprise.
|
|
186
|
+
*
|
|
187
|
+
* @default false
|
|
188
|
+
*/
|
|
189
|
+
accessor useProduction: boolean;
|
|
176
190
|
/** Current signed-in portal user. */
|
|
177
191
|
accessor user: PortalUser | undefined;
|
|
192
|
+
/** List of all the user's groups */
|
|
193
|
+
accessor userGroups: Pick<PortalGroupSourceJSON, "id">[] | undefined;
|
|
178
194
|
/** The z-index of the owner popup. */
|
|
179
195
|
accessor userPopupZIndex: number | undefined;
|
|
180
196
|
/**
|
|
@@ -190,22 +206,22 @@ export abstract class ArcgisPortalItemCard extends LitElement {
|
|
|
190
206
|
readonly arcgisItemCardActionsOpen: import("@arcgis/lumina").TargetedEvent<this, PortalItemCardActionsOpenDetail>;
|
|
191
207
|
/** Fires on internal component interaction for telemetry. */
|
|
192
208
|
readonly arcgisItemCardInternalUIAction: import("@arcgis/lumina").TargetedEvent<this, InternalUIAction>;
|
|
193
|
-
/**
|
|
194
|
-
readonly arcgisItemCardSelect: import("@arcgis/lumina").TargetedEvent<this,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}>;
|
|
209
|
+
/** Requests an item, sublayer, or task selection change. In sublayer modes, the parent updates selectedItems. */
|
|
210
|
+
readonly arcgisItemCardSelect: import("@arcgis/lumina").TargetedEvent<this, PortalItemCardSublayerSelectDetail>;
|
|
211
|
+
/** Reports a service failure from the built-in sublayer selector. */
|
|
212
|
+
readonly arcgisItemCardSelectError: import("@arcgis/lumina").TargetedEvent<this, PortalItemCardSelectErrorDetail>;
|
|
198
213
|
readonly "@eventTypes": {
|
|
199
214
|
arcgisItemBrowserCardPreview: ArcgisPortalItemCard["arcgisItemBrowserCardPreview"]["detail"];
|
|
200
215
|
arcgisItemCardActionsOpen: ArcgisPortalItemCard["arcgisItemCardActionsOpen"]["detail"];
|
|
201
216
|
arcgisItemCardInternalUIAction: ArcgisPortalItemCard["arcgisItemCardInternalUIAction"]["detail"];
|
|
202
217
|
arcgisItemCardSelect: ArcgisPortalItemCard["arcgisItemCardSelect"]["detail"];
|
|
218
|
+
arcgisItemCardSelectError: ArcgisPortalItemCard["arcgisItemCardSelectError"]["detail"];
|
|
203
219
|
};
|
|
204
220
|
}
|
|
205
221
|
|
|
206
222
|
export type ItemCardView = "grid" | "list";
|
|
207
223
|
|
|
208
|
-
export type ItemCardSelection = "multiple" | "none" | "single";
|
|
224
|
+
export type ItemCardSelection = "multiple-sublayer" | "multiple" | "none" | "single-sublayer" | "single";
|
|
209
225
|
|
|
210
226
|
export type ItemCardPreview = "action" | "top";
|
|
211
227
|
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as B, html as
|
|
4
|
-
import { formatDate as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { createRef as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
2
|
+
import { c as P } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as B, html as r } from "lit";
|
|
4
|
+
import { formatDate as k, substitute as v } from "@arcgis/core/intl.js";
|
|
5
|
+
import { LitElement as F, createEvent as h, safeClassMap as d, nothing as g } from "@arcgis/lumina";
|
|
6
|
+
import { createRef as I, ref as S } from "lit/directives/ref.js";
|
|
7
|
+
import { u as U } from "../../chunks/useT9n.js";
|
|
8
|
+
import { b as C } from "../../chunks/ui.js";
|
|
9
|
+
import { a as E } from "../../chunks/functionalities.js";
|
|
9
10
|
import { g as D } from "../../chunks/items.js";
|
|
10
|
-
import {
|
|
11
|
-
const
|
|
12
|
-
class
|
|
11
|
+
import { b as z } from "../../chunks/url.js";
|
|
12
|
+
const O = B`:host{display:block;min-width:0;container-type:inline-size;container-name:portal-item-card}.item-card{position:relative;display:flex;min-height:100%;flex-direction:column;color:var(--calcite-color-text-1);opacity:0;box-shadow:none;transition-duration:.15s;outline-color:transparent;background-color:var(--calcite-color-foreground-1);transition-property:background-color,outline,outline-offset,opacity;border:1px solid var(--calcite-color-border-3);&:focus{z-index:10;outline:2px solid var(--calcite-color-brand);outline-offset:-2px}}.item-card--loaded{opacity:1}.item-card--selected{border-color:var(--calcite-color-brand)}.item-card--previewed{outline:1px solid var(--calcite-color-brand);outline-offset:-2px}.item-card--hoverable{cursor:pointer}.item-card--disabled{opacity:.5;pointer-events:none}.item-card__upper{flex:1 1 0%;background-color:var(--calcite-color-foreground-1);transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s}.item-card__upper:hover{background-color:var(--calcite-color-background)}.item-card__upper--link{color:var(--calcite-color-text-1);text-decoration-line:none;outline-color:transparent;&:focus{z-index:10;outline:2px solid var(--calcite-color-brand);outline-offset:2px}}.item-card__upper:hover .item-card__hover-text,.item-card:focus .item-card__hover-text{opacity:1}.item-card__top{padding:.75rem}.item-card__content{display:flex;min-width:0;flex:1 1 0%;flex-direction:column}.item-card__content-end{min-width:0;margin-block-start:.25rem}.item-card__title{margin:0;overflow-wrap:break-word;padding:0;font-size:.875rem;font-weight:500;line-height:1.375}.item-card__title--grid{font-size:.875rem}.item-card__title--padded{margin-bottom:.25rem}.item-card__title__span{position:relative;display:inline;border-style:none;background-color:transparent;padding:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;background-image:linear-gradient(transparent,transparent);background-position-x:0%,100%;background-position-y:min(1.25em,100%);background-repeat:no-repeat,no-repeat;background-size:100% 1px,100% 1px}.item-card--previewed .item-card__title__span,.item-card__upper--link:hover .item-card__title__span{background-image:linear-gradient(var(--calcite-color-text-3),var(--calcite-color-text-3))}.item-card__summary{margin:0;flex:1 1 0%;color:var(--calcite-color-text-2);display:none;overflow-wrap:break-word;padding:0;font-size:.875rem;line-height:1.25}.item-card__detail--updated-full.item-card__divider{display:none}.item-card__details{margin-block-start:.25rem;display:flex;flex-direction:row}.item-card__detail{font-size:.75rem;line-height:1.35;color:var(--calcite-color-text-2)}.item-card__divider{display:flex;align-items:center;flex:0 0 auto}.item-card__divider:not([empty]):before{content:"";height:1.25rem;width:1px;background-color:var(--calcite-color-border-1);margin-inline:.75rem}.item-card__divider:first-child:before{display:none}.item-card__thumbnail{margin:0;width:5rem;height:3.5rem;margin-inline-start:.5rem;flex:0 0 auto;overflow:hidden;border-radius:.125rem}.item-card__thumbnail--grid{position:relative;width:100%;height:auto;aspect-ratio:16 / 9;margin:0;margin-inline-start:0;border-radius:0;border-bottom:1px solid var(--calcite-color-foreground-2)}.item-card__thumbnail-image{width:100%;height:100%;object-fit:cover;display:block}.item-card__thumbnail-media{display:block;width:100%;height:100%}.item-card__thumbnail-fallback{width:100%;height:100%;background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-3);display:flex;align-items:center;justify-content:center}.item-card__hover-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;color:var(--calcite-color-foreground-1);background-color:var(--calcite-color-transparent-scrim);font-size:.75rem;font-weight:500;text-align:center;transition:opacity var(--calcite-animation-timing) ease-in-out}.item-card__badges{display:flex;flex-wrap:wrap}.item-card__badges--compact{max-width:100%}.item-card__badges--responsive{display:none}.item-card__footer{margin-top:auto;display:flex;align-items:center;background-color:var(--calcite-color-foreground-1);padding:.25rem .75rem;border-top:1px solid var(--calcite-color-border-3)}.item-card__footer__start{display:flex;min-width:0;flex:1 1 0%;align-items:center;overflow:hidden;width:100%;margin-inline-end:.75rem}.item-card__footer__start--owner{margin-inline-start:-.25rem}.item-card__profile-wrap{max-width:100%;padding:.25rem}.item-card__owner{min-width:0}.item-card__footer-divider{height:1.25rem;width:1px;margin-inline:.75rem;background-color:var(--calcite-color-border-input)}.item-card__preview-button{margin-inline-end:.5rem}.item-card__footer arcgis-portal-item-favorite,.item-card__footer arcgis-portal-item-actions{display:inline-flex;align-items:center}.item-card__access-wrap{display:flex;align-items:center}.item-card-flex{display:flex}.item-card-flex-1{min-width:0;flex:1 1 0%}.item-card__input{margin-inline-end:1rem;margin-top:.125rem}.item-card__title+.item-card__input{margin-inline-start:1rem;margin-inline-end:0}.item-card__input--compact{height:100%;display:flex;align-items:center}.item-card-item-type{min-width:0}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}@container portal-item-card (max-width: 320px){.item-card__title,.item-card__title--grid{font-size:.75rem}.item-card:not(.item-card--grid) .item-card__thumbnail{width:3.4375rem;margin-inline-start:.75rem}.item-card__footer__start{margin-inline-end:.5rem}.item-card__detail--updated-short{display:none}}@container portal-item-card (min-width: 321px) and (max-width: 480px){.item-card__title{font-size:.875rem}}@container portal-item-card (min-width: 481px){.item-card__top{padding:1rem}.item-card__title{font-size:1.125rem}.item-card__title--padded{margin-bottom:.5rem}.item-card__detail{font-size:.875rem}.item-card__footer{padding:.5rem 1rem}.item-card:not(.item-card--grid) .item-card__thumbnail{width:8rem;margin-inline-start:2rem}.item-card__summary{display:block}}@container portal-item-card (min-width: 641px){.item-card__badges--compact{display:none}.item-card__badges--responsive{display:flex}.item-card__summary{display:block}.item-card__footer{flex-wrap:nowrap;gap:0}.item-card__footer__start{width:auto;margin-inline-end:.75rem}.item-card__detail--updated-short{display:none}.item-card__detail--updated-full.item-card__divider{display:flex}.item-card:not(.item-card--grid) .item-card__thumbnail{height:4rem}}`;
|
|
13
|
+
class H extends F {
|
|
13
14
|
constructor() {
|
|
14
|
-
super(
|
|
15
|
+
super(), this.messages = U({ blocking: !0 }), this.sectionEl = I(), this.linkEl = I(), this.handleCardClick = (e) => {
|
|
15
16
|
if (!(this.link || this.disabled || e?.target?.closest(".item-card__footer"))) {
|
|
16
17
|
if (this.preview === "top" && !this.recycleBin) {
|
|
17
18
|
this.arcgisItemBrowserCardPreview.emit(this.item);
|
|
@@ -23,17 +24,32 @@ class O extends U {
|
|
|
23
24
|
}
|
|
24
25
|
this.selection === "multiple" && (this.selected = !this.selected, this.arcgisItemCardSelect.emit({ item: this.item, selected: this.selected }));
|
|
25
26
|
}
|
|
26
|
-
}, this.isLoaded = !1, this.selected = !1, this.selection = "none", this.view = "list", this.previewed = !1, this.showOwner = !0, this.showDateUpdated = !0, this.showItemType = !0, this.showItemTypeHosted = !1, this.showSummary = !1, this.showBadges = !0, this.showBadgeTooltips = !0, this.showFavorite = !1, this.showFavoriteInActionsMenu = !1, this.showAccess = !1, this.showThumbnail = !0, this.newTab = !1, this.disableSelection = !1, this.disabled = !1, this.actions = [], this.recycleBin = !1, this.arcgisItemBrowserCardPreview =
|
|
27
|
+
}, this.isLoaded = !1, this.cardWidth = 0, this.selected = !1, this.selection = "none", this.selectedItems = [], this.allowedGeometries = [], this.view = "list", this.previewed = !1, this.showOwner = !0, this.showDateUpdated = !0, this.showItemType = !0, this.showItemTypeHosted = !1, this.showSummary = !1, this.showBadges = !0, this.showBadgeTooltips = !0, this.showFavorite = !1, this.showFavoriteInActionsMenu = !1, this.showAccess = !1, this.showThumbnail = !0, this.useProduction = !1, this.newTab = !1, this.disableSelection = !1, this.disabled = !1, this.actions = [], this.recycleBin = !1, this.arcgisItemBrowserCardPreview = h(), this.arcgisItemCardActionsOpen = h(), this.arcgisItemCardInternalUIAction = h(), this.arcgisItemCardSelect = h(), this.arcgisItemCardSelectError = h(), this.manager.onLifecycle(() => {
|
|
28
|
+
let e;
|
|
29
|
+
const i = new ResizeObserver(([s]) => {
|
|
30
|
+
e !== void 0 && (cancelAnimationFrame(e), e = void 0);
|
|
31
|
+
const l = s.contentRect.width;
|
|
32
|
+
l > 0 && l !== this.cardWidth && (e = requestAnimationFrame(() => {
|
|
33
|
+
e = void 0, this.cardWidth = l;
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
return i.observe(this.el), () => {
|
|
37
|
+
i.disconnect(), e !== void 0 && cancelAnimationFrame(e);
|
|
38
|
+
};
|
|
39
|
+
});
|
|
27
40
|
}
|
|
28
41
|
static {
|
|
29
|
-
this.properties = { isLoaded: 16, item: 0, user: 0, portal: 0, selected: 7, selection: 1, view: 1, preview: 1, previewed: 5, name: 1, showOwner: 5, showDateUpdated: 5, showItemType: 5, showItemTypeHosted: 5, showSummary: 5, showBadges: 5, showBadgeTooltips: 5, showFavorite: 5, showFavoriteInActionsMenu: 5, showAccess: 5, showThumbnail: 5, link: 1, linkHandler: 0, newTab: 5, disableSelection: 5, disabled: 7, userPopupZIndex: 9, actions: 0, recycleBin: 5, hideActionsStart: 5 };
|
|
42
|
+
this.properties = { isLoaded: 16, cardWidth: 16, item: 0, user: 0, portal: 0, selected: 7, selection: 1, selectedItems: 0, allowedGeometries: 0, view: 1, preview: 1, previewed: 5, name: 1, showOwner: 5, showDateUpdated: 5, showItemType: 5, showItemTypeHosted: 5, showSummary: 5, showBadges: 5, showBadgeTooltips: 5, showFavorite: 5, showFavoriteInActionsMenu: 5, showAccess: 5, groups: 0, userGroups: 0, showThumbnail: 5, useProduction: 5, link: 1, linkHandler: 0, newTab: 5, disableSelection: 5, disabled: 7, userPopupZIndex: 9, actions: 0, recycleBin: 5, hideActionsStart: 5 };
|
|
30
43
|
}
|
|
31
44
|
static {
|
|
32
|
-
this.styles =
|
|
45
|
+
this.styles = O;
|
|
33
46
|
}
|
|
34
47
|
get sourceJSON() {
|
|
35
48
|
return D(this.item);
|
|
36
49
|
}
|
|
50
|
+
get sublayerSelection() {
|
|
51
|
+
return this.selection === "multiple-sublayer" ? "multiple" : this.selection === "single-sublayer" ? "single" : void 0;
|
|
52
|
+
}
|
|
37
53
|
async restoreFocus() {
|
|
38
54
|
if (await this.updateComplete, this.link && this.linkEl.value) {
|
|
39
55
|
this.linkEl.value.focus();
|
|
@@ -46,138 +62,132 @@ class O extends U {
|
|
|
46
62
|
this.isLoaded = !0;
|
|
47
63
|
});
|
|
48
64
|
}
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
public: {
|
|
52
|
-
icon: "globe",
|
|
53
|
-
text: this.messages.everyone
|
|
54
|
-
},
|
|
55
|
-
private: {
|
|
56
|
-
icon: "lock",
|
|
57
|
-
text: this.messages.owner
|
|
58
|
-
},
|
|
59
|
-
org: {
|
|
60
|
-
icon: "organization",
|
|
61
|
-
text: this.messages.organization
|
|
62
|
-
},
|
|
63
|
-
shared: {
|
|
64
|
-
icon: "group",
|
|
65
|
-
text: this.messages.group
|
|
66
|
-
}
|
|
67
|
-
}[e];
|
|
68
|
-
}
|
|
69
|
-
getMessage(e, a = "") {
|
|
65
|
+
getMessage(e, i = "") {
|
|
70
66
|
const s = this.messages[e];
|
|
71
|
-
return typeof s == "string" ? s :
|
|
67
|
+
return typeof s == "string" ? s : i;
|
|
72
68
|
}
|
|
73
69
|
getResolvedBaseUrl() {
|
|
74
|
-
return this.portal ? `${
|
|
70
|
+
return this.portal ? `${z({ portal: this.portal, usePortalHostname: !this.portal.user })}/home` : "";
|
|
71
|
+
}
|
|
72
|
+
handleSharingSlotChange() {
|
|
73
|
+
this.requestUpdate();
|
|
75
74
|
}
|
|
76
75
|
renderUpdatedDetails(e) {
|
|
77
|
-
return
|
|
78
|
-
date:
|
|
76
|
+
return r`<span class="item-card__detail item-card__detail--updated-short item-card__divider">${k(e, { dateStyle: "medium" })}</span><span class="item-card__detail item-card__detail--updated-full item-card__divider">${v(this.messages.lastUpdated ?? "", {
|
|
77
|
+
date: k(e, { dateStyle: "medium" })
|
|
79
78
|
})}</span>`;
|
|
80
79
|
}
|
|
81
|
-
renderSelectionInput(e,
|
|
82
|
-
const { selection: s, disableSelection:
|
|
80
|
+
renderSelectionInput(e, i = !1) {
|
|
81
|
+
const { selection: s, disableSelection: l, name: f, messages: u, item: c } = this, n = {
|
|
83
82
|
"item-card__input": !0,
|
|
84
|
-
"item-card__input--compact":
|
|
83
|
+
"item-card__input--compact": i
|
|
85
84
|
};
|
|
86
85
|
switch (s) {
|
|
87
86
|
case "single":
|
|
88
|
-
return
|
|
89
|
-
|
|
87
|
+
return r`<calcite-radio-button class=${d(n)} .checked=${e} .disabled=${l} .value=${c.title ?? ""} .name=${f} @click=${(a) => {
|
|
88
|
+
a.stopPropagation();
|
|
90
89
|
}} @calciteRadioButtonChange=${() => {
|
|
91
90
|
this.selected = !0, this.arcgisItemCardSelect.emit({ item: c, selected: !0 });
|
|
92
|
-
}}><span class="screen-readers-only">${
|
|
91
|
+
}}><span class="screen-readers-only">${v(u.select ?? "", { title: c.title ?? "" })}</span></calcite-radio-button>`;
|
|
93
92
|
case "multiple":
|
|
94
|
-
return
|
|
95
|
-
|
|
93
|
+
return r`<calcite-checkbox class=${d(n)} .checked=${e} .disabled=${l} @click=${(a) => {
|
|
94
|
+
a.stopPropagation(), a.preventDefault();
|
|
96
95
|
}} @calciteCheckboxChange=${() => {
|
|
97
96
|
this.selected = !e, this.arcgisItemCardSelect.emit({ item: c, selected: !e });
|
|
98
97
|
}}><span class="screen-readers-only">${c.title ?? ""}</span></calcite-checkbox>`;
|
|
99
98
|
case "none":
|
|
99
|
+
case "multiple-sublayer":
|
|
100
|
+
case "single-sublayer":
|
|
100
101
|
return null;
|
|
101
102
|
default:
|
|
102
|
-
return
|
|
103
|
+
return E(s);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
renderThumbnail(e,
|
|
106
|
-
return this.showThumbnail ?
|
|
106
|
+
renderThumbnail(e, i) {
|
|
107
|
+
return this.showThumbnail ? i ? r`<figure class="item-card__thumbnail item-card__thumbnail--grid"><arcgis-portal-item-thumbnail class="item-card__thumbnail-media" .item=${e} .portal=${this.portal} .user=${this.user} .useProduction=${this.useProduction}></arcgis-portal-item-thumbnail>${this.preview === "top" && !this.link && r`<div class="item-card__hover-text">${this.previewed ? this.messages.closePreview : this.messages.preview}</div>` || ""}${this.link?.includes(`item.html?id=${e.id}`) && r`<div class="item-card__hover-text">${this.messages.viewItemDetails}</div>` || ""}</figure>` : r`<figure class="item-card__thumbnail"><arcgis-portal-item-thumbnail class="item-card__thumbnail-media" .item=${e} .portal=${this.portal} .user=${this.user} .useProduction=${this.useProduction}></arcgis-portal-item-thumbnail></figure>` : null;
|
|
107
108
|
}
|
|
108
|
-
renderAccess(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
renderAccess() {
|
|
110
|
+
if (!this.showAccess)
|
|
111
|
+
return null;
|
|
112
|
+
const e = Array.from(this.el.children).some((i) => i.getAttribute("slot") === "share-summary");
|
|
113
|
+
return r`<div class="item-card__access-wrap" @click=${(i) => {
|
|
114
|
+
i.preventDefault(), i.stopPropagation();
|
|
115
|
+
}} @keydown=${(i) => {
|
|
116
|
+
(i.key === "Enter" || i.key === " ") && i.stopPropagation();
|
|
117
|
+
}}><slot name=share-summary @slotchange=${this.handleSharingSlotChange}>${!e && r`<arcgis-portal-item-share-summary .item=${this.item} .portal=${this.portal} .groups=${this.groups} .userGroups=${this.userGroups} .autoFetchGroups=${this.groups === void 0} .scale=${this.cardWidth <= C.xxs ? "s" : "m"} .showText=${this.view !== "grid" && this.cardWidth > C.md} overlay-positioning=fixed></arcgis-portal-item-share-summary>` || ""}</slot></div>`;
|
|
112
118
|
}
|
|
113
119
|
renderBadges() {
|
|
114
|
-
return !this.showBadges || !this.item || !this.portal ? null : this.view === "grid" ?
|
|
120
|
+
return !this.showBadges || !this.item || !this.portal ? null : this.view === "grid" ? r`<arcgis-portal-item-badges class="item-card__badges item-card__divider" .item=${this.item} .portal=${this.portal} .user=${this.user} scale=s appearance=outline-fill .showTooltips=${this.showBadgeTooltips} width=narrow></arcgis-portal-item-badges>` : r`<arcgis-portal-item-badges class="item-card__badges item-card__badges--compact item-card__divider" .item=${this.item} .portal=${this.portal} .user=${this.user} scale=s appearance=outline-fill .showTooltips=${this.showBadgeTooltips} width=narrow></arcgis-portal-item-badges><arcgis-portal-item-badges class="item-card__badges item-card__badges--responsive item-card__divider" .item=${this.item} .portal=${this.portal} .user=${this.user} scale=s appearance=outline-fill .showTooltips=${this.showBadgeTooltips} width=full></arcgis-portal-item-badges>`;
|
|
115
121
|
}
|
|
116
122
|
render() {
|
|
117
|
-
const { item: e, portal:
|
|
118
|
-
if (!e || !
|
|
123
|
+
const { item: e, portal: i, user: s, selection: l, isLoaded: f, disabled: u, link: c, newTab: n } = this;
|
|
124
|
+
if (!e || !i || !this.messages._lang)
|
|
119
125
|
return;
|
|
120
|
-
const
|
|
121
|
-
return
|
|
126
|
+
const a = this.sourceJSON, _ = a.modified || e.modified, o = this.view === "grid", w = this.sublayerSelection, m = w ? this.selectedItems.some((t) => ("item" in t ? t.item.id : t.id) === e.id) : this.selected, b = this.preview === "action" && !this.recycleBin, $ = this.actions.length > 0 || this.showFavoriteInActionsMenu, y = this.showFavorite && !this.showFavoriteInActionsMenu && !this.useProduction && !!s, A = $ || y || b, T = (this.showAccess || o && this.showOwner) && A, p = this.preview === "top" && !c;
|
|
127
|
+
return r`<section class=${d({
|
|
122
128
|
"item-card": !0,
|
|
123
129
|
"item-card--grid": o,
|
|
124
|
-
"item-card--hoverable":
|
|
130
|
+
"item-card--hoverable": l !== "none",
|
|
125
131
|
"item-card--selected": m,
|
|
126
|
-
"item-card--disabled":
|
|
132
|
+
"item-card--disabled": u,
|
|
127
133
|
"item-card--loaded": f,
|
|
128
134
|
"item-card--previewed": this.previewed && p
|
|
129
|
-
})} @click=${c ? void 0 : this.handleCardClick} .tabIndex=${p ? 0 : -1} .role=${p ? "button" : void 0} aria-haspopup=${(p ? "dialog" : void 0) ?? g} @keydown=${(
|
|
130
|
-
p
|
|
131
|
-
}} ${
|
|
132
|
-
if (this.linkHandler && !
|
|
133
|
-
|
|
135
|
+
})} @click=${c ? void 0 : this.handleCardClick} .tabIndex=${p ? 0 : -1} .role=${p ? "button" : void 0} aria-haspopup=${(p ? "dialog" : void 0) ?? g} @keydown=${(t) => {
|
|
136
|
+
!p || t.target !== t.currentTarget || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleCardClick());
|
|
137
|
+
}} ${S(this.sectionEl)}><slot name=content-top></slot>${c ? r`<a class="item-card__upper item-card__upper--link" href=${c ?? g} target=${(n ? "_blank" : void 0) ?? g} rel=${(n ? "noopener noreferrer" : void 0) ?? g} @click=${(t) => {
|
|
138
|
+
if (this.linkHandler && !t.ctrlKey && !t.metaKey) {
|
|
139
|
+
t.preventDefault(), this.linkHandler(this.item);
|
|
134
140
|
return;
|
|
135
141
|
}
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
}} ${
|
|
142
|
+
const x = t.target;
|
|
143
|
+
x instanceof HTMLElement && x.closest(".item-card__footer") && t.preventDefault();
|
|
144
|
+
}} ${S(this.linkEl)}>${r`${o && this.renderThumbnail(e, !0) || ""}<div class="item-card-flex item-card__top">${!o && this.renderSelectionInput(m, !0) || ""}<div class="item-card-flex-1"><div class="item-card-flex"><div class="item-card__content"><div class="item-card-flex"><h3 class=${d({
|
|
139
145
|
"item-card__title": !0,
|
|
140
146
|
"item-card__title--grid": o,
|
|
141
|
-
"item-card__title--padded": this.showItemType || this.showSummary && !!
|
|
147
|
+
"item-card__title--padded": this.showItemType || this.showSummary && !!a.snippet,
|
|
142
148
|
"item-card-flex-1": !0
|
|
143
|
-
})}><span class="item-card__title__span">${
|
|
149
|
+
})}><span class="item-card__title__span">${a.title ?? e.title ?? ""}</span></h3>${o && this.renderSelectionInput(m) || ""}</div>${this.showSummary && !!a.snippet && r`<p class="item-card__summary">${a.snippet.length > 250 ? `${a.snippet.substring(0, 250)}...` : a.snippet}</p>` || ""}<div class="item-card__details">${this.showItemType && r`<arcgis-portal-item-type class="item-card__divider item-card-item-type" ellipsis .user=${s} .showHosted=${this.showItemTypeHosted} scale=s .item=${e} .portal=${i}></arcgis-portal-item-type>` || ""}${this.showDateUpdated && !!_ && this.renderUpdatedDetails(_) || ""}${this.renderBadges()}</div></div>${!o && this.renderThumbnail(e, !1) || ""}</div><div class="item-card__content-end"><slot name=content-end></slot></div></div></div>`}</a>` : r`<div class="item-card__upper">${o && this.renderThumbnail(e, !0) || ""}<div class="item-card-flex item-card__top">${!o && this.renderSelectionInput(m, !0) || ""}<div class="item-card-flex-1"><div class="item-card-flex"><div class="item-card__content"><div class="item-card-flex"><h3 class=${d({
|
|
144
150
|
"item-card__title": !0,
|
|
145
151
|
"item-card__title--grid": o,
|
|
146
|
-
"item-card__title--padded": this.showItemType || this.showSummary && !!
|
|
152
|
+
"item-card__title--padded": this.showItemType || this.showSummary && !!a.snippet,
|
|
147
153
|
"item-card-flex-1": !0
|
|
148
|
-
})}><span class="item-card__title__span">${
|
|
149
|
-
|
|
150
|
-
}}></arcgis-portal-user-popup></div>` || ""}</div>${this.renderAccess(
|
|
154
|
+
})}><span class="item-card__title__span">${a.title ?? e.title ?? ""}</span></h3>${o && this.renderSelectionInput(m) || ""}</div>${this.showSummary && !!a.snippet && r`<p class="item-card__summary">${a.snippet.length > 250 ? `${a.snippet.substring(0, 250)}...` : a.snippet}</p>` || ""}<div class="item-card__details">${this.showItemType && r`<arcgis-portal-item-type class="item-card__divider item-card-item-type" ellipsis .user=${s} .showHosted=${this.showItemTypeHosted} scale=s .item=${e} .portal=${i}></arcgis-portal-item-type>` || ""}${this.showDateUpdated && !!_ && this.renderUpdatedDetails(_) || ""}${this.renderBadges()}</div></div>${!o && this.renderThumbnail(e, !1) || ""}</div><div class="item-card__content-end"><slot name=content-end></slot></div></div></div></div>`}<div class="item-card__footer"><div class=${d({ "item-card__footer__start": !0, "item-card__footer__start--owner": this.showOwner })}>${!this.hideActionsStart && r`<slot name=actions-start></slot>` || ""}${this.showOwner && !!a.owner && r`<div class="item-card__profile-wrap"><arcgis-portal-user-popup class="item-card__owner" .portal=${i} .username=${a.owner} .baseUrl=${this.getResolvedBaseUrl()} underline .zIndex=${this.userPopupZIndex} @arcgisUserPopupInternalUIAction=${(t) => {
|
|
155
|
+
t.stopPropagation(), this.arcgisItemCardInternalUIAction.emit(t.detail);
|
|
156
|
+
}}></arcgis-portal-user-popup></div>` || ""}</div>${this.renderAccess()}${T && r`<span class="item-card__footer-divider"></span>` || ""}${y && r`<slot name=favorite-action><arcgis-portal-item-favorite .item=${e} .portal=${i} .user=${s} icon-only scale=s show-tooltip @arcgisItemFavoriteUpdate=${() => {
|
|
151
157
|
this.arcgisItemCardInternalUIAction.emit({
|
|
152
158
|
category: "card action",
|
|
153
159
|
action: "favorite"
|
|
154
160
|
});
|
|
155
|
-
}}></arcgis-portal-item-favorite></slot>` || ""}${b &&
|
|
156
|
-
|
|
157
|
-
}}>${this.messages.preview}</calcite-button>` || ""}${
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
+
}}></arcgis-portal-item-favorite></slot>` || ""}${b && r`<calcite-button scale=s class="item-card__preview-button" .appearance=${this.previewed ? "solid" : "outline"} kind=neutral @click=${(t) => {
|
|
162
|
+
t.preventDefault(), t.stopPropagation(), this.arcgisItemBrowserCardPreview.emit(this.item);
|
|
163
|
+
}}>${this.messages.preview}</calcite-button>` || ""}${w && r`<arcgis-portal-item-card-sublayer-select .item=${e} .portal=${i} .selection=${w} .selectedItems=${this.selectedItems} .allowedGeometries=${this.allowedGeometries} .disabled=${u || this.disableSelection} @arcgisItemCardSelect=${(t) => {
|
|
164
|
+
t.stopPropagation(), this.arcgisItemCardSelect.emit(t.detail);
|
|
165
|
+
}} @arcgisItemCardSelectError=${(t) => {
|
|
166
|
+
t.stopPropagation(), this.arcgisItemCardSelectError.emit(t.detail);
|
|
167
|
+
}}></arcgis-portal-item-card-sublayer-select>` || ""}${$ && r`<arcgis-portal-item-actions .item=${e} .portal=${i} .user=${s} .actions=${this.actions} .label=${v(this.getMessage("itemActions", "Item actions for {title}"), {
|
|
168
|
+
title: a.title ?? e.title ?? ""
|
|
169
|
+
})} .showFavorite=${this.showFavoriteInActionsMenu && !!s} @arcgisItemActionsOpen=${(t) => {
|
|
170
|
+
t.stopPropagation(), this.arcgisItemCardActionsOpen.emit({
|
|
161
171
|
actions: this.actions,
|
|
162
|
-
el:
|
|
172
|
+
el: t.detail.el
|
|
163
173
|
});
|
|
164
|
-
}} @arcgisItemActionClick=${(
|
|
165
|
-
|
|
174
|
+
}} @arcgisItemActionClick=${(t) => {
|
|
175
|
+
t.stopPropagation(), this.arcgisItemCardInternalUIAction.emit({
|
|
166
176
|
category: "card action",
|
|
167
177
|
action: "more options",
|
|
168
|
-
attribute:
|
|
178
|
+
attribute: t.detail
|
|
169
179
|
});
|
|
170
|
-
}} @arcgisItemFavoriteUpdate=${(
|
|
171
|
-
|
|
180
|
+
}} @arcgisItemFavoriteUpdate=${(t) => {
|
|
181
|
+
t.stopPropagation(), this.arcgisItemCardInternalUIAction.emit({
|
|
172
182
|
category: "card action",
|
|
173
183
|
action: "favorite"
|
|
174
184
|
});
|
|
175
|
-
}}></arcgis-portal-item-actions>` || ""}<div @click=${(
|
|
176
|
-
|
|
185
|
+
}}></arcgis-portal-item-actions>` || ""}<div @click=${(t) => {
|
|
186
|
+
t.stopPropagation();
|
|
177
187
|
}}><slot name=actions-end></slot></div></div></section>`;
|
|
178
188
|
}
|
|
179
189
|
}
|
|
180
|
-
|
|
190
|
+
P("arcgis-portal-item-card", H);
|
|
181
191
|
export {
|
|
182
|
-
|
|
192
|
+
H as ArcgisPortalItemCard
|
|
183
193
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-radio-button";
|
|
2
2
|
import "@esri/calcite-components/components/calcite-checkbox";
|
|
3
3
|
import "../arcgis-portal-item-thumbnail/index.js";
|
|
4
|
-
import "
|
|
4
|
+
import "../arcgis-portal-item-share-summary/index.js";
|
|
5
5
|
import "../arcgis-portal-item-badges/index.js";
|
|
6
6
|
import "../arcgis-portal-item-type/index.js";
|
|
7
7
|
import "../arcgis-portal-user-popup/index.js";
|
|
8
8
|
import "../arcgis-portal-item-favorite/index.js";
|
|
9
9
|
import "@esri/calcite-components/components/calcite-button";
|
|
10
|
+
import "../arcgis-portal-item-card-sublayer-select/index.js";
|
|
10
11
|
import "../arcgis-portal-item-actions/index.js";
|
|
11
12
|
export * from "./customElement.js";
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Portal from "@arcgis/core/portal/Portal.js";
|
|
3
|
+
import type PortalItem from "@arcgis/core/portal/PortalItem.js";
|
|
4
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
5
|
+
import type { SearchResultSublayerGeometry } from "../../types/item.js";
|
|
6
|
+
import type { PortalItemCardSelectedItem, PortalItemCardSelectErrorDetail, PortalItemCardSublayerSelectDetail } from "./types.js";
|
|
7
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
8
|
+
import type { Button as Button } from "@esri/calcite-components/components/calcite-button";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Selects layers, tables, or tasks from a portal item.
|
|
12
|
+
* Selection is controlled by the parent through selectedItems and arcgisItemCardSelect.
|
|
13
|
+
* Parents can coordinate alerts using arcgisItemCardSelectError.
|
|
14
|
+
*/
|
|
15
|
+
export abstract class ArcgisPortalItemCardSublayerSelect extends LitElement {
|
|
16
|
+
/** Allowed geometries. Other geometries are disabled with an explanatory tooltip. An empty array permits all geometries. */
|
|
17
|
+
accessor allowedGeometries: SearchResultSublayerGeometry[];
|
|
18
|
+
/**
|
|
19
|
+
* Appearance of the select layers button (will always be solid if layers are selected)
|
|
20
|
+
*
|
|
21
|
+
* @default "outline"
|
|
22
|
+
*/
|
|
23
|
+
accessor appearance: Button["appearance"];
|
|
24
|
+
/**
|
|
25
|
+
* Disable user selection and service requests.
|
|
26
|
+
*
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
accessor disabled: boolean;
|
|
30
|
+
/** Portal item to select from. Search-index sublayers are read from sourceJSON. */
|
|
31
|
+
accessor item: PortalItem;
|
|
32
|
+
/** Overrides for localized messages. */
|
|
33
|
+
accessor messageOverrides: {
|
|
34
|
+
select?: string | undefined;
|
|
35
|
+
selectLayers?: string | undefined;
|
|
36
|
+
geometryNotAllowed?: string | undefined;
|
|
37
|
+
selectedSingle?: string | undefined;
|
|
38
|
+
selectedLayers?: string | undefined;
|
|
39
|
+
selectedName?: string | undefined;
|
|
40
|
+
selectedTask?: string | undefined;
|
|
41
|
+
errorTitle?: string | undefined;
|
|
42
|
+
errorBody?: string | undefined;
|
|
43
|
+
notebookErrorBody?: string | undefined;
|
|
44
|
+
retry?: string | undefined;
|
|
45
|
+
selectTask?: string | undefined;
|
|
46
|
+
selectTaskFrom?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
protected messages: {
|
|
50
|
+
select: string;
|
|
51
|
+
selectLayers: string;
|
|
52
|
+
geometryNotAllowed: string;
|
|
53
|
+
selectedSingle: string;
|
|
54
|
+
selectedLayers: string;
|
|
55
|
+
selectedName: string;
|
|
56
|
+
selectedTask: string;
|
|
57
|
+
errorTitle: string;
|
|
58
|
+
errorBody: string;
|
|
59
|
+
notebookErrorBody: string;
|
|
60
|
+
retry: string;
|
|
61
|
+
selectTask: string;
|
|
62
|
+
selectTaskFrom: string;
|
|
63
|
+
} & T9nMeta<{
|
|
64
|
+
select: string;
|
|
65
|
+
selectLayers: string;
|
|
66
|
+
geometryNotAllowed: string;
|
|
67
|
+
selectedSingle: string;
|
|
68
|
+
selectedLayers: string;
|
|
69
|
+
selectedName: string;
|
|
70
|
+
selectedTask: string;
|
|
71
|
+
errorTitle: string;
|
|
72
|
+
errorBody: string;
|
|
73
|
+
notebookErrorBody: string;
|
|
74
|
+
retry: string;
|
|
75
|
+
selectTask: string;
|
|
76
|
+
selectTaskFrom: string;
|
|
77
|
+
}>;
|
|
78
|
+
/** Current Portal instance */
|
|
79
|
+
accessor portal: Portal;
|
|
80
|
+
/** Current parent-controlled selection. Replace the array to accept a selection event; ignored events leave the UI unchanged. */
|
|
81
|
+
accessor selectedItems: PortalItemCardSelectedItem[];
|
|
82
|
+
/**
|
|
83
|
+
* Type of selection
|
|
84
|
+
*
|
|
85
|
+
* @default "single"
|
|
86
|
+
*/
|
|
87
|
+
accessor selection: "multiple" | "single";
|
|
88
|
+
/**
|
|
89
|
+
* Width of the selection dropdown trigger
|
|
90
|
+
*
|
|
91
|
+
* @default "auto"
|
|
92
|
+
*/
|
|
93
|
+
accessor width: "auto" | "full";
|
|
94
|
+
/** Requests a selection change; the parent updates selectedItems. */
|
|
95
|
+
readonly arcgisItemCardSelect: import("@arcgis/lumina").TargetedEvent<this, PortalItemCardSublayerSelectDetail>;
|
|
96
|
+
/** Reports service failures. Alert coordination, if desired, belongs to the parent. */
|
|
97
|
+
readonly arcgisItemCardSelectError: import("@arcgis/lumina").TargetedEvent<this, PortalItemCardSelectErrorDetail>;
|
|
98
|
+
readonly "@eventTypes": {
|
|
99
|
+
arcgisItemCardSelect: ArcgisPortalItemCardSublayerSelect["arcgisItemCardSelect"]["detail"];
|
|
100
|
+
arcgisItemCardSelectError: ArcgisPortalItemCardSublayerSelect["arcgisItemCardSelectError"]["detail"];
|
|
101
|
+
};
|
|
102
|
+
}
|