@esri/solutions-components 0.8.14 → 0.8.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/arcgis-pdf-creator/PDFLabels.d.ts +218 -0
- package/dist/assets/t9n/crowdsource-reporter/resources.json +0 -1
- package/dist/assets/t9n/crowdsource-reporter/resources_ar.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_bg.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_bs.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_ca.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_cs.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_da.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_de.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_el.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_en.json +0 -1
- package/dist/assets/t9n/crowdsource-reporter/resources_es.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_et.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_fi.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_fr.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_he.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_hr.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_hu.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_id.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_it.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_ja.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_ko.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_lt.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_lv.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_nb.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_nl.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_pl.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_pt-BR.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_pt-PT.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_ro.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_ru.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_sk.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_sl.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_sr.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_sv.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_th.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_tr.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_uk.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_vi.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_zh-CN.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_zh-HK.json +15 -7
- package/dist/assets/t9n/crowdsource-reporter/resources_zh-TW.json +15 -7
- package/dist/assets/t9n/feature-list/resources_ar.json +1 -1
- package/dist/assets/t9n/feature-list/resources_bg.json +1 -1
- package/dist/assets/t9n/feature-list/resources_bs.json +1 -1
- package/dist/assets/t9n/feature-list/resources_ca.json +1 -1
- package/dist/assets/t9n/feature-list/resources_cs.json +1 -1
- package/dist/assets/t9n/feature-list/resources_da.json +1 -1
- package/dist/assets/t9n/feature-list/resources_de.json +1 -1
- package/dist/assets/t9n/feature-list/resources_el.json +1 -1
- package/dist/assets/t9n/feature-list/resources_es.json +1 -1
- package/dist/assets/t9n/feature-list/resources_et.json +1 -1
- package/dist/assets/t9n/feature-list/resources_fi.json +1 -1
- package/dist/assets/t9n/feature-list/resources_fr.json +1 -1
- package/dist/assets/t9n/feature-list/resources_he.json +1 -1
- package/dist/assets/t9n/feature-list/resources_hr.json +1 -1
- package/dist/assets/t9n/feature-list/resources_hu.json +1 -1
- package/dist/assets/t9n/feature-list/resources_id.json +1 -1
- package/dist/assets/t9n/feature-list/resources_it.json +1 -1
- package/dist/assets/t9n/feature-list/resources_ja.json +1 -1
- package/dist/assets/t9n/feature-list/resources_ko.json +1 -1
- package/dist/assets/t9n/feature-list/resources_lt.json +1 -1
- package/dist/assets/t9n/feature-list/resources_lv.json +1 -1
- package/dist/assets/t9n/feature-list/resources_nb.json +1 -1
- package/dist/assets/t9n/feature-list/resources_nl.json +1 -1
- package/dist/assets/t9n/feature-list/resources_pl.json +1 -1
- package/dist/assets/t9n/feature-list/resources_pt-BR.json +1 -1
- package/dist/assets/t9n/feature-list/resources_pt-PT.json +1 -1
- package/dist/assets/t9n/feature-list/resources_ro.json +1 -1
- package/dist/assets/t9n/feature-list/resources_ru.json +1 -1
- package/dist/assets/t9n/feature-list/resources_sk.json +1 -1
- package/dist/assets/t9n/feature-list/resources_sl.json +1 -1
- package/dist/assets/t9n/feature-list/resources_sr.json +1 -1
- package/dist/assets/t9n/feature-list/resources_sv.json +1 -1
- package/dist/assets/t9n/feature-list/resources_th.json +1 -1
- package/dist/assets/t9n/feature-list/resources_tr.json +1 -1
- package/dist/assets/t9n/feature-list/resources_uk.json +1 -1
- package/dist/assets/t9n/feature-list/resources_vi.json +1 -1
- package/dist/assets/t9n/feature-list/resources_zh-CN.json +1 -1
- package/dist/assets/t9n/feature-list/resources_zh-HK.json +1 -1
- package/dist/assets/t9n/feature-list/resources_zh-TW.json +1 -1
- package/dist/assets/t9n/layer-list/resources.json +1 -1
- package/dist/assets/t9n/layer-list/resources_en.json +1 -1
- package/dist/assets/t9n/media-card/resources.json +1 -3
- package/dist/assets/t9n/media-card/resources_ar.json +3 -0
- package/dist/assets/t9n/media-card/resources_bg.json +3 -0
- package/dist/assets/t9n/media-card/resources_bs.json +3 -0
- package/dist/assets/t9n/media-card/resources_ca.json +3 -0
- package/dist/assets/t9n/media-card/resources_cs.json +3 -0
- package/dist/assets/t9n/media-card/resources_da.json +3 -0
- package/dist/assets/t9n/media-card/resources_de.json +3 -0
- package/dist/assets/t9n/media-card/resources_el.json +3 -0
- package/dist/assets/t9n/media-card/resources_en.json +1 -3
- package/dist/assets/t9n/media-card/resources_es.json +3 -0
- package/dist/assets/t9n/media-card/resources_et.json +3 -0
- package/dist/assets/t9n/media-card/resources_fi.json +3 -0
- package/dist/assets/t9n/media-card/resources_fr.json +3 -0
- package/dist/assets/t9n/media-card/resources_he.json +3 -0
- package/dist/assets/t9n/media-card/resources_hr.json +3 -0
- package/dist/assets/t9n/media-card/resources_hu.json +3 -0
- package/dist/assets/t9n/media-card/resources_id.json +3 -0
- package/dist/assets/t9n/media-card/resources_it.json +3 -0
- package/dist/assets/t9n/media-card/resources_ja.json +3 -0
- package/dist/assets/t9n/media-card/resources_ko.json +3 -0
- package/dist/assets/t9n/media-card/resources_lt.json +3 -0
- package/dist/assets/t9n/media-card/resources_lv.json +3 -0
- package/dist/assets/t9n/media-card/resources_nb.json +3 -0
- package/dist/assets/t9n/media-card/resources_nl.json +3 -0
- package/dist/assets/t9n/media-card/resources_pl.json +3 -0
- package/dist/assets/t9n/media-card/resources_pt-BR.json +3 -0
- package/dist/assets/t9n/media-card/resources_pt-PT.json +3 -0
- package/dist/assets/t9n/media-card/resources_ro.json +3 -0
- package/dist/assets/t9n/media-card/resources_ru.json +3 -0
- package/dist/assets/t9n/media-card/resources_sk.json +3 -0
- package/dist/assets/t9n/media-card/resources_sl.json +3 -0
- package/dist/assets/t9n/media-card/resources_sr.json +3 -0
- package/dist/assets/t9n/media-card/resources_sv.json +3 -0
- package/dist/assets/t9n/media-card/resources_th.json +3 -0
- package/dist/assets/t9n/media-card/resources_tr.json +3 -0
- package/dist/assets/t9n/media-card/resources_uk.json +3 -0
- package/dist/assets/t9n/media-card/resources_vi.json +3 -0
- package/dist/assets/t9n/media-card/resources_zh-CN.json +3 -0
- package/dist/assets/t9n/media-card/resources_zh-HK.json +3 -0
- package/dist/assets/t9n/media-card/resources_zh-TW.json +3 -0
- package/dist/assets/t9n/public-notification/resources_ar.json +3 -1
- package/dist/assets/t9n/public-notification/resources_bg.json +3 -1
- package/dist/assets/t9n/public-notification/resources_bs.json +3 -1
- package/dist/assets/t9n/public-notification/resources_ca.json +3 -1
- package/dist/assets/t9n/public-notification/resources_cs.json +3 -1
- package/dist/assets/t9n/public-notification/resources_da.json +3 -1
- package/dist/assets/t9n/public-notification/resources_de.json +3 -1
- package/dist/assets/t9n/public-notification/resources_el.json +3 -1
- package/dist/assets/t9n/public-notification/resources_es.json +3 -1
- package/dist/assets/t9n/public-notification/resources_et.json +3 -1
- package/dist/assets/t9n/public-notification/resources_fi.json +3 -1
- package/dist/assets/t9n/public-notification/resources_fr.json +3 -1
- package/dist/assets/t9n/public-notification/resources_he.json +3 -1
- package/dist/assets/t9n/public-notification/resources_hr.json +3 -1
- package/dist/assets/t9n/public-notification/resources_hu.json +3 -1
- package/dist/assets/t9n/public-notification/resources_id.json +3 -1
- package/dist/assets/t9n/public-notification/resources_it.json +3 -1
- package/dist/assets/t9n/public-notification/resources_ja.json +3 -1
- package/dist/assets/t9n/public-notification/resources_ko.json +3 -1
- package/dist/assets/t9n/public-notification/resources_lt.json +3 -1
- package/dist/assets/t9n/public-notification/resources_lv.json +3 -1
- package/dist/assets/t9n/public-notification/resources_nb.json +3 -1
- package/dist/assets/t9n/public-notification/resources_nl.json +3 -1
- package/dist/assets/t9n/public-notification/resources_pl.json +3 -1
- package/dist/assets/t9n/public-notification/resources_pt-BR.json +3 -1
- package/dist/assets/t9n/public-notification/resources_pt-PT.json +3 -1
- package/dist/assets/t9n/public-notification/resources_ro.json +3 -1
- package/dist/assets/t9n/public-notification/resources_ru.json +3 -1
- package/dist/assets/t9n/public-notification/resources_sk.json +3 -1
- package/dist/assets/t9n/public-notification/resources_sl.json +3 -1
- package/dist/assets/t9n/public-notification/resources_sr.json +3 -1
- package/dist/assets/t9n/public-notification/resources_sv.json +3 -1
- package/dist/assets/t9n/public-notification/resources_th.json +3 -1
- package/dist/assets/t9n/public-notification/resources_tr.json +3 -1
- package/dist/assets/t9n/public-notification/resources_uk.json +3 -1
- package/dist/assets/t9n/public-notification/resources_vi.json +3 -1
- package/dist/assets/t9n/public-notification/resources_zh-CN.json +3 -1
- package/dist/assets/t9n/public-notification/resources_zh-HK.json +3 -1
- package/dist/assets/t9n/public-notification/resources_zh-TW.json +3 -1
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +6 -6
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-alert_4.cjs.entry.js +12 -8
- package/dist/cjs/calcite-dropdown_4.cjs.entry.js +2 -2
- package/dist/cjs/calcite-flow_6.cjs.entry.js +320 -255
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +7 -7
- package/dist/cjs/card-manager_3.cjs.entry.js +5 -5
- package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -2
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +181 -54
- package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
- package/dist/cjs/{downloadUtils-88c011ad.js → downloadUtils-2e36a300.js} +31 -35
- package/dist/cjs/feature-comments.cjs.entry.js +1 -1
- package/dist/cjs/feature-form-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/feature-list.cjs.entry.js +297 -0
- package/dist/cjs/features-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/{index.es-1d5ee842.js → index.es-56415e48.js} +2 -2
- package/dist/cjs/layout-manager.cjs.entry.js +1 -1
- package/dist/cjs/list-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/location-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +5 -5
- package/dist/cjs/{mapViewUtils-82018df6.js → mapViewUtils-6e46ba33.js} +16 -0
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +3 -3
- package/dist/cjs/refine-results-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/share-item.cjs.entry.js +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +3 -3
- package/dist/cjs/solution-contents_3.cjs.entry.js +3 -3
- package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/create-related-feature/create-related-feature.css +8 -0
- package/dist/collection/components/create-related-feature/create-related-feature.js +426 -0
- package/dist/collection/components/create-related-feature/test/create-related-feature.e2e.js +14 -0
- package/dist/collection/components/create-related-feature/test/create-related-feature.spec.js +22 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +1 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +370 -221
- package/dist/collection/components/deduct-calculator/deduct-calculator.js +1 -1
- package/dist/collection/components/delete-button/delete-button.js +1 -1
- package/dist/collection/components/edit-card/edit-card.js +1 -1
- package/dist/collection/components/feature-comments/feature-comments.js +1 -1
- package/dist/collection/components/feature-details/feature-details.css +6 -3
- package/dist/collection/components/feature-details/feature-details.js +95 -9
- package/dist/collection/components/feature-form-flow-item/feature-form-flow-item.js +1 -1
- package/dist/collection/components/feature-list/feature-list.css +6 -1
- package/dist/collection/components/feature-list/feature-list.js +133 -13
- package/dist/collection/components/features-flow-item/features-flow-item.js +1 -1
- package/dist/collection/components/floor-filter/floor-filter.js +1 -1
- package/dist/collection/components/info-card/info-card.js +11 -7
- package/dist/collection/components/json-editor/json-editor.js +1 -1
- package/dist/collection/components/layer-list/layer-list.js +3 -23
- package/dist/collection/components/layer-table/layer-table.css +1 -1
- package/dist/collection/components/layer-table/layer-table.js +2 -2
- package/dist/collection/components/layout-manager/layout-manager.js +1 -1
- package/dist/collection/components/list-flow-item/list-flow-item.js +1 -1
- package/dist/collection/components/location-flow-item/location-flow-item.js +1 -1
- package/dist/collection/components/map-card/map-card.js +1 -1
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
- package/dist/collection/components/map-fullscreen/map-fullscreen.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
- package/dist/collection/components/map-legend/map-legend.js +1 -1
- package/dist/collection/components/map-picker/map-picker.js +1 -1
- package/dist/collection/components/map-search/map-search.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
- package/dist/collection/components/map-tools/map-tools.js +1 -1
- package/dist/collection/components/pci-calculator/pci-calculator.js +1 -1
- package/dist/collection/components/pdf-download/pdf-download.js +1 -1
- package/dist/collection/components/public-notification/public-notification.js +1 -1
- package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.js +1 -1
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/components/share-item/share-item.js +1 -1
- package/dist/collection/components/solution-configuration/solution-configuration.js +3 -3
- package/dist/collection/components/solution-contents/solution-contents.js +1 -1
- package/dist/collection/components/solution-item/solution-item.js +1 -1
- package/dist/collection/components/solution-item-details/solution-item-details.js +1 -1
- package/dist/collection/components/solution-item-icon/solution-item-icon.js +1 -1
- package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
- package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -1
- package/dist/collection/components/solution-resource-item/solution-resource-item.js +1 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +1 -1
- package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
- package/dist/collection/components/solution-variables/solution-variables.js +1 -1
- package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
- package/dist/collection/utils/downloadUtils.js +0 -1
- package/dist/collection/utils/interfaces.ts +5 -0
- package/dist/collection/utils/mapViewUtils.js +15 -0
- package/dist/collection/utils/mapViewUtils.ts +19 -1
- package/dist/collection/utils/pdfUtils.js +29 -34
- package/dist/collection/utils/pdfUtils.ts +40 -47
- package/dist/components/create-related-feature.d.ts +11 -0
- package/dist/components/create-related-feature.js +11 -0
- package/dist/components/create-related-feature2.js +274 -0
- package/dist/components/crowdsource-manager.js +1 -1
- package/dist/components/crowdsource-reporter.js +287 -148
- package/dist/components/deduct-calculator2.js +1 -1
- package/dist/components/delete-button2.js +1 -1
- package/dist/components/downloadUtils.js +29 -33
- package/dist/components/edit-card2.js +1 -1
- package/dist/components/feature-comments.js +1 -1
- package/dist/components/feature-details2.js +163 -40
- package/dist/components/feature-form-flow-item.js +1 -1
- package/dist/components/feature-list2.js +64 -16
- package/dist/components/features-flow-item.js +1 -1
- package/dist/components/floor-filter2.js +1 -1
- package/dist/components/info-card2.js +9 -5
- package/dist/components/json-editor2.js +1 -1
- package/dist/components/layer-list2.js +3 -7
- package/dist/components/layer-table2.js +2 -2
- package/dist/components/layout-manager.js +1 -1
- package/dist/components/list-flow-item.js +1 -1
- package/dist/components/location-flow-item.js +1 -1
- package/dist/components/map-card2.js +1 -1
- package/dist/components/map-draw-tools2.js +1 -1
- package/dist/components/map-fullscreen2.js +1 -1
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-legend2.js +1 -1
- package/dist/components/map-picker2.js +1 -1
- package/dist/components/map-search2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/map-tools2.js +1 -1
- package/dist/components/mapViewUtils.js +16 -1
- package/dist/components/pci-calculator.js +1 -1
- package/dist/components/pdf-download2.js +1 -1
- package/dist/components/public-notification.js +1 -1
- package/dist/components/refine-results-flow-item.js +1 -1
- package/dist/components/refine-selection2.js +2 -2
- package/dist/components/share-item.js +1 -1
- package/dist/components/solution-configuration.js +3 -3
- package/dist/components/solution-contents2.js +1 -1
- package/dist/components/solution-item-details2.js +1 -1
- package/dist/components/solution-item-icon2.js +1 -1
- package/dist/components/solution-item-sharing2.js +1 -1
- package/dist/components/solution-item2.js +1 -1
- package/dist/components/solution-organization-variables2.js +1 -1
- package/dist/components/solution-resource-item2.js +1 -1
- package/dist/components/solution-spatial-ref2.js +1 -1
- package/dist/components/solution-template-data2.js +1 -1
- package/dist/components/solution-variables2.js +1 -1
- package/dist/components/spatial-ref2.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +6 -6
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/calcite-alert_4.entry.js +12 -8
- package/dist/esm/calcite-dropdown_4.entry.js +2 -2
- package/dist/esm/calcite-flow_6.entry.js +321 -256
- package/dist/esm/calcite-shell-panel_14.entry.js +7 -7
- package/dist/esm/card-manager_3.entry.js +5 -5
- package/dist/esm/crowdsource-manager.entry.js +2 -2
- package/dist/esm/crowdsource-reporter.entry.js +182 -55
- package/dist/esm/deduct-calculator.entry.js +1 -1
- package/dist/esm/{downloadUtils-fa6e5c37.js → downloadUtils-aab31bfe.js} +31 -35
- package/dist/esm/feature-comments.entry.js +1 -1
- package/dist/esm/feature-form-flow-item.entry.js +1 -1
- package/dist/esm/feature-list.entry.js +293 -0
- package/dist/esm/features-flow-item.entry.js +1 -1
- package/dist/esm/{index.es-114545fc.js → index.es-43ba3006.js} +2 -2
- package/dist/esm/layout-manager.entry.js +1 -1
- package/dist/esm/list-flow-item.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/location-flow-item.entry.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +5 -5
- package/dist/esm/{mapViewUtils-c83c03a4.js → mapViewUtils-4618ddb8.js} +16 -1
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +3 -3
- package/dist/esm/refine-results-flow-item.entry.js +1 -1
- package/dist/esm/share-item.entry.js +1 -1
- package/dist/esm/solution-configuration.entry.js +3 -3
- package/dist/esm/solution-contents_3.entry.js +3 -3
- package/dist/esm/solution-item-icon.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +1 -1
- package/dist/solutions-components/{p-afdc6bb2.entry.js → p-102b1f94.entry.js} +1 -1
- package/dist/solutions-components/p-22aece81.entry.js +6 -0
- package/dist/solutions-components/p-28c6906c.entry.js +6 -0
- package/dist/solutions-components/{p-71bdc77f.entry.js → p-33845a79.entry.js} +1 -1
- package/dist/solutions-components/{p-16ac309d.entry.js → p-3470c0f7.entry.js} +1 -1
- package/dist/solutions-components/p-3750c969.entry.js +6 -0
- package/dist/solutions-components/{p-ee457c15.js → p-37fc92db.js} +3 -3
- package/dist/solutions-components/{p-59c92ba2.entry.js → p-3a2e0188.entry.js} +1 -1
- package/dist/solutions-components/p-3fae9775.entry.js +6 -0
- package/dist/solutions-components/{p-0f139e3e.entry.js → p-54324eaa.entry.js} +1 -1
- package/dist/solutions-components/{p-d9c89479.js → p-583e5dd0.js} +1 -1
- package/dist/solutions-components/{p-69935f68.entry.js → p-667c022f.entry.js} +1 -1
- package/dist/solutions-components/{p-247edfb2.js → p-667caa6b.js} +1 -1
- package/dist/solutions-components/p-71de367b.entry.js +6 -0
- package/dist/solutions-components/{p-32fed174.entry.js → p-84a5d221.entry.js} +1 -1
- package/dist/solutions-components/{p-6e8782d1.entry.js → p-88f73319.entry.js} +1 -1
- package/dist/solutions-components/p-8a81f3c7.entry.js +6 -0
- package/dist/solutions-components/{p-288592d4.entry.js → p-92ed8d5d.entry.js} +1 -1
- package/dist/solutions-components/p-aa06f4d1.entry.js +6 -0
- package/dist/solutions-components/{p-67ee4afe.entry.js → p-b3160299.entry.js} +4 -4
- package/dist/solutions-components/p-b6d47bab.entry.js +17 -0
- package/dist/solutions-components/{p-bcf20616.entry.js → p-b76b5310.entry.js} +1 -1
- package/dist/solutions-components/{p-62994fb8.entry.js → p-bb0c7be3.entry.js} +3 -3
- package/dist/solutions-components/{p-7fdcce90.entry.js → p-bf57dbfd.entry.js} +2 -2
- package/dist/solutions-components/p-c047a6fc.entry.js +6 -0
- package/dist/solutions-components/{p-83997457.entry.js → p-d84fe0ee.entry.js} +2 -2
- package/dist/solutions-components/p-e9176a44.entry.js +6 -0
- package/dist/solutions-components/p-e947332f.entry.js +6 -0
- package/dist/solutions-components/{p-568c465e.entry.js → p-fc665a1a.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +5 -0
- package/dist/solutions-components/utils/mapViewUtils.ts +19 -1
- package/dist/solutions-components/utils/pdfUtils.ts +40 -47
- package/dist/types/assets/arcgis-pdf-creator/PDFLabels.d.ts +218 -0
- package/dist/types/components/create-related-feature/create-related-feature.d.ts +113 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +197 -99
- package/dist/types/components/feature-details/feature-details.d.ts +31 -0
- package/dist/types/components/feature-list/feature-list.d.ts +31 -2
- package/dist/types/components/info-card/info-card.d.ts +6 -2
- package/dist/types/components/layer-list/layer-list.d.ts +0 -5
- package/dist/types/components.d.ts +131 -12
- package/dist/types/preact.d.ts +8 -1
- package/dist/types/utils/interfaces.d.ts +4 -0
- package/dist/types/utils/mapViewUtils.d.ts +7 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-28b4b325.entry.js +0 -6
- package/dist/solutions-components/p-36d3476c.entry.js +0 -17
- package/dist/solutions-components/p-452d2d38.entry.js +0 -6
- package/dist/solutions-components/p-48b2469f.entry.js +0 -6
- package/dist/solutions-components/p-4f0712e2.entry.js +0 -6
- package/dist/solutions-components/p-535c103e.entry.js +0 -6
- package/dist/solutions-components/p-7ca416ab.entry.js +0 -6
- package/dist/solutions-components/p-8e337f80.entry.js +0 -6
- package/dist/solutions-components/p-d13f6b3a.entry.js +0 -6
- package/dist/solutions-components/p-d62b99ff.entry.js +0 -6
@@ -3,12 +3,12 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,c as e,h as i,f as a,g as s,H as o,d as n,F as l}from"./p-6d753a3d.js";import{c,d as r}from"./p-6085ab9c.js";import{a as d,i as h,h as b,s as p,n as u,d as
|
6
|
+
import{r as t,c as e,h as i,f as a,g as s,H as o,d as n,F as l}from"./p-6d753a3d.js";import{c,d as r}from"./p-6085ab9c.js";import{a as d,i as h,h as b,s as p,n as u,d as f,z as v,t as m,e as g,g as w}from"./p-67b26725.js";import{c as y,d as x}from"./p-b5bfe190.js";import{c as k}from"./p-ebf59857.js";import{c as z,s as C,d as T,u as I}from"./p-2e625f11.js";import{C as _}from"./p-db50226e.js";import{g as L}from"./p-b85be429.js";import{c as H,a as j,b as S}from"./p-8ad54f5c.js";import{c as A}from"./p-bfd3d428.js";import{c as D,d as W,I as E,u as F}from"./p-9db9645e.js";import{g as R}from"./p-e6e50975.js";import{s as $,a as M,c as N}from"./p-a25bbcc1.js";import{q as B,m as O,d as P,a as U,s as V,h as J,b as q,g as G,k as K,t as X,i as Y,c as Q,f as Z,e as tt,n as et,r as it,j as at,l as st,o as ot,p as nt,L as lt}from"./p-5974ba05.js";import{d as ct,a as rt,c as dt}from"./p-3a862208.js";import{C as ht,S as bt}from"./p-5f0b29d4.js";import{I as pt}from"./p-f6e10506.js";import{g as ut}from"./p-896c9644.js";import{s as ft}from"./p-c8260cf0.js";import{d as vt}from"./p-c1cf3ebc.js";import{E as mt}from"./p-334e6394.js";import"./p-a230b270.js";import"./p-f50a294b.js";import"./p-820d8935.js";import"./p-21fd2b18.js";import"./p-23059533.js";import"./p-c8d3207e.js";import"./p-82e085d0.js";import"./p-bdcf99c0.js";import"./p-530b73ce.js";
|
7
7
|
/*!
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
10
|
* v2.8.2
|
11
|
-
*/const gt="container",wt="content",yt="content--float",xt="content--overlay",kt=class{constructor(i){t(this,i),this.calciteInternalShellPanelResizeStart=e(this,"calciteInternalShellPanelResizeStart",6),this.calciteInternalShellPanelResizeEnd=e(this,"calciteInternalShellPanelResizeEnd",6),this.initialContentWidth=null,this.initialContentHeight=null,this.initialClientX=null,this.initialClientY=null,this.contentWidthMax=null,this.contentWidthMin=null,this.contentHeightMax=null,this.contentHeightMin=null,this.step=1,this.stepMultiplier=10,this.actionBars=[],this.storeContentEl=t=>{this.contentEl=t},this.getKeyAdjustedSize=t=>{const{key:e}=t,{el:i,step:a,stepMultiplier:s,layout:o,contentWidthMin:n,contentWidthMax:l,initialContentWidth:c,initialContentHeight:r,contentHeightMin:h,contentHeightMax:b,position:p}=this,u=a*s;["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].indexOf(e)>-1&&t.preventDefault();const v=["ArrowLeft","ArrowRight"],f=["ArrowDown","ArrowUp"],m="rtl"===d(i)&&v.includes(e)?-1:1;if("horizontal"===o?"end"===p?e===f[1]||e===v[0]:e===f[0]||e===v[1]:e===f[1]||("end"===p?e===v[0]:e===v[1])){const e=t.shiftKey?u:a;return"horizontal"===o?r+m*e:c+m*e}if("horizontal"===o?"end"===p?e===f[0]||e===v[0]:e===f[1]||e===v[1]:e===f[0]||("end"===p?e===v[1]:e===v[0])){const e=t.shiftKey?u:a;return"horizontal"===o?r-m*e:c-m*e}return"Home"===e&&"horizontal"===o&&"number"==typeof h?h:"Home"===e&&"vertical"===o&&"number"==typeof n?n:"End"===e&&"horizontal"===o&&"number"==typeof b?b:"End"===e&&"vertical"===o&&"number"==typeof l?l:"PageDown"===e?"horizontal"===o?r-u:c-u:"PageUp"===e?"horizontal"===o?r+u:c+u:null},this.initialKeydownWidth=t=>{this.setInitialContentWidth();const e=this.getKeyAdjustedSize(t);"number"==typeof e&&this.setContentWidth(e)},this.initialKeydownHeight=t=>{this.setInitialContentHeight();const e=this.getKeyAdjustedSize(t);"number"==typeof e&&this.setContentHeight(e)},this.separatorKeyDown=t=>{"horizontal"===this.layout?this.initialKeydownHeight(t):this.initialKeydownWidth(t)},this.separatorPointerMove=t=>{t.preventDefault();const{el:e,layout:i,initialContentWidth:a,initialContentHeight:s,position:o,initialClientX:n,initialClientY:l}=this,c="horizontal"===i?t.clientY-l:t.clientX-n,r="vertical"===i&&"rtl"===d(e)?-1:1,h="end"===o?-r*c:r*c;"horizontal"===i?this.setContentHeight(s+h):this.setContentWidth(a+h)},this.separatorPointerUp=t=>{h(t)&&(this.calciteInternalShellPanelResizeEnd.emit(),t.preventDefault(),window.removeEventListener("pointerup",this.separatorPointerUp),window.removeEventListener("pointermove",this.separatorPointerMove))},this.setInitialContentHeight=()=>{var t;this.initialContentHeight=null===(t=this.contentEl)||void 0===t?void 0:t.getBoundingClientRect().height},this.setInitialContentWidth=()=>{var t;this.initialContentWidth=null===(t=this.contentEl)||void 0===t?void 0:t.getBoundingClientRect().width},this.separatorPointerDown=t=>{if(!h(t))return;this.calciteInternalShellPanelResizeStart.emit(),t.preventDefault();const{separatorEl:e}=this;e&&document.activeElement!==e&&e.focus(),"horizontal"===this.layout?(this.setInitialContentHeight(),this.initialClientY=t.clientY):(this.setInitialContentWidth(),this.initialClientX=t.clientX),window.addEventListener("pointerup",this.separatorPointerUp),window.addEventListener("pointermove",this.separatorPointerMove)},this.connectSeparator=t=>{this.disconnectSeparator(),this.separatorEl=t,null==t||t.addEventListener("pointerdown",this.separatorPointerDown)},this.disconnectSeparator=()=>{var t;null===(t=this.separatorEl)||void 0===t||t.removeEventListener("pointerdown",this.separatorPointerDown)},this.setActionBarsLayout=t=>{t.forEach((t=>t.layout=this.layout))},this.handleActionBarSlotChange=t=>{const e=b(t).filter((t=>null==t?void 0:t.matches("calcite-action-bar")));this.actionBars=e,this.setActionBarsLayout(e)},this.handleHeaderSlotChange=t=>{this.hasHeader=p(t)},this.collapsed=!1,this.detached=!1,this.displayMode="dock",this.detachedHeightScale=void 0,this.heightScale=void 0,this.widthScale="m",this.layout="vertical",this.position="start",this.resizable=!1,this.messages=void 0,this.messageOverrides=void 0,this.contentWidth=null,this.contentHeight=null,this.defaultMessages=void 0,this.effectiveLocale="",this.hasHeader=!1}handleDetached(t){t?this.displayMode="float":"float"===this.displayMode&&(this.displayMode="dock")}handleDisplayMode(t){this.detached="float"===t}handleDetachedHeightScale(t){this.heightScale=t}handleHeightScale(t){this.detachedHeightScale=t}layoutHandler(){this.setActionBarsLayout(this.actionBars)}onMessagesChange(){}connectedCallback(){c(this),y(this),z(this)}async componentWillLoad(){await C(this)}disconnectedCallback(){r(this),this.disconnectSeparator(),x(this),T(this)}componentDidLoad(){this.updateAriaValues()}effectiveLocaleChange(){I(this,this.effectiveLocale)}renderHeader(){return i("div",{class:"content__header",hidden:!this.hasHeader,key:"header"},i("slot",{name:"header",onSlotchange:this.handleHeaderSlotChange}))}render(){const{collapsed:t,position:e,initialContentWidth:a,initialContentHeight:s,contentWidth:o,contentWidthMax:n,contentWidthMin:l,contentHeight:c,contentHeightMax:r,contentHeightMin:h,resizable:b,layout:p,displayMode:u}=this,v=d(this.el),f="float"!==u&&b,m=f?"horizontal"===p?c?{height:`${c}px`}:null:o?{width:`${o}px`}:null:null,g=!t&&f?i("div",{"aria-label":this.messages.resize,"aria-orientation":"horizontal"===p?"vertical":"horizontal","aria-valuemax":"horizontal"==p?r:n,"aria-valuemin":"horizontal"==p?h:l,"aria-valuenow":"horizontal"==p?null!=c?c:s:null!=o?o:a,class:"separator",key:"separator",onKeyDown:this.separatorKeyDown,role:"separator",tabIndex:0,"touch-action":"none",ref:this.connectSeparator}):null,w=i("div",{class:{[_.rtl]:"rtl"===v,[wt]:!0,[xt]:"overlay"===u,[yt]:"float"===u,[_.calciteAnimate]:"overlay"===u,[(()=>"horizontal"===p?"start"===e?_.calciteAnimateInDown:_.calciteAnimateInUp:"ltr"===v&&"end"===e||"rtl"===v&&"start"===e?_.calciteAnimateInLeft:_.calciteAnimateInRight)()]:"overlay"===u},hidden:t,key:"content",style:m,ref:this.storeContentEl},this.renderHeader(),i("div",{class:"content__body"},i("slot",null)),g),y=[i("slot",{key:"action-bar",name:"action-bar",onSlotchange:this.handleActionBarSlotChange}),w];return"end"===e&&y.reverse(),i("div",{class:{[gt]:!0}},y)}setContentWidth(t){const{contentWidthMax:e,contentWidthMin:i}=this,a=Math.round(t);this.contentWidth="number"==typeof e&&"number"==typeof i?k(a,i,e):a}updateAriaValues(){const{contentEl:t}=this,e=t&&getComputedStyle(t);e&&("horizontal"===this.layout?this.updateHeights(e):this.updateWidths(e),a(this))}setContentHeight(t){const{contentHeightMax:e,contentHeightMin:i}=this,a=Math.round(t);this.contentHeight="number"==typeof e&&"number"==typeof i?k(a,i,e):a}updateWidths(t){const e=parseInt(t.getPropertyValue("max-width"),10),i=parseInt(t.getPropertyValue("min-width"),10),a=parseInt(t.getPropertyValue("width"),10);"number"!=typeof a||isNaN(a)||(this.initialContentWidth=a),"number"!=typeof e||isNaN(e)||(this.contentWidthMax=e),"number"!=typeof i||isNaN(i)||(this.contentWidthMin=i)}updateHeights(t){const e=parseInt(t.getPropertyValue("max-height"),10),i=parseInt(t.getPropertyValue("min-height"),10),a=parseInt(t.getPropertyValue("height"),10);"number"!=typeof a||isNaN(a)||(this.initialContentHeight=a),"number"!=typeof e||isNaN(e)||(this.contentHeightMax=e),"number"!=typeof i||isNaN(i)||(this.contentHeightMin=i)}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{detached:["handleDetached"],displayMode:["handleDisplayMode"],detachedHeightScale:["handleDetachedHeightScale"],heightScale:["handleHeightScale"],layout:["layoutHandler"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};kt.style=":host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-detached-max-height:unset;--calcite-shell-panel-max-height:unset;--calcite-shell-panel-shadow-block-start-internal:0 4px 8px -1px rgba(0, 0, 0, 0.08),\n 0 2px 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-block-end-internal:0 -4px 8px -1px rgba(0, 0, 0, 0.08),\n 0 -2px 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-start-internal:4px 0 8px -1px rgba(0, 0, 0, 0.08),\n 2px 0 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-end-internal:-4px 0 8px -1px rgba(0, 0, 0, 0.08),\n -2px 0 4px -1px rgba(0, 0, 0, 0.04)}.calcite--rtl.content--overlay{--calcite-shell-panel-shadow-inline-start-internal:-4px 0 8px -1px rgba(0, 0, 0, 0.08),\n -2px 0 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-end-internal:4px 0 8px -1px rgba(0, 0, 0, 0.08),\n 2px 0 4px -1px rgba(0, 0, 0, 0.04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][width-scale=s]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 12vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 300px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][width-scale=m]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 20vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 420px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][width-scale=l]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 45vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 680px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal][height-scale=s]) .content{--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 20vh)\n )}:host([layout=horizontal]) .content{--calcite-shell-panel-min-height-internal:var(--calcite-shell-panel-min-height, 5vh);--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 30vh)\n )}:host([layout=horizontal][height-scale=l]) .content{--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 40vh)\n )}.container{pointer-events:none;box-sizing:border-box;display:flex;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2)}.container *{box-sizing:border-box}:host([layout=horizontal]) .container{flex-direction:column}:host(:hover) .separator:not(:hover):not(:focus),:host(:focus-within) .separator:not(:hover):not(:focus){opacity:1;background-color:var(--calcite-color-border-3)}.separator{pointer-events:auto;position:absolute;display:flex;background-color:transparent;opacity:0;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;cursor:col-resize;outline:none}.separator:hover{opacity:1;background-color:var(--calcite-color-border-2)}.separator:focus{background-color:var(--calcite-color-brand);opacity:1}:host([layout=vertical]) .separator{inset-block:0px;block-size:100%;inline-size:0.125rem;cursor:col-resize}:host([layout=horizontal][position=start]) .separator{inset-block-end:0px}:host([layout=horizontal][position=end]) .separator{inset-block-start:0px}:host([layout=horizontal]) .separator{inset-inline-end:0px;block-size:0.125rem;inline-size:100%;cursor:row-resize}:host([layout=vertical][position=start]) .separator{inset-inline-end:-2px}:host([layout=horizontal][position=start]) .separator{inset-block-end:-2px}:host([layout=vertical][position=end]) .separator{inset-inline-start:-2px}:host([layout=horizontal][position=end]) .separator{inset-block-start:-2px}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}::slotted(.calcite-match-height){display:flex;flex:1 1 auto;overflow:hidden}.content{pointer-events:auto;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;background-color:var(--calcite-color-background);padding:0px;transition:max-block-size var(--calcite-animation-timing), max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]) .content{inline-size:var(--calcite-shell-panel-width-internal);max-inline-size:var(--calcite-shell-panel-max-width-internal);min-inline-size:var(--calcite-shell-panel-min-width-internal)}:host([layout=horizontal]) .content{block-size:var(--calcite-shell-panel-height-internal);max-block-size:var(--calcite-shell-panel-max-height-internal);min-block-size:var(--calcite-shell-panel-min-height-internal)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-shell-panel-shadow-inline-start-internal)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-shell-panel-shadow-inline-end-internal)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-shell-panel-shadow-block-start-internal)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-shell-panel-shadow-block-end-internal)}.content--float{margin-inline:0.5rem;margin-block:0.5rem auto;block-size:auto;overflow:hidden;border-radius:0.25rem;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);max-block-size:var(--calcite-shell-panel-max-height-internal, calc(100% - 1rem))}.content--float ::slotted(calcite-panel),.content--float ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .content--float{margin-block:0.5rem}:host([position=start]) .content--float ::slotted(calcite-panel),:host([position=start]) .content--float ::slotted(calcite-flow),:host([position=end]) .content--float ::slotted(calcite-panel),:host([position=end]) .content--float ::slotted(calcite-flow){border-style:none}.content[hidden]{display:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([hidden]){display:none}[hidden]{display:none}";
|
11
|
+
*/const gt="container",wt="content",yt="content--float",xt="content--overlay",kt=class{constructor(i){t(this,i),this.calciteInternalShellPanelResizeStart=e(this,"calciteInternalShellPanelResizeStart",6),this.calciteInternalShellPanelResizeEnd=e(this,"calciteInternalShellPanelResizeEnd",6),this.initialContentWidth=null,this.initialContentHeight=null,this.initialClientX=null,this.initialClientY=null,this.contentWidthMax=null,this.contentWidthMin=null,this.contentHeightMax=null,this.contentHeightMin=null,this.step=1,this.stepMultiplier=10,this.actionBars=[],this.storeContentEl=t=>{this.contentEl=t},this.getKeyAdjustedSize=t=>{const{key:e}=t,{el:i,step:a,stepMultiplier:s,layout:o,contentWidthMin:n,contentWidthMax:l,initialContentWidth:c,initialContentHeight:r,contentHeightMin:h,contentHeightMax:b,position:p}=this,u=a*s;["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].indexOf(e)>-1&&t.preventDefault();const f=["ArrowLeft","ArrowRight"],v=["ArrowDown","ArrowUp"],m="rtl"===d(i)&&f.includes(e)?-1:1;if("horizontal"===o?"end"===p?e===v[1]||e===f[0]:e===v[0]||e===f[1]:e===v[1]||("end"===p?e===f[0]:e===f[1])){const e=t.shiftKey?u:a;return"horizontal"===o?r+m*e:c+m*e}if("horizontal"===o?"end"===p?e===v[0]||e===f[0]:e===v[1]||e===f[1]:e===v[0]||("end"===p?e===f[1]:e===f[0])){const e=t.shiftKey?u:a;return"horizontal"===o?r-m*e:c-m*e}return"Home"===e&&"horizontal"===o&&"number"==typeof h?h:"Home"===e&&"vertical"===o&&"number"==typeof n?n:"End"===e&&"horizontal"===o&&"number"==typeof b?b:"End"===e&&"vertical"===o&&"number"==typeof l?l:"PageDown"===e?"horizontal"===o?r-u:c-u:"PageUp"===e?"horizontal"===o?r+u:c+u:null},this.initialKeydownWidth=t=>{this.setInitialContentWidth();const e=this.getKeyAdjustedSize(t);"number"==typeof e&&this.setContentWidth(e)},this.initialKeydownHeight=t=>{this.setInitialContentHeight();const e=this.getKeyAdjustedSize(t);"number"==typeof e&&this.setContentHeight(e)},this.separatorKeyDown=t=>{"horizontal"===this.layout?this.initialKeydownHeight(t):this.initialKeydownWidth(t)},this.separatorPointerMove=t=>{t.preventDefault();const{el:e,layout:i,initialContentWidth:a,initialContentHeight:s,position:o,initialClientX:n,initialClientY:l}=this,c="horizontal"===i?t.clientY-l:t.clientX-n,r="vertical"===i&&"rtl"===d(e)?-1:1,h="end"===o?-r*c:r*c;"horizontal"===i?this.setContentHeight(s+h):this.setContentWidth(a+h)},this.separatorPointerUp=t=>{h(t)&&(this.calciteInternalShellPanelResizeEnd.emit(),t.preventDefault(),window.removeEventListener("pointerup",this.separatorPointerUp),window.removeEventListener("pointermove",this.separatorPointerMove))},this.setInitialContentHeight=()=>{var t;this.initialContentHeight=null===(t=this.contentEl)||void 0===t?void 0:t.getBoundingClientRect().height},this.setInitialContentWidth=()=>{var t;this.initialContentWidth=null===(t=this.contentEl)||void 0===t?void 0:t.getBoundingClientRect().width},this.separatorPointerDown=t=>{if(!h(t))return;this.calciteInternalShellPanelResizeStart.emit(),t.preventDefault();const{separatorEl:e}=this;e&&document.activeElement!==e&&e.focus(),"horizontal"===this.layout?(this.setInitialContentHeight(),this.initialClientY=t.clientY):(this.setInitialContentWidth(),this.initialClientX=t.clientX),window.addEventListener("pointerup",this.separatorPointerUp),window.addEventListener("pointermove",this.separatorPointerMove)},this.connectSeparator=t=>{this.disconnectSeparator(),this.separatorEl=t,null==t||t.addEventListener("pointerdown",this.separatorPointerDown)},this.disconnectSeparator=()=>{var t;null===(t=this.separatorEl)||void 0===t||t.removeEventListener("pointerdown",this.separatorPointerDown)},this.setActionBarsLayout=t=>{t.forEach((t=>t.layout=this.layout))},this.handleActionBarSlotChange=t=>{const e=b(t).filter((t=>null==t?void 0:t.matches("calcite-action-bar")));this.actionBars=e,this.setActionBarsLayout(e)},this.handleHeaderSlotChange=t=>{this.hasHeader=p(t)},this.collapsed=!1,this.detached=!1,this.displayMode="dock",this.detachedHeightScale=void 0,this.heightScale=void 0,this.widthScale="m",this.layout="vertical",this.position="start",this.resizable=!1,this.messages=void 0,this.messageOverrides=void 0,this.contentWidth=null,this.contentHeight=null,this.defaultMessages=void 0,this.effectiveLocale="",this.hasHeader=!1}handleDetached(t){t?this.displayMode="float":"float"===this.displayMode&&(this.displayMode="dock")}handleDisplayMode(t){this.detached="float"===t}handleDetachedHeightScale(t){this.heightScale=t}handleHeightScale(t){this.detachedHeightScale=t}layoutHandler(){this.setActionBarsLayout(this.actionBars)}onMessagesChange(){}connectedCallback(){c(this),y(this),z(this)}async componentWillLoad(){await C(this)}disconnectedCallback(){r(this),this.disconnectSeparator(),x(this),T(this)}componentDidLoad(){this.updateAriaValues()}effectiveLocaleChange(){I(this,this.effectiveLocale)}renderHeader(){return i("div",{class:"content__header",hidden:!this.hasHeader,key:"header"},i("slot",{name:"header",onSlotchange:this.handleHeaderSlotChange}))}render(){const{collapsed:t,position:e,initialContentWidth:a,initialContentHeight:s,contentWidth:o,contentWidthMax:n,contentWidthMin:l,contentHeight:c,contentHeightMax:r,contentHeightMin:h,resizable:b,layout:p,displayMode:u}=this,f=d(this.el),v="float"!==u&&b,m=v?"horizontal"===p?c?{height:`${c}px`}:null:o?{width:`${o}px`}:null:null,g=!t&&v?i("div",{"aria-label":this.messages.resize,"aria-orientation":"horizontal"===p?"vertical":"horizontal","aria-valuemax":"horizontal"==p?r:n,"aria-valuemin":"horizontal"==p?h:l,"aria-valuenow":"horizontal"==p?null!=c?c:s:null!=o?o:a,class:"separator",key:"separator",onKeyDown:this.separatorKeyDown,role:"separator",tabIndex:0,"touch-action":"none",ref:this.connectSeparator}):null,w=i("div",{class:{[_.rtl]:"rtl"===f,[wt]:!0,[xt]:"overlay"===u,[yt]:"float"===u,[_.calciteAnimate]:"overlay"===u,[(()=>"horizontal"===p?"start"===e?_.calciteAnimateInDown:_.calciteAnimateInUp:"ltr"===f&&"end"===e||"rtl"===f&&"start"===e?_.calciteAnimateInLeft:_.calciteAnimateInRight)()]:"overlay"===u},hidden:t,key:"content",style:m,ref:this.storeContentEl},this.renderHeader(),i("div",{class:"content__body"},i("slot",null)),g),y=[i("slot",{key:"action-bar",name:"action-bar",onSlotchange:this.handleActionBarSlotChange}),w];return"end"===e&&y.reverse(),i("div",{class:{[gt]:!0}},y)}setContentWidth(t){const{contentWidthMax:e,contentWidthMin:i}=this,a=Math.round(t);this.contentWidth="number"==typeof e&&"number"==typeof i?k(a,i,e):a}updateAriaValues(){const{contentEl:t}=this,e=t&&getComputedStyle(t);e&&("horizontal"===this.layout?this.updateHeights(e):this.updateWidths(e),a(this))}setContentHeight(t){const{contentHeightMax:e,contentHeightMin:i}=this,a=Math.round(t);this.contentHeight="number"==typeof e&&"number"==typeof i?k(a,i,e):a}updateWidths(t){const e=parseInt(t.getPropertyValue("max-width"),10),i=parseInt(t.getPropertyValue("min-width"),10),a=parseInt(t.getPropertyValue("width"),10);"number"!=typeof a||isNaN(a)||(this.initialContentWidth=a),"number"!=typeof e||isNaN(e)||(this.contentWidthMax=e),"number"!=typeof i||isNaN(i)||(this.contentWidthMin=i)}updateHeights(t){const e=parseInt(t.getPropertyValue("max-height"),10),i=parseInt(t.getPropertyValue("min-height"),10),a=parseInt(t.getPropertyValue("height"),10);"number"!=typeof a||isNaN(a)||(this.initialContentHeight=a),"number"!=typeof e||isNaN(e)||(this.contentHeightMax=e),"number"!=typeof i||isNaN(i)||(this.contentHeightMin=i)}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{detached:["handleDetached"],displayMode:["handleDisplayMode"],detachedHeightScale:["handleDetachedHeightScale"],heightScale:["handleHeightScale"],layout:["layoutHandler"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};kt.style=":host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-detached-max-height:unset;--calcite-shell-panel-max-height:unset;--calcite-shell-panel-shadow-block-start-internal:0 4px 8px -1px rgba(0, 0, 0, 0.08),\n 0 2px 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-block-end-internal:0 -4px 8px -1px rgba(0, 0, 0, 0.08),\n 0 -2px 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-start-internal:4px 0 8px -1px rgba(0, 0, 0, 0.08),\n 2px 0 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-end-internal:-4px 0 8px -1px rgba(0, 0, 0, 0.08),\n -2px 0 4px -1px rgba(0, 0, 0, 0.04)}.calcite--rtl.content--overlay{--calcite-shell-panel-shadow-inline-start-internal:-4px 0 8px -1px rgba(0, 0, 0, 0.08),\n -2px 0 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-end-internal:4px 0 8px -1px rgba(0, 0, 0, 0.08),\n 2px 0 4px -1px rgba(0, 0, 0, 0.04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][width-scale=s]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 12vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 300px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][width-scale=m]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 20vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 420px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][width-scale=l]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 45vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 680px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal][height-scale=s]) .content{--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 20vh)\n )}:host([layout=horizontal]) .content{--calcite-shell-panel-min-height-internal:var(--calcite-shell-panel-min-height, 5vh);--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 30vh)\n )}:host([layout=horizontal][height-scale=l]) .content{--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 40vh)\n )}.container{pointer-events:none;box-sizing:border-box;display:flex;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2)}.container *{box-sizing:border-box}:host([layout=horizontal]) .container{flex-direction:column}:host(:hover) .separator:not(:hover):not(:focus),:host(:focus-within) .separator:not(:hover):not(:focus){opacity:1;background-color:var(--calcite-color-border-3)}.separator{pointer-events:auto;position:absolute;display:flex;background-color:transparent;opacity:0;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;cursor:col-resize;outline:none}.separator:hover{opacity:1;background-color:var(--calcite-color-border-2)}.separator:focus{background-color:var(--calcite-color-brand);opacity:1}:host([layout=vertical]) .separator{inset-block:0px;block-size:100%;inline-size:0.125rem;cursor:col-resize}:host([layout=horizontal][position=start]) .separator{inset-block-end:0px}:host([layout=horizontal][position=end]) .separator{inset-block-start:0px}:host([layout=horizontal]) .separator{inset-inline-end:0px;block-size:0.125rem;inline-size:100%;cursor:row-resize}:host([layout=vertical][position=start]) .separator{inset-inline-end:-2px}:host([layout=horizontal][position=start]) .separator{inset-block-end:-2px}:host([layout=vertical][position=end]) .separator{inset-inline-start:-2px}:host([layout=horizontal][position=end]) .separator{inset-block-start:-2px}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}::slotted(.calcite-match-height){display:flex;flex:1 1 auto;overflow:hidden}.content{pointer-events:auto;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;background-color:var(--calcite-color-background);padding:0px;transition:max-block-size var(--calcite-animation-timing), max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]) .content{inline-size:var(--calcite-shell-panel-width-internal);max-inline-size:var(--calcite-shell-panel-max-width-internal);min-inline-size:var(--calcite-shell-panel-min-width-internal)}:host([layout=horizontal]) .content{block-size:var(--calcite-shell-panel-height-internal);max-block-size:var(--calcite-shell-panel-max-height-internal);min-block-size:var(--calcite-shell-panel-min-height-internal)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-shell-panel-shadow-inline-start-internal)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-shell-panel-shadow-inline-end-internal)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-shell-panel-shadow-block-start-internal)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-shell-panel-shadow-block-end-internal)}.content--float{margin-inline:0.5rem;margin-block:0.5rem auto;block-size:auto;overflow:hidden;border-radius:0.25rem;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);max-block-size:var(--calcite-shell-panel-max-height-internal, calc(100% - 1rem))}.content--float ::slotted(calcite-panel),.content--float ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .content--float{margin-block:0.5rem}:host([position=start]) .content--float ::slotted(calcite-panel),:host([position=start]) .content--float ::slotted(calcite-flow),:host([position=end]) .content--float ::slotted(calcite-panel),:host([position=end]) .content--float ::slotted(calcite-flow){border-style:none}.content[hidden]{display:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([hidden]){display:none}[hidden]{display:none}";
|
12
12
|
/*!
|
13
13
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
14
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
@@ -20,7 +20,7 @@ const zt="container",Ct=class{constructor(i){t(this,i),this.calciteInternalTabRe
|
|
20
20
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
21
21
|
* v2.8.2
|
22
22
|
*/
|
23
|
-
const Tt="tab-nav-active-indicator-container",It="tab-nav",_t="tab-nav--end-overflow",Lt="tab-nav--start-overflow",Ht="scroll-button",jt="scroll-button-container",St="scroll-button-container--backward",At="scroll-button-container--forward",Dt="tab-titles-slot-wrapper",Wt=class{constructor(a){t(this,a),this.calciteTabChange=e(this,"calciteTabChange",6),this.calciteInternalTabChange=e(this,"calciteInternalTabChange",6),this.effectiveDir="ltr",this.lastScrollWheelAxis="x",this.resizeObserver=A("resize",(()=>{this.updateScrollingState(),this.activeIndicatorEl&&this.updateActiveIndicator()})),this.onTabTitleWheel=t=>{t.preventDefault();const{deltaX:e,deltaY:i}=t,a=Math.abs(e),s=Math.abs(i);let o;a===s?o="x"===this.lastScrollWheelAxis?e:i:a>s?(o=e,this.lastScrollWheelAxis="x"):(o=i,this.lastScrollWheelAxis="y"),t.currentTarget.scrollBy(("rtl"===this.effectiveDir?-1:1)*o,0),requestAnimationFrame((()=>this.updateActiveIndicator()))},this.onSlotChange=t=>{var e;null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),t.target.assignedElements().forEach((t=>{var e;null===(e=this.intersectionObserver)||void 0===e||e.observe(t)}))},this.storeContainerRef=t=>this.containerEl=t,this.storeTabTitleWrapperRef=t=>{this.tabTitleContainerEl=t,this.intersectionObserver=A("intersection",(()=>this.updateScrollingState()),{root:t,threshold:[0,.5,1]})},this.scrollToTabTitles=t=>{n((()=>{const e=this.tabTitleContainerEl,i=e.getBoundingClientRect(),a=Array.from(this.el.querySelectorAll("calcite-tab-title")),{effectiveDir:s}=this;"forward"===t&&a.reverse();let o=null;if(a.forEach((e=>{const a=e.getBoundingClientRect(),n=i.x+i.width,l=a.x+a.width;"forward"===t&&"ltr"===s||"backward"===t&&"rtl"===s?(a.x>n||l>n&&a.x>i.x)&&(o=e):(l<i.x||l<n&&a.x<i.x)&&(o=e)})),o){const{scrollerButtonWidth:i}=this;e.scrollTo({left:o.offsetLeft+("forward"===t&&"ltr"===s||"backward"===t&&"rtl"===s?-i:o.offsetWidth-e.clientWidth+i),behavior:"smooth"})}}))},this.scrollToNextTabTitles=()=>this.scrollToTabTitles("forward"),this.scrollToPreviousTabTitles=()=>this.scrollToTabTitles("backward"),this.handleTabFocus=(t,e,i)=>{const a=v(this.enabledTabTitles,e,i);this.scrollTabTitleIntoView(a,"instant"),t.stopPropagation()},this.onTabTitleScroll=()=>{this.updateActiveIndicator(),this.updateScrollingState()},this.renderScrollButton=t=>{const{bordered:e,messages:a,hasOverflowingStartTabTitle:s,hasOverflowingEndTabTitle:o,scale:n}=this,l="end"===t;return i("div",{class:{[jt]:!0,[St]:!l,[At]:l},hidden:l&&!o||!l&&!s,key:t},i("calcite-button",{appearance:e?"outline-fill":"transparent","aria-label":l?a.nextTabTitles:a.previousTabTitles,class:{[Ht]:!0},iconFlipRtl:"both",iconStart:l?"chevron-right":"chevron-left",kind:"neutral",onClick:l?this.scrollToNextTabTitles:this.scrollToPreviousTabTitles,scale:n,tabIndex:-1}))},this.storageId=void 0,this.syncId=void 0,this.selectedTitle=null,this.scale="m",this.layout="inline",this.position="bottom",this.bordered=!1,this.indicatorOffset=void 0,this.indicatorWidth=void 0,this.messages=void 0,this.messageOverrides=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.hasOverflowingStartTabTitle=!1,this.hasOverflowingEndTabTitle=!1,this.selectedTabId=void 0}onMessagesChange(){}async selectedTabIdChanged(){localStorage&&this.storageId&&null!=this.selectedTabId&&localStorage.setItem(`calcite-tab-nav-${this.storageId}`,JSON.stringify(this.selectedTabId)),this.calciteInternalTabChange.emit({tab:this.selectedTabId}),this.selectedTitle=await this.getTabTitleById(this.selectedTabId)}selectedTitleChanged(){this.updateActiveIndicator()}connectedCallback(){var t;this.parentTabsEl=this.el.closest("calcite-tabs"),null===(t=this.resizeObserver)||void 0===t||t.observe(this.el),y(this),z(this)}async componentWillLoad(){const t=`calcite-tab-nav-${this.storageId}`;if(localStorage&&this.storageId&&localStorage.getItem(t)){const e=JSON.parse(localStorage.getItem(t));this.selectedTabId=e}await C(this)}componentDidLoad(){this.scrollTabTitleIntoView(this.selectedTitle,"instant")}componentWillRender(){const{parentTabsEl:t}=this;this.layout=null==t?void 0:t.layout,this.bordered=null==t?void 0:t.bordered,this.effectiveDir=d(this.el),this.selectedTitle&&this.updateActiveIndicator()}componentDidRender(){this.tabTitles.length&&this.tabTitles.every((t=>!t.selected))&&!this.selectedTabId&&this.tabTitles[0].getTabIdentifier().then((t=>{this.calciteInternalTabChange.emit({tab:t})}))}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),x(this),T(this)}render(){const t=`${this.indicatorWidth}px`,e=`${this.indicatorOffset}px`,a="rtl"!==this.effectiveDir?{width:t,left:e}:{width:t,right:e};return i(o,{key:"0824dd4470393b0e186b0fdf238420454fed396c",role:"tablist"},i("div",{key:"205551441feaaa61e2b4b603a7b37ce3d18bdba8",class:{[It]:!0,[Lt]:!!this.hasOverflowingStartTabTitle,[_t]:!!this.hasOverflowingEndTabTitle,[`scale-${this.scale}`]:!0,[`position-${this.position}`]:!0,[_.rtl]:"rtl"===this.effectiveDir},ref:this.storeContainerRef},this.renderScrollButton("start"),i("div",{key:"64844ffd05363fe55e2ae9d4d820dc5113da57d8",class:{[Dt]:!0},onScroll:this.onTabTitleScroll,onWheel:this.onTabTitleWheel,ref:this.storeTabTitleWrapperRef},i("slot",{key:"a77b898cac87d4fa190ad717a3c0ca4474a962fe",onSlotchange:this.onSlotChange})),i("div",{key:"0bf812fe39d07fbddd54ddb515e2eb31adea9a74",class:{[Tt]:!0},ref:t=>this.activeIndicatorContainerEl=t},i("div",{key:"e1624e7b9845ea37eea06ca7a85816d782530c79",class:"tab-nav-active-indicator",style:a,ref:t=>this.activeIndicatorEl=t})),this.renderScrollButton("end")))}focusPreviousTabHandler(t){this.handleTabFocus(t,t.target,"previous")}focusNextTabHandler(t){this.handleTabFocus(t,t.target,"next")}focusFirstTabHandler(t){this.handleTabFocus(t,t.target,"first")}focusLastTabHandler(t){this.handleTabFocus(t,t.target,"last")}internalActivateTabHandler(t){const e=t.target;this.selectedTabId=t.detail.tab?t.detail.tab:this.getIndexOfTabTitle(e),t.stopPropagation(),this.scrollTabTitleIntoView(e)}scrollTabTitleIntoView(t,e="smooth"){t&&n((()=>{const i="ltr"===this.effectiveDir,a=this.tabTitleContainerEl,s=a.getBoundingClientRect(),o=t.getBoundingClientRect(),n=a.scrollLeft,l=i?this.hasOverflowingEndTabTitle:this.hasOverflowingStartTabTitle;o.left<s.left+((i?this.hasOverflowingStartTabTitle:this.hasOverflowingEndTabTitle)?this.scrollerButtonWidth:0)?a.scrollTo({left:n+(o.left-s.left)-this.scrollerButtonWidth,behavior:e}):o.right>s.right-(l?this.scrollerButtonWidth:0)&&a.scrollTo({left:n+(o.right-s.right)+this.scrollerButtonWidth,behavior:e})}))}activateTabHandler(t){this.calciteTabChange.emit(),t.stopPropagation()}internalCloseTabHandler(t){this.handleTabTitleClose(t.target),t.stopPropagation()}updateTabTitles(t){t.target.selected&&(this.selectedTabId=t.detail)}globalInternalTabChangeHandler(t){this.syncId&&t.target!==this.el&&t.target.syncId===this.syncId&&this.selectedTabId!==t.detail.tab&&(this.selectedTabId=t.detail.tab),t.stopPropagation()}iconStartChangeHandler(){this.updateActiveIndicator()}effectiveLocaleChange(){I(this,this.effectiveLocale)}get scrollerButtonWidth(){const{scale:t}=this;return parseInt("s"===t?H:"m"===t?j:S)}updateActiveIndicator(){var t,e,i,a,s,o;const n=null===(t=this.tabTitleContainerEl)||void 0===t?void 0:t.scrollLeft,l=null===(e=this.containerEl)||void 0===e?void 0:e.scrollLeft,c=null===(i=this.activeIndicatorContainerEl)||void 0===i?void 0:i.offsetWidth,r=null===(a=this.selectedTitle)||void 0===a?void 0:a.offsetLeft,d=null===(s=this.selectedTitle)||void 0===s?void 0:s.offsetWidth;this.indicatorOffset=("ltr"===this.effectiveDir?r:c-r-d)+("ltr"===this.effectiveDir?-1:1)*(l+n),this.indicatorWidth=null===(o=this.selectedTitle)||void 0===o?void 0:o.offsetWidth}updateScrollingState(){const t=this.tabTitleContainerEl;if(!t)return;let e,i;const a=t.scrollLeft,s=t.clientWidth,o=t.scrollWidth;"ltr"===this.effectiveDir?(e=a>0,i=a+s<o):(e=a<0,i=a!==-(o-s)),this.hasOverflowingStartTabTitle=e,this.hasOverflowingEndTabTitle=i}getIndexOfTabTitle(t,e=this.tabTitles){return e.indexOf(t)}async getTabTitleById(t){return Promise.all(this.tabTitles.map((t=>t.getTabIdentifier()))).then((e=>this.tabTitles[e.indexOf(t)]))}get tabTitles(){return f(this.el,"calcite-tab-title")}get enabledTabTitles(){return f(this.el,"calcite-tab-title:not([disabled])").filter((t=>!t.closed))}handleTabTitleClose(t){const{tabTitles:e}=this,i=t.selected,a=e.reduce(((t,e,i)=>e.closed?t:[...t,i]),[]),s=a.length;if(1===s&&e[a[0]].closable)e[a[0]].closable=!1,this.selectedTabId=a[0],i&&e[a[0]].activateTab();else if(s>1){const i=e.findIndex((e=>e===t)),o=a.find((t=>t>i));this.selectedTabId===i&&(this.selectedTabId=o||s-1,e[this.selectedTabId].activateTab())}requestAnimationFrame((()=>{this.updateActiveIndicator(),e[this.selectedTabId].focus()}))}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],selectedTabId:["selectedTabIdChanged"],selectedTitle:["selectedTitleChanged"],effectiveLocale:["effectiveLocaleChange"]}}};Wt.style=':host{--calcite-internal-tab-nav-gradient-start-side:left;--calcite-internal-tab-nav-gradient-end-side:right;position:relative;display:flex}.scale-s{--calcite-internal-tab-nav-scroller-button-width:24px;min-block-size:1.5rem}.scale-m{--calcite-internal-tab-nav-scroller-button-width:32px;min-block-size:2rem}.scale-l{--calcite-internal-tab-nav-scroller-button-width:44px;min-block-size:2.75rem}.calcite--rtl{--calcite-internal-tab-nav-gradient-start-side:right;--calcite-internal-tab-nav-gradient-end-side:left}.tab-nav--start-overflow .tab-nav-active-indicator-container,.tab-nav--start-overflow .tab-titles-slot-wrapper{-webkit-mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%);mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%)}.tab-nav--end-overflow .tab-nav-active-indicator-container,.tab-nav--end-overflow .tab-titles-slot-wrapper{-webkit-mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%);mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%)}.tab-nav--start-overflow.tab-nav--end-overflow .tab-nav-active-indicator-container,.tab-nav--start-overflow.tab-nav--end-overflow .tab-titles-slot-wrapper{-webkit-mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%, transparent 51%), linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%, transparent 51%);mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%, transparent 51%), linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%, transparent 51%)}.tab-nav::-webkit-scrollbar{display:none;-ms-overflow-style:none;scrollbar-width:none}:host([layout=center]) ::slotted(calcite-tab-title){display:flex;flex-grow:1;flex-shrink:0;min-inline-size:auto;white-space:nowrap}:host([layout=center]) ::slotted(calcite-tab-title[selected]){overflow:unset}:host(:not([bordered])) .scale-l{--calcite-internal-tab-nav-gap:var(--calcite-size-xxl)}:host(:not([bordered])) .scale-m{--calcite-internal-tab-nav-gap:var(--calcite-size-xl)}:host(:not([bordered])) .scale-s{--calcite-internal-tab-nav-gap:var(--calcite-size-lg)}:host(:not([bordered])) .tab-titles-slot-wrapper{gap:var(--calcite-internal-tab-nav-gap)}:host([layout=center]:not([bordered])) .tab-titles-slot-wrapper{padding-inline:var(--calcite-spacing-xxl)}.tab-nav,.tab-titles-slot-wrapper{display:flex;inline-size:100%;justify-content:flex-start;overflow:hidden;white-space:nowrap}.tab-nav-active-indicator-container{position:absolute;inset-inline:0px;inset-block-end:0px;block-size:0.125rem;inline-size:100%;overflow:hidden}.tab-nav-active-indicator{position:absolute;inset-block-end:0px;display:block;block-size:0.125rem;background-color:var(--calcite-color-brand);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.scroll-button-container{position:absolute;inset-block:0px}.scroll-button-container calcite-button{--calcite-offset-invert-focus:1;--calcite-color-text-1:var(--calcite-color-text-3);block-size:100%}.scroll-button-container calcite-button:hover{--calcite-color-text-1:unset;--calcite-color-foreground-1:var(--calcite-color-transparent-hover);--calcite-color-foreground-3:var(--calcite-color-transparent)}.scroll-button-container--forward{inset-inline-end:0;z-index:var(--calcite-z-index)}.scroll-button-container--backward{inset-inline-start:0;z-index:var(--calcite-z-index)}:host(:not([bordered])) .scroll-button-container--backward::before,:host(:not([bordered])) .scroll-button-container--forward::before{background-color:var(--calcite-color-border-3);content:"";inline-size:var(--calcite-border-width-sm);inset-block-start:var(--calcite-border-width-md);inset-block-end:var(--calcite-border-width-md);position:absolute}:host(:not([bordered])) .scroll-button-container--backward::before{inset-inline-end:0}:host(:not([bordered])) .scroll-button-container--forward::before{inset-inline-start:0}:host .position-bottom .tab-nav-active-indicator{inset-block-end:unset;inset-block-start:0px}:host .position-bottom .tab-nav-active-indicator-container{inset-block-end:unset;inset-block-start:0px}:host([bordered]) .tab-nav-active-indicator-container{inset-block-end:unset}:host([bordered]) .position-bottom .tab-nav-active-indicator-container{inset-block-end:0;inset-block-start:unset}@media (forced-colors: active){.tab-nav-active-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}';
|
23
|
+
const Tt="tab-nav-active-indicator-container",It="tab-nav",_t="tab-nav--end-overflow",Lt="tab-nav--start-overflow",Ht="scroll-button",jt="scroll-button-container",St="scroll-button-container--backward",At="scroll-button-container--forward",Dt="tab-titles-slot-wrapper",Wt=class{constructor(a){t(this,a),this.calciteTabChange=e(this,"calciteTabChange",6),this.calciteInternalTabChange=e(this,"calciteInternalTabChange",6),this.effectiveDir="ltr",this.lastScrollWheelAxis="x",this.resizeObserver=A("resize",(()=>{this.updateScrollingState(),this.activeIndicatorEl&&this.updateActiveIndicator()})),this.onTabTitleWheel=t=>{t.preventDefault();const{deltaX:e,deltaY:i}=t,a=Math.abs(e),s=Math.abs(i);let o;a===s?o="x"===this.lastScrollWheelAxis?e:i:a>s?(o=e,this.lastScrollWheelAxis="x"):(o=i,this.lastScrollWheelAxis="y"),t.currentTarget.scrollBy(("rtl"===this.effectiveDir?-1:1)*o,0),requestAnimationFrame((()=>this.updateActiveIndicator()))},this.onSlotChange=t=>{var e;null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),t.target.assignedElements().forEach((t=>{var e;null===(e=this.intersectionObserver)||void 0===e||e.observe(t)}))},this.storeContainerRef=t=>this.containerEl=t,this.storeTabTitleWrapperRef=t=>{this.tabTitleContainerEl=t,this.intersectionObserver=A("intersection",(()=>this.updateScrollingState()),{root:t,threshold:[0,.5,1]})},this.scrollToTabTitles=t=>{n((()=>{const e=this.tabTitleContainerEl,i=e.getBoundingClientRect(),a=Array.from(this.el.querySelectorAll("calcite-tab-title")),{effectiveDir:s}=this;"forward"===t&&a.reverse();let o=null;if(a.forEach((e=>{const a=e.getBoundingClientRect(),n=i.x+i.width,l=a.x+a.width;"forward"===t&&"ltr"===s||"backward"===t&&"rtl"===s?(a.x>n||l>n&&a.x>i.x)&&(o=e):(l<i.x||l<n&&a.x<i.x)&&(o=e)})),o){const{scrollerButtonWidth:i}=this;e.scrollTo({left:o.offsetLeft+("forward"===t&&"ltr"===s||"backward"===t&&"rtl"===s?-i:o.offsetWidth-e.clientWidth+i),behavior:"smooth"})}}))},this.scrollToNextTabTitles=()=>this.scrollToTabTitles("forward"),this.scrollToPreviousTabTitles=()=>this.scrollToTabTitles("backward"),this.handleTabFocus=(t,e,i)=>{const a=f(this.enabledTabTitles,e,i);this.scrollTabTitleIntoView(a,"instant"),t.stopPropagation()},this.onTabTitleScroll=()=>{this.updateActiveIndicator(),this.updateScrollingState()},this.renderScrollButton=t=>{const{bordered:e,messages:a,hasOverflowingStartTabTitle:s,hasOverflowingEndTabTitle:o,scale:n}=this,l="end"===t;return i("div",{class:{[jt]:!0,[St]:!l,[At]:l},hidden:l&&!o||!l&&!s,key:t},i("calcite-button",{appearance:e?"outline-fill":"transparent","aria-label":l?a.nextTabTitles:a.previousTabTitles,class:{[Ht]:!0},iconFlipRtl:"both",iconStart:l?"chevron-right":"chevron-left",kind:"neutral",onClick:l?this.scrollToNextTabTitles:this.scrollToPreviousTabTitles,scale:n,tabIndex:-1}))},this.storageId=void 0,this.syncId=void 0,this.selectedTitle=null,this.scale="m",this.layout="inline",this.position="bottom",this.bordered=!1,this.indicatorOffset=void 0,this.indicatorWidth=void 0,this.messages=void 0,this.messageOverrides=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.hasOverflowingStartTabTitle=!1,this.hasOverflowingEndTabTitle=!1,this.selectedTabId=void 0}onMessagesChange(){}async selectedTabIdChanged(){localStorage&&this.storageId&&null!=this.selectedTabId&&localStorage.setItem(`calcite-tab-nav-${this.storageId}`,JSON.stringify(this.selectedTabId)),this.calciteInternalTabChange.emit({tab:this.selectedTabId}),this.selectedTitle=await this.getTabTitleById(this.selectedTabId)}selectedTitleChanged(){this.updateActiveIndicator()}connectedCallback(){var t;this.parentTabsEl=this.el.closest("calcite-tabs"),null===(t=this.resizeObserver)||void 0===t||t.observe(this.el),y(this),z(this)}async componentWillLoad(){const t=`calcite-tab-nav-${this.storageId}`;if(localStorage&&this.storageId&&localStorage.getItem(t)){const e=JSON.parse(localStorage.getItem(t));this.selectedTabId=e}await C(this)}componentDidLoad(){this.scrollTabTitleIntoView(this.selectedTitle,"instant")}componentWillRender(){const{parentTabsEl:t}=this;this.layout=null==t?void 0:t.layout,this.bordered=null==t?void 0:t.bordered,this.effectiveDir=d(this.el),this.selectedTitle&&this.updateActiveIndicator()}componentDidRender(){this.tabTitles.length&&this.tabTitles.every((t=>!t.selected))&&!this.selectedTabId&&this.tabTitles[0].getTabIdentifier().then((t=>{this.calciteInternalTabChange.emit({tab:t})}))}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),x(this),T(this)}render(){const t=`${this.indicatorWidth}px`,e=`${this.indicatorOffset}px`,a="rtl"!==this.effectiveDir?{width:t,left:e}:{width:t,right:e};return i(o,{key:"0824dd4470393b0e186b0fdf238420454fed396c",role:"tablist"},i("div",{key:"205551441feaaa61e2b4b603a7b37ce3d18bdba8",class:{[It]:!0,[Lt]:!!this.hasOverflowingStartTabTitle,[_t]:!!this.hasOverflowingEndTabTitle,[`scale-${this.scale}`]:!0,[`position-${this.position}`]:!0,[_.rtl]:"rtl"===this.effectiveDir},ref:this.storeContainerRef},this.renderScrollButton("start"),i("div",{key:"64844ffd05363fe55e2ae9d4d820dc5113da57d8",class:{[Dt]:!0},onScroll:this.onTabTitleScroll,onWheel:this.onTabTitleWheel,ref:this.storeTabTitleWrapperRef},i("slot",{key:"a77b898cac87d4fa190ad717a3c0ca4474a962fe",onSlotchange:this.onSlotChange})),i("div",{key:"0bf812fe39d07fbddd54ddb515e2eb31adea9a74",class:{[Tt]:!0},ref:t=>this.activeIndicatorContainerEl=t},i("div",{key:"e1624e7b9845ea37eea06ca7a85816d782530c79",class:"tab-nav-active-indicator",style:a,ref:t=>this.activeIndicatorEl=t})),this.renderScrollButton("end")))}focusPreviousTabHandler(t){this.handleTabFocus(t,t.target,"previous")}focusNextTabHandler(t){this.handleTabFocus(t,t.target,"next")}focusFirstTabHandler(t){this.handleTabFocus(t,t.target,"first")}focusLastTabHandler(t){this.handleTabFocus(t,t.target,"last")}internalActivateTabHandler(t){const e=t.target;this.selectedTabId=t.detail.tab?t.detail.tab:this.getIndexOfTabTitle(e),t.stopPropagation(),this.scrollTabTitleIntoView(e)}scrollTabTitleIntoView(t,e="smooth"){t&&n((()=>{const i="ltr"===this.effectiveDir,a=this.tabTitleContainerEl,s=a.getBoundingClientRect(),o=t.getBoundingClientRect(),n=a.scrollLeft,l=i?this.hasOverflowingEndTabTitle:this.hasOverflowingStartTabTitle;o.left<s.left+((i?this.hasOverflowingStartTabTitle:this.hasOverflowingEndTabTitle)?this.scrollerButtonWidth:0)?a.scrollTo({left:n+(o.left-s.left)-this.scrollerButtonWidth,behavior:e}):o.right>s.right-(l?this.scrollerButtonWidth:0)&&a.scrollTo({left:n+(o.right-s.right)+this.scrollerButtonWidth,behavior:e})}))}activateTabHandler(t){this.calciteTabChange.emit(),t.stopPropagation()}internalCloseTabHandler(t){this.handleTabTitleClose(t.target),t.stopPropagation()}updateTabTitles(t){t.target.selected&&(this.selectedTabId=t.detail)}globalInternalTabChangeHandler(t){this.syncId&&t.target!==this.el&&t.target.syncId===this.syncId&&this.selectedTabId!==t.detail.tab&&(this.selectedTabId=t.detail.tab),t.stopPropagation()}iconStartChangeHandler(){this.updateActiveIndicator()}effectiveLocaleChange(){I(this,this.effectiveLocale)}get scrollerButtonWidth(){const{scale:t}=this;return parseInt("s"===t?H:"m"===t?j:S)}updateActiveIndicator(){var t,e,i,a,s,o;const n=null===(t=this.tabTitleContainerEl)||void 0===t?void 0:t.scrollLeft,l=null===(e=this.containerEl)||void 0===e?void 0:e.scrollLeft,c=null===(i=this.activeIndicatorContainerEl)||void 0===i?void 0:i.offsetWidth,r=null===(a=this.selectedTitle)||void 0===a?void 0:a.offsetLeft,d=null===(s=this.selectedTitle)||void 0===s?void 0:s.offsetWidth;this.indicatorOffset=("ltr"===this.effectiveDir?r:c-r-d)+("ltr"===this.effectiveDir?-1:1)*(l+n),this.indicatorWidth=null===(o=this.selectedTitle)||void 0===o?void 0:o.offsetWidth}updateScrollingState(){const t=this.tabTitleContainerEl;if(!t)return;let e,i;const a=t.scrollLeft,s=t.clientWidth,o=t.scrollWidth;"ltr"===this.effectiveDir?(e=a>0,i=a+s<o):(e=a<0,i=a!==-(o-s)),this.hasOverflowingStartTabTitle=e,this.hasOverflowingEndTabTitle=i}getIndexOfTabTitle(t,e=this.tabTitles){return e.indexOf(t)}async getTabTitleById(t){return Promise.all(this.tabTitles.map((t=>t.getTabIdentifier()))).then((e=>this.tabTitles[e.indexOf(t)]))}get tabTitles(){return v(this.el,"calcite-tab-title")}get enabledTabTitles(){return v(this.el,"calcite-tab-title:not([disabled])").filter((t=>!t.closed))}handleTabTitleClose(t){const{tabTitles:e}=this,i=t.selected,a=e.reduce(((t,e,i)=>e.closed?t:[...t,i]),[]),s=a.length;if(1===s&&e[a[0]].closable)e[a[0]].closable=!1,this.selectedTabId=a[0],i&&e[a[0]].activateTab();else if(s>1){const i=e.findIndex((e=>e===t)),o=a.find((t=>t>i));this.selectedTabId===i&&(this.selectedTabId=o||s-1,e[this.selectedTabId].activateTab())}requestAnimationFrame((()=>{this.updateActiveIndicator(),e[this.selectedTabId].focus()}))}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],selectedTabId:["selectedTabIdChanged"],selectedTitle:["selectedTitleChanged"],effectiveLocale:["effectiveLocaleChange"]}}};Wt.style=':host{--calcite-internal-tab-nav-gradient-start-side:left;--calcite-internal-tab-nav-gradient-end-side:right;position:relative;display:flex}.scale-s{--calcite-internal-tab-nav-scroller-button-width:24px;min-block-size:1.5rem}.scale-m{--calcite-internal-tab-nav-scroller-button-width:32px;min-block-size:2rem}.scale-l{--calcite-internal-tab-nav-scroller-button-width:44px;min-block-size:2.75rem}.calcite--rtl{--calcite-internal-tab-nav-gradient-start-side:right;--calcite-internal-tab-nav-gradient-end-side:left}.tab-nav--start-overflow .tab-nav-active-indicator-container,.tab-nav--start-overflow .tab-titles-slot-wrapper{-webkit-mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%);mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%)}.tab-nav--end-overflow .tab-nav-active-indicator-container,.tab-nav--end-overflow .tab-titles-slot-wrapper{-webkit-mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%);mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%)}.tab-nav--start-overflow.tab-nav--end-overflow .tab-nav-active-indicator-container,.tab-nav--start-overflow.tab-nav--end-overflow .tab-titles-slot-wrapper{-webkit-mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%, transparent 51%), linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%, transparent 51%);mask-image:linear-gradient(to var(--calcite-internal-tab-nav-gradient-end-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%, transparent 51%), linear-gradient(to var(--calcite-internal-tab-nav-gradient-start-side), transparent, transparent var(--calcite-internal-tab-nav-scroller-button-width), white var(--calcite-internal-tab-nav-scroller-button-width), white 51%, transparent 51%)}.tab-nav::-webkit-scrollbar{display:none;-ms-overflow-style:none;scrollbar-width:none}:host([layout=center]) ::slotted(calcite-tab-title){display:flex;flex-grow:1;flex-shrink:0;min-inline-size:auto;white-space:nowrap}:host([layout=center]) ::slotted(calcite-tab-title[selected]){overflow:unset}:host(:not([bordered])) .scale-l{--calcite-internal-tab-nav-gap:var(--calcite-size-xxl)}:host(:not([bordered])) .scale-m{--calcite-internal-tab-nav-gap:var(--calcite-size-xl)}:host(:not([bordered])) .scale-s{--calcite-internal-tab-nav-gap:var(--calcite-size-lg)}:host(:not([bordered])) .tab-titles-slot-wrapper{gap:var(--calcite-internal-tab-nav-gap)}:host([layout=center]:not([bordered])) .tab-titles-slot-wrapper{padding-inline:var(--calcite-spacing-xxl)}.tab-nav,.tab-titles-slot-wrapper{display:flex;inline-size:100%;justify-content:flex-start;overflow:hidden;white-space:nowrap}.tab-nav-active-indicator-container{position:absolute;inset-inline:0px;inset-block-end:0px;block-size:0.125rem;inline-size:100%;overflow:hidden}.tab-nav-active-indicator{position:absolute;inset-block-end:0px;display:block;block-size:0.125rem;background-color:var(--calcite-color-brand);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.scroll-button-container{position:absolute;inset-block:0px}.scroll-button-container calcite-button{--calcite-offset-invert-focus:1;--calcite-color-text-1:var(--calcite-color-text-3);block-size:100%}.scroll-button-container calcite-button:hover{--calcite-color-text-1:unset;--calcite-color-foreground-1:var(--calcite-color-transparent-hover);--calcite-color-foreground-3:var(--calcite-color-transparent)}.scroll-button-container--forward{inset-inline-end:0;z-index:var(--calcite-z-index)}.scroll-button-container--backward{inset-inline-start:0;z-index:var(--calcite-z-index)}:host(:not([bordered])) .scroll-button-container--backward::before,:host(:not([bordered])) .scroll-button-container--forward::before{background-color:var(--calcite-color-border-3);content:"";inline-size:var(--calcite-border-width-sm);inset-block-start:var(--calcite-border-width-md);inset-block-end:var(--calcite-border-width-md);position:absolute}:host(:not([bordered])) .scroll-button-container--backward::before{inset-inline-end:0}:host(:not([bordered])) .scroll-button-container--forward::before{inset-inline-start:0}:host .position-bottom .tab-nav-active-indicator{inset-block-end:unset;inset-block-start:0px}:host .position-bottom .tab-nav-active-indicator-container{inset-block-end:unset;inset-block-start:0px}:host([bordered]) .tab-nav-active-indicator-container{inset-block-end:unset}:host([bordered]) .position-bottom .tab-nav-active-indicator-container{inset-block-end:0;inset-block-start:unset}@media (forced-colors: active){.tab-nav-active-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}';
|
24
24
|
/*!
|
25
25
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
26
26
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
@@ -44,4 +44,4 @@ function Ut(t,e,i){const{items:a,messages:s}=i,o=a.length,n=B(i,t)+1;return func
|
|
44
44
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
45
45
|
* v2.8.2
|
46
46
|
*/
|
47
|
-
const qt="actions-end",Gt="actions-start",Kt=class{constructor(i){t(this,i),this.calciteListItemChange=e(this,"calciteListItemChange",6),this.calciteListItemRemove=e(this,"calciteListItemRemove",7),this.calciteValueListItemDragHandleBlur=e(this,"calciteValueListItemDragHandleBlur",6),this.pickListItem=null,this.guid=`calcite-value-list-item-${L()}`,this.getPickListRef=t=>this.pickListItem=t,this.handleKeyDown=t=>{" "===t.key&&(this.handleActivated=!this.handleActivated)},this.handleBlur=()=>{this.handleActivated=!1,this.calciteValueListItemDragHandleBlur.emit({item:this.el,handle:this.handleEl})},this.handleSelectChange=t=>{this.selected=t.detail.selected},this.description=void 0,this.disabled=!1,this.deselectDisabled=!1,this.nonInteractive=!1,this.handleActivated=!1,this.icon=null,this.iconFlipRtl=!1,this.label=void 0,this.metadata=void 0,this.removable=!1,this.selected=!1,this.value=void 0}connectedCallback(){c(this),D(this)}disconnectedCallback(){r(this),W(this)}componentWillLoad(){$(this)}componentDidLoad(){M(this)}componentDidRender(){F(this)}async toggleSelected(t){this.pickListItem.toggleSelected(t)}async setFocus(){var t;return await N(this),null===(t=this.pickListItem)||void 0===t?void 0:t.setFocus()}calciteListItemChangeHandler(t){t.detail.item=this.el}renderActionsEnd(){const{el:t}=this;return w(t,qt)?i("slot",{name:qt,slot:bt.actionsEnd}):null}renderActionsStart(){const{el:t}=this;return w(t,Gt)?i("slot",{name:Gt,slot:bt.actionsStart}):null}renderHandle(){const{icon:t,iconFlipRtl:e}=this;if(t===pt.grip)return i("span",{class:{[ht.handle]:!0,[ht.handleActivated]:this.handleActivated},"data-js-handle":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,role:"button",tabindex:"0",ref:t=>this.handleEl=t},i("calcite-icon",{flipRtl:e,icon:"drag",scale:"s"}))}render(){return i(o,{key:"14e426411cb528504d9b0e89d4378b6c22664878",id:this.el.id||this.guid},i(E,{key:"75e7cf666c5aae3e62c21d9160083ca17c926c15",disabled:this.disabled},this.renderHandle(),i("calcite-pick-list-item",{key:"9e82a64e2022bfb5c052112e9e804f98db8c45bb",description:this.description,deselectDisabled:this.deselectDisabled,disabled:this.disabled,label:this.label,metadata:this.metadata,nonInteractive:this.nonInteractive,onCalciteListItemChange:this.handleSelectChange,removable:this.removable,selected:this.selected,value:this.value,ref:this.getPickListRef},this.renderActionsStart(),this.renderActionsEnd())))}get el(){return s(this)}};Kt.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{margin-block-end:1px;box-sizing:border-box;display:flex;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2);--tw-shadow:0 1px 0 var(--calcite-color-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing)}:host *{box-sizing:border-box}calcite-pick-list-item{position:relative;margin:0px;flex-grow:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([active]),:host([selected]){--tw-shadow:0 0 0 1px var(--calcite-color-brand);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.handle{display:flex;cursor:move;align-items:center;justify-content:center;border-style:none;background-color:transparent;padding-block:0px;padding-inline:0.25rem;color:var(--calcite-color-border-input);outline-color:transparent}.handle:hover{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.handle:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.handle--activated{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1)}.handle calcite-icon{color:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}";const Xt=class{constructor(e){t(this,e),this._loaded=!1,this._useDiffEditor=!1,this.hasChanges=!1,this.hasErrors=!1,this.instanceid="",this.value=""}componentDidLoad(){const t=document.getElementById(`${this.instanceid}-container`);if(t){this._editor=monaco.editor.create(t,{value:this.value,language:"json",theme:"vs",minimap:{enabled:!1},automaticLayout:!0,scrollBeyondLastLine:!1}),this._currentModel=this._editor.getModel(),this._contentChanged=this._currentModel.onDidChangeContent(this._onEditorChange.bind(this));const e=monaco.editor.setModelMarkers,i=this;monaco.editor.setModelMarkers=function(t,a,s){var o,n;t.id===i._currentModel.id&&(i._flagEditorHasErrors(s.length>0),i.hasErrors||(i._flagEditorHasChanges(null===(o=i._currentModel)||void 0===o?void 0:o.canUndo()),(null===(n=i._currentModel)||void 0===n?void 0:n.canUndo())&&i._flagEditorContentChanged()),document.getElementById(`${i.instanceid}-errorFlag`).style.visibility=i.hasErrors?"visible":"hidden"),e.call(monaco.editor,t,a,s)},this._diffEditor=monaco.editor.createDiffEditor(document.getElementById(`${this.instanceid}-diff-container`),{automaticLayout:!0}),this._setDiffModel(),this._loaded=!0,this._toggleUndoRedo()}}async componentWillLoad(){this._initValueObserver(),await this._getTranslations()}render(){return i(o,{key:"00ea91a9373e5cecbe52bd51ac7bf3b06b22ccc8"},i("div",{key:"7afe9bd7953b0c06cd2a4eaf107dd9654a16c37e",id:`${this.instanceid}-editor-container`,class:"editor-container padding-right"},i("div",{key:"c9bed17775348e586366b81bb37ab1b959300b8c",class:"editor-controls"},i("div",{key:"846a0f27a14fcf200e473575fa772d68cdc546e7",class:"editor-buttons"},i("calcite-icon",{key:"723cdd672261b9439750e6fb05a270aa46d97789",id:`${this.instanceid}-errorFlag`,icon:"exclamation-mark-triangle",title:this._translations.errorFlag,scale:"s",class:"edit-error-flag"}),i("calcite-button",{key:"23edf0b33632971b33b47bafc52f7697bebb6eb5",id:`${this.instanceid}-undo`,color:"blue",appearance:"solid",title:this._translations.undo,onClick:()=>this._undo(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"e423f0f1b8fad1db9bd2b94d53ce2a5625ee87d1",icon:"undo",scale:"s"})),i("calcite-button",{key:"de336e52d61b8575c1ac83a7eef3663520db5e4c",id:`${this.instanceid}-redo`,color:"blue",appearance:"solid",title:this._translations.redo,onClick:()=>this._redo(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"c864583f66374d5d1d63f630e4069a11a98b8bcd",icon:"redo",scale:"s"})),i("calcite-button",{key:"c740d3ef25901d6e313d70fccaa35c40ecab9cb4",id:`${this.instanceid}-diff`,color:"blue",appearance:"solid",title:this._translations.diff,onClick:()=>this._toggleEditor(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"8bf4e985982d227086d3b11ab94b58ad84657970",icon:"compare",scale:"s"})),i("calcite-button",{key:"0c2d9b1498eb41886b2716d182ba9833bbe9a528",id:`${this.instanceid}-search`,appearance:"outline",color:"blue",title:this._translations.search,onClick:()=>this._search(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"1979a27bef07cfdd122e5bd0a2cb27c2ada29f6e",icon:"search",scale:"s"})),i("calcite-button",{key:"8b754884ef387235f57806310da7693a25a09699",id:`${this.instanceid}-reset`,color:"blue",appearance:"solid",disabled:!0,title:this._translations.cancelEdits,onClick:()=>this._reset(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"bfa24ac26db7ce6f8ed4ffa7cf39950fc8b959c9",icon:"reset",scale:"s"})))),i("div",{key:"671db1db990eedd2863cca9de51bc376e55085bf",class:"edit-parent"},i("div",{key:"a2cb3c42fb1edd5d26f8c52ee2ca2c0124e5d02a",id:`${this.instanceid}-container`,class:"json-edit-container"}),i("div",{key:"9ec65340bb37c54a77d82e47129b5e07ec7b37cc",id:`${this.instanceid}-diff-container`,class:"json-edit-container display-none"}))))}async getEditorContents(){return new Promise(((t,e)=>{try{t(this._currentModel.getValue())}catch(t){e(t)}}))}async prepareForDeletion(){var t,e,i,a,s;null===(t=this._searchBtnHandler)||void 0===t||t.removeEventListener("click",this._search),null===(e=this._cancelEditsBtnHandler)||void 0===e||e.removeEventListener("click",this._reset),null===(i=this._valueObserver)||void 0===i||i.disconnect(),null===(a=this._contentChanged)||void 0===a||a.dispose(),null===(s=this._editor)||void 0===s||s.dispose()}async replaceCurrentSelection(t){const e=this._editor.getSelection();this._editor.executeEdits("",[{range:e,text:t}])}async reset(){return new Promise(((t,e)=>{try{this._reset(),t({success:!0})}catch(t){e(t)}}))}_disableButton(t){var e;null===(e=document.getElementById(t))||void 0===e||e.setAttribute("disabled","")}_enableButton(t){var e;null===(e=document.getElementById(t))||void 0===e||e.removeAttribute("disabled")}_flagEditorContentChanged(){window.dispatchEvent(new CustomEvent("solutionEditorContentChanged",{detail:{id:this.instanceid,contents:this._currentModel.getValue()},bubbles:!0,cancelable:!1,composed:!0}))}_flagEditorHasChanges(t){this.hasChanges!==t&&(window.dispatchEvent(new CustomEvent("solutionEditorHasChanges",{detail:t,bubbles:!0,cancelable:!1,composed:!0})),this.hasChanges=t)}_flagEditorHasErrors(t){this.hasErrors!==t&&(window.dispatchEvent(new CustomEvent("solutionEditorHasErrors",{detail:t,bubbles:!0,cancelable:!1,composed:!0})),this.hasErrors=t)}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}_initValueObserver(){this._valueObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"value"===t.attributeName&&t.target[t.attributeName]!==t.oldValue&&this._loaded&&this._currentModel.setValue(this.value)}))})),this._valueObserver.observe(this.el,{attributes:!0,attributeOldValue:!0})}_onEditorChange(){this._toggleUndoRedo()}_redo(){var t;(null===(t=this._currentModel)||void 0===t?void 0:t.canRedo())&&(this._currentModel.redo(),this._toggleUndoRedo())}_reset(){this._currentModel.setValue(this.value),this._toggleUndoRedo()}_search(){this._editor.trigger("toggleFind","actions.find")}_setDiffModel(){this._diffEditor&&this._diffEditor.setModel({original:monaco.editor.createModel(this.value,"json"),modified:this._editor.getModel()})}_toggleEditor(){this._useDiffEditor=!this._useDiffEditor;let t=document.getElementById(`${this.instanceid}-diff-container`),e=document.getElementById(`${this.instanceid}-container`);this._useDiffEditor?(this._setDiffModel(),t.classList.remove("display-none"),e.classList.add("display-none")):(t.classList.add("display-none"),e.classList.remove("display-none"))}_toggleUndoRedo(){var t,e,i,a;(null===(t=this._currentModel)||void 0===t?void 0:t.canUndo())?this._enableButton(`${this.instanceid}-undo`):this._disableButton(`${this.instanceid}-undo`),(null===(e=this._currentModel)||void 0===e?void 0:e.canRedo())?this._enableButton(`${this.instanceid}-redo`):this._disableButton(`${this.instanceid}-redo`),(null===(i=this._currentModel)||void 0===i?void 0:i.canUndo())||(null===(a=this._currentModel)||void 0===a?void 0:a.canRedo())?this._enableButton(`${this.instanceid}-reset`):this._disableButton(`${this.instanceid}-reset`)}_undo(){var t;(null===(t=this._currentModel)||void 0===t?void 0:t.canUndo())&&(this._currentModel.undo(),this._toggleUndoRedo())}static get assetsDirs(){return["assets"]}get el(){return s(this)}};Xt.style=":host{display:block}.editor-container{position:relative;height:100%}.editor-controls{height:2.75rem;padding-right:0.5rem;background-color:#F4F4F4}.editor-buttons{float:right}html[dir=rtl] .editor-buttons{float:left}.edit-error-flag{padding-top:0.5rem;color:red;visibility:hidden}.edit-button{padding-inline-start:0.5rem}.editor-text{width:100%;overflow-y:auto;background-color:#FFFFFF}.edit-width{width:100%}.edit-parent{box-sizing:border-box;width:100%;height:calc(100% - 46px)}.json-edit-container{height:100%;width:100%;border:1px #808080 solid}.padding-right{padding-inline-end:0.125rem}.btn{margin-bottom:1rem;display:flex;align-content:center;height:25px;width:120px}.select-ctrl{margin-bottom:1rem}.all-edits{margin-top:4rem}.floating-title{font-size:2rem;z-index:100;position:absolute;left:0.5rem;pointer-events:none}.floating-title-button{pointer-events:auto}.json-editor-position1{position:absolute;left:0px;top:0px;margin:0px;height:100%;width:100%;overflow:hidden;padding:0px;max-height:100% !important}.json-editor-position2a{position:absolute;left:0px;top:0px;margin:0px;height:100%;width:50%;overflow:hidden;padding:0px;max-height:100% !important}.json-editor-position2b{position:absolute;right:0px;top:0px;margin:0px;height:100%;width:50%;overflow:hidden;padding:0px;max-height:100% !important}";const Yt=class{constructor(e){t(this,e),this.itemId="",this.itemDetails={accessInformation:"",description:"",licenseInfo:"",snippet:"",tags:[],title:""},this.itemEdit=void 0,this._translations=void 0,this.thumbnail=void 0,this.thumbnailContainer=void 0}async componentWillLoad(){return this._getTranslations()}async componentWillRender(){return this.itemEdit=vt.getItemInfo(this.itemId),this.itemEdit&&(this.itemDetails=this.itemEdit.item,this.itemType=this.itemDetails.type),Promise.resolve()}render(){return i(o,{key:"b024dd7e92270d93643a1ca7844387e7d9286d22"},i("div",{key:"af20723425ccb1e99fea5109950cc79ba79cb038",class:"parent-container"},i("div",{key:"a96c1a9692cdf1dc24e371a25dfa83a749d14e2f",class:"inputBottomSeparation"},i("calcite-input",{key:"578ab10eb0191760a90077c36b208e5f41305712",id:"item-title",value:this.itemDetails.title})),i("div",{key:"b8eb46d621dced49afbe42a1cce376e067521386",class:"inputBottomSeparation"},i("input",{key:"c6ab5acbd0064b4214f062d1864ae7b54caea4cd",accept:".jpg,.gif,.png,image/jpg,image/gif,image/png",class:"display-none",onChange:t=>this._updateThumbnail(t),ref:t=>this.browseForThumbnail=t,type:"file"}),i("button",{key:"9bd35cf2da98f3b3725afcca05f65abd4c7e2165",class:"font-size--3 btn-link inline-block trailer-quarter",onClick:()=>this._getThumbnail()},i("svg",{key:"c2daa2b714ccb86d6bca6676d144f8466aaefe5c",class:"icon-inline icon-inline--on-left",height:"16",viewBox:"0 0 16 16",width:"16"},i("path",{key:"88eb1adaf5790a4adceb8600df483cbfe143f799",d:"M14.792 2.666l-1.414-1.413a.965.965 0 0 0-1.385-.03l-1.444 1.444-8.763 8.72L.03 15.481a.371.371 0 0 0 .488.488l4.096-1.756 8.763-8.72-.001-.001.002.002 1.443-1.444a.965.965 0 0 0-.03-1.385zM1.569 14.431l.554-1.293.74.739zm2.338-.924l-1.414-1.414 7.963-7.92 1.414 1.415zm8.67-8.626l-1.413-1.414 1.29-1.29a.306.306 0 0 1 .433 0l.981.98a.306.306 0 0 1 0 .433z"})),this._translations.editThumbnail),i("div",{key:"8d894bb4b84b5d1e4bbcc10926156dc3c011468e",class:"flex"},i("div",{key:"149ada9181ec9c479f37dcb449b67b4a61ba85b6",class:"img-container",ref:t=>this.thumbnailContainer=t},i("img",{key:"e885543499b816432fd54271df84db3f70ed01df",class:"scale-down",height:"133",id:"item-thumbnail",ref:t=>this.thumbnail=t,width:"200"})),i("div",{key:"6acf404d210c4b8f904ac39022f50e458a642172",class:"snippet-count-container"},i("calcite-input",{key:"89bfc2acb3288ac6bee9892fdda5ea0907c55474",id:"item-snippet",maxLength:250,type:"textarea",value:this.itemDetails.snippet}),i("label",{key:"eea362da2aed987549c39982b1801fa6e9cdf515",class:"font-size--3",id:"item-snippet-count",ref:t=>this.itemSnippetCount=t})))),i("calcite-label",{key:"b0d046164d0f892fdc8a151e7cf66f6d27dcbe56"},this._translations.description,i("label",{key:"e5ecbd825898edab2373250259ba8ed7659897af",id:"item-description-label"},i("calcite-input",{key:"1a2d590ddd98461b6a1b731f6dbcd5efdf0c3cd9",id:"item-description",type:"textarea",value:this.itemDetails.description}))),i("calcite-label",{key:"a5b70cc0634bab9dc41857172b6e68c313da5716"},this._translations.tags,i("label",{key:"eb5931bcaa7e35d86814cb2798035d9193549e5b",id:"item-tags-label"},i("calcite-input",{key:"2fb2184ee1b5e48a92eb40ef5dc128fe8cf24388",id:"item-tags",value:(this.itemDetails.tags&&Array.isArray(this.itemDetails.tags)?this.itemDetails.tags:[this.itemDetails.tags]).join(",")}))),"Group"!==this.itemType?i("calcite-label",null,this._translations.credits,i("label",{id:"item-credits-label"},i("calcite-input",{id:"item-credits",value:this.itemDetails.accessInformation}))):null,"Group"!==this.itemType?i("calcite-label",null,i("label",{id:"item-terms-label"},this._translations.termsOfUse,i("calcite-input",{id:"item-terms",type:"textarea",value:this.itemDetails.licenseInfo}))):null))}componentDidRender(){this._loadThumb()}inputReceivedHandler(t){switch(t.target.id){case"item-title":this.itemDetails.title=t.target.value,this._updateStore();break;case"item-snippet":t.target.value.length>250&&(t.target.value=t.target.value.substring(0,250)),this.itemDetails.snippet=t.target.value,this._updateLengthLabel(this.itemDetails.snippet),this._updateStore();break;case"item-description":this.itemDetails.description=t.target.value,this._updateStore();break;case"item-tags":this.itemDetails.tags=t.target.value,this._updateStore();break;case"item-credits":this.itemDetails.accessInformation=t.target.value,this._updateStore();break;case"item-terms":this.itemDetails.licenseInfo=t.target.value,this._updateStore()}}_getThumbnail(){this.browseForThumbnail.click()}_loadThumb(){var t;this.thumbnail&&(null===(t=this.itemEdit)||void 0===t?void 0:t.thumbnail)?(this.thumbnail.src=URL.createObjectURL(this.itemEdit.thumbnail),this.thumbnailContainer.classList.remove("empty-box"),this.thumbnail.classList.remove("display-none")):(this.thumbnailContainer.classList.add("empty-box"),this.thumbnail.classList.add("display-none"))}_updateLengthLabel(t){this.itemSnippetCount.innerText=this._translations.snippetCountPattern.replace("{{n}}",t.length.toString())}_updateStore(){this.itemEdit=vt.getItemInfo(this.itemId),this.itemEdit.item=this.itemDetails,vt.setItemInfo(this.itemEdit)}_updateThumbnail(t){const e=t.target.files;e&&e[0]&&this.thumbnail&&(this.thumbnail.src=URL.createObjectURL(e[0]),this.itemEdit=vt.getItemInfo(this.itemId),this.itemEdit.thumbnail=e[0],vt.replaceItemThumbnail(this.itemEdit))}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}};Yt.style=".inputBottomSeparation{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem}.icon-inline--on-left,.icon-inline--on-right{display:inline;vertical-align:middle;margin-inline-end:0.375rem;fill:#0079c1}.scale-down{-o-object-fit:scale-down;object-fit:scale-down}.img-container{display:inline;margin-inline-end:1rem;max-width:363px}.summary-count-container{display:inline;flex-grow:1;margin-inline-start:0.75rem}.snippet-count-container{width:calc(100vw - 363px)}.parent-container{max-width:100%;padding:1rem}label{position:relative;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem;display:block;min-width:-moz-min-content;min-width:min-content}";const Qt=class{constructor(e){t(this,e),this.groupId="",this._translations=void 0,this.sharing=[]}itemIdWatchHandler(){const t=vt.getItemInfo(this.groupId);this.sharing=t.groupDetails}async componentWillLoad(){return this._getTranslations()}render(){return i(o,{key:"657a2174982d6942663a83c169ab502be0c69434"},i("div",{key:"c2639e6e48fd5ceeded9b71736207edfa4c8b26f",class:"container-border"},i("calcite-label",{key:"e11466b5fdebdd068d13bdf821b8b2e3e47c6321"},this._translations.groupInfo),this._renderItems(this.sharing)))}async getShareInfo(){return this.sharing}_renderItems(t){return t&&t.length>0?t.map((t=>i("calcite-label",{layout:"inline"},i("calcite-switch",{checked:t.shareItem,id:t.id,name:"setting",onCalciteSwitchChange:t=>this._updateItem(t),scale:"m",value:"enabled"}),i("solution-item-icon",{type:t.type,typeKeywords:t.typeKeywords}),i("span",{class:"icon-text",title:t.title},t.title)))):null}_updateItem(t){const e=t.target.id;this.sharing=this.sharing.map((i=>{if(i.id===e){i.shareItem=t.target.checked;const a=vt.getItemInfo(e);if(i.shareItem)a.groups?a.groups.indexOf(this.groupId)<0&&a.groups.push(this.groupId):a.groups=[this.groupId];else if(a.groups){const t=a.groups.indexOf(this.groupId);t>-1&&a.groups.splice(t,1)}vt.setItemInfo(a)}return i}))}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{groupId:["itemIdWatchHandler"]}}};Qt.style=":host{display:block}.container-border{padding:1rem}.icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";const Zt=class{constructor(i){t(this,i),this.organizationVariableSelected=e(this,"organizationVariableSelected",7),this.value="",this._organizationVariables=[],this._translations=void 0}valueWatchHandler(){this._organizationVariables=JSON.parse(this.value)}async componentWillLoad(){return this._getTranslations()}render(){return i(o,{key:"95351bd18894c2ebd9be825859fc69fba20fa423"},i("div",{key:"0decb53f2575a2c09ca7c355aa9189d356980bdf"},i("h4",{key:"1dba6ec3e8e5df0e80072705a590c40c1b03333c",class:"org-var-header"},this._translations.orgVariables)),i("div",{key:"3c3f96660454bd66ec518bb5ac45f5c7f966fa5e",class:"container-border"},i("calcite-tree",{key:"a37f5706819c7caabf9e3ca2498c0dd57c1e099c",id:"variable-label"},this._renderHierarchy(this._organizationVariables))))}_renderHierarchy(t){return t.map((t=>i("calcite-tree-item",{onClick:()=>this._treeItemSelected(t.id,t.value)},t.title)))}_treeItemSelected(t,e){this.organizationVariableSelected.emit({itemId:t,value:e})}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{value:["valueWatchHandler"]}}};Zt.style=":host{display:block}.container-border{overflow-y:auto}.org-var-header{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1rem}";const te=class{constructor(e){t(this,e),this._removedResources={},this.authentication=void 0,this.itemId="",this.resourceFilePaths=[],this.resources=[],this._translations=void 0}itemIdWatchHandler(){const t=vt.getItemInfo(this.itemId);this.resourceFilePaths=t.resourceFilePaths,this.resources=t.resources.map((t=>t.substring(t.lastIndexOf("/")+1)))}componentWillLoad(){return this._getTranslations()}render(){const t=this._hasValidResources();return i(o,{key:"02074f7f10921e975b52c13c55f4b3f71d8c7cf5"},i("div",{key:"c85c4acf1899e009ace234bb393d98e6d41ba0df",class:"resource-item"},i("div",{key:"7650c0f83cab10dfde8cad2876c8208015e36ef5",class:"margin-bottom-1"},i("calcite-button",{key:"555ff36b4a53ac5146d8017d9b602027ea6d6223",appearance:"solid",class:"resource-button",color:"blue",onClick:()=>this._addNewResource()},this._translations.addResource),i("calcite-button",{key:"1973334d9061b2ec78695e7422cae2c4ba4f0e36",appearance:"solid",color:"blue",disabled:!t,onClick:()=>this._downloadAll()},this._translations.downloadAll)),i("div",{key:"d047f35fc949f996c8e40ff23334a0e4a9f3760f",class:"resources-container",style:{display:t?"inherit":"none"}},this._renderResourceList())))}_renderResourceList(){return i("calcite-value-list",{multiple:!0},this.resourceFilePaths.reduce(((t,e)=>(e.type!==mt.Thumbnail&&t.push(this._renderResource(e)),t)),[]))}_renderResource(t){const e=t.updateType===ft.Remove;return i("calcite-value-list-item",{class:e?"disabled":"",label:t.folder?t.folder+"/"+t.filename:t.filename,nonInteractive:!0,value:t.url},i("calcite-action-group",{"expand-disabled":"true",layout:"horizontal",slot:"actions-end"},i("calcite-action",{disabled:e,icon:"download",label:this._translations.download,onClick:()=>this._download(t.url,t.filename),scale:"m",text:this._translations.download,title:this._translations.download}),i("calcite-action",{disabled:e,icon:"upload-to",label:this._translations.update,onClick:()=>this._upload(t),scale:"m",text:this._translations.update,title:this._translations.update}),i("calcite-action",{disabled:e,icon:"trash",label:this._translations.delete,onClick:()=>this._delete(t),scale:"m",text:this._translations.delete,title:this._translations.delete}),e?i("calcite-action",{icon:"reset",label:this._translations.reset,onClick:()=>this._reset(t.filename),scale:"m",text:this._translations.reset,title:this._translations.reset}):i("div",{class:"display-none"})))}_delete(t){t.updateType=ft.Remove,this.resourceFilePaths=[...this.resourceFilePaths],this._updateStore()}_reset(t){this.resourceFilePaths=this.resources.some((e=>e===t))?this.resourceFilePaths.map((e=>(e.filename===t&&(e.updateType=ft.None),e))):this.resourceFilePaths.map((e=>(e.filename===t&&(e.updateType=ft.Add),e))),this._updateStore()}_downloadAll(){this.resourceFilePaths.forEach((t=>{this._download(t.url,t.filename)}))}_download(t,e){t.startsWith("blob")?this.downloadFile(t,e):this.fetchAndDownload(`${t}?token=${this.authentication.token}`,e)}downloadFile(t,e){const i=document.createElement("a");i.href=t,i.download=e,i.target="_blank",i.click()}_hasValidResources(){return this.resourceFilePaths.some((t=>t.url.indexOf("_info_thumbnail")<0))}async fetchAndDownload(t,e){const i=await fetch(t),a=await i.blob(),s=URL.createObjectURL(a);this.downloadFile(s,e)}_upload(t){const e=document.createElement("input");e.classList.add("display-none"),e.onchange=this._updateResource.bind(this,t),e.type="file",e.click()}_addNewResource(){const t=document.createElement("input");t.classList.add("display-none"),t.onchange=this._add.bind(this),t.type="file",t.click()}_updateResource(t,e){const i=e.target.files;i&&i[0]&&(t.blob=i[0],t.updateType=ft.Update,this._updateStore())}_add(t){const e=t.target.files;if(e&&e[0]){const t=URL.createObjectURL(e[0]),i=e[0].name;this.resourceFilePaths.some((e=>e.filename===i&&e.url===t))||(this.resourceFilePaths=[...this.resourceFilePaths,{url:t,type:mt.Data,folder:void 0,filename:i,blob:e[0],updateType:ft.Add}],this._updateStore())}}_updateStore(){const t=vt.getItemInfo(this.itemId);t.resourceFilePaths=this.resourceFilePaths,vt.setItemInfo(t)}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};te.style=":host{display:block}.resource-item{padding:1rem}.resource-button{margin-inline-end:1rem}.resource-progress{padding-top:1rem}.resources-container{border:1px #808080 solid}.margin-bottom-1{margin-bottom:1rem}";const ee=class{itemIdWatchHandler(){this._initializing=!0,this.value=JSON.stringify("data"===this.instanceid?vt.getItemInfo(this.itemId).data:vt.getItemInfo(this.itemId).properties,null,2)}constructor(e){t(this,e),this._initializing=!1,this.instanceid="",this.itemId="",this.organizationVariables="",this.solutionVariables="",this.varsOpen=!0,this._translations=void 0,this.value="",window.addEventListener("solutionEditorContentChanged",(t=>{if(this.itemId){const{id:e,contents:i}=t.detail,[a,s]=e.split("|");if(a==this.itemId&&s===this.instanceid){if(!this._initializing&&i.length>0){const t=vt.getItemInfo(a);"data"===s?t.data=JSON.parse(i):t.properties=JSON.parse(i),vt.setItemInfo(t)}this._initializing=!1}}}))}componentWillLoad(){return this._getTranslations()}render(){return i(o,{key:"22705ebd3a386a84f4592856bdc9649c2cba30b8"},i("div",{key:"d0a814b481b061a9ed1ab30fd969045e50ba5c57",class:"solution-data-container"},i("calcite-shell",{key:"59b716b131212438271699969faef49ea98e056e",class:"light var-container",dir:"ltr"},i("calcite-panel",{key:"06dd9ab60db4c7e1301030cd27a9a917527ddad8",class:"json-editor"},i("div",{key:"745bb83632217731bea14d066af4781e358c86a4",class:"solution-data-child-container calcite-match-height"},i("json-editor",{key:"df07ee691600b663dc7e44b962ab34a3bf55dc9c",class:"solution-data-editor-container",instanceid:this.itemId+"|"+this.instanceid,value:this.value}))),i("calcite-shell-panel",{key:"e1c3bde76aec90b857a4c7314ce2f4c1ec664d50","height-scale":"l",position:"end",slot:"contextual-panel","width-scale":"xs"},i("div",{key:"9765a724bb1f526381e5e04e7d2bfe36a3b511a6",class:this.varsOpen?"solution-data-child-container":"solution-data-child-container-collapsed"},i("calcite-button",{key:"2ff758dd95bfb295db9af8724ddc7299edf4ca41",appearance:"transparent",class:"collapse-btn","icon-start":this.varsOpen?"chevrons-right":"chevrons-left",id:"collapse-vars",onClick:()=>this._toggleVars(),scale:"s",title:this.varsOpen?this._translations.collapse:this._translations.expand}),i("div",{key:"0e478e966b71dc8de85bdcef299ace2814d14ffd",class:this.varsOpen?"org-vars":"org-vars display-none",id:"orgVars"},i("solution-organization-variables",{key:"c45e1217a012c63c1d839a313bc4a09da387ab60",value:this.organizationVariables})),i("div",{key:"39a42601f18825b0075838912ca9b9d233829ae7",class:this.varsOpen?"sol-vars":"sol-vars display-none",id:"solVars"},i("solution-variables",{key:"0a8b98737e2674bca82553a3ed637e3ec336b8d8",value:this.solutionVariables})))))))}_toggleVars(){this.varsOpen=!this.varsOpen}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};ee.style=":host{display:flexbox}.solution-data-container{position:absolute;height:-moz-available;height:calc(100% - 48px);height:-webkit-fill-available;height:stretch;width:-moz-available;width:100%;width:-webkit-fill-available;width:stretch}.solution-data-child-container{display:flex;height:100%;width:100%;flex-direction:column;overflow-y:auto}.solution-data-editor-container{height:100%}.solution-data-child-container-collapsed{display:flex;height:100%;flex-direction:column;overflow:auto;width:50px}.inputBottomSeparation{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem}.json-editor{margin:1rem;width:auto;width:-webkit-fill-available -moz-available}.collapse-btn{padding-left:1rem;padding-right:1rem;padding-top:1rem;padding-bottom:0px}.org-vars{padding-left:1rem;padding-right:1rem;padding-top:1rem;padding-bottom:0px}.sol-vars{padding-top:0px;padding-bottom:0px;padding-left:1rem;padding-right:1rem;min-height:45%}.padding-1{padding:1rem}.light{background-color:#F4F4F4}";const ie=class{constructor(i){t(this,i),this.solutionVariableSelected=e(this,"solutionVariableSelected",7),this.value="",this._solutionVariables=[],this._translations=void 0}valueWatchHandler(){this._solutionVariables=JSON.parse(this.value)}componentWillLoad(){return this._getTranslations()}render(){return i(o,{key:"fdd3472c972374a0a4af6d5584a2ce8031627c4b"},i("div",{key:"ff13d6fabe162f55421547fd94bce7b301206acd"},i("h4",{key:"dbd2c5e15f9c8abb8b86c0bd2f57df6526e8bdfe",class:"org-var-header"},this._translations.solVariables)),i("div",{key:"b0d045725d76c07e15ac4a9f616ba6892faa4f7c",class:"container-border"},i("calcite-tree",{key:"b7a315e65515a84342f753764063ed747cfcfe63",id:"variable-label"},this._renderHierarchy(this._solutionVariables))))}_renderHierarchy(t){return t.map((t=>t.dependencies&&t.dependencies.length>0?i("calcite-tree-item",{onClick:t=>this._toggleExpand(t)},i("solution-item-icon",{type:t.type}),i("span",{class:"icon-text",title:t.title},t.title),i("calcite-tree",{slot:"children"},this._renderHierarchy(t.dependencies))):i("calcite-tree-item",{onClick:()=>this._treeItemSelected(t.id,t.value)},t.title)))}_treeItemSelected(t,e){this.solutionVariableSelected.emit({itemId:t,value:e})}_toggleExpand(t){var e;const i=null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.closest("calcite-tree-item");i&&(i.expanded=!i.expanded)}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{value:["valueWatchHandler"]}}};ie.style=":host{display:block}.container-border{overflow-y:hidden}.org-var-header{margin-top:1rem;margin-bottom:1rem;margin-left:0px;margin-right:0px}.icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";export{kt as calcite_shell_panel,Ct as calcite_tab,Wt as calcite_tab_nav,Ot as calcite_tab_title,Pt as calcite_tabs,Jt as calcite_value_list,Kt as calcite_value_list_item,Xt as json_editor,Yt as solution_item_details,Qt as solution_item_sharing,Zt as solution_organization_variables,te as solution_resource_item,ee as solution_template_data,ie as solution_variables}
|
47
|
+
const qt="actions-end",Gt="actions-start",Kt=class{constructor(i){t(this,i),this.calciteListItemChange=e(this,"calciteListItemChange",6),this.calciteListItemRemove=e(this,"calciteListItemRemove",7),this.calciteValueListItemDragHandleBlur=e(this,"calciteValueListItemDragHandleBlur",6),this.pickListItem=null,this.guid=`calcite-value-list-item-${L()}`,this.getPickListRef=t=>this.pickListItem=t,this.handleKeyDown=t=>{" "===t.key&&(this.handleActivated=!this.handleActivated)},this.handleBlur=()=>{this.handleActivated=!1,this.calciteValueListItemDragHandleBlur.emit({item:this.el,handle:this.handleEl})},this.handleSelectChange=t=>{this.selected=t.detail.selected},this.description=void 0,this.disabled=!1,this.deselectDisabled=!1,this.nonInteractive=!1,this.handleActivated=!1,this.icon=null,this.iconFlipRtl=!1,this.label=void 0,this.metadata=void 0,this.removable=!1,this.selected=!1,this.value=void 0}connectedCallback(){c(this),D(this)}disconnectedCallback(){r(this),W(this)}componentWillLoad(){$(this)}componentDidLoad(){M(this)}componentDidRender(){F(this)}async toggleSelected(t){this.pickListItem.toggleSelected(t)}async setFocus(){var t;return await N(this),null===(t=this.pickListItem)||void 0===t?void 0:t.setFocus()}calciteListItemChangeHandler(t){t.detail.item=this.el}renderActionsEnd(){const{el:t}=this;return w(t,qt)?i("slot",{name:qt,slot:bt.actionsEnd}):null}renderActionsStart(){const{el:t}=this;return w(t,Gt)?i("slot",{name:Gt,slot:bt.actionsStart}):null}renderHandle(){const{icon:t,iconFlipRtl:e}=this;if(t===pt.grip)return i("span",{class:{[ht.handle]:!0,[ht.handleActivated]:this.handleActivated},"data-js-handle":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,role:"button",tabindex:"0",ref:t=>this.handleEl=t},i("calcite-icon",{flipRtl:e,icon:"drag",scale:"s"}))}render(){return i(o,{key:"14e426411cb528504d9b0e89d4378b6c22664878",id:this.el.id||this.guid},i(E,{key:"75e7cf666c5aae3e62c21d9160083ca17c926c15",disabled:this.disabled},this.renderHandle(),i("calcite-pick-list-item",{key:"9e82a64e2022bfb5c052112e9e804f98db8c45bb",description:this.description,deselectDisabled:this.deselectDisabled,disabled:this.disabled,label:this.label,metadata:this.metadata,nonInteractive:this.nonInteractive,onCalciteListItemChange:this.handleSelectChange,removable:this.removable,selected:this.selected,value:this.value,ref:this.getPickListRef},this.renderActionsStart(),this.renderActionsEnd())))}get el(){return s(this)}};Kt.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{margin-block-end:1px;box-sizing:border-box;display:flex;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2);--tw-shadow:0 1px 0 var(--calcite-color-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing)}:host *{box-sizing:border-box}calcite-pick-list-item{position:relative;margin:0px;flex-grow:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([active]),:host([selected]){--tw-shadow:0 0 0 1px var(--calcite-color-brand);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.handle{display:flex;cursor:move;align-items:center;justify-content:center;border-style:none;background-color:transparent;padding-block:0px;padding-inline:0.25rem;color:var(--calcite-color-border-input);outline-color:transparent}.handle:hover{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.handle:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.handle--activated{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1)}.handle calcite-icon{color:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}";const Xt=class{constructor(e){t(this,e),this._loaded=!1,this._useDiffEditor=!1,this.hasChanges=!1,this.hasErrors=!1,this.instanceid="",this.value=""}componentDidLoad(){const t=document.getElementById(`${this.instanceid}-container`);if(t){this._editor=monaco.editor.create(t,{value:this.value,language:"json",theme:"vs",minimap:{enabled:!1},automaticLayout:!0,scrollBeyondLastLine:!1}),this._currentModel=this._editor.getModel(),this._contentChanged=this._currentModel.onDidChangeContent(this._onEditorChange.bind(this));const e=monaco.editor.setModelMarkers,i=this;monaco.editor.setModelMarkers=function(t,a,s){var o,n;t.id===i._currentModel.id&&(i._flagEditorHasErrors(s.length>0),i.hasErrors||(i._flagEditorHasChanges(null===(o=i._currentModel)||void 0===o?void 0:o.canUndo()),(null===(n=i._currentModel)||void 0===n?void 0:n.canUndo())&&i._flagEditorContentChanged()),document.getElementById(`${i.instanceid}-errorFlag`).style.visibility=i.hasErrors?"visible":"hidden"),e.call(monaco.editor,t,a,s)},this._diffEditor=monaco.editor.createDiffEditor(document.getElementById(`${this.instanceid}-diff-container`),{automaticLayout:!0}),this._setDiffModel(),this._loaded=!0,this._toggleUndoRedo()}}async componentWillLoad(){this._initValueObserver(),await this._getTranslations()}render(){return i(o,{key:"df3dd7531bfc6256919c3d5f14b5f2837fda5aac"},i("div",{key:"9dd13f859e92b7cbe719da36f71428e9a44514aa",id:`${this.instanceid}-editor-container`,class:"editor-container padding-right"},i("div",{key:"3762323a88ada57aeb6483d1f510ae7b64ed7095",class:"editor-controls"},i("div",{key:"754caf059ecaffdc08f1bd46e496e44ea4cca274",class:"editor-buttons"},i("calcite-icon",{key:"96620de487619db0a3f893ed91dbc7a0aff72517",id:`${this.instanceid}-errorFlag`,icon:"exclamation-mark-triangle",title:this._translations.errorFlag,scale:"s",class:"edit-error-flag"}),i("calcite-button",{key:"ef437976e3a198319885ae42f241f19206f5675b",id:`${this.instanceid}-undo`,color:"blue",appearance:"solid",title:this._translations.undo,onClick:()=>this._undo(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"168ad569ab54238f0cb7a9b3c33f2186ad44dbc5",icon:"undo",scale:"s"})),i("calcite-button",{key:"f1fd90dccdc0f1e0645e383d547dd0d68e55bd93",id:`${this.instanceid}-redo`,color:"blue",appearance:"solid",title:this._translations.redo,onClick:()=>this._redo(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"c3fe8f81cd0a383da9c0b7538b88b69995da83e8",icon:"redo",scale:"s"})),i("calcite-button",{key:"3a23491a976b9cc9e21df4f693044c16e0fa896a",id:`${this.instanceid}-diff`,color:"blue",appearance:"solid",title:this._translations.diff,onClick:()=>this._toggleEditor(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"35fe88eaeb9af26991817d882691ee8462a131c5",icon:"compare",scale:"s"})),i("calcite-button",{key:"8091d794c5d9e0c1d7a7a6bd21cd690e3eaf83e5",id:`${this.instanceid}-search`,appearance:"outline",color:"blue",title:this._translations.search,onClick:()=>this._search(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"bff6d836ca319f8c1fe440117d6d983c07dd8106",icon:"search",scale:"s"})),i("calcite-button",{key:"44e7d523d29fb3f92f6b10b101d43239b5c7919c",id:`${this.instanceid}-reset`,color:"blue",appearance:"solid",disabled:!0,title:this._translations.cancelEdits,onClick:()=>this._reset(),scale:"s",class:"edit-button"},i("calcite-icon",{key:"e6bfea7cd2574929917204f74ed924dc8072befb",icon:"reset",scale:"s"})))),i("div",{key:"a0cbb47b3f6ed02839fdbf65ab62d50c16a44107",class:"edit-parent"},i("div",{key:"07ac2b80bd612fb86b8970cfbf9be080d1f574eb",id:`${this.instanceid}-container`,class:"json-edit-container"}),i("div",{key:"d98d705059fd769906f695298f7dc11cc96ebc2a",id:`${this.instanceid}-diff-container`,class:"json-edit-container display-none"}))))}async getEditorContents(){return new Promise(((t,e)=>{try{t(this._currentModel.getValue())}catch(t){e(t)}}))}async prepareForDeletion(){var t,e,i,a,s;null===(t=this._searchBtnHandler)||void 0===t||t.removeEventListener("click",this._search),null===(e=this._cancelEditsBtnHandler)||void 0===e||e.removeEventListener("click",this._reset),null===(i=this._valueObserver)||void 0===i||i.disconnect(),null===(a=this._contentChanged)||void 0===a||a.dispose(),null===(s=this._editor)||void 0===s||s.dispose()}async replaceCurrentSelection(t){const e=this._editor.getSelection();this._editor.executeEdits("",[{range:e,text:t}])}async reset(){return new Promise(((t,e)=>{try{this._reset(),t({success:!0})}catch(t){e(t)}}))}_disableButton(t){var e;null===(e=document.getElementById(t))||void 0===e||e.setAttribute("disabled","")}_enableButton(t){var e;null===(e=document.getElementById(t))||void 0===e||e.removeAttribute("disabled")}_flagEditorContentChanged(){window.dispatchEvent(new CustomEvent("solutionEditorContentChanged",{detail:{id:this.instanceid,contents:this._currentModel.getValue()},bubbles:!0,cancelable:!1,composed:!0}))}_flagEditorHasChanges(t){this.hasChanges!==t&&(window.dispatchEvent(new CustomEvent("solutionEditorHasChanges",{detail:t,bubbles:!0,cancelable:!1,composed:!0})),this.hasChanges=t)}_flagEditorHasErrors(t){this.hasErrors!==t&&(window.dispatchEvent(new CustomEvent("solutionEditorHasErrors",{detail:t,bubbles:!0,cancelable:!1,composed:!0})),this.hasErrors=t)}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}_initValueObserver(){this._valueObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"value"===t.attributeName&&t.target[t.attributeName]!==t.oldValue&&this._loaded&&this._currentModel.setValue(this.value)}))})),this._valueObserver.observe(this.el,{attributes:!0,attributeOldValue:!0})}_onEditorChange(){this._toggleUndoRedo()}_redo(){var t;(null===(t=this._currentModel)||void 0===t?void 0:t.canRedo())&&(this._currentModel.redo(),this._toggleUndoRedo())}_reset(){this._currentModel.setValue(this.value),this._toggleUndoRedo()}_search(){this._editor.trigger("toggleFind","actions.find")}_setDiffModel(){this._diffEditor&&this._diffEditor.setModel({original:monaco.editor.createModel(this.value,"json"),modified:this._editor.getModel()})}_toggleEditor(){this._useDiffEditor=!this._useDiffEditor;let t=document.getElementById(`${this.instanceid}-diff-container`),e=document.getElementById(`${this.instanceid}-container`);this._useDiffEditor?(this._setDiffModel(),t.classList.remove("display-none"),e.classList.add("display-none")):(t.classList.add("display-none"),e.classList.remove("display-none"))}_toggleUndoRedo(){var t,e,i,a;(null===(t=this._currentModel)||void 0===t?void 0:t.canUndo())?this._enableButton(`${this.instanceid}-undo`):this._disableButton(`${this.instanceid}-undo`),(null===(e=this._currentModel)||void 0===e?void 0:e.canRedo())?this._enableButton(`${this.instanceid}-redo`):this._disableButton(`${this.instanceid}-redo`),(null===(i=this._currentModel)||void 0===i?void 0:i.canUndo())||(null===(a=this._currentModel)||void 0===a?void 0:a.canRedo())?this._enableButton(`${this.instanceid}-reset`):this._disableButton(`${this.instanceid}-reset`)}_undo(){var t;(null===(t=this._currentModel)||void 0===t?void 0:t.canUndo())&&(this._currentModel.undo(),this._toggleUndoRedo())}static get assetsDirs(){return["assets"]}get el(){return s(this)}};Xt.style=":host{display:block}.editor-container{position:relative;height:100%}.editor-controls{height:2.75rem;padding-right:0.5rem;background-color:#F4F4F4}.editor-buttons{float:right}html[dir=rtl] .editor-buttons{float:left}.edit-error-flag{padding-top:0.5rem;color:red;visibility:hidden}.edit-button{padding-inline-start:0.5rem}.editor-text{width:100%;overflow-y:auto;background-color:#FFFFFF}.edit-width{width:100%}.edit-parent{box-sizing:border-box;width:100%;height:calc(100% - 46px)}.json-edit-container{height:100%;width:100%;border:1px #808080 solid}.padding-right{padding-inline-end:0.125rem}.btn{margin-bottom:1rem;display:flex;align-content:center;height:25px;width:120px}.select-ctrl{margin-bottom:1rem}.all-edits{margin-top:4rem}.floating-title{font-size:2rem;z-index:100;position:absolute;left:0.5rem;pointer-events:none}.floating-title-button{pointer-events:auto}.json-editor-position1{position:absolute;left:0px;top:0px;margin:0px;height:100%;width:100%;overflow:hidden;padding:0px;max-height:100% !important}.json-editor-position2a{position:absolute;left:0px;top:0px;margin:0px;height:100%;width:50%;overflow:hidden;padding:0px;max-height:100% !important}.json-editor-position2b{position:absolute;right:0px;top:0px;margin:0px;height:100%;width:50%;overflow:hidden;padding:0px;max-height:100% !important}";const Yt=class{constructor(e){t(this,e),this.itemId="",this.itemDetails={accessInformation:"",description:"",licenseInfo:"",snippet:"",tags:[],title:""},this.itemEdit=void 0,this._translations=void 0,this.thumbnail=void 0,this.thumbnailContainer=void 0}async componentWillLoad(){return this._getTranslations()}async componentWillRender(){return this.itemEdit=ft.getItemInfo(this.itemId),this.itemEdit&&(this.itemDetails=this.itemEdit.item,this.itemType=this.itemDetails.type),Promise.resolve()}render(){return i(o,{key:"c2d4d6748f373f1a049c293c6bfbf42c665c44bc"},i("div",{key:"3d4b02e2a8a7763c431db6472c76d59c9b5fb671",class:"parent-container"},i("div",{key:"9ffff3568196ccba37fcf276592ce9f94ddc9c0b",class:"inputBottomSeparation"},i("calcite-input",{key:"17bb0b1fe9d7dad19193fba0295690be6b5fdb8d",id:"item-title",value:this.itemDetails.title})),i("div",{key:"5253426dfb3cb6731b168c1cf30b9dda1b6443e6",class:"inputBottomSeparation"},i("input",{key:"3873df3d3a0e3ed05d70c1f346fce2ef1bbee958",accept:".jpg,.gif,.png,image/jpg,image/gif,image/png",class:"display-none",onChange:t=>this._updateThumbnail(t),ref:t=>this.browseForThumbnail=t,type:"file"}),i("button",{key:"225d97f61b22b60de39dbda5cc9e379ab03312b6",class:"font-size--3 btn-link inline-block trailer-quarter",onClick:()=>this._getThumbnail()},i("svg",{key:"03e946e17f8f62295ff9c4fb578882658c542fb0",class:"icon-inline icon-inline--on-left",height:"16",viewBox:"0 0 16 16",width:"16"},i("path",{key:"6cde74cdb075cce0ad2c51ce7995bfeb7f697cdd",d:"M14.792 2.666l-1.414-1.413a.965.965 0 0 0-1.385-.03l-1.444 1.444-8.763 8.72L.03 15.481a.371.371 0 0 0 .488.488l4.096-1.756 8.763-8.72-.001-.001.002.002 1.443-1.444a.965.965 0 0 0-.03-1.385zM1.569 14.431l.554-1.293.74.739zm2.338-.924l-1.414-1.414 7.963-7.92 1.414 1.415zm8.67-8.626l-1.413-1.414 1.29-1.29a.306.306 0 0 1 .433 0l.981.98a.306.306 0 0 1 0 .433z"})),this._translations.editThumbnail),i("div",{key:"a1728b32f9b19cdeb1432e13fc3e117e5ee59d2d",class:"flex"},i("div",{key:"e7cf3ad30ffad6770a25d28f27337579aeb6aaee",class:"img-container",ref:t=>this.thumbnailContainer=t},i("img",{key:"825577f7021df8a070bf7755b5318c9fe8909dd6",class:"scale-down",height:"133",id:"item-thumbnail",ref:t=>this.thumbnail=t,width:"200"})),i("div",{key:"09c6c35de6d64acd1b827a84c5857e8c6f1444c7",class:"snippet-count-container"},i("calcite-input",{key:"b0548154efaa6e6243b501dcf52a31f107ed2688",id:"item-snippet",maxLength:250,type:"textarea",value:this.itemDetails.snippet}),i("label",{key:"5ab52b0ef496dd4bd3594fa8a762426b69225166",class:"font-size--3",id:"item-snippet-count",ref:t=>this.itemSnippetCount=t})))),i("calcite-label",{key:"8b74768d205c534b773d16cedb3da49e7136ecbf"},this._translations.description,i("label",{key:"a1d7ef4f1e6712e56edb011ea41fddf5c1455fd1",id:"item-description-label"},i("calcite-input",{key:"9d14b7461f5a52ce046f8a8f15acfa37c958f289",id:"item-description",type:"textarea",value:this.itemDetails.description}))),i("calcite-label",{key:"af1fd97fb1a4102e1601e419e4188789bfe99a39"},this._translations.tags,i("label",{key:"37b0e91822de780bf635012fcf8e01c0a528722e",id:"item-tags-label"},i("calcite-input",{key:"ac8e699484de76320caa82234c6132b152cf990b",id:"item-tags",value:(this.itemDetails.tags&&Array.isArray(this.itemDetails.tags)?this.itemDetails.tags:[this.itemDetails.tags]).join(",")}))),"Group"!==this.itemType?i("calcite-label",null,this._translations.credits,i("label",{id:"item-credits-label"},i("calcite-input",{id:"item-credits",value:this.itemDetails.accessInformation}))):null,"Group"!==this.itemType?i("calcite-label",null,i("label",{id:"item-terms-label"},this._translations.termsOfUse,i("calcite-input",{id:"item-terms",type:"textarea",value:this.itemDetails.licenseInfo}))):null))}componentDidRender(){this._loadThumb()}inputReceivedHandler(t){switch(t.target.id){case"item-title":this.itemDetails.title=t.target.value,this._updateStore();break;case"item-snippet":t.target.value.length>250&&(t.target.value=t.target.value.substring(0,250)),this.itemDetails.snippet=t.target.value,this._updateLengthLabel(this.itemDetails.snippet),this._updateStore();break;case"item-description":this.itemDetails.description=t.target.value,this._updateStore();break;case"item-tags":this.itemDetails.tags=t.target.value,this._updateStore();break;case"item-credits":this.itemDetails.accessInformation=t.target.value,this._updateStore();break;case"item-terms":this.itemDetails.licenseInfo=t.target.value,this._updateStore()}}_getThumbnail(){this.browseForThumbnail.click()}_loadThumb(){var t;this.thumbnail&&(null===(t=this.itemEdit)||void 0===t?void 0:t.thumbnail)?(this.thumbnail.src=URL.createObjectURL(this.itemEdit.thumbnail),this.thumbnailContainer.classList.remove("empty-box"),this.thumbnail.classList.remove("display-none")):(this.thumbnailContainer.classList.add("empty-box"),this.thumbnail.classList.add("display-none"))}_updateLengthLabel(t){this.itemSnippetCount.innerText=this._translations.snippetCountPattern.replace("{{n}}",t.length.toString())}_updateStore(){this.itemEdit=ft.getItemInfo(this.itemId),this.itemEdit.item=this.itemDetails,ft.setItemInfo(this.itemEdit)}_updateThumbnail(t){const e=t.target.files;e&&e[0]&&this.thumbnail&&(this.thumbnail.src=URL.createObjectURL(e[0]),this.itemEdit=ft.getItemInfo(this.itemId),this.itemEdit.thumbnail=e[0],ft.replaceItemThumbnail(this.itemEdit))}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}};Yt.style=".inputBottomSeparation{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem}.icon-inline--on-left,.icon-inline--on-right{display:inline;vertical-align:middle;margin-inline-end:0.375rem;fill:#0079c1}.scale-down{-o-object-fit:scale-down;object-fit:scale-down}.img-container{display:inline;margin-inline-end:1rem;max-width:363px}.summary-count-container{display:inline;flex-grow:1;margin-inline-start:0.75rem}.snippet-count-container{width:calc(100vw - 363px)}.parent-container{max-width:100%;padding:1rem}label{position:relative;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem;display:block;min-width:-moz-min-content;min-width:min-content}";const Qt=class{constructor(e){t(this,e),this.groupId="",this._translations=void 0,this.sharing=[]}itemIdWatchHandler(){const t=ft.getItemInfo(this.groupId);this.sharing=t.groupDetails}async componentWillLoad(){return this._getTranslations()}render(){return i(o,{key:"0a3f98863a6e7e42bc4807d2eaf6448c74c59d48"},i("div",{key:"80f43ee6effa958ba2ef98ae0775eac85599dcd6",class:"container-border"},i("calcite-label",{key:"260b6d9e363241c79481ccc0a7bbc4586dadf3c0"},this._translations.groupInfo),this._renderItems(this.sharing)))}async getShareInfo(){return this.sharing}_renderItems(t){return t&&t.length>0?t.map((t=>i("calcite-label",{layout:"inline"},i("calcite-switch",{checked:t.shareItem,id:t.id,name:"setting",onCalciteSwitchChange:t=>this._updateItem(t),scale:"m",value:"enabled"}),i("solution-item-icon",{type:t.type,typeKeywords:t.typeKeywords}),i("span",{class:"icon-text",title:t.title},t.title)))):null}_updateItem(t){const e=t.target.id;this.sharing=this.sharing.map((i=>{if(i.id===e){i.shareItem=t.target.checked;const a=ft.getItemInfo(e);if(i.shareItem)a.groups?a.groups.indexOf(this.groupId)<0&&a.groups.push(this.groupId):a.groups=[this.groupId];else if(a.groups){const t=a.groups.indexOf(this.groupId);t>-1&&a.groups.splice(t,1)}ft.setItemInfo(a)}return i}))}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{groupId:["itemIdWatchHandler"]}}};Qt.style=":host{display:block}.container-border{padding:1rem}.icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";const Zt=class{constructor(i){t(this,i),this.organizationVariableSelected=e(this,"organizationVariableSelected",7),this.value="",this._organizationVariables=[],this._translations=void 0}valueWatchHandler(){this._organizationVariables=JSON.parse(this.value)}async componentWillLoad(){return this._getTranslations()}render(){return i(o,{key:"0f16be09f2b214cf66ca14dbbc19f0f87765351b"},i("div",{key:"2c297d4057323428cc06536e595027e1700ea3ef"},i("h4",{key:"2a0806cee5b309de748ab9fee02193084c5beb85",class:"org-var-header"},this._translations.orgVariables)),i("div",{key:"ae4612f5558811802695ab162bcdb0a4de939ba8",class:"container-border"},i("calcite-tree",{key:"d501376a51669743eb6a3f9eb857892c47349d8c",id:"variable-label"},this._renderHierarchy(this._organizationVariables))))}_renderHierarchy(t){return t.map((t=>i("calcite-tree-item",{onClick:()=>this._treeItemSelected(t.id,t.value)},t.title)))}_treeItemSelected(t,e){this.organizationVariableSelected.emit({itemId:t,value:e})}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{value:["valueWatchHandler"]}}};Zt.style=":host{display:block}.container-border{overflow-y:auto}.org-var-header{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1rem}";const te=class{constructor(e){t(this,e),this._removedResources={},this.authentication=void 0,this.itemId="",this.resourceFilePaths=[],this.resources=[],this._translations=void 0}itemIdWatchHandler(){const t=ft.getItemInfo(this.itemId);this.resourceFilePaths=t.resourceFilePaths,this.resources=t.resources.map((t=>t.substring(t.lastIndexOf("/")+1)))}componentWillLoad(){return this._getTranslations()}render(){const t=this._hasValidResources();return i(o,{key:"56bec80e12a7dd04fff0602c86896a2dcbd0200c"},i("div",{key:"1d2f41e61e5b8612d9504ee41a306d8a188b11d3",class:"resource-item"},i("div",{key:"a33e19c89e06a24df5cc5813f90744cdc5cae570",class:"margin-bottom-1"},i("calcite-button",{key:"e8311e60fa68e0e91512a141db353caf9cfdbec1",appearance:"solid",class:"resource-button",color:"blue",onClick:()=>this._addNewResource()},this._translations.addResource),i("calcite-button",{key:"016e50f63b6c7a9c02508e1969558a0bf5b744d3",appearance:"solid",color:"blue",disabled:!t,onClick:()=>this._downloadAll()},this._translations.downloadAll)),i("div",{key:"96bb141e028edfb662cdb677d1e0afe8ae7d56c6",class:"resources-container",style:{display:t?"inherit":"none"}},this._renderResourceList())))}_renderResourceList(){return i("calcite-value-list",{multiple:!0},this.resourceFilePaths.reduce(((t,e)=>(e.type!==mt.Thumbnail&&t.push(this._renderResource(e)),t)),[]))}_renderResource(t){const e=t.updateType===vt.Remove;return i("calcite-value-list-item",{class:e?"disabled":"",label:t.folder?t.folder+"/"+t.filename:t.filename,nonInteractive:!0,value:t.url},i("calcite-action-group",{"expand-disabled":"true",layout:"horizontal",slot:"actions-end"},i("calcite-action",{disabled:e,icon:"download",label:this._translations.download,onClick:()=>this._download(t.url,t.filename),scale:"m",text:this._translations.download,title:this._translations.download}),i("calcite-action",{disabled:e,icon:"upload-to",label:this._translations.update,onClick:()=>this._upload(t),scale:"m",text:this._translations.update,title:this._translations.update}),i("calcite-action",{disabled:e,icon:"trash",label:this._translations.delete,onClick:()=>this._delete(t),scale:"m",text:this._translations.delete,title:this._translations.delete}),e?i("calcite-action",{icon:"reset",label:this._translations.reset,onClick:()=>this._reset(t.filename),scale:"m",text:this._translations.reset,title:this._translations.reset}):i("div",{class:"display-none"})))}_delete(t){t.updateType=vt.Remove,this.resourceFilePaths=[...this.resourceFilePaths],this._updateStore()}_reset(t){this.resourceFilePaths=this.resources.some((e=>e===t))?this.resourceFilePaths.map((e=>(e.filename===t&&(e.updateType=vt.None),e))):this.resourceFilePaths.map((e=>(e.filename===t&&(e.updateType=vt.Add),e))),this._updateStore()}_downloadAll(){this.resourceFilePaths.forEach((t=>{this._download(t.url,t.filename)}))}_download(t,e){t.startsWith("blob")?this.downloadFile(t,e):this.fetchAndDownload(`${t}?token=${this.authentication.token}`,e)}downloadFile(t,e){const i=document.createElement("a");i.href=t,i.download=e,i.target="_blank",i.click()}_hasValidResources(){return this.resourceFilePaths.some((t=>t.url.indexOf("_info_thumbnail")<0))}async fetchAndDownload(t,e){const i=await fetch(t),a=await i.blob(),s=URL.createObjectURL(a);this.downloadFile(s,e)}_upload(t){const e=document.createElement("input");e.classList.add("display-none"),e.onchange=this._updateResource.bind(this,t),e.type="file",e.click()}_addNewResource(){const t=document.createElement("input");t.classList.add("display-none"),t.onchange=this._add.bind(this),t.type="file",t.click()}_updateResource(t,e){const i=e.target.files;i&&i[0]&&(t.blob=i[0],t.updateType=vt.Update,this._updateStore())}_add(t){const e=t.target.files;if(e&&e[0]){const t=URL.createObjectURL(e[0]),i=e[0].name;this.resourceFilePaths.some((e=>e.filename===i&&e.url===t))||(this.resourceFilePaths=[...this.resourceFilePaths,{url:t,type:mt.Data,folder:void 0,filename:i,blob:e[0],updateType:vt.Add}],this._updateStore())}}_updateStore(){const t=ft.getItemInfo(this.itemId);t.resourceFilePaths=this.resourceFilePaths,ft.setItemInfo(t)}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};te.style=":host{display:block}.resource-item{padding:1rem}.resource-button{margin-inline-end:1rem}.resource-progress{padding-top:1rem}.resources-container{border:1px #808080 solid}.margin-bottom-1{margin-bottom:1rem}";const ee=class{itemIdWatchHandler(){this._initializing=!0,this.value=JSON.stringify("data"===this.instanceid?ft.getItemInfo(this.itemId).data:ft.getItemInfo(this.itemId).properties,null,2)}constructor(e){t(this,e),this._initializing=!1,this.instanceid="",this.itemId="",this.organizationVariables="",this.solutionVariables="",this.varsOpen=!0,this._translations=void 0,this.value="",window.addEventListener("solutionEditorContentChanged",(t=>{if(this.itemId){const{id:e,contents:i}=t.detail,[a,s]=e.split("|");if(a==this.itemId&&s===this.instanceid){if(!this._initializing&&i.length>0){const t=ft.getItemInfo(a);"data"===s?t.data=JSON.parse(i):t.properties=JSON.parse(i),ft.setItemInfo(t)}this._initializing=!1}}}))}componentWillLoad(){return this._getTranslations()}render(){return i(o,{key:"719601ce314da8b957f2eebb7c4a05489ae14d0e"},i("div",{key:"e712c532d0568494ae3dce6d08bfbb11d260fabb",class:"solution-data-container"},i("calcite-shell",{key:"782031ce7fdf79fb51197988145524a5846e8388",class:"light var-container",dir:"ltr"},i("calcite-panel",{key:"945a9f91f45e70279eea5f765fe76f2e835a4520",class:"json-editor"},i("div",{key:"306980a78f84ba3ff3694314d5da9e1ced288f10",class:"solution-data-child-container calcite-match-height"},i("json-editor",{key:"df02c424a6abe7ca96e85063e947a072a8a147f3",class:"solution-data-editor-container",instanceid:this.itemId+"|"+this.instanceid,value:this.value}))),i("calcite-shell-panel",{key:"1dc03b9cdedecafa5393a9ae39767311618c697b","height-scale":"l",position:"end",slot:"contextual-panel","width-scale":"xs"},i("div",{key:"c860608f30e60529d990f10077aef88af7f97d18",class:this.varsOpen?"solution-data-child-container":"solution-data-child-container-collapsed"},i("calcite-button",{key:"6a73213cbd8f5741434fa3ac6bf40c6912432a15",appearance:"transparent",class:"collapse-btn","icon-start":this.varsOpen?"chevrons-right":"chevrons-left",id:"collapse-vars",onClick:()=>this._toggleVars(),scale:"s",title:this.varsOpen?this._translations.collapse:this._translations.expand}),i("div",{key:"9c343fe75a40e017ea8f63a3e0a2417ef444a319",class:this.varsOpen?"org-vars":"org-vars display-none",id:"orgVars"},i("solution-organization-variables",{key:"5138e9cba2e3ad4ea9df59c0e2e74fbba2dc01be",value:this.organizationVariables})),i("div",{key:"402a0a71056acc4214f2376c5f64e7971322bf55",class:this.varsOpen?"sol-vars":"sol-vars display-none",id:"solVars"},i("solution-variables",{key:"68753d13ad8ca0087359e371a11a0755ea43ebac",value:this.solutionVariables})))))))}_toggleVars(){this.varsOpen=!this.varsOpen}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};ee.style=":host{display:flexbox}.solution-data-container{position:absolute;height:-moz-available;height:calc(100% - 48px);height:-webkit-fill-available;height:stretch;width:-moz-available;width:100%;width:-webkit-fill-available;width:stretch}.solution-data-child-container{display:flex;height:100%;width:100%;flex-direction:column;overflow-y:auto}.solution-data-editor-container{height:100%}.solution-data-child-container-collapsed{display:flex;height:100%;flex-direction:column;overflow:auto;width:50px}.inputBottomSeparation{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem}.json-editor{margin:1rem;width:auto;width:-webkit-fill-available -moz-available}.collapse-btn{padding-left:1rem;padding-right:1rem;padding-top:1rem;padding-bottom:0px}.org-vars{padding-left:1rem;padding-right:1rem;padding-top:1rem;padding-bottom:0px}.sol-vars{padding-top:0px;padding-bottom:0px;padding-left:1rem;padding-right:1rem;min-height:45%}.padding-1{padding:1rem}.light{background-color:#F4F4F4}";const ie=class{constructor(i){t(this,i),this.solutionVariableSelected=e(this,"solutionVariableSelected",7),this.value="",this._solutionVariables=[],this._translations=void 0}valueWatchHandler(){this._solutionVariables=JSON.parse(this.value)}componentWillLoad(){return this._getTranslations()}render(){return i(o,{key:"4e92cbf7b038e47064d115fa3acedc7c97740b74"},i("div",{key:"0286eccf36b633f9136d41c91d294a08d9f422a9"},i("h4",{key:"c11b186149971f39226f5698cbd3655c410a2432",class:"org-var-header"},this._translations.solVariables)),i("div",{key:"6396b897a2fca64b80c10e3fa4c199487173e6b0",class:"container-border"},i("calcite-tree",{key:"f041b9c84e8f73b6549c4668bef11c1c0633b38b",id:"variable-label"},this._renderHierarchy(this._solutionVariables))))}_renderHierarchy(t){return t.map((t=>t.dependencies&&t.dependencies.length>0?i("calcite-tree-item",{onClick:t=>this._toggleExpand(t)},i("solution-item-icon",{type:t.type}),i("span",{class:"icon-text",title:t.title},t.title),i("calcite-tree",{slot:"children"},this._renderHierarchy(t.dependencies))):i("calcite-tree-item",{onClick:()=>this._treeItemSelected(t.id,t.value)},t.title)))}_treeItemSelected(t,e){this.solutionVariableSelected.emit({itemId:t,value:e})}_toggleExpand(t){var e;const i=null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.closest("calcite-tree-item");i&&(i.expanded=!i.expanded)}async _getTranslations(){const t=await ut(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{value:["valueWatchHandler"]}}};ie.style=":host{display:block}.container-border{overflow-y:hidden}.org-var-header{margin-top:1rem;margin-bottom:1rem;margin-left:0px;margin-right:0px}.icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";export{kt as calcite_shell_panel,Ct as calcite_tab,Wt as calcite_tab_nav,Ot as calcite_tab_title,Pt as calcite_tabs,Jt as calcite_value_list,Kt as calcite_value_list_item,Xt as json_editor,Yt as solution_item_details,Qt as solution_item_sharing,Zt as solution_organization_variables,te as solution_resource_item,ee as solution_template_data,ie as solution_variables}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import{r as t,h as i,g as s,c as e,H as a,F as o}from"./p-6d753a3d.js";import{c as n}from"./p-bfd3d428.js";import{c,s as h,a as l}from"./p-a25bbcc1.js";import{a as r}from"./p-67b26725.js";import{c as d,u as b,d as f,I as p}from"./p-9db9645e.js";import{c as u,d as m}from"./p-b5bfe190.js";import{c as v,s as y,d as g,u as w}from"./p-2e625f11.js";import{S as k}from"./p-d2b66bd2.js";import{l as x,f as L,g as C}from"./p-896c9644.js";import{a as _,g as S,b as j,d as I}from"./p-583e5dd0.js";import"./p-b85be429.js";import"./p-db50226e.js";import"./p-820d8935.js";import"./p-f50a294b.js";import"./p-82e085d0.js";import"./p-c1cf3ebc.js";
|
7
|
+
/*!
|
8
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
+
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
|
+
* v2.8.2
|
11
|
+
*/const E="frame",z="frame--advancing",W="frame--retreating",D=class{constructor(i){t(this,i),this.itemMutationObserver=n("mutation",(()=>this.updateFlowProps())),this.getFlowDirection=(t,i)=>t&&i>1||t>1?i<t?"retreating":"advancing":null,this.updateFlowProps=()=>{const{customItemSelectors:t,el:i,items:s}=this,e=Array.from(i.querySelectorAll("calcite-flow-item"+(t?`,${t}`:""))).filter((t=>t.closest("calcite-flow")===i)),a=s.length,o=e.length,n=e[o-1],c=e[o-2];if(o&&n&&e.forEach((t=>{t.showBackButton=t===n&&o>1,t.hidden=t!==n})),c&&(c.menuOpen=!1),this.items=e,a!==o){const t=this.getFlowDirection(a,o);this.itemCount=o,this.flowDirection=t}},this.customItemSelectors=void 0,this.flowDirection=null,this.itemCount=0,this.items=[]}async back(){const{items:t}=this,i=t[t.length-1];if(!i)return;const s=i.beforeBack?i.beforeBack:()=>Promise.resolve();try{await s.call(i)}catch(t){return}return i.remove(),i}async setFocus(){await c(this);const{items:t}=this,i=t[t.length-1];return null==i?void 0:i.setFocus()}connectedCallback(){var t;null===(t=this.itemMutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0}),this.updateFlowProps()}async componentWillLoad(){h(this)}componentDidLoad(){l(this)}disconnectedCallback(){var t;null===(t=this.itemMutationObserver)||void 0===t||t.disconnect()}async handleItemBackClick(t){if(!t.defaultPrevented)return await this.back(),this.setFocus()}render(){const{flowDirection:t}=this;return i("div",{key:"9d405841d7a1ee2d7a5da28c02ef8d5bf08dd9f5",class:{[E]:!0,[z]:"advancing"===t,[W]:"retreating"===t}},i("slot",{key:"a02231a5002f8b19542e03529aad12771787b26f"}))}get el(){return s(this)}};D.style=":host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0px}:host ::slotted(calcite-flow-item),:host ::slotted(calcite-panel){block-size:100%}:host ::slotted(.calcite-match-height:last-child){display:flex;flex:1 1 auto;overflow:hidden}:host .frame--advancing{animation:calcite-frame-advance var(--calcite-animation-timing)}:host .frame--retreating{animation:calcite-frame-retreat var(--calcite-animation-timing)}@keyframes calcite-frame-advance{0%{--tw-bg-opacity:0.5;transform:translate3d(50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity:0.5;transform:translate3d(-50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}:host([hidden]){display:none}[hidden]{display:none}";
|
12
|
+
/*!
|
13
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
|
+
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
15
|
+
* v2.8.2
|
16
|
+
*/
|
17
|
+
const F=class{constructor(i){t(this,i),this.calciteFlowItemBack=e(this,"calciteFlowItemBack",7),this.calciteFlowItemScroll=e(this,"calciteFlowItemScroll",6),this.calciteFlowItemClose=e(this,"calciteFlowItemClose",6),this.calciteFlowItemToggle=e(this,"calciteFlowItemToggle",6),this.handlePanelScroll=t=>{t.stopPropagation(),this.calciteFlowItemScroll.emit()},this.handlePanelClose=t=>{t.stopPropagation(),this.calciteFlowItemClose.emit()},this.handlePanelToggle=t=>{t.stopPropagation(),this.collapsed=t.target.collapsed,this.calciteFlowItemToggle.emit()},this.backButtonClick=()=>{this.calciteFlowItemBack.emit()},this.setBackRef=t=>{this.backButtonEl=t},this.setContainerRef=t=>{this.containerEl=t},this.closable=!1,this.closed=!1,this.collapsed=!1,this.collapseDirection="down",this.collapsible=!1,this.beforeBack=void 0,this.description=void 0,this.disabled=!1,this.heading=void 0,this.headingLevel=void 0,this.loading=!1,this.menuOpen=!1,this.messageOverrides=void 0,this.messages=void 0,this.overlayPositioning="absolute",this.showBackButton=!1,this.defaultMessages=void 0,this.effectiveLocale=""}onMessagesChange(){}connectedCallback(){d(this),u(this),v(this)}async componentWillLoad(){await y(this),h(this)}componentDidRender(){b(this)}disconnectedCallback(){f(this),m(this),g(this)}componentDidLoad(){l(this)}effectiveLocaleChange(){w(this,this.effectiveLocale)}async setFocus(){await c(this);const{backButtonEl:t,containerEl:i}=this;return t?t.setFocus():i?i.setFocus():void 0}async scrollContentTo(t){var i;await(null===(i=this.containerEl)||void 0===i?void 0:i.scrollContentTo(t))}renderBackButton(){const{el:t}=this,s="rtl"===r(t),{showBackButton:e,backButtonClick:a,messages:o}=this,n=o.back;return e?i("calcite-action",{"aria-label":n,class:"back-button",icon:s?"chevron-right":"chevron-left",key:"flow-back-button",onClick:a,scale:"s",slot:"header-actions-start",text:n,title:n,ref:this.setBackRef}):null}render(){const{collapsed:t,collapseDirection:s,collapsible:e,closable:o,closed:n,description:c,disabled:h,heading:l,headingLevel:r,loading:d,menuOpen:b,messages:f,overlayPositioning:u}=this;return i(a,{key:"ab926d381ff2493f3fd49a5c8724260211d69ca9"},i(p,{key:"6799b56c2116de5e08739ddc2ec1557bd291f3f8",disabled:h},i("calcite-panel",{key:"2e438b8abf573eabaaa2e966dcca5c4843a53cba",closable:o,closed:n,collapseDirection:s,collapsed:t,collapsible:e,description:c,disabled:h,heading:l,headingLevel:r,loading:d,menuOpen:b,messageOverrides:f,onCalcitePanelClose:this.handlePanelClose,onCalcitePanelScroll:this.handlePanelScroll,onCalcitePanelToggle:this.handlePanelToggle,overlayPositioning:u,ref:this.setContainerRef},this.renderBackButton(),i("slot",{key:"39b650abdf64df16f535d45f64dc1b367acfcc9e",name:"action-bar",slot:k.actionBar}),i("slot",{key:"5b36c56874ad762f842c81f9ffbdcdbd3168cf75",name:"header-actions-start",slot:k.headerActionsStart}),i("slot",{key:"2dbf552425d238a4479a12bbec79571d11124577",name:"header-actions-end",slot:k.headerActionsEnd}),i("slot",{key:"2dd0a30236844c91c2cf10a9fbacbe9935ea234c",name:"header-content",slot:k.headerContent}),i("slot",{key:"1b025f746e2e7d58fb057aab36b24e46872e607e",name:"header-menu-actions",slot:k.headerMenuActions}),i("slot",{key:"5dd5986e93dcc11e0b0fade6822814b160053c70",name:"fab",slot:k.fab}),i("slot",{key:"e7cf2702cd2e423d07a8a8ac57c142bc4738b3ef",name:"footer-actions",slot:k.footerActions}),i("slot",{key:"e2561d89aaebe4fbb82b1f546551d05ebb23b0bf",name:"footer",slot:k.footer}),i("slot",{key:"fb6bf40456038f84486b2858765bb9d147800e84"}))))}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};F.style=":host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-color-border-3);border-inline-end-width:1px}calcite-panel{--calcite-panel-footer-padding:var(--calcite-flow-item-footer-padding);--calcite-panel-header-border-block-end:var(--calcite-flow-item-header-border-block-end)}:host([hidden]){display:none}[hidden]{display:none}";const O=class{constructor(i){t(this,i),this.success=e(this,"success",7),this.fail=e(this,"fail",7),this.drawComplete=e(this,"drawComplete",7),this.editingAttachment=e(this,"editingAttachment",7),this.progressStatus=e(this,"progressStatus",7),this.mapView=void 0,this.selectedLayerId=void 0,this.customizeSubmit=!1,this.searchConfiguration=void 0,this.showSearchWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.init()}))}async close(){this._editor&&this._editor.destroy()}async submit(){this._editor&&this._editor.viewModel.featureFormViewModel.submit()}async componentWillLoad(){await this.initModules()}async componentDidLoad(){await this.init()}render(){const t=this.showSearchWidget?"":"display-none";return i(o,{key:"66e42055c22a93c6d34440b65ac950a388639b9a"},i("div",{key:"fc4bf1fc039e4d914e416a394f0671712d116482",id:"feature-form"}),i("div",{key:"aadd529366b2b85e60fdffc306cf41f37c2a6709",class:`search-widget ${t}`,id:"search-widget-ref"}))}async init(){this.mapView&&this.selectedLayerId&&(await this.createEditorWidget(),await this.createSearchWidget())}async initModules(){const[t,i,s]=await x(["esri/widgets/Editor","esri/core/reactiveUtils","esri/widgets/Search"]);this.Editor=t,this.reactiveUtils=i,this.Search=s}async createEditorWidget(){this._editor&&this._editor.destroy();const t=[],i=document.createElement("div");(await _(this.mapView)).forEach((async i=>{t.push({layer:i,enabled:"feature"===(null==i?void 0:i.type)&&(null==i?void 0:i.id)===this.selectedLayerId,addEnabled:!0,updateEnabled:!1,deleteEnabled:!1})})),this._editor=new this.Editor({allowedWorkflows:"create-features",view:this.mapView,layerInfos:t,visibleElements:{snappingControls:!1},container:i}),this.el.appendChild(i);const s=this.reactiveUtils.watch((()=>this._editor.viewModel.state),(t=>{"adding-attachment"===t||"editing-attachment"===t?(this._addingAttachment=!0,this.editingAttachment.emit(!0)):this._addingAttachment&&(this.editingAttachment.emit(!1),this._addingAttachment=!1)}));this._editor.viewModel.addHandles(s);const e=this.reactiveUtils.watch((()=>this._editor.viewModel.featureTemplatesViewModel.state),(t=>{"ready"===t&&(this.progressStatus.emit(.5),this.startCreate())}));this._editor.viewModel.addHandles(e);const a=this.reactiveUtils.watch((()=>this._editor.viewModel.state),(t=>{"creating-features"===t&&(this.showSearchWidget=!0)}));this._editor.viewModel.addHandles(a)}async startCreate(){var t;if(null===(t=this._editor.viewModel.featureTemplatesViewModel.items)||void 0===t?void 0:t.length){const t=this._editor.viewModel.featureTemplatesViewModel.items[0].get("items");this._editor.viewModel.featureTemplatesViewModel.on("select",(()=>{this.progressStatus.emit(.75),setTimeout((()=>{this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this)),this._editor.viewModel.sketchViewModel.on("create",(t=>{"complete"===t.state&&(this.showSearchWidget=!1,this.progressStatus.emit(1),this.drawComplete.emit())})),this.hideEditorsElements()}),700),this.hideEditorsElements()})),1===t.length&&this._editor.viewModel.featureTemplatesViewModel.select(t[0]),this.hideEditorsElements()}}async createSearchWidget(){let t={view:this.mapView};if(this.searchConfiguration){const i=this._getSearchConfig(this.searchConfiguration,this.mapView);t=Object.assign({},i)}this._search=new this.Search(t),this._search.container="search-widget-ref",this._search.popupEnabled=!1,this._search.resultGraphicEnabled=!1;const i=await S(this.mapView,this.selectedLayerId);let s=null;this._search.on("search-complete",(t=>{var e;this.mapView.goTo(t.results[0].results[0].extent),"point"===i.geometryType&&(s=null===(e=t.results[0].results[0])||void 0===e?void 0:e.feature.geometry)}));const e=this.reactiveUtils.watch((()=>this._search.viewModel.state),(t=>{"ready"===t&&setTimeout((()=>{this._editor.viewModel.sketchViewModel.createGraphic&&s&&(this._editor.viewModel.sketchViewModel.createGraphic.set("geometry",s),this._editor.viewModel.sketchViewModel.complete(),this.hideEditorsElements())}),100)}));this._search.viewModel.addHandles(e)}_getSearchConfig(t,i){const s=t.sources;return(null==s?void 0:s.length)>0?(t.includeDefaultSources=!1,s.forEach((t=>{var s,e;if(t.hasOwnProperty("layer")){const a=t,o=null===(s=a.layer)||void 0===s?void 0:s.id,n=o?i.map.findLayerById(o):null,c=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;n?a.layer=n:c&&(a.layer=new this.FeatureLayer(c))}})),null==s||s.forEach((t=>{if(t.hasOwnProperty("locator")){const i=t;"ArcGIS World Geocoding Service"===(null==i?void 0:i.name)&&(i.outFields=i.outFields||["Addr_type","Match_addr","StAddr","City"],i.singleLineFieldName="SingleLine"),i.url=i.url,delete i.url}}))):t=Object.assign(Object.assign({},t),{includeDefaultSources:!0}),t}hideEditorsElements(){this.customizeSubmit&&setTimeout((()=>{var t;null===(t=this.el.querySelector(".esri-editor").querySelectorAll("calcite-flow-item"))||void 0===t||t.forEach((t=>{var i,s,e,a,o;const n=null===(e=null===(s=null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector("calcite-panel"))||void 0===s?void 0:s.shadowRoot)||void 0===e?void 0:e.querySelector("article");null===(a=null==n?void 0:n.querySelector("header"))||void 0===a||a.setAttribute("style","display: none"),null===(o=null==n?void 0:n.querySelector("footer"))||void 0===o||o.setAttribute("style","display: none")}))}),700)}async submitted(t){var i;if(!t.invalid.length&&t.valid.length){try{await this._editor.activeWorkflow.commit(),(null===(i=this._editor.viewModel.failures)||void 0===i?void 0:i.length)&&this._editor.viewModel.failures.some((t=>{if(t.error)throw t.error}))}catch(t){return void this.fail.emit(t)}this.success.emit()}}get el(){return s(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};O.style=":host{display:block}.esri-editor__panel-toolbar{display:none !important}.esri-editor__update-actions{display:none !important}.esri-editor__panel-content{padding-block:0px !important}.esri-editor .esri-item-list__group__header{display:none !important}.esri-editor__panel-content__section .esri-widget__heading{display:none !important}.esri-editor .esri-item-list__filter-container--sticky{padding-block:0px !important;padding-inline:10px !important}.search-widget{width:92% !important;margin:5px 0 20px 14px}.display-none{display:none !important}";const B=class{constructor(i){t(this,i),this.success=e(this,"success",7),this.fail=e(this,"fail",7),this.isActionPending=e(this,"isActionPending",7),this.mapView=void 0,this.table=void 0,this.selectedFeature=void 0,this.customizeSubmit=!1}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.init()}))}async close(){this._editor&&this._editor.destroy()}async submit(){this._editor&&this._editor.viewModel.featureFormViewModel.submit()}async componentWillLoad(){await this.initModules()}async init(){this.mapView&&await this.createEditorWidget()}async initModules(){const[t,i]=await x(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}render(){return i(a,{key:"383e8fac89d037f77241d856013202d1e04b28ba"})}async componentDidLoad(){await this.init()}async createEditorWidget(){this._editor&&this._editor.destroy();const t=document.createElement("div");this._editor=new this.Editor({view:this.mapView,visibleElements:{snappingControls:!1},container:t}),this.el.appendChild(t);const i=this.reactiveUtils.watch((()=>{var t;return null===(t=this._editor.viewModel.featureFormViewModel)||void 0===t?void 0:t.state}),(t=>{"ready"===t&&this.hideEditorsElements()}));this._editor.viewModel.addHandles(i);const s=this.reactiveUtils.watch((()=>this._editor.viewModel.featureTemplatesViewModel.state),(t=>{"ready"===t&&this.startCreate()}));this._editor.viewModel.addHandles(s);const e=this.reactiveUtils.watch((()=>this._editor.viewModel.state),(t=>{"adding-attachment"===t||"editing-attachment"===t?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)}));this._editor.viewModel.addHandles(e)}async startCreate(){const t=this.selectedFeature.layer,i=this.table,s=t.relationships[0],e=i.relationships.find((i=>t.layerId===i.relatedTableId)),a=await t.queryFeatures({objectIds:[this.selectedFeature.getObjectId()],outFields:[t.objectIdField,s.keyField]}),o=i.templates[0],n={attributeOverrides:this.makeAttributesForRelatedFeature(a.features[0],s,e),layer:i,template:o};await this._editor.startCreateFeaturesWorkflowAtFeatureCreation(n),this.isActionPending.emit(!1),this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this))}hideEditorsElements(){this.customizeSubmit&&setTimeout((()=>{var t;null===(t=this.el.querySelector(".esri-editor").querySelectorAll("calcite-flow-item"))||void 0===t||t.forEach((t=>{var i,s,e,a,o;const n=null===(e=null===(s=null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector("calcite-panel"))||void 0===s?void 0:s.shadowRoot)||void 0===e?void 0:e.querySelector("article");null===(a=null==n?void 0:n.querySelector("header"))||void 0===a||a.setAttribute("style","display: none"),null===(o=null==n?void 0:n.querySelector("footer"))||void 0===o||o.setAttribute("style","display: none")}))}),700)}makeAttributesForRelatedFeature(t,i,s){const e=t.getAttribute(i.keyField);let a=s.keyField;const o=this.table.fields.find((t=>t.name.toLocaleLowerCase()===a.toLocaleLowerCase()));return a=o.name,{[a]:e}}async submitted(t){var i;if(!t.invalid.length&&t.valid.length){try{await this._editor.activeWorkflow.commit(),(null===(i=this._editor.viewModel.failures)||void 0===i?void 0:i.length)&&this._editor.viewModel.failures.some((t=>{if(t.error)throw t.error}))}catch(t){return void this.fail.emit(t)}this.success.emit()}}get el(){return s(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};B.style=":host{display:block}.esri-editor__panel-toolbar{display:none !important}";const T=class{constructor(i){t(this,i),this.loadingStatus=e(this,"loadingStatus",7),this.featureSelect=e(this,"featureSelect",7),this._validFieldTypes=["small-integer","integer","big-integer","single","long"],this.mapView=void 0,this.graphics=void 0,this.reportingOptions=void 0,this._likeFieldAvailable=!1,this._likeCount=0,this._disLikeCount=0,this._dislikeFieldAvailable=!1,this._commentsAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._relatedFeaturesOIDs=void 0}async graphicsWatchHandler(){await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}async refresh(t){await this.getCompleteGraphic(t),await this.processComments(),this.isLikeDislikeConfigured(t.layer)?t&&this.graphics.length>1&&this.checkLikeDislikeFields():(this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1)}async back(){this._infoCard.back()}async next(){this._infoCard.next()}async toggleListView(){this._infoCard.toggleListView()}async componentWillLoad(){await this._initModules(),await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}render(){var t,s,e,a,o;const n=(null===(t=this._relatedFeaturesOIDs)||void 0===t?void 0:t.length)>0?`objectId in(${this._relatedFeaturesOIDs})`:"1=0";return i("calcite-panel",{key:"c39c0eec021627b920972f7d4bce0d45bfe0a9c2","full-height":!0},i("info-card",{key:"e90cb427a1f874216afcfdf0a33804bf14fb6a2c",allowEditing:!1,graphics:this.graphics,highlightEnabled:!1,isLoading:!1,isMobile:!1,mapView:this.mapView,paginationEnabled:!1,position:"relative",ref:t=>this._infoCard=t,zoomAndScrollToSelected:!0}),(this._likeFieldAvailable||this._dislikeFieldAvailable||this._commentsAvailable)&&i("div",{key:"ecfdf111612c92eacfd97dae7bb3080b7ad50e96",class:"buttons-container"},this._commentsAvailable&&i("div",{key:"07a8213e11585041fb1c5f56254447a720033f04",class:"comment-btn"},i("span",{key:"f4071fbd03372a0e88857962e9c31530e2dc693a"},this._relatedFeaturesOIDs.length),i("calcite-icon",{key:"30258e1daae5f1e00d18dd4ec052861de46b45bf",icon:"speech-bubble",scale:"s"})),this._likeFieldAvailable&&i("calcite-button",{key:"fa76245789a29e49be06482fd8cd0244f44d19ab",appearance:"transparent",iconEnd:"thumbs-up",kind:this._isLikeBtnClicked?"brand":"neutral",onClick:this.onLikeButtonClick.bind(this),scale:"s"},null!==(e=null!==(s=this._likeCount)&&void 0!==s?s:this._selectedGraphic.attributes[this._likeField])&&void 0!==e?e:0),this._dislikeFieldAvailable&&i("calcite-button",{key:"ac9adc799a93f08319b2f0b797cd5d4773b1a6cb",appearance:"transparent",iconEnd:"thumbs-down",kind:this._isDislikeBtnClicked?"brand":"neutral",onClick:this.onDislikeButtonClick.bind(this),scale:"s"},null!==(o=null!==(a=this._disLikeCount)&&void 0!==a?a:this._selectedGraphic.attributes[this._dislikeField])&&void 0!==o?o:0)),this.relatedTableId&&this._commentsAvailable&&i("feature-list",{key:"165b2ac0af65cbbab945a0dfd4ac878cc41af56c",class:"height-full",mapView:this.mapView,pageSize:5,ref:t=>this._commentsList=t,selectedLayerId:this.relatedTableId,showInitialLoading:!1,textSize:"small",whereClause:n}))}async _initModules(){const[t,i]=await x(["esri/rest/support/RelationshipQuery","esri/Graphic"]);this.RelationshipQuery=t,this.Graphic=i}async getCompleteGraphic(t){const i=t.layer,s=i.createQuery();s.objectIds=[t.getObjectId()];const e=await i.queryFeatures(s);this._selectedGraphic=e.features[0]}async processComments(){var t;const i=this._selectedGraphic.layer;if(this.reportingOptions[i.id].comment&&(null===(t=i.relationships)||void 0===t?void 0:t.length)>0){const t=i.relationships[0].relatedTableId,s=(await j(this.mapView)).filter((i=>t===i.layerId));if(this.relatedTableId=(null==s?void 0:s.length)>0?s[0].id:"",this.relatedTableId){const t=this._selectedGraphic.attributes[i.objectIdField],s=new this.RelationshipQuery({objectIds:[t],outFields:["*"],relationshipId:i.relationships[0].id}),e=await i.queryRelatedFeatures(s).catch((t=>{console.error(t)})),a=[];e[t]&&e[t].features.forEach((t=>{a.push(t.attributes.OBJECTID)})),this._relatedFeaturesOIDs=a,this._commentsAvailable=!0}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1,this.relatedTableId=""}isLikeDislikeConfigured(t){let i=!1,s=!1;if(this.reportingOptions&&this.reportingOptions[t.id]){if(!this.reportingOptions[t.id].like&&!this.reportingOptions[t.id].dislike)return!1;const e=this.reportingOptions[t.id].likeField,a=this.reportingOptions[t.id].dislikeField;if(!e&&!a)return!1;t.fields.forEach((o=>{this._validFieldTypes.indexOf(o.type)>-1&&(o.name===e&&this.reportingOptions[t.id].like?i=!0:o.name===a&&this.reportingOptions[t.id].dislike&&(s=!0))}))}return i||s}checkLikeDislikeFields(){this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._likeCount=0,this._disLikeCount=0;const t=this._selectedGraphic.layer;if(this.reportingOptions&&this.reportingOptions[t.id]){if(this._likeField=this.reportingOptions[t.id].likeField,this._dislikeField=this.reportingOptions[t.id].dislikeField,!this._likeField&&!this._dislikeField)return;t.fields.forEach((t=>{this._validFieldTypes.indexOf(t.type)>-1&&(t.name===this._likeField&&this.reportingOptions[this._selectedGraphic.layer.id].like?(this._likeFieldAvailable=!0,this._likeCount=this._selectedGraphic.attributes[t.name]):t.name===this._dislikeField&&this.reportingOptions[this._selectedGraphic.layer.id].dislike&&(this._dislikeFieldAvailable=!0,this._disLikeCount=this._selectedGraphic.attributes[t.name]))})),this.getFromLocalStorage()}}onLikeButtonClick(){this.loadingStatus.emit(!0),this._isDislikeBtnClicked&&this.reportingOptions[this._selectedGraphic.layer.id].dislike&&this.onDislikeButtonClick(),this._isLikeBtnClicked=!this._isLikeBtnClicked,this._isLikeBtnClicked?this._likeCount++:this._likeCount--,this.updateFeaturesLikeDislikeField(this._likeField,this._isLikeBtnClicked)}onDislikeButtonClick(){this.loadingStatus.emit(!0),this._isLikeBtnClicked&&this.reportingOptions[this._selectedGraphic.layer.id].like&&this.onLikeButtonClick(),this._isDislikeBtnClicked=!this._isDislikeBtnClicked,this._isDislikeBtnClicked?this._disLikeCount++:this._disLikeCount--,this.updateFeaturesLikeDislikeField(this._dislikeField,this._isDislikeBtnClicked)}async updateFeaturesLikeDislikeField(t,i){const s={},e=this._selectedGraphic.layer,a=this._selectedGraphic;a.attributes[t]=i?Number(a.attributes[t])+1:Number(a.attributes[t])-1,s[e.objectIdField]=a.attributes[e.objectIdField],s[t]=a.attributes[t];const o=new this.Graphic;o.attributes=s;const n={updateFeatures:[o]};await e.applyEdits(n).then((()=>{this._selectedGraphic=a,this._infoCard&&this._infoCard.updateCurrentGraphic(this._selectedGraphic),this.setInLocalStorage(),this.loadingStatus.emit(!1)}),(t=>{this.loadingStatus.emit(!1),console.log(t)}))}getFromLocalStorage(){const t=localStorage[this._selectedGraphic.layer.id];if(t){const i=JSON.parse(t).filter((t=>t.id===this._selectedGraphic.getObjectId()));i.length>0&&(this._isLikeBtnClicked=i[0].like,this._isDislikeBtnClicked=i[0].dislike)}}setInLocalStorage(){const t=this._selectedGraphic.layer.id,i=localStorage[t];let s=[];if(i){s=JSON.parse(i);const t=s.findIndex((t=>t.id===this._selectedGraphic.getObjectId()));t>=0&&s.splice(t,1)}s.push({id:this._selectedGraphic.getObjectId(),like:this._isLikeBtnClicked&&0!==this._likeCount,dislike:this._isDislikeBtnClicked&&0!==this._disLikeCount}),localStorage.setItem(t,JSON.stringify(s))}get el(){return s(this)}static get watchers(){return{graphics:["graphicsWatchHandler"]}}};T.style=":host{display:block}.buttons-container{align-items:center;display:flex;padding:10px 0 10px 15px;color:var(--calcite-color-text-1) !important;background-color:var(--calcite-color-foreground-1) !important;border-block-start:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3)}.comment-btn{display:flex;gap:5px;width:37px;font-size:var(--calcite-font-size--2);align-items:center}";const N=class{constructor(i){t(this,i),this.layerSelect=e(this,"layerSelect",7),this.layersListLoaded=e(this,"layersListLoaded",7),this.mapView=void 0,this.layers=void 0,this.showFeatureCount=!0,this.showNextIcon=!1,this._noLayersToDisplay=!1,this._mapLayerIds=[],this._isLoading=!1,this._translations=void 0}async refresh(){await this.setLayers()}async componentWillLoad(){await this._getTranslations(),this._isLoading=!0}async componentDidLoad(){await this.setLayers(),this._isLoading=!1}render(){return i(o,{key:"c73bf36c13fed8120273d8a5321dd60fe4d4b5f4"},this._isLoading&&i("calcite-loader",{key:"e748d9cc7d1855d3a2da34702ba853d35d1a2cde",label:"",scale:"m"}),!this._isLoading&&this.mapView&&this._noLayersToDisplay&&i("calcite-notice",{key:"4a06b7694fd91456ee5cdc51d33e4ac633d416b2",class:"error-msg",icon:"layers-reference",kind:"danger",open:!0},i("div",{key:"63b09f02312aba71826957c5b2c04a7750bdfca1",slot:"title"},this._translations.error),i("div",{key:"5a19dfe527a6c66a5477a4c6a14f4686cde73bb3",slot:"message"},this._translations.noLayerToDisplayErrorMsg)),!this._isLoading&&this.mapView&&i("calcite-list",{key:"e8a6170a55f4ba6ea35a1397690c3e365b814886","selection-appearance":"border","selection-mode":"none"},this.renderLayerList()))}async setLayers(){this.mapView&&await this.initLayerHash()}async initLayerHash(){const t=[];this._layerItemsHash=await I(this.mapView,!0),(await _(this.mapView)).forEach((async i=>{var s,e;if("feature"===(null==i?void 0:i.type)&&(null==i?void 0:i.editingEnabled)&&(null===(e=null===(s=null==i?void 0:i.capabilities)||void 0===s?void 0:s.operations)||void 0===e?void 0:e.supportsAdd)&&(this._layerItemsHash[i.id].supportsAdd=!0,this.showFeatureCount)){const s=i.createQuery(),e=i.queryFeatureCount(s);t.push(e),e.then((async t=>{const s=isNaN(t)?"":await L(t,{places:0,api:4,type:"decimal"});this._layerItemsHash[i.id].formattedFeatureCount=s}))}})),await Promise.all(t).then((()=>{const t=this.getLayersToBeShownInList(this._layerItemsHash);this._mapLayerIds=t.reverse(),this.handleNoLayersToDisplay()}),(()=>{this._mapLayerIds=[],this.handleNoLayersToDisplay()}))}handleNoLayersToDisplay(){this._noLayersToDisplay=!(this._mapLayerIds.length>0),this.layersListLoaded.emit(this._mapLayerIds)}getLayersToBeShownInList(t){var i;const s=(null===(i=this.layers)||void 0===i?void 0:i.length)>0?this.layers:[];return Object.keys(t).reduce(((t,i)=>{let e=!0;return(null==s?void 0:s.length)>0&&(e=s.indexOf(i)>-1),e&&t.push(i),t}),[])}renderLayerList(){return this._mapLayerIds.length>0&&this._mapLayerIds.reduce(((t,i)=>(this._layerItemsHash[i]&&t.push(this.getLayerListItem(i)),t)),[])}getLayerListItem(t){const s=this._layerItemsHash[t].formattedFeatureCount;return i("calcite-list-item",{onCalciteListItemSelect:()=>{this.onLayerItemSelected(t)}},i("div",{class:"layer-name",slot:"content-start"},this._layerItemsHash[t].name),this.showFeatureCount&&void 0!==s&&""!==s&&i("div",{class:this.showNextIcon?"":"feature-count",slot:"content-end"},"("+s+")"),this.showNextIcon&&i("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}onLayerItemSelected(t){this.layerSelect.emit({layerId:t,layerName:this._layerItemsHash[t].name})}async _getTranslations(){const t=await C(this.el);this._translations=t[0]}get el(){return s(this)}};N.style=":host{display:block}.error-msg{padding:10px}.layer-name{font-weight:500;padding:10px 12px}.feature-count{padding-right:12px}";export{D as calcite_flow,F as calcite_flow_item,O as create_feature,B as create_related_feature,T as feature_details,N as layer_list}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as e,c as a,h as t,H as l,g as c}from"./p-6d753a3d.js";import{E as i,a as s,b as r}from"./p-8294d644.js";const
|
6
|
+
import{r as e,c as a,h as t,H as l,g as c}from"./p-6d753a3d.js";import{E as i,a as s,b as r}from"./p-8294d644.js";const b=class{constructor(t){e(this,t),this.deductValueComplete=a(this,"deductValueComplete",7),this._types=Object.keys(i).filter((e=>!isNaN(Number(i[e]))))}render(){return t(l,{key:"68401afdbb18147910d55f13cae4c019bda9f020"},t("div",{key:"88b89c1a9b260024f28315574539f47bd0bd0a3a",class:"label-display"},t("calcite-label",{key:"8e81c5e65fe272c547addd3915ccc6a7da48a5b8",class:"label-display"},"Density %",this._getDensityInput()),t("calcite-label",{key:"f549369baa3b681922c07b2c91a626664e98309f",class:"label-display"},"Type",this._getTypeInput()),t("calcite-label",{key:"e850fbf5d9728f969c289946c3518a30316e88b9",class:"label-display"},"Severity",this._getSeverityInput())),t("div",{key:"2485c0b0f0c2681b1af7cf55478ec34efb734a46"},this._getCalculateInput()))}_getDensityInput(){return t("calcite-input",{max:100,min:0,ref:e=>{this._densityElement=e},type:"number"})}_getTypeInput(){return t("calcite-select",{label:"",ref:e=>{this._typeElement=e}},this._types.map(((e,a)=>t("calcite-option",{value:i[e].toString()},`${e} (${a+1})`))))}_getSeverityInput(){return t("calcite-select",{label:"",ref:e=>{this._severityElement=e}},t("calcite-option",{value:s.H},"High"),t("calcite-option",{value:s.M},"Medium"),t("calcite-option",{value:s.L},"Low"))}_getCalculateInput(){return t("calcite-button",{onClick:()=>this._calculateDeduct(parseFloat(this._typeElement.value),this._severityElement.value,parseFloat(this._densityElement.value))},"Calculate Deduct Value")}_calculateDeduct(e,a,t){if(e&&a&&!isNaN(t)){const l=r(e.toString(),a.toString(),t.toString(),!0);this.deductValueComplete.emit(l),alert(l)}else alert("Type, severity, and a density number are required")}get el(){return c(this)}};b.style=":host{display:block;--calcite-label-margin-bottom:0}.label-display{display:block;padding-bottom:1rem}";export{b as deduct_calculator}
|