@esri/solutions-components 1.0.0-next.20250528 → 1.0.0-next.20250528.2
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/{FZRUF6CO.js → 27LQAQ6Y.js} +2 -2
- package/dist/cdn/{BBZU6JPM.js → 2BECX5WX.js} +2 -2
- package/dist/cdn/{GP7NQO7J.js → 2HAFNSIE.js} +2 -2
- package/dist/cdn/{DNCEXQFU.js → 2IDGPQJR.js} +2 -2
- package/dist/cdn/{5YIEEOQO.js → 2MMQZII3.js} +2 -2
- package/dist/cdn/{HBJLJEV6.js → 2OOMOXGH.js} +2 -2
- package/dist/cdn/{F7J5AVP6.js → 2TF5G4JI.js} +1 -1
- package/dist/cdn/{K2P2DNKH.js → 2XZSJ6JD.js} +2 -2
- package/dist/cdn/{GUYZ6TVU.js → 35BOYRXZ.js} +2 -2
- package/dist/cdn/{X6UMCCK5.js → 3LMFSQQR.js} +2 -2
- package/dist/cdn/{WLHFDDBG.js → 3PIEW24G.js} +2 -2
- package/dist/cdn/{6PVCA5ZX.js → 3S4FG2ZZ.js} +2 -2
- package/dist/cdn/{XQFJPY6R.js → 3SGIDV3I.js} +2 -2
- package/dist/cdn/{YP6O3AK4.js → 3WC22OVN.js} +2 -2
- package/dist/cdn/{HITN2DRN.js → 3XJKMZHA.js} +1 -1
- package/dist/cdn/{LEY2V5RH.js → 455HDVF4.js} +2 -2
- package/dist/cdn/{WHWBIGAH.js → 4KGZBVTB.js} +2 -2
- package/dist/cdn/{YHDZXWFB.js → 4ME5QMIF.js} +2 -2
- package/dist/cdn/{2ACVTFWH.js → 4QWQA7SP.js} +2 -2
- package/dist/cdn/{O3N5NP7L.js → 4S2I2R2Q.js} +1 -1
- package/dist/cdn/{JHVRHMPX.js → 54NDBS5W.js} +2 -2
- package/dist/cdn/{2QJG47YD.js → 5APFWJZZ.js} +2 -2
- package/dist/cdn/{AAQIWO65.js → 5BKTEPSJ.js} +2 -2
- package/dist/cdn/{4433JH2R.js → 5IZBEDEU.js} +1 -1
- package/dist/cdn/{6N2DIXJF.js → 5NIDGVLZ.js} +2 -2
- package/dist/cdn/{DX5OVPFT.js → 5P6SZW5B.js} +2 -2
- package/dist/cdn/{UBZ6KMGN.js → 5PENO4BC.js} +2 -2
- package/dist/cdn/{ZSU4BSTS.js → 5USKOL72.js} +3 -3
- package/dist/cdn/{3L6DEVIK.js → 5ZAVVIAH.js} +2 -2
- package/dist/cdn/{VTPBT7MQ.js → 64XCUKMX.js} +2 -2
- package/dist/cdn/{E645QUGL.js → 66IB2PZE.js} +2 -2
- package/dist/cdn/{37VSZ3UG.js → 6APCAUUT.js} +2 -2
- package/dist/cdn/{52W5VWDL.js → 6CPKRUI3.js} +1 -1
- package/dist/cdn/{B2FYFHU7.js → 6GVJGNRK.js} +2 -2
- package/dist/cdn/{25ZWUXFO.js → 6PWODZF3.js} +2 -2
- package/dist/cdn/{PYJIK3CR.js → 6QWS7JEN.js} +2 -2
- package/dist/cdn/{MSJQ4JDQ.js → 6RHP2Y7C.js} +1 -1
- package/dist/cdn/{YP6FSEFL.js → 6WQKENE2.js} +4 -4
- package/dist/cdn/{HQHIIMPM.js → 6WXHOI6Z.js} +2 -2
- package/dist/cdn/{X5DGQ5OF.js → 6XYU4BZS.js} +2 -2
- package/dist/cdn/{IJIQR7LK.js → 72HLVTY7.js} +2 -2
- package/dist/cdn/{BLY5B6IS.js → 73NJ4RPV.js} +1 -1
- package/dist/cdn/{V6KN5QPT.js → 7GY7BTPK.js} +2 -2
- package/dist/cdn/{MI5ZANBW.js → 7OZTZCPH.js} +2 -2
- package/dist/cdn/{QUJHDDZX.js → A2WX4D7A.js} +1 -1
- package/dist/cdn/{ZSYHLMKN.js → A3JKO4I4.js} +1 -1
- package/dist/cdn/{6N7OJ52Y.js → A4JM6VWA.js} +2 -2
- package/dist/cdn/{XI7PRITM.js → ABYMP2JA.js} +2 -2
- package/dist/cdn/{5VQIZRBI.js → AF3RJAL5.js} +1 -1
- package/dist/cdn/{CO5U6E2B.js → AGRD4ULC.js} +2 -2
- package/dist/cdn/{75AICF3J.js → AH5AIEIN.js} +1 -1
- package/dist/cdn/{AMJZ2LFK.js → AHEWCN4W.js} +2 -2
- package/dist/cdn/{4EDDSKZS.js → AJUGJQUJ.js} +1 -1
- package/dist/cdn/{MGD53ADT.js → ARQHAHK5.js} +2 -2
- package/dist/cdn/{VC6W4X4W.js → ARYFWYUR.js} +1 -1
- package/dist/cdn/{JFS4GZ6K.js → AT3MTRQS.js} +1 -1
- package/dist/cdn/{6XZWFS7Y.js → B4HONVWZ.js} +1 -1
- package/dist/cdn/{MB7QENIY.js → BACSZ2Z7.js} +1 -1
- package/dist/cdn/{SEPT44JR.js → BANL5YR3.js} +2 -2
- package/dist/cdn/{ABFH5NTH.js → BB7RJW6E.js} +2 -2
- package/dist/cdn/BGVU5VPJ.js +18 -0
- package/dist/cdn/{BLLKRGVR.js → BKQVXWB7.js} +2 -2
- package/dist/cdn/{25RUIQSO.js → BZFFNFXK.js} +2 -2
- package/dist/cdn/{YQNXV3P3.js → C2XKMOX2.js} +2 -2
- package/dist/cdn/{BRT74BII.js → C3A3SGFC.js} +2 -2
- package/dist/cdn/{Y57AHJQ2.js → C7TWT6K2.js} +2 -2
- package/dist/cdn/{4JGCEBGT.js → CLZ42RFU.js} +1 -1
- package/dist/cdn/{UFWRGJDV.js → COLHBQ5X.js} +2 -2
- package/dist/cdn/{SWWLO6K6.js → CPB7DXI3.js} +2 -2
- package/dist/cdn/{ZI7JVVEX.js → CQ6SIDRV.js} +2 -2
- package/dist/cdn/{KRBE6UMS.js → CQMNR2XZ.js} +1 -1
- package/dist/cdn/{DYIHGLWU.js → CR3NXOPF.js} +2 -2
- package/dist/cdn/{PRIGD4HE.js → CRYN5SYR.js} +2 -2
- package/dist/cdn/CSTT6IAN.js +4 -0
- package/dist/cdn/{PEDUZUAO.js → CXW7Q33E.js} +2 -2
- package/dist/cdn/{3GDPB4SN.js → D6KVYJKN.js} +2 -2
- package/dist/cdn/{UKW7WIFN.js → DCP6AHDZ.js} +2 -2
- package/dist/cdn/{ABWFIKPD.js → DJI7J3C3.js} +2 -2
- package/dist/cdn/{BUTQMMJS.js → DMRVOPBM.js} +2 -2
- package/dist/cdn/{J7CYSJA6.js → DT2GGHBN.js} +2 -2
- package/dist/cdn/{JNS7O2LI.js → DUOJYQGU.js} +2 -2
- package/dist/cdn/{BV7DCC4N.js → DWBMQBAB.js} +2 -2
- package/dist/cdn/{FR3L4TW7.js → DZXTVGRQ.js} +2 -2
- package/dist/cdn/{E4RIBJ2G.js → ELBSRAMH.js} +2 -2
- package/dist/cdn/{RE44UO66.js → ETSCX6UD.js} +1 -1
- package/dist/cdn/{NBW6TGCY.js → EU3TXNP2.js} +2 -2
- package/dist/cdn/{SYQODL47.js → EXWX56R4.js} +2 -2
- package/dist/cdn/F7YKY2OF.js +4 -0
- package/dist/cdn/{E6VMU3PC.js → FATTGIYI.js} +2 -2
- package/dist/cdn/{FII3CMHX.js → FCHOLYNH.js} +2 -2
- package/dist/cdn/{DX3SET3L.js → FEWEA7AN.js} +2 -2
- package/dist/cdn/{2SL6Z6TM.js → FF7R4YTO.js} +2 -2
- package/dist/cdn/{CEDHHVFY.js → FNHXNPPV.js} +2 -2
- package/dist/cdn/{UD7F6DCG.js → FPWLAJBO.js} +1 -1
- package/dist/cdn/{BLURTZNI.js → FTCXP7FD.js} +2 -2
- package/dist/cdn/FY5WSCFM.js +4 -0
- package/dist/cdn/{A3VAIZ52.js → GA7L2IWK.js} +2 -2
- package/dist/cdn/{URWOL2IQ.js → GLCP6BKS.js} +2 -2
- package/dist/cdn/{IHDMSZP6.js → GLL5XNBZ.js} +2 -2
- package/dist/cdn/{TOODIZT4.js → GOHA6HJP.js} +2 -2
- package/dist/cdn/{JDVDAXYA.js → GPKFZD7B.js} +2 -2
- package/dist/cdn/{CVIE4PDN.js → GR5ID3PD.js} +1 -1
- package/dist/cdn/{5XJ6SZ36.js → GUP4UK2N.js} +2 -2
- package/dist/cdn/{FCJVHDUH.js → GVI4R5J2.js} +2 -2
- package/dist/cdn/{M7IGOHUD.js → HJJD6V2O.js} +2 -2
- package/dist/cdn/{T74GEZCH.js → HM7CZ2CI.js} +2 -2
- package/dist/cdn/{BVKD52TV.js → HM7JZP3A.js} +1 -1
- package/dist/cdn/{C6W4EBHD.js → HOYA4JWQ.js} +2 -2
- package/dist/cdn/{RURXPJYT.js → HOYVNZRK.js} +2 -2
- package/dist/cdn/{HIHCOY2K.js → HTYN6WXU.js} +2 -2
- package/dist/cdn/{TRAZ3VPR.js → HYTRDNUE.js} +2 -2
- package/dist/cdn/{W3A6FIHZ.js → I4KZ2A5P.js} +2 -2
- package/dist/cdn/{UDLBJXHJ.js → IBDFSTWX.js} +2 -2
- package/dist/cdn/{X2K4VP7N.js → IBEMOISL.js} +2 -2
- package/dist/cdn/{QU6F2S3L.js → IE24UY4O.js} +2 -2
- package/dist/cdn/{UWM44QLQ.js → IIPLB2RS.js} +2 -2
- package/dist/cdn/{3YNQSVNT.js → IIX655ZM.js} +1 -1
- package/dist/cdn/{D5UC5SVZ.js → IJBFY7JW.js} +2 -2
- package/dist/cdn/{2S6OZOKM.js → INDADVJP.js} +2 -2
- package/dist/cdn/{SDPZNJWX.js → INY65VHN.js} +2 -2
- package/dist/cdn/{LUZ6KCKH.js → IP6ATOM6.js} +2 -2
- package/dist/cdn/{UZOCT7SV.js → IPIQ52KV.js} +2 -2
- package/dist/cdn/{BPPOS7VC.js → IUBGSA3I.js} +1 -1
- package/dist/cdn/{I33AEX6O.js → IVXXAKCK.js} +2 -2
- package/dist/cdn/{YFZCGZOB.js → J5LWWUIP.js} +2 -2
- package/dist/cdn/{NK3PNJXB.js → J62YOWFC.js} +2 -2
- package/dist/cdn/{LOIPX2ER.js → JATAGG24.js} +2 -2
- package/dist/cdn/{24WYI66F.js → JBDNXDLS.js} +2 -2
- package/dist/cdn/{MYDDP7BI.js → JBG5SAVM.js} +1 -1
- package/dist/cdn/{5A3GJKYM.js → JBZH2KKN.js} +2 -2
- package/dist/cdn/{AGVDOFMZ.js → JDSGIOVR.js} +2 -2
- package/dist/cdn/{QSEANYSR.js → JFVYQIUH.js} +2 -2
- package/dist/cdn/{OLFBYRLF.js → JHFAVQVG.js} +2 -2
- package/dist/cdn/{KQTZ6C5H.js → JKB6LYON.js} +2 -2
- package/dist/cdn/{T3JY6H4E.js → JSDNVCX7.js} +2 -2
- package/dist/cdn/{H2NSBFWF.js → JY7KFFEJ.js} +2 -2
- package/dist/cdn/{GNLAD5Z6.js → K6SJCTAS.js} +1 -1
- package/dist/cdn/K72NRGFR.js +4 -0
- package/dist/cdn/{QFZ4AJSY.js → KETC3CAC.js} +2 -2
- package/dist/cdn/{5RNOJK2U.js → KFFWCZKY.js} +2 -2
- package/dist/cdn/{GWXVNAEF.js → KOQOMT46.js} +2 -2
- package/dist/cdn/{EI6DJKRP.js → KPKDVL2J.js} +2 -2
- package/dist/cdn/{NGTSVG7L.js → KSMEO6R5.js} +2 -2
- package/dist/cdn/{VFEXPJTW.js → KZWHC2ST.js} +2 -2
- package/dist/cdn/{ST5JB4CK.js → L32HIJPV.js} +2 -2
- package/dist/cdn/{ZKIE5GVW.js → L3IX5SCS.js} +2 -2
- package/dist/cdn/{CH65TEDK.js → LBJE5BZD.js} +1 -1
- package/dist/cdn/{OX2K54DK.js → LWBDG7UH.js} +2 -2
- package/dist/cdn/{EKDX37DH.js → LYQL4O5M.js} +2 -2
- package/dist/cdn/{INHRZ23K.js → LYWU4RZH.js} +2 -2
- package/dist/cdn/{X3LPGOUH.js → M3OFPTT3.js} +2 -2
- package/dist/cdn/{ZHH6EKP5.js → MHSBM4WB.js} +2 -2
- package/dist/cdn/{EJ5VJ4MH.js → MRMD4H7O.js} +2 -2
- package/dist/cdn/{FEZB7BTL.js → MRUWYVHI.js} +2 -2
- package/dist/cdn/{X4HL3D2I.js → MVN27KOI.js} +2 -2
- package/dist/cdn/{4ZZ767AP.js → N2MZJBHS.js} +2 -2
- package/dist/cdn/{M2TA6G4S.js → N324UTZ5.js} +2 -2
- package/dist/cdn/{LSAVJADZ.js → N4OHCK66.js} +2 -2
- package/dist/cdn/{PL35BRBK.js → N5UBRYXZ.js} +2 -2
- package/dist/cdn/{GDOS5KO6.js → NGO6CV3G.js} +2 -2
- package/dist/cdn/{Q5UREG2V.js → NNQAPUKF.js} +1 -1
- package/dist/cdn/{7LP7G3G5.js → NZCTTZQJ.js} +2 -2
- package/dist/cdn/{DXKDQ4AX.js → O4UWY4LV.js} +2 -2
- package/dist/cdn/O4YIZH4Y.js +4 -0
- package/dist/cdn/{A32DRANT.js → OC334CIK.js} +2 -2
- package/dist/cdn/{3LVLGGLP.js → OC44744D.js} +2 -2
- package/dist/cdn/{G24WN4EN.js → OI3SHZPE.js} +2 -2
- package/dist/cdn/{WOMBW52B.js → OPD73MSN.js} +2 -2
- package/dist/cdn/{GJ2OS72Q.js → OW7E6OZU.js} +2 -2
- package/dist/cdn/{6CED3D3P.js → PGFLUWJN.js} +2 -2
- package/dist/cdn/{UHGNCI7M.js → PLAM4ZSV.js} +2 -2
- package/dist/cdn/{DOZD6J4O.js → POG7OHTN.js} +2 -2
- package/dist/cdn/{E65KQPOC.js → PP63JUSI.js} +2 -2
- package/dist/cdn/{AAW2CYTN.js → PRB7DA6V.js} +2 -2
- package/dist/cdn/PTLSWZZ2.js +4 -0
- package/dist/cdn/{CFTM5CZE.js → PZFNMBVW.js} +2 -2
- package/dist/cdn/{MQKIZQYU.js → Q5HH7VHO.js} +3 -3
- package/dist/cdn/{FKXGGTJC.js → QBYJ6PX6.js} +2 -2
- package/dist/cdn/{XIBAIK2Z.js → QDFSCCOX.js} +2 -2
- package/dist/cdn/{5ENIF5PT.js → QDMUSM3I.js} +2 -2
- package/dist/cdn/{NVQA2OXP.js → QIVTK7HW.js} +2 -2
- package/dist/cdn/{E7E3UI3G.js → QO56HLQG.js} +2 -2
- package/dist/cdn/{65N7XAWB.js → QOPQPJ6E.js} +1 -1
- package/dist/cdn/{FYTWFRTO.js → QPNL4XAH.js} +1 -1
- package/dist/cdn/{BYTWF7MG.js → QPRN44LY.js} +2 -2
- package/dist/cdn/{FGFMYMTA.js → QZVIZAH5.js} +2 -2
- package/dist/cdn/{CYUT3EFC.js → R53BLRMX.js} +2 -2
- package/dist/cdn/{SJ3Q55BE.js → RFYBQIXD.js} +2 -2
- package/dist/cdn/{WF52YQCF.js → RIQZUFV2.js} +2 -2
- package/dist/cdn/{HTWTYESZ.js → RJJHXXVX.js} +2 -2
- package/dist/cdn/{5IBV6E7G.js → ROR6SI6U.js} +2 -2
- package/dist/cdn/{W5OOXAU4.js → RR3GDG64.js} +1 -1
- package/dist/cdn/{HVU2EO42.js → RS6TXCOP.js} +2 -2
- package/dist/cdn/{DFKPE66D.js → RTTXS2RX.js} +2 -2
- package/dist/cdn/{44MEZFTF.js → RVNPJNAS.js} +2 -2
- package/dist/cdn/{SXHBKU6W.js → RVOILI7H.js} +2 -2
- package/dist/cdn/{5VBCGIEG.js → S56UY63G.js} +2 -2
- package/dist/cdn/{CN7CLX6P.js → SDKQPMU5.js} +2 -2
- package/dist/cdn/{MJEB763W.js → SFJHXT65.js} +1 -1
- package/dist/cdn/{LAXD5CVD.js → SFS5GEDR.js} +2 -2
- package/dist/cdn/{J5J7VURJ.js → SGX5RQ3B.js} +2 -2
- package/dist/cdn/{KV7CP4TD.js → SGXJZQ4L.js} +2 -2
- package/dist/cdn/{X3SEAUPP.js → SLKM4GXK.js} +2 -2
- package/dist/cdn/{W7XBKGFN.js → SMLBVO43.js} +2 -2
- package/dist/cdn/{L7R6K4A2.js → T2DUZEDU.js} +1 -1
- package/dist/cdn/{EL2LQYMI.js → TCDUH4QD.js} +2 -2
- package/dist/cdn/{BWTP5UGR.js → TCRWJTPW.js} +2 -2
- package/dist/cdn/{DRMYZSAV.js → TKILZGVC.js} +2 -2
- package/dist/cdn/{OPNL2BKB.js → TMXXOYO3.js} +2 -2
- package/dist/cdn/{EOQESQYS.js → TQ24PIOH.js} +1 -1
- package/dist/cdn/{KRI567KM.js → TSB43IHY.js} +2 -2
- package/dist/cdn/{FXKW2C3F.js → TWFIXUDH.js} +2 -2
- package/dist/cdn/{LXYX76VN.js → TWGLV5JH.js} +2 -2
- package/dist/cdn/{EMWBSXP7.js → U2EADFOW.js} +2 -2
- package/dist/cdn/{24W4CW4F.js → U4N25UBP.js} +2 -2
- package/dist/cdn/{R6U6QOKC.js → UBUVKOMA.js} +2 -2
- package/dist/cdn/{XLUHLOEX.js → UFQAANOF.js} +2 -2
- package/dist/cdn/{JUSJWXDQ.js → UHBAUGQ4.js} +1 -1
- package/dist/cdn/UKDRKFWF.js +18 -0
- package/dist/cdn/{YFR4OJTM.js → UOL6LQRJ.js} +2 -2
- package/dist/cdn/{DMPPY7GI.js → UOWOGIE5.js} +2 -2
- package/dist/cdn/{C47XZYAG.js → UQBMV5BY.js} +2 -2
- package/dist/cdn/{D3FZEWBP.js → UZVRS2XU.js} +1 -1
- package/dist/cdn/{5IAANDGE.js → V5UFRWYB.js} +2 -2
- package/dist/cdn/{2AYAUMKZ.js → VGPMZBNK.js} +2 -2
- package/dist/cdn/{UC5VQMM6.js → VUHZ6YXM.js} +2 -2
- package/dist/cdn/{ZZZOCU5W.js → VXCG5LEV.js} +2 -2
- package/dist/cdn/{QQCYF2HJ.js → VYMYL6JP.js} +2 -2
- package/dist/cdn/{AKIPP4VC.js → WO7YGQFB.js} +2 -2
- package/dist/cdn/{GXXVAQDK.js → WVVZ4CLC.js} +2 -2
- package/dist/cdn/{OJFX5K3G.js → WX4ZUMZN.js} +2 -2
- package/dist/cdn/{GMA3NBTA.js → WYRW7PJT.js} +2 -2
- package/dist/cdn/{R5UW5BBB.js → X4W4ZZ7O.js} +2 -2
- package/dist/cdn/{RAYJRNTN.js → X6GE3EIS.js} +2 -2
- package/dist/cdn/{GKMXDGZF.js → XA34OFHO.js} +2 -2
- package/dist/cdn/{HMLEGLZ7.js → XCO35G7O.js} +2 -2
- package/dist/cdn/{HA3GGXFE.js → XEO56VFL.js} +2 -2
- package/dist/cdn/{M4VWLPTM.js → XFDA7NEB.js} +2 -2
- package/dist/cdn/{Z2GSRYNO.js → XFZL2VCD.js} +2 -2
- package/dist/cdn/{EKVI5K4J.js → XHZTR3BJ.js} +2 -2
- package/dist/cdn/{KPYNNZU2.js → XIJFQNOB.js} +2 -2
- package/dist/cdn/{CZXYR4ZF.js → XL4TPC5B.js} +2 -2
- package/dist/cdn/{T33NVZXY.js → XN5WML6J.js} +2 -2
- package/dist/cdn/{N7CW4A4R.js → XOHNTOVE.js} +2 -2
- package/dist/cdn/{SC3ZFF3Y.js → XQKIPHIH.js} +2 -2
- package/dist/cdn/{X6X5OCFG.js → XQNKJT3W.js} +2 -2
- package/dist/cdn/{6GACAQSQ.js → XSNJZI7M.js} +2 -2
- package/dist/cdn/XY544Q64.js +4 -0
- package/dist/cdn/Y236OPC4.js +4 -0
- package/dist/cdn/{TM4ZSPAB.js → Y3MVHWDO.js} +2 -2
- package/dist/cdn/{YWGNQDQM.js → Y4M5KS3M.js} +1 -1
- package/dist/cdn/{RSWKNEWY.js → Y5QDB3GF.js} +2 -2
- package/dist/cdn/{ZA32GRGJ.js → YAK6SM64.js} +2 -2
- package/dist/cdn/{SOLDJVDR.js → YFG6Q4W4.js} +2 -2
- package/dist/cdn/{APENH3LP.js → YOSMKTOJ.js} +2 -2
- package/dist/cdn/{LMK5U4FX.js → YQHRK3AQ.js} +2 -2
- package/dist/cdn/{NYLKYV7F.js → YTSZZUYS.js} +2 -2
- package/dist/cdn/{TI446Z7R.js → YUOGYP2W.js} +2 -2
- package/dist/cdn/{VIJAXFTF.js → YVBTB4PY.js} +2 -2
- package/dist/cdn/{E2FWRG3J.js → YXUMTVRG.js} +1 -1
- package/dist/cdn/{55BUMEUY.js → YZCPJ5JI.js} +2 -2
- package/dist/cdn/{6CWLNSWC.js → Z2MJRFIE.js} +2 -2
- package/dist/cdn/{QTIN4PMT.js → Z3T7XWKC.js} +2 -2
- package/dist/cdn/{TUGBBV6B.js → Z6TJZJH7.js} +2 -2
- package/dist/cdn/{D42V7PBV.js → ZA4R3KFB.js} +2 -2
- package/dist/cdn/{L4PVVSFZ.js → ZEIIGNWR.js} +2 -2
- package/dist/cdn/{67VSRPIM.js → ZEZCVFYU.js} +2 -2
- package/dist/cdn/{IUZA5X57.js → ZGO54R7R.js} +2 -2
- package/dist/cdn/{LFZ4GYFK.js → ZHXAH2ZO.js} +2 -2
- package/dist/cdn/{HEMGGNXH.js → ZJKJXFXC.js} +2 -2
- package/dist/cdn/{4KRD733S.js → ZJXXAWMH.js} +1 -1
- package/dist/cdn/{7YJX66H4.js → ZLNLCCC6.js} +1 -1
- package/dist/cdn/{ANX7JVYO.js → ZOPBEUAZ.js} +2 -2
- package/dist/cdn/{5GM4BLLQ.js → ZUGYY22V.js} +2 -2
- package/dist/cdn/{YKWSPTR2.js → ZWGDNNV7.js} +2 -2
- package/dist/cdn/{RXO3BGVO.js → ZZAKVFN7.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/Auth.js +1 -1
- package/dist/chunks/cardFetchingUtils.js +1 -1
- package/dist/chunks/common.js +1 -1
- package/dist/chunks/deployAppContexts.js +1 -1
- package/dist/chunks/downloadUtils.js +1 -1
- package/dist/chunks/index.js +1 -1
- package/dist/chunks/interfaces.js +1 -1
- package/dist/chunks/loadModules.js +1 -1
- package/dist/chunks/mapViewUtils.js +1 -1
- package/dist/chunks/pciUtils.js +1 -1
- package/dist/chunks/popupUtils.js +1 -1
- package/dist/chunks/publicNotificationStore.js +1 -1
- package/dist/chunks/queryUtils.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/solution-store.js +1 -1
- package/dist/chunks/templates.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.js +1 -1
- package/dist/components/basemap-gallery/customElement.js +1 -1
- package/dist/components/buffer-tools/customElement.js +1 -1
- package/dist/components/card-manager/customElement.js +2 -2
- package/dist/components/consent-manager/customElement.js +1 -1
- package/dist/components/create-feature/customElement.js +1 -1
- package/dist/components/create-related-feature/customElement.js +1 -1
- package/dist/components/crowdsource-manager/customElement.js +6 -6
- package/dist/components/crowdsource-reporter/customElement.d.ts +12 -0
- package/dist/components/crowdsource-reporter/customElement.js +3 -3
- package/dist/components/deduct-calculator/customElement.js +1 -1
- package/dist/components/delete-button/customElement.js +1 -1
- package/dist/components/delete-dialog/customElement.js +1 -1
- package/dist/components/edit-card/customElement.js +1 -1
- package/dist/components/feature-details/customElement.js +1 -1
- package/dist/components/feature-list/customElement.js +1 -1
- package/dist/components/field-selection/customElement.js +1 -1
- package/dist/components/floor-filter/customElement.js +1 -1
- package/dist/components/info-card/customElement.d.ts +1 -1
- package/dist/components/info-card/customElement.js +4 -4
- package/dist/components/json-editor/customElement.js +1 -1
- package/dist/components/layer-list/customElement.js +1 -1
- package/dist/components/layer-table/customElement.js +1 -1
- package/dist/components/map-card/customElement.js +1 -1
- package/dist/components/map-draw-tools/customElement.js +1 -1
- package/dist/components/map-fullscreen/customElement.js +1 -1
- package/dist/components/map-layer-picker/customElement.js +1 -1
- package/dist/components/map-legend/customElement.js +1 -1
- package/dist/components/map-picker/customElement.js +1 -1
- package/dist/components/map-search/customElement.js +1 -1
- package/dist/components/map-select-tools/customElement.js +1 -1
- package/dist/components/map-tools/customElement.js +1 -1
- package/dist/components/pci-calculator/customElement.js +1 -1
- package/dist/components/pdf-download/customElement.js +1 -1
- package/dist/components/public-notification/customElement.js +1 -1
- package/dist/components/refine-selection/customElement.js +1 -1
- package/dist/components/selection-tool/customElement.js +1 -1
- package/dist/components/solution-article-card/customElement.js +1 -1
- package/dist/components/solution-configuration/customElement.js +1 -1
- package/dist/components/solution-configure-panel/customElement.js +1 -1
- package/dist/components/solution-configure-titles/customElement.js +1 -1
- package/dist/components/solution-contents/customElement.js +1 -1
- package/dist/components/solution-delete-dialog/customElement.js +1 -1
- package/dist/components/solution-deploy-dialog/customElement.js +1 -1
- package/dist/components/solution-deploy-panel/customElement.js +1 -1
- package/dist/components/solution-deployed-card/customElement.js +1 -1
- package/dist/components/solution-deploying-panel/customElement.js +1 -1
- package/dist/components/solution-details-card/customElement.js +1 -1
- package/dist/components/solution-details-panel/customElement.js +1 -1
- package/dist/components/solution-item/customElement.js +1 -1
- package/dist/components/solution-item-accordion/customElement.js +1 -1
- package/dist/components/solution-item-details/customElement.js +1 -1
- package/dist/components/solution-item-icon/customElement.js +1 -1
- package/dist/components/solution-item-sharing/customElement.js +1 -1
- package/dist/components/solution-items-diagram/customElement.js +1 -1
- package/dist/components/solution-organization-variables/customElement.js +1 -1
- package/dist/components/solution-resource-item/customElement.js +1 -1
- package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
- package/dist/components/solution-spatial-ref/customElement.js +1 -1
- package/dist/components/solution-template-data/customElement.js +1 -1
- package/dist/components/solution-variables/customElement.js +1 -1
- package/dist/components/solutions-all-panel/customElement.js +1 -1
- package/dist/components/solutions-all-shell/customElement.js +1 -1
- package/dist/components/solutions-article-panel/customElement.js +1 -1
- package/dist/components/solutions-articles/customElement.js +1 -1
- package/dist/components/solutions-articles-shell/customElement.js +1 -1
- package/dist/components/solutions-deployed-panel/customElement.js +1 -1
- package/dist/components/solutions-deployed-shell/customElement.js +1 -1
- package/dist/components/solutions-filter-panel/customElement.js +1 -1
- package/dist/components/spatial-ref/customElement.js +1 -1
- package/dist/components/store-manager/customElement.js +1 -1
- package/dist/docs/api.json +62 -4
- package/dist/docs/docs.json +47 -3
- package/dist/docs/vscode.html-custom-data.json +10 -0
- package/dist/docs/web-types.json +29 -3
- package/dist/index.js +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cdn/7EJ7QFCG.js +0 -18
- package/dist/cdn/E24CFSF6.js +0 -4
- package/dist/cdn/GFYWDQWM.js +0 -4
- package/dist/cdn/HMVKLXKH.js +0 -4
- package/dist/cdn/I4DHTV7R.js +0 -4
- package/dist/cdn/JCWMZ7NC.js +0 -4
- package/dist/cdn/JWTZEV6W.js +0 -4
- package/dist/cdn/LLEBDKSN.js +0 -18
- package/dist/cdn/MCX2WJIW.js +0 -4
- package/dist/cdn/Y7EKW72S.js +0 -4
@@ -0,0 +1,18 @@
|
|
1
|
+
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
|
+
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{a as S}from"./FEWEA7AN.js";import"./KZWHC2ST.js";import{a as v,c as u,d as c,e as m,f as C,g as x}from"./RS6TXCOP.js";import"./LBJE5BZD.js";import{b as $}from"./BACSZ2Z7.js";import{a as h,b as o}from"./SGXJZQ4L.js";import{b as F}from"./IIX655ZM.js";import{a as I}from"./YFG6Q4W4.js";import{D as b,E as p,I as L,c as g,d as l,g as d,o as w,q as y}from"./NNQAPUKF.js";import"./B4HONVWZ.js";var V=g`@layer{/** @license
|
5
|
+
* Copyright 2025 Esri
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
*/:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.width-full{width:100%!important}.width-0{width:0}.height-full{height:100%!important}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}}`,_=class extends b{constructor(){super(),this.center="",this.commentButtonText="",this.commentSubmittedMessage="",this.reportOutsideAreaMessage="",this.defaultWebmap="",this.description="",this.enableAnonymousAccess=!1,this.enableAnonymousComments=!1,this.enableComments=!1,this.enableHome=!0,this.enableLogin=!1,this.enableNewReports=!1,this.enableSearch=!0,this.enableSnapping=!1,this.enableZoom=!0,this.isMobile=!1,this.layerExpressions=[],this.layerId="",this.level="",this.loginTitle="",this.mapInfos=[],this.objectId="",this.reportButtonText="",this.reportsHeader="",this.reportSubmittedMessage="",this.showComments=!1,this.showUserImageInCommentsList=!1,this.showFeatureSymbol=!1,this.showMyReportsOnly=!1,this.submitNewReportsMessage="",this.theme="light",this.floorLevel="",this.showFullCommentTitle=!0,this.filterByMapExtent=!1,this.sortOption="newest",this.reportingArea=!1,this.reportingAreaLayer="",this.reportingAreaMessage="",this._featureCreationFailedErrorMsg="",this._filterActive=!1,this._flowItems=[],this._hasValidLayers=!1,this._reportSubmitted=!1,this._selectedLayerName="",this._showSubmitCancelButton=!1,this._showLoadingIndicator=!1,this._sidePanelCollapsed=!1,this._translations=I({name:"crowdsource-reporter",blocking:!0}),this._updatedProgressBarStatus=25,this._updatedSortOption="newest",this._commentSubmitted=!1,this._addingCommentFailed=!1,this._filterOpen=!1,this._showNextButton=!1,this._submitNextButtonDisabled=!1,this._createFeature=h(),this._currentFeatureId="",this._editableLayerIds=[],this._featureDetails=h(),this._featureList=h(),this._selectedRelatedFeature=[],this._filterList=h(),this._layerList=h(),this._createRelatedFeature=h(),this._layers=[],this._mapImageryLayersId=[],this._selectedFeature=[],this._selectedFeatureIndex=0,this._selectedLayerId="",this._shareNode=h(),this._urlParamsLoaded=!1,this._validLayers=[],this._nonVisibleValidLayers=[],this._showFullPanel=!1,this._floorExpression="",this._formElements=[],this._prevSelectedLayerId="",this._t9nLayerExpressions=[],this._reportSubmittedAlert=h(),this.togglePanel=w(),S(window)}static{this.properties={center:1,commentButtonText:1,commentSubmittedMessage:1,reportOutsideAreaMessage:1,defaultWebmap:1,description:1,enableAnonymousAccess:5,enableAnonymousComments:5,enableComments:5,enableHome:5,enableLogin:5,enableNewReports:5,enableSearch:5,enableSnapping:5,enableZoom:5,isMobile:5,layerExpressions:0,layerId:1,level:1,loginTitle:1,mapInfos:0,mapView:0,objectId:1,reportButtonText:1,reportingOptions:0,reportsHeader:1,reportSubmittedMessage:1,searchConfiguration:0,showComments:5,showUserImageInCommentsList:5,showFeatureSymbol:5,showMyReportsOnly:5,submitNewReportsMessage:1,theme:1,zoomToScale:9,floorLevel:1,showFullCommentTitle:5,filterByMapExtent:5,sortOption:1,reportingArea:5,reportingAreaLayer:1,reportingAreaMessage:1,_featureCreationFailedErrorMsg:16,_filterActive:16,_flowItems:16,_hasValidLayers:16,_mapInfo:16,_reportSubmitted:16,_selectedLayerName:16,_showSubmitCancelButton:16,_showLoadingIndicator:16,_sidePanelCollapsed:16,_translations:16,_updatedProgressBarStatus:16,_updatedSorting:16,_updatedSortOption:16,_commentSubmitted:16,_addingCommentFailed:16,_filterOpen:16,_showNextButton:16,_submitNextButtonDisabled:16}}static{this.styles=V}static{this.shadowRootOptions=y}willUpdate(e){e.has("isMobile")&&this.isMobileWatchHandler(this.isMobile),e.has("mapView")&&this.mapViewWatchHandler(),e.has("floorLevel")&&this.floorLevelWatchHandler(),e.has("showMyReportsOnly")&&(this.hasUpdated||this.showMyReportsOnly!==!1)&&this.showMyReportsOnlyWatchHandler(),e.has("sortOption")&&(this.hasUpdated||this.sortOption!=="newest")&&this.sortOptionWatchHandler(),e.has("filterByMapExtent")&&(this.hasUpdated||this.filterByMapExtent!==!1)&&this.filterByMapExtentChangeWatchHandler(),e.has("layerExpressions")&&(this.hasUpdated||this.layerExpressions?.length>0)&&this.layerExpressionsWatchHandler(),e.has("showFeatureSymbol")&&(this.hasUpdated||this.showFeatureSymbol!==!1)&&this.showFeatureSymbolWatchHandler(),(this._flowItems.includes("filter-panel")||this._filterOpen)&&this._filterList.value?.updateInitDefExpressions({initDefExpressions:this._initDefExpressions})}async isMobileWatchHandler(e){this.updatePanelState(!1,this._showFullPanel),e&&this._flowItems[this._flowItems.length-1]==="filter-panel"?(await this.backFromFilterPanel(),this._filterOpen=!0):!e&&this._filterOpen&&(await this._closeFilter(),this._flowItems=[...this._flowItems,"filter-panel"])}async mapViewWatchHandler(){await this.mapView?.when(async()=>{this.setInitExpressions(),await this.setMapView()})}async floorLevelWatchHandler(){if(this._editableLayerIds)for(let e of this._editableLayerIds){let t=this.mapView&&await c(this.mapView,e);t&&t.floorInfo?.floorField&&this._updateFloorDefinitionExpression(t)}this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value&&await this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh(),this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)}async showMyReportsOnlyWatchHandler(){this._editableLayerIds&&(await this._updateFeatures(),this.refreshLists())}async sortOptionWatchHandler(){this.updateSortingOptions()}filterByMapExtentChangeWatchHandler(){this.refreshLists()}async layerExpressionsWatchHandler(){this.resetFilterList(),await this.handleSelectedLayersFilter(),await this._featureList.value?.refresh()}async showFeatureSymbolWatchHandler(){await this._featureList.value?.refresh()}async updateLayerExpressionsT9n(e){if(this._t9nLayerExpressions=e||this.layerExpressions,this._filterList.value!=null)await this._filterList.value.handleUpdatingT9nData(this._t9nLayerExpressions);else if(this._currentLayerExpressions!=null){let t=structuredClone(this._currentLayerExpressions);this.handleLayerExpressionsT9n(t,this._t9nLayerExpressions),this._currentLayerExpressions=t}return Promise.resolve()}async load(){this._urlParamsLoaded=!1,await this._initModules(),await this.mapView?.when(async()=>{this._layers=this.reportingOptions?Object.keys(this.reportingOptions).filter(e=>{let t=e&&this.reportingOptions&&this.reportingOptions[e];return t&&t.visible}):[],this.setInitExpressions(),await this.setMapView()})}render(){let e=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`${this._reportSubmitted&&l`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._reportSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage||this._translations.submitMsg)??""} ${o(this._reportSubmittedAlert)}></div></calcite-alert>`||""}${this._featureCreationFailedErrorMsg&&l`<calcite-alert auto-close class=${p(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._featureCreationFailedErrorMsg=""}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>`||""}${this._commentSubmitted&&l`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._commentSubmitted=!1}} open placement=top><div slot=message>${this.commentSubmittedMessage||this._translations.commentSubmittedMsg}</div></calcite-alert>`||""}${this._addingCommentFailed&&l`<calcite-alert auto-close class=${p(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._addingCommentFailed=!1}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.addingCommentFailedMsg}</div></calcite-alert>`||""}<div><calcite-shell content-behind>${this._getReporter()}</calcite-shell></div>${this.isMobile&&this.filterModal()||""}`}updated(){this.reportSubmittedMessage&&this._reportSubmittedAlert.value?.children[0]&&(this._reportSubmittedAlert.value.children[0].style.margin="0px")}async _initModules(){let[e,t,i,s]=await F(["esri/core/reactiveUtils","esri/layers/support/FeatureFilter","esri/rest/identify","esri/rest/support/IdentifyParameters"]);this.reactiveUtils=e,this.FeatureFilter=t,this.identify=i,this.IdentifyParameters=s}async setSelectedLayer(e,t){this._selectedLayerId=e,this._selectedLayer=this.mapView&&await c(this.mapView,e),this._selectedLayerName=t,this._validLayers.forEach(i=>{this._nonVisibleValidLayers.find(s=>s.id===i.id)||i.set("visible",!e||i.id===e)})}_getLayersConfig(e){return this.reportingOptions&&this.reportingOptions[e]?this.reportingOptions[e]:null}_getReporter(){let e=[];this._flowItems.forEach(i=>{switch(i){case"layer-list":e.push(this.getLayerListFlowItem());break;case"feature-list":e.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"filter-panel":e.push(this.getFilterPanel());break;case"feature-details":e.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":e.push(this.getChooseCategoryFlowItem());break;case"feature-create":e.push(this.getFeatureCreateFlowItem());break;case"comment-details":e.push(this.getCommentDetailsFlowItem());break;case"add-comment":e.push(this.getAddCommentFlowItem());break}});let t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-panel class=${`width-full ${t}`}>${this.mapView?l`<calcite-flow>${e?.length>0&&e||""}</calcite-flow>`:l`<calcite-loader label scale=m></calcite-loader>`}</calcite-panel>`}filterModal(){return(this.layerExpressions?this.layerExpressions.filter(e=>e.id===this._selectedLayerId):[]).length>0&&l`<calcite-modal aria-labelledby=modal-title class="modal" kind=brand @calciteModalClose=${()=>void this._closeFilter()} .open=${this._filterOpen} width-scale=s><div class="display-flex align-center" id=modal-title slot=header>${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)}</div><div slot=content>${this.mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>void this._closeFilter()} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._filterActive=!1,this._featureList.value&&this._featureList.value.refresh()}} @filterUpdate=${()=>{this._filterList.value?.filterCount!==void 0&&this._handleFilterUpdate(this._filterList.value?.filterCount>0)}} reset-btn .view=${this.mapView} ${o(this._filterList)}></instant-apps-filter-list>`||""}</div></calcite-modal>`||""}_toggleFilter(){this._filterOpen=!this._filterOpen}async _closeFilter(){this._filterOpen=!1,this._filterList.value!=null&&(this._currentLayerExpressions=await this._filterList.value.getCurrentLayerExpressions())}async sortOptionClick(e,t,i){this._updatedSorting={field:e,order:t},this._updatedSortOption=i}_toggleSort(){let e=this.reportingOptions&&this.reportingOptions[this._selectedLayerId]&&this.reportingOptions[this._selectedLayerId].like&&this.reportingOptions[this._selectedLayerId].likeField;return l`<calcite-popover auto-close label offset-distance=0 .placement=${this.isMobile?"leading-start":"bottom-start"} pointer-disabled reference-element=sort-popover><calcite-list label selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"desc","newest")}} .selected=${this._updatedSortOption==="newest"} value=newest></calcite-list-item><calcite-list-item .label=${this._translations.sortOldest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"asc","oldest")}} .selected=${this._updatedSortOption==="oldest"} value=oldest></calcite-list-item>${e&&l`<calcite-list-item .label=${this._translations.sortHighestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t!==void 0&&this.sortOptionClick(t,"desc","highestVoted")}} .selected=${this._updatedSortOption==="highestVoted"} value=highestVoted></calcite-list-item><calcite-list-item .label=${this._translations.sortLowestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t&&this.sortOptionClick(t,"asc","lowestVoted")}} .selected=${this._updatedSortOption==="lowestVoted"} value=lowestVoted></calcite-list-item>`||""}</calcite-list></calcite-popover>`}async _handleFilterListReset(){this._filterActive=!1}async _handleFilterUpdate(e){this._showLoadingIndicator=!0,this._filterActive=e,this._featureList.value&&await this._featureList.value.refresh(),this._showLoadingIndicator=!1}getLayerListFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportsHeader} .selected=${this._flowItems[this._flowItems.length-1]==="layer-list"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this._hasValidLayers&&this.enableNewReports&&l`<calcite-button appearance=solid @click=${this.navigateToChooseCategory} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel><layer-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} .layers=${this._editableLayerIds?.length>0?this._editableLayerIds:this._layers} .mapView=${this.mapView} @layerSelect=${this.displayFeaturesList} @layersListLoaded=${this.layerListLoaded} show-feature-count show-next-icon ${o(this._layerList)}></layer-list></calcite-panel></calcite-flow-item>`}getChooseCategoryFlowItem(){let e=this.reportingOptions?Object.keys(this.reportingOptions).filter(t=>this.reportingOptions&&this.reportingOptions[t].visible&&this.reportingOptions[t].reporting&&this._layerItemsHash&&this._layerItemsHash[t]&&this._layerItemsHash[t].supportsAdd):[];return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="reporting-layer-list"}><calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.chooseCategoryMsg}</div></calcite-notice><layer-list class="height-full" .layers=${e} .mapView=${this.mapView} @layerSelect=${this.navigateToCreateFeature}></layer-list></calcite-panel></calcite-flow-item>`}getFeatureCreateFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} @calciteFlowItemBack=${this.backFromCreateFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-create"}>${this._showSubmitCancelButton&&l`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${this._submitNextButtonDisabled} @click=${this._showNextButton?this.onNextButtonClick.bind(this):this.onCreateFeatureSubmitButtonClick.bind(this)} width=full>${this._showNextButton?this._translations.next:this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}<calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><create-feature customize-submit enable-search .enableSnapping=${this.enableSnapping} .floorLevel=${this.floorLevel} .formElements=${this._formElements.find(e=>e.id===this._selectedLayerId)} .reportingAreaLayer=${this.reportingAreaLayer} .isMobile=${this.isMobile} .mapView=${this.mapView} @drawComplete=${this.onFormReady} @editingLocation=${this.editingLocation} @editingAttachment=${this.showSubmitCancelButton} @fail=${this.createFeatureFailed} @modeChanged=${this.backFromCreateFeaturePanel} @progressStatus=${this.updatedProgressStatus} @success=${this.onReportSubmitted} .searchConfiguration=${this.searchConfiguration} .selectedLayerId=${this._selectedLayerId} .reportOutsideAreaMessage=${this.reportOutsideAreaMessage} .submitNewReportsMessage=${this.submitNewReportsMessage} update-map-position ${o(this._createFeature)}></create-feature></calcite-panel></calcite-flow-item>`}updatedProgressStatus(e){this._updatedProgressBarStatus=e.detail}onFormReady(e){this._submitNextButtonDisabled=e.detail,this._showSubmitCancelButton=!0}editingLocation(){this._showNextButton=!0}showSubmitCancelButton(e){this._showSubmitCancelButton=!e.detail}onCreateFeatureSubmitButtonClick(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this._createFeature.value.submit())}backFromCreateFeaturePanel(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updateNonVisibleLayersOnMap(!1)),this.backFromSelectedPanel()}onNextButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._showSubmitCancelButton=!0,this._createFeature.value.showForm())}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature.value&&this._createRelatedFeature.value.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature.value&&(this._showSubmitCancelButton=!1),this.backFromSelectedPanel()}createFeatureFailed(e){console.error(e.detail),this._featureCreationFailedErrorMsg=e.detail.message}async onReportSubmitted(){this.updateNonVisibleLayersOnMap(!1),await this.navigateToHomePage(),this._reportSubmitted=!0,this._updatedProgressBarStatus=25,this._showFullPanel&&this.updatePanelState(this._sidePanelCollapsed,!1)}addCommentFailed(e){console.error(e.detail),this._addingCommentFailed=!0}async onCommentSubmitted(){this._commentSubmitted=!0,this.backFromSelectedPanel(),this._showLoadingIndicator=!0,this._featureDetails.value&&await this._featureDetails.value.refresh(this._currentFeature),setTimeout(()=>{this._showLoadingIndicator=!1},300)}async navigateToHomePage(){await this.setSelectedFeatures([]),this._layerList.value&&await this._layerList.value.refresh(),this._editableLayerIds.length===1?(this._featureList.value&&await this._featureList.value.refresh(),this._flowItems=["feature-list"]):this._flowItems=["layer-list"]}async navigateToCreateFeature(e){e.detail.layerId&&e.detail.layerName&&await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateNonVisibleLayersOnMap(!0),this._getFormElements(),this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"reporting-layer-list"]}updateNonVisibleLayersOnMap(e){this._nonVisibleValidLayers.find(t=>t.id===this._selectedLayerId)&&this._selectedLayer&&this._selectedLayer.set("visible",e)}async layerListLoaded(e){if(this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"||this._flowItems[0]==="feature-list"){let t=e.detail,i=this.mapView&&await m(this.mapView),s=[];this._validLayers=[],this._nonVisibleValidLayers=[],i?.forEach(a=>{t.includes(a.id)&&(this._validLayers.push(a),a.visible||this._nonVisibleValidLayers.push(a),this._getLayersConfig(a.id)?.reporting&&this._layerItemsHash&&this._layerItemsHash[a.id]&&this._layerItemsHash[a.id].supportsAdd&&s.push(a.id))}),this.handleMapClick(),this._hasValidLayers=s.length>0,this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}}async displayFeaturesList(e){await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateSortingOptions(),this.handleSelectedLayersFilter(),this._flowItems=[...this._flowItems,"feature-list"],this._prevSelectedLayerId=this._selectedLayerId}updateSortingOptions(){let e=this.sortOption===""?"newest":this.sortOption,t=e==="oldest"||e==="lowestVoted"?"asc":"desc",i=this.reportingOptions?.[this._selectedLayerId]?.like?this.reportingOptions?.[this._selectedLayerId]?.likeField:"",s=this._selectedLayer&&(e==="newest"||e==="oldest")?this._selectedLayer?.objectIdField:i;this._updatedSorting={field:s||"",order:t},this._updatedSortOption=!i&&(e==="highestVoted"||e==="lowestVoted")?"newest":e}async backFromFilterPanel(){this._filterList.value!=null&&(this._currentLayerExpressions=await this._filterList.value.getCurrentLayerExpressions()),this._featureList.value&&await this._featureList.value.refresh(),this.backFromSelectedPanel()}backFromSelectedPanel(){this._updatedProgressBarStatus=25;let e=[...this._flowItems];if(e[e.length-1]==="comment-details"||e[e.length-1]==="add-comment"||this.clearHighlights(),(e[e.length-1]==="reporting-layer-list"||e[e.length-1]==="feature-create"&&(e[0]==="feature-list"||e[e.length-2]==="feature-list"))&&this.updatePanelState(this._sidePanelCollapsed,!1),e.pop(),e.length===1&&e[0]==="layer-list"){this.navigateToHomePage();return}this._flowItems=[...e]}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}updatePanelState(e,t){this._sidePanelCollapsed=e,this._showFullPanel=t,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}async onFeatureSelectFromList(e){this._showLoadingIndicator=!0,await this.setSelectedFeatures([e.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){let e=this._currentFeature?.layer,t=this.mapView&&await C(this.mapView);e.relationships?.some(i=>{let s=t?.filter(a=>e.url===a.url&&a.layerId===i.relatedTableId);return s&&s.length>0?(this._relatedTable=s[0],!0):!1})}async updatingFeatureDetails(e){this._showLoadingIndicator=e}async selectionChanged(e){this.updatingFeatureDetails(!0),await this.setCurrentFeature(e.detail.selectedFeature[0]),this.highlightOnMap(e.detail.selectedFeature[0]),this._selectedFeatureIndex=e.detail.selectedFeatureIndex,this._featureDetails.value&&await this._featureDetails.value.refresh(e.detail.selectedFeature[0])}showAddCommentsPanel(){this._flowItems=[...this._flowItems,"add-comment"]}async onCommentSelectFromList(e){this._selectedRelatedFeature=[e.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(e,t){let i=this._getLayersConfig(this._selectedLayerId)?.reporting&&this._layerItemsHash&&this._layerItemsHash[this._selectedLayerId].supportsAdd,s=this._currentLayerExpressions?.length;return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile&&this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-list"}>${this._toggleSort()}<calcite-action icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort??d}></calcite-action>${s&&l`<calcite-action icon=filter .indicator=${this._filterActive} @click=${()=>{this.isMobile?this._toggleFilter():this._flowItems=[...this._flowItems,"filter-panel"]}} slot=header-actions-end .text=${this._translations.filter} title=${this._translations.filter??d}></calcite-action>`||""}${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.enableNewReports&&i&&l`<calcite-button appearance=solid @click=${this.navigateToCreateFeature} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel>${l`<feature-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} highlight-on-hover .mapView=${this.mapView} .noFeaturesFoundMsg=${this._translations.featureErrorMsg} @featureSelect=${this.onFeatureSelectFromList} page-size=30 .reportingOptions=${this.reportingOptions} .selectedLayerId=${e} .showFeatureSymbol=${this.showFeatureSymbol} .sortingInfo=${this._updatedSorting} ${o(this._featureList)}></feature-list>`}</calcite-panel></calcite-flow-item>`}getFilterPanel(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromFilterPanel} .selected=${this._flowItems[this._flowItems.length-1]==="filter-panel"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer><div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${!this._filterActive} @click=${this.resetFilterList} width=full>${this._translations.resetFilter}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromFilterPanel} width=full>${this._translations.close}</calcite-button></div></div><calcite-panel>${this.mapView&&l`<instant-apps-filter-list .closeBtnOnClick=${()=>{}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>void this._handleFilterListReset()} @filterUpdate=${()=>{let e=this._filterList.value?.filterCount;e!==void 0&&this._handleFilterUpdate(e>0)}} .view=${this.mapView} ${o(this._filterList)}></instant-apps-filter-list>`||""}</calcite-panel></calcite-flow-item>`}getFeatureDetailsFlowItem(){let e=this._selectedLayer?.relationships,t=this._getLayersConfig(this._selectedLayerId)?.comment&&e&&e.length>0&&this._relatedTable;return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.mapView&&l`<instant-apps-social-share class=share-node flip-rtl popover-button-icon-scale=s remove-popover-offset scale=m share-button-color=neutral share-button-type=action slot=header-actions-end social-media .view=${this.mapView} ${o(this._shareNode)}></instant-apps-social-share>`||""}${this._selectedFeature.length>1&&this.getFeaturesPagination()||""}<calcite-panel><feature-details class=full-height .enableSnapping=${this.enableSnapping} .graphics=${this._selectedFeature} .layerItemsHash=${this._layerItemsHash} .mapView=${this.mapView} @addComment=${this.showAddCommentsPanel} @commentSelect=${this.onCommentSelectFromList} @featureSelectionChange=${this.selectionChanged} @likeOrDislikeClicked=${()=>{this._featureList.value&&this._featureList.value.refresh(!0)}} @loadingStatus=${i=>void this.updatingFeatureDetails(i.detail)} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${o(this._featureDetails)}></feature-details>${t&&l`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText||this._translations.comment}</calcite-button>`||""}</calcite-panel></calcite-flow-item>`}getFeaturesPagination(){return l`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left id=solutions-back @click=${()=>this._featureDetails.value&&void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent @click=${()=>this._featureDetails.value&&void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-start=chevron-right id=solutions-next @click=${()=>this._featureDetails.value&&void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`}getCommentDetailsFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="comment-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this._selectedRelatedFeature} .mapView=${this.mapView}></info-card></calcite-panel></calcite-flow-item>`}getAddCommentFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromCreateRelatedFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="add-comment"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer>${this._showSubmitCancelButton&&l`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" @click=${this.onCreateRelatedFeatureSubmitButtonClick} width=full>${this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateRelatedFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}</div><calcite-panel><create-related-feature customize-submit .enableSnapping=${this.enableSnapping} .mapView=${this.mapView} @fail=${this.addCommentFailed} @formReady=${this.onFormReady} @isActionPending=${this.showSubmitCancelButton} @success=${this.onCommentSubmitted} .selectedFeature=${this._currentFeature} .table=${this._relatedTable} ${o(this._createRelatedFeature)}></create-related-feature></calcite-panel></calcite-flow-item>`}async setSelectedFeatures(e){this._selectedFeature=e,await this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:void 0)}async setCurrentFeature(e){if(this._currentFeature=e,e&&e.layer){let t=e.layer;t.title&&this.setSelectedLayer(t.id,t.title),this._currentFeatureId=e.attributes[t.objectIdField],this._getLayersConfig(t.id)?.comment&&t.relationships&&t.relationships.length>0&&await this.getRelatedTable()}else this._editableLayerIds.length>1&&(this.setSelectedLayer("",""),this.handlePrevLayersFilter()),this._currentFeatureId="";this._updateShareURL()}async highlightOnMap(e){if(this.clearHighlights(),e&&e.geometry&&e.layer&&e.layer.id!==void 0){let t=this.mapView&&await u(this.mapView,e.layer.id.toString());if(t){t.highlightOptions=null;let i=Number(e.getObjectId());this._highlightHandle=this.mapView&&await x([i],t,this.mapView,!0,this.zoomToScale)}}this.updatingFeatureDetails(!1)}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return l`<calcite-action .icon=${this._sidePanelCollapsed?"chevrons-up":"chevrons-down"} @click=${this.toggleSidePanel} slot=header-actions-end .text=${(this._sidePanelCollapsed?this._translations.expand:this._translations.collapse)||""}></calcite-action>`}async setMapView(){await this.getLayersToShowInList(),await this._updateFeatures(),this._editableLayerIds?.length===1?await this.renderFeaturesList():this._flowItems=["layer-list"],this.mapView&&(this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0))}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=this.reactiveUtils?.on(()=>this.mapView,"click",this.onMapClick.bind(this))}async onMapClick(e){if(this.mapView){this.mapView.popupEnabled=!1;let t=await this.mapView.hitTest(e);t.results.length>0?await this._handleHitTestResults(t.results):this._mapImageryLayersId.length>0&&await this._handleIdentify(e.mapPoint)}}async _handleHitTestResults(e){let t=[];e.forEach(function(a){a.type==="graphic"&&t.push(a.graphic)});let i=t.filter(a=>{if(a.layer?.type==="feature"){let r=a.layer;return this._validLayers.includes(r)}else return!1}),s=t.filter(a=>{if(a.layer?.type==="feature"){let r=a.layer;return!this._validLayers.includes(r)&&r?.popupEnabled&&r?.id}else return!1});if(i.length>0&&(await this.setSelectedFeatures(i),this._flowItems.length&&this._flowItems.includes("feature-details")?(this._flowItems=[...this._flowItems.slice(0,this._flowItems.indexOf("feature-details")+1)],await this.highlightOnMap(t[0])):this._flowItems=[...this._flowItems,"feature-details"]),s.length>0&&this.mapView){this.mapView.popupEnabled=!0;let a={features:s,updateLocationEnabled:!0};await this.mapView.openPopup(a)}}async _handleIdentify(e){let t=this.IdentifyParameters&&new this.IdentifyParameters({geometry:e,tolerance:3,mapExtent:this.mapView?.extent}),i=this._mapImageryLayersId.map(async r=>{let n=this.mapView&&await c(this.mapView,r);if(n?.url&&t)return await this.identify?.identify(n.url,t)}),s=await Promise.all(i),a=[];s.forEach(r=>{r.results.forEach(n=>{let E=Object.keys(n.feature.attributes).map(f=>({fieldName:f,label:f}));n.feature.popupTemplate={title:n.layerName,content:[{type:"fields",fieldInfos:E}]},a.push(n.feature)})}),a.length>0&&this.mapView&&(this.mapView.popupEnabled=!0,await this.mapView.openPopup({features:a,location:e}))}_getCount(){let e=(this._selectedFeatureIndex+1).toString(),t=this._selectedFeature.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",t)}_updateFloorDefinitionExpression(e){let t=`${e?.floorInfo?.floorField} = '${this.floorLevel}'`,i=e.definitionExpression;e.definitionExpression=i&&i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):t,this._floorExpression=t}_getFormElements(){let e=this._selectedLayer;if(e?.floorInfo?.floorField&&this.floorLevel&&e?.formTemplate){let t=this._formElements.find(i=>i.id===e.id);(this._formElements.length===0||!t)&&this._formElements.push({id:e.id,orgElements:e.formTemplate.elements,orgExpressionInfos:e.formTemplate.expressionInfos})}}reduceToConfiguredLayers(e,t){return Object.keys(e).reduce((i,s)=>{let a=this.reportingOptions?this._getLayersConfig(s)?.visible:e[s].supportsAdd;return!t.includes(s)&&a&&i.push(s),i},[])}refreshLists(){setTimeout(()=>{this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh()},50)}async _updateFeatures(){for(let e of this._editableLayerIds){let t=this.mapView&&await u(this.mapView,e);t&&(await this._showMyFeaturesOnly(t),t.layer?.floorInfo?.floorField&&this.floorLevel&&this._updateFloorDefinitionExpression(t.layer))}}async _showMyFeaturesOnly(e){let t=(this.mapView?.map).portalItem.portal?.credential?.userId;if(t&&e){let i=e.layer.editFieldsInfo?.creatorField.toLowerCase();e.filter=this.showMyReportsOnly&&i&&this.FeatureFilter?new this.FeatureFilter({where:i+"='"+t+"'"}):null}}async getLayersToShowInList(){let e=this.mapView&&await v(this.mapView,!0),t=this.mapView&&await m(this.mapView),i=[];t?.forEach(s=>{s?.type==="feature"&&s?.editingEnabled&&s?.capabilities?.operations?.supportsAdd&&(e[s.id].supportsAdd=!0),s?.editingEnabled||i.push(s.id)}),this._editableLayerIds=this.reduceToConfiguredLayers(e,i),this._layerItemsHash=e}async renderFeaturesList(){this._flowItems=["feature-list"];let e={detail:this._editableLayerIds};await this.layerListLoaded(e),await this.setSelectedLayer(this._validLayers[0].id,this._validLayers[0]?.title||""),this.updateSortingOptions(),this.handleSelectedLayersFilter()}_updateShareURL(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this._selectedLayerId?t.searchParams.set("layerid",this._selectedLayerId):t.searchParams.delete("layerid"),this._selectedFeature?.length?t.searchParams.set("oid",this._currentFeatureId):t.searchParams.delete("oid"),this._shareNode.value&&(this._shareNode.value.shareUrl=t.href)}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView?.goTo({center:this.center.split(";").map(Number),zoom:this.level}),this.layerId&&this.objectId){let e=this.mapView&&await c(this.mapView,this.layerId);if(e){let t=this.mapView&&await $([Number(this.objectId)],e,[],!0,this.mapView.spatialReference);t?.length&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems[this._flowItems.length-1]!=="feature-details"?this._flowItems=[...this._flowItems,"feature-details"]:this._flowItems=[...this._flowItems])}}}async handleSelectedLayersFilter(){if(this._selectedLayer){let e=this.layerExpressions?structuredClone(this.layerExpressions.filter(t=>t.id===this._selectedLayerId)):[];this._t9nLayerExpressions!=null&&this.handleLayerExpressionsT9n(e,this._t9nLayerExpressions),this._currentLayerExpressions=e,this.setActiveDefinitionExpressions()}}async handlePrevLayersFilter(){if(this._prevSelectedLayerId){let e=this.mapView&&await c(this.mapView,this._prevSelectedLayerId);e&&this._initDefExpressions&&(e.definitionExpression=this._initDefExpressions[this._prevSelectedLayerId])}}resetFilterList(){this._filterList.value?.forceReset(),this._selectedLayer!==void 0&&this._initDefExpressions&&(this._selectedLayer.definitionExpression=this._initDefExpressions[this._selectedLayerId],this._filterActive=!1)}setActiveDefinitionExpressions(){if(this._selectedLayer===void 0)return;let e=[];if(this._currentLayerExpressions&&this._currentLayerExpressions?.length>0){let t=this._currentLayerExpressions[0];for(let i of t.expressions){let{active:s,definitionExpression:a}=i;s&&a&&e.push(`(${a})`)}this._filterActive=e.length>0,this.updateFilterLayerDefExpression(e,t.operator)}}updateFilterLayerDefExpression(e,t){let i=this._initDefExpressions&&this._initDefExpressions[this._selectedLayerId],s=e?.length>0&&i?`(${e.join(t)}) AND (${i})`:e.length>0?e.join(t):i;this._selectedLayer&&(this._selectedLayer.definitionExpression=s)}setInitExpressions(){if(this._initDefExpressions={},this.mapView==null)return;let e=this.mapView.map;e.allLayers.concat(e.allTables).forEach(t=>{if(t.type==="map-image"&&!this._mapImageryLayersId.includes(t.id)){this._mapImageryLayersId.push(t.id);return}if(t.type!=="feature")return;let i=t;this._initDefExpressions&&(this._initDefExpressions[i.id]=i.definitionExpression||"")})}handleLayerExpressionsT9n(e,t){e?.forEach(i=>{let s=t?.find(a=>a.id===i.id);s!=null&&(i.title=s.title,i.expressions?.forEach(a=>{let r=s.expressions?.find(n=>n.id===a.id);r!=null&&(a.name=r.name)}))})}};L("crowdsource-reporter",_);export{_ as CrowdsourceReporter};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import{o,p as a,q as r,r as d,v as c,w as m}from"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{o,p as a,q as r,r as d,v as c,w as m}from"./CLZ42RFU.js";import{a as l,c as i,d as h,e as u}from"./KZWHC2ST.js";import"./B4HONVWZ.js";var f=".sc-instant-apps-measurement-tool-h .esri-measurement.sc-instant-apps-measurement-tool,.sc-instant-apps-measurement-tool-h .esri-coordinate-conversion.sc-instant-apps-measurement-tool{width:300px}.sc-instant-apps-measurement-tool-h .instant-apps-measurement-tool__hide.sc-instant-apps-measurement-tool{display:none}",v=f,p="instant-apps-measurement-tool",s={base:p,hide:`${p}__hide`},g=class{constructor(e){l(this,e),this.view=void 0,this.measureConfiguration=void 0,this.activeTool=void 0}async componentWillLoad(){await this._initModules()}componentDidLoad(){this._init()}render(){return i(h,{key:"f6bd046c04fd3c17204fd95e4ab5e85cab179671"},i("div",{key:"070603555cb6497ddd67f1f53ebaf89a59bd7c01",class:s.base},i("div",{key:"475bff4347c71401ecb292a74c59aac28b40952f",ref:e=>{e instanceof HTMLElement&&(this._measureElement=e)}}),i("div",{key:"9018f1338b598e9c02e1ea6239ab1ee57c460fa0",class:s.hide,ref:e=>{e instanceof HTMLElement&&(this._coordinateElement=e)}})))}disconnectedCallback(){this._measureWidget?.destroy(),this._coordinateWidget?.destroy()}async _initModules(){let[e,t,n]=await Promise.all([c(),o(),r()]);this.Measurement=e,this.CoordinateConversion=t,this.Conversion=n}_init(){this._initMeasurementWidget(),this._initCoordinateWidget()}_updateToolType(e){this._setActiveTool(e)}async _initMeasurementWidget(){this.view&&this._measureElement&&!this._measureWidget&&(this._measureWidget=await m({view:this.view,container:this._measureElement,...this.measureConfiguration}),this.measureConfiguration.activeToolType&&this._setActiveTool(this.measureConfiguration.activeToolType))}_setActiveTool(e){let t=this.view.type;this._measureWidget.clear(),this._coordinateElement?.classList.add(s.hide),e==="distance"?this._measureWidget.activeTool=t==="2d"?"distance":"direct-line":e==="area"?this._measureWidget.activeTool="area":e==="point"&&this._coordinateElement?.classList?.remove(s.hide)}async _initCoordinateWidget(){let{activeToolType:e,coordinateFormat:t}=this.measureConfiguration;if(this?.view&&this._coordinateElement&&!this._coordinateWidget&&(this._coordinateWidget=await a({view:this.view,storageEnabled:!1,container:this._coordinateElement}),t!=null)){let n=this._coordinateWidget.formats.find(_=>_.name===t);this._coordinateWidget?.conversions?.splice(0,0,await d({format:n}))}e!=null&&this._setActiveTool(e)}get el(){return u(this)}static get watchers(){return{activeTool:["_updateToolType"]}}};g.style=v;export{g as instant_apps_measurement_tool};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import"./B4HONVWZ.js";var o=async(e,l,s)=>({type:"Layout",elements:[{type:"Section",elements:[{labelKey:`${e}.fields.followers.groupAccess.label`,scope:"/properties/_followers/properties/groupAccess",type:"Control",options:{control:"hub-field-input-tile-select",layout:"horizontal",helperText:{labelKey:`${e}.fields.followers.groupAccess.helperText`},labels:[`{{${e}.fields.followers.groupAccess.private.label:translate}}`,`{{${e}.fields.followers.groupAccess.org.label:translate}}`,`{{${e}.fields.followers.groupAccess.public.label:translate}}`],descriptions:[`{{${e}.fields.followers.groupAccess.private.description:translate}}`,`{{${e}.fields.followers.groupAccess.org.description:translate}}`,`{{${e}.fields.followers.groupAccess.public.description:translate}}`],icons:["users","organization","globe"],styles:{"max-width":"45rem"}}},{labelKey:`${e}.fields.followers.showFollowAction.label`,scope:"/properties/_followers/properties/showFollowAction",type:"Control",options:{control:"hub-field-input-switch",layout:"inline-space-between",helperText:{labelKey:`${e}.fields.followers.showFollowAction.helperText`}}},{labelKey:`${e}.fields.followers.discussable.label`,scope:"/properties/_followers/properties/isDiscussable",type:"Control",options:{control:"hub-field-input-tile-select",layout:"horizontal",labels:[`{{${e}.fields.followers.discussable.enabled.label:translate}}`,`{{${e}.fields.followers.discussable.disabled.label:translate}}`],descriptions:[`{{${e}.fields.followers.discussable.enabled.description:translate}}`,`{{${e}.fields.followers.discussable.disabled.description:translate}}`],icons:["speech-bubbles","circle-disallowed"],type:"radio",styles:{"max-width":"45rem"}}}]}]});export{o as buildUiSchema};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import{a as h}from"./RE44UO66.js";import{b as m}from"./IUZA5X57.js";import{a as U}from"./65N7XAWB.js";import{c as t,e as l,f as d}from"./GKMXDGZF.js";import{a as N}from"./EOQESQYS.js";import{c as A}from"./JUSJWXDQ.js";function w(n){return n.httpMethod="POST",m("/channels",n)}function $(n){return n.httpMethod="GET",m(`/channels/${n.channelId}`,n)}function B(n){return n.httpMethod="PATCH",m(`/channels/${n.channelId}`,n)}function H(n){return n.httpMethod="DELETE",m(`/channels/${n.channelId}`,n)}function T(n){return n.role==="org_admin"}function C(n={},e){return n.orgId===e}function f(n,e){return T(n)&&C(n,e)}function u(n={},e){var r;return!!(!((r=n.privileges)===null||r===void 0)&&r.includes(e))}function p(n={},e){return e.every(r=>u(n,r))}function y(n={},e){return f(n,e)||C(n,e)&&p(n,["portal:admin:viewItems","portal:admin:updateItems"])}function D(n={},e){return f(n,e)||C(n,e)&&p(n,["portal:admin:viewItems","portal:admin:deleteItems"])}function M(n){let{channelAclDefinition:e}=n,r=U(n,["channelAclDefinition"]);return Object.assign(Object.assign({},r),{channelAcl:e})}var o;(function(n){n.READ_POSTS="readPosts",n.WRITE_POSTS="writePosts",n.MODERATE_CHANNEL="moderateChannel",n.DELETE_CHANNEL="deleteChannel",n.IS_MODERATOR="isModerator",n.IS_MANAGER="isManager",n.IS_OWNER="isOwner"})(o||(o={}));var E={UPDATE_OWNERS:[t.OWNER],UPDATE_MANAGERS:[t.OWNER,t.MANAGE],UPDATE_MODERATORS:[t.OWNER,t.MANAGE],UPDATE_ORGS:[t.OWNER,t.MANAGE],UPDATE_GROUPS:[t.OWNER,t.MANAGE],UPDATE_USERS:[t.OWNER,t.MANAGE],UPDATE_AUTHENTICATED_USERS:[t.OWNER,t.MANAGE],UPDATE_ANONYMOUS_USERS:[t.OWNER,t.MANAGE],UPDATE_POST_REPLIES:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_POST_REACTIONS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_POST_AS_ANONYMOUS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_ALLOWED_REACTIONS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_DEFAULT_POST_STATUS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_BLOCKED_WORDS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_CHANNEL_NAME:[t.OWNER,t.MANAGE],UPDATE_SOFT_DELETE_SETTING:[t.OWNER,t.MANAGE]},R=class{constructor(e){if(this.ALLOWED_GROUP_MEMBER_TYPES=["owner","admin","member"],e.channelAcl===void 0)throw new Error("channel.channelAcl is required for ChannelPermission checks");this.existingChannel=e,this.isChannelAclEmpty=e.channelAcl.length===0,this.permissionsByCategory={},e.channelAcl.forEach(r=>{var i;let{category:s}=r;!((i=this.permissionsByCategory[s])===null||i===void 0)&&i.push(r)||(this.permissionsByCategory[s]=[r])})}canPostToChannel(e){return this.canAnyUser(o.WRITE_POSTS)?!0:this.isUserUnAuthenticated(e)?!1:this.canAnyAuthenticatedUser(o.WRITE_POSTS)||this.canSomeUser(o.WRITE_POSTS,e)||this.canSomeUserGroup(o.WRITE_POSTS,e)||this.canSomeUserOrg(o.WRITE_POSTS,e)}canCreateChannel(e){return this.isUserUnAuthenticated(e)||this.isChannelAclEmpty?!1:this.userCanAddAnonymousToAcl(e)&&this.userCanAddUnauthenticatedToAcl(e)&&this.userCanAddAllGroupsToAcl(e)&&this.userCanAddAllOrgsToAcl(e)&&this.userCanAddUsersToAcl(e)}canModerateChannel(e){return this.isUserUnAuthenticated(e)?!1:this.canSomeUser(o.MODERATE_CHANNEL,e)||this.canSomeUserGroup(o.MODERATE_CHANNEL,e)||this.canSomeUserOrg(o.MODERATE_CHANNEL,e)}canReadChannel(e){return this.canAnyUser(o.READ_POSTS)?!0:this.isUserUnAuthenticated(e)?!1:this.canAnyAuthenticatedUser(o.READ_POSTS)||this.canSomeUser(o.READ_POSTS,e)||this.canSomeUserGroup(o.READ_POSTS,e)||this.canSomeUserOrg(o.READ_POSTS,e)}canDeleteChannel(e){return this.isUserUnAuthenticated(e)?!1:this.canSomeUser(o.DELETE_CHANNEL,e)||this.canSomeUserGroup(o.DELETE_CHANNEL,e)||this.canSomeUserOrg(o.DELETE_CHANNEL,e)}canUpdateProperties(e,r={}){if(Object.keys(r).length===0)return!0;let i=this.determineUserRole(e),s=M(r);return!(this.isChanged(s.allowReply,this.existingChannel.allowReply)&&!E.UPDATE_POST_REPLIES.includes(i)||this.isChanged(s.allowReaction,this.existingChannel.allowReaction)&&!E.UPDATE_POST_REACTIONS.includes(i)||this.isChanged(s.allowAsAnonymous,this.existingChannel.allowAsAnonymous)&&!E.UPDATE_POST_AS_ANONYMOUS.includes(i)||this.isStringArrayChanged(s.allowedReactions,this.existingChannel.allowedReactions)&&!E.UPDATE_ALLOWED_REACTIONS.includes(i)||this.isChanged(s.defaultPostStatus,this.existingChannel.defaultPostStatus)&&!E.UPDATE_DEFAULT_POST_STATUS.includes(i)||this.isStringArrayChanged(s.blockWords,this.existingChannel.blockWords)&&!E.UPDATE_BLOCKED_WORDS.includes(i)||this.isChanged(s.name,this.existingChannel.name)&&!E.UPDATE_CHANNEL_NAME.includes(i)||this.isChanged(s.softDelete,this.existingChannel.softDelete)&&!E.UPDATE_SOFT_DELETE_SETTING.includes(i)||this.isRoleChanged(t.OWNER,s.channelAcl)&&!E.UPDATE_OWNERS.includes(i)||this.isRoleChanged(t.MANAGE,s.channelAcl)&&!E.UPDATE_MANAGERS.includes(i)||this.isRoleChanged(t.MODERATE,s.channelAcl)&&!E.UPDATE_MODERATORS.includes(i)||this.isCategoryChanged(l.ORG,s.channelAcl)&&!E.UPDATE_ORGS.includes(i)||this.isCategoryChanged(l.GROUP,s.channelAcl)&&!E.UPDATE_GROUPS.includes(i)||this.isCategoryChanged(l.USER,s.channelAcl)&&!E.UPDATE_USERS.includes(i)||this.isCategoryChanged(l.AUTHENTICATED_USER,s.channelAcl)&&!E.UPDATE_AUTHENTICATED_USERS.includes(i)||this.isCategoryChanged(l.ANONYMOUS_USER,s.channelAcl)&&!E.UPDATE_ANONYMOUS_USERS.includes(i))}isChanged(e,r){return e!==void 0&&e!==r}isStringArrayChanged(e,r){let i=e??[],s=r??[];return i.filter(a=>!s.includes(a)).length!==0||s.filter(a=>!i.includes(a)).length!==0}isRoleChanged(e,r){if(!r)return!1;let i=this.existingChannel.channelAcl.filter(a=>a.role===e).map(a=>`${a.category}_${a.subCategory}_${a.key}_${e}`),s=r.filter(a=>a.role===e).map(a=>`${a.category}_${a.subCategory}_${a.key}_${e}`);return this.isStringArrayChanged(i,s)}isCategoryChanged(e,r){var i;if(!r)return!1;let s=((i=this.permissionsByCategory[e])!==null&&i!==void 0?i:[]).map(c=>`${e}_${c.subCategory}_${c.key}_${c.role}`),a=r.filter(c=>c.category===e).map(c=>`${e}_${c.subCategory}_${c.key}_${c.role}`);return this.isStringArrayChanged(s,a)}canAnyUser(e){var r;let i=(r=this.permissionsByCategory[l.ANONYMOUS_USER])===null||r===void 0?void 0:r[0].role;return S(e).includes(i)}canAnyAuthenticatedUser(e){var r;let i=(r=this.permissionsByCategory[l.AUTHENTICATED_USER])===null||r===void 0?void 0:r[0].role;return S(e).includes(i)}canSomeUser(e,r){var i;let s=(i=this.permissionsByCategory[l.USER])!==null&&i!==void 0?i:[],a=r.username;return s.some(c=>{let{role:O,key:G}=c;return G===a&&S(e).includes(O)})}canSomeUserGroup(e,r){var i;let s=(i=this.permissionsByCategory[l.GROUP])!==null&&i!==void 0?i:[],a=this.mapUserGroupsById(r.groups);return s.some(c=>{let O=a[c.key];if(e===o.READ_POSTS){if(!O)return!1}else if(!O||!P(O))return!1;return x(c,O)&&S(e).includes(c.role)})}canSomeUserOrg(e,r){var i;return((i=this.permissionsByCategory[l.ORG])!==null&&i!==void 0?i:[]).some(a=>a.key!==r.orgId?!1:W(a,r)&&S(e).includes(a.role))}userCanAddAnonymousToAcl(e){return this.permissionsByCategory[l.ANONYMOUS_USER]?T(e)||u(e,"portal:admin:shareToPublic")||u(e,"portal:user:shareToPublic"):!0}userCanAddUnauthenticatedToAcl(e){return this.permissionsByCategory[l.AUTHENTICATED_USER]?T(e)||u(e,"portal:admin:shareToPublic")||u(e,"portal:user:shareToPublic"):!0}userCanAddAllGroupsToAcl(e){let r=this.permissionsByCategory[l.GROUP],i=this.mapUserGroupsById(e.groups);return r?r.every(s=>{let a=i[s.key];return a&&this.isMemberTypeAuthorized(a)&&P(a)}):!0}userCanAddAllOrgsToAcl(e){let r=this.permissionsByCategory[l.ORG];return r?(T(e)||u(e,"portal:admin:shareToOrg")||u(e,"portal:user:shareToOrg"))&&this.isEveryPermissionForUserOrg(e.orgId,r):!0}isEveryPermissionForUserOrg(e,r){return r.every(i=>{let{key:s}=i;return e===s})}userCanAddUsersToAcl(e){return!this.permissionsByCategory[l.USER]}isUserUnAuthenticated(e){return e.username===null||e.username===void 0}mapUserGroupsById(e){return e.reduce((r,i)=>(r[i.id]=i,r),{})}isMemberTypeAuthorized(e){let{userMembership:{memberType:r}}=e;return this.ALLOWED_GROUP_MEMBER_TYPES.includes(r)}determineUserRole(e){return this.isOwner(e)?t.OWNER:this.isManager(e)?t.MANAGE:this.isModerator(e)?t.MODERATE:t.READ}isOwner(e){return this.canSomeUser(o.IS_OWNER,e)||this.canSomeUserGroup(o.IS_OWNER,e)||this.canSomeUserOrg(o.IS_OWNER,e)}isManager(e){return this.canSomeUser(o.IS_MANAGER,e)||this.canSomeUserGroup(o.IS_MANAGER,e)||this.canSomeUserOrg(o.IS_MANAGER,e)}isModerator(e){return this.canSomeUser(o.IS_MODERATOR,e)||this.canSomeUserGroup(o.IS_MODERATOR,e)||this.canSomeUserOrg(o.IS_MODERATOR,e)}};function P(n){let{typeKeywords:e=[]}=n;return!e.includes(N)}function x(n,e){return n.category!==l.GROUP||e.userMembership.memberType==="none"?!1:e.userMembership.memberType==="owner"||e.userMembership.memberType==="admin"||n.subCategory===d.MEMBER}function W(n,e){return n.category===l.ORG&&(n.subCategory===d.MEMBER||n.subCategory===d.ADMIN&&T(e))}function S(n){return n===o.WRITE_POSTS?[t.WRITE,t.READWRITE,t.MODERATE,t.MANAGE,t.OWNER]:n===o.MODERATE_CHANNEL?[t.MODERATE,t.MANAGE,t.OWNER]:n===o.DELETE_CHANNEL?[t.OWNER]:n===o.IS_MODERATOR?[t.MODERATE]:n===o.IS_MANAGER?[t.MANAGE]:n===o.IS_OWNER?[t.OWNER]:[t.READ,t.READWRITE,t.MODERATE,t.MANAGE,t.OWNER]}function g(n,e={}){return D(e,n.orgId)?!0:new R(n).canDeleteChannel(e)}function _(n,e={},r){if(y(e,n.orgId))return!0;let i=new R(n);return i.canModerateChannel(e)&&i.canUpdateProperties(e,r)}var v={[t.READ]:A.channelRead,[t.WRITE]:A.channelWrite,[t.READWRITE]:A.channelReadWrite,[t.MODERATE]:A.channelModerate,[t.MANAGE]:A.channelManage,[t.OWNER]:A.channelOwner},I=n=>{let e=v[n.role],r;return n.category===l.ANONYMOUS_USER?r=h.anonymous:n.category===l.AUTHENTICATED_USER?r=h.authenticated:n.category===l.GROUP?r=n.subCategory===d.ADMIN?h.groupAdmin:h.group:n.category===l.ORG?r=n.subCategory===d.ADMIN?h.orgAdmin:h.org:r=h.user,{permission:e,collaborationId:n.key||null,collaborationType:r,id:n.id||null}};function de(n,e){return{access:n.access,id:n.id,name:n.name,createdDate:new Date(n.createdAt),createdDateSource:"channel.createdAt",updatedDate:new Date(n.updatedAt),updatedDateSource:"channel.updatedAt",type:"Channel",source:n.creator,links:{thumbnail:null,self:null,siteRelative:null,siteRelativeEntityType:null,workspaceRelative:null,layoutRelative:null},blockWords:n.blockWords,permissions:n.channelAcl.map(r=>I(r)),allowAsAnonymous:n.allowAsAnonymous,canEdit:_(n,e,n),canDelete:g(n,e),orgId:n.orgId,owner:n.creator,channel:n,typeKeywords:[],thumbnail:void 0,view:void 0,description:void 0,location:void 0,tags:[]}}export{w as a,$ as b,B as c,H as d,de as e};
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{a as h}from"./ETSCX6UD.js";import{b as m}from"./ZGO54R7R.js";import{a as U}from"./QOPQPJ6E.js";import{c as t,e as l,f as d}from"./XA34OFHO.js";import{a as N}from"./TQ24PIOH.js";import{c as A}from"./UHBAUGQ4.js";function w(n){return n.httpMethod="POST",m("/channels",n)}function $(n){return n.httpMethod="GET",m(`/channels/${n.channelId}`,n)}function B(n){return n.httpMethod="PATCH",m(`/channels/${n.channelId}`,n)}function H(n){return n.httpMethod="DELETE",m(`/channels/${n.channelId}`,n)}function T(n){return n.role==="org_admin"}function C(n={},e){return n.orgId===e}function f(n,e){return T(n)&&C(n,e)}function u(n={},e){var r;return!!(!((r=n.privileges)===null||r===void 0)&&r.includes(e))}function p(n={},e){return e.every(r=>u(n,r))}function y(n={},e){return f(n,e)||C(n,e)&&p(n,["portal:admin:viewItems","portal:admin:updateItems"])}function D(n={},e){return f(n,e)||C(n,e)&&p(n,["portal:admin:viewItems","portal:admin:deleteItems"])}function M(n){let{channelAclDefinition:e}=n,r=U(n,["channelAclDefinition"]);return Object.assign(Object.assign({},r),{channelAcl:e})}var o;(function(n){n.READ_POSTS="readPosts",n.WRITE_POSTS="writePosts",n.MODERATE_CHANNEL="moderateChannel",n.DELETE_CHANNEL="deleteChannel",n.IS_MODERATOR="isModerator",n.IS_MANAGER="isManager",n.IS_OWNER="isOwner"})(o||(o={}));var E={UPDATE_OWNERS:[t.OWNER],UPDATE_MANAGERS:[t.OWNER,t.MANAGE],UPDATE_MODERATORS:[t.OWNER,t.MANAGE],UPDATE_ORGS:[t.OWNER,t.MANAGE],UPDATE_GROUPS:[t.OWNER,t.MANAGE],UPDATE_USERS:[t.OWNER,t.MANAGE],UPDATE_AUTHENTICATED_USERS:[t.OWNER,t.MANAGE],UPDATE_ANONYMOUS_USERS:[t.OWNER,t.MANAGE],UPDATE_POST_REPLIES:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_POST_REACTIONS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_POST_AS_ANONYMOUS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_ALLOWED_REACTIONS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_DEFAULT_POST_STATUS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_BLOCKED_WORDS:[t.OWNER,t.MANAGE,t.MODERATE],UPDATE_CHANNEL_NAME:[t.OWNER,t.MANAGE],UPDATE_SOFT_DELETE_SETTING:[t.OWNER,t.MANAGE]},R=class{constructor(e){if(this.ALLOWED_GROUP_MEMBER_TYPES=["owner","admin","member"],e.channelAcl===void 0)throw new Error("channel.channelAcl is required for ChannelPermission checks");this.existingChannel=e,this.isChannelAclEmpty=e.channelAcl.length===0,this.permissionsByCategory={},e.channelAcl.forEach(r=>{var i;let{category:s}=r;!((i=this.permissionsByCategory[s])===null||i===void 0)&&i.push(r)||(this.permissionsByCategory[s]=[r])})}canPostToChannel(e){return this.canAnyUser(o.WRITE_POSTS)?!0:this.isUserUnAuthenticated(e)?!1:this.canAnyAuthenticatedUser(o.WRITE_POSTS)||this.canSomeUser(o.WRITE_POSTS,e)||this.canSomeUserGroup(o.WRITE_POSTS,e)||this.canSomeUserOrg(o.WRITE_POSTS,e)}canCreateChannel(e){return this.isUserUnAuthenticated(e)||this.isChannelAclEmpty?!1:this.userCanAddAnonymousToAcl(e)&&this.userCanAddUnauthenticatedToAcl(e)&&this.userCanAddAllGroupsToAcl(e)&&this.userCanAddAllOrgsToAcl(e)&&this.userCanAddUsersToAcl(e)}canModerateChannel(e){return this.isUserUnAuthenticated(e)?!1:this.canSomeUser(o.MODERATE_CHANNEL,e)||this.canSomeUserGroup(o.MODERATE_CHANNEL,e)||this.canSomeUserOrg(o.MODERATE_CHANNEL,e)}canReadChannel(e){return this.canAnyUser(o.READ_POSTS)?!0:this.isUserUnAuthenticated(e)?!1:this.canAnyAuthenticatedUser(o.READ_POSTS)||this.canSomeUser(o.READ_POSTS,e)||this.canSomeUserGroup(o.READ_POSTS,e)||this.canSomeUserOrg(o.READ_POSTS,e)}canDeleteChannel(e){return this.isUserUnAuthenticated(e)?!1:this.canSomeUser(o.DELETE_CHANNEL,e)||this.canSomeUserGroup(o.DELETE_CHANNEL,e)||this.canSomeUserOrg(o.DELETE_CHANNEL,e)}canUpdateProperties(e,r={}){if(Object.keys(r).length===0)return!0;let i=this.determineUserRole(e),s=M(r);return!(this.isChanged(s.allowReply,this.existingChannel.allowReply)&&!E.UPDATE_POST_REPLIES.includes(i)||this.isChanged(s.allowReaction,this.existingChannel.allowReaction)&&!E.UPDATE_POST_REACTIONS.includes(i)||this.isChanged(s.allowAsAnonymous,this.existingChannel.allowAsAnonymous)&&!E.UPDATE_POST_AS_ANONYMOUS.includes(i)||this.isStringArrayChanged(s.allowedReactions,this.existingChannel.allowedReactions)&&!E.UPDATE_ALLOWED_REACTIONS.includes(i)||this.isChanged(s.defaultPostStatus,this.existingChannel.defaultPostStatus)&&!E.UPDATE_DEFAULT_POST_STATUS.includes(i)||this.isStringArrayChanged(s.blockWords,this.existingChannel.blockWords)&&!E.UPDATE_BLOCKED_WORDS.includes(i)||this.isChanged(s.name,this.existingChannel.name)&&!E.UPDATE_CHANNEL_NAME.includes(i)||this.isChanged(s.softDelete,this.existingChannel.softDelete)&&!E.UPDATE_SOFT_DELETE_SETTING.includes(i)||this.isRoleChanged(t.OWNER,s.channelAcl)&&!E.UPDATE_OWNERS.includes(i)||this.isRoleChanged(t.MANAGE,s.channelAcl)&&!E.UPDATE_MANAGERS.includes(i)||this.isRoleChanged(t.MODERATE,s.channelAcl)&&!E.UPDATE_MODERATORS.includes(i)||this.isCategoryChanged(l.ORG,s.channelAcl)&&!E.UPDATE_ORGS.includes(i)||this.isCategoryChanged(l.GROUP,s.channelAcl)&&!E.UPDATE_GROUPS.includes(i)||this.isCategoryChanged(l.USER,s.channelAcl)&&!E.UPDATE_USERS.includes(i)||this.isCategoryChanged(l.AUTHENTICATED_USER,s.channelAcl)&&!E.UPDATE_AUTHENTICATED_USERS.includes(i)||this.isCategoryChanged(l.ANONYMOUS_USER,s.channelAcl)&&!E.UPDATE_ANONYMOUS_USERS.includes(i))}isChanged(e,r){return e!==void 0&&e!==r}isStringArrayChanged(e,r){let i=e??[],s=r??[];return i.filter(a=>!s.includes(a)).length!==0||s.filter(a=>!i.includes(a)).length!==0}isRoleChanged(e,r){if(!r)return!1;let i=this.existingChannel.channelAcl.filter(a=>a.role===e).map(a=>`${a.category}_${a.subCategory}_${a.key}_${e}`),s=r.filter(a=>a.role===e).map(a=>`${a.category}_${a.subCategory}_${a.key}_${e}`);return this.isStringArrayChanged(i,s)}isCategoryChanged(e,r){var i;if(!r)return!1;let s=((i=this.permissionsByCategory[e])!==null&&i!==void 0?i:[]).map(c=>`${e}_${c.subCategory}_${c.key}_${c.role}`),a=r.filter(c=>c.category===e).map(c=>`${e}_${c.subCategory}_${c.key}_${c.role}`);return this.isStringArrayChanged(s,a)}canAnyUser(e){var r;let i=(r=this.permissionsByCategory[l.ANONYMOUS_USER])===null||r===void 0?void 0:r[0].role;return S(e).includes(i)}canAnyAuthenticatedUser(e){var r;let i=(r=this.permissionsByCategory[l.AUTHENTICATED_USER])===null||r===void 0?void 0:r[0].role;return S(e).includes(i)}canSomeUser(e,r){var i;let s=(i=this.permissionsByCategory[l.USER])!==null&&i!==void 0?i:[],a=r.username;return s.some(c=>{let{role:O,key:G}=c;return G===a&&S(e).includes(O)})}canSomeUserGroup(e,r){var i;let s=(i=this.permissionsByCategory[l.GROUP])!==null&&i!==void 0?i:[],a=this.mapUserGroupsById(r.groups);return s.some(c=>{let O=a[c.key];if(e===o.READ_POSTS){if(!O)return!1}else if(!O||!P(O))return!1;return x(c,O)&&S(e).includes(c.role)})}canSomeUserOrg(e,r){var i;return((i=this.permissionsByCategory[l.ORG])!==null&&i!==void 0?i:[]).some(a=>a.key!==r.orgId?!1:W(a,r)&&S(e).includes(a.role))}userCanAddAnonymousToAcl(e){return this.permissionsByCategory[l.ANONYMOUS_USER]?T(e)||u(e,"portal:admin:shareToPublic")||u(e,"portal:user:shareToPublic"):!0}userCanAddUnauthenticatedToAcl(e){return this.permissionsByCategory[l.AUTHENTICATED_USER]?T(e)||u(e,"portal:admin:shareToPublic")||u(e,"portal:user:shareToPublic"):!0}userCanAddAllGroupsToAcl(e){let r=this.permissionsByCategory[l.GROUP],i=this.mapUserGroupsById(e.groups);return r?r.every(s=>{let a=i[s.key];return a&&this.isMemberTypeAuthorized(a)&&P(a)}):!0}userCanAddAllOrgsToAcl(e){let r=this.permissionsByCategory[l.ORG];return r?(T(e)||u(e,"portal:admin:shareToOrg")||u(e,"portal:user:shareToOrg"))&&this.isEveryPermissionForUserOrg(e.orgId,r):!0}isEveryPermissionForUserOrg(e,r){return r.every(i=>{let{key:s}=i;return e===s})}userCanAddUsersToAcl(e){return!this.permissionsByCategory[l.USER]}isUserUnAuthenticated(e){return e.username===null||e.username===void 0}mapUserGroupsById(e){return e.reduce((r,i)=>(r[i.id]=i,r),{})}isMemberTypeAuthorized(e){let{userMembership:{memberType:r}}=e;return this.ALLOWED_GROUP_MEMBER_TYPES.includes(r)}determineUserRole(e){return this.isOwner(e)?t.OWNER:this.isManager(e)?t.MANAGE:this.isModerator(e)?t.MODERATE:t.READ}isOwner(e){return this.canSomeUser(o.IS_OWNER,e)||this.canSomeUserGroup(o.IS_OWNER,e)||this.canSomeUserOrg(o.IS_OWNER,e)}isManager(e){return this.canSomeUser(o.IS_MANAGER,e)||this.canSomeUserGroup(o.IS_MANAGER,e)||this.canSomeUserOrg(o.IS_MANAGER,e)}isModerator(e){return this.canSomeUser(o.IS_MODERATOR,e)||this.canSomeUserGroup(o.IS_MODERATOR,e)||this.canSomeUserOrg(o.IS_MODERATOR,e)}};function P(n){let{typeKeywords:e=[]}=n;return!e.includes(N)}function x(n,e){return n.category!==l.GROUP||e.userMembership.memberType==="none"?!1:e.userMembership.memberType==="owner"||e.userMembership.memberType==="admin"||n.subCategory===d.MEMBER}function W(n,e){return n.category===l.ORG&&(n.subCategory===d.MEMBER||n.subCategory===d.ADMIN&&T(e))}function S(n){return n===o.WRITE_POSTS?[t.WRITE,t.READWRITE,t.MODERATE,t.MANAGE,t.OWNER]:n===o.MODERATE_CHANNEL?[t.MODERATE,t.MANAGE,t.OWNER]:n===o.DELETE_CHANNEL?[t.OWNER]:n===o.IS_MODERATOR?[t.MODERATE]:n===o.IS_MANAGER?[t.MANAGE]:n===o.IS_OWNER?[t.OWNER]:[t.READ,t.READWRITE,t.MODERATE,t.MANAGE,t.OWNER]}function g(n,e={}){return D(e,n.orgId)?!0:new R(n).canDeleteChannel(e)}function _(n,e={},r){if(y(e,n.orgId))return!0;let i=new R(n);return i.canModerateChannel(e)&&i.canUpdateProperties(e,r)}var v={[t.READ]:A.channelRead,[t.WRITE]:A.channelWrite,[t.READWRITE]:A.channelReadWrite,[t.MODERATE]:A.channelModerate,[t.MANAGE]:A.channelManage,[t.OWNER]:A.channelOwner},I=n=>{let e=v[n.role],r;return n.category===l.ANONYMOUS_USER?r=h.anonymous:n.category===l.AUTHENTICATED_USER?r=h.authenticated:n.category===l.GROUP?r=n.subCategory===d.ADMIN?h.groupAdmin:h.group:n.category===l.ORG?r=n.subCategory===d.ADMIN?h.orgAdmin:h.org:r=h.user,{permission:e,collaborationId:n.key||null,collaborationType:r,id:n.id||null}};function de(n,e){return{access:n.access,id:n.id,name:n.name,createdDate:new Date(n.createdAt),createdDateSource:"channel.createdAt",updatedDate:new Date(n.updatedAt),updatedDateSource:"channel.updatedAt",type:"Channel",source:n.creator,links:{thumbnail:null,self:null,siteRelative:null,siteRelativeEntityType:null,workspaceRelative:null,layoutRelative:null},blockWords:n.blockWords,permissions:n.channelAcl.map(r=>I(r)),allowAsAnonymous:n.allowAsAnonymous,canEdit:_(n,e,n),canDelete:g(n,e),orgId:n.orgId,owner:n.creator,channel:n,typeKeywords:[],thumbnail:void 0,view:void 0,description:void 0,location:void 0,tags:[]}}export{w as a,$ as b,B as c,H as d,de as e};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
4
|
function L(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]]);return t}function C(r){return Object.keys(r).some(e=>{let t=r[e];if(!t)return!1;switch(t&&t.toParam&&(t=t.toParam()),t.constructor.name){case"Array":return!1;case"Object":return!1;case"Date":return!1;case"Function":return!1;case"Boolean":return!1;case"String":return!1;case"Number":return!1;default:return!0}})}function N(r){let e={};return Object.keys(r).forEach(t=>{var n,o;let s=r[t];if(s&&s.toParam&&(s=s.toParam()),!s&&s!==0&&typeof s!="boolean"&&typeof s!="string")return;let i=s.constructor.name,a;switch(i){case"Array":let u=(o=(n=s[0])===null||n===void 0?void 0:n.constructor)===null||o===void 0?void 0:o.name;a=u==="Array"?s:u==="Object"?JSON.stringify(s):s.join(",");break;case"Object":a=JSON.stringify(s);break;case"Date":a=s.valueOf();break;case"Function":a=null;break;case"Boolean":a=s+"";break;default:a=s;break}(a||a===0||typeof a=="string"||Array.isArray(a))&&(e[t]=a)}),e}function J(r,e){return Array.isArray(e)&&e[0]&&Array.isArray(e[0])?e.map(t=>J(r,t)).join("&"):encodeURIComponent(r)+"="+encodeURIComponent(e)}function O(r){let e=N(r);return Object.keys(e).map(t=>J(t,e[t])).join("&")}var K=globalThis.FormData,me=globalThis.File,ge=globalThis.Blob;function W(r,e){let t=C(r)||e,n=N(r);if(t){let o=new K;return Object.keys(n).forEach(s=>{if(typeof Blob<"u"&&n[s]instanceof Blob){let i=n.fileName||n[s].name||s;o.append(s,n[s],i)}else o.append(s,n[s])}),o}else return O(r)}var b=class extends Error{constructor(e,t,n,o,s){super(e);let i=new.target.prototype;Object.setPrototypeOf(this,i),e=e||"UNKNOWN_ERROR",t=t||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message=t==="UNKNOWN_ERROR_CODE"?e:`${t}: ${e}`,this.originalMessage=e,this.code=t,this.response=n,this.url=o,this.options=s}};function V(r){console&&console.warn&&console.warn.apply(console,[r])}function Q(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}var q="@esri/arcgis-rest-js";function ie(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}var R=class extends b{constructor(e="AUTHENTICATION_ERROR",t="AUTHENTICATION_ERROR_CODE",n,o,s){super(e,t,n,o,s),this.name="ArcGISAuthError",this.message=t==="AUTHENTICATION_ERROR_CODE"?e:`${t}: ${e}`;let i=new.target.prototype;Object.setPrototypeOf(this,i)}retry(e,t=1){let n=0,o=(s,i)=>{n=n+1,e(this.url,this.options).then(a=>{let u=Object.assign(Object.assign({},this.options),{authentication:a});return X(this.url,u)}).then(a=>{s(a)}).catch(a=>{a.name==="ArcGISAuthError"&&n<t?o(s,i):a.name===this.name&&a.message===this.message&&n>=t?i(this):i(a)})};return new Promise((s,i)=>{o(s,i)})}};function ae(r,e,t,n,o){if(r.code>=400){let{message:s,code:i}=r;throw new b(s,i,r,e,n)}if(r.error){let{message:s,code:i,messageCode:a}=r.error,u=a||i||"UNKNOWN_ERROR_CODE";throw i===498||i===499?o||new R(s,u,r,e,n):new b(s,u,r,e,n)}if(r.status==="failed"||r.status==="failure"){let s,i="UNKNOWN_ERROR_CODE";try{s=JSON.parse(r.statusMessage).message,i=JSON.parse(r.statusMessage).code}catch{s=r.statusMessage||r.message}throw new b(s,i,r,e,n)}return r}function X(r,e){let t=ie(),n=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},t),e),{params:Object.assign(Object.assign({},t.params),e.params),headers:Object.assign(Object.assign({},t.headers),e.headers)}),{httpMethod:o,rawResponse:s}=n,i=Object.assign({f:"json"},n.params),a=null,u={method:o,signal:n.signal,credentials:n.credentials||"same-origin"};n.headers&&n.headers["X-Esri-Auth-Client-Id"]&&r.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let g;if(typeof n.authentication=="string"){let c=n.authentication;g={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(c)},!n.authentication.startsWith("AAPK")&&!n.authentication.startsWith("AATK")&&!n.suppressWarnings&&!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING&&(V("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else g=n.authentication;let d=r;return(g?g.getToken(r).catch(c=>(c.url=r,c.options=n,a=c,Promise.resolve(""))):Promise.resolve("")).then(c=>{c.length&&(i.token=c),g&&g.getDomainCredentials&&(u.credentials=g.getDomainCredentials(r));let h={};if(u.method==="GET"){i.token&&n.hideToken&&typeof window>"u"&&(h["X-Esri-Authorization"]=`Bearer ${i.token}`,delete i.token);let f=O(i)===""?r:r+"?"+O(i);n.maxUrlLength&&f.length>n.maxUrlLength||!n.maxUrlLength&&f.length>2e3||i.token&&n.hideToken?(u.method="POST",c.length&&n.hideToken&&(i.token=c,delete h["X-Esri-Authorization"])):r=f}let E=new RegExp("/items/.+/updateResources").test(r);return u.method==="POST"&&(u.body=W(i,E)),u.headers=Object.assign(Object.assign({},h),n.headers),(typeof window>"u"||window&&typeof window.document>"u")&&!u.headers.referer&&(u.headers.referer=q),!C(i)&&!E&&(u.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(r,u):Q().then(({fetch:l})=>l(r,u))}).then(c=>{if(!c.ok)return c.json().then(h=>{let{status:E,statusText:l}=c,{message:f,details:T}=h.error,w=`${f}. ${T?T.join(" "):""}`.trim();throw new b(w,`HTTP ${E} ${l}`,h,r,n)}).catch(h=>{if(h.name==="ArcGISRequestError")throw h;let{status:E,statusText:l}=c;throw new b(l,`HTTP ${E}`,c,r,n)});if(s)return c;switch(i.f){case"json":return c.json();case"geojson":return c.json();case"html":return c.text();case"text":return c.text();default:return c.blob()}}).then(c=>{if((i.f==="json"||i.f==="geojson")&&!s){let h=ae(c,d,i,n,a);if(a){let E=r.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];n.authentication.federatedServers[E]={token:[],expires:new Date(Date.now()+86400*1e3)},a=null}return h}else return c})}function p(r,e={params:{f:"json"}}){let{request:t}=e,n=L(e,["request"]);return t?t(r,n):X(r,n).catch(o=>o instanceof R&&e.authentication&&typeof e.authentication!="string"&&e.authentication.canRefresh&&e.authentication.refreshCredentials?o.retry(()=>e.authentication.refreshCredentials(),1):Promise.reject(o))}function ce(r){let[e,t]=r.split("=");return{key:decodeURIComponent(e),value:decodeURIComponent(t)}}function Y(r){return!r||r.length<=0?{}:r.replace(/^#/,"").replace(/^\?/,"").split("&").reduce((e,t)=>{let{key:n,value:o}=ce(t);return e[n]=o,e},{})}var B=5*60*1e3;function v(r,e){let t=e;return t.rawResponse=!1,p(r,t).then(n=>{if("token"in n&&"expires"in n)return{token:n.token,username:e.params.username,expires:new Date(n.expires)};let o={token:n.access_token,username:n.username,expires:new Date(Date.now()+n.expires_in*1e3-B),ssl:n.ssl===!0};return n.refresh_token&&(o.refreshToken=n.refresh_token),n.refresh_token_expires_in&&(o.refreshTokenExpires=new Date(Date.now()+n.refresh_token_expires_in*1e3-B)),o})}function m(r){return typeof r!="string"||(r=r.trim(),r[r.length-1]==="/"&&(r=r.slice(0,-1))),r}var F=/^https?:\/\/(\S+)\.arcgis\.com.+/;function Z(r){return F.test(r)}function ue(r){if(!F.test(r))return r;switch(G(r)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}function G(r){if(!F.test(r))return null;let t=r.match(F)[1].split(".").pop();return t.includes("dev")?"dev":t.includes("qa")?"qa":"production"}function ee(r,e){let t=m(ue(e)).replace(/https?:\/\//,""),n=m(r).replace(/https?:\/\//,"");return new RegExp(n,"i").test(t)}function te(r,e){let t=Z(r),n=Z(e),o=G(r),s=G(e);return!!(t&&n&&o===s)}function re(r,e,t="https://www.arcgis.com/sharing/rest"){let n=`${t}/oauth2/validateAppAccess`;return p(n,{method:"POST",params:{f:"json",client_id:e,token:r}})}function Ge(r,e,t){let n=["params","httpMethod","rawResponse","authentication","hideToken","portal","credentials","maxUrlLength","headers","signal","suppressWarnings","request"],o=Object.assign(Object.assign({params:{}},t),r);return o.params=e.reduce((s,i)=>((r[i]||typeof r[i]=="boolean"||typeof r[i]=="number"&&r[i]===0)&&(s[i]=r[i]),s),o.params),n.reduce((s,i)=>(o[i]&&(s[i]=o[i]),s),{})}var x;(function(r){r.TOKEN_REFRESH_FAILED="TOKEN_REFRESH_FAILED",r.GENERATE_TOKEN_FOR_SERVER_FAILED="GENERATE_TOKEN_FOR_SERVER_FAILED",r.REFRESH_TOKEN_EXCHANGE_FAILED="REFRESH_TOKEN_EXCHANGE_FAILED",r.NOT_FEDERATED="NOT_FEDERATED",r.UNKNOWN_ERROR_CODE="UNKNOWN_ERROR_CODE"})(x||(x={}));var y=class extends Error{constructor(e="UNKNOWN_ERROR",t=x.UNKNOWN_ERROR_CODE,n,o,s){super(e);let i=new.target.prototype;Object.setPrototypeOf(this,i),this.name="ArcGISTokenRequestError",this.message=`${t}: ${e}`,this.originalMessage=e,this.code=t,this.response=n,this.url=o,this.options=s}};var D=class extends Error{constructor(){super("The user has denied your authorization request.");let t=new.target.prototype;Object.setPrototypeOf(this,t),this.name="ArcGISAccessDeniedError"}};var ne;(function(r){r.ArcGISRequestError="ArcGISRequestError",r.ArcGISAuthError="ArcGISAuthError",r.ArcGISAccessDeniedError="ArcGISAccessDeniedError",r.ArcGISTokenRequestError="ArcGISTokenRequestError"})(ne||(ne={}));var A=class{constructor(e){this.portal=e.portal?m(e.portal):"https://www.arcgis.com/sharing/rest",this._username=e.username}get username(){if(this._username)return this._username;if(this._user&&this._user.username)return this._user.username}getUsername(){return this.username?Promise.resolve(this.username):this.getUser().then(e=>e.username)}getUser(e){if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);{let t=`${this.portal}/community/self`,n=Object.assign(Object.assign({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingUserRequest=p(t,n).then(o=>(this._user=o,this._pendingUserRequest=null,o)),this._pendingUserRequest}}clearCachedUserInfo(){this._user=null}};var H;(function(r){r.Success="Succeeded",r.Failed="Failed",r.Waiting="Waiting",r.Cancelled="Cancelled",r.Cancelling="Cancelling",r.New="New",r.Executing="Executing",r.Submitted="Submitted",r.Failure="Failure",r.TimedOut="TimedOut",r.Error="Error",r.Status="Etatus",r.Unknown="Unknown"})(H||(H={}));function oe(r){let e=`${m(r.portal||"https://www.arcgis.com/sharing/rest")}/oauth2/revokeToken/`,t=r.token,n=r.clientId;delete r.portal,delete r.clientId,delete r.token;let o=Object.assign(Object.assign({},r),{httpMethod:"POST",params:{client_id:n,auth_token:t}});return p(e,o).then(s=>{if(!s.success)throw new b("Unable to revoke token",500,s,e,o);return s})}function M(r,e=window){return!e&&window&&(e=window),e.btoa(String.fromCharCode.apply(null,r)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function se(r,e=window){if(!e&&window&&(e=window),r&&e.isSecureContext&&e.crypto&&e.crypto.subtle){let n=new e.TextEncoder().encode(r);return e.crypto.subtle.digest("SHA-256",n).then(o=>M(new Uint8Array(o),e))}return Promise.resolve(null)}function z(r){!r&&window&&(r=window);let e=r.crypto.getRandomValues(new Uint8Array(32));return M(e)}function le(r){return typeof r.userId=="string"||typeof r.expires=="number"}var k=class r extends A{constructor(e){if(super(e),this.clientId=e.clientId,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this.password=e.password,this._token=e.token,this._tokenExpires=e.tokenExpires,this.portal=e.portal?m(e.portal):"https://www.arcgis.com/sharing/rest",this.ssl=e.ssl,this.provider=e.provider||"arcgis",this.tokenDuration=e.tokenDuration||20160,this.redirectUri=e.redirectUri,this.server=e.server,this.referer=e.referer,this.federatedServers={},this.trustedDomains=[],e.server){let t=this.getServerRootUrl(e.server);this.federatedServers[t]={token:e.token,expires:e.tokenExpires}}this._pendingTokenRequests={}}get token(){return this._token}get tokenExpires(){return this._tokenExpires}get refreshToken(){return this._refreshToken}get refreshTokenExpires(){return this._refreshTokenExpires}get canRefresh(){return!!(this.username&&this.password||this.clientId&&this.refreshToken&&this.redirectUri)}static beginOAuth2(e,t){!t&&window&&(t=window);let{portal:n,provider:o,clientId:s,expiration:i,redirectUri:a,popup:u,popupWindowFeatures:g,locale:d,params:c,style:h,pkce:E,state:l}=Object.assign({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",locale:"",style:"",pkce:!0},e),f=l||z(t),T=`ARCGIS_REST_JS_AUTH_STATE_${s}`;t.localStorage.setItem(T,f);let w=`${m(n)}/oauth2/authorize`,I={client_id:s,response_type:E?"code":"token",expiration:i,redirect_uri:a,state:JSON.stringify({id:f,originalUrl:t.location.href}),locale:d,style:h};o!=="arcgis"&&(w=`${m(n)}/oauth2/social/authorize`,I.socialLoginProviderName=o,I.autoAccountCreateForSocial=!0);let $;if(E){let P=z(t),U=`ARCGIS_REST_JS_CODE_VERIFIER_${s}`;t.localStorage.setItem(U,P),$=se(P,t).then(function(_){I.code_challenge_method=_?"S256":"plain",I.code_challenge=_||P})}else $=Promise.resolve();return $.then(()=>{if(w=`${w}?${O(I)}`,c&&(w=`${w}&${O(c)}`),u)return new Promise((P,U)=>{t.addEventListener(`arcgis-rest-js-popup-auth-${s}`,_=>{if(_.detail.error==="access_denied"){let j=new D;return U(j),j}if(_.detail.errorMessage){let j=new R(_.detail.errorMessage,_.detail.error);return U(j),j}P(new r({clientId:s,portal:n,ssl:_.detail.ssl,token:_.detail.token,tokenExpires:_.detail.expires,username:_.detail.username,refreshToken:_.detail.refreshToken,refreshTokenExpires:_.detail.refreshTokenExpires,redirectUri:a}))},{once:!0}),t.open(w,"oauth-window",g),t.dispatchEvent(new CustomEvent("arcgis-rest-js-popup-auth-start"))});t.location.href=w})}static completeOAuth2(e,t){!t&&window&&(t=window);let{portal:n,clientId:o,popup:s,pkce:i,redirectUri:a}=Object.assign({portal:"https://www.arcgis.com/sharing/rest",popup:!0,pkce:!0},e),u=`ARCGIS_REST_JS_AUTH_STATE_${o}`,g=t.localStorage.getItem(u),d=Y(i?t.location.search.replace(/^\?/,""):t.location.hash.replace(/^#/,"")),c=d&&d.state?JSON.parse(d.state):void 0;function h(l,f,T){if(t.localStorage.removeItem(u),s&&t.opener){t.opener.dispatchEvent(new CustomEvent(`arcgis-rest-js-popup-auth-${o}`,{detail:{error:f,errorMessage:l}})),t.close();return}return T&&t.history.replaceState(t.history.state,"",T),f==="access_denied"?Promise.reject(new D):Promise.reject(new R(l,f))}function E(l,f){if(t.localStorage.removeItem(u),s&&t.opener){t.opener.dispatchEvent(new CustomEvent(`arcgis-rest-js-popup-auth-${o}`,{detail:Object.assign({},l)})),t.close();return}return t.history.replaceState(t.history.state,"",f),new r({clientId:o,portal:n,ssl:l.ssl,token:l.token,tokenExpires:l.expires,username:l.username,refreshToken:l.refreshToken,refreshTokenExpires:l.refreshTokenExpires,redirectUri:a||location.href.replace(location.search,"")})}if(!g||!c)return h("No authentication state was found, call `ArcGISIdentityManager.beginOAuth2(...)` to start the authentication process.","no-auth-state");if(c.id!==g)return h("Saved client state did not match server sent state.","mismatched-auth-state");if(d.error){let l=d.error,f=d.error_description||"Unknown error";return h(f,l,c.originalUrl)}if(i&&d.code){let l=m(`${n}/oauth2/token/`),f=`ARCGIS_REST_JS_CODE_VERIFIER_${o}`,T=t.localStorage.getItem(f);return t.localStorage.removeItem(f),v(l,{httpMethod:"POST",params:{client_id:o,code_verifier:T,grant_type:"authorization_code",redirect_uri:a||location.href.replace(location.search,""),code:d.code}}).then(w=>E(Object.assign(Object.assign({},w),c),c.originalUrl)).catch(w=>h(w.originalMessage,w.code,c.originalUrl))}return!i&&d.access_token?Promise.resolve(E(Object.assign({token:d.access_token,expires:new Date(Date.now()+parseInt(d.expires_in,10)*1e3),ssl:d.ssl==="true",username:d.username},c),c.originalUrl)):h("Unknown error","oauth-error",c.originalUrl)}static fromParent(e,t){!t&&window&&(t=window);let n;return new Promise((o,s)=>{n=i=>{if(i.source===t.parent&&i.data)try{return o(r.parentMessageHandler(i))}catch(a){return s(a)}},t.addEventListener("message",n,!1),t.parent.postMessage({type:"arcgis:auth:requestCredential"},e)}).then(o=>(t.removeEventListener("message",n,!1),o))}static authorize(e,t){let{portal:n,clientId:o,expiration:s,redirectUri:i,state:a}=Object.assign({portal:"https://arcgis.com/sharing/rest",expiration:20160},e),u={client_id:o,expiration:s,response_type:"code",redirect_uri:i};a&&(u.state=a);let g=`${n}/oauth2/authorize?${O(u)}`;t.writeHead(301,{Location:g}),t.end()}static exchangeAuthorizationCode(e,t){let{portal:n,clientId:o,redirectUri:s}=Object.assign({portal:"https://www.arcgis.com/sharing/rest"},e);return v(`${n}/oauth2/token`,{params:{grant_type:"authorization_code",client_id:o,redirect_uri:s,code:t}}).then(i=>new r({clientId:o,portal:n,ssl:i.ssl,redirectUri:s,refreshToken:i.refreshToken,refreshTokenExpires:i.refreshTokenExpires,token:i.token,tokenExpires:i.expires,username:i.username})).catch(i=>{throw new y(i.message,x.REFRESH_TOKEN_EXCHANGE_FAILED,i.response,i.url,i.options)})}static deserialize(e){let t=JSON.parse(e);return new r({clientId:t.clientId,refreshToken:t.refreshToken,refreshTokenExpires:t.refreshTokenExpires?new Date(t.refreshTokenExpires):void 0,username:t.username,password:t.password,token:t.token,tokenExpires:t.tokenExpires?new Date(t.tokenExpires):void 0,portal:t.portal,ssl:t.ssl,tokenDuration:t.tokenDuration,redirectUri:t.redirectUri,server:t.server})}static fromCredential(e,t){let n=typeof e.ssl<"u"?e.ssl:!0,o=e.expires||Date.now()+72e5;return t.hasServer?new r({server:e.server,ssl:n,token:e.token,username:e.userId,tokenExpires:new Date(o)}):new r({portal:m(e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest"),ssl:n,token:e.token,username:e.userId,tokenExpires:new Date(o)})}static parentMessageHandler(e){if(e.data.type==="arcgis:auth:credential"){let t=e.data.credential;return le(t)?r.fromCredential(t,{hasPortal:!0,hasServer:!1,server:t.server}):new r(t)}if(e.data.type==="arcgis:auth:error"){let t=new Error(e.data.error.message);throw t.name=e.data.error.name,t}else throw new Error("Unknown message type.")}static destroy(e){return oe({clientId:e.clientId,portal:e.portal,token:e.refreshToken||e.token})}static fromToken(e){let t=new r(e);return t.getUser().then(()=>t)}static signIn(e){let t=new r(e);return t.getUser().then(()=>t)}toCredential(){return{expires:this.tokenExpires.getTime(),server:this.server||this.portal,ssl:this.ssl,token:this.token,userId:this.username}}getPortal(e){if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);{let t=`${this.portal}/portals/self`,n=Object.assign(Object.assign({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingPortalRequest=p(t,n).then(o=>(this._portalInfo=o,this._pendingPortalRequest=null,o)),this._pendingPortalRequest}}getToken(e,t){return te(this.portal,e)?this.getFreshToken(t):new RegExp(this.portal,"i").test(e)?this.getFreshToken(t):this.getTokenForServer(e,t)}validateAppAccess(e){return this.getToken(this.portal).then(t=>re(t,e))}toJSON(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires||void 0,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires||void 0,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,server:this.server}}serialize(){return JSON.stringify(this)}enablePostMessageAuth(e,t){!t&&window&&(t=window),this._hostHandler=this.createPostMessageHandler(e),t.addEventListener("message",this._hostHandler,!1)}disablePostMessageAuth(e){!e&&window&&(e=window),e.removeEventListener("message",this._hostHandler,!1)}refreshCredentials(e){return this.clearCachedUserInfo(),this.username&&this.password?this.refreshWithUsernameAndPassword(e):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new y("Unable to refresh token. No refresh token or password present.",x.TOKEN_REFRESH_FAILED))}getServerRootUrl(e){let[t]=m(e).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/),[n,o,s]=t.match(/(https?:\/\/)(.+)/),[i,...a]=s.split("/");return`${o}${i.toLowerCase()}/${a.join("/")}`}getDomainCredentials(e){return!this.trustedDomains||!this.trustedDomains.length?"same-origin":(e=e.toLowerCase(),this.trustedDomains.some(t=>e.startsWith(t.toLowerCase()))?"include":"same-origin")}signOut(){return r.destroy(this)}createPostMessageHandler(e){return t=>{let n=e.indexOf(t.origin)>-1,o=t.data.type==="arcgis:auth:requestCredential",s=this.tokenExpires.getTime()>Date.now();if(n&&o){let i={};if(s){let a=this.toCredential();a.server=a.server.replace("/sharing/rest",""),i={type:"arcgis:auth:credential",credential:a}}else i={type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Token was expired, and not returned to the child application"}};t.source.postMessage(i,t.origin)}}}getTokenForServer(e,t){let n=this.getServerRootUrl(e),o=this.federatedServers[n];return o&&o.expires&&o.expires.getTime()>Date.now()?Promise.resolve(o.token):this._pendingTokenRequests[n]?this._pendingTokenRequests[n]:(this._pendingTokenRequests[n]=this.fetchAuthorizedDomains().then(()=>p(`${n}/rest/info`,{credentials:this.getDomainCredentials(e)}).then(s=>{if(s.owningSystemUrl){if(ee(s.owningSystemUrl,this.portal))return p(`${s.owningSystemUrl}/sharing/rest/info`,t);throw new y(`${e} is not federated with ${this.portal}.`,x.NOT_FEDERATED)}else{if(s.authInfo&&this.federatedServers[n]!==void 0)return Promise.resolve({authInfo:s.authInfo});throw new y(`${e} is not federated with any portal and is not explicitly trusted.`,x.NOT_FEDERATED)}}).then(s=>this.token&&this.tokenExpires.getTime()<Date.now()?this.server?this.refreshCredentials().then(()=>({token:this.token,expires:this.tokenExpires})):this.refreshCredentials().then(()=>this.generateTokenForServer(s.authInfo.tokenServicesUrl,n)):this.generateTokenForServer(s.authInfo.tokenServicesUrl,n)).then(s=>(this.federatedServers[n]=s,delete this._pendingTokenRequests[n],s.token))),this._pendingTokenRequests[n])}generateTokenForServer(e,t){return p(e,{params:{token:this.token,serverUrl:t,expiration:this.tokenDuration}}).then(n=>({token:n.token,expires:new Date(n.expires-1e3*60*5)})).catch(n=>{throw new y(n.message,x.GENERATE_TOKEN_FOR_SERVER_FAILED,n.response,n.url,n.options)})}getFreshToken(e){return this.token&&!this.tokenExpires?Promise.resolve(this.token):this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshCredentials(e).then(()=>(this._pendingTokenRequests[this.portal]=null,this.token))),this._pendingTokenRequests[this.portal])}refreshWithUsernameAndPassword(e){let t={username:this.username,password:this.password,expiration:this.tokenDuration,client:"referer",referer:this.referer?this.referer:typeof window<"u"&&typeof window.document<"u"&&window.location&&window.location.origin?window.location.origin:q};return(this.server?p(`${this.getServerRootUrl(this.server)}/rest/info`).then(n=>p(n.authInfo.tokenServicesUrl,Object.assign({params:t},e))):p(`${this.portal}/generateToken`,Object.assign({params:t},e))).then(n=>(this.updateToken(n.token,new Date(n.expires)),this)).catch(n=>{throw new y(n.message,x.TOKEN_REFRESH_FAILED,n.response,n.url,n.options)})}refreshWithRefreshToken(e){if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()-864e5<Date.now())return this.exchangeRefreshToken(e);let n=Object.assign({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},e);return v(`${this.portal}/oauth2/token`,n).then(o=>this.updateToken(o.token,o.expires)).catch(o=>{throw new y(o.message,x.TOKEN_REFRESH_FAILED,o.response,o.url,o.options)})}updateToken(e,t){return this._token=e,this._tokenExpires=t,this}exchangeRefreshToken(e){let t=Object.assign({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},e);return v(`${this.portal}/oauth2/token`,t).then(n=>(this._token=n.token,this._tokenExpires=n.expires,this._refreshToken=n.refreshToken,this._refreshTokenExpires=n.refreshTokenExpires,this)).catch(n=>{throw new y(n.message,x.REFRESH_TOKEN_EXCHANGE_FAILED,n.response,n.url,n.options)})}fetchAuthorizedDomains(){return this.server||!this.portal?Promise.resolve(this):this.getPortal().then(e=>(e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(this.trustedDomains=e.authorizedCrossOriginDomains.filter(t=>!t.startsWith("http://")).map(t=>t.startsWith("https://")?t:`https://${t}`)),this))}};function S(r){return console.log("DEPRECATED:, 'UserSession' is deprecated. Use 'ArcGISIdentityManager' instead."),new k(r)}S.beginOAuth2=function(...r){return console.warn("DEPRECATED:, 'UserSession.beginOAuth2' is deprecated. Use 'ArcGISIdentityManager.beginOAuth2' instead."),k.beginOAuth2(...r)};S.completeOAuth2=function(...r){return console.warn("DEPRECATED:, 'UserSession.completeOAuth2()' is deprecated. Use 'ArcGISIdentityManager.completeOAuth2()' instead."),r.length<=1&&console.warn("WARNING:, 'UserSession.completeOAuth2()' is now async and returns a promise the resolves to an instance of `ArcGISIdentityManager`."),k.completeOAuth2(...r)};S.fromParent=function(...r){return console.warn("DEPRECATED:, 'UserSession.fromParent' is deprecated. Use 'ArcGISIdentityManager.fromParent' instead."),k.fromParent(...r)};S.authorize=function(...r){return console.warn("DEPRECATED:, 'UserSession.authorize' is deprecated. Use 'ArcGISIdentityManager.authorize' instead."),k.authorize(...r)};S.exchangeAuthorizationCode=function(...r){return console.warn("DEPRECATED:, 'UserSession.exchangeAuthorizationCode' is deprecated. Use 'ArcGISIdentityManager.exchangeAuthorizationCode' instead."),k.exchangeAuthorizationCode(...r)};S.fromCredential=function(...r){return console.log("DEPRECATED:, 'UserSession.fromCredential' is deprecated. Use 'ArcGISIdentityManager.fromCredential' instead."),console.warn("WARNING:, 'UserSession.fromCredential' now requires a `ServerInfo` object from the JS API as a second parameter."),k.fromCredential(...r)};S.deserialize=function(...r){return console.log("DEPRECATED:, 'UserSession.deserialize' is deprecated. Use 'ArcGISIdentityManager.deserialize' instead."),k.deserialize(...r)};export{V as a,p as b,Ge as c,m as d,k as e};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import{a as e,b as i,c as l,d as s,e as t}from"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{a as e,b as i,c as l,d as s,e as t}from"./YUOGYP2W.js";import{a as r}from"./COLHBQ5X.js";import"./ZJXXAWMH.js";import"./XEO56VFL.js";import"./UHBAUGQ4.js";import"./BB7RJW6E.js";import"./4ME5QMIF.js";import"./R53BLRMX.js";import"./XFDA7NEB.js";import"./JDSGIOVR.js";import"./6XYU4BZS.js";import"./IP6ATOM6.js";import"./RIQZUFV2.js";import"./SFJHXT65.js";import"./RVOILI7H.js";import"./AH5AIEIN.js";import"./GUP4UK2N.js";import"./X6GE3EIS.js";import"./Z2MJRFIE.js";import"./T2DUZEDU.js";import"./N324UTZ5.js";import"./MVN27KOI.js";import"./Y4M5KS3M.js";import"./A3JKO4I4.js";import"./B4HONVWZ.js";var d=async(o,p,a)=>({type:"Layout",elements:[{type:"Notice",options:{notice:{id:"metric-editor-preview-notice",title:"{{shared.notices.metrics.preview.label:translate}}",message:"{{shared.notices.metrics.preview.message:translate}}",configuration:{noticeType:"notice",icon:!0,kind:"info",closable:!1,scale:"s"}}}},{type:"Section",labelKey:"shared.sections.metrics.basic.label",elements:[{labelKey:"shared.fields.metrics.cardTitle.label",scope:"/properties/_metric/properties/cardTitle",type:"Control",options:{messages:[{type:"ERROR",keyword:"required",labelKey:"shared.fields.metrics.cardTitle.message.required",icon:!0}]}}]},{type:"Section",labelKey:"shared.sections.metrics.source.label",elements:[{labelKey:"shared.fields.metrics.type.label",scope:"/properties/_metric/properties/type",type:"Control",options:{control:"hub-field-input-tile-select",rules:[[],[],[{effect:r.SHOW,conditions:[!1]}]],enum:{i18nScope:"shared.fields.metrics.type.enum"}}},{scope:"/properties/_metric/properties/valueType",type:"Control",labelKey:"shared.fields.metrics.valueType.label",rule:e,options:{control:"hub-field-input-tile-select",layout:"horizontal",helperText:{labelKey:"shared.fields.metrics.valueType.helperText",placement:"top"},enum:{i18nScope:"shared.fields.metrics.valueType.enum"}}},{labelKey:"shared.fields.metrics.value.label",scope:"/properties/_metric/properties/value",type:"Control",rules:[i],options:{control:"hub-field-input-input",clearOnHidden:!0,messages:[{type:"ERROR",keyword:"required",labelKey:"shared.fields.metrics.value.message.required",icon:!0}]}},{labelKey:"shared.fields.metrics.value.label",scope:"/properties/_metric/properties/value",type:"Control",rules:[l],options:{control:"hub-field-input-input",clearOnHidden:!0,type:"number",messages:[{type:"ERROR",keyword:"required",labelKey:"shared.fields.metrics.value.message.required",icon:!0}]}},{labelKey:"shared.fields.metrics.value.label",scope:"/properties/_metric/properties/value",type:"Control",rules:[s],options:{control:"hub-field-input-date",clearOnHidden:!0,messages:[{type:"ERROR",keyword:"required",labelKey:"shared.fields.metrics.value.message.required",icon:!0}]}},{scope:"/properties/_metric/properties/dynamicMetric",type:"Control",labelKey:"shared.fields.metrics.dynamicMetric.label",rule:t,options:{control:"hub-composite-input-service-query-metric"}},{labelKey:"shared.fields.metrics.unit.label",scope:"/properties/_metric/properties/unit",type:"Control",options:{helperText:{labelKey:"shared.fields.metrics.unit.helperText",placement:"top"}}},{labelKey:"shared.fields.metrics.unitPosition.label",scope:"/properties/_metric/properties/unitPosition",type:"Control",options:{helperText:{labelKey:"shared.fields.metrics.unitPosition.helperText",placement:"bottom"},control:"hub-field-input-select",enum:{i18nScope:"shared.fields.metrics.unitPosition.enum"}}}]},{type:"Section",labelKey:"shared.sections.metrics.formatting.label",elements:[{labelKey:"shared.fields.metrics.trailingText.label",scope:"/properties/_metric/properties/trailingText",type:"Control",options:{helperText:{labelKey:"shared.fields.metrics.trailingText.helperText",placement:"bottom"}}},{labelKey:"shared.fields.metrics.sourceLink.label",scope:"/properties/_metric/properties/sourceLink",type:"Control",rule:e,options:{placeholder:"https://esri.com",messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:"shared.fields.metrics.sourceLink.message.required",allowShowBeforeInteract:!0},{type:"ERROR",keyword:"format",icon:!0,labelKey:"shared.errors.urlFormat"},{type:"ERROR",keyword:"if",hidden:!0}]}},{labelKey:"shared.fields.metrics.sourceTitle.label",scope:"/properties/_metric/properties/sourceTitle",type:"Control",rule:e},{type:"Control",scope:"/properties/_metric/properties/allowDynamicLink",labelKey:"shared.fields.metrics.allowDynamicLink.label",rule:t,options:{layout:"inline-space-between",control:"hub-field-input-switch"}}]}]}),u=async(o,p,a)=>({_metric:{cardTitle:"{{shared.fields.metrics.cardTitle.label:translate}}"}});export{u as buildDefaults,d as buildUiSchema};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import{a as w}from"./BPPOS7VC.js";import{e as E}from"./PYJIK3CR.js";import{B as y,C as b}from"./4JGCEBGT.js";import"./52W5VWDL.js";import{a as F,c as l,d as C,e as x,f as m}from"./VFEXPJTW.js";import"./6XZWFS7Y.js";var L="instant-apps-filter-list calcite-mode-light",$="instant-apps-filter-list calcite-mode-dark",p=["feature","geojson","wfs","csv","scene","subtype-group","point-cloud","map-image","sublayer"];function g(e){return e.replaceAll("'","''")}function f(e,t=!1){if(e){let i=new Date(e),n=`${i.getFullYear()}-${i.getMonth()+1}-${i.getDate()}`;if(t){let s=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}`;return`${n} ${s}`}else return n}}function D(e){if(e!=null){e.value=["",""];let t=e.shadowRoot?.querySelectorAll("calcite-input");if(t!=null)for(let i of t)i.value=""}}var S=":host{display:block}.instant-apps-filter-list *{box-sizing:border-box}.instant-apps-filter-list__container{height:100%}.instant-apps-filter-list__container calcite-block:last-of-type{margin-bottom:0}.instant-apps-filter-list__footer{padding:12px;display:flex}.instant-apps-filter-list__footer calcite-button:nth-child(2){margin-left:6px}.instant-apps-filter-list__item-container,.instant-apps-filter-list__item-container--user-input{display:flex;justify-content:space-between;align-items:center}.instant-apps-filter-list__item-container:not(:last-child),.instant-apps-filter-list__item-container--user-input:not(:last-child){padding-bottom:20px}.instant-apps-filter-list__item-container--user-input{margin:0;display:flex;flex-direction:column;align-items:flex-start}.instant-apps-filter-list__item-container--user-input>span{margin:0 0 6px;font-size:14px;font-weight:normal}.instant-apps-filter-list__item-container--user-input calcite-combobox{width:100%;font-size:16px;--calcite-combobox-input-height:24px}.instant-apps-filter-list__number-input-container{width:100%;display:flex;justify-content:center}.instant-apps-filter-list__number-input-container calcite-slider{width:90%}.instant-apps-filter-list__date-picker-input-container{display:flex;align-items:center;justify-content:unset;width:100%}.instant-apps-filter-list__date-picker-input-container calcite-action{height:64px;border-top:1px solid var(--calcite-color-border-input);border-right:1px solid var(--calcite-color-border-input);border-bottom:1px solid var(--calcite-color-border-input)}.instant-apps-filter-list__title{margin-right:20px}.instant-apps-filter-list__title>p{font-size:14px;font-weight:normal;margin:0}.instant-apps-filter-list__checkbox-container{display:flex}.instant-apps-filter-list__checkbox-container calcite-checkbox{height:18px}.instant-apps-filter-list__operator-description{margin:0;--calcite-font-size--1:12px}.instant-apps-filter-list__zoom-to{display:flex;justify-content:flex-end;margin:8px 0 20px}.instant-apps-filter-list__zoom-to calcite-action{width:min-content}.instant-apps-filter-list calcite-input-date-picker{--calcite-font-size--1:16px}@media (prefers-reduced-motion){.instant-apps-filter-list calcite-loader{--calcite-internal-duration-factor:2;--calcite-internal-animation-timing-slow:calc(300ms * 2)}}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__header-container{background:#2b2b2b;color:#fff}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__operator-description{background:#353535}",k=S,u={base:"instant-apps-filter-list",filterContainer:"instant-apps-filter-list__container",footer:"instant-apps-filter-list__footer",filterItemTitle:"instant-apps-filter-list__title",filterItemContainer:"instant-apps-filter-list__item-container",filterUIItemContainer:"instant-apps-filter-list__item-container--user-input",checkboxContainer:"instant-apps-filter-list__checkbox-container",numberInputContainer:"instant-apps-filter-list__number-input-container",dateInputContainer:"instant-apps-filter-list__date-picker-input-container",operatorDesc:"instant-apps-filter-list__operator-description",zoomTo:"instant-apps-filter-list__zoom-to"},I=class{constructor(e){F(this,e),this.filterListReset=m(this,"filterListReset",7),this.filterUpdate=m(this,"filterUpdate",7),this.isLayerExpUpdated=!1,this.layerExpressions=void 0,this.autoUpdateUrl=!1,this.closeBtn=!1,this.closeBtnOnClick=void 0,this.comboboxOverlayPositioning="absolute",this.closeBtnText=void 0,this.openFilters=!1,this.extentSelector=!1,this.extentSelectorConfig=void 0,this.urlParams=void 0,this.filterCount=0,this.view=void 0,this.zoomBtn=!0,this.resetBtn=!0,this.resetFiltersOnDisconnect=!0,this.loading=void 0,this.filterLayerExpressions=void 0,this.messages=void 0,this.baseClass=L,this.initDefExpressions=void 0,this.initMapImageExpressions=void 0,this.initPointCloudFilters=void 0}watchViewHandler(){this.handleWhenView()}watchLayerExpressions(){this.resetAllFilters(),this.filterLayerExpressions=structuredClone(this.layerExpressions),this.handleLayerExpressionsUpdate()}async getFilterInitState(){return await Promise.resolve({initDefExpressions:this.initDefExpressions,initMapImageExpressions:this.initMapImageExpressions,initPointCloudFilters:this.initPointCloudFilters})}async forceReset(){return this.resetExpressions(),await Promise.resolve(!0)}async updateInitDefExpressions(e){return this.initDefExpressions=e.initDefExpressions,this.initMapImageExpressions=e.initMapImageExpressions,this.initPointCloudFilters=e.initPointCloudFilters,await Promise.resolve(!0)}async getCurrentLayerExpressions(){let e=structuredClone(this.filterLayerExpressions);return await Promise.resolve(e)}async handleUpdatingT9nData(e){return e==null?await Promise.resolve(!0):(this.filterLayerExpressions?.forEach(t=>{let i=e?.find(n=>n.id===t.id);i!=null&&(t.title=i.title,t.expressions?.forEach(n=>{let s=i.expressions?.find(a=>a.id===n.id);s!=null&&(n.name=s.name)}))}),await Promise.resolve(!0))}connectedCallback(){this.layerExpressions==null&&this.view==null||(this.isLayerExpUpdated=!0,this.filterLayerExpressions=structuredClone(this.layerExpressions),this.handleLayerExpressionsUpdate())}async componentWillLoad(){this.baseClass=w(this.el)==="dark"?$:L,await this.initializeModules(),E(this),!this.isLayerExpUpdated&&(this.isLayerExpUpdated=!0,this.filterLayerExpressions=this.layerExpressions!=null?structuredClone(this.layerExpressions):[],this.view!=null&&this.handleLayerExpressionsUpdate())}componentDidRender(){this.resetBtnEl!=null&&(this.resetBtnEl.disabled=!(this.filterLayerExpressions&&this.filterLayerExpressions.length>0))}disconnectedCallback(){this.resetFiltersOnDisconnect&&(this.isLayerExpUpdated=!1,this.filterLayerExpressions=structuredClone(this.layerExpressions),this.resetAllFilters())}async initializeModules(){let[e,t]=await Promise.all([b(),y()]);this.geometryJsonUtils=t,this.intl=e}render(){let e=this.loading?this.renderLoading():this.initFilterConfig(),t=this.renderFooter();return l(C,{key:"3db1b211528d0ebe2cc379b9dccbd59c38c2f7c4"},l("calcite-panel",{key:"b46732d02815e1ccd7f9355daf5470b0e5080918",class:this.baseClass,ref:i=>this.panelEl=i},l("slot",{key:"0b6b2021c89c4aa78f8a23d34363520a1ebdf21c",slot:"header-content",name:"filter-header-content"}),l("slot",{key:"70bd30b6dc8d0eada179abf13b713e8df852f059",slot:"header-actions-end",name:"filter-header-actions-end"}),l("div",{key:"filter-container",class:u.filterContainer},e,t)))}renderLoading(){return l("calcite-loader",{label:"Loading filters..."})}renderFilter(e){let{id:t}=e;return e.expressions.map((i,n)=>i.type==="checkbox"||i.type==null?l("div",{key:`${t}-${n}`,class:u.filterItemContainer},l("div",{class:u.filterItemTitle},l("p",null,i.name)),l("div",{class:u.checkboxContainer},l("calcite-checkbox",{id:i.id.toString(),scale:"l",checked:i?.active,onCalciteCheckboxChange:this.handleCheckboxChange.bind(this,e,i)}))):this.initInput(e,i))}renderLayerBlock(){return this.filterLayerExpressions?.map(e=>this.renderFilterBlocks(e))}renderFilterBlocks(e){let t=this.renderFilter(e),{operator:i}=e,n=i?.trim()==="OR"?"orOperator":"andOperator",s=this.renderZoomTo(e);return l("calcite-block",{key:e.id,heading:e.title,description:this.messages?.[n],open:this.openFilters?!0:void 0,collapsible:!0},s,t)}renderCombobox(e,t){return l("label",{key:"combo-select",class:u.filterUIItemContainer},l("span",null,t.name),l("calcite-combobox",{id:t.id.toString(),onCalciteComboboxChange:this.handleComboSelect.bind(this,t,e),label:t.name,placeholder:t.placeholder,selectionMode:"multiple","max-items":"6",scale:"s",overlayPositioning:this.comboboxOverlayPositioning},t.fields?.map((i,n)=>this.renderComboboxItem(t,i,n))))}renderComboboxItem(e,t,i){let n=this.createLabel(e,t),a=e?.selectedFields?.includes(t)??!1;return l("calcite-combobox-item",{key:`${n}-${i}`,value:t,heading:`${n}`,selected:a})}initFilterConfig(){if(this.filterLayerExpressions&&this.filterLayerExpressions.length>0){if(this.filterLayerExpressions.length===1){let{operator:e}=this.filterLayerExpressions[0],t=e?.trim()==="OR"?"orOperator":"andOperator",i=this.renderZoomTo(this.filterLayerExpressions[0]);return l("calcite-block",{class:u.operatorDesc,heading:this.messages?.[t],open:!0},i,this.renderFilter(this.filterLayerExpressions[0]))}else if(this.filterLayerExpressions.length>1)return this.renderLayerBlock()}}renderNumberSlider(e,t){let i=t?.min,n=t?.max,s=t?.step?t.step:1,a=i!=null&&n!=null,r=t?.field??"",o=t?.range?.min!=null?t.range.min:i,c=t?.range?.max!=null?t.range.max:n,d=[o,c];return a?l("label",{key:t?.id.toString(),class:u.filterUIItemContainer},l("span",null,t?.name),l("div",{class:u.numberInputContainer},l("calcite-slider",{id:t?.id.toString(),onCalciteSliderChange:this.handleSliderChange.bind(this,t,e),min:i,max:n,minValue:i,maxValue:n,minLabel:this.messages?.minSlider?.replace("{field}",r),maxLabel:this.messages?.maxSlider?.replace("{field}",r),step:s,labelHandles:!0,snap:!0,value:d,"group-separator":t?.format?.digitSeparator,precise:!0}))):void 0}renderDatePicker(e,t){let{min:i,max:n}=t,s=[t?.range?.min,t?.range?.max];return i!=null&&n!=null?l("label",{class:u.filterUIItemContainer},l("span",null,t?.name),l("div",{class:u.dateInputContainer},l("calcite-input-date-picker",{id:t?.id.toString(),onCalciteInputDatePickerChange:this.handleDatePickerRangeChange.bind(this,t,e),min:i,max:n,"overlay-positioning":"fixed",lang:this.intl?.getLocale()??"en",layout:"vertical",value:s,range:!0}),l("calcite-action",{onClick:this.handleResetDatePicker.bind(this,t,e),icon:"reset",text:this.messages?.resetDatePicker,scale:"s"}))):null}renderFooter(){let e=this.closeBtnText??this.messages?.close,t=this.closeBtn&&this.resetBtn?"half":"full";return l("div",{class:u.footer,slot:"footer"},this.resetBtn?l("calcite-button",{appearance:"outline",width:t,ref:i=>this.resetBtnEl=i,onClick:this.handleResetFilter.bind(this)},this.messages?.resetFilter):void 0,this.closeBtn?l("calcite-button",{appearance:"solid",width:t,kind:"brand",onClick:this.closeBtnOnClick?.bind(this)},e):void 0)}renderZoomTo(e){let t=e?.sublayerId?`zoom-to-${e.id}-${e.sublayerId}`:`zoom-to-${e.id}`;return this.zoomBtn?l("div",{class:u.zoomTo},l("calcite-button",{id:t,appearance:"transparent",kind:"neutral",scale:"s",iconStart:"magnifying-glass-plus",onClick:this.handleZoomTo.bind(this,e)},this.messages?.zoomTo)):void 0}handleResetDatePicker(e,t){let i=this.panelEl.querySelector(`[id='${e.id}']`);D(i),e.active=!1,e.definitionExpression=void 0,e.range=void 0,this.generateOutput(t)}initInput(e,t){let{type:i,numDisplayOption:n,displayOption:s}=t;if(i==="string"||i==="coded-value"||(i==="number"||i==="range"||i==="date")&&(n==="drop-down"||s==="drop-down"))return this.renderCombobox(e,t);if(i==="number"||i==="range")return this.renderNumberSlider(e,t);if(i==="date")return this.renderDatePicker(e,t)}async initExpressions(){if(this.loading=!0,this.filterLayerExpressions==null||this.view==null){this.loading=!1;return}await this.processExpressions(),this.loading=!1}async processExpressions(){this.filterLayerExpressions&&await Promise.all(this.filterLayerExpressions.map(async e=>{await Promise.all((e.expressions||[]).map(async t=>await this.setInitExpression(e,t)))}))}handleResetFilter(){this.resetExpressions(),this.resetAllFilters(),this.generateURLParams(),this.filterListReset.emit()}resetExpressions(){this.filterLayerExpressions?.forEach(e=>{e.expressions?.forEach(t=>{let{type:i,numDisplayOption:n,displayOption:s}=t,a="";i==="string"||i==="coded-value"||i==="date"&&(n==="drop-down"||s==="drop-down")||(i==="number"||i==="range")&&(n==="drop-down"||s==="drop-down")?a="combobox":i==="date"?a="datePicker":(i==="number"||i==="range")&&(a="numberRange"),a?this.resetExpressionUI(a,t):this.resetCheckbox(t),t.active=!1})})}resetExpressionUI(e,t){let{id:i}=t;switch(e){case"combobox":{t.selectedFields=void 0;let n=this.panelEl.querySelector(`[id='${i}']`);n&&Array.from(n.children).forEach(s=>{s.selected=!1});break}case"datePicker":{t.range=void 0;let n=this.panelEl.querySelector(`[id='${i}']`);D(n);break}case"numberRange":{t.range=void 0;let n=this.panelEl.querySelector(`[id='${i}']`);n&&(n.minValue=t.min,n.maxValue=t.max);break}}}resetCheckbox(e){let{id:t}=e,i=this.panelEl.querySelector(`[id='${t}']`);i!=null&&(i.checked=!1)}resetAllFilters(){this.view?.map?.allLayers?.concat(this.view?.map?.allTables)?.forEach(t=>{if(!p.includes(t.type))return;let i=t;if(i.type==="point-cloud"){if(!this.initPointCloudFilters)return;i.filters=this.initPointCloudFilters[i.id]}else if(i.type==="map-image")i.allSublayers.forEach(n=>{n.definitionExpression=this.initMapImageExpressions?.[i.id]?.[n.id]??""});else{if(this.initDefExpressions==null)return;i.definitionExpression=this.initDefExpressions[i.id]}})}async updateStringExpression(e,t){let i=this.findFilterLayer(e);return await this.getFeatureAttributes(i,t),this.handleDateField(i,t),t?.selectedFields?(t.definitionExpression=this.createDefinitionExpression(t),!0):!1}handleDateField(e,t){t.type==="date"&&e.fields.find(({name:n})=>n===t.field)?.type==="date-only"&&(t.dateOnly=!0)}createDefinitionExpression(e){if(!e.selectedFields?.length)return"";let t=e.selectedFields.map(i=>typeof i=="number"?i:`'${g(i)}'`);return`${e.field} IN (${t.join(",")})`}async updateNumberExpression(e,t){if(!t?.min&&t?.min!==0||!t?.max&&t?.max!==0){let i=this.findFilterLayer(e),{field:n}=t;if(n!=null)if(this.setExpressionFormat(i,t,n),t?.numDisplayOption==="drop-down"||t?.displayOption==="drop-down")await this.getFeatureAttributes(i,t);else{let a=(await this.calculateMinMaxStatistics(i,n))?.[0]?.attributes;if(t.format?.places!=null?(t.min=this.roundMinNumberDown(a[`min${n}`],t.format.places),t.max=this.roundMaxNumberUp(a[`max${n}`],t.format.places)):(t.min=a[`min${n}`],t.max=a[`max${n}`]),t?.range&&Object.keys(t.range).length){let{min:r,max:o}=t.range;return t.definitionExpression=`${t.field} BETWEEN ${r} AND ${o}`,!0}}}return!1}async updateDateExpression(e,t){let{field:i,range:n}=t,s=this.findFilterLayer(e),r=(await this.calculateMinMaxStatistics(s,i))?.[0]?.attributes;if(t.min=f(r[`min${i}`]),t.max=f(r[`max${i}`]),n!=null&&(n?.max!=null||n?.min!=null)){let{min:o,max:c}=n;if(o=o?.replace("+"," "),c=c?.replace("+"," "),o||c){let d=c&&!o?"<":!c&&o?">":null;return d?t.definitionExpression=`${i} ${d} '${o??c}'`:t.definitionExpression=`${i} BETWEEN '${o}' AND '${c}'`,!0}}return!1}async updateCodedValueExpression(e,t,i){if(!i?.domain||i?.domain?.type!=="coded-value")return!1;let n=this.findFilterLayer(e);await this.getFeatureAttributes(n,t);let a=i.domain.codedValues.reduce((r,{code:o,name:c})=>(r[o]=c,r),{});if(t.codedValues=a,t.selectedFields?.length){let r=t.selectedFields.map(o=>typeof o=="number"?o:`'${g(o)}'`).join(",");return t.definitionExpression=`${t.field} IN (${r})`,!0}return!1}updateRangeExpression(e,t){if(!t?.domain||t?.domain?.type!=="range")return!1;let{field:i,range:n}=e;return e.min=t.domain.minValue,e.max=t.domain.maxValue,n&&Object.keys(n).length?(e.definitionExpression=`${i} BETWEEN ${n.min} AND ${n.max}`,!0):!1}async getFeatureAttributes(e,t){if(!this.isLayerSupported(e)){t.fields=[];return}let i=await this.getQueryLayer(e),{maxRecordCount:n,supportsMaxRecordCountFactor:s}=this.extractQueryCapabilities(e),a=await i.queryFeatureCount(),r=this.createQuery(i,t);await this.queryDistinctFeatures(i,r,t),this.shouldPaginate(n,a,s)&&this.handlePagination(i,r,n,s,a,t)}isLayerSupported(e){return e&&p.includes(e.type)}extractQueryCapabilities(e){return{maxRecordCount:e.capabilities?.query?.maxRecordCount??e.sourceJSON?.maxRecordCount,supportsMaxRecordCountFactor:e.capabilities?.query?.supportsMaxRecordCountFactor}}createQuery(e,t){let i=e.createQuery();this.applyCacheHint(e,i);let n=t?.field;if(n){let s=this.getInitDefExprFromLayer(e);i.where=s||"1=1",i.outFields=[n],i.orderByFields=[`${n} ASC`],i.returnDistinctValues=!0,i.returnGeometry=!1,i.maxRecordCountFactor=5,this.applyQueryGeometryFromExtentSelector(i)}return i}async queryDistinctFeatures(e,t,i){if(!t.outFields)return;let n=await this.queryForFeatures(e,t,t.outFields[0]);n?.length&&(i.fields=[...new Set(n)],i.type==="string"?i.fields=i.fields.sort((s,a)=>s.localeCompare(a)):i.type==="number"&&(i.fields=i.fields.sort((s,a)=>s-a)))}getQueryCount(e,t){return t?e*5:e}shouldPaginate(e,t,i){let n=this.getQueryCount(e,i);return e!=null&&t>n}async handlePagination(e,t,i,n,s,a){let r=this.getQueryCount(i,n),o=[];for(let c=r;c<s;c+=r){let d=t.clone();d.num=i,d.start=c,o.push(this.queryForFeatures(e,d,t?.outFields?.[0]??""))}Promise.all(o).then(c=>{c.forEach(d=>{d?.length&&a.fields&&a.fields.push(...d)}),a.type==="string"?a.fields=[...new Set(a.fields)].sort((d,h)=>d.localeCompare(h)):a.type==="number"?a.fields=[...new Set(a.fields)].sort((d,h)=>d-h):a.fields=[...new Set(a.fields)].sort()})}async queryForFeatures(e,t,i){return(await e.queryFeatures(t))?.features.filter(a=>a.attributes?.[i])?.map(a=>a.attributes?.[i])}async calculateMinMaxStatistics(e,t){if(!e||!p.includes(e.type)||!t)return[];let i=this.createStatisticsQuery(e,t);return(await e.queryFeatures(i))?.features||[]}createStatisticsQuery(e,t){let i=e.createQuery();return i.where=this.getInitDefExprFromLayer(e)||"1=1",this.applyCacheHint(e,i),i.outStatistics=[{onStatisticField:t,outStatisticFieldName:`max${t}`,statisticType:"max"},{onStatisticField:t,outStatisticFieldName:`min${t}`,statisticType:"min"}],this.applyQueryGeometryFromExtentSelector(i),i}getExtent(e,t){if(e&&t){let{constraints:i}=t,s={...i}?.geometry;if(s){let a="extent"in s?s:this.geometryJsonUtils.fromJSON(s);if(a?.type==="extent"||a?.type==="polygon")return a}}}async setInitExpression(e,t){if(!t.field||!t.type){await this.updateExpression(e,t,void 0);return}let i=this.findFilterLayer(e);i&&((i.loadStatus==="not-loaded"||i.loadStatus==="failed")&&await i.load(),await i.when(async()=>{let n=i.fields?.find(({name:a})=>a===t.field),s=n?.domain?.type;t.type=s==="coded-value"||s==="range"?s:t.type,await this.updateExpression(e,t,n)}))}async updateExpression(e,t,i){await this.handleExpressionType(e,t,i)&&this.generateOutput(e)}async handleExpressionType(e,t,i){switch(t.type){case"string":return await this.updateStringExpression(e,t);case"number":return await this.updateNumberExpression(e,t);case"date":return await this.updateDateExpressionBasedOnDisplayOption(e,t);case"coded-value":return await this.updateCodedValueExpression(e,t,i);case"range":return await this.updateRangeExpressionBasedOnDisplayOption(e,t,i);case"checkbox":case null:case void 0:return t.active??!1;default:return!1}}async updateDateExpressionBasedOnDisplayOption(e,t){return t.displayOption==="drop-down"?await this.updateStringExpression(e,t):await this.updateDateExpression(e,t)}async updateRangeExpressionBasedOnDisplayOption(e,t,i){return t.displayOption==="drop-down"?await this.updateStringExpression(e,t):this.updateRangeExpression(t,i)}updateRangeExpressions(e,t,i,n){let s=this.getInitDefExprFromLayerExpression(t);(n||n===0)&&(i||i===0)&&(n===e?.min&&i===e?.max?(e.definitionExpression=void 0,e.active=!1):(e.definitionExpression=s?`(${s}) AND ${e?.field} BETWEEN ${n} AND ${i}`:`${e?.field} BETWEEN ${n} AND ${i}`,e.active=!0)),e.range={min:n,max:i}}handleCheckboxChange(e,t,i){let n=i.target;t.active=n.checked,this.generateOutput(e)}handleSliderChange(e,t,i){let{maxValue:n,minValue:s}=i.target;this.updateRangeExpressions(e,t,n,s),this.generateOutput(t)}handleComboSelect(e,t,i){let s=i.target.selectedItems,{field:a,type:r}=e;if(e.selectedFields=s.map(({value:o})=>o),s.length){let o=s.map(({value:c})=>typeof c=="number"?c:`'${g(c)}'`);e.definitionExpression=r==="date"?o.map(c=>this.buildDateExpression(c,a)).join(" OR "):`${a} IN (${o.join(",")})`,e.active=!0}else e.definitionExpression=void 0,e.active=!1;this.generateOutput(t)}handleDatePickerRangeChange(e,t,i){let n=i.target,[s,a]=n.valueAsDate,r=s?f(Math.floor(s.getTime()),!0):void 0,o=a?f(Math.floor(a.getTime()),!0):void 0;(r||o)&&(e.definitionExpression=this.constructDefinitionExpression(e.field,r,o),e.range={min:r,max:o},e.active=!0,this.generateOutput(t))}constructDefinitionExpression(e,t,i){return t?i?`${e} BETWEEN '${t}' AND '${i}'`:`${e} > '${t}'`:`${e} < '${i}'`}handleURLParams(){if(!("URLSearchParams"in window))return;let t=new URLSearchParams(document.location.search).get("filter");if(!t){this.filterCount=0;return}let i=t.split(";").map(n=>JSON.parse(n));this.filterCount=this.applyFilters(i)}applyFilters(e){let t=0;return e.forEach(i=>{let n=this.filterLayerExpressions?.find(s=>s.id===i.layerId);n&&n.expressions?.forEach(s=>{s.id?.toString()===i.expressionId?.toString()&&(this.activateExpression(s,i),t++)})}),t}activateExpression(e,t){e.active=!0,t.type==="range"?e.range=t.range:t.type==="select"&&(e.selectedFields=t.selectedFields)}createURLParamExpression(e,t){let{id:i,range:n,selectedFields:s,type:a}=t;return a==="string"||a==="coded-value"||t?.numDisplayOption==="drop-down"||t?.displayOption==="drop-down"?{type:"select",layerId:e.id,expressionId:i.toString(),selectedFields:s}:a==="number"||a==="range"||a==="date"?{type:"range",layerId:e.id,expressionId:i.toString(),range:n}:{layerId:e.id,expressionId:i.toString()}}autoUpdateURLCheck(e){if(this.autoUpdateUrl){let t=e.toString()?`${window.location.pathname}?${e}`.trim():window.location.pathname;window.history.replaceState({},"",t)}}generateURLParams(){if(!("URLSearchParams"in window))return;let e=new URLSearchParams(window.location.search),t=this.filterLayerExpressions?.flatMap(i=>i?.expressions?.filter(n=>n.active).map(n=>JSON.stringify(this.createURLParamExpression(i,n)))||[])||[];this.filterCount=t.length,t.length>0?e.set("filter",t.join(";")):e.delete("filter"),this.autoUpdateURLCheck(e),this.urlParams=e}updateFilter(e,t,i){let{id:n}=e,s=this.view.map?.findLayerById(n)??this.view.map?.findTableById(n);if(s!=null)if(s.type==="point-cloud")this.updateFilterLayerPCLFilter(s,i);else if(s.type==="map-image"){let a=s.findSublayerById(e?.sublayerId);a!=null&&this.updateFilterLayerDefExpression(a,t,e)}else this.updateFilterLayerDefExpression(s,t,e)}updateFilterLayerDefExpression(e,t,i){let{operator:n}=i,s=this.getInitDefExprFromLayer(e),a=t?.length>0&&s!=null&&s!==""?`(${t.join(n)}) AND (${s})`:t.length>0?t.join(n):s;e.definitionExpression=a}updateFilterLayerPCLFilter(e,t){e.filters=t}async handleWhenView(){if(this.view==null)return;await this.view.map.loadAll(),this.handleLayerExpressionsUpdate()}async handleLayerExpressionsUpdate(){this.updateInitExpressions(),this.handleURLParams(),this.initExpressions()}async handleZoomTo(e){let t=e?.sublayerId?`#zoom-to-${e.id}-${e.sublayerId}`:`#zoom-to-${e.id}`,i=this.panelEl.querySelector(t),n=(s,a)=>{i&&(i.loading=s,i.disabled=a)};if(n(!0,!0),await this.getZoomToExtent(e),this.zoomToExtent){let s=this.zoomToExtent.type==="point"&&this.zoomToExtent.count===1?{target:this.zoomToExtent.extent,zoom:10}:this.zoomToExtent.extent;await this.view.goTo(s)}n(!1,!1)}async getZoomToExtent(e){let i=this.view.allLayerViews.find(({layer:s})=>s.id===e.id).layer,n=i.type==="map-image"?i.findSublayerById(e.sublayerId):i;if(n&&n.type!=="point-cloud"&&p.includes(n?.type)){let s=await this.getQueryLayer(n),a=s.createQuery();a.where=s.definitionExpression??"1=1";let r=await s.queryExtent(a);this.zoomToExtent={...r,type:s.geometryType}}}applyFilterToQuery(e,t){let i=this.view.allLayerViews.find(({layer:s})=>s.id===t.id),n=i?.featureEffect?.filter??i.filter;n&&["objectIds","distance","geometry","spatialRelationship","units","where","timeExtent"].forEach(a=>{n[a]!=null&&(e[a]=n[a])})}generateOutput(e){if(this.view==null)return;let t=[],i=[];if(e){for(let n of e.expressions){let{active:s,definitionExpression:a,pointCloudFilters:r}=n;s&&a&&t.push(`(${a})`),s&&r!=null&&r.length>0&&(i=i.concat(r))}this.updateFilter(e,t,i),this.generateURLParams(),this.filterUpdate.emit()}}numberWithCommas(e){return e.toLocaleString("en-US",{maximumFractionDigits:20})}scientificRounding(e,t,i){if(e==null)return;let n;if(!String(e).includes("e"))n=Math[i](e*Math.pow(10,t))/Math.pow(10,t);else{let[s,a]=String(e).split("e").map(c=>Number(c)),r=a+t;n=Math[i](+`${s}e${r}`)*Math.pow(10,-t)}return+n.toFixed(t)}roundMinNumberDown(e,t){return this.scientificRounding(e,t,"floor")}roundMaxNumberUp(e,t){return this.scientificRounding(e,t,"ceil")}roundNumber(e,t){return this.scientificRounding(e,t,"round")??e}setExpressionFormat(e,t,i){if(e?.popupTemplate!=null){let n=e?.popupTemplate.fieldInfos?.find(({fieldName:s})=>s===i);n?.format&&(t.format=n.format)}}getInitDefExprFromLayer(e){return e.type==="sublayer"?this.initMapImageExpressions?.[e?.layer?.id??""]?.[e.id]??"":this.initDefExpressions?.[e.id]??""}getInitDefExprFromLayerExpression(e){return e?.sublayerId!=null?this.initMapImageExpressions?.[e.id]?.[e.sublayerId]??"":this.initDefExpressions?.[e.id]??""}findFilterLayer(e){let i=this.view.map?.allLayers.concat(this.view.map?.allTables)?.find(({id:n})=>n===e.id);return i.type==="map-image"?i?.findSublayerById(e.sublayerId):i}createLabel(e,t){if(e.type==="coded-value")return e?.codedValues?.[t];if(e.type==="number"&&typeof t=="number"){let i=t;return e.format?.places!=null&&(i=this.roundNumber(t,e.format.places)),e.format?.digitSeparator?this.numberWithCommas(i):i}if(e.type==="date"&&!e.dateOnly){let i=this.intl.convertDateFormatToIntlOptions("short-date-long-time");return this.intl.formatDate(t,i)}return t}buildDateExpression(e,t){if(e){let i=new Date(e),n=new Date(e),s=new Date(n.setDate(i.getDate()+1)),a=`${i.getFullYear()}-${i.getMonth()+1}-${i.getDate()}`,r=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}`,o=`${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}`,c=`${s.getFullYear()}-${s.getMonth()+1}-${s.getDate()}`;return`${t} BETWEEN '${a} ${r}' AND '${c} ${o}'`}}async getQueryLayer(e){let t=e.type==="sublayer"?await e.createFeatureLayer():e;if(!t)throw new Error("Failed to create feature layer");return t}applyCacheHint(e,t){e?.capabilities?.query?.supportsCacheHint&&(t.cacheHint=!0)}applyQueryGeometryFromExtentSelector(e){if(!this.extentSelector||!this.extentSelectorConfig)return;let t=this.getExtent(this.extentSelector,this.extentSelectorConfig);t&&(e.geometry=t,e.spatialRelationship="intersects")}updateInitExpressions(){if(this.view==null)return;let e=this.view.map;this.initDefExpressions={},this.initPointCloudFilters={},this.initMapImageExpressions={},e.allLayers.concat(e.allTables).forEach(t=>{if(!p.includes(t.type))return;let i=t;if(i.type==="point-cloud")this.initPointCloudFilters||(this.initPointCloudFilters={}),this.initPointCloudFilters[i.id]=i.filters;else if(i.type==="map-image")this.initMapImageExpressions||(this.initMapImageExpressions={}),this.initMapImageExpressions[i.id]=i.allSublayers.reduce((n,s)=>(n[s.id]=s.definitionExpression??"",n),{});else{if(!this.initDefExpressions)return;this.initDefExpressions[i.id]=i.definitionExpression??""}})}get el(){return x(this)}static get watchers(){return{view:["watchViewHandler"],layerExpressions:["watchLayerExpressions"]}}};I.style=k;export{I as instant_apps_filter_list};
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{a as w}from"./IUBGSA3I.js";import{e as E}from"./6QWS7JEN.js";import{B as y,C as b}from"./CLZ42RFU.js";import"./6CPKRUI3.js";import{a as F,c as l,d as C,e as x,f as m}from"./KZWHC2ST.js";import"./B4HONVWZ.js";var L="instant-apps-filter-list calcite-mode-light",$="instant-apps-filter-list calcite-mode-dark",p=["feature","geojson","wfs","csv","scene","subtype-group","point-cloud","map-image","sublayer"];function g(e){return e.replaceAll("'","''")}function f(e,t=!1){if(e){let i=new Date(e),n=`${i.getFullYear()}-${i.getMonth()+1}-${i.getDate()}`;if(t){let s=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}`;return`${n} ${s}`}else return n}}function D(e){if(e!=null){e.value=["",""];let t=e.shadowRoot?.querySelectorAll("calcite-input");if(t!=null)for(let i of t)i.value=""}}var S=":host{display:block}.instant-apps-filter-list *{box-sizing:border-box}.instant-apps-filter-list__container{height:100%}.instant-apps-filter-list__container calcite-block:last-of-type{margin-bottom:0}.instant-apps-filter-list__footer{padding:12px;display:flex}.instant-apps-filter-list__footer calcite-button:nth-child(2){margin-left:6px}.instant-apps-filter-list__item-container,.instant-apps-filter-list__item-container--user-input{display:flex;justify-content:space-between;align-items:center}.instant-apps-filter-list__item-container:not(:last-child),.instant-apps-filter-list__item-container--user-input:not(:last-child){padding-bottom:20px}.instant-apps-filter-list__item-container--user-input{margin:0;display:flex;flex-direction:column;align-items:flex-start}.instant-apps-filter-list__item-container--user-input>span{margin:0 0 6px;font-size:14px;font-weight:normal}.instant-apps-filter-list__item-container--user-input calcite-combobox{width:100%;font-size:16px;--calcite-combobox-input-height:24px}.instant-apps-filter-list__number-input-container{width:100%;display:flex;justify-content:center}.instant-apps-filter-list__number-input-container calcite-slider{width:90%}.instant-apps-filter-list__date-picker-input-container{display:flex;align-items:center;justify-content:unset;width:100%}.instant-apps-filter-list__date-picker-input-container calcite-action{height:64px;border-top:1px solid var(--calcite-color-border-input);border-right:1px solid var(--calcite-color-border-input);border-bottom:1px solid var(--calcite-color-border-input)}.instant-apps-filter-list__title{margin-right:20px}.instant-apps-filter-list__title>p{font-size:14px;font-weight:normal;margin:0}.instant-apps-filter-list__checkbox-container{display:flex}.instant-apps-filter-list__checkbox-container calcite-checkbox{height:18px}.instant-apps-filter-list__operator-description{margin:0;--calcite-font-size--1:12px}.instant-apps-filter-list__zoom-to{display:flex;justify-content:flex-end;margin:8px 0 20px}.instant-apps-filter-list__zoom-to calcite-action{width:min-content}.instant-apps-filter-list calcite-input-date-picker{--calcite-font-size--1:16px}@media (prefers-reduced-motion){.instant-apps-filter-list calcite-loader{--calcite-internal-duration-factor:2;--calcite-internal-animation-timing-slow:calc(300ms * 2)}}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__header-container{background:#2b2b2b;color:#fff}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__operator-description{background:#353535}",k=S,u={base:"instant-apps-filter-list",filterContainer:"instant-apps-filter-list__container",footer:"instant-apps-filter-list__footer",filterItemTitle:"instant-apps-filter-list__title",filterItemContainer:"instant-apps-filter-list__item-container",filterUIItemContainer:"instant-apps-filter-list__item-container--user-input",checkboxContainer:"instant-apps-filter-list__checkbox-container",numberInputContainer:"instant-apps-filter-list__number-input-container",dateInputContainer:"instant-apps-filter-list__date-picker-input-container",operatorDesc:"instant-apps-filter-list__operator-description",zoomTo:"instant-apps-filter-list__zoom-to"},I=class{constructor(e){F(this,e),this.filterListReset=m(this,"filterListReset",7),this.filterUpdate=m(this,"filterUpdate",7),this.isLayerExpUpdated=!1,this.layerExpressions=void 0,this.autoUpdateUrl=!1,this.closeBtn=!1,this.closeBtnOnClick=void 0,this.comboboxOverlayPositioning="absolute",this.closeBtnText=void 0,this.openFilters=!1,this.extentSelector=!1,this.extentSelectorConfig=void 0,this.urlParams=void 0,this.filterCount=0,this.view=void 0,this.zoomBtn=!0,this.resetBtn=!0,this.resetFiltersOnDisconnect=!0,this.loading=void 0,this.filterLayerExpressions=void 0,this.messages=void 0,this.baseClass=L,this.initDefExpressions=void 0,this.initMapImageExpressions=void 0,this.initPointCloudFilters=void 0}watchViewHandler(){this.handleWhenView()}watchLayerExpressions(){this.resetAllFilters(),this.filterLayerExpressions=structuredClone(this.layerExpressions),this.handleLayerExpressionsUpdate()}async getFilterInitState(){return await Promise.resolve({initDefExpressions:this.initDefExpressions,initMapImageExpressions:this.initMapImageExpressions,initPointCloudFilters:this.initPointCloudFilters})}async forceReset(){return this.resetExpressions(),await Promise.resolve(!0)}async updateInitDefExpressions(e){return this.initDefExpressions=e.initDefExpressions,this.initMapImageExpressions=e.initMapImageExpressions,this.initPointCloudFilters=e.initPointCloudFilters,await Promise.resolve(!0)}async getCurrentLayerExpressions(){let e=structuredClone(this.filterLayerExpressions);return await Promise.resolve(e)}async handleUpdatingT9nData(e){return e==null?await Promise.resolve(!0):(this.filterLayerExpressions?.forEach(t=>{let i=e?.find(n=>n.id===t.id);i!=null&&(t.title=i.title,t.expressions?.forEach(n=>{let s=i.expressions?.find(a=>a.id===n.id);s!=null&&(n.name=s.name)}))}),await Promise.resolve(!0))}connectedCallback(){this.layerExpressions==null&&this.view==null||(this.isLayerExpUpdated=!0,this.filterLayerExpressions=structuredClone(this.layerExpressions),this.handleLayerExpressionsUpdate())}async componentWillLoad(){this.baseClass=w(this.el)==="dark"?$:L,await this.initializeModules(),E(this),!this.isLayerExpUpdated&&(this.isLayerExpUpdated=!0,this.filterLayerExpressions=this.layerExpressions!=null?structuredClone(this.layerExpressions):[],this.view!=null&&this.handleLayerExpressionsUpdate())}componentDidRender(){this.resetBtnEl!=null&&(this.resetBtnEl.disabled=!(this.filterLayerExpressions&&this.filterLayerExpressions.length>0))}disconnectedCallback(){this.resetFiltersOnDisconnect&&(this.isLayerExpUpdated=!1,this.filterLayerExpressions=structuredClone(this.layerExpressions),this.resetAllFilters())}async initializeModules(){let[e,t]=await Promise.all([b(),y()]);this.geometryJsonUtils=t,this.intl=e}render(){let e=this.loading?this.renderLoading():this.initFilterConfig(),t=this.renderFooter();return l(C,{key:"3db1b211528d0ebe2cc379b9dccbd59c38c2f7c4"},l("calcite-panel",{key:"b46732d02815e1ccd7f9355daf5470b0e5080918",class:this.baseClass,ref:i=>this.panelEl=i},l("slot",{key:"0b6b2021c89c4aa78f8a23d34363520a1ebdf21c",slot:"header-content",name:"filter-header-content"}),l("slot",{key:"70bd30b6dc8d0eada179abf13b713e8df852f059",slot:"header-actions-end",name:"filter-header-actions-end"}),l("div",{key:"filter-container",class:u.filterContainer},e,t)))}renderLoading(){return l("calcite-loader",{label:"Loading filters..."})}renderFilter(e){let{id:t}=e;return e.expressions.map((i,n)=>i.type==="checkbox"||i.type==null?l("div",{key:`${t}-${n}`,class:u.filterItemContainer},l("div",{class:u.filterItemTitle},l("p",null,i.name)),l("div",{class:u.checkboxContainer},l("calcite-checkbox",{id:i.id.toString(),scale:"l",checked:i?.active,onCalciteCheckboxChange:this.handleCheckboxChange.bind(this,e,i)}))):this.initInput(e,i))}renderLayerBlock(){return this.filterLayerExpressions?.map(e=>this.renderFilterBlocks(e))}renderFilterBlocks(e){let t=this.renderFilter(e),{operator:i}=e,n=i?.trim()==="OR"?"orOperator":"andOperator",s=this.renderZoomTo(e);return l("calcite-block",{key:e.id,heading:e.title,description:this.messages?.[n],open:this.openFilters?!0:void 0,collapsible:!0},s,t)}renderCombobox(e,t){return l("label",{key:"combo-select",class:u.filterUIItemContainer},l("span",null,t.name),l("calcite-combobox",{id:t.id.toString(),onCalciteComboboxChange:this.handleComboSelect.bind(this,t,e),label:t.name,placeholder:t.placeholder,selectionMode:"multiple","max-items":"6",scale:"s",overlayPositioning:this.comboboxOverlayPositioning},t.fields?.map((i,n)=>this.renderComboboxItem(t,i,n))))}renderComboboxItem(e,t,i){let n=this.createLabel(e,t),a=e?.selectedFields?.includes(t)??!1;return l("calcite-combobox-item",{key:`${n}-${i}`,value:t,heading:`${n}`,selected:a})}initFilterConfig(){if(this.filterLayerExpressions&&this.filterLayerExpressions.length>0){if(this.filterLayerExpressions.length===1){let{operator:e}=this.filterLayerExpressions[0],t=e?.trim()==="OR"?"orOperator":"andOperator",i=this.renderZoomTo(this.filterLayerExpressions[0]);return l("calcite-block",{class:u.operatorDesc,heading:this.messages?.[t],open:!0},i,this.renderFilter(this.filterLayerExpressions[0]))}else if(this.filterLayerExpressions.length>1)return this.renderLayerBlock()}}renderNumberSlider(e,t){let i=t?.min,n=t?.max,s=t?.step?t.step:1,a=i!=null&&n!=null,r=t?.field??"",o=t?.range?.min!=null?t.range.min:i,c=t?.range?.max!=null?t.range.max:n,d=[o,c];return a?l("label",{key:t?.id.toString(),class:u.filterUIItemContainer},l("span",null,t?.name),l("div",{class:u.numberInputContainer},l("calcite-slider",{id:t?.id.toString(),onCalciteSliderChange:this.handleSliderChange.bind(this,t,e),min:i,max:n,minValue:i,maxValue:n,minLabel:this.messages?.minSlider?.replace("{field}",r),maxLabel:this.messages?.maxSlider?.replace("{field}",r),step:s,labelHandles:!0,snap:!0,value:d,"group-separator":t?.format?.digitSeparator,precise:!0}))):void 0}renderDatePicker(e,t){let{min:i,max:n}=t,s=[t?.range?.min,t?.range?.max];return i!=null&&n!=null?l("label",{class:u.filterUIItemContainer},l("span",null,t?.name),l("div",{class:u.dateInputContainer},l("calcite-input-date-picker",{id:t?.id.toString(),onCalciteInputDatePickerChange:this.handleDatePickerRangeChange.bind(this,t,e),min:i,max:n,"overlay-positioning":"fixed",lang:this.intl?.getLocale()??"en",layout:"vertical",value:s,range:!0}),l("calcite-action",{onClick:this.handleResetDatePicker.bind(this,t,e),icon:"reset",text:this.messages?.resetDatePicker,scale:"s"}))):null}renderFooter(){let e=this.closeBtnText??this.messages?.close,t=this.closeBtn&&this.resetBtn?"half":"full";return l("div",{class:u.footer,slot:"footer"},this.resetBtn?l("calcite-button",{appearance:"outline",width:t,ref:i=>this.resetBtnEl=i,onClick:this.handleResetFilter.bind(this)},this.messages?.resetFilter):void 0,this.closeBtn?l("calcite-button",{appearance:"solid",width:t,kind:"brand",onClick:this.closeBtnOnClick?.bind(this)},e):void 0)}renderZoomTo(e){let t=e?.sublayerId?`zoom-to-${e.id}-${e.sublayerId}`:`zoom-to-${e.id}`;return this.zoomBtn?l("div",{class:u.zoomTo},l("calcite-button",{id:t,appearance:"transparent",kind:"neutral",scale:"s",iconStart:"magnifying-glass-plus",onClick:this.handleZoomTo.bind(this,e)},this.messages?.zoomTo)):void 0}handleResetDatePicker(e,t){let i=this.panelEl.querySelector(`[id='${e.id}']`);D(i),e.active=!1,e.definitionExpression=void 0,e.range=void 0,this.generateOutput(t)}initInput(e,t){let{type:i,numDisplayOption:n,displayOption:s}=t;if(i==="string"||i==="coded-value"||(i==="number"||i==="range"||i==="date")&&(n==="drop-down"||s==="drop-down"))return this.renderCombobox(e,t);if(i==="number"||i==="range")return this.renderNumberSlider(e,t);if(i==="date")return this.renderDatePicker(e,t)}async initExpressions(){if(this.loading=!0,this.filterLayerExpressions==null||this.view==null){this.loading=!1;return}await this.processExpressions(),this.loading=!1}async processExpressions(){this.filterLayerExpressions&&await Promise.all(this.filterLayerExpressions.map(async e=>{await Promise.all((e.expressions||[]).map(async t=>await this.setInitExpression(e,t)))}))}handleResetFilter(){this.resetExpressions(),this.resetAllFilters(),this.generateURLParams(),this.filterListReset.emit()}resetExpressions(){this.filterLayerExpressions?.forEach(e=>{e.expressions?.forEach(t=>{let{type:i,numDisplayOption:n,displayOption:s}=t,a="";i==="string"||i==="coded-value"||i==="date"&&(n==="drop-down"||s==="drop-down")||(i==="number"||i==="range")&&(n==="drop-down"||s==="drop-down")?a="combobox":i==="date"?a="datePicker":(i==="number"||i==="range")&&(a="numberRange"),a?this.resetExpressionUI(a,t):this.resetCheckbox(t),t.active=!1})})}resetExpressionUI(e,t){let{id:i}=t;switch(e){case"combobox":{t.selectedFields=void 0;let n=this.panelEl.querySelector(`[id='${i}']`);n&&Array.from(n.children).forEach(s=>{s.selected=!1});break}case"datePicker":{t.range=void 0;let n=this.panelEl.querySelector(`[id='${i}']`);D(n);break}case"numberRange":{t.range=void 0;let n=this.panelEl.querySelector(`[id='${i}']`);n&&(n.minValue=t.min,n.maxValue=t.max);break}}}resetCheckbox(e){let{id:t}=e,i=this.panelEl.querySelector(`[id='${t}']`);i!=null&&(i.checked=!1)}resetAllFilters(){this.view?.map?.allLayers?.concat(this.view?.map?.allTables)?.forEach(t=>{if(!p.includes(t.type))return;let i=t;if(i.type==="point-cloud"){if(!this.initPointCloudFilters)return;i.filters=this.initPointCloudFilters[i.id]}else if(i.type==="map-image")i.allSublayers.forEach(n=>{n.definitionExpression=this.initMapImageExpressions?.[i.id]?.[n.id]??""});else{if(this.initDefExpressions==null)return;i.definitionExpression=this.initDefExpressions[i.id]}})}async updateStringExpression(e,t){let i=this.findFilterLayer(e);return await this.getFeatureAttributes(i,t),this.handleDateField(i,t),t?.selectedFields?(t.definitionExpression=this.createDefinitionExpression(t),!0):!1}handleDateField(e,t){t.type==="date"&&e.fields.find(({name:n})=>n===t.field)?.type==="date-only"&&(t.dateOnly=!0)}createDefinitionExpression(e){if(!e.selectedFields?.length)return"";let t=e.selectedFields.map(i=>typeof i=="number"?i:`'${g(i)}'`);return`${e.field} IN (${t.join(",")})`}async updateNumberExpression(e,t){if(!t?.min&&t?.min!==0||!t?.max&&t?.max!==0){let i=this.findFilterLayer(e),{field:n}=t;if(n!=null)if(this.setExpressionFormat(i,t,n),t?.numDisplayOption==="drop-down"||t?.displayOption==="drop-down")await this.getFeatureAttributes(i,t);else{let a=(await this.calculateMinMaxStatistics(i,n))?.[0]?.attributes;if(t.format?.places!=null?(t.min=this.roundMinNumberDown(a[`min${n}`],t.format.places),t.max=this.roundMaxNumberUp(a[`max${n}`],t.format.places)):(t.min=a[`min${n}`],t.max=a[`max${n}`]),t?.range&&Object.keys(t.range).length){let{min:r,max:o}=t.range;return t.definitionExpression=`${t.field} BETWEEN ${r} AND ${o}`,!0}}}return!1}async updateDateExpression(e,t){let{field:i,range:n}=t,s=this.findFilterLayer(e),r=(await this.calculateMinMaxStatistics(s,i))?.[0]?.attributes;if(t.min=f(r[`min${i}`]),t.max=f(r[`max${i}`]),n!=null&&(n?.max!=null||n?.min!=null)){let{min:o,max:c}=n;if(o=o?.replace("+"," "),c=c?.replace("+"," "),o||c){let d=c&&!o?"<":!c&&o?">":null;return d?t.definitionExpression=`${i} ${d} '${o??c}'`:t.definitionExpression=`${i} BETWEEN '${o}' AND '${c}'`,!0}}return!1}async updateCodedValueExpression(e,t,i){if(!i?.domain||i?.domain?.type!=="coded-value")return!1;let n=this.findFilterLayer(e);await this.getFeatureAttributes(n,t);let a=i.domain.codedValues.reduce((r,{code:o,name:c})=>(r[o]=c,r),{});if(t.codedValues=a,t.selectedFields?.length){let r=t.selectedFields.map(o=>typeof o=="number"?o:`'${g(o)}'`).join(",");return t.definitionExpression=`${t.field} IN (${r})`,!0}return!1}updateRangeExpression(e,t){if(!t?.domain||t?.domain?.type!=="range")return!1;let{field:i,range:n}=e;return e.min=t.domain.minValue,e.max=t.domain.maxValue,n&&Object.keys(n).length?(e.definitionExpression=`${i} BETWEEN ${n.min} AND ${n.max}`,!0):!1}async getFeatureAttributes(e,t){if(!this.isLayerSupported(e)){t.fields=[];return}let i=await this.getQueryLayer(e),{maxRecordCount:n,supportsMaxRecordCountFactor:s}=this.extractQueryCapabilities(e),a=await i.queryFeatureCount(),r=this.createQuery(i,t);await this.queryDistinctFeatures(i,r,t),this.shouldPaginate(n,a,s)&&this.handlePagination(i,r,n,s,a,t)}isLayerSupported(e){return e&&p.includes(e.type)}extractQueryCapabilities(e){return{maxRecordCount:e.capabilities?.query?.maxRecordCount??e.sourceJSON?.maxRecordCount,supportsMaxRecordCountFactor:e.capabilities?.query?.supportsMaxRecordCountFactor}}createQuery(e,t){let i=e.createQuery();this.applyCacheHint(e,i);let n=t?.field;if(n){let s=this.getInitDefExprFromLayer(e);i.where=s||"1=1",i.outFields=[n],i.orderByFields=[`${n} ASC`],i.returnDistinctValues=!0,i.returnGeometry=!1,i.maxRecordCountFactor=5,this.applyQueryGeometryFromExtentSelector(i)}return i}async queryDistinctFeatures(e,t,i){if(!t.outFields)return;let n=await this.queryForFeatures(e,t,t.outFields[0]);n?.length&&(i.fields=[...new Set(n)],i.type==="string"?i.fields=i.fields.sort((s,a)=>s.localeCompare(a)):i.type==="number"&&(i.fields=i.fields.sort((s,a)=>s-a)))}getQueryCount(e,t){return t?e*5:e}shouldPaginate(e,t,i){let n=this.getQueryCount(e,i);return e!=null&&t>n}async handlePagination(e,t,i,n,s,a){let r=this.getQueryCount(i,n),o=[];for(let c=r;c<s;c+=r){let d=t.clone();d.num=i,d.start=c,o.push(this.queryForFeatures(e,d,t?.outFields?.[0]??""))}Promise.all(o).then(c=>{c.forEach(d=>{d?.length&&a.fields&&a.fields.push(...d)}),a.type==="string"?a.fields=[...new Set(a.fields)].sort((d,h)=>d.localeCompare(h)):a.type==="number"?a.fields=[...new Set(a.fields)].sort((d,h)=>d-h):a.fields=[...new Set(a.fields)].sort()})}async queryForFeatures(e,t,i){return(await e.queryFeatures(t))?.features.filter(a=>a.attributes?.[i])?.map(a=>a.attributes?.[i])}async calculateMinMaxStatistics(e,t){if(!e||!p.includes(e.type)||!t)return[];let i=this.createStatisticsQuery(e,t);return(await e.queryFeatures(i))?.features||[]}createStatisticsQuery(e,t){let i=e.createQuery();return i.where=this.getInitDefExprFromLayer(e)||"1=1",this.applyCacheHint(e,i),i.outStatistics=[{onStatisticField:t,outStatisticFieldName:`max${t}`,statisticType:"max"},{onStatisticField:t,outStatisticFieldName:`min${t}`,statisticType:"min"}],this.applyQueryGeometryFromExtentSelector(i),i}getExtent(e,t){if(e&&t){let{constraints:i}=t,s={...i}?.geometry;if(s){let a="extent"in s?s:this.geometryJsonUtils.fromJSON(s);if(a?.type==="extent"||a?.type==="polygon")return a}}}async setInitExpression(e,t){if(!t.field||!t.type){await this.updateExpression(e,t,void 0);return}let i=this.findFilterLayer(e);i&&((i.loadStatus==="not-loaded"||i.loadStatus==="failed")&&await i.load(),await i.when(async()=>{let n=i.fields?.find(({name:a})=>a===t.field),s=n?.domain?.type;t.type=s==="coded-value"||s==="range"?s:t.type,await this.updateExpression(e,t,n)}))}async updateExpression(e,t,i){await this.handleExpressionType(e,t,i)&&this.generateOutput(e)}async handleExpressionType(e,t,i){switch(t.type){case"string":return await this.updateStringExpression(e,t);case"number":return await this.updateNumberExpression(e,t);case"date":return await this.updateDateExpressionBasedOnDisplayOption(e,t);case"coded-value":return await this.updateCodedValueExpression(e,t,i);case"range":return await this.updateRangeExpressionBasedOnDisplayOption(e,t,i);case"checkbox":case null:case void 0:return t.active??!1;default:return!1}}async updateDateExpressionBasedOnDisplayOption(e,t){return t.displayOption==="drop-down"?await this.updateStringExpression(e,t):await this.updateDateExpression(e,t)}async updateRangeExpressionBasedOnDisplayOption(e,t,i){return t.displayOption==="drop-down"?await this.updateStringExpression(e,t):this.updateRangeExpression(t,i)}updateRangeExpressions(e,t,i,n){let s=this.getInitDefExprFromLayerExpression(t);(n||n===0)&&(i||i===0)&&(n===e?.min&&i===e?.max?(e.definitionExpression=void 0,e.active=!1):(e.definitionExpression=s?`(${s}) AND ${e?.field} BETWEEN ${n} AND ${i}`:`${e?.field} BETWEEN ${n} AND ${i}`,e.active=!0)),e.range={min:n,max:i}}handleCheckboxChange(e,t,i){let n=i.target;t.active=n.checked,this.generateOutput(e)}handleSliderChange(e,t,i){let{maxValue:n,minValue:s}=i.target;this.updateRangeExpressions(e,t,n,s),this.generateOutput(t)}handleComboSelect(e,t,i){let s=i.target.selectedItems,{field:a,type:r}=e;if(e.selectedFields=s.map(({value:o})=>o),s.length){let o=s.map(({value:c})=>typeof c=="number"?c:`'${g(c)}'`);e.definitionExpression=r==="date"?o.map(c=>this.buildDateExpression(c,a)).join(" OR "):`${a} IN (${o.join(",")})`,e.active=!0}else e.definitionExpression=void 0,e.active=!1;this.generateOutput(t)}handleDatePickerRangeChange(e,t,i){let n=i.target,[s,a]=n.valueAsDate,r=s?f(Math.floor(s.getTime()),!0):void 0,o=a?f(Math.floor(a.getTime()),!0):void 0;(r||o)&&(e.definitionExpression=this.constructDefinitionExpression(e.field,r,o),e.range={min:r,max:o},e.active=!0,this.generateOutput(t))}constructDefinitionExpression(e,t,i){return t?i?`${e} BETWEEN '${t}' AND '${i}'`:`${e} > '${t}'`:`${e} < '${i}'`}handleURLParams(){if(!("URLSearchParams"in window))return;let t=new URLSearchParams(document.location.search).get("filter");if(!t){this.filterCount=0;return}let i=t.split(";").map(n=>JSON.parse(n));this.filterCount=this.applyFilters(i)}applyFilters(e){let t=0;return e.forEach(i=>{let n=this.filterLayerExpressions?.find(s=>s.id===i.layerId);n&&n.expressions?.forEach(s=>{s.id?.toString()===i.expressionId?.toString()&&(this.activateExpression(s,i),t++)})}),t}activateExpression(e,t){e.active=!0,t.type==="range"?e.range=t.range:t.type==="select"&&(e.selectedFields=t.selectedFields)}createURLParamExpression(e,t){let{id:i,range:n,selectedFields:s,type:a}=t;return a==="string"||a==="coded-value"||t?.numDisplayOption==="drop-down"||t?.displayOption==="drop-down"?{type:"select",layerId:e.id,expressionId:i.toString(),selectedFields:s}:a==="number"||a==="range"||a==="date"?{type:"range",layerId:e.id,expressionId:i.toString(),range:n}:{layerId:e.id,expressionId:i.toString()}}autoUpdateURLCheck(e){if(this.autoUpdateUrl){let t=e.toString()?`${window.location.pathname}?${e}`.trim():window.location.pathname;window.history.replaceState({},"",t)}}generateURLParams(){if(!("URLSearchParams"in window))return;let e=new URLSearchParams(window.location.search),t=this.filterLayerExpressions?.flatMap(i=>i?.expressions?.filter(n=>n.active).map(n=>JSON.stringify(this.createURLParamExpression(i,n)))||[])||[];this.filterCount=t.length,t.length>0?e.set("filter",t.join(";")):e.delete("filter"),this.autoUpdateURLCheck(e),this.urlParams=e}updateFilter(e,t,i){let{id:n}=e,s=this.view.map?.findLayerById(n)??this.view.map?.findTableById(n);if(s!=null)if(s.type==="point-cloud")this.updateFilterLayerPCLFilter(s,i);else if(s.type==="map-image"){let a=s.findSublayerById(e?.sublayerId);a!=null&&this.updateFilterLayerDefExpression(a,t,e)}else this.updateFilterLayerDefExpression(s,t,e)}updateFilterLayerDefExpression(e,t,i){let{operator:n}=i,s=this.getInitDefExprFromLayer(e),a=t?.length>0&&s!=null&&s!==""?`(${t.join(n)}) AND (${s})`:t.length>0?t.join(n):s;e.definitionExpression=a}updateFilterLayerPCLFilter(e,t){e.filters=t}async handleWhenView(){if(this.view==null)return;await this.view.map.loadAll(),this.handleLayerExpressionsUpdate()}async handleLayerExpressionsUpdate(){this.updateInitExpressions(),this.handleURLParams(),this.initExpressions()}async handleZoomTo(e){let t=e?.sublayerId?`#zoom-to-${e.id}-${e.sublayerId}`:`#zoom-to-${e.id}`,i=this.panelEl.querySelector(t),n=(s,a)=>{i&&(i.loading=s,i.disabled=a)};if(n(!0,!0),await this.getZoomToExtent(e),this.zoomToExtent){let s=this.zoomToExtent.type==="point"&&this.zoomToExtent.count===1?{target:this.zoomToExtent.extent,zoom:10}:this.zoomToExtent.extent;await this.view.goTo(s)}n(!1,!1)}async getZoomToExtent(e){let i=this.view.allLayerViews.find(({layer:s})=>s.id===e.id).layer,n=i.type==="map-image"?i.findSublayerById(e.sublayerId):i;if(n&&n.type!=="point-cloud"&&p.includes(n?.type)){let s=await this.getQueryLayer(n),a=s.createQuery();a.where=s.definitionExpression??"1=1";let r=await s.queryExtent(a);this.zoomToExtent={...r,type:s.geometryType}}}applyFilterToQuery(e,t){let i=this.view.allLayerViews.find(({layer:s})=>s.id===t.id),n=i?.featureEffect?.filter??i.filter;n&&["objectIds","distance","geometry","spatialRelationship","units","where","timeExtent"].forEach(a=>{n[a]!=null&&(e[a]=n[a])})}generateOutput(e){if(this.view==null)return;let t=[],i=[];if(e){for(let n of e.expressions){let{active:s,definitionExpression:a,pointCloudFilters:r}=n;s&&a&&t.push(`(${a})`),s&&r!=null&&r.length>0&&(i=i.concat(r))}this.updateFilter(e,t,i),this.generateURLParams(),this.filterUpdate.emit()}}numberWithCommas(e){return e.toLocaleString("en-US",{maximumFractionDigits:20})}scientificRounding(e,t,i){if(e==null)return;let n;if(!String(e).includes("e"))n=Math[i](e*Math.pow(10,t))/Math.pow(10,t);else{let[s,a]=String(e).split("e").map(c=>Number(c)),r=a+t;n=Math[i](+`${s}e${r}`)*Math.pow(10,-t)}return+n.toFixed(t)}roundMinNumberDown(e,t){return this.scientificRounding(e,t,"floor")}roundMaxNumberUp(e,t){return this.scientificRounding(e,t,"ceil")}roundNumber(e,t){return this.scientificRounding(e,t,"round")??e}setExpressionFormat(e,t,i){if(e?.popupTemplate!=null){let n=e?.popupTemplate.fieldInfos?.find(({fieldName:s})=>s===i);n?.format&&(t.format=n.format)}}getInitDefExprFromLayer(e){return e.type==="sublayer"?this.initMapImageExpressions?.[e?.layer?.id??""]?.[e.id]??"":this.initDefExpressions?.[e.id]??""}getInitDefExprFromLayerExpression(e){return e?.sublayerId!=null?this.initMapImageExpressions?.[e.id]?.[e.sublayerId]??"":this.initDefExpressions?.[e.id]??""}findFilterLayer(e){let i=this.view.map?.allLayers.concat(this.view.map?.allTables)?.find(({id:n})=>n===e.id);return i.type==="map-image"?i?.findSublayerById(e.sublayerId):i}createLabel(e,t){if(e.type==="coded-value")return e?.codedValues?.[t];if(e.type==="number"&&typeof t=="number"){let i=t;return e.format?.places!=null&&(i=this.roundNumber(t,e.format.places)),e.format?.digitSeparator?this.numberWithCommas(i):i}if(e.type==="date"&&!e.dateOnly){let i=this.intl.convertDateFormatToIntlOptions("short-date-long-time");return this.intl.formatDate(t,i)}return t}buildDateExpression(e,t){if(e){let i=new Date(e),n=new Date(e),s=new Date(n.setDate(i.getDate()+1)),a=`${i.getFullYear()}-${i.getMonth()+1}-${i.getDate()}`,r=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}`,o=`${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}`,c=`${s.getFullYear()}-${s.getMonth()+1}-${s.getDate()}`;return`${t} BETWEEN '${a} ${r}' AND '${c} ${o}'`}}async getQueryLayer(e){let t=e.type==="sublayer"?await e.createFeatureLayer():e;if(!t)throw new Error("Failed to create feature layer");return t}applyCacheHint(e,t){e?.capabilities?.query?.supportsCacheHint&&(t.cacheHint=!0)}applyQueryGeometryFromExtentSelector(e){if(!this.extentSelector||!this.extentSelectorConfig)return;let t=this.getExtent(this.extentSelector,this.extentSelectorConfig);t&&(e.geometry=t,e.spatialRelationship="intersects")}updateInitExpressions(){if(this.view==null)return;let e=this.view.map;this.initDefExpressions={},this.initPointCloudFilters={},this.initMapImageExpressions={},e.allLayers.concat(e.allTables).forEach(t=>{if(!p.includes(t.type))return;let i=t;if(i.type==="point-cloud")this.initPointCloudFilters||(this.initPointCloudFilters={}),this.initPointCloudFilters[i.id]=i.filters;else if(i.type==="map-image")this.initMapImageExpressions||(this.initMapImageExpressions={}),this.initMapImageExpressions[i.id]=i.allSublayers.reduce((n,s)=>(n[s.id]=s.definitionExpression??"",n),{});else{if(!this.initDefExpressions)return;this.initDefExpressions[i.id]=i.definitionExpression??""}})}get el(){return x(this)}static get watchers(){return{view:["watchViewHandler"],layerExpressions:["watchLayerExpressions"]}}};I.style=k;export{I as instant_apps_filter_list};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import"./B4HONVWZ.js";var l=async(e,r,o)=>{let t=r.orgUrlKey;return{type:"Layout",elements:[{labelKey:`${e}.fields.name.label`,scope:"/properties/name",type:"Control",options:{messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.name.requiredError`},{type:"ERROR",keyword:"maxLength",icon:!0,labelKey:`${e}.fields.name.maxLengthError`},{type:"ERROR",keyword:"format",icon:!0,labelKey:`${e}.fields.name.siteEntityTitleValidatorError`}]}},{scope:"/properties/_urlInfo",type:"Control",options:{type:"Control",control:"hub-composite-input-site-url",orgUrlKey:t,messages:[{type:"ERROR",keyword:"isUniqueDomain",labelKey:`${e}.fields.siteUrl.isUniqueError`,icon:!0}]}}]}};export{l as buildUiSchema};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import{a as t}from"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{a as t}from"./COLHBQ5X.js";import"./ZJXXAWMH.js";import"./XEO56VFL.js";import"./UHBAUGQ4.js";import"./BB7RJW6E.js";import"./4ME5QMIF.js";import"./R53BLRMX.js";import"./XFDA7NEB.js";import"./JDSGIOVR.js";import"./6XYU4BZS.js";import"./IP6ATOM6.js";import"./RIQZUFV2.js";import{a as r}from"./SFJHXT65.js";import"./RVOILI7H.js";import"./AH5AIEIN.js";import"./GUP4UK2N.js";import"./X6GE3EIS.js";import"./Z2MJRFIE.js";import"./T2DUZEDU.js";import"./N324UTZ5.js";import"./MVN27KOI.js";import"./Y4M5KS3M.js";import"./A3JKO4I4.js";import"./B4HONVWZ.js";var n=async(e,l,o)=>{let i=r(new Date,l.timeZone);return{type:"Layout",elements:[{labelKey:`${e}.fields.name.label`,scope:"/properties/name",type:"Control",options:{messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.name.requiredError`},{type:"ERROR",keyword:"maxLength",icon:!0,labelKey:"shared.fields.title.maxLengthError"}]}},{labelKey:`${e}.fields.date.label`,scope:"/properties/startDate",type:"Control",options:{control:"hub-field-input-date",min:i,messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.date.requiredError`},{type:"ERROR",keyword:"formatMinimum",icon:!0,labelKey:`${e}.fields.date.minDateError`}]}},{labelKey:`${e}.fields.allDay.label`,type:"Control",scope:"/properties/isAllDay",options:{control:"hub-field-input-switch"}},{labelKey:`${e}.fields.startTime.label`,scope:"/properties/startTime",type:"Control",rule:{condition:{scope:"/properties/isAllDay",schema:{const:!1}},effect:t.SHOW},options:{control:"hub-field-input-time",messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.startTime.requiredError`}]}},{labelKey:`${e}.fields.endTime.label`,scope:"/properties/endTime",type:"Control",rule:{condition:{scope:"/properties/isAllDay",schema:{const:!1}},effect:t.SHOW},options:{control:"hub-field-input-time",messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.endTime.requiredError`},{type:"ERROR",keyword:"formatExclusiveMinimum",icon:!0,labelKey:`${e}.fields.endTime.minTimeError`}]}}]}};export{n as buildUiSchema};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import{a as r}from"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{a as r}from"./YFG6Q4W4.js";import{D as n,I as o,c as i,d as t,q as s}from"./NNQAPUKF.js";import"./B4HONVWZ.js";var a=i`@layer{/** @license
|
5
5
|
* Copyright 2025 Esri
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import{a as d}from"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{a as d}from"./YFG6Q4W4.js";import{D as a,I as o,c as l,d as e,g as n,o as t}from"./NNQAPUKF.js";import"./B4HONVWZ.js";var r=l`/** @license
|
5
5
|
* Copyright 2025 Esri
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import{a as t}from"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import{a as t}from"./TQ24PIOH.js";import{a}from"./HTYN6WXU.js";import{b as o}from"./UHBAUGQ4.js";var m=async(e,l,s)=>{let r={label:`{{${e}.sections.group.picker.facets.label:translate}}`,key:"groups",display:"single-select",operation:"OR",options:[{label:`{{${e}.sections.group.picker.facets.myGroups.label:translate}}`,key:"my-group",selected:!0,predicates:[{owner:s.currentUser.username,typekeywords:{not:t}}]},{label:`{{${e}.sections.group.picker.facets.myOrganization.label:translate}}`,key:"my-organization",selected:!1,predicates:[{orgid:s.currentUser.orgId,searchUserAccess:"groupMember",searchUserName:s.currentUser.username,typekeywords:{not:t}}]}]};return s.communityOrgId&&r.options.push({label:`{{${e}.sections.group.picker.facets.myCommunity.label:translate}}`,key:"my-community",selected:!1,predicates:[{orgid:s.communityOrgId,searchUserAccess:"groupMember",searchUserName:s.currentUser.username,typekeywords:{not:t}}]}),{type:"Layout",elements:[{type:"Section",labelKey:`${e}.sections.basicInfo.label`,options:{headerTag:"h3"},elements:[{labelKey:`${e}.fields.name.label`,type:"Control",scope:"/properties/name",options:{control:"hub-field-input-input",messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.name.channelNameRequiredError`,allowShowBeforeInteract:!0}]}}]},{type:"Section",labelKey:`${e}.sections.settings.label`,options:{headerTag:"h3"},elements:[{type:"Control",scope:"/properties/allowAsAnonymous",labelKey:`${e}.fields.allowAsAnonymous.label`,options:{control:"hub-field-input-switch",helperText:{labelKey:`${e}.fields.allowAsAnonymous.helperText`}}},{type:"Control",scope:"/properties/blockWords",label:"Blocked words",labelKey:`${e}.fields.blockWords.label`,options:{control:"hub-field-input-input",type:"textarea",helperText:{labelKey:`${e}.fields.blockWords.helperText`},messages:[{type:"ERROR",keyword:"format",icon:!0,labelKey:`${e}.fields.blockWords.formatError`}]}}]},{type:"Section",labelKey:`${e}.sections.permissions.label`,options:{headerTag:"h3"},elements:[{type:"Section",labelKey:`${e}.sections.public.label`,options:{headerTag:"h4"},elements:[{type:"Control",scope:"/properties/publicConfigs",options:{control:"hub-field-permissions",roles:[{roleType:"anonymous",description:`{{${e}.fields.public.anonymous.description:translate}}`,label:`{{${e}.fields.public.anonymous.label:translate}}`,permissionLabels:[`{{${e}.sections.permissions.options.noAccess:translate}}`,`{{${e}.sections.permissions.options.view:translate}}`]},{roleType:"authenticated",description:`{{${e}.fields.public.authenticated.description:translate}}`,label:`{{${e}.fields.public.authenticated.label:translate}}`,permissionLabels:[`{{${e}.sections.permissions.options.noAccess:translate}}`,`{{${e}.sections.permissions.options.view:translate}}`,`{{${e}.sections.permissions.options.participate:translate}}`]}]}}]},{type:"Section",labelKey:`${e}.sections.organization.label`,options:{headerTag:"h4",variant:"variant-layout-editor"},elements:[{type:"Control",scope:"/properties/orgConfigs",options:{control:"hub-field-permissions",roles:[{roleType:"member",description:`{{${e}.fields.organization.member.description:translate}}`,label:`{{${e}.fields.organization.member.label:translate}}`,permissionLabels:[`{{${e}.sections.permissions.options.noAccess:translate}}`,`{{${e}.sections.permissions.options.view:translate}}`,`{{${e}.sections.permissions.options.participate:translate}}`]},{roleType:"admin",description:`{{${e}.fields.organization.admin.description:translate}}`,label:`{{${e}.fields.organization.admin.label:translate}}`,disabled:!0,permissionLabels:[`{{${e}.sections.permissions.options.owner:translate}}`]}]}}]},{type:"Section",labelKey:`${e}.sections.group.label`,options:{headerTag:"h4",variant:"variant-layout-editor"},elements:[{type:"Control",scope:"/properties/groupConfigs",options:{control:"hub-field-permissions",actions:[{label:`{{${e}.sections.group.picker.button:translate}}`,type:"add",options:{label:`{{${e}.sections.group.picker.title:translate}}`,entityType:"group",catalogs:[a(e,"allGroups","group",{user:s.currentUser})],facets:[r],defaultValues:{member:o,admin:o}}},{ariaLabel:`{{${e}.sections.group.remove.button:translate}}`,buttonStyle:"outline",buttonKind:"neutral",type:"remove",icon:"x"}],roles:[{roleType:"member",description:`{{${e}.fields.group.member.description:translate}}`,label:`{{${e}.fields.group.member.label:translate}}`,permissionLabels:[`{{${e}.sections.permissions.options.noAccess:translate}}`,`{{${e}.sections.permissions.options.view:translate}}`,`{{${e}.sections.permissions.options.participate:translate}}`]},{roleType:"admin",description:`{{${e}.fields.group.admin.description:translate}}`,label:`{{${e}.fields.group.admin.label:translate}}`,permissionLabels:[`{{${e}.sections.permissions.options.noAccess:translate}}`,`{{${e}.sections.permissions.options.view:translate}}`,`{{${e}.sections.permissions.options.participate:translate}}`,`{{${e}.sections.permissions.options.manage:translate}}`]}]}}]}]}]}};export{m as a};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
2
2
|
See https://js.arcgis.com/1.0/esri/copyright.txt for details.
|
3
|
-
v1.0.0-next.20250528 */
|
4
|
-
import"./
|
3
|
+
v1.0.0-next.20250528.2 */
|
4
|
+
import"./AT3MTRQS.js";import{b as C}from"./6WQKENE2.js";import"./HJJD6V2O.js";import"./XN5WML6J.js";import"./FPWLAJBO.js";import"./5BKTEPSJ.js";import"./UZVRS2XU.js";import"./3XJKMZHA.js";import"./4S2I2R2Q.js";import{a as O}from"./FEWEA7AN.js";import"./KZWHC2ST.js";import{c as S,d as F,j as b}from"./RS6TXCOP.js";import"./LBJE5BZD.js";import{c as E}from"./BACSZ2Z7.js";import{a as p,b as g}from"./SGXJZQ4L.js";import{b as T}from"./IIX655ZM.js";import{a as x}from"./YFG6Q4W4.js";import{D as I,E as _,I as v,c as m,d,g as o,o as c,q as w}from"./NNQAPUKF.js";import"./B4HONVWZ.js";var $=m`@layer{/** @license
|
5
5
|
* Copyright 2025 Esri
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|