@nasa-terra/components 0.0.52 → 0.0.53
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/cdn/assets/data-subsetter/download_subset_files.py.txt +66 -0
- package/cdn/chunks/{chunk.AZDOQAD2.js → chunk.223WZP6H.js} +23 -6
- package/cdn/chunks/{chunk.XU3NXPIM.js → chunk.23M4SIVO.js} +1 -1
- package/cdn/chunks/{chunk.WA7VSQ63.js → chunk.25HVLP5F.js} +3 -3
- package/cdn/chunks/{chunk.CUGOTRF4.js → chunk.2TPQ7A7J.js} +18 -5
- package/cdn/chunks/chunk.2UDWV64G.js +269 -0
- package/cdn/chunks/{chunk.3C36QKV5.js → chunk.32W6J6AF.js} +1 -1
- package/cdn/chunks/{chunk.43R5EAVL.js → chunk.3EMZ7G5B.js} +1 -1
- package/cdn/chunks/chunk.3R6XYEOH.js +11 -0
- package/{dist/chunks/chunk.GUGDC67O.js → cdn/chunks/chunk.4YQZGKJ7.js} +1 -1
- package/cdn/chunks/{chunk.6NEMJOXS.js → chunk.5BO2XAMO.js} +4 -4
- package/{dist/chunks/chunk.E7WQN374.js → cdn/chunks/chunk.5DKQRBZN.js} +1 -1
- package/cdn/chunks/{chunk.6QZW2ION.js → chunk.5IE6WY2F.js} +1 -1
- package/cdn/chunks/{chunk.UR52WPUB.js → chunk.66O6GDYQ.js} +9 -9
- package/cdn/chunks/{chunk.YNUC7HOB.js → chunk.6HMN7UIZ.js} +1 -1
- package/cdn/chunks/chunk.6OAPBJRP.js +49 -0
- package/cdn/chunks/{chunk.QIVBQSS7.js → chunk.6RS64LSV.js} +11 -11
- package/cdn/chunks/chunk.7LR3A5ZW.js +77 -0
- package/{dist/chunks/chunk.H6VZTFOA.js → cdn/chunks/chunk.7S5AAIY4.js} +1 -1
- package/{dist/chunks/chunk.CVHBTAL2.js → cdn/chunks/chunk.AOKWX7Z7.js} +1 -1
- package/{dist/chunks/chunk.E2A2V2YS.js → cdn/chunks/chunk.AVVGDACI.js} +1 -1
- package/cdn/chunks/{chunk.KQ335BKK.js → chunk.AZZ2NMUW.js} +1 -1
- package/{dist/chunks/chunk.3REGQAFA.js → cdn/chunks/chunk.B44THGJN.js} +1 -1
- package/cdn/chunks/{chunk.M7Y4QNCN.js → chunk.B6YTTGSP.js} +1 -1
- package/{dist/chunks/chunk.BGIZ44PS.js → cdn/chunks/chunk.C3ZO2T4M.js} +1 -1
- package/cdn/chunks/chunk.CMFROAGD.js +11 -0
- package/cdn/chunks/chunk.CPHER7LT.js +61 -0
- package/cdn/chunks/{chunk.ALXMBVVZ.js → chunk.DPC5A37S.js} +1 -1
- package/cdn/chunks/{chunk.6H77QHJW.js → chunk.DRO43W2Q.js} +1 -1
- package/cdn/chunks/{chunk.VAWFQPRW.js → chunk.DXUHDNR2.js} +1 -1
- package/cdn/chunks/{chunk.UVCDVWWN.js → chunk.ECXWQIDQ.js} +1 -1
- package/cdn/chunks/{chunk.YIABHSHN.js → chunk.EZMKGB3F.js} +5 -2
- package/cdn/chunks/{chunk.K6GAF43H.js → chunk.FCGFGTMF.js} +1 -1
- package/cdn/chunks/{chunk.6IMVZQLW.js → chunk.FOR62X7R.js} +2 -2
- package/cdn/chunks/{chunk.6LGRNEZ7.js → chunk.FS3ZYOYJ.js} +1 -1
- package/cdn/chunks/{chunk.LOCO37M5.js → chunk.FVNQDVSU.js} +438 -438
- package/cdn/chunks/chunk.FYWRHDMM.js +1314 -0
- package/cdn/chunks/{chunk.XO3SOVHY.js → chunk.G3K475WP.js} +1 -1
- package/cdn/chunks/{chunk.TJW5I73A.js → chunk.G6DIOURT.js} +1 -1
- package/{dist/chunks/chunk.MWJRQKMV.js → cdn/chunks/chunk.GQZQZ2HS.js} +1 -1
- package/{dist/chunks/chunk.ETRG47HH.js → cdn/chunks/chunk.HDUTNK76.js} +1 -1
- package/cdn/chunks/chunk.HWY63TSF.js +27 -0
- package/{dist/chunks/chunk.WMLL6DYO.js → cdn/chunks/chunk.I5WLJ5L3.js} +1 -1
- package/cdn/chunks/{chunk.VRGU3JD2.js → chunk.IR66XQLB.js} +11 -11
- package/cdn/chunks/chunk.IW5LSMO4.js +928 -0
- package/cdn/chunks/chunk.IX3FU7LW.js +21 -0
- package/cdn/chunks/chunk.K5CSW352.js +418 -0
- package/{dist/chunks/chunk.RW6R4LFF.js → cdn/chunks/chunk.KMFGKZ5A.js} +1 -1
- package/cdn/chunks/{chunk.YWXZHRQQ.js → chunk.KX3Z3J5J.js} +1 -1
- package/cdn/chunks/{chunk.TKZC2SRM.js → chunk.L7N566HD.js} +1 -1
- package/{dist/chunks/chunk.KMNSIF7V.js → cdn/chunks/chunk.LCPWWHRW.js} +1 -1
- package/cdn/chunks/chunk.LIGYFBVJ.js +21 -0
- package/{dist/chunks/chunk.ESISTPRD.js → cdn/chunks/chunk.MJOS7DJT.js} +1 -1
- package/cdn/chunks/{chunk.56BIFKWQ.js → chunk.ODSJ642O.js} +9 -9
- package/cdn/chunks/{chunk.4UYNOT7W.js → chunk.P5PLRHF4.js} +1 -1
- package/{dist/chunks/chunk.EM2KEB67.js → cdn/chunks/chunk.P7YVDGTI.js} +1 -1
- package/cdn/chunks/{chunk.5NU43HNV.js → chunk.PNYTGKX5.js} +1 -1
- package/cdn/chunks/{chunk.XHHFBPQM.js → chunk.PSAJO4PE.js} +8 -7
- package/cdn/chunks/{chunk.NCUMG4CT.js → chunk.PYENVYVD.js} +1 -1
- package/cdn/chunks/{chunk.4L2C3E3Z.js → chunk.QCGNAB7F.js} +1 -1
- package/cdn/chunks/chunk.QIVU3UVU.js +150 -0
- package/cdn/chunks/{chunk.KHIKTIEM.js → chunk.QLE3NTPL.js} +11 -11
- package/cdn/chunks/{chunk.7ZVIGV6V.js → chunk.R24K6QI4.js} +17 -9
- package/cdn/chunks/chunk.SF6MBAEP.js +20 -0
- package/cdn/chunks/{chunk.TEUZXQBU.js → chunk.SFG6BGI6.js} +4 -4
- package/cdn/chunks/{chunk.2UNF3BIO.js → chunk.SRTZLLQ5.js} +10 -10
- package/cdn/chunks/{chunk.H5LB4MBT.js → chunk.SSTISPFD.js} +1 -1
- package/cdn/chunks/{chunk.IQ7B6HFH.js → chunk.SXNVHR5M.js} +1 -1
- package/cdn/chunks/{chunk.SZAZG4YK.js → chunk.U3NYXUF6.js} +1 -1
- package/{dist/chunks/chunk.7KC6YXWL.js → cdn/chunks/chunk.UA5HHAYZ.js} +1 -1
- package/cdn/chunks/chunk.UBW72CYZ.js +11 -0
- package/cdn/chunks/{chunk.JE2FCOKF.js → chunk.UKQCOWLU.js} +1 -1
- package/{dist/chunks/chunk.775IHQR2.js → cdn/chunks/chunk.UOCDT7HQ.js} +13 -13
- package/cdn/chunks/{chunk.2NCB6JXM.js → chunk.VE5TVT6L.js} +1 -1
- package/cdn/chunks/{chunk.PNDWOMP6.js → chunk.VH6TLJG7.js} +2 -2
- package/cdn/chunks/{chunk.YCRGAL67.js → chunk.VZ3MBFKG.js} +1 -1
- package/cdn/chunks/{chunk.WRON76NZ.js → chunk.XAJZNITQ.js} +1 -1
- package/{dist/chunks/chunk.QUYMT5VP.js → cdn/chunks/chunk.XQK25A5Y.js} +1 -1
- package/cdn/chunks/{chunk.X2ZY3YLL.js → chunk.XUPAIJOR.js} +1 -1
- package/cdn/chunks/{chunk.H7IOI7PF.js → chunk.XYM7DLPS.js} +9 -9
- package/cdn/chunks/{chunk.ZLY7XE2R.js → chunk.YIPEL4RB.js} +1 -1
- package/{dist/chunks/chunk.S3TUAB7V.js → cdn/chunks/chunk.YKNGZO6V.js} +1 -1
- package/cdn/chunks/{chunk.BUKXWTWP.js → chunk.YTH6FKWR.js} +1 -1
- package/cdn/chunks/{chunk.4OS3WNGB.js → chunk.ZQDMMP6X.js} +34 -77
- package/cdn/components/accordion/accordion.component.d.ts +35 -0
- package/cdn/components/accordion/accordion.component.js +21 -0
- package/cdn/components/accordion/accordion.d.ts +8 -0
- package/cdn/components/accordion/accordion.js +22 -0
- package/cdn/components/accordion/accordion.styles.d.ts +2 -0
- package/cdn/components/accordion/accordion.styles.js +9 -0
- package/cdn/components/alert/alert.component.d.ts +74 -0
- package/cdn/components/alert/alert.component.js +16 -0
- package/cdn/components/alert/alert.d.ts +8 -0
- package/cdn/components/alert/alert.js +17 -0
- package/cdn/components/alert/alert.styles.d.ts +2 -0
- package/cdn/components/alert/alert.styles.js +9 -0
- package/cdn/components/browse-variables/browse-variables.component.js +27 -26
- package/cdn/components/browse-variables/browse-variables.controller.js +4 -4
- package/cdn/components/browse-variables/browse-variables.js +28 -27
- package/cdn/components/button/button.component.js +5 -4
- package/cdn/components/button/button.js +6 -5
- package/cdn/components/chip/chip.component.js +2 -2
- package/cdn/components/chip/chip.js +3 -3
- package/cdn/components/combobox/combobox.component.js +7 -7
- package/cdn/components/combobox/combobox.js +8 -8
- package/cdn/components/data-rods/data-rods.component.js +42 -41
- package/cdn/components/data-rods/data-rods.js +43 -42
- package/cdn/components/data-subsetter/data-subsetter.component.d.ts +46 -0
- package/cdn/components/data-subsetter/data-subsetter.component.js +48 -0
- package/cdn/components/data-subsetter/data-subsetter.controller.d.ts +15 -0
- package/cdn/components/data-subsetter/data-subsetter.controller.js +11 -0
- package/cdn/components/data-subsetter/data-subsetter.d.ts +8 -0
- package/cdn/components/data-subsetter/data-subsetter.js +49 -0
- package/cdn/components/data-subsetter/data-subsetter.styles.d.ts +2 -0
- package/cdn/components/data-subsetter/data-subsetter.styles.js +9 -0
- package/cdn/components/date-picker/date-picker.component.d.ts +6 -0
- package/cdn/components/date-picker/date-picker.component.js +11 -3
- package/cdn/components/date-picker/date-picker.js +12 -4
- package/cdn/components/date-picker/date-picker.styles.js +1 -1
- package/cdn/components/date-range-slider/date-range-slider.component.js +4 -4
- package/cdn/components/date-range-slider/date-range-slider.js +5 -5
- package/cdn/components/dialog/dialog.component.js +2 -2
- package/cdn/components/dialog/dialog.js +3 -3
- package/cdn/components/icon/icon.component.js +5 -5
- package/cdn/components/icon/icon.js +6 -6
- package/cdn/components/icon/library.default.js +1 -1
- package/cdn/components/icon/library.js +2 -2
- package/cdn/components/loader/loader.component.js +2 -2
- package/cdn/components/loader/loader.js +3 -3
- package/cdn/components/login/login.component.js +18 -17
- package/cdn/components/login/login.js +19 -18
- package/cdn/components/map/leaflet-utils.d.ts +4 -6
- package/cdn/components/map/leaflet-utils.js +1 -1
- package/cdn/components/map/map.component.d.ts +2 -0
- package/cdn/components/map/map.component.js +7 -7
- package/cdn/components/map/map.js +8 -8
- package/cdn/components/map/type.d.ts +1 -1
- package/cdn/components/plot/plot.component.js +2 -2
- package/cdn/components/plot/plot.js +3 -3
- package/cdn/components/skeleton/skeleton.component.js +7 -7
- package/cdn/components/skeleton/skeleton.js +8 -8
- package/cdn/components/spatial-picker/spatial-picker.component.d.ts +2 -0
- package/cdn/components/spatial-picker/spatial-picker.component.js +8 -8
- package/cdn/components/spatial-picker/spatial-picker.js +9 -9
- package/cdn/components/time-series/time-series.component.js +21 -20
- package/cdn/components/time-series/time-series.controller.js +3 -3
- package/cdn/components/time-series/time-series.js +22 -21
- package/cdn/components/variable-combobox/lib.js +3 -3
- package/cdn/components/variable-combobox/variable-combobox.component.js +22 -21
- package/cdn/components/variable-combobox/variable-combobox.controller.js +4 -4
- package/cdn/components/variable-combobox/variable-combobox.js +23 -22
- package/cdn/components/variable-keyword-search/variable-keyword-search.component.js +22 -21
- package/cdn/components/variable-keyword-search/variable-keyword-search.controller.js +4 -4
- package/cdn/components/variable-keyword-search/variable-keyword-search.js +23 -22
- package/cdn/custom-elements.json +2032 -971
- package/cdn/data-services/harmony-data-service.d.ts +12 -0
- package/cdn/data-services/queries.d.ts +4 -0
- package/cdn/data-services/types.d.ts +125 -0
- package/cdn/events/events.d.ts +2 -0
- package/cdn/events/terra-after-hide.d.ts +6 -0
- package/cdn/events/terra-after-show.d.ts +6 -0
- package/cdn/react/accordion/index.d.ts +19 -0
- package/cdn/react/accordion/index.js +22 -0
- package/cdn/react/alert/index.d.ts +37 -0
- package/cdn/react/alert/index.js +17 -0
- package/cdn/react/browse-variables/index.js +28 -27
- package/cdn/react/button/index.js +6 -5
- package/cdn/react/chip/index.js +3 -3
- package/cdn/react/combobox/index.js +8 -8
- package/cdn/react/data-rods/index.js +43 -42
- package/cdn/react/data-subsetter/index.d.ts +18 -0
- package/cdn/react/data-subsetter/index.js +49 -0
- package/cdn/react/date-picker/index.js +12 -4
- package/cdn/react/date-range-slider/index.js +5 -5
- package/cdn/react/dialog/index.js +3 -3
- package/cdn/react/icon/index.js +6 -6
- package/cdn/react/index.d.ts +3 -0
- package/cdn/react/index.js +105 -84
- package/cdn/react/loader/index.js +3 -3
- package/cdn/react/login/index.js +19 -18
- package/cdn/react/map/index.js +8 -8
- package/cdn/react/plot/index.js +3 -3
- package/cdn/react/skeleton/index.js +8 -8
- package/cdn/react/spatial-picker/index.js +9 -9
- package/cdn/react/time-series/index.js +22 -21
- package/cdn/react/variable-combobox/index.js +23 -22
- package/cdn/react/variable-keyword-search/index.js +23 -22
- package/cdn/terra-ui-components.d.ts +3 -0
- package/cdn/terra-ui-components.js +107 -86
- package/cdn/types/vue/index.d.ts +211 -71
- package/cdn/utilities/animation.js +5 -5
- package/cdn/utilities/date.d.ts +1 -1
- package/cdn/utilities/date.js +1 -1
- package/cdn/utilities/icon-library.js +2 -2
- package/cdn/utilities/mimetypes.d.ts +2 -0
- package/cdn/utilities/mimetypes.js +9 -0
- package/cdn/vscode.html-custom-data.json +88 -0
- package/cdn/web-types.json +352 -114
- package/dist/assets/data-subsetter/download_subset_files.py.txt +66 -0
- package/dist/chunks/{chunk.FOHGUYVS.js → chunk.2RKHDDU2.js} +1 -1
- package/dist/chunks/{chunk.XLJ7TVUS.js → chunk.2XANNG2B.js} +1 -1
- package/dist/chunks/{chunk.AY7TGBWI.js → chunk.3IQ5IBBM.js} +1 -1
- package/dist/chunks/{chunk.R3YZ7KJF.js → chunk.3L2XDJOH.js} +1 -1
- package/dist/chunks/{chunk.MZK7WRKF.js → chunk.43S45WWI.js} +1 -1
- package/{cdn/chunks/chunk.OJGOBLIU.js → dist/chunks/chunk.5KLM57QY.js} +1 -1
- package/dist/chunks/{chunk.HR67OJ25.js → chunk.5NA7WX55.js} +1 -1
- package/dist/chunks/{chunk.4BU4Y56M.js → chunk.5SHIUY5G.js} +6 -6
- package/dist/chunks/{chunk.UYRZ6XBT.js → chunk.5VVBRICA.js} +1 -1
- package/dist/chunks/chunk.6OAPBJRP.js +49 -0
- package/dist/chunks/{chunk.KZZM5DIH.js → chunk.6QIHYJP5.js} +1 -1
- package/dist/chunks/{chunk.AONG4JL6.js → chunk.7F2DLFLG.js} +2 -2
- package/dist/chunks/{chunk.GB2BB7RB.js → chunk.7NFT5ART.js} +1 -1
- package/dist/chunks/chunk.7NTMVXIC.js +925 -0
- package/dist/chunks/{chunk.O5JIPX5F.js → chunk.A2QLZY2M.js} +9 -9
- package/dist/chunks/{chunk.U5ORWUDI.js → chunk.A7OKAATM.js} +1 -1
- package/dist/chunks/chunk.BAKHMLBF.js +11 -0
- package/dist/chunks/{chunk.LPSLYYX7.js → chunk.BH6T35XA.js} +1 -1
- package/dist/chunks/chunk.BLS652FJ.js +21 -0
- package/dist/chunks/chunk.BMXRPN3G.js +27 -0
- package/dist/chunks/chunk.BQ62RLR7.js +11 -0
- package/{cdn/chunks/chunk.2TA36AD4.js → dist/chunks/chunk.BWS7VIBN.js} +1 -1
- package/{cdn/chunks/chunk.L5N5757Y.js → dist/chunks/chunk.CQZQUK25.js} +1 -1
- package/{cdn/chunks/chunk.XR376PMT.js → dist/chunks/chunk.CRZR5BJI.js} +1 -1
- package/{cdn/chunks/chunk.RLI6ON2C.js → dist/chunks/chunk.DGDGO4B7.js} +1 -1
- package/dist/chunks/chunk.DLY7WEID.js +263 -0
- package/dist/chunks/{chunk.H55GDBVS.js → chunk.DNVFMGDI.js} +2 -2
- package/dist/chunks/{chunk.RHT75OOW.js → chunk.E27YXBMX.js} +3 -3
- package/{cdn/chunks/chunk.KCZLV65J.js → dist/chunks/chunk.ECA2Y7HR.js} +1 -1
- package/dist/chunks/{chunk.WVAXV6VX.js → chunk.EZDSFP5I.js} +1 -1
- package/dist/chunks/{chunk.OJHJP7K2.js → chunk.FV3CJUU7.js} +1 -1
- package/dist/chunks/{chunk.EXZP753L.js → chunk.FWZVCL6J.js} +1 -1
- package/dist/chunks/chunk.GGUB2JVZ.js +73 -0
- package/dist/chunks/{chunk.K2RM2IR7.js → chunk.GSJX5TID.js} +16 -8
- package/{cdn/chunks/chunk.F7E3OXW3.js → dist/chunks/chunk.GVEKK7CF.js} +1 -1
- package/dist/chunks/chunk.HDDKRXZX.js +1308 -0
- package/dist/chunks/{chunk.TFI3UXXB.js → chunk.HFD6TPE6.js} +1 -1
- package/{cdn/chunks/chunk.TPNEBQDW.js → dist/chunks/chunk.HM3ZTCTP.js} +1 -1
- package/dist/chunks/{chunk.2LQ62YDQ.js → chunk.I533JNF6.js} +1 -1
- package/dist/chunks/{chunk.34UGHNQ2.js → chunk.IKDCFYUH.js} +23 -6
- package/dist/chunks/{chunk.33MT36PS.js → chunk.IU5SV56O.js} +1 -1
- package/dist/chunks/chunk.JDQC6NXM.js +418 -0
- package/{cdn/chunks/chunk.KTVGWBMV.js → dist/chunks/chunk.K6JJQ4SX.js} +1 -1
- package/dist/chunks/{chunk.7JBFBZ5C.js → chunk.KMN7L6QZ.js} +5 -2
- package/dist/chunks/chunk.KRQ4AG3O.js +11 -0
- package/dist/chunks/chunk.MNJWY2UW.js +21 -0
- package/{cdn/chunks/chunk.WLC45QMC.js → dist/chunks/chunk.N25BS4ZB.js} +1 -1
- package/{cdn/chunks/chunk.RGI5ZEXR.js → dist/chunks/chunk.NJIZMOG7.js} +1 -1
- package/dist/chunks/{chunk.TBBYOYJ7.js → chunk.O27IYL4H.js} +1 -1
- package/dist/chunks/{chunk.XZXT5MBD.js → chunk.OF2CXRSX.js} +1 -1
- package/dist/chunks/{chunk.UBJGRBUX.js → chunk.OYPYQ42W.js} +1 -1
- package/dist/chunks/{chunk.NFHX7J4A.js → chunk.QQRC2LRM.js} +11 -11
- package/dist/chunks/chunk.QVAN2K7E.js +147 -0
- package/dist/chunks/{chunk.WSGVJC5A.js → chunk.QVZCOSQG.js} +4 -4
- package/dist/chunks/{chunk.5LNGPR44.js → chunk.R44HGSGT.js} +1 -1
- package/dist/chunks/{chunk.3B622XLR.js → chunk.RLNWDA4W.js} +4 -4
- package/dist/chunks/{chunk.3W53HERF.js → chunk.RQ5ZXHVZ.js} +1 -1
- package/dist/chunks/chunk.SF6MBAEP.js +20 -0
- package/dist/chunks/{chunk.LNC5EYCJ.js → chunk.SLXHKQQV.js} +7 -52
- package/dist/chunks/{chunk.WJV65UWS.js → chunk.SXWW6H7G.js} +1 -1
- package/dist/chunks/{chunk.RROJPL2A.js → chunk.TF5MPUEH.js} +1 -1
- package/dist/chunks/{chunk.T2K2FVDX.js → chunk.TO2LNCEQ.js} +1 -1
- package/dist/chunks/{chunk.5W3SNZBC.js → chunk.TQWLVZHQ.js} +8 -7
- package/dist/chunks/{chunk.CPEM43Y5.js → chunk.U6Y5XC7Y.js} +1 -1
- package/{cdn/chunks/chunk.7KC6YXWL.js → dist/chunks/chunk.UA5HHAYZ.js} +1 -1
- package/dist/chunks/{chunk.Z5E25XLP.js → chunk.UATKNBZS.js} +9 -9
- package/{cdn/chunks/chunk.775IHQR2.js → dist/chunks/chunk.UOCDT7HQ.js} +13 -13
- package/{cdn/chunks/chunk.4TXEYAPR.js → dist/chunks/chunk.UOGBFLVH.js} +1 -1
- package/{cdn/chunks/chunk.2NMZMEIL.js → dist/chunks/chunk.VE3COXRN.js} +1 -1
- package/dist/chunks/{chunk.ZRI4D77S.js → chunk.VKOQTQOM.js} +4 -4
- package/dist/chunks/{chunk.QAXYS5OA.js → chunk.WLHYNUHM.js} +1 -1
- package/dist/chunks/{chunk.RPLQHZS6.js → chunk.WYF3PXVO.js} +18 -5
- package/dist/chunks/{chunk.UTDJAXDL.js → chunk.YEIAGN3D.js} +1 -1
- package/dist/chunks/chunk.Z3GLEDYM.js +58 -0
- package/dist/chunks/{chunk.2TZUQC72.js → chunk.Z6VGIT4W.js} +1 -1
- package/{cdn/chunks/chunk.BOEWKIKL.js → dist/chunks/chunk.ZAE4U4Y7.js} +1 -1
- package/{cdn/chunks/chunk.MSGOYUSX.js → dist/chunks/chunk.ZAFEQXY3.js} +1 -1
- package/dist/chunks/{chunk.2IUOMVRJ.js → chunk.ZI3DJGWN.js} +1 -1
- package/{cdn/chunks/chunk.I5ZDFQF3.js → dist/chunks/chunk.ZRD3ZNCG.js} +1 -1
- package/dist/components/accordion/accordion.component.d.ts +35 -0
- package/dist/components/accordion/accordion.component.js +16 -0
- package/dist/components/accordion/accordion.d.ts +8 -0
- package/dist/components/accordion/accordion.js +17 -0
- package/dist/components/accordion/accordion.styles.d.ts +2 -0
- package/dist/components/accordion/accordion.styles.js +7 -0
- package/dist/components/alert/alert.component.d.ts +74 -0
- package/dist/components/alert/alert.component.js +11 -0
- package/dist/components/alert/alert.d.ts +8 -0
- package/dist/components/alert/alert.js +12 -0
- package/dist/components/alert/alert.styles.d.ts +2 -0
- package/dist/components/alert/alert.styles.js +7 -0
- package/dist/components/browse-variables/browse-variables.component.js +19 -18
- package/dist/components/browse-variables/browse-variables.controller.js +3 -3
- package/dist/components/browse-variables/browse-variables.js +20 -19
- package/dist/components/button/button.component.js +4 -3
- package/dist/components/button/button.js +5 -4
- package/dist/components/chip/chip.component.js +2 -2
- package/dist/components/chip/chip.js +3 -3
- package/dist/components/combobox/combobox.component.js +3 -3
- package/dist/components/combobox/combobox.js +4 -4
- package/dist/components/data-rods/data-rods.component.js +30 -29
- package/dist/components/data-rods/data-rods.js +31 -30
- package/dist/components/data-subsetter/data-subsetter.component.d.ts +46 -0
- package/dist/components/data-subsetter/data-subsetter.component.js +37 -0
- package/dist/components/data-subsetter/data-subsetter.controller.d.ts +15 -0
- package/dist/components/data-subsetter/data-subsetter.controller.js +9 -0
- package/dist/components/data-subsetter/data-subsetter.d.ts +8 -0
- package/dist/components/data-subsetter/data-subsetter.js +38 -0
- package/dist/components/data-subsetter/data-subsetter.styles.d.ts +2 -0
- package/dist/components/data-subsetter/data-subsetter.styles.js +7 -0
- package/dist/components/date-picker/date-picker.component.d.ts +6 -0
- package/dist/components/date-picker/date-picker.component.js +8 -3
- package/dist/components/date-picker/date-picker.js +9 -4
- package/dist/components/date-picker/date-picker.styles.js +1 -1
- package/dist/components/date-range-slider/date-range-slider.component.js +3 -3
- package/dist/components/date-range-slider/date-range-slider.js +4 -4
- package/dist/components/dialog/dialog.component.js +2 -2
- package/dist/components/dialog/dialog.js +3 -3
- package/dist/components/icon/icon.component.js +5 -5
- package/dist/components/icon/icon.js +6 -6
- package/dist/components/icon/library.default.js +1 -1
- package/dist/components/icon/library.js +2 -2
- package/dist/components/loader/loader.component.js +2 -2
- package/dist/components/loader/loader.js +3 -3
- package/dist/components/login/login.component.js +14 -13
- package/dist/components/login/login.js +15 -14
- package/dist/components/map/leaflet-utils.d.ts +4 -6
- package/dist/components/map/leaflet-utils.js +1 -1
- package/dist/components/map/map.component.d.ts +2 -0
- package/dist/components/map/map.component.js +5 -5
- package/dist/components/map/map.js +6 -6
- package/dist/components/map/type.d.ts +1 -1
- package/dist/components/plot/plot.component.js +2 -2
- package/dist/components/plot/plot.js +3 -3
- package/dist/components/skeleton/skeleton.component.js +2 -2
- package/dist/components/skeleton/skeleton.js +3 -3
- package/dist/components/spatial-picker/spatial-picker.component.d.ts +2 -0
- package/dist/components/spatial-picker/spatial-picker.component.js +6 -6
- package/dist/components/spatial-picker/spatial-picker.js +7 -7
- package/dist/components/time-series/time-series.component.js +15 -14
- package/dist/components/time-series/time-series.controller.js +2 -2
- package/dist/components/time-series/time-series.js +16 -15
- package/dist/components/variable-combobox/variable-combobox.component.js +12 -11
- package/dist/components/variable-combobox/variable-combobox.js +13 -12
- package/dist/components/variable-keyword-search/variable-keyword-search.component.js +15 -14
- package/dist/components/variable-keyword-search/variable-keyword-search.controller.js +3 -3
- package/dist/components/variable-keyword-search/variable-keyword-search.js +16 -15
- package/dist/custom-elements.json +2032 -971
- package/dist/data-services/harmony-data-service.d.ts +12 -0
- package/dist/data-services/queries.d.ts +4 -0
- package/dist/data-services/types.d.ts +125 -0
- package/dist/events/events.d.ts +2 -0
- package/dist/events/terra-after-hide.d.ts +6 -0
- package/dist/events/terra-after-show.d.ts +6 -0
- package/dist/react/accordion/index.d.ts +19 -0
- package/dist/react/accordion/index.js +17 -0
- package/dist/react/alert/index.d.ts +37 -0
- package/dist/react/alert/index.js +12 -0
- package/dist/react/browse-variables/index.js +20 -19
- package/dist/react/button/index.js +5 -4
- package/dist/react/chip/index.js +3 -3
- package/dist/react/combobox/index.js +4 -4
- package/dist/react/data-rods/index.js +31 -30
- package/dist/react/data-subsetter/index.d.ts +18 -0
- package/dist/react/data-subsetter/index.js +38 -0
- package/dist/react/date-picker/index.js +9 -4
- package/dist/react/date-range-slider/index.js +4 -4
- package/dist/react/dialog/index.js +3 -3
- package/dist/react/icon/index.js +6 -6
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.js +92 -71
- package/dist/react/loader/index.js +3 -3
- package/dist/react/login/index.js +15 -14
- package/dist/react/map/index.js +6 -6
- package/dist/react/plot/index.js +3 -3
- package/dist/react/skeleton/index.js +3 -3
- package/dist/react/spatial-picker/index.js +7 -7
- package/dist/react/time-series/index.js +16 -15
- package/dist/react/variable-combobox/index.js +13 -12
- package/dist/react/variable-keyword-search/index.js +16 -15
- package/dist/terra-ui-components.d.ts +3 -0
- package/dist/terra-ui-components.js +95 -74
- package/dist/{terra_ui_components-0.0.52-py3-none-any.whl → terra_ui_components-0.0.53-py3-none-any.whl} +0 -0
- package/dist/{terra_ui_components-0.0.52.tar.gz → terra_ui_components-0.0.53.tar.gz} +0 -0
- package/dist/types/vue/index.d.ts +211 -71
- package/dist/utilities/date.d.ts +1 -1
- package/dist/utilities/date.js +1 -1
- package/dist/utilities/icon-library.js +2 -2
- package/dist/utilities/mimetypes.d.ts +2 -0
- package/dist/utilities/mimetypes.js +9 -0
- package/dist/vscode.html-custom-data.json +88 -0
- package/dist/web-types.json +352 -114
- package/package.json +1 -1
- package/cdn/chunks/{chunk.2XCNCXGV.js → chunk.262RZKG2.js} +3 -3
- package/cdn/chunks/{chunk.PZRCJWJ4.js → chunk.6WMXHA2J.js} +5 -5
- package/cdn/chunks/{chunk.QB5SASDL.js → chunk.FKLQEDIX.js} +4 -4
|
@@ -0,0 +1,1314 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultSubsetFileMimeType,
|
|
3
|
+
getFriendlyNameForMimeType
|
|
4
|
+
} from "./chunk.SF6MBAEP.js";
|
|
5
|
+
import {
|
|
6
|
+
TerraSpatialPicker
|
|
7
|
+
} from "./chunk.2TPQ7A7J.js";
|
|
8
|
+
import {
|
|
9
|
+
TerraDatePicker
|
|
10
|
+
} from "./chunk.223WZP6H.js";
|
|
11
|
+
import {
|
|
12
|
+
DataSubsetterController
|
|
13
|
+
} from "./chunk.K5CSW352.js";
|
|
14
|
+
import {
|
|
15
|
+
data_subsetter_styles_default
|
|
16
|
+
} from "./chunk.IW5LSMO4.js";
|
|
17
|
+
import {
|
|
18
|
+
TerraAccordion
|
|
19
|
+
} from "./chunk.7LR3A5ZW.js";
|
|
20
|
+
import {
|
|
21
|
+
TerraIcon
|
|
22
|
+
} from "./chunk.FOR62X7R.js";
|
|
23
|
+
import {
|
|
24
|
+
watch
|
|
25
|
+
} from "./chunk.6MMTW476.js";
|
|
26
|
+
import {
|
|
27
|
+
TerraElement,
|
|
28
|
+
component_styles_default
|
|
29
|
+
} from "./chunk.FS3ZYOYJ.js";
|
|
30
|
+
import {
|
|
31
|
+
n,
|
|
32
|
+
r
|
|
33
|
+
} from "./chunk.2FFSUM6T.js";
|
|
34
|
+
import {
|
|
35
|
+
getBasePath
|
|
36
|
+
} from "./chunk.NQKBKXPW.js";
|
|
37
|
+
import {
|
|
38
|
+
T,
|
|
39
|
+
x
|
|
40
|
+
} from "./chunk.PQFHJHNO.js";
|
|
41
|
+
import {
|
|
42
|
+
__decorateClass,
|
|
43
|
+
__privateAdd,
|
|
44
|
+
__privateGet,
|
|
45
|
+
__privateMethod,
|
|
46
|
+
__spreadProps,
|
|
47
|
+
__spreadValues
|
|
48
|
+
} from "./chunk.6JHIJHTB.js";
|
|
49
|
+
|
|
50
|
+
// src/components/data-subsetter/data-subsetter.component.ts
|
|
51
|
+
var _controller, _renderSubsetOptions, renderSubsetOptions_fn, _renderSearchForCollection, renderSearchForCollection_fn, _renderOutputFormatSelection, renderOutputFormatSelection_fn, _renderDateRangeSelection, renderDateRangeSelection_fn, _handleStartDateChange, _handleEndDateChange, _resetDateRangeSelection, _resetFormatSelection, _getCollectionDateRange, getCollectionDateRange_fn, _renderSpatialSelection, renderSpatialSelection_fn, _handleSpatialChange, _resetSpatialSelection, _renderVariableSelection, renderVariableSelection_fn, _buildVariableTree, buildVariableTree_fn, _renderVariableTree, renderVariableTree_fn, _getAllGroupPaths, getAllGroupPaths_fn, _toggleGroupExpand, toggleGroupExpand_fn, _toggleExpandCollapseAll, toggleExpandCollapseAll_fn, _toggleVariableSelection, toggleVariableSelection_fn, _markFieldTouched, markFieldTouched_fn, _resetVariableSelection, _renderJobStatus, renderJobStatus_fn, _renderSelectedParams, renderSelectedParams_fn, _cancelJob, cancelJob_fn, _getData, getData_fn, _touchAllFields, touchAllFields_fn, _numberOfFilesFoundEstimate, numberOfFilesFoundEstimate_fn, _getDocumentationLinks, getDocumentationLinks_fn, _getDataLinks, getDataLinks_fn, _hasAtLeastOneSubsetOption, hasAtLeastOneSubsetOption_fn, _hasSpatialSubset, hasSpatialSubset_fn, _renderJobMessage, renderJobMessage_fn, _estimateJobSize, estimateJobSize_fn, _refineParameters, refineParameters_fn, _toggleDownloadMenu, toggleDownloadMenu_fn, _downloadLinksAsTxt, downloadLinksAsTxt_fn, _downloadPythonScript, downloadPythonScript_fn, _downloadEarthdataDownload, downloadEarthdataDownload_fn, _handleClickOutside, handleClickOutside_fn;
|
|
52
|
+
var TerraDataSubsetter = class extends TerraElement {
|
|
53
|
+
constructor() {
|
|
54
|
+
super(...arguments);
|
|
55
|
+
__privateAdd(this, _renderSubsetOptions);
|
|
56
|
+
__privateAdd(this, _renderSearchForCollection);
|
|
57
|
+
__privateAdd(this, _renderOutputFormatSelection);
|
|
58
|
+
__privateAdd(this, _renderDateRangeSelection);
|
|
59
|
+
__privateAdd(this, _getCollectionDateRange);
|
|
60
|
+
__privateAdd(this, _renderSpatialSelection);
|
|
61
|
+
__privateAdd(this, _renderVariableSelection);
|
|
62
|
+
__privateAdd(this, _buildVariableTree);
|
|
63
|
+
__privateAdd(this, _renderVariableTree);
|
|
64
|
+
__privateAdd(this, _getAllGroupPaths);
|
|
65
|
+
__privateAdd(this, _toggleGroupExpand);
|
|
66
|
+
__privateAdd(this, _toggleExpandCollapseAll);
|
|
67
|
+
__privateAdd(this, _toggleVariableSelection);
|
|
68
|
+
__privateAdd(this, _markFieldTouched);
|
|
69
|
+
__privateAdd(this, _renderJobStatus);
|
|
70
|
+
__privateAdd(this, _renderSelectedParams);
|
|
71
|
+
__privateAdd(this, _cancelJob);
|
|
72
|
+
__privateAdd(this, _getData);
|
|
73
|
+
__privateAdd(this, _touchAllFields);
|
|
74
|
+
__privateAdd(this, _numberOfFilesFoundEstimate);
|
|
75
|
+
__privateAdd(this, _getDocumentationLinks);
|
|
76
|
+
__privateAdd(this, _getDataLinks);
|
|
77
|
+
__privateAdd(this, _hasAtLeastOneSubsetOption);
|
|
78
|
+
__privateAdd(this, _hasSpatialSubset);
|
|
79
|
+
__privateAdd(this, _renderJobMessage);
|
|
80
|
+
__privateAdd(this, _estimateJobSize);
|
|
81
|
+
__privateAdd(this, _refineParameters);
|
|
82
|
+
__privateAdd(this, _toggleDownloadMenu);
|
|
83
|
+
__privateAdd(this, _downloadLinksAsTxt);
|
|
84
|
+
__privateAdd(this, _downloadPythonScript);
|
|
85
|
+
__privateAdd(this, _downloadEarthdataDownload);
|
|
86
|
+
__privateAdd(this, _handleClickOutside);
|
|
87
|
+
this.showCollectionSearch = true;
|
|
88
|
+
this.selectedVariables = [];
|
|
89
|
+
this.expandedVariableGroups = /* @__PURE__ */ new Set();
|
|
90
|
+
this.touchedFields = /* @__PURE__ */ new Set();
|
|
91
|
+
this.spatialSelection = null;
|
|
92
|
+
this.selectedDateRange = {
|
|
93
|
+
startDate: null,
|
|
94
|
+
endDate: null
|
|
95
|
+
};
|
|
96
|
+
this.selectedFormat = defaultSubsetFileMimeType;
|
|
97
|
+
this.cancelingGetData = false;
|
|
98
|
+
this.selectedTab = "web-links";
|
|
99
|
+
this.refineParameters = false;
|
|
100
|
+
this.showDownloadMenu = false;
|
|
101
|
+
__privateAdd(this, _controller, new DataSubsetterController(this));
|
|
102
|
+
__privateAdd(this, _handleStartDateChange, (e) => {
|
|
103
|
+
__privateMethod(this, _markFieldTouched, markFieldTouched_fn).call(this, "date");
|
|
104
|
+
const datePicker = e.currentTarget;
|
|
105
|
+
this.selectedDateRange = __spreadProps(__spreadValues({}, this.selectedDateRange), {
|
|
106
|
+
startDate: datePicker.selectedDates.startDate
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
__privateAdd(this, _handleEndDateChange, (e) => {
|
|
110
|
+
__privateMethod(this, _markFieldTouched, markFieldTouched_fn).call(this, "date");
|
|
111
|
+
const datePicker = e.currentTarget;
|
|
112
|
+
this.selectedDateRange = __spreadProps(__spreadValues({}, this.selectedDateRange), {
|
|
113
|
+
endDate: datePicker.selectedDates.startDate
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
__privateAdd(this, _resetDateRangeSelection, () => {
|
|
117
|
+
this.selectedDateRange = { startDate: null, endDate: null };
|
|
118
|
+
});
|
|
119
|
+
__privateAdd(this, _resetFormatSelection, () => {
|
|
120
|
+
this.selectedFormat = defaultSubsetFileMimeType;
|
|
121
|
+
});
|
|
122
|
+
__privateAdd(this, _handleSpatialChange, (e) => {
|
|
123
|
+
var _a, _b;
|
|
124
|
+
__privateMethod(this, _markFieldTouched, markFieldTouched_fn).call(this, "spatial");
|
|
125
|
+
const round2 = (n2) => parseFloat(Number(n2).toFixed(2));
|
|
126
|
+
if ((_a = e.detail) == null ? void 0 : _a.bounds) {
|
|
127
|
+
this.spatialSelection = {
|
|
128
|
+
e: round2(e.detail.bounds._northEast.lng),
|
|
129
|
+
n: round2(e.detail.bounds._northEast.lat),
|
|
130
|
+
w: round2(e.detail.bounds._southWest.lng),
|
|
131
|
+
s: round2(e.detail.bounds._southWest.lat)
|
|
132
|
+
};
|
|
133
|
+
} else if ((_b = e.detail) == null ? void 0 : _b.latLng) {
|
|
134
|
+
this.spatialSelection = e.detail.latLng;
|
|
135
|
+
} else {
|
|
136
|
+
this.spatialSelection = null;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
__privateAdd(this, _resetSpatialSelection, () => {
|
|
140
|
+
this.spatialSelection = null;
|
|
141
|
+
});
|
|
142
|
+
__privateAdd(this, _resetVariableSelection, () => {
|
|
143
|
+
this.selectedVariables = [];
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
firstUpdated() {
|
|
147
|
+
if (this.collectionEntryId) {
|
|
148
|
+
this.showCollectionSearch = false;
|
|
149
|
+
}
|
|
150
|
+
if (this.jobId) {
|
|
151
|
+
__privateGet(this, _controller).fetchJobByID(this.jobId);
|
|
152
|
+
}
|
|
153
|
+
document.addEventListener("click", __privateMethod(this, _handleClickOutside, handleClickOutside_fn).bind(this));
|
|
154
|
+
}
|
|
155
|
+
disconnectedCallback() {
|
|
156
|
+
super.disconnectedCallback();
|
|
157
|
+
document.removeEventListener("click", __privateMethod(this, _handleClickOutside, handleClickOutside_fn).bind(this));
|
|
158
|
+
}
|
|
159
|
+
collectionChanged() {
|
|
160
|
+
const { startDate, endDate } = __privateMethod(this, _getCollectionDateRange, getCollectionDateRange_fn).call(this);
|
|
161
|
+
if (startDate && endDate) {
|
|
162
|
+
const end = new Date(endDate);
|
|
163
|
+
const start = new Date(startDate);
|
|
164
|
+
const sevenDaysAgo = new Date(end);
|
|
165
|
+
sevenDaysAgo.setDate(end.getDate() - 6);
|
|
166
|
+
const defaultStart = sevenDaysAgo > start ? sevenDaysAgo : start;
|
|
167
|
+
this.selectedDateRange = {
|
|
168
|
+
startDate: defaultStart.toISOString().slice(0, 10),
|
|
169
|
+
endDate
|
|
170
|
+
};
|
|
171
|
+
} else {
|
|
172
|
+
this.selectedDateRange = { startDate, endDate };
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
render() {
|
|
176
|
+
var _a, _b, _c;
|
|
177
|
+
return x`
|
|
178
|
+
<div class="container">
|
|
179
|
+
<div class="header">
|
|
180
|
+
<h1>
|
|
181
|
+
<svg
|
|
182
|
+
class="download-icon"
|
|
183
|
+
viewBox="0 0 24 24"
|
|
184
|
+
fill="currentColor"
|
|
185
|
+
>
|
|
186
|
+
<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" />
|
|
187
|
+
</svg>
|
|
188
|
+
${(_c = (_b = (_a = this.collectionWithServices) == null ? void 0 : _a.collection) == null ? void 0 : _b.EntryTitle) != null ? _c : x`Download Data`}
|
|
189
|
+
</h1>
|
|
190
|
+
<button class="close-btn" onclick="closeDialog()">×</button>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
${__privateGet(this, _controller).currentJob && !this.refineParameters ? __privateMethod(this, _renderJobStatus, renderJobStatus_fn).call(this) : __privateMethod(this, _renderSubsetOptions, renderSubsetOptions_fn).call(this)}
|
|
194
|
+
</div>
|
|
195
|
+
`;
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
_controller = new WeakMap();
|
|
199
|
+
_renderSubsetOptions = new WeakSet();
|
|
200
|
+
renderSubsetOptions_fn = function() {
|
|
201
|
+
var _a, _b, _c, _d;
|
|
202
|
+
const estimates = __privateMethod(this, _estimateJobSize, estimateJobSize_fn).call(this);
|
|
203
|
+
return x`
|
|
204
|
+
${estimates ? x`<div
|
|
205
|
+
class="size-info ${estimates.links >= 150 ? "warning" : "neutral"}"
|
|
206
|
+
>
|
|
207
|
+
<h2>Estimated size of results</h2>
|
|
208
|
+
<div class="size-stats">
|
|
209
|
+
${estimates.days.toLocaleString()} days,
|
|
210
|
+
${estimates.links.toLocaleString()} links
|
|
211
|
+
</div>
|
|
212
|
+
${estimates.links >= 150 ? x`<div class="size-warning">
|
|
213
|
+
You are about to retrieve
|
|
214
|
+
${estimates.links.toLocaleString()} file links from
|
|
215
|
+
the archive. You may
|
|
216
|
+
<strong>speed up the request</strong> by limiting the
|
|
217
|
+
scope of your search.
|
|
218
|
+
</div>` : T}
|
|
219
|
+
</div>` : T}
|
|
220
|
+
${this.showCollectionSearch ? x`
|
|
221
|
+
<div class="section">
|
|
222
|
+
<h2 class="section-title">
|
|
223
|
+
Select Data Collection
|
|
224
|
+
<span class="help-icon">?</span>
|
|
225
|
+
</h2>
|
|
226
|
+
|
|
227
|
+
${__privateMethod(this, _renderSearchForCollection, renderSearchForCollection_fn).call(this)}
|
|
228
|
+
</div>
|
|
229
|
+
` : T}
|
|
230
|
+
${__privateMethod(this, _hasAtLeastOneSubsetOption, hasAtLeastOneSubsetOption_fn).call(this) ? x`
|
|
231
|
+
<div class="section">
|
|
232
|
+
<h2 class="section-title">
|
|
233
|
+
Method Options
|
|
234
|
+
<span class="help-icon">?</span>
|
|
235
|
+
</h2>
|
|
236
|
+
|
|
237
|
+
${((_a = this.collectionWithServices) == null ? void 0 : _a.temporalSubset) ? __privateMethod(this, _renderDateRangeSelection, renderDateRangeSelection_fn).call(this) : T}
|
|
238
|
+
${__privateMethod(this, _hasSpatialSubset, hasSpatialSubset_fn).call(this) ? __privateMethod(this, _renderSpatialSelection, renderSpatialSelection_fn).call(this) : T}
|
|
239
|
+
${((_b = this.collectionWithServices) == null ? void 0 : _b.variableSubset) ? __privateMethod(this, _renderVariableSelection, renderVariableSelection_fn).call(this) : T}
|
|
240
|
+
</div>
|
|
241
|
+
` : T}
|
|
242
|
+
${((_d = (_c = this.collectionWithServices) == null ? void 0 : _c.outputFormats) == null ? void 0 : _d.length) ? x`
|
|
243
|
+
<div class="section">
|
|
244
|
+
<h2 class="section-title">
|
|
245
|
+
Output Format
|
|
246
|
+
<span class="help-icon">?</span>
|
|
247
|
+
</h2>
|
|
248
|
+
|
|
249
|
+
${__privateMethod(this, _renderOutputFormatSelection, renderOutputFormatSelection_fn).call(this)}
|
|
250
|
+
</div>
|
|
251
|
+
` : T}
|
|
252
|
+
|
|
253
|
+
<div class="footer">
|
|
254
|
+
<button class="btn btn-secondary">Reset All</button>
|
|
255
|
+
<button class="btn btn-primary" @click=${__privateMethod(this, _getData, getData_fn)}>
|
|
256
|
+
Get Data
|
|
257
|
+
</button>
|
|
258
|
+
</div>
|
|
259
|
+
`;
|
|
260
|
+
};
|
|
261
|
+
_renderSearchForCollection = new WeakSet();
|
|
262
|
+
renderSearchForCollection_fn = function() {
|
|
263
|
+
return x`
|
|
264
|
+
<terra-accordion open>
|
|
265
|
+
<div slot="summary">
|
|
266
|
+
<span class="accordion-title">Data Collection:</span>
|
|
267
|
+
</div>
|
|
268
|
+
|
|
269
|
+
<div
|
|
270
|
+
slot="summary-right"
|
|
271
|
+
style="display: flex; align-items: center; gap: 10px"
|
|
272
|
+
>
|
|
273
|
+
<span class="accordion-value" id="selected-collection-display"
|
|
274
|
+
>Please select a collection</span
|
|
275
|
+
>
|
|
276
|
+
<button class="reset-btn">Reset</button>
|
|
277
|
+
</div>
|
|
278
|
+
|
|
279
|
+
<!--
|
|
280
|
+
<div class="search-tabs-mini">
|
|
281
|
+
<button
|
|
282
|
+
class="search-tab-mini active"
|
|
283
|
+
onclick="switchSearchType('all')"
|
|
284
|
+
>
|
|
285
|
+
All
|
|
286
|
+
</button>
|
|
287
|
+
<button
|
|
288
|
+
class="search-tab-mini"
|
|
289
|
+
onclick="switchSearchType('collections')"
|
|
290
|
+
>
|
|
291
|
+
Collections
|
|
292
|
+
</button>
|
|
293
|
+
<button
|
|
294
|
+
class="search-tab-mini"
|
|
295
|
+
onclick="switchSearchType('variables')"
|
|
296
|
+
>
|
|
297
|
+
Variables
|
|
298
|
+
</button>
|
|
299
|
+
</div>
|
|
300
|
+
-->
|
|
301
|
+
|
|
302
|
+
<div class="search-container-mini">
|
|
303
|
+
<input
|
|
304
|
+
type="text"
|
|
305
|
+
class="search-input-mini"
|
|
306
|
+
id="search-input"
|
|
307
|
+
placeholder="Search all types of resources"
|
|
308
|
+
onkeypress="handleSearchKeypress(event)"
|
|
309
|
+
/>
|
|
310
|
+
<button class="search-button-mini" onclick="performSearch()">
|
|
311
|
+
<svg
|
|
312
|
+
class="search-icon-mini"
|
|
313
|
+
viewBox="0 0 24 24"
|
|
314
|
+
fill="currentColor"
|
|
315
|
+
>
|
|
316
|
+
<path
|
|
317
|
+
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
318
|
+
/>
|
|
319
|
+
</svg>
|
|
320
|
+
Search
|
|
321
|
+
</button>
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
<!--
|
|
325
|
+
<div class="quick-links-mini">
|
|
326
|
+
<a
|
|
327
|
+
href="#"
|
|
328
|
+
class="quick-link-mini"
|
|
329
|
+
onclick="quickSearch('GPM')"
|
|
330
|
+
>GPM Precipitation</a
|
|
331
|
+
>
|
|
332
|
+
<a
|
|
333
|
+
href="#"
|
|
334
|
+
class="quick-link-mini"
|
|
335
|
+
onclick="quickSearch('MODIS')"
|
|
336
|
+
>MODIS Data</a
|
|
337
|
+
>
|
|
338
|
+
<a
|
|
339
|
+
href="#"
|
|
340
|
+
class="quick-link-mini"
|
|
341
|
+
onclick="quickSearch('Landsat')"
|
|
342
|
+
>Landsat Imagery</a
|
|
343
|
+
>
|
|
344
|
+
<a
|
|
345
|
+
href="#"
|
|
346
|
+
class="quick-link-mini"
|
|
347
|
+
onclick="quickSearch('AIRS')"
|
|
348
|
+
>Atmospheric Data</a
|
|
349
|
+
>
|
|
350
|
+
</div>
|
|
351
|
+
-->
|
|
352
|
+
|
|
353
|
+
<div
|
|
354
|
+
id="search-results-section"
|
|
355
|
+
class="search-results-section"
|
|
356
|
+
style="display: none"
|
|
357
|
+
>
|
|
358
|
+
<div class="results-header-mini">
|
|
359
|
+
<div class="results-count-mini" id="results-count">
|
|
360
|
+
Found 0 results
|
|
361
|
+
</div>
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
<div id="results-container-mini" class="results-container-mini">
|
|
365
|
+
<!-- Results will be populated here -->
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
<div id="loading-mini" class="loading-mini" style="display: none">
|
|
369
|
+
<div class="spinner-mini"></div>
|
|
370
|
+
<div>Searching NASA CMR...</div>
|
|
371
|
+
</div>
|
|
372
|
+
|
|
373
|
+
<div
|
|
374
|
+
id="no-results-mini"
|
|
375
|
+
class="no-results-mini"
|
|
376
|
+
style="display: none"
|
|
377
|
+
>
|
|
378
|
+
<p>
|
|
379
|
+
No results found. Try adjusting your search terms or
|
|
380
|
+
browse the quick links above.
|
|
381
|
+
</p>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
</terra-accordion>
|
|
385
|
+
`;
|
|
386
|
+
};
|
|
387
|
+
_renderOutputFormatSelection = new WeakSet();
|
|
388
|
+
renderOutputFormatSelection_fn = function() {
|
|
389
|
+
return x`
|
|
390
|
+
<terra-accordion>
|
|
391
|
+
<div slot="summary">
|
|
392
|
+
<span class="accordion-title">File Format:</span>
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
<div
|
|
396
|
+
slot="summary-right"
|
|
397
|
+
style="display: flex; align-items: center; gap: 10px;"
|
|
398
|
+
>
|
|
399
|
+
<span>${getFriendlyNameForMimeType(this.selectedFormat)}</span>
|
|
400
|
+
|
|
401
|
+
<button class="reset-btn" @click=${__privateGet(this, _resetFormatSelection)}>
|
|
402
|
+
Reset
|
|
403
|
+
</button>
|
|
404
|
+
</div>
|
|
405
|
+
|
|
406
|
+
<div class="accordion-content" style="margin-top: 12px;">
|
|
407
|
+
${(() => {
|
|
408
|
+
var _a;
|
|
409
|
+
const uniqueFormats = Array.from(
|
|
410
|
+
new Set(((_a = this.collectionWithServices) == null ? void 0 : _a.outputFormats) || [])
|
|
411
|
+
);
|
|
412
|
+
return uniqueFormats.map(
|
|
413
|
+
(format) => x`
|
|
414
|
+
<label
|
|
415
|
+
style="display: flex; align-items: center; gap: 8px; padding: 5px;"
|
|
416
|
+
>
|
|
417
|
+
<input
|
|
418
|
+
type="radio"
|
|
419
|
+
name="output-format"
|
|
420
|
+
value="${format}"
|
|
421
|
+
.checked=${this.selectedFormat === format}
|
|
422
|
+
@change=${() => this.selectedFormat = format}
|
|
423
|
+
/>
|
|
424
|
+
${getFriendlyNameForMimeType(format)}
|
|
425
|
+
</label>
|
|
426
|
+
`
|
|
427
|
+
);
|
|
428
|
+
})()}
|
|
429
|
+
</div>
|
|
430
|
+
</terra-accordion>
|
|
431
|
+
`;
|
|
432
|
+
};
|
|
433
|
+
_renderDateRangeSelection = new WeakSet();
|
|
434
|
+
renderDateRangeSelection_fn = function() {
|
|
435
|
+
var _a, _b;
|
|
436
|
+
const { startDate: defaultStartDate, endDate: defaultEndDate } = __privateMethod(this, _getCollectionDateRange, getCollectionDateRange_fn).call(this);
|
|
437
|
+
const startDate = (_a = this.selectedDateRange.startDate) != null ? _a : defaultStartDate;
|
|
438
|
+
const endDate = (_b = this.selectedDateRange.endDate) != null ? _b : defaultEndDate;
|
|
439
|
+
const showError = this.touchedFields.has("date") && (!this.selectedDateRange.startDate || !this.selectedDateRange.endDate);
|
|
440
|
+
return x`
|
|
441
|
+
<terra-accordion>
|
|
442
|
+
<div slot="summary">
|
|
443
|
+
<span class="accordion-title">Refine Date Range:</span>
|
|
444
|
+
</div>
|
|
445
|
+
|
|
446
|
+
<div
|
|
447
|
+
slot="summary-right"
|
|
448
|
+
style="display: flex; align-items: center; gap: 10px;"
|
|
449
|
+
>
|
|
450
|
+
${showError ? x`<span class="accordion-value error"
|
|
451
|
+
>Please select a date range</span
|
|
452
|
+
>` : this.touchedFields.has("date") && startDate && endDate ? x`<span class="accordion-value"
|
|
453
|
+
>${startDate} to ${endDate}</span
|
|
454
|
+
>` : T}
|
|
455
|
+
<button class="reset-btn" @click=${__privateGet(this, _resetDateRangeSelection)}>
|
|
456
|
+
Reset
|
|
457
|
+
</button>
|
|
458
|
+
</div>
|
|
459
|
+
|
|
460
|
+
<div style="display: flex; gap: 16px;">
|
|
461
|
+
<terra-date-picker
|
|
462
|
+
label="Start Date"
|
|
463
|
+
allow-input
|
|
464
|
+
class="w-full"
|
|
465
|
+
.minDate=${defaultStartDate}
|
|
466
|
+
.maxDate=${endDate}
|
|
467
|
+
.defaultDate=${startDate}
|
|
468
|
+
@terra-change=${__privateGet(this, _handleStartDateChange)}
|
|
469
|
+
></terra-date-picker>
|
|
470
|
+
<terra-date-picker
|
|
471
|
+
label="End Date"
|
|
472
|
+
allow-input
|
|
473
|
+
class="w-full"
|
|
474
|
+
.minDate=${startDate}
|
|
475
|
+
.maxDate=${defaultEndDate}
|
|
476
|
+
.defaultDate=${endDate}
|
|
477
|
+
@terra-change=${__privateGet(this, _handleEndDateChange)}
|
|
478
|
+
></terra-date-picker>
|
|
479
|
+
</div>
|
|
480
|
+
|
|
481
|
+
<div
|
|
482
|
+
style="display: flex; gap: 16px; margin-top: 15px; color: #31708f;"
|
|
483
|
+
>
|
|
484
|
+
<span
|
|
485
|
+
><strong>Available Range:</strong> ${defaultStartDate} to
|
|
486
|
+
${defaultEndDate}</span
|
|
487
|
+
>
|
|
488
|
+
<span
|
|
489
|
+
><strong>Note:</strong> All dates and times are in UTC.</span
|
|
490
|
+
>
|
|
491
|
+
</div>
|
|
492
|
+
</terra-accordion>
|
|
493
|
+
`;
|
|
494
|
+
};
|
|
495
|
+
_handleStartDateChange = new WeakMap();
|
|
496
|
+
_handleEndDateChange = new WeakMap();
|
|
497
|
+
_resetDateRangeSelection = new WeakMap();
|
|
498
|
+
_resetFormatSelection = new WeakMap();
|
|
499
|
+
_getCollectionDateRange = new WeakSet();
|
|
500
|
+
getCollectionDateRange_fn = function() {
|
|
501
|
+
var _a, _b;
|
|
502
|
+
const temporalExtents = (_b = (_a = this.collectionWithServices) == null ? void 0 : _a.collection) == null ? void 0 : _b.TemporalExtents;
|
|
503
|
+
if (!temporalExtents || !temporalExtents.length)
|
|
504
|
+
return {
|
|
505
|
+
startDate: null,
|
|
506
|
+
endDate: null
|
|
507
|
+
};
|
|
508
|
+
let minStart = null;
|
|
509
|
+
let maxEnd = null;
|
|
510
|
+
const today = /* @__PURE__ */ new Date();
|
|
511
|
+
for (const temporal of temporalExtents) {
|
|
512
|
+
for (const range of temporal.RangeDateTimes) {
|
|
513
|
+
const start = new Date(range.BeginningDateTime);
|
|
514
|
+
let end;
|
|
515
|
+
if (temporal.EndsAtPresentFlag || !range.EndingDateTime) {
|
|
516
|
+
end = today;
|
|
517
|
+
} else {
|
|
518
|
+
end = new Date(range.EndingDateTime);
|
|
519
|
+
}
|
|
520
|
+
if (!minStart || start < minStart)
|
|
521
|
+
minStart = start;
|
|
522
|
+
if (!maxEnd || end > maxEnd)
|
|
523
|
+
maxEnd = end;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return {
|
|
527
|
+
startDate: minStart ? minStart.toISOString().slice(0, 10) : null,
|
|
528
|
+
endDate: maxEnd ? maxEnd.toISOString().slice(0, 10) : null
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
_renderSpatialSelection = new WeakSet();
|
|
532
|
+
renderSpatialSelection_fn = function() {
|
|
533
|
+
var _a, _b, _c, _d, _e, _f;
|
|
534
|
+
const showError = this.touchedFields.has("spatial") && !this.spatialSelection;
|
|
535
|
+
let boundingRects = (_e = (_d = (_c = (_b = (_a = this.collectionWithServices) == null ? void 0 : _a.collection) == null ? void 0 : _b.SpatialExtent) == null ? void 0 : _c.HorizontalSpatialDomain) == null ? void 0 : _d.Geometry) == null ? void 0 : _e.BoundingRectangles;
|
|
536
|
+
if (boundingRects && !Array.isArray(boundingRects)) {
|
|
537
|
+
boundingRects = [boundingRects];
|
|
538
|
+
}
|
|
539
|
+
return x`
|
|
540
|
+
<terra-accordion>
|
|
541
|
+
<div slot="summary">
|
|
542
|
+
<span class="accordion-title">Refine Region:</span>
|
|
543
|
+
</div>
|
|
544
|
+
|
|
545
|
+
<div
|
|
546
|
+
slot="summary-right"
|
|
547
|
+
style="display: flex; align-items: center; gap: 10px;"
|
|
548
|
+
>
|
|
549
|
+
${showError ? x`<span class="accordion-value error"
|
|
550
|
+
>Please select a region</span
|
|
551
|
+
>` : this.spatialSelection && "w" in this.spatialSelection ? x`<span class="accordion-value"
|
|
552
|
+
>${this.spatialSelection.w},${this.spatialSelection.s},${this.spatialSelection.e},${this.spatialSelection.n}</span
|
|
553
|
+
>` : this.spatialSelection && "lat" in this.spatialSelection && "lng" in this.spatialSelection ? x`<span class="accordion-value"
|
|
554
|
+
>${this.spatialSelection.lat},${this.spatialSelection.lng}</span
|
|
555
|
+
>` : T}
|
|
556
|
+
<button class="reset-btn" @click=${__privateGet(this, _resetSpatialSelection)}>
|
|
557
|
+
Reset
|
|
558
|
+
</button>
|
|
559
|
+
</div>
|
|
560
|
+
<div class="accordion-content">
|
|
561
|
+
<terra-spatial-picker
|
|
562
|
+
inline
|
|
563
|
+
hide-label
|
|
564
|
+
has-shape-selector
|
|
565
|
+
hide-point-selection
|
|
566
|
+
.initialValue=${(_f = this.spatialSelection) != null ? _f : ""}
|
|
567
|
+
@terra-map-change=${__privateGet(this, _handleSpatialChange)}
|
|
568
|
+
></terra-spatial-picker>
|
|
569
|
+
${boundingRects && Array.isArray(boundingRects) && boundingRects.length ? x`<div
|
|
570
|
+
style="display: flex; gap: 16px; margin-top: 15px; color: #31708f;"
|
|
571
|
+
>
|
|
572
|
+
${boundingRects.map(
|
|
573
|
+
(rect) => x`<div>
|
|
574
|
+
<strong>Available Range:</strong>
|
|
575
|
+
${rect.WestBoundingCoordinate},
|
|
576
|
+
${rect.SouthBoundingCoordinate},
|
|
577
|
+
${rect.EastBoundingCoordinate},
|
|
578
|
+
${rect.NorthBoundingCoordinate}
|
|
579
|
+
</div>`
|
|
580
|
+
)}
|
|
581
|
+
</div>` : T}
|
|
582
|
+
</div>
|
|
583
|
+
</terra-accordion>
|
|
584
|
+
`;
|
|
585
|
+
};
|
|
586
|
+
_handleSpatialChange = new WeakMap();
|
|
587
|
+
_resetSpatialSelection = new WeakMap();
|
|
588
|
+
_renderVariableSelection = new WeakSet();
|
|
589
|
+
renderVariableSelection_fn = function() {
|
|
590
|
+
var _a;
|
|
591
|
+
const variables = ((_a = this.collectionWithServices) == null ? void 0 : _a.variables) || [];
|
|
592
|
+
const showError = this.touchedFields.has("variables") && this.selectedVariables.length === 0;
|
|
593
|
+
const tree = __privateMethod(this, _buildVariableTree, buildVariableTree_fn).call(this, variables);
|
|
594
|
+
const allGroups = __privateMethod(this, _getAllGroupPaths, getAllGroupPaths_fn).call(this, tree);
|
|
595
|
+
const allExpanded = allGroups.length > 0 && allGroups.every((g) => this.expandedVariableGroups.has(g));
|
|
596
|
+
return x`
|
|
597
|
+
<terra-accordion>
|
|
598
|
+
<div slot="summary">
|
|
599
|
+
<span class="accordion-title">Select Variables:</span>
|
|
600
|
+
</div>
|
|
601
|
+
<div
|
|
602
|
+
slot="summary-right"
|
|
603
|
+
style="display: flex; align-items: center; gap: 10px;"
|
|
604
|
+
>
|
|
605
|
+
${showError ? x`<span class="accordion-value error"
|
|
606
|
+
>Please select at least one variable</span
|
|
607
|
+
>` : this.selectedVariables.length ? x`<span class="accordion-value"
|
|
608
|
+
>${this.selectedVariables.length} selected</span
|
|
609
|
+
>` : T}
|
|
610
|
+
|
|
611
|
+
<button class="reset-btn" @click=${__privateGet(this, _resetVariableSelection)}>
|
|
612
|
+
Reset
|
|
613
|
+
</button>
|
|
614
|
+
</div>
|
|
615
|
+
<div class="accordion-content">
|
|
616
|
+
<button
|
|
617
|
+
class="reset-btn"
|
|
618
|
+
style="margin-bottom: 10px;"
|
|
619
|
+
@click=${() => __privateMethod(this, _toggleExpandCollapseAll, toggleExpandCollapseAll_fn).call(this, tree)}
|
|
620
|
+
>
|
|
621
|
+
${allExpanded ? "Collapse Tree" : "Expand Tree"}
|
|
622
|
+
</button>
|
|
623
|
+
${variables.length === 0 ? x`<p style="color: #666; font-style: italic;">
|
|
624
|
+
No variables available for this collection.
|
|
625
|
+
</p>` : __privateMethod(this, _renderVariableTree, renderVariableTree_fn).call(this, tree, [])}
|
|
626
|
+
</div>
|
|
627
|
+
</terra-accordion>
|
|
628
|
+
`;
|
|
629
|
+
};
|
|
630
|
+
_buildVariableTree = new WeakSet();
|
|
631
|
+
buildVariableTree_fn = function(variables) {
|
|
632
|
+
const root = {};
|
|
633
|
+
for (const v of variables) {
|
|
634
|
+
const parts = v.name.split("/");
|
|
635
|
+
let node = root;
|
|
636
|
+
for (let i = 0; i < parts.length; i++) {
|
|
637
|
+
const part = parts[i];
|
|
638
|
+
if (!node[part])
|
|
639
|
+
node[part] = { __children: {}, __isLeaf: false };
|
|
640
|
+
if (i === parts.length - 1) {
|
|
641
|
+
node[part].__isLeaf = true;
|
|
642
|
+
node[part].__variable = v;
|
|
643
|
+
}
|
|
644
|
+
node = node[part].__children;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
return root;
|
|
648
|
+
};
|
|
649
|
+
_renderVariableTree = new WeakSet();
|
|
650
|
+
renderVariableTree_fn = function(node, path) {
|
|
651
|
+
return x`
|
|
652
|
+
<div style="margin-left: ${path.length * 20}px;">
|
|
653
|
+
${Object.entries(node).map(([key, value]) => {
|
|
654
|
+
const groupPath = [...path, key].join("/");
|
|
655
|
+
if (value.__isLeaf) {
|
|
656
|
+
return x`
|
|
657
|
+
<div class="option-row">
|
|
658
|
+
<label class="checkbox-option">
|
|
659
|
+
<input
|
|
660
|
+
type="checkbox"
|
|
661
|
+
.checked=${this.selectedVariables.some(
|
|
662
|
+
(v) => v.name === value.__variable.name
|
|
663
|
+
)}
|
|
664
|
+
@change=${(e) => __privateMethod(this, _toggleVariableSelection, toggleVariableSelection_fn).call(this, e, value.__variable)}
|
|
665
|
+
/>
|
|
666
|
+
<span>${key}</span>
|
|
667
|
+
</label>
|
|
668
|
+
</div>
|
|
669
|
+
`;
|
|
670
|
+
} else {
|
|
671
|
+
const expanded = this.expandedVariableGroups.has(groupPath);
|
|
672
|
+
return x`
|
|
673
|
+
<div class="option-row" style="align-items: flex-start;">
|
|
674
|
+
<span
|
|
675
|
+
style="cursor: pointer; display: flex; align-items: center;"
|
|
676
|
+
@click=${() => __privateMethod(this, _toggleGroupExpand, toggleGroupExpand_fn).call(this, groupPath)}
|
|
677
|
+
>
|
|
678
|
+
<terra-icon
|
|
679
|
+
library="heroicons"
|
|
680
|
+
name="${expanded ? "outline-minus-circle" : "outline-plus-circle"}"
|
|
681
|
+
style="margin-right: 4px;"
|
|
682
|
+
></terra-icon>
|
|
683
|
+
<span style="font-weight: 500;">${key}</span>
|
|
684
|
+
</span>
|
|
685
|
+
</div>
|
|
686
|
+
${expanded ? __privateMethod(this, _renderVariableTree, renderVariableTree_fn).call(this, value.__children, [
|
|
687
|
+
...path,
|
|
688
|
+
key
|
|
689
|
+
]) : ""}
|
|
690
|
+
`;
|
|
691
|
+
}
|
|
692
|
+
})}
|
|
693
|
+
</div>
|
|
694
|
+
`;
|
|
695
|
+
};
|
|
696
|
+
_getAllGroupPaths = new WeakSet();
|
|
697
|
+
getAllGroupPaths_fn = function(node, path = []) {
|
|
698
|
+
let groups = [];
|
|
699
|
+
for (const [key, value] of Object.entries(node)) {
|
|
700
|
+
if (!value.__isLeaf) {
|
|
701
|
+
const groupPath = [...path, key].join("/");
|
|
702
|
+
groups.push(groupPath);
|
|
703
|
+
groups = groups.concat(
|
|
704
|
+
__privateMethod(this, _getAllGroupPaths, getAllGroupPaths_fn).call(this, value.__children, [...path, key])
|
|
705
|
+
);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
return groups;
|
|
709
|
+
};
|
|
710
|
+
_toggleGroupExpand = new WeakSet();
|
|
711
|
+
toggleGroupExpand_fn = function(groupPath) {
|
|
712
|
+
const set = new Set(this.expandedVariableGroups);
|
|
713
|
+
if (set.has(groupPath)) {
|
|
714
|
+
set.delete(groupPath);
|
|
715
|
+
} else {
|
|
716
|
+
set.add(groupPath);
|
|
717
|
+
}
|
|
718
|
+
this.expandedVariableGroups = set;
|
|
719
|
+
};
|
|
720
|
+
_toggleExpandCollapseAll = new WeakSet();
|
|
721
|
+
toggleExpandCollapseAll_fn = function(tree) {
|
|
722
|
+
const allGroups = __privateMethod(this, _getAllGroupPaths, getAllGroupPaths_fn).call(this, tree);
|
|
723
|
+
const allExpanded = allGroups.length > 0 && allGroups.every((g) => this.expandedVariableGroups.has(g));
|
|
724
|
+
if (allExpanded) {
|
|
725
|
+
this.expandedVariableGroups = /* @__PURE__ */ new Set();
|
|
726
|
+
} else {
|
|
727
|
+
this.expandedVariableGroups = new Set(allGroups);
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
_toggleVariableSelection = new WeakSet();
|
|
731
|
+
toggleVariableSelection_fn = function(e, variable) {
|
|
732
|
+
__privateMethod(this, _markFieldTouched, markFieldTouched_fn).call(this, "variables");
|
|
733
|
+
const checked = e.target.checked;
|
|
734
|
+
if (checked) {
|
|
735
|
+
if (!this.selectedVariables.some((v) => v.name === variable.name)) {
|
|
736
|
+
this.selectedVariables = [...this.selectedVariables, variable];
|
|
737
|
+
}
|
|
738
|
+
} else {
|
|
739
|
+
this.selectedVariables = this.selectedVariables.filter(
|
|
740
|
+
(v) => v.name !== variable.name
|
|
741
|
+
);
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
_markFieldTouched = new WeakSet();
|
|
745
|
+
markFieldTouched_fn = function(field) {
|
|
746
|
+
this.touchedFields = new Set(this.touchedFields).add(field);
|
|
747
|
+
};
|
|
748
|
+
_resetVariableSelection = new WeakMap();
|
|
749
|
+
_renderJobStatus = new WeakSet();
|
|
750
|
+
renderJobStatus_fn = function() {
|
|
751
|
+
var _a, _b;
|
|
752
|
+
if (!((_a = __privateGet(this, _controller).currentJob) == null ? void 0 : _a.jobID)) {
|
|
753
|
+
return x`<div class="results-section" id="job-status-section">
|
|
754
|
+
<h2 class="results-title">Results:</h2>
|
|
755
|
+
|
|
756
|
+
<div class="progress-container">
|
|
757
|
+
<div class="progress-text">
|
|
758
|
+
<span class="spinner"></span>
|
|
759
|
+
<span class="status-running">Searching for data...</span>
|
|
760
|
+
</div>
|
|
761
|
+
|
|
762
|
+
<div class="progress-bar">
|
|
763
|
+
<div class="progress-fill" style="width: 0%"></div>
|
|
764
|
+
</div>
|
|
765
|
+
</div>
|
|
766
|
+
|
|
767
|
+
${__privateMethod(this, _renderJobMessage, renderJobMessage_fn).call(this)}
|
|
768
|
+
</div>`;
|
|
769
|
+
}
|
|
770
|
+
return x`
|
|
771
|
+
<div class="results-section" id="job-status-section">
|
|
772
|
+
<h2 class="results-title">Results:</h2>
|
|
773
|
+
|
|
774
|
+
${__privateGet(this, _controller).currentJob.status !== "canceled" && __privateGet(this, _controller).currentJob.status !== "failed" ? x` <div class="progress-container">
|
|
775
|
+
<div class="progress-text">
|
|
776
|
+
${__privateGet(this, _controller).currentJob.progress >= 100 ? x`
|
|
777
|
+
<span class="status-complete"
|
|
778
|
+
>✓ Search complete</span
|
|
779
|
+
>
|
|
780
|
+
` : x`
|
|
781
|
+
<span class="spinner"></span>
|
|
782
|
+
<span class="status-running"
|
|
783
|
+
>Searching for data...
|
|
784
|
+
(${__privateGet(this, _controller).currentJob.progress}%)</span
|
|
785
|
+
>
|
|
786
|
+
`}
|
|
787
|
+
</div>
|
|
788
|
+
|
|
789
|
+
<div class="progress-bar">
|
|
790
|
+
<div
|
|
791
|
+
class="progress-fill"
|
|
792
|
+
style="width: ${__privateGet(this, _controller).currentJob.progress}%"
|
|
793
|
+
></div>
|
|
794
|
+
</div>
|
|
795
|
+
</div>` : T}
|
|
796
|
+
|
|
797
|
+
<div class="search-status">
|
|
798
|
+
<span class="file-count"
|
|
799
|
+
>Found ${__privateMethod(this, _numberOfFilesFoundEstimate, numberOfFilesFoundEstimate_fn).call(this)} files</span
|
|
800
|
+
>
|
|
801
|
+
out of estimated
|
|
802
|
+
<span class="estimated-total"
|
|
803
|
+
>${__privateGet(this, _controller).currentJob.numInputGranules.toLocaleString()}</span
|
|
804
|
+
>
|
|
805
|
+
</div>
|
|
806
|
+
|
|
807
|
+
${__privateMethod(this, _renderJobMessage, renderJobMessage_fn).call(this)}
|
|
808
|
+
${((_b = __privateGet(this, _controller).currentJob.errors) == null ? void 0 : _b.length) ? x`
|
|
809
|
+
<terra-accordion>
|
|
810
|
+
<div slot="summary">
|
|
811
|
+
<span
|
|
812
|
+
class="accordion-title"
|
|
813
|
+
style="color: #dc3545;"
|
|
814
|
+
>Errors
|
|
815
|
+
(${__privateGet(this, _controller).currentJob.errors.length})</span
|
|
816
|
+
>
|
|
817
|
+
</div>
|
|
818
|
+
<div class="accordion-content">
|
|
819
|
+
<ul
|
|
820
|
+
style="color: #dc3545; font-size: 14px; padding-left: 20px;"
|
|
821
|
+
>
|
|
822
|
+
${__privateGet(this, _controller).currentJob.errors.map(
|
|
823
|
+
(err) => x`
|
|
824
|
+
<li style="margin-bottom: 12px;">
|
|
825
|
+
<a
|
|
826
|
+
href="${err.url}"
|
|
827
|
+
target="_blank"
|
|
828
|
+
style="word-break: break-all; color: #dc3545; text-decoration: underline;"
|
|
829
|
+
>
|
|
830
|
+
${err.url}
|
|
831
|
+
</a>
|
|
832
|
+
<div style="margin-top: 2px;">
|
|
833
|
+
${err.message}
|
|
834
|
+
</div>
|
|
835
|
+
</li>
|
|
836
|
+
`
|
|
837
|
+
)}
|
|
838
|
+
</ul>
|
|
839
|
+
</div>
|
|
840
|
+
</terra-accordion>
|
|
841
|
+
` : T}
|
|
842
|
+
|
|
843
|
+
<div class="tabs">
|
|
844
|
+
<button
|
|
845
|
+
class="tab ${this.selectedTab === "web-links" ? "active" : ""}"
|
|
846
|
+
@click=${() => this.selectedTab = "web-links"}
|
|
847
|
+
>
|
|
848
|
+
Web Links
|
|
849
|
+
</button>
|
|
850
|
+
|
|
851
|
+
<button
|
|
852
|
+
class="tab ${this.selectedTab === "selected-params" ? "active" : ""}"
|
|
853
|
+
@click=${() => this.selectedTab = "selected-params"}
|
|
854
|
+
>
|
|
855
|
+
Selected Parameters
|
|
856
|
+
</button>
|
|
857
|
+
</div>
|
|
858
|
+
<div
|
|
859
|
+
id="web-links"
|
|
860
|
+
class="tab-content ${this.selectedTab === "web-links" ? "active" : ""}"
|
|
861
|
+
>
|
|
862
|
+
${__privateMethod(this, _getDocumentationLinks, getDocumentationLinks_fn).call(this).length ? x`
|
|
863
|
+
<div class="documentation-links">
|
|
864
|
+
${__privateMethod(this, _getDocumentationLinks, getDocumentationLinks_fn).call(this).map(
|
|
865
|
+
(link) => x`
|
|
866
|
+
<a href="${link.href}" class="doc-link"
|
|
867
|
+
>${link.title}</a
|
|
868
|
+
>
|
|
869
|
+
`
|
|
870
|
+
)}
|
|
871
|
+
</div>
|
|
872
|
+
` : T}
|
|
873
|
+
|
|
874
|
+
<ul class="file-list">
|
|
875
|
+
${__privateMethod(this, _getDataLinks, getDataLinks_fn).call(this).map(
|
|
876
|
+
(link) => x`
|
|
877
|
+
<li class="file-item">
|
|
878
|
+
<a
|
|
879
|
+
href="${link.href}"
|
|
880
|
+
class="file-link"
|
|
881
|
+
target="_blank"
|
|
882
|
+
>
|
|
883
|
+
${link.title}
|
|
884
|
+
</a>
|
|
885
|
+
</li>
|
|
886
|
+
`
|
|
887
|
+
)}
|
|
888
|
+
</ul>
|
|
889
|
+
</div>
|
|
890
|
+
|
|
891
|
+
<div
|
|
892
|
+
id="selected-params"
|
|
893
|
+
class="tab-content ${this.selectedTab === "selected-params" ? "active" : ""}"
|
|
894
|
+
>
|
|
895
|
+
${__privateMethod(this, _renderSelectedParams, renderSelectedParams_fn).call(this)}
|
|
896
|
+
</div>
|
|
897
|
+
</div>
|
|
898
|
+
|
|
899
|
+
<div class="footer">
|
|
900
|
+
${__privateGet(this, _controller).currentJob.status === "successful" /* SUCCESSFUL */ || __privateGet(this, _controller).currentJob.status === "complete_with_errors" /* COMPLETE_WITH_ERRORS */ ? x`
|
|
901
|
+
<div
|
|
902
|
+
class="download-dropdown ${this.showDownloadMenu ? "open" : ""}"
|
|
903
|
+
>
|
|
904
|
+
<button
|
|
905
|
+
class="download-btn"
|
|
906
|
+
@click=${(e) => __privateMethod(this, _toggleDownloadMenu, toggleDownloadMenu_fn).call(this, e)}
|
|
907
|
+
>
|
|
908
|
+
<svg
|
|
909
|
+
class="download-icon-small"
|
|
910
|
+
viewBox="0 0 24 24"
|
|
911
|
+
fill="currentColor"
|
|
912
|
+
>
|
|
913
|
+
<path
|
|
914
|
+
d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"
|
|
915
|
+
/>
|
|
916
|
+
</svg>
|
|
917
|
+
Download Options
|
|
918
|
+
<svg
|
|
919
|
+
class="dropdown-arrow"
|
|
920
|
+
viewBox="0 0 24 24"
|
|
921
|
+
fill="currentColor"
|
|
922
|
+
>
|
|
923
|
+
<path d="M7 10l5 5 5-5z" />
|
|
924
|
+
</svg>
|
|
925
|
+
</button>
|
|
926
|
+
|
|
927
|
+
<div
|
|
928
|
+
class="download-menu ${this.showDownloadMenu ? "open" : ""}"
|
|
929
|
+
>
|
|
930
|
+
<button
|
|
931
|
+
class="download-option"
|
|
932
|
+
@click=${(e) => __privateMethod(this, _downloadLinksAsTxt, downloadLinksAsTxt_fn).call(this, e)}
|
|
933
|
+
>
|
|
934
|
+
<svg
|
|
935
|
+
class="file-icon"
|
|
936
|
+
viewBox="0 0 24 24"
|
|
937
|
+
fill="currentColor"
|
|
938
|
+
>
|
|
939
|
+
<path
|
|
940
|
+
d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"
|
|
941
|
+
/>
|
|
942
|
+
</svg>
|
|
943
|
+
File List
|
|
944
|
+
</button>
|
|
945
|
+
<button
|
|
946
|
+
class="download-option"
|
|
947
|
+
@click=${(e) => __privateMethod(this, _downloadPythonScript, downloadPythonScript_fn).call(this, e)}
|
|
948
|
+
>
|
|
949
|
+
<svg
|
|
950
|
+
class="file-icon"
|
|
951
|
+
viewBox="0 0 128 128"
|
|
952
|
+
width="16"
|
|
953
|
+
height="16"
|
|
954
|
+
>
|
|
955
|
+
<path
|
|
956
|
+
fill="currentColor"
|
|
957
|
+
d="M49.33 62h29.159C86.606 62 93 55.132 93 46.981V19.183c0-7.912-6.632-13.856-14.555-15.176-5.014-.835-10.195-1.215-15.187-1.191-4.99.023-9.612.448-13.805 1.191C37.098 6.188 35 10.758 35 19.183V30h29v4H23.776c-8.484 0-15.914 5.108-18.237 14.811-2.681 11.12-2.8 17.919 0 29.53C7.614 86.983 12.569 93 21.054 93H31V79.952C31 70.315 39.428 62 49.33 62zm-1.838-39.11c-3.026 0-5.478-2.479-5.478-5.545 0-3.079 2.451-5.581 5.478-5.581 3.015 0 5.479 2.502 5.479 5.581-.001 3.066-2.465 5.545-5.479 5.545zm74.789 25.921C120.183 40.363 116.178 34 107.682 34H97v12.981C97 57.031 88.206 65 78.489 65H49.33C41.342 65 35 72.326 35 80.326v27.8c0 7.91 6.745 12.564 14.462 14.834 9.242 2.717 17.994 3.208 29.051 0C85.862 120.831 93 116.549 93 108.126V97H64v-4h43.682c8.484 0 11.647-5.776 14.599-14.66 3.047-9.145 2.916-17.799 0-29.529zm-41.955 55.606c3.027 0 5.479 2.479 5.479 5.547 0 3.076-2.451 5.579-5.479 5.579-3.015 0-5.478-2.502-5.478-5.579 0-3.068 2.463-5.547 5.478-5.547z"
|
|
958
|
+
></path>
|
|
959
|
+
</svg>
|
|
960
|
+
Python Script
|
|
961
|
+
</button>
|
|
962
|
+
<button
|
|
963
|
+
class="download-option"
|
|
964
|
+
@click=${(e) => __privateMethod(this, _downloadEarthdataDownload, downloadEarthdataDownload_fn).call(this, e)}
|
|
965
|
+
>
|
|
966
|
+
<svg
|
|
967
|
+
class="file-icon"
|
|
968
|
+
viewBox="0 0 64 64"
|
|
969
|
+
fill="none"
|
|
970
|
+
width="16"
|
|
971
|
+
height="16"
|
|
972
|
+
>
|
|
973
|
+
<circle
|
|
974
|
+
cx="32"
|
|
975
|
+
cy="32"
|
|
976
|
+
r="28"
|
|
977
|
+
fill="currentColor"
|
|
978
|
+
/>
|
|
979
|
+
<path
|
|
980
|
+
d="M32 14v26M32 40l-9-9M32 40l9-9"
|
|
981
|
+
stroke="#fff"
|
|
982
|
+
stroke-width="4"
|
|
983
|
+
stroke-linecap="round"
|
|
984
|
+
stroke-linejoin="round"
|
|
985
|
+
fill="none"
|
|
986
|
+
/>
|
|
987
|
+
</svg>
|
|
988
|
+
Earthdata Download
|
|
989
|
+
</button>
|
|
990
|
+
</div>
|
|
991
|
+
</div>
|
|
992
|
+
` : T}
|
|
993
|
+
${__privateGet(this, _controller).currentJob.status === "running" ? x`<button
|
|
994
|
+
class="btn btn-success"
|
|
995
|
+
@click=${__privateMethod(this, _cancelJob, cancelJob_fn)}
|
|
996
|
+
?disabled=${this.cancelingGetData}
|
|
997
|
+
>
|
|
998
|
+
${this.cancelingGetData ? "Canceling..." : "Cancel request"}
|
|
999
|
+
</button>` : T}
|
|
1000
|
+
|
|
1001
|
+
<div class="job-info">
|
|
1002
|
+
Job ID:
|
|
1003
|
+
<span class="job-id"
|
|
1004
|
+
><a
|
|
1005
|
+
href="https://harmony.earthdata.nasa.gov/jobs/${__privateGet(this, _controller).currentJob.jobID}"
|
|
1006
|
+
target="_blank"
|
|
1007
|
+
>${__privateGet(this, _controller).currentJob.jobID}</a
|
|
1008
|
+
></span
|
|
1009
|
+
>
|
|
1010
|
+
<span class="info-icon">?</span>
|
|
1011
|
+
</div>
|
|
1012
|
+
</div>
|
|
1013
|
+
`;
|
|
1014
|
+
};
|
|
1015
|
+
_renderSelectedParams = new WeakSet();
|
|
1016
|
+
renderSelectedParams_fn = function() {
|
|
1017
|
+
var _a, _b;
|
|
1018
|
+
const collection = (_a = this.collectionWithServices) == null ? void 0 : _a.collection;
|
|
1019
|
+
const variables = this.selectedVariables.length ? this.selectedVariables.map((v) => v.name) : ["All"];
|
|
1020
|
+
const dateRange = this.selectedDateRange.startDate && this.selectedDateRange.endDate ? `${this.selectedDateRange.startDate} to ${this.selectedDateRange.endDate}` : "\u2014";
|
|
1021
|
+
let spatial = "\u2014";
|
|
1022
|
+
if (this.spatialSelection) {
|
|
1023
|
+
if ("w" in this.spatialSelection) {
|
|
1024
|
+
spatial = `Bounding Box: ${this.spatialSelection.w}, ${this.spatialSelection.s}, ${this.spatialSelection.e}, ${this.spatialSelection.n}`;
|
|
1025
|
+
} else if ("lat" in this.spatialSelection && "lng" in this.spatialSelection) {
|
|
1026
|
+
spatial = `Point: ${this.spatialSelection.lat}, ${this.spatialSelection.lng}`;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
return x`
|
|
1030
|
+
<dl class="params-summary">
|
|
1031
|
+
<div>
|
|
1032
|
+
<dt><strong>Dataset</strong></dt>
|
|
1033
|
+
<dd>${(_b = collection == null ? void 0 : collection.EntryTitle) != null ? _b : "\u2014"}</dd>
|
|
1034
|
+
</div>
|
|
1035
|
+
<div>
|
|
1036
|
+
<dt><strong>Variables</strong></dt>
|
|
1037
|
+
<dd>${variables.map((v) => x`<div>${v}</div>`)}</dd>
|
|
1038
|
+
</div>
|
|
1039
|
+
<div>
|
|
1040
|
+
<dt><strong>Date Range</strong></dt>
|
|
1041
|
+
<dd>${dateRange}</dd>
|
|
1042
|
+
</div>
|
|
1043
|
+
<div>
|
|
1044
|
+
<dt><strong>Spatial</strong></dt>
|
|
1045
|
+
<dd>${spatial}</dd>
|
|
1046
|
+
</div>
|
|
1047
|
+
</dl>
|
|
1048
|
+
|
|
1049
|
+
<terra-button @click=${__privateMethod(this, _refineParameters, refineParameters_fn)}
|
|
1050
|
+
>Refine Parameters</terra-button
|
|
1051
|
+
>
|
|
1052
|
+
`;
|
|
1053
|
+
};
|
|
1054
|
+
_cancelJob = new WeakSet();
|
|
1055
|
+
cancelJob_fn = function() {
|
|
1056
|
+
this.cancelingGetData = true;
|
|
1057
|
+
__privateGet(this, _controller).cancelCurrentJob();
|
|
1058
|
+
};
|
|
1059
|
+
_getData = new WeakSet();
|
|
1060
|
+
getData_fn = function() {
|
|
1061
|
+
this.cancelingGetData = false;
|
|
1062
|
+
__privateMethod(this, _touchAllFields, touchAllFields_fn).call(this);
|
|
1063
|
+
__privateGet(this, _controller).cancelCurrentJob();
|
|
1064
|
+
__privateGet(this, _controller).currentJob = null;
|
|
1065
|
+
__privateGet(this, _controller).jobStatusTask.run();
|
|
1066
|
+
setTimeout(() => {
|
|
1067
|
+
const el = this.renderRoot.querySelector("#job-status-section");
|
|
1068
|
+
el == null ? void 0 : el.scrollIntoView({ behavior: "smooth" });
|
|
1069
|
+
}, 100);
|
|
1070
|
+
this.refineParameters = false;
|
|
1071
|
+
};
|
|
1072
|
+
_touchAllFields = new WeakSet();
|
|
1073
|
+
touchAllFields_fn = function() {
|
|
1074
|
+
this.touchedFields = /* @__PURE__ */ new Set(["variables", "spatial"]);
|
|
1075
|
+
};
|
|
1076
|
+
_numberOfFilesFoundEstimate = new WeakSet();
|
|
1077
|
+
numberOfFilesFoundEstimate_fn = function() {
|
|
1078
|
+
return Math.floor(
|
|
1079
|
+
__privateGet(this, _controller).currentJob.numInputGranules * __privateGet(this, _controller).currentJob.progress / 100
|
|
1080
|
+
);
|
|
1081
|
+
};
|
|
1082
|
+
_getDocumentationLinks = new WeakSet();
|
|
1083
|
+
getDocumentationLinks_fn = function() {
|
|
1084
|
+
return __privateGet(this, _controller).currentJob.links.filter(
|
|
1085
|
+
(link) => link.rel === "stac-catalog-json"
|
|
1086
|
+
);
|
|
1087
|
+
};
|
|
1088
|
+
_getDataLinks = new WeakSet();
|
|
1089
|
+
getDataLinks_fn = function() {
|
|
1090
|
+
return __privateGet(this, _controller).currentJob.links.filter((link) => link.rel === "data");
|
|
1091
|
+
};
|
|
1092
|
+
_hasAtLeastOneSubsetOption = new WeakSet();
|
|
1093
|
+
hasAtLeastOneSubsetOption_fn = function() {
|
|
1094
|
+
var _a, _b, _c, _d;
|
|
1095
|
+
return ((_a = this.collectionWithServices) == null ? void 0 : _a.bboxSubset) || ((_b = this.collectionWithServices) == null ? void 0 : _b.shapeSubset) || ((_c = this.collectionWithServices) == null ? void 0 : _c.variableSubset) || ((_d = this.collectionWithServices) == null ? void 0 : _d.temporalSubset);
|
|
1096
|
+
};
|
|
1097
|
+
_hasSpatialSubset = new WeakSet();
|
|
1098
|
+
hasSpatialSubset_fn = function() {
|
|
1099
|
+
var _a, _b;
|
|
1100
|
+
return ((_a = this.collectionWithServices) == null ? void 0 : _a.bboxSubset) || ((_b = this.collectionWithServices) == null ? void 0 : _b.shapeSubset);
|
|
1101
|
+
};
|
|
1102
|
+
_renderJobMessage = new WeakSet();
|
|
1103
|
+
renderJobMessage_fn = function() {
|
|
1104
|
+
const warningStatuses = [
|
|
1105
|
+
"canceled" /* CANCELED */,
|
|
1106
|
+
"complete_with_errors" /* COMPLETE_WITH_ERRORS */,
|
|
1107
|
+
"running_with_errors" /* RUNNING_WITH_ERRORS */
|
|
1108
|
+
];
|
|
1109
|
+
const errorStatuses = ["failed" /* FAILED */];
|
|
1110
|
+
let type = "normal";
|
|
1111
|
+
if (warningStatuses.includes(__privateGet(this, _controller).currentJob.status)) {
|
|
1112
|
+
type = "warning";
|
|
1113
|
+
} else if (errorStatuses.includes(__privateGet(this, _controller).currentJob.status)) {
|
|
1114
|
+
type = "error";
|
|
1115
|
+
}
|
|
1116
|
+
let color, bg;
|
|
1117
|
+
if (type === "error") {
|
|
1118
|
+
color = "#dc3545";
|
|
1119
|
+
bg = "#f8d7da";
|
|
1120
|
+
} else if (type === "warning") {
|
|
1121
|
+
color = "#856404";
|
|
1122
|
+
bg = "#fff3cd";
|
|
1123
|
+
} else {
|
|
1124
|
+
color = "#555";
|
|
1125
|
+
bg = "#f8f9fa";
|
|
1126
|
+
}
|
|
1127
|
+
return x`
|
|
1128
|
+
<div
|
|
1129
|
+
style="
|
|
1130
|
+
margin: 24px 0 16px 0;
|
|
1131
|
+
padding: 16px 20px;
|
|
1132
|
+
border-radius: 6px;
|
|
1133
|
+
background: ${bg};
|
|
1134
|
+
color: ${color};
|
|
1135
|
+
border: 1px solid ${color}22;
|
|
1136
|
+
"
|
|
1137
|
+
>
|
|
1138
|
+
${__privateGet(this, _controller).currentJob.message}
|
|
1139
|
+
</div>
|
|
1140
|
+
`;
|
|
1141
|
+
};
|
|
1142
|
+
_estimateJobSize = new WeakSet();
|
|
1143
|
+
estimateJobSize_fn = function() {
|
|
1144
|
+
var _a, _b;
|
|
1145
|
+
const collection = (_a = this.collectionWithServices) == null ? void 0 : _a.collection;
|
|
1146
|
+
if (!collection)
|
|
1147
|
+
return;
|
|
1148
|
+
const range = __privateMethod(this, _getCollectionDateRange, getCollectionDateRange_fn).call(this);
|
|
1149
|
+
let startDate;
|
|
1150
|
+
let endDate;
|
|
1151
|
+
let links = (_b = collection.granuleCount) != null ? _b : 0;
|
|
1152
|
+
if (this.selectedDateRange.startDate && this.selectedDateRange.endDate) {
|
|
1153
|
+
startDate = this.selectedDateRange.startDate;
|
|
1154
|
+
endDate = this.selectedDateRange.endDate;
|
|
1155
|
+
} else {
|
|
1156
|
+
startDate = range.startDate;
|
|
1157
|
+
endDate = range.endDate;
|
|
1158
|
+
}
|
|
1159
|
+
if (!startDate || !endDate)
|
|
1160
|
+
return;
|
|
1161
|
+
const start = new Date(startDate);
|
|
1162
|
+
const end = new Date(endDate);
|
|
1163
|
+
const days = Math.floor((end.getTime() - start.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
|
|
1164
|
+
if (range.startDate && range.endDate) {
|
|
1165
|
+
const availableDaysInCollection = Math.floor(
|
|
1166
|
+
(new Date(range.endDate).getTime() - new Date(range.startDate).getTime()) / (1e3 * 60 * 60 * 24)
|
|
1167
|
+
) + 1;
|
|
1168
|
+
const granulesPerDay = links / availableDaysInCollection;
|
|
1169
|
+
links = Math.ceil(days * granulesPerDay);
|
|
1170
|
+
}
|
|
1171
|
+
return { days, links };
|
|
1172
|
+
};
|
|
1173
|
+
_refineParameters = new WeakSet();
|
|
1174
|
+
refineParameters_fn = function() {
|
|
1175
|
+
this.refineParameters = true;
|
|
1176
|
+
};
|
|
1177
|
+
_toggleDownloadMenu = new WeakSet();
|
|
1178
|
+
toggleDownloadMenu_fn = function(event) {
|
|
1179
|
+
event.stopPropagation();
|
|
1180
|
+
this.showDownloadMenu = !this.showDownloadMenu;
|
|
1181
|
+
};
|
|
1182
|
+
_downloadLinksAsTxt = new WeakSet();
|
|
1183
|
+
downloadLinksAsTxt_fn = function(event) {
|
|
1184
|
+
var _a;
|
|
1185
|
+
event.stopPropagation();
|
|
1186
|
+
if (!((_a = __privateGet(this, _controller).currentJob) == null ? void 0 : _a.links)) {
|
|
1187
|
+
return;
|
|
1188
|
+
}
|
|
1189
|
+
const dataLinks = __privateMethod(this, _getDataLinks, getDataLinks_fn).call(this);
|
|
1190
|
+
if (dataLinks.length === 0) {
|
|
1191
|
+
return;
|
|
1192
|
+
}
|
|
1193
|
+
const content = dataLinks.map((link) => link.href).join("\n");
|
|
1194
|
+
const blob = new Blob([content], { type: "text/plain" });
|
|
1195
|
+
const url = URL.createObjectURL(blob);
|
|
1196
|
+
const a = document.createElement("a");
|
|
1197
|
+
a.href = url;
|
|
1198
|
+
a.download = `subset_links_${__privateGet(this, _controller).currentJob.jobID}.txt`;
|
|
1199
|
+
document.body.appendChild(a);
|
|
1200
|
+
a.click();
|
|
1201
|
+
document.body.removeChild(a);
|
|
1202
|
+
URL.revokeObjectURL(url);
|
|
1203
|
+
this.showDownloadMenu = false;
|
|
1204
|
+
};
|
|
1205
|
+
_downloadPythonScript = new WeakSet();
|
|
1206
|
+
downloadPythonScript_fn = async function(event) {
|
|
1207
|
+
var _a;
|
|
1208
|
+
event.stopPropagation();
|
|
1209
|
+
if (!((_a = __privateGet(this, _controller).currentJob) == null ? void 0 : _a.links)) {
|
|
1210
|
+
return;
|
|
1211
|
+
}
|
|
1212
|
+
const response = await fetch(
|
|
1213
|
+
getBasePath("assets/data-subsetter/download_subset_files.py.txt")
|
|
1214
|
+
);
|
|
1215
|
+
if (!response.ok) {
|
|
1216
|
+
alert(
|
|
1217
|
+
"Sorry, there was a problem generating the Python script. We are investigating the issue.\nYou could try using the Jupyter Notebook in the meantime"
|
|
1218
|
+
);
|
|
1219
|
+
}
|
|
1220
|
+
const content = (await response.text()).replace(
|
|
1221
|
+
/{{jobId}}/gi,
|
|
1222
|
+
__privateGet(this, _controller).currentJob.jobID
|
|
1223
|
+
);
|
|
1224
|
+
const blob = new Blob([content], { type: "text/plain" });
|
|
1225
|
+
const url = URL.createObjectURL(blob);
|
|
1226
|
+
const a = document.createElement("a");
|
|
1227
|
+
a.href = url;
|
|
1228
|
+
a.download = `download_subset_files_${__privateGet(this, _controller).currentJob.jobID}.py`;
|
|
1229
|
+
document.body.appendChild(a);
|
|
1230
|
+
a.click();
|
|
1231
|
+
document.body.removeChild(a);
|
|
1232
|
+
URL.revokeObjectURL(url);
|
|
1233
|
+
this.showDownloadMenu = false;
|
|
1234
|
+
};
|
|
1235
|
+
_downloadEarthdataDownload = new WeakSet();
|
|
1236
|
+
downloadEarthdataDownload_fn = async function(event) {
|
|
1237
|
+
var _a;
|
|
1238
|
+
event.stopPropagation();
|
|
1239
|
+
if (!((_a = __privateGet(this, _controller).currentJob) == null ? void 0 : _a.links)) {
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
alert("Sorry, Earthdata Download is not currently supported");
|
|
1243
|
+
this.showDownloadMenu = false;
|
|
1244
|
+
};
|
|
1245
|
+
_handleClickOutside = new WeakSet();
|
|
1246
|
+
handleClickOutside_fn = function(event) {
|
|
1247
|
+
if (!this.showDownloadMenu) {
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1250
|
+
const target = event.target;
|
|
1251
|
+
const downloadDropdown = this.renderRoot.querySelector(".download-dropdown");
|
|
1252
|
+
if (downloadDropdown && !downloadDropdown.contains(target)) {
|
|
1253
|
+
this.showDownloadMenu = false;
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
TerraDataSubsetter.styles = [component_styles_default, data_subsetter_styles_default];
|
|
1257
|
+
TerraDataSubsetter.dependencies = {
|
|
1258
|
+
"terra-accordion": TerraAccordion,
|
|
1259
|
+
"terra-date-picker": TerraDatePicker,
|
|
1260
|
+
"terra-icon": TerraIcon,
|
|
1261
|
+
"terra-spatial-picker": TerraSpatialPicker
|
|
1262
|
+
};
|
|
1263
|
+
__decorateClass([
|
|
1264
|
+
n({ reflect: true, attribute: "collection-entry-id" })
|
|
1265
|
+
], TerraDataSubsetter.prototype, "collectionEntryId", 2);
|
|
1266
|
+
__decorateClass([
|
|
1267
|
+
n({ reflect: true, type: Boolean, attribute: "show-collection-search" })
|
|
1268
|
+
], TerraDataSubsetter.prototype, "showCollectionSearch", 2);
|
|
1269
|
+
__decorateClass([
|
|
1270
|
+
n({ reflect: true, attribute: "job-id" })
|
|
1271
|
+
], TerraDataSubsetter.prototype, "jobId", 2);
|
|
1272
|
+
__decorateClass([
|
|
1273
|
+
n({ attribute: "bearer-token" })
|
|
1274
|
+
], TerraDataSubsetter.prototype, "bearerToken", 2);
|
|
1275
|
+
__decorateClass([
|
|
1276
|
+
r()
|
|
1277
|
+
], TerraDataSubsetter.prototype, "collectionWithServices", 2);
|
|
1278
|
+
__decorateClass([
|
|
1279
|
+
r()
|
|
1280
|
+
], TerraDataSubsetter.prototype, "selectedVariables", 2);
|
|
1281
|
+
__decorateClass([
|
|
1282
|
+
r()
|
|
1283
|
+
], TerraDataSubsetter.prototype, "expandedVariableGroups", 2);
|
|
1284
|
+
__decorateClass([
|
|
1285
|
+
r()
|
|
1286
|
+
], TerraDataSubsetter.prototype, "touchedFields", 2);
|
|
1287
|
+
__decorateClass([
|
|
1288
|
+
r()
|
|
1289
|
+
], TerraDataSubsetter.prototype, "spatialSelection", 2);
|
|
1290
|
+
__decorateClass([
|
|
1291
|
+
r()
|
|
1292
|
+
], TerraDataSubsetter.prototype, "selectedDateRange", 2);
|
|
1293
|
+
__decorateClass([
|
|
1294
|
+
r()
|
|
1295
|
+
], TerraDataSubsetter.prototype, "selectedFormat", 2);
|
|
1296
|
+
__decorateClass([
|
|
1297
|
+
r()
|
|
1298
|
+
], TerraDataSubsetter.prototype, "cancelingGetData", 2);
|
|
1299
|
+
__decorateClass([
|
|
1300
|
+
r()
|
|
1301
|
+
], TerraDataSubsetter.prototype, "selectedTab", 2);
|
|
1302
|
+
__decorateClass([
|
|
1303
|
+
r()
|
|
1304
|
+
], TerraDataSubsetter.prototype, "refineParameters", 2);
|
|
1305
|
+
__decorateClass([
|
|
1306
|
+
r()
|
|
1307
|
+
], TerraDataSubsetter.prototype, "showDownloadMenu", 2);
|
|
1308
|
+
__decorateClass([
|
|
1309
|
+
watch(["collectionWithServices"])
|
|
1310
|
+
], TerraDataSubsetter.prototype, "collectionChanged", 1);
|
|
1311
|
+
|
|
1312
|
+
export {
|
|
1313
|
+
TerraDataSubsetter
|
|
1314
|
+
};
|