@esri/solutions-components 0.10.42 → 0.10.43
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-action-pad_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-block_5.cjs.entry.js +25 -26
- package/dist/cjs/{constants-51cf394f.js → constants-bed33322.js} +3 -11
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +112 -49
- package/dist/cjs/{helpers-afcac967.js → helpers-0493759d.js} +1 -1
- package/dist/cjs/instant-apps-app-guide.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-create.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-export-views.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-export.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +21 -7
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +7 -7
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-popover.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-splash.cjs.entry.js +6 -5
- package/dist/cjs/instant-apps-time-filter.cjs.entry.js +2 -2
- package/dist/cjs/{loadModules-8567855e.js → loadModules-df8b13ca.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-4a18a858.js → locale-4b820602.js} +1 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/{utils-fa7ad44b.js → utils-3f10ea6b.js} +2 -2
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +112 -49
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +2 -2
- package/dist/components/crowdsource-reporter.js +112 -49
- package/dist/components/instant-apps-filter-list2.js +25 -26
- package/dist/components/instant-apps-interactive-legend-relationship2.js +19 -5
- package/dist/components/instant-apps-language-switcher.js +3 -3
- package/dist/components/instant-apps-language-translator2.js +4 -12
- package/dist/components/instant-apps-splash.js +4 -3
- package/dist/components/loadModules2.js +1 -1
- package/dist/components/solution-spatial-ref2.js +2 -2
- package/dist/components/utils4.js +1 -1
- package/dist/esm/calcite-action-pad_2.entry.js +1 -1
- package/dist/esm/calcite-block_5.entry.js +25 -26
- package/dist/esm/{constants-886c7c2c.js → constants-637a40f5.js} +3 -11
- package/dist/esm/crowdsource-reporter.entry.js +112 -49
- package/dist/esm/{helpers-91087955.js → helpers-91ca0f44.js} +1 -1
- package/dist/esm/instant-apps-app-guide.entry.js +2 -2
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +3 -3
- package/dist/esm/instant-apps-control-panel.entry.js +1 -1
- package/dist/esm/instant-apps-create.entry.js +2 -2
- package/dist/esm/instant-apps-export-views.entry.js +2 -2
- package/dist/esm/instant-apps-export.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +21 -7
- package/dist/esm/instant-apps-interactive-legend.entry.js +3 -3
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +2 -2
- package/dist/esm/instant-apps-language-switcher.entry.js +7 -7
- package/dist/esm/instant-apps-language-translator.entry.js +6 -6
- package/dist/esm/instant-apps-measurement.entry.js +2 -2
- package/dist/esm/instant-apps-popover.entry.js +2 -2
- package/dist/esm/instant-apps-scoreboard.entry.js +2 -2
- package/dist/esm/instant-apps-sign-in.entry.js +2 -2
- package/dist/esm/instant-apps-splash.entry.js +6 -5
- package/dist/esm/instant-apps-time-filter.entry.js +2 -2
- package/dist/esm/{loadModules-03ba7abe.js → loadModules-d5a25252.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-ce177eb8.js → locale-77038bee.js} +1 -1
- package/dist/esm/solution-contents_3.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{utils-3fc29543.js → utils-0a78d3c9.js} +2 -2
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-splash/instant-apps-splash.css +7 -0
- package/dist/solutions-components/{p-b739f26d.entry.js → p-053effee.entry.js} +1 -1
- package/dist/solutions-components/{p-af573e0d.js → p-09543b4e.js} +1 -1
- package/dist/solutions-components/p-1b1ff60a.entry.js +6 -0
- package/dist/solutions-components/{p-e4107150.entry.js → p-2291bf3f.entry.js} +1 -1
- package/dist/solutions-components/p-2cf41651.entry.js +6 -0
- package/dist/solutions-components/{p-fe3aea1a.entry.js → p-351c7cbf.entry.js} +1 -1
- package/dist/solutions-components/{p-90fc786f.entry.js → p-3d999f0f.entry.js} +1 -1
- package/dist/solutions-components/p-3fe6c230.entry.js +6 -0
- package/dist/solutions-components/p-4695cfab.js +6 -0
- package/dist/solutions-components/{p-43699470.entry.js → p-499489c5.entry.js} +1 -1
- package/dist/solutions-components/{p-5ff711ee.js → p-5104cc98.js} +1 -1
- package/dist/solutions-components/p-5e694bcc.entry.js +29 -0
- package/dist/solutions-components/{p-cbb86cf2.entry.js → p-6a3f2249.entry.js} +1 -1
- package/dist/solutions-components/{p-a7f56b28.entry.js → p-6e5ea1cb.entry.js} +1 -1
- package/dist/solutions-components/{p-9c170b30.entry.js → p-76a1236d.entry.js} +1 -1
- package/dist/solutions-components/{p-1e14b3d0.entry.js → p-78b6d3fe.entry.js} +1 -1
- package/dist/solutions-components/{p-c48be45f.entry.js → p-8a1a0f9b.entry.js} +1 -1
- package/dist/solutions-components/{p-5cbf3eed.entry.js → p-8d4a4498.entry.js} +1 -1
- package/dist/solutions-components/{p-4a02fd45.entry.js → p-9d9e0e74.entry.js} +1 -1
- package/dist/solutions-components/{p-50fb7f47.js → p-b49e1a78.js} +1 -1
- package/dist/solutions-components/{p-c551ffc5.entry.js → p-c399f2b8.entry.js} +1 -1
- package/dist/solutions-components/p-cb27611e.entry.js +6 -0
- package/dist/solutions-components/{p-4cd4cb85.js → p-d001e961.js} +1 -1
- package/dist/solutions-components/{p-523dcf4b.entry.js → p-d37a68f7.entry.js} +1 -1
- package/dist/solutions-components/{p-a2cf9fdc.entry.js → p-db7d5db8.entry.js} +1 -1
- package/dist/solutions-components/{p-6438d1ea.entry.js → p-e29e57db.entry.js} +1 -1
- package/dist/solutions-components/{p-a5b751e2.entry.js → p-e625aa69.entry.js} +1 -1
- package/dist/solutions-components/{p-2542d5c9.entry.js → p-e9fcc194.entry.js} +1 -1
- package/dist/solutions-components/{p-374ddead.entry.js → p-f4880179.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +43 -17
- package/package.json +7 -7
- package/dist/solutions-components/p-3fc18283.entry.js +0 -6
- package/dist/solutions-components/p-442dd59c.entry.js +0 -6
- package/dist/solutions-components/p-5585dcd3.entry.js +0 -6
- package/dist/solutions-components/p-953afbb3.entry.js +0 -29
- package/dist/solutions-components/p-ceb1030b.js +0 -6
- package/dist/solutions-components/p-f728af86.entry.js +0 -6
@@ -1,6 +0,0 @@
|
|
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 a,c as t,h as n,H as s,F as e,g as r}from"./p-4e6eb06e.js";import{i,g as l,a as o,s as c,E as p,b as g,l as u,c as d,u as h}from"./p-50fb7f47.js";import{l as m}from"./p-4cd4cb85.js";import{c as v}from"./p-5ff711ee.js";import{g as _,f as b,L as y}from"./p-ceb1030b.js";import"./p-dc9d4be3.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";const f="instant-apps-language-translator",x={BASE:f,header:`${f}__header`,headerText:`${f}__header-text`,savingIndicator:`${f}__saving-indicator`,closeButton:`${f}__close-button`,headerTip:`${f}__header-tip`,topBar:`${f}__top-bar`,topBarSection:`${f}__top-bar-section`,collapseSearchContainer:`${f}__collapse-search-container`,userLangText:`${f}__user-lang-text`,lastItem:`${f}--last-item`,writingIcon:`${f}__writing-icon`,primaryContent:`${f}__primary-content`,lastAutoSave:`${f}__last-auto-save`},w=class{constructor(n){a(this,n),this.translatorDataUpdated=t(this,"translatorDataUpdated",7),this.portalItem=void 0,this.appSettings=void 0,this.locales=void 0,this.open=!1,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0,this.saving=!1,this.messages=void 0,this.isCollapse=!0}handleT9nItemUpdate(){this.translatorDataUpdated.emit()}handleLocaleChange(){this.initUIData(),this.initSelectLanguage()}handleAppSettings(){this.initUIData(),this.initSelectLanguage()}componentWillLoad(){i()}async componentDidLoad(){this.initialize()}async initialize(){const[a,t]=await m(["esri/intl","esri/request"]);this.intl=a,this.request=t,await this.initMessages(),this.initUIData(),this.initPortalItemResourceT9nData(),this.initSelectLanguage()}async initMessages(){try{const{el:a}=this,t=await l(a);return this.messages=t,Promise.resolve()}catch(a){return Promise.reject()}}initUIData(){const{appSettings:a,locales:t}=this,n=o(a,t);c.set("uiData",n)}initSelectLanguage(){var a,t;if(!this.intl)return;const{locales:n}=this,s=null!==(t=null===(a=null==n?void 0:n[0])||void 0===a?void 0:a.locale)&&void 0!==t?t:this.intl.getLocale(),e=c.get("currentLanguage");0===this.locales.filter((a=>a.locale===e)).length&&c.set("currentLanguage",s)}async initPortalItemResourceT9nData(){try{const a=await _(this.portalItem);c.set("portalItemResource",a);const t=await b(this.request,a);c.set("lastSave",t.lastSave),c.set("portalItemResourceT9n",null!=t?t:{})}catch(a){}}render(){return n(s,{key:"1f68786d3e9bced7a2242033cf51fc4937bc910a"},this.renderModal(),this.renderPopoverTip())}renderModal(){return n("calcite-modal",{open:this.open,scale:"l",fullscreen:!0,onCalciteModalClose:this.close.bind(this)},this.renderHeader(),this.renderContent(),this.renderPrimaryContent())}renderPopoverTip(){var a;return n("calcite-popover",{label:"",referenceElement:"headerTip",placement:"trailing","auto-close":!0,closable:!0},n("div",{class:x.headerTip},null===(a=this.messages)||void 0===a?void 0:a.headerTip))}renderHeader(){return n("header",{class:x.header,slot:"header"},this.renderHeaderText())}renderHeaderText(){const{messages:a}=this;return n("div",{class:x.headerText},n("span",null,null==a?void 0:a.header),n("calcite-button",{id:"headerTip",appearance:"transparent"},n("calcite-icon",{icon:p.Popover,scale:"s"})))}renderSavingIndicator(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.saving;return n("div",{class:x.savingIndicator},n("calcite-loader",{label:t,inline:!0}),n("span",null,t))}renderContent(){const a=g(this.locales);return n("div",{slot:"content"},this.renderTopBar(),(null==a?void 0:a.length)>0?this.renderUIData():this.renderNotice())}renderTopBar(){return n("div",{class:x.topBar},this.renderLeadingTopBarSection(),this.renderTrailingTopBarSection())}renderLeadingTopBarSection(){return n("div",{class:x.topBarSection},this.renderUserLocale(),this.renderCollapseSearchContainer())}renderUserLocale(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.languages,s=v();return n("div",{class:x.userLangText},null==t?void 0:t[s])}renderCollapseSearchContainer(){return n("div",{class:x.collapseSearchContainer},this.renderExpandCollapseButton(),this.renderSearch())}renderExpandCollapseButton(){const{isCollapse:a,messages:t}=this,s=a?null==t?void 0:t.collapseAll:null==t?void 0:t.expandAll;return n(e,null,n("slot",{name:"primary-custom-action"}),n("slot",{name:"secondary-custom-action"}),n("calcite-button",{onClick:this.handleExpandCollapseAll.bind(this),appearance:"transparent","icon-start":p.ExpandCollapse},s))}renderSearch(){var a;return n("instant-apps-language-translator-search",{onSuggestionSelected:this.onSuggestionSelect.bind(this),t9nPlaceholder:null===(a=this.messages)||void 0===a?void 0:a.searchPlaceholder})}renderTrailingTopBarSection(){return n("div",{class:x.topBarSection},this.renderLanguageSelection(),n("slot",{name:"translation-custom-action"}))}renderLanguageSelection(){var a;return n("calcite-label",{layout:"inline"},null===(a=this.messages)||void 0===a?void 0:a.translatedLanguage,n("calcite-select",{label:"",onCalciteSelectChange:this.handleLanguageSelection.bind(this)},this.renderTranslatedLangOptions()))}renderTranslatedLangOptions(){const a=c.get("uiData"),t=null==a?void 0:a.get("locales"),s=g(t),e=Object.keys(y.partial);return null==s?void 0:s.map((a=>{const t=-1!==e.indexOf(a),s=y[t?"partial":"full"],{language:r,translated:i}=s[a];return n("calcite-option",{key:`translated-lang-option-${a}`,value:a},`${r} - ${i}`)}))}renderUIData(){if(!(null==u?void 0:u.uiData))return;const a=d();return n("div",null,null==a?void 0:a.map(((t,n)=>this.renderUIDataItem(t,n,a.length))))}renderNotice(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.noLanguage;return n("calcite-notice",{open:!0,icon:"exclamation-mark-triangle",kind:"warning"},n("div",{slot:"title"},null==t?void 0:t.title),n("div",{slot:"message"},null==t?void 0:t.message))}renderUIDataItem(a,t,s){var e,r;const i=null===(r=null===(e=this.appSettings)||void 0===e?void 0:e.translatedLanguageLabels)||void 0===r?void 0:r[u.currentLanguage],l=`${t===s-1?x.lastItem:""}`,o=this.appSettings.content.filter((t=>t.id===a))[0];return n("instant-apps-language-translator-item",{key:`${a}-${t}`,class:l,fieldName:a,translatedLanguageLabels:i,setting:o,userLocaleInputOnChangeCallback:async(a,t)=>{try{await this.userLocaleInputOnChangeCallback(a,t);const n=c.get("portalItemResource");h(n)}catch(a){}},translatedLocaleInputOnChangeCallback:async(a,t,n,s)=>{try{await this.translatedLocaleInputOnChangeCallback(a,t,n,s),h(s)}catch(a){}}})}renderPrimaryContent(){var a,t;return n("div",{class:x.primaryContent,slot:"primary"},c.get("saving")?this.renderSavingIndicator():null,c.get("lastSave")?n("span",{key:"last-save",class:x.lastAutoSave},null===(a=this.messages)||void 0===a?void 0:a.lastAutoSave," ",this.intl.formatDate(c.get("lastSave"))):null,n("calcite-button",{onClick:()=>this.open=!1,class:x.closeButton},null===(t=this.messages)||void 0===t?void 0:t.close))}handleExpandCollapseAll(){this.isCollapse=!this.isCollapse;const a=new Map(u.uiData);d().forEach((t=>a.get(t).expanded=this.isCollapse)),c.set("uiData",a)}onSuggestionSelect(a){const t=a.detail,n=new Map(u.uiData);d().forEach((a=>{n.get(a).selected=a===t})),c.set("uiData",n)}close(){this.open=!1}handleLanguageSelection(a){c.set("currentLanguage",a.target.value)}async getTranslationData(){return c.get("portalItemResourceT9n")}async setTranslationData(a){return c.set("portalItemResourceT9n",a)}async getPortalItemResource(){return c.get("portalItemResource")}async batchWriteToPortalItemResource(a){c.set("saving",!0);try{const t=await this.getPortalItemResource(),n=Date.now();c.set("lastSave",n);const s=JSON.stringify(Object.assign(Object.assign({},a),{lastSave:n})),e=new Blob([s],{type:"application/json"});return await t.update(e),setTimeout((()=>c.set("saving",!1)),1500),this.translatorDataUpdated.emit(),Promise.resolve()}catch(a){return console.error("Error writing to portal item resource: ",a),c.set("saving",!1),Promise.reject()}}get el(){return r(this)}static get watchers(){return{locales:["handleLocaleChange"],appSettings:["handleAppSettings"]}}};w.style=".sc-instant-apps-language-translator-h{display:block}.sc-instant-apps-language-translator-h calcite-modal.sc-instant-apps-language-translator{--calcite-modal-content-padding:0}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header.sc-instant-apps-language-translator{display:flex;justify-content:space-between;width:100%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-text.sc-instant-apps-language-translator{font-size:18px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__saving-indicator.sc-instant-apps-language-translator{display:flex;align-items:center;font-size:14.5px;color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__writing-icon.sc-instant-apps-language-translator{display:flex;justify-content:center;align-items:center;margin-right:5px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__close-button.sc-instant-apps-language-translator{width:175px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-tip.sc-instant-apps-language-translator{padding:20px;max-width:45vw}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator{display:flex;width:100%;position:sticky;top:0;background:var(--calcite-color-foreground-1);z-index:1}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator calcite-label.sc-instant-apps-language-translator{--calcite-label-margin-bottom:0;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator{box-sizing:border-box;display:flex;align-items:center;width:50%;padding:0.5%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__user-lang-text.sc-instant-apps-language-translator{font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:first-child{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:nth-child(2) calcite-select.sc-instant-apps-language-translator{width:255px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator calcite-input.sc-instant-apps-language-translator{width:300px;margin-left:30px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__primary-content.sc-instant-apps-language-translator{display:flex;align-items:center}.sc-instant-apps-language-translator-h .instant-apps-language-translator__primary-content.sc-instant-apps-language-translator .instant-apps-language-translator__close-button.sc-instant-apps-language-translator,.sc-instant-apps-language-translator-h .instant-apps-language-translator__primary-content.sc-instant-apps-language-translator .instant-apps-language-translator__saving-indicator.sc-instant-apps-language-translator,.sc-instant-apps-language-translator-h .instant-apps-language-translator__primary-content.sc-instant-apps-language-translator .instant-apps-language-translator__last-auto-save.sc-instant-apps-language-translator{margin-right:20px}.ck.ck-reset.ck-editor.ck-rounded-corners.sc-instant-apps-language-translator{margin-top:10px !important;margin-left:55px !important}.ck-editor__editable.sc-instant-apps-language-translator{height:70px !important;font-size:0.875rem !important;line-height:1.375 !important}.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:first-child,.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:last-child{--ck-spacing-large:0.5rem !important}html[dir=rtl] .sc-instant-apps-language-translator-h .instant-apps-language-translator__primary-content.sc-instant-apps-language-translator .instant-apps-language-translator__close-button.sc-instant-apps-language-translator,html[dir=rtl] .sc-instant-apps-language-translator-h .instant-apps-language-translator__primary-content.sc-instant-apps-language-translator .instant-apps-language-translator__saving-indicator.sc-instant-apps-language-translator,html[dir=rtl] .sc-instant-apps-language-translator-h .instant-apps-language-translator__primary-content.sc-instant-apps-language-translator .instant-apps-language-translator__last-auto-save.sc-instant-apps-language-translator{margin-right:unset;margin-left:20px}";export{w as instant_apps_language_translator}
|