@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
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-button";
|
|
2
2
|
import "@arcgis/ai-components/components/arcgis-assistant";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-icon";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-action";
|
|
5
|
+
import "../arcgis-portal-ai-assistant-interrupt/index.js";
|
|
4
6
|
import "../arcgis-portal-mentionable-text-area/index.js";
|
|
5
7
|
import "../arcgis-portal-voice-input/index.js";
|
|
6
8
|
import "@arcgis/ai-components/components/arcgis-assistant-agent";
|
|
9
|
+
import "@esri/calcite-components/components/calcite-dialog";
|
|
10
|
+
import "@arcgis/ai-components/components/arcgis-assistant-observation-panel";
|
|
7
11
|
export * from "./customElement.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type Portal from "@arcgis/core/portal/Portal.js";
|
|
2
|
+
import type { FunctionTool } from "@arcgis/ai-components/agent-utils/tools/FunctionTool.js";
|
|
3
|
+
import type { getItem } from "../../../services/item.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Creates a read-only Portal assistant tool that retrieves item metadata by ID.
|
|
7
|
+
*
|
|
8
|
+
* @param portal - The Portal used to retrieve item metadata.
|
|
9
|
+
* @returns A tool that returns item metadata or a retrieval error.
|
|
10
|
+
*/
|
|
11
|
+
export function createGetItemTool(portal: Portal): FunctionTool<{ itemId: string; }, Awaited<ReturnType<typeof getItem>>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { FunctionTool, FunctionToolConstructProperties, FunctionToolLike } from "@arcgis/ai-components/agent-utils/tools/FunctionTool.js";
|
|
2
|
+
import type { RunnableConfig } from "@langchain/core/runnables";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Factory that creates tools made available to the Portal assistant.
|
|
6
|
+
*
|
|
7
|
+
* The Portal-provided `tool` and `requestPortalAssistantUiAction` helpers
|
|
8
|
+
* avoid consumer imports for those capabilities.
|
|
9
|
+
*
|
|
10
|
+
* @param context
|
|
11
|
+
*/
|
|
12
|
+
export type PortalAssistantTools = (context: PortalAssistantToolsContext) => readonly FunctionToolLike[];
|
|
13
|
+
|
|
14
|
+
export interface PortalAssistantToolsContext {
|
|
15
|
+
/** Requests a constrained UI action without exposing its callback to the model. */
|
|
16
|
+
requestPortalAssistantUiAction: (action: PortalAssistantUiAction, config?: RunnableConfig) => Promise<boolean>;
|
|
17
|
+
/** Creates a native function tool for use by the Portal assistant. */
|
|
18
|
+
tool: <TInput extends Record<string, unknown>, TOutput = unknown>(properties: FunctionToolConstructProperties<TInput, TOutput>) => FunctionTool<TInput, TOutput>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** UI slot that helps with user actions */
|
|
22
|
+
export type PortalAssistantUiAction = InlineButtonUiAction | InlineLinkUiAction | SelectionUiAction;
|
|
23
|
+
|
|
24
|
+
/** A user-clickable inline button rendered by the assistant. */
|
|
25
|
+
export interface InlineButtonUiAction {
|
|
26
|
+
/** Runs only after the user clicks the rendered button. */
|
|
27
|
+
callback: UiActionCallback;
|
|
28
|
+
/** Optional supporting text shown below the button. */
|
|
29
|
+
description?: string;
|
|
30
|
+
/** Selects the component-owned renderer for this action. */
|
|
31
|
+
kind: "inline-button";
|
|
32
|
+
/** User-visible button text. */
|
|
33
|
+
label: string;
|
|
34
|
+
/** When true, re-enables the button after a successful callback. */
|
|
35
|
+
repeatable?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface InlineLinkUiAction {
|
|
39
|
+
description?: string;
|
|
40
|
+
href: string;
|
|
41
|
+
kind: "inline-link";
|
|
42
|
+
label: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** ! NOT YET SUPPORTED */
|
|
46
|
+
export interface SelectionUiAction {
|
|
47
|
+
kind: "selection";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @param request */
|
|
51
|
+
export type UiActionCallback = (request: { signal: AbortSignal; }) => Promise<void> | void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PortalEntityPickerEntityType } from "../../../types/portalEntityPicker.js";
|
|
2
|
+
|
|
3
|
+
/** Controls entity types available for user clarification. Omitted entity types are enabled. */
|
|
4
|
+
export type PortalAssistantEntityToolPresets = Partial<Record<PortalEntityPickerEntityType, boolean>>;
|
|
5
|
+
|
|
6
|
+
export interface PortalEntitySelectionRequest {
|
|
7
|
+
kind: "portal-entity-selection";
|
|
8
|
+
entityType: PortalEntityPickerEntityType;
|
|
9
|
+
searchTerm?: string;
|
|
10
|
+
portalContext?: {
|
|
11
|
+
portalUrl: string;
|
|
12
|
+
username: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Portal from "@arcgis/core/portal/Portal.js";
|
|
2
3
|
import type { ArcgisAssistant } from "@arcgis/ai-components/components/arcgis-assistant";
|
|
3
4
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
5
|
+
import type { PortalEntitySelectionRequest } from "../arcgis-portal-ai-assistant/types/portalEntityTools.js";
|
|
4
6
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
7
|
|
|
6
8
|
/** @internal */
|
|
@@ -27,8 +29,45 @@ export abstract class ArcgisPortalAiAssistantInterrupt extends LitElement {
|
|
|
27
29
|
multiSelectLabel: string;
|
|
28
30
|
textInputLabel: string;
|
|
29
31
|
}>;
|
|
32
|
+
accessor entityRequest: PortalEntitySelectionRequest | undefined;
|
|
30
33
|
accessor message: NonNullable<InterruptType["message"]>;
|
|
31
34
|
accessor options: InterruptType["options"];
|
|
35
|
+
/** @internal */
|
|
36
|
+
protected pickerMessages: {
|
|
37
|
+
allContent: string;
|
|
38
|
+
allGroups: string;
|
|
39
|
+
clearSelection: string;
|
|
40
|
+
myContent: string;
|
|
41
|
+
myGroups: string;
|
|
42
|
+
myOrganization: string;
|
|
43
|
+
noGroupsFound: string;
|
|
44
|
+
noItemsFound: string;
|
|
45
|
+
noUsersFound: string;
|
|
46
|
+
searchFailed: string;
|
|
47
|
+
searchGroups: string;
|
|
48
|
+
searchItems: string;
|
|
49
|
+
searchIn: string;
|
|
50
|
+
searchUsers: string;
|
|
51
|
+
searching: string;
|
|
52
|
+
} & T9nMeta<{
|
|
53
|
+
allContent: string;
|
|
54
|
+
allGroups: string;
|
|
55
|
+
clearSelection: string;
|
|
56
|
+
myContent: string;
|
|
57
|
+
myGroups: string;
|
|
58
|
+
myOrganization: string;
|
|
59
|
+
noGroupsFound: string;
|
|
60
|
+
noItemsFound: string;
|
|
61
|
+
noUsersFound: string;
|
|
62
|
+
searchFailed: string;
|
|
63
|
+
searchGroups: string;
|
|
64
|
+
searchItems: string;
|
|
65
|
+
searchIn: string;
|
|
66
|
+
searchUsers: string;
|
|
67
|
+
searching: string;
|
|
68
|
+
}>;
|
|
69
|
+
accessor portal: Portal | undefined;
|
|
70
|
+
accessor requestId: string | undefined;
|
|
32
71
|
accessor type: InterruptType["type"];
|
|
33
72
|
readonly arcgisCancel: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
34
73
|
readonly arcgisSubmit: import("@arcgis/lumina").TargetedEvent<this, string[] | boolean | string>;
|
|
@@ -1,51 +1,87 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c } from "../../chunks/runtime.js";
|
|
3
|
-
import {
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { c as p } from "../../chunks/runtime.js";
|
|
3
|
+
import { keyed as u } from "lit/directives/keyed.js";
|
|
4
|
+
import { LitElement as d, createEvent as a, nothing as m } from "@arcgis/lumina";
|
|
5
|
+
import h from "@esri/arcgis-html-sanitizer";
|
|
6
|
+
import { css as g, html as s } from "lit";
|
|
7
|
+
import { createRef as y, ref as f } from "lit/directives/ref.js";
|
|
8
|
+
import { unsafeHTML as c } from "lit/directives/unsafe-html.js";
|
|
9
|
+
import { marked as o } from "marked";
|
|
10
|
+
import { u as l } from "../../chunks/useT9n.js";
|
|
11
|
+
import { a as b } from "../../chunks/functionalities.js";
|
|
12
|
+
import { t as v } from "../../chunks/portalEntitySelection.js";
|
|
13
|
+
const $ = g`:host{container-type:inline-size;display:block;min-inline-size:0}.interrupt-container{display:flex;flex-direction:column;gap:.75rem}.interrupt-actions,.interrupt-buttons{display:flex;justify-content:flex-end;gap:.5rem}.interrupt-message{white-space:normal}.interrupt-message :where(p){margin:0}.interrupt-message :where(ul,ol){margin:0;padding-inline-start:1.25rem}.entity-interrupt{background:var(--calcite-color-foreground-1);border-block-start:2px solid var(--calcite-color-brand);gap:0}.entity-heading{align-items:center;display:flex;gap:.75rem;padding:1rem 1rem .75rem}.entity-heading-icon{color:var(--calcite-color-brand);flex:none}.entity-heading-content{display:grid;gap:.25rem;min-inline-size:0}.entity-eyebrow{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm);line-height:1.25}.entity-question{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-md);font-weight:500;line-height:1.4;overflow-wrap:anywhere}.interrupt-picker{--arcgis-portal-entity-picker-results-max-block-size: min(22rem, 40vh);--arcgis-portal-entity-picker-selection-display: none;box-sizing:border-box;padding:0 1rem .75rem}.entity-interrupt .interrupt-actions{align-items:center;border-block-start:1px solid var(--calcite-color-border-3);display:grid;gap:.75rem;grid-template-columns:minmax(0,1fr) auto;min-block-size:2.25rem;padding:.625rem 1rem}.entity-selection{align-items:center;color:var(--calcite-color-text-2);display:flex;font-size:var(--calcite-font-size-relative-base);gap:.5rem;min-inline-size:0}.entity-selection calcite-icon{color:var(--calcite-color-status-success);flex:none}.entity-selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container (max-width: 24rem){.entity-heading{padding:.875rem .75rem .625rem}.interrupt-picker{padding:0 .75rem .625rem}.entity-interrupt .interrupt-actions{gap:.5rem;grid-template-columns:minmax(0,1fr);padding:.625rem .75rem}.entity-selection:empty{display:none}}`;
|
|
14
|
+
o.use({ gfm: !0, breaks: !0, async: !1 });
|
|
15
|
+
const k = new h();
|
|
16
|
+
class x extends d {
|
|
14
17
|
constructor() {
|
|
15
|
-
super(...arguments), this.#
|
|
18
|
+
super(...arguments), this.#e = [], this._messages = l({ blocking: !0 }), this.pickerMessages = l({ blocking: !0, name: "portal-entity-picker" }), this.pickerRef = y(), this.pickerKey = 0, this.selectedEntity = null, this.selectionSubmitted = !1, this.arcgisCancel = a(), this.arcgisSubmit = a();
|
|
16
19
|
}
|
|
17
20
|
static {
|
|
18
|
-
this.properties = { type: 1, message: 1, options: 0 };
|
|
21
|
+
this.properties = { selectedEntity: 16, selectionSubmitted: 16, type: 1, message: 1, options: 0, portal: 0, entityRequest: 0, requestId: 1 };
|
|
19
22
|
}
|
|
20
23
|
static {
|
|
21
|
-
this.styles =
|
|
24
|
+
this.styles = $;
|
|
25
|
+
}
|
|
26
|
+
#e;
|
|
27
|
+
get selectedReference() {
|
|
28
|
+
return this.selectedEntity && this.selectedEntity.entityType === this.entityRequest?.entityType ? v(this.selectedEntity) : void 0;
|
|
29
|
+
}
|
|
30
|
+
willUpdate(e) {
|
|
31
|
+
(e.has("entityRequest") || e.has("requestId") || e.has("portal")) && (this.pickerKey += 1, this.selectedEntity = null, this.selectionSubmitted = !1, this.#e = []);
|
|
32
|
+
}
|
|
33
|
+
updated(e) {
|
|
34
|
+
this.isConnected && this.entityRequest && (e.has("entityRequest") || e.has("requestId") || e.has("portal")) && this.pickerRef.value?.setFocus();
|
|
35
|
+
}
|
|
36
|
+
submit() {
|
|
37
|
+
if (this.entityRequest) {
|
|
38
|
+
const e = this.selectedReference;
|
|
39
|
+
if (!e || this.selectionSubmitted)
|
|
40
|
+
return;
|
|
41
|
+
this.selectionSubmitted = !0, this.arcgisSubmit.emit(JSON.stringify(e));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.arcgisSubmit.emit(this.type === "boolean-choice" ? !0 : this.#e);
|
|
22
45
|
}
|
|
23
|
-
#t;
|
|
24
46
|
_renderMessageContent() {
|
|
25
|
-
const
|
|
26
|
-
return
|
|
47
|
+
const e = this.message ?? "", i = o.parse(e, { async: !1 });
|
|
48
|
+
return k.sanitize(i);
|
|
27
49
|
}
|
|
28
50
|
_renderInterruptInput() {
|
|
29
|
-
const { _messages:
|
|
51
|
+
const { _messages: e, type: i, options: n } = this;
|
|
30
52
|
switch (i) {
|
|
31
53
|
case "single-select":
|
|
32
|
-
return
|
|
54
|
+
return s`<calcite-list class="interrupt-list" .label=${e.singleSelectLabel} selection-mode=single-persist @calciteListChange=${(t) => this.#e = t.target.selectedItems[0]?.value}>${n?.map((t) => s`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;
|
|
33
55
|
case "multi-select":
|
|
34
|
-
return
|
|
56
|
+
return s`<calcite-list class="interrupt-list" .label=${e.multiSelectLabel} selection-mode=multiple @calciteListChange=${(t) => this.#e = t.target.selectedItems.map((r) => r.value)}>${n?.map((t) => s`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;
|
|
35
57
|
case "text-input":
|
|
36
|
-
return
|
|
58
|
+
return s`<calcite-input class="interrupt-input" .label=${e.textInputLabel} @calciteInputInput=${(t) => this.#e = t.target.value}></calcite-input>`;
|
|
37
59
|
case "boolean-choice":
|
|
38
60
|
return null;
|
|
39
61
|
default:
|
|
40
|
-
return
|
|
62
|
+
return b(i);
|
|
41
63
|
}
|
|
42
64
|
}
|
|
65
|
+
_renderInterruptButtons(e = !1) {
|
|
66
|
+
const { _messages: i, type: n, selectedReference: t } = this, r = n === "boolean-choice";
|
|
67
|
+
return s`<div class="interrupt-buttons"><calcite-button .appearance=${e ? "transparent" : "outline"} .kind=${e ? "neutral" : void 0} @click=${() => this.arcgisCancel.emit()}>${r ? i.cancelButton : i.skipButton}</calcite-button><calcite-button appearance=solid .iconEnd=${e ? "arrow-right" : void 0} .disabled=${e && (!t || this.selectionSubmitted)} @click=${this.submit}>${r ? i.confirmButton : i.submitButton}</calcite-button></div>`;
|
|
68
|
+
}
|
|
69
|
+
_renderEntityInterrupt(e) {
|
|
70
|
+
const { _messages: i, selectedReference: n } = this;
|
|
71
|
+
return s`<div class="interrupt-container entity-interrupt"><div class="entity-heading"><calcite-icon class="entity-heading-icon" .icon=${e === "user" ? "user" : e === "group" ? "group" : "file"} scale=m></calcite-icon><div class="entity-heading-content"><span class="entity-eyebrow">${i.titleInput}</span><div class="interrupt-message entity-question">${c(this._renderMessageContent())}</div></div></div>${this.portal ? u(this.pickerKey, s`<arcgis-portal-entity-picker class="interrupt-picker" .portal=${this.portal} .entityType=${e} .initialSearchTerm=${this.entityRequest?.searchTerm ?? ""} mode=inline icon=search .selected=${this.selectedEntity} @arcgisSelectionChange=${({ detail: t }) => {
|
|
72
|
+
!this.selectionSubmitted && (!t || t.entityType === this.entityRequest?.entityType) && (this.selectedEntity = t);
|
|
73
|
+
}} ${f(this.pickerRef)}></arcgis-portal-entity-picker>`) : this._renderInterruptInput()}<div class="interrupt-actions"><div class="entity-selection" role=status>${n && s`<calcite-icon icon=check-circle scale=s></calcite-icon><span class="entity-selection-label" title=${n.label ?? m}>${n.label}</span><calcite-button appearance=transparent .disabled=${this.selectionSubmitted} icon-start=x kind=neutral .label=${this.pickerMessages.clearSelection} scale=s @click=${() => {
|
|
74
|
+
this.selectedEntity = null, this.pickerRef.value?.setFocus();
|
|
75
|
+
}}></calcite-button>` || ""}</div>${this._renderInterruptButtons(!0)}</div></div>`;
|
|
76
|
+
}
|
|
43
77
|
render() {
|
|
44
|
-
|
|
45
|
-
|
|
78
|
+
if (this.entityRequest)
|
|
79
|
+
return this._renderEntityInterrupt(this.entityRequest.entityType);
|
|
80
|
+
const { _messages: e, type: i } = this;
|
|
81
|
+
return s`<div class="interrupt-container"><calcite-notice open kind=neutral width=full><div slot=title>${i === "boolean-choice" ? e.titleConfirm : e.titleInput}</div><div slot=message class="interrupt-message">${c(this._renderMessageContent())}</div></calcite-notice>${this._renderInterruptInput()}<div class="interrupt-actions">${this._renderInterruptButtons()}</div></div>`;
|
|
46
82
|
}
|
|
47
83
|
}
|
|
48
|
-
|
|
84
|
+
p("arcgis-portal-ai-assistant-interrupt", x);
|
|
49
85
|
export {
|
|
50
|
-
|
|
86
|
+
x as ArcgisPortalAiAssistantInterrupt
|
|
51
87
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-list";
|
|
2
2
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-input";
|
|
4
|
-
import "@esri/calcite-components/components/calcite-notice";
|
|
5
4
|
import "@esri/calcite-components/components/calcite-button";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-icon";
|
|
6
|
+
import "../arcgis-portal-entity-picker/index.js";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-notice";
|
|
6
8
|
export * from "./customElement.js";
|
|
@@ -5,7 +5,7 @@ import { u as n, c as f } from "../../chunks/loadClassificationData.js";
|
|
|
5
5
|
import { u as d } from "../../chunks/useT9n.js";
|
|
6
6
|
import { css as h, html as s } from "lit";
|
|
7
7
|
import { rethrowError as o } from "@arcgis/toolkit/log";
|
|
8
|
-
const m = h`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-
|
|
8
|
+
const m = h`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-space-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-space-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`;
|
|
9
9
|
class p extends l {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments), this.classificationModel = n(this), this.messages = d(), this._classificationDataTask = f(this), this.portalClassificationSchema = this.classificationModel.portalClassificationSchema, this.status = this.classificationModel.status, this.missingExistingClassification = !1, this.variant = "full", this.autoDestroyDisabled = !1, this.validationErrors = "";
|
|
@@ -36,7 +36,7 @@ class p extends l {
|
|
|
36
36
|
}
|
|
37
37
|
getStyle() {
|
|
38
38
|
const a = {};
|
|
39
|
-
if (this.variant === "preview" && (a.fontSize = "var(--calcite-font-size-sm)", a.padding = "var(--calcite-
|
|
39
|
+
if (this.variant === "preview" && (a.fontSize = "var(--calcite-font-size-sm)", a.padding = "var(--calcite-space-xs)"), this.itemClassification && this.portalClassificationSchema) {
|
|
40
40
|
const i = this.itemClassification.classification, t = this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({ value: e }) => e === i);
|
|
41
41
|
t?.backgroundColor && (a.backgroundColor = t.backgroundColor), t?.textColor && (a.color = t.textColor);
|
|
42
42
|
}
|
|
@@ -11,7 +11,7 @@ import { createArcadeExecutor as $ } from "@arcgis/core/arcade.js";
|
|
|
11
11
|
import { u as V } from "../../chunks/useT9n.js";
|
|
12
12
|
import { d as m, a as d, g as O, r as p, c as _, b as A } from "../../chunks/common.js";
|
|
13
13
|
import { watch as D } from "@arcgis/core/core/reactiveUtils.js";
|
|
14
|
-
import {
|
|
14
|
+
import { r as F } from "../../chunks/requests.js";
|
|
15
15
|
async function T({
|
|
16
16
|
portalClassificationSchema: r,
|
|
17
17
|
itemClassification: t
|
|
@@ -144,7 +144,7 @@ async function L(r) {
|
|
|
144
144
|
]
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
const B = I`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-
|
|
147
|
+
const B = I`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-space-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-space-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-space-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-space-sm)}.form-section__main-content{flex:3;padding:var(--calcite-space-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-space-md) 0}`;
|
|
148
148
|
class J extends v {
|
|
149
149
|
constructor() {
|
|
150
150
|
super(), this.classificationModel = P(this), this.messages = V(), this.formMainContentRef = f(), this.bannerRef = f(), this._classificationDataTask = S(this), this._formCreationTask = new y(this, {
|
|
@@ -4,9 +4,9 @@ import { css as r, html as e } from "lit";
|
|
|
4
4
|
import { repeat as o } from "lit/directives/repeat.js";
|
|
5
5
|
import { LitElement as n } from "@arcgis/lumina";
|
|
6
6
|
import { u as f } from "../../chunks/useT9n.js";
|
|
7
|
-
import { u as d,
|
|
7
|
+
import { u as d, r as v } from "../../chunks/requests.js";
|
|
8
8
|
import { g as h } from "../../chunks/common.js";
|
|
9
|
-
const m = r`.select-favorite-label{display:flex;justify-content:space-between;align-items:center}.favorite-actions{display:flex;justify-content:flex-end;gap:1.5rem;align-items:center}.classification-favorite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color:
|
|
9
|
+
const m = r`.select-favorite-label{display:flex;justify-content:space-between;align-items:center}.favorite-actions{display:flex;justify-content:flex-end;gap:1.5rem;align-items:center}.classification-favorite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: var(--calcite-color-surface-3)}.save-new-favorite-button{display:flex;justify-content:flex-end;margin-top:.25rem;margin-bottom:1rem}.classification-favorite-item{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem;border-bottom:1px solid var(--calcite-color-border-1)}.classification-favorite-list,.classification-favorite-input-section{margin:1.75rem 1rem}`;
|
|
10
10
|
class C extends n {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), this.messages = f(), this.selectFavoriteClassification = (i) => {
|
|
@@ -4,7 +4,7 @@ import { repeat as u } from "lit/directives/repeat.js";
|
|
|
4
4
|
import { LitElement as c, createEvent as b, nothing as a } from "@arcgis/lumina";
|
|
5
5
|
import { css as d, html as i } from "lit";
|
|
6
6
|
import { u as h } from "../../chunks/useT9n.js";
|
|
7
|
-
const m = d`.spacing-y{margin:var(--calcite-
|
|
7
|
+
const m = d`.spacing-y{margin:var(--calcite-space-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;
|
|
8
8
|
function l(n, e) {
|
|
9
9
|
return n.uiElement === e;
|
|
10
10
|
}
|
|
@@ -4,6 +4,7 @@ import type Portal from "@arcgis/core/portal/Portal.js";
|
|
|
4
4
|
import type PortalUser from "@arcgis/core/portal/PortalUser.js";
|
|
5
5
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
6
|
import type { DeleteItemResponse } from "./services.js";
|
|
7
|
+
import type { APIResponse } from "../../utils/types.js";
|
|
7
8
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -26,7 +27,71 @@ export abstract class ArcgisPortalDeleteItems extends LitElement {
|
|
|
26
27
|
* @default false
|
|
27
28
|
*/
|
|
28
29
|
accessor disableLinks: boolean;
|
|
29
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* For `Learn more`. TODO: Move the string to common post-2026R03
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
protected fieldDeleteMessages: Partial<{
|
|
36
|
+
cancel: string;
|
|
37
|
+
error: string;
|
|
38
|
+
errorOccurred: string;
|
|
39
|
+
fields: string;
|
|
40
|
+
deletePrompt: string;
|
|
41
|
+
deleteMultiplePrompt: string;
|
|
42
|
+
deleteField: string;
|
|
43
|
+
deleteFields: string;
|
|
44
|
+
deleteFieldsWithNumber: string;
|
|
45
|
+
deletingField: string;
|
|
46
|
+
deletingFields: string;
|
|
47
|
+
newFeature: string;
|
|
48
|
+
fieldDeleted: string;
|
|
49
|
+
fieldsDeleted: string;
|
|
50
|
+
fieldDeletionUnsuccessful: string;
|
|
51
|
+
fieldInUse: string;
|
|
52
|
+
expressions: string;
|
|
53
|
+
popups: string;
|
|
54
|
+
forms: string;
|
|
55
|
+
charts: string;
|
|
56
|
+
deleteWarning: string;
|
|
57
|
+
deleteMultipleWarning: string;
|
|
58
|
+
learnMore: string;
|
|
59
|
+
savingFailed: string;
|
|
60
|
+
readOnlyErrorMessage: string;
|
|
61
|
+
readOnlyErrorMessageEnterprise: string;
|
|
62
|
+
healthDashboard: string;
|
|
63
|
+
}> & T9nMeta<{
|
|
64
|
+
cancel: string;
|
|
65
|
+
error: string;
|
|
66
|
+
errorOccurred: string;
|
|
67
|
+
fields: string;
|
|
68
|
+
deletePrompt: string;
|
|
69
|
+
deleteMultiplePrompt: string;
|
|
70
|
+
deleteField: string;
|
|
71
|
+
deleteFields: string;
|
|
72
|
+
deleteFieldsWithNumber: string;
|
|
73
|
+
deletingField: string;
|
|
74
|
+
deletingFields: string;
|
|
75
|
+
newFeature: string;
|
|
76
|
+
fieldDeleted: string;
|
|
77
|
+
fieldsDeleted: string;
|
|
78
|
+
fieldDeletionUnsuccessful: string;
|
|
79
|
+
fieldInUse: string;
|
|
80
|
+
expressions: string;
|
|
81
|
+
popups: string;
|
|
82
|
+
forms: string;
|
|
83
|
+
charts: string;
|
|
84
|
+
deleteWarning: string;
|
|
85
|
+
deleteMultipleWarning: string;
|
|
86
|
+
learnMore: string;
|
|
87
|
+
savingFailed: string;
|
|
88
|
+
readOnlyErrorMessage: string;
|
|
89
|
+
readOnlyErrorMessageEnterprise: string;
|
|
90
|
+
healthDashboard: string;
|
|
91
|
+
}>;
|
|
92
|
+
/** The IDs of the items to load when no `items` are provided. */
|
|
93
|
+
accessor itemIds: string[];
|
|
94
|
+
/** The portal items to delete. Takes precedence over `itemIds` when included. */
|
|
30
95
|
accessor items: PortalItem[];
|
|
31
96
|
/** @internal */
|
|
32
97
|
protected messages: {
|
|
@@ -189,13 +254,13 @@ export abstract class ArcgisPortalDeleteItems extends LitElement {
|
|
|
189
254
|
/** The user performing deletion. */
|
|
190
255
|
accessor user: PortalUser | null | undefined;
|
|
191
256
|
/** Emitted when the user cancels the deletion. */
|
|
192
|
-
readonly
|
|
257
|
+
readonly arcgisClose: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
193
258
|
/** Emitted when the user confirms the deletion. */
|
|
194
259
|
readonly arcgisConfirm: import("@arcgis/lumina").TargetedEvent<this, DeleteItemsPayload>;
|
|
195
260
|
/** Emitted when an error occurs during deletion. */
|
|
196
261
|
readonly arcgisError: import("@arcgis/lumina").TargetedEvent<this, DeleteItemsPayload>;
|
|
197
262
|
readonly "@eventTypes": {
|
|
198
|
-
|
|
263
|
+
arcgisClose: ArcgisPortalDeleteItems["arcgisClose"]["detail"];
|
|
199
264
|
arcgisConfirm: ArcgisPortalDeleteItems["arcgisConfirm"]["detail"];
|
|
200
265
|
arcgisError: ArcgisPortalDeleteItems["arcgisError"]["detail"];
|
|
201
266
|
};
|
|
@@ -205,6 +270,7 @@ export abstract class ArcgisPortalDeleteItems extends LitElement {
|
|
|
205
270
|
export interface DeleteItemsPayload {
|
|
206
271
|
deletedItems: DeleteItemResponse[] | null;
|
|
207
272
|
permanentlyDeletedItems: DeleteItemResponse[] | null;
|
|
273
|
+
deprecatedItems: APIResponse[] | null;
|
|
208
274
|
/**
|
|
209
275
|
* Optional overrides for the number of items deleted.
|
|
210
276
|
* Needed if composite items are included for delete, because they are not part of the `/deleteItems` response
|