@aquera/nile-elements 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.d.ts +17 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.js +18 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +14 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.d.ts +15 -4
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js +111 -51
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +3 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +9 -6
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +31 -18
- package/dist/internal/enum.cjs.js +2 -0
- package/dist/internal/enum.cjs.js.map +1 -0
- package/dist/internal/enum.esm.js +1 -0
- package/dist/nile-content-editor/index.cjs.js +1 -1
- package/dist/nile-content-editor/index.esm.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.esm.js +14 -3
- package/dist/nile-content-editor/nile-content-editor.esm.js +13 -12
- package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
- package/dist/nile-switcher/nile-switcher.esm.js +9 -8
- package/dist/src/internal/enum.d.ts +17 -0
- package/dist/src/internal/enum.js +18 -0
- package/dist/src/internal/enum.js.map +1 -0
- package/dist/src/nile-content-editor/nile-content-editor.css.js +14 -3
- package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
- package/dist/src/nile-content-editor/nile-content-editor.d.ts +15 -4
- package/dist/src/nile-content-editor/nile-content-editor.js +111 -51
- package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
- package/dist/src/nile-switcher/nile-switcher.d.ts +3 -1
- package/dist/src/nile-switcher/nile-switcher.js +9 -6
- package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/internal/enum.ts +17 -0
- package/src/nile-content-editor/nile-content-editor.css.ts +14 -3
- package/src/nile-content-editor/nile-content-editor.ts +123 -59
- package/src/nile-switcher/nile-switcher.ts +12 -6
package/dist/index.iife.js
CHANGED
@@ -4436,20 +4436,21 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
|
|
4436
4436
|
@change=${M=>{this.handleChange(M,N,I)}}
|
4437
4437
|
>
|
4438
4438
|
${D&&D.map((M=>V`<nile-radio .value="${M}">${M} </nile-radio>`))}
|
4439
|
-
</nile-radio-group>`}renderContentEditor(M,N){const{value:D,options:i,inputType:j,errorMessage:I,type:g}=M;return V`<nile-content-editor
|
4439
|
+
</nile-radio-group>`}renderContentEditor(M,N){const{value:D,options:i,inputType:j,errorMessage:I,type:g,readonly:u}=M;return V`<nile-content-editor
|
4440
4440
|
.value=${D}
|
4441
4441
|
.options=${i}
|
4442
4442
|
.type =${g}
|
4443
|
+
.readonly=${u}
|
4443
4444
|
.errorMessage=${I}
|
4444
4445
|
@nile-change=${M=>{this.handleChange(M,N,j)}}
|
4445
4446
|
>
|
4446
4447
|
</nile-radio-group>`}handleChange(M,N,D){D===JD.CHECKBOX?this.nileSwitchConfig[N].value=M.detail.checked:this.nileSwitchConfig[N].value=M.detail.value,M.stopPropagation(),this.emit("nile-change",{config:this.nileSwitchConfig})}renderIcon(){const M=this.nileSwitchConfig.toggleSwitch?"stringinput":"header-functions";return V`<nile-icon
|
4447
4448
|
size="14"
|
4448
|
-
class=${wM({"pointer-cursor":!0,"flex-start"
|
4449
|
+
class=${wM({"pointer-cursor":!0,"flex-start":!0})}
|
4449
4450
|
.name=${M}
|
4450
4451
|
color="#005EA6"
|
4451
4452
|
@click=${this.toggleField}
|
4452
|
-
></nile-icon>`}toggleField(){this.nileSwitchConfig={...this.nileSwitchConfig,toggleSwitch:!this.nileSwitchConfig.toggleSwitch},this.emit("nile-switch",{config:this.nileSwitchConfig})}singleFieldSwitcher(M,N,D,i){const j=M.inputType,I=N.inputType;return V`
|
4453
|
+
></nile-icon>`}toggleField(){this.nileSwitchConfig.confirmation||(this.nileSwitchConfig={...this.nileSwitchConfig,toggleSwitch:!this.nileSwitchConfig.toggleSwitch}),this.emit("nile-switch",{config:this.nileSwitchConfig})}singleFieldSwitcher(M,N,D,i){const j=M.inputType,I=N.inputType;return V`
|
4453
4454
|
${D?HD(I,[[JD.TEXTAREA,()=>this.renderNileTextArea(N,FD.SWITCH)],[JD.TEXT,()=>this.renderNileText(N,FD.SWITCH)],[JD.CONTENTEDITOR,()=>this.renderContentEditor(N,FD.SWITCH)]],(()=>this.renderNileTextArea(N,FD.SWITCH))):HD(j,[[JD.TEXT,()=>this.renderNileText(M,FD.DEFAULT)],[JD.CHECKBOX,()=>this.renderNileCheckBox(M,FD.DEFAULT)],[JD.TEXTAREA,()=>this.renderNileTextArea(M,FD.DEFAULT)],[JD.RADIO,()=>this.renderNileRadio(M,FD.DEFAULT)],[JD.DROPDOWN,()=>this.renderDropdown(this.nileSwitchConfig.defaultInput,FD.DEFAULT)],[JD.CONTENTEDITOR,()=>this.renderContentEditor(this.nileSwitchConfig.defaultInput,FD.DEFAULT)]],(()=>this.renderNileText(M,FD.DEFAULT)))}
|
4454
4455
|
${i?"":this.renderIcon()}
|
4455
4456
|
`}render(){const{toggleSwitch:M,defaultInput:N,switchInput:D,disable:i}=this.nileSwitchConfig;return V`<div class="input-container">
|
@@ -4458,6 +4459,7 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
|
|
4458
4459
|
:host {
|
4459
4460
|
width: 100%;
|
4460
4461
|
box-sizing: border-box;
|
4462
|
+
font-size: 14px;
|
4461
4463
|
}
|
4462
4464
|
|
4463
4465
|
.content-editable-wrapper {
|
@@ -4493,21 +4495,30 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
|
|
4493
4495
|
border-color: #e5434d;
|
4494
4496
|
}
|
4495
4497
|
|
4498
|
+
.read-only {
|
4499
|
+
cursor: not-allowed;
|
4500
|
+
}
|
4501
|
+
|
4496
4502
|
.chips {
|
4503
|
+
display: inline;
|
4497
4504
|
background: #e5e9eb;
|
4498
4505
|
color: #000;
|
4499
4506
|
border-radius: 4px;
|
4500
4507
|
padding: 6px;
|
4508
|
+
height: 24px;
|
4509
|
+
line-height: 10px;
|
4501
4510
|
margin-left: 3px;
|
4502
|
-
display: inline;
|
4503
4511
|
letter-spacing: 0.2px;
|
4504
4512
|
}
|
4505
4513
|
|
4506
4514
|
.text-area {
|
4507
4515
|
height: 120px;
|
4508
|
-
white-space: pre-wrap;
|
4509
4516
|
overflow: scroll;
|
4510
|
-
line-height:
|
4517
|
+
line-height: 26px;
|
4518
|
+
}
|
4519
|
+
|
4520
|
+
.text-area .chips {
|
4521
|
+
padding: 4px 8px;
|
4511
4522
|
}
|
4512
4523
|
|
4513
4524
|
.chip-error {
|
@@ -4518,6 +4529,7 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
|
|
4518
4529
|
background-color: #ffffff;
|
4519
4530
|
border: 1px solid #c7ced4;
|
4520
4531
|
overflow: auto;
|
4532
|
+
max-height: 150px;
|
4521
4533
|
}
|
4522
4534
|
|
4523
4535
|
label {
|
@@ -4529,32 +4541,33 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
|
|
4529
4541
|
.asterik {
|
4530
4542
|
color: #e5434d;
|
4531
4543
|
}
|
4532
|
-
|
4533
|
-
class="${wM({"nile-options-container":!0,"dropdown-position":"text-area"===this.type})}
|
4544
|
+
`,XD="Enter",_D="Escape";M.NileContentEditor=class extends BM{constructor(){super(...arguments),this.value="",this.showLabel=!0,this.labelText="",this.type="text|text-area",this.required=!0,this.openDropdown=!1,this.tagIdentifier="$",this.filteredValue="",this.helpText="",this.readonly=!1,this.errorMessage="",this.error=!1}connectedCallback(){this.handleOutsideClick=this.handleOutsideClick.bind(this),super.connectedCallback(),this.emit("nile-init"),this.addOpenListeners(),this.setInitialValues()}setInitialValues(){this.updateComplete.then((M=>{M&&this.value&&(this.contentEditor.innerHTML=this.generateHTMLTagsWithValues(this.value))}))}addOpenListeners(){window.addEventListener("click",this.handleOutsideClick)}removeOpenListeners(){window.removeEventListener("click",this.handleOutsideClick)}toggleDropdown(M){this.openDropdown=M}handleOutsideClick(M){M&&M.target&&this.toggleDropdown(!1)}handleTypeChange(){this.contentEditor.innerHTML=this.generateHTMLTagsWithValues(this.value)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.emit("nile-destroy")}handlePaste(M){if(M.preventDefault(),M.clipboardData){let N=M.clipboardData.getData("text/plain");document.execCommand("insertText",!1,N)}this.emitInputChange()}handlekeyDown(M){if(M.code!==XD||"text"!==this.type)return M.code===_D?(M.preventDefault(),void this.toggleDropdown(!1)):void setTimeout((()=>{const M=this.contentEditor.innerText;this.emitInputChange(),M.includes(this.tagIdentifier)?(this.toggleDropdown(!0),this.filterOptions()):this.toggleDropdown(!1)}));M.preventDefault()}filterOptions(){this.filteredOptions=this.options,this.options.length&&this.filteredValue?this.filteredOptions=this.options.filter((M=>M.startsWith(this.filteredValue))):this.filteredOptions=this.options}generateValuesFromHTMLTags(M){return M.replace(/<span class="chips(?: chip-error)?" contenteditable="false">(.*?)<\/span>/g,((M,N)=>"{{"+N+"}}"))}generateHTMLTagsWithValues(M){return M.replace(/{{(.*?)}}/g,((M,N)=>this.options.includes(N)?'<span class="chips" contenteditable="false">'+N+"</span>":'<span class="chips chip-error" contenteditable="false">'+N+"</span>"))}emitInputChange(){if(this.contentEditor){let M=this.contentEditor.innerHTML;""!==this.contentEditor.innerText&&(M=this.generateValuesFromHTMLTags(M)),M=M.replace(/ /g," "),M="<br>"===M?"":M?.trim(),this.emit("nile-change",{value:this.generateValuesFromHTMLTags(M)})}}insertNodes(M,N,D){Array.from(N).map(((N,i)=>{N.hasChildNodes()?this.insertNodes(N,N.childNodes,D):N.nodeValue?.includes(this.tagIdentifier)&&(M.childNodes[i].nodeValue=N.nodeValue?.replace(this.tagIdentifier+this.filteredValue,""),M.childNodes[i].after(D))}))}handleOptions(M){this.toggleDropdown(!1);let N=document.createElement("span");N.setAttribute("class","chips"),N.setAttribute("contentEditable","false"),N.innerText=M,this.insertNodes(this.contentEditor,this.contentEditor.childNodes,N),this.filteredOptions=this.options,this.filteredValue="",this.emitInputChange()}renderAutoOptions(){return V`<div
|
4545
|
+
class="${wM({"nile-options-container":!0,"dropdown-position":"text-area"===this.type})}"
|
4534
4546
|
>
|
4535
|
-
${this.
|
4547
|
+
${this.filteredOptions&&this.filteredOptions.map((M=>V` <nile-option
|
4536
4548
|
.value="${M}"
|
4537
4549
|
@click="${N=>{this.handleOptions(M)}}"
|
4538
4550
|
>${M}
|
4539
4551
|
</nile-option>`))}
|
4540
|
-
</div>`}render(){const M=!!this.helpText,N=!!this.errorMessage,
|
4552
|
+
</div>`}render(){const M=!!this.helpText,N=!!this.error,D=!!this.errorMessage,i=!!this.readonly,j=this.type;return V`
|
4541
4553
|
<nile-popup
|
4542
|
-
.active="${this.openDropdown}"
|
4554
|
+
.active="${FM(this.openDropdown)}"
|
4543
4555
|
sync="width"
|
4544
4556
|
placement="bottom"
|
4545
4557
|
class=${wM({dropdown:!0,"dropdown--open":!0,popup:!0})}
|
4546
4558
|
>
|
4547
4559
|
<div class="content-editable-wrapper" slot="anchor">
|
4548
|
-
${this.showLabel&&this.labelText?V`<label class="ods-label">${this.labelText} </label> ${this.required?V`<
|
4560
|
+
${this.showLabel&&this.labelText?V`<label class="ods-label">${this.labelText} </label> ${this.required?V`<sapn class="asterik">*</span>`:""}`:""}
|
4549
4561
|
<div
|
4550
|
-
contenteditable="
|
4551
|
-
class=${wM({"content-editable-input":!0,error:N,"text-area":"text-area"===
|
4562
|
+
contenteditable="${!i}"
|
4563
|
+
class=${wM({"content-editable-input":!0,error:N||D,"read-only":i,"text-area":"text-area"===j})}
|
4552
4564
|
@keydown=${this.handlekeyDown}
|
4565
|
+
@paste=${this.handlePaste}
|
4553
4566
|
></div>
|
4554
4567
|
${M?V`
|
4555
4568
|
<nile-form-help-text>${this.helpText}</nile-form-help-text>
|
4556
4569
|
`:""}
|
4557
|
-
${
|
4570
|
+
${D?V`
|
4558
4571
|
<nile-form-error-message
|
4559
4572
|
>${this.errorMessage}</nile-form-error-message
|
4560
4573
|
>
|
@@ -4563,7 +4576,7 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
|
|
4563
4576
|
|
4564
4577
|
${this.renderAutoOptions()}
|
4565
4578
|
</nile-popup>
|
4566
|
-
`}},M.NileContentEditor.styles=fD,N([zM()],M.NileContentEditor.prototype,"value",void 0),N([zM()],M.NileContentEditor.prototype,"options",void 0),N([zM()],M.NileContentEditor.prototype,"showLabel",void 0),N([zM()],M.NileContentEditor.prototype,"labelText",void 0),N([zM()],M.NileContentEditor.prototype,"type",void 0),N([zM()],M.NileContentEditor.prototype,"required",void 0),N([yM(".content-editable-input")],M.NileContentEditor.prototype,"
|
4579
|
+
`}},M.NileContentEditor.styles=fD,N([zM()],M.NileContentEditor.prototype,"value",void 0),N([zM()],M.NileContentEditor.prototype,"options",void 0),N([zM()],M.NileContentEditor.prototype,"filteredOptions",void 0),N([zM()],M.NileContentEditor.prototype,"showLabel",void 0),N([zM()],M.NileContentEditor.prototype,"labelText",void 0),N([zM()],M.NileContentEditor.prototype,"type",void 0),N([zM()],M.NileContentEditor.prototype,"required",void 0),N([yM(".content-editable-input")],M.NileContentEditor.prototype,"contentEditor",void 0),N([yM(".nile-options-container")],M.NileContentEditor.prototype,"autoOptions",void 0),N([tM()],M.NileContentEditor.prototype,"openDropdown",void 0),N([zM({attribute:"help-text"})],M.NileContentEditor.prototype,"helpText",void 0),N([zM({attribute:"readonly"})],M.NileContentEditor.prototype,"readonly",void 0),N([zM({attribute:"error-message"})],M.NileContentEditor.prototype,"errorMessage",void 0),N([zM({attribute:"error"})],M.NileContentEditor.prototype,"error",void 0),N([vM("type",{waitUntilFirstUpdate:!0})],M.NileContentEditor.prototype,"handleTypeChange",null),M.NileContentEditor=N([uM("nile-content-editor")],M.NileContentEditor);const $D=u`
|
4567
4580
|
:host {
|
4568
4581
|
--width: 31rem;
|
4569
4582
|
--header-spacing: 1.25rem;
|
@@ -4702,7 +4715,7 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
|
|
4702
4715
|
border: solid 1px hsl(240, 5.9%, 11%);
|
4703
4716
|
}
|
4704
4717
|
}
|
4705
|
-
`;let
|
4718
|
+
`;let KD=[];class qD{constructor(M){this.tabDirection="forward",this.element=M,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){KD.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){KD=KD.filter((M=>M!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return KD[KD.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:M,end:N}=UD(this.element),D="forward"===this.tabDirection?M:N;"function"==typeof D?.focus&&D.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(M){"Tab"===M.key&&M.shiftKey&&(this.tabDirection="backward",requestAnimationFrame((()=>this.checkFocus())))}handleKeyUp(){this.tabDirection="forward"}}M.NileDialog=class extends BM{constructor(){super(...arguments),this.hasSlotController=new YM(this,"footer"),this.open=!1,this.label="",this.noHeader=!1,this.preventOverlayClose=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new qD(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),ED(this))}disconnectedCallback(){super.disconnectedCallback(),SD(this)}requestClose(M){const N=this.emit("nile-request-close",{cancelable:!0,detail:{source:M}});if("close-button"!==M)if(N.defaultPrevented||this.preventOverlayClose){const M=yD(this,"dialog.denyClose",{dir:"right"});ID(this.panel,M.keyframes,M.options)}else this.hide();else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(M){this.open&&"Escape"===M.key&&(M.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("nile-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),ED(this);const M=this.querySelector("[autofocus]");M&&M.removeAttribute("autofocus"),await Promise.all([LD(this.dialog),LD(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("nile-initial-focus",{cancelable:!0}).defaultPrevented||(M?M.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),M&&M.setAttribute("autofocus","")}));const N=yD(this,"dialog.show",{dir:"right"}),D=yD(this,"dialog.overlay.show",{dir:"right"});await Promise.all([ID(this.panel,N.keyframes,N.options),ID(this.overlay,D.keyframes,D.options)]),this.emit("nile-after-show")}else{this.emit("nile-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([LD(this.dialog),LD(this.overlay)]);const M=yD(this,"dialog.hide",{dir:"right"}),N=yD(this,"dialog.overlay.hide",{dir:"right"});await Promise.all([ID(this.overlay,N.keyframes,N.options).then((()=>{this.overlay.hidden=!0})),ID(this.panel,M.keyframes,M.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,SD(this);const D=this.originalTrigger;"function"==typeof D?.focus&&setTimeout((()=>D.focus())),this.emit("nile-after-hide")}}async show(){if(!this.open)return this.open=!0,cD(this,"nile-after-show")}async hide(){if(this.open)return this.open=!1,cD(this,"nile-after-hide")}render(){return V`
|
4706
4719
|
<div
|
4707
4720
|
part="base"
|
4708
4721
|
class=${wM({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer")})}
|
@@ -4746,4 +4759,4 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
|
|
4746
4759
|
</footer>
|
4747
4760
|
</div>
|
4748
4761
|
</div>
|
4749
|
-
`}},M.NileDialog.styles
|
4762
|
+
`}},M.NileDialog.styles=$D,N([yM(".dialog")],M.NileDialog.prototype,"dialog",void 0),N([yM(".dialog__panel")],M.NileDialog.prototype,"panel",void 0),N([yM(".dialog__overlay")],M.NileDialog.prototype,"overlay",void 0),N([zM({type:Boolean,reflect:!0})],M.NileDialog.prototype,"open",void 0),N([zM({reflect:!0})],M.NileDialog.prototype,"label",void 0),N([zM({type:Boolean,reflect:!0})],M.NileDialog.prototype,"noHeader",void 0),N([zM({type:Boolean,reflect:!0})],M.NileDialog.prototype,"preventOverlayClose",void 0),N([vM("open",{waitUntilFirstUpdate:!0})],M.NileDialog.prototype,"handleOpenChange",null),M.NileDialog=N([uM("nile-dialog")],M.NileDialog),AD("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),AD("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),AD("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),AD("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),AD("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}})}({});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register([],function(_export,_context){"use strict";var A;return{setters:[],execute:function(){_export("K",A={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",SHIFT:"ShiftLeft",CTRL:"ControlLeft",ESCAPE:"Escape",SPACE:"Space",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown"});}};});
|
2
|
+
//# sourceMappingURL=enum.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enum.cjs.js","sources":["../../../src/internal/enum.ts"],"sourcesContent":["export const KeyCode = {\n BACKSPACE: 'Backspace',\n TAB: 'Tab',\n ENTER: 'Enter',\n SHIFT: 'ShiftLeft', // or 'ShiftRight'\n CTRL: 'ControlLeft', // or 'ControlRight'\n ESCAPE: 'Escape',\n SPACE: 'Space',\n PAGE_UP: 'PageUp',\n PAGE_DOWN: 'PageDown',\n END: 'End',\n HOME: 'Home',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_UP: 'ArrowUp',\n ARROW_RIGHT: 'ArrowRight',\n ARROW_DOWN: 'ArrowDown',\n};\n"],"names":["KeyCode","BACKSPACE","TAB","ENTER","SHIFT","CTRL","ESCAPE","SPACE","PAGE_UP","PAGE_DOWN","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN"],"mappings":"kHAAaA,CAAU,CAAA,CACrBC,SAAW,CAAA,WAAA,CACXC,GAAK,CAAA,KAAA,CACLC,KAAO,CAAA,OAAA,CACPC,KAAO,CAAA,WAAA,CACPC,IAAM,CAAA,aAAA,CACNC,OAAQ,QACRC,CAAAA,KAAAA,CAAO,OACPC,CAAAA,OAAAA,CAAS,QACTC,CAAAA,SAAAA,CAAW,UACXC,CAAAA,GAAAA,CAAK,MACLC,IAAM,CAAA,MAAA,CACNC,UAAY,CAAA,WAAA,CACZC,QAAU,CAAA,SAAA,CACVC,WAAa,CAAA,YAAA,CACbC,WAAY"}
|
@@ -0,0 +1 @@
|
|
1
|
+
const A={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",SHIFT:"ShiftLeft",CTRL:"ControlLeft",ESCAPE:"Escape",SPACE:"Space",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown"};export{A as K};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["./nile-content-editor.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-content-editor.css.cjs.js","lit/directives/class-map.js","../internal/nile-element.cjs.js","lit","../internal/watch.cjs.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileContentEditorCjsJs){_export("NileContentEditor",_nileContentEditorCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileContentEditorCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalNileElementCjsJs){},function(_lit){},function(_internalWatchCjsJs){},function(_property002CjsJs){}],execute:function(){}};});
|
1
|
+
System.register(["./nile-content-editor.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-content-editor.css.cjs.js","lit/directives/class-map.js","../internal/nile-element.cjs.js","lit","../internal/watch.cjs.js","../internal/enum.cjs.js","lit/directives/live.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileContentEditorCjsJs){_export("NileContentEditor",_nileContentEditorCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileContentEditorCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalNileElementCjsJs){},function(_lit){},function(_internalWatchCjsJs){},function(_internalEnumCjsJs){},function(_litDirectivesLiveJs){},function(_property002CjsJs){}],execute:function(){}};});
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
export{N as NileContentEditor}from"./nile-content-editor.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-content-editor.css.esm.js";import"lit/directives/class-map.js";import"../internal/nile-element.esm.js";import"lit";import"../internal/watch.esm.js";import"../property-09139d3c.esm.js";
|
1
|
+
export{N as NileContentEditor}from"./nile-content-editor.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-content-editor.css.esm.js";import"lit/directives/class-map.js";import"../internal/nile-element.esm.js";import"lit";import"../internal/watch.esm.js";import"../internal/enum.esm.js";import"lit/directives/live.js";import"../property-09139d3c.esm.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-content-editor.css.cjs.js","lit/directives/class-map.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var t,e,s,i,n,o,r,a,h,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,p;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(typeof e+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw new Error("illegal catch attempt");},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){e=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;i=_litDecoratorsJs.state;n=_litDecoratorsJs.customElement;},function(_nileContentEditorCssCjsJs){o=_nileContentEditorCssCjsJs.s;},function(_litDirectivesClassMapJs){r=_litDirectivesClassMapJs.classMap;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){h=_internalWatchCjsJs.w;},function(_property002CjsJs){l=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",p=/*#__PURE__*/function(_a){_inherits(p,_a);var _super=_createSuper(p);function p(){var _this;_classCallCheck(this,p);_this=_super.apply(this,arguments),_this.value="",_this.showLabel=!0,_this.labelText="",_this.type="text|text-area",_this.required=!0,_this.openDropdown=!1,_this.helpText="",_this.errorMessage="",_this.moveCursorToEnd=function(){var t=document.createRange(),e=window.getSelection();t.setStart(_this.input,_this.input.childNodes.length),t.collapse(!0),e!==null&&e!==void 0&&e.removeAllRanges(),e!==null&&e!==void 0&&e.addRange(t),_this.input.focus();};return _this;}_createClass(p,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_get(_getPrototypeOf(p.prototype),"connectedCallback",this).call(this),this.emit("nile-init"),this.afterFirstRender().then(function(t){t&&""!==_this2.value&&(_this2.input.innerHTML=_this2.generateHTMLTagsWithValues(_this2.value));});}},{key:"handleTypeChange",value:function handleTypeChange(){this.input.innerHTML=this.generateHTMLTagsWithValues(this.value);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(p.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"afterFirstRender",value:function(){var _afterFirstRender=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.updateComplete;case 2:return _context2.abrupt("return",_context2.sent);case 3:case"end":return _context2.stop();}},_callee,this);}));function afterFirstRender(){return _afterFirstRender.apply(this,arguments);}return afterFirstRender;}()},{key:"handlekeyDown",value:function handlekeyDown(t){var _this3=this;"Enter"===t.code&&"text"===this.type&&t.preventDefault(),setTimeout(function(){var t=_this3.input.innerText;_this3.emitInputChange(),t.includes("$")&&(_this3.openDropdown=!0);});}},{key:"generateValuesFromHTMLTags",value:function generateValuesFromHTMLTags(t){return t.replace(/<span class="chips(?: chip-error)?" contenteditable="false">(.*?)<\/span>/g,function(t,e){return"{{"+e+"}}";});}},{key:"generateHTMLTagsWithValues",value:function generateHTMLTagsWithValues(t){var _this4=this;return t.replace(/{{(.*?)}}/g,function(t,e){return _this4.options.includes(e)?'<span class="chips" contenteditable="false">'+e+"</span>":'<span class="chips chip-error" contenteditable="false">'+e+"</span>";});}},{key:"emitInputChange",value:function emitInputChange(){var _t;var t=this.input.innerHTML;""!==this.input.innerText&&(t=this.generateValuesFromHTMLTags(t)),t=t.replace(/ /g," "),t="<br>"===t?"":(_t=t)===null||_t===void 0?void 0:_t.trim(),this.emit("nile-change",{value:this.generateValuesFromHTMLTags(t)});}},{key:"handleOptions",value:function handleOptions(t){var _this$input,_this$input$lastEleme,_this$input$lastChild;this.openDropdown=!this.openDropdown;var e='<span class="chips" contenteditable="false">'+t+"</span>";"DIV"===((_this$input=this.input)===null||_this$input===void 0||(_this$input=_this$input.lastElementChild)===null||_this$input===void 0?void 0:_this$input.tagName)?(this.input.lastElementChild.insertAdjacentHTML("beforeend",e),((_this$input$lastEleme=this.input.lastElementChild.lastChild)===null||_this$input$lastEleme===void 0?void 0:_this$input$lastEleme.previousSibling)&&(this.input.lastElementChild.lastChild.previousSibling.nodeValue=this.input.lastElementChild.lastChild.previousSibling.nodeValue.replace("$",""))):(this.input.insertAdjacentHTML("beforeend",e),((_this$input$lastChild=this.input.lastChild)===null||_this$input$lastChild===void 0?void 0:_this$input$lastChild.previousSibling)&&(this.input.lastChild.previousSibling.nodeValue=this.input.lastChild.previousSibling.nodeValue.replace("$",""))),this.emitInputChange();}},{key:"renderAutoOptions",value:function renderAutoOptions(){var _this5=this;return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["<div\n class=\"","class\"\n >\n ","\n </div>"])),r({"nile-options-container":!0,"dropdown-position":"text-area"===this.type}),this.options&&this.options.map(function(t){return e(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <nile-option\n .value=\"","\"\n @click=\"","\"\n >","\n </nile-option>"])),t,function(e){_this5.handleOptions(t);},t);}));}},{key:"render",value:function render(){var t=!!this.helpText,s=!!this.errorMessage,i=this.type;return e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-popup\n .active=\"","\"\n sync=\"width\"\n placement=\"bottom\"\n class=","\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ","\n <div\n contenteditable=\"true\"\n class=","\n @keydown=","\n ></div>\n ","\n ","\n </div>\n\n ","\n </nile-popup>\n "])),this.openDropdown,r({dropdown:!0,"dropdown--open":!0,popup:!0}),this.showLabel&&this.labelText?e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<label class=\"ods-label\">"," </label> ",""])),this.labelText,this.required?e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<span class=\"asterik\">*</span>"]))):""):"",r({"content-editable-input":!0,error:s,"text-area":"text-area"===i}),this.handlekeyDown,t?e(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",s?e(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"",this.renderAutoOptions());}}]);return p;}(a));p.styles=o,t([l()],p.prototype,"value",void 0),t([l()],p.prototype,"options",void 0),t([l()],p.prototype,"showLabel",void 0),t([l()],p.prototype,"labelText",void 0),t([l()],p.prototype,"type",void 0),t([l()],p.prototype,"required",void 0),t([s(".content-editable-input")],p.prototype,"input",void 0),t([s(".nile-options-container")],p.prototype,"autoOptions",void 0),t([i()],p.prototype,"openDropdown",void 0),t([l({attribute:"help-text"})],p.prototype,"helpText",void 0),t([l({attribute:"error-message"})],p.prototype,"errorMessage",void 0),t([h("type",{waitUntilFirstUpdate:!0})],p.prototype,"handleTypeChange",null),_export("N",p=t([n("nile-content-editor")],p));}};});
|
1
|
+
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-content-editor.css.cjs.js","lit/directives/class-map.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","../internal/enum.cjs.js","lit/directives/live.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var t,i,s,e,n,o,r,h,a,l,p,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,c;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.state;n=_litDecoratorsJs.customElement;},function(_nileContentEditorCssCjsJs){o=_nileContentEditorCssCjsJs.s;},function(_litDirectivesClassMapJs){r=_litDirectivesClassMapJs.classMap;},function(_internalNileElementCjsJs){h=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalEnumCjsJs){l=_internalEnumCjsJs.K;},function(_litDirectivesLiveJs){p=_litDirectivesLiveJs.live;},function(_property002CjsJs){d=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",c=/*#__PURE__*/function(_h){_inherits(c,_h);var _super=_createSuper(c);function c(){var _this;_classCallCheck(this,c);_this=_super.apply(this,arguments),_this.value="",_this.showLabel=!0,_this.labelText="",_this.type="text|text-area",_this.required=!0,_this.openDropdown=!1,_this.tagIdentifier="$",_this.filteredValue="",_this.helpText="",_this.readonly=!1,_this.errorMessage="",_this.error=!1;return _this;}_createClass(c,[{key:"connectedCallback",value:function connectedCallback(){this.handleOutsideClick=this.handleOutsideClick.bind(this),_get(_getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.emit("nile-init"),this.addOpenListeners(),this.setInitialValues();}},{key:"setInitialValues",value:function setInitialValues(){var _this2=this;this.updateComplete.then(function(t){t&&_this2.value&&(_this2.contentEditor.innerHTML=_this2.generateHTMLTagsWithValues(_this2.value));});}},{key:"addOpenListeners",value:function addOpenListeners(){window.addEventListener("click",this.handleOutsideClick);}},{key:"removeOpenListeners",value:function removeOpenListeners(){window.removeEventListener("click",this.handleOutsideClick);}},{key:"toggleDropdown",value:function toggleDropdown(t){this.openDropdown=t;}},{key:"handleOutsideClick",value:function handleOutsideClick(t){t&&t.target&&this.toggleDropdown(!1);}},{key:"handleTypeChange",value:function handleTypeChange(){this.contentEditor.innerHTML=this.generateHTMLTagsWithValues(this.value);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(c.prototype),"disconnectedCallback",this).call(this),this.removeOpenListeners(),this.emit("nile-destroy");}},{key:"handlePaste",value:function handlePaste(t){if(t.preventDefault(),t.clipboardData){var _i=t.clipboardData.getData("text/plain");document.execCommand("insertText",!1,_i);}this.emitInputChange();}},{key:"handlekeyDown",value:function handlekeyDown(t){var _this3=this;if(t.code!==l.ENTER||"text"!==this.type)return t.code===l.ESCAPE?(t.preventDefault(),void this.toggleDropdown(!1)):void setTimeout(function(){var t=_this3.contentEditor.innerText;_this3.emitInputChange(),t.includes(_this3.tagIdentifier)?(_this3.toggleDropdown(!0),_this3.filterOptions()):_this3.toggleDropdown(!1);});t.preventDefault();}},{key:"filterOptions",value:function filterOptions(){var _this4=this;this.filteredOptions=this.options,this.options.length&&this.filteredValue?this.filteredOptions=this.options.filter(function(t){return t.startsWith(_this4.filteredValue);}):this.filteredOptions=this.options;}},{key:"generateValuesFromHTMLTags",value:function generateValuesFromHTMLTags(t){return t.replace(/<span class="chips(?: chip-error)?" contenteditable="false">(.*?)<\/span>/g,function(t,i){return"{{"+i+"}}";});}},{key:"generateHTMLTagsWithValues",value:function generateHTMLTagsWithValues(t){var _this5=this;return t.replace(/{{(.*?)}}/g,function(t,i){return _this5.options.includes(i)?'<span class="chips" contenteditable="false">'+i+"</span>":'<span class="chips chip-error" contenteditable="false">'+i+"</span>";});}},{key:"emitInputChange",value:function emitInputChange(){if(this.contentEditor){var _t2;var _t=this.contentEditor.innerHTML;""!==this.contentEditor.innerText&&(_t=this.generateValuesFromHTMLTags(_t)),_t=_t.replace(/ /g," "),_t="<br>"===_t?"":(_t2=_t)===null||_t2===void 0?void 0:_t2.trim(),this.emit("nile-change",{value:this.generateValuesFromHTMLTags(_t)});}}},{key:"insertNodes",value:function insertNodes(t,i,s){var _this6=this;Array.from(i).map(function(i,e){var _i$nodeValue,_i$nodeValue2;i.hasChildNodes()?_this6.insertNodes(i,i.childNodes,s):((_i$nodeValue=i.nodeValue)===null||_i$nodeValue===void 0?void 0:_i$nodeValue.includes(_this6.tagIdentifier))&&(t.childNodes[e].nodeValue=(_i$nodeValue2=i.nodeValue)===null||_i$nodeValue2===void 0?void 0:_i$nodeValue2.replace(_this6.tagIdentifier+_this6.filteredValue,""),t.childNodes[e].after(s));});}},{key:"handleOptions",value:function handleOptions(t){this.toggleDropdown(!1);var i=document.createElement("span");i.setAttribute("class","chips"),i.setAttribute("contentEditable","false"),i.innerText=t,this.insertNodes(this.contentEditor,this.contentEditor.childNodes,i),this.filteredOptions=this.options,this.filteredValue="",this.emitInputChange();}},{key:"renderAutoOptions",value:function renderAutoOptions(){var _this7=this;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<div\n class=\"","\"\n >\n ","\n </div>"])),r({"nile-options-container":!0,"dropdown-position":"text-area"===this.type}),this.filteredOptions&&this.filteredOptions.map(function(t){return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <nile-option\n .value=\"","\"\n @click=\"","\"\n >","\n </nile-option>"])),t,function(i){_this7.handleOptions(t);},t);}));}},{key:"render",value:function render(){var t=!!this.helpText,s=!!this.error,e=!!this.errorMessage,n=!!this.readonly,o=this.type;return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-popup\n .active=\"","\"\n sync=\"width\"\n placement=\"bottom\"\n class=","\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ","\n <div\n contenteditable=\"","\"\n class=","\n @keydown=","\n @paste=","\n ></div>\n ","\n ","\n </div>\n\n ","\n </nile-popup>\n "])),p(this.openDropdown),r({dropdown:!0,"dropdown--open":!0,popup:!0}),this.showLabel&&this.labelText?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<label class=\"ods-label\">"," </label> ",""])),this.labelText,this.required?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<sapn class=\"asterik\">*</span>"]))):""):"",!n,r({"content-editable-input":!0,error:s||e,"read-only":n,"text-area":"text-area"===o}),this.handlekeyDown,this.handlePaste,t?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",e?i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"",this.renderAutoOptions());}}]);return c;}(h));c.styles=o,t([d()],c.prototype,"value",void 0),t([d()],c.prototype,"options",void 0),t([d()],c.prototype,"filteredOptions",void 0),t([d()],c.prototype,"showLabel",void 0),t([d()],c.prototype,"labelText",void 0),t([d()],c.prototype,"type",void 0),t([d()],c.prototype,"required",void 0),t([s(".content-editable-input")],c.prototype,"contentEditor",void 0),t([s(".nile-options-container")],c.prototype,"autoOptions",void 0),t([e()],c.prototype,"openDropdown",void 0),t([d({attribute:"help-text"})],c.prototype,"helpText",void 0),t([d({attribute:"readonly"})],c.prototype,"readonly",void 0),t([d({attribute:"error-message"})],c.prototype,"errorMessage",void 0),t([d({attribute:"error"})],c.prototype,"error",void 0),t([a("type",{waitUntilFirstUpdate:!0})],c.prototype,"handleTypeChange",null),_export("N",c=t([n("nile-content-editor")],c));}};});
|
2
2
|
//# sourceMappingURL=nile-content-editor.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-content-editor.cjs.js","sources":["../../../src/nile-content-editor/nile-content-editor.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, TemplateResult } from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-content-editor.css';\nimport { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\n\n/**\n * Nile icon component.\n *\n * @tag nile-attribute-expression\n *\n */\n@customElement('nile-content-editor')\nexport class NileContentEditor extends NileElement {\n /**\n * @summary Allows you to handle both input and dropdown selection\n\n * @dependency nile-option\n \n * @event nile-change - Emitted when the control's value changes. \n */\n\n @property() value: string = '';\n\n @property() options: Array<any>;\n\n @property() showLabel: boolean = true;\n\n @property() labelText = '';\n\n @property() type = 'text|text-area';\n\n @property() required: boolean = true;\n\n @query('.content-editable-input') input: HTMLInputElement;\n @query('.nile-options-container') autoOptions: HTMLInputElement;\n\n @state() private openDropdown: boolean = false;\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n static styles: CSSResultGroup = styles;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n this.afterFirstRender().then(res => {\n if (res && this.value !== '')\n this.input.innerHTML = this.generateHTMLTagsWithValues(this.value);\n });\n }\n\n @watch('type', { waitUntilFirstUpdate: true })\n handleTypeChange() {\n this.input.innerHTML = this.generateHTMLTagsWithValues(this.value);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n async afterFirstRender(): Promise<boolean> {\n return await this.updateComplete;\n }\n\n private handlekeyDown(event: any) {\n if (event.code === 'Enter' && this.type === 'text') {\n event.preventDefault();\n }\n setTimeout(() => {\n const value = this.input.innerText;\n this.emitInputChange();\n if (value.includes('$')) {\n this.openDropdown = true;\n }\n });\n }\n\n generateValuesFromHTMLTags(string: any): string {\n var pattern =\n /<span class=\"chips(?: chip-error)?\" contenteditable=\"false\">(.*?)<\\/span>/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return '{{' + option + '}}';\n });\n return result;\n }\n\n generateHTMLTagsWithValues(string: any): string {\n var pattern = /{{(.*?)}}/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return this.options.includes(option)\n ? '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>'\n : '<span class=\"chips chip-error\" contenteditable=\"false\">' +\n option +\n '</span>';\n });\n return result;\n }\n\n emitInputChange(): void {\n let fieldValue = this.input.innerHTML;\n\n if (this.input.innerText !== '') {\n fieldValue = this.generateValuesFromHTMLTags(fieldValue);\n }\n fieldValue = fieldValue.replace(/ /g, ' ');\n fieldValue = fieldValue === '<br>' ? '' : fieldValue?.trim();\n this.emit('nile-change', {\n value: this.generateValuesFromHTMLTags(fieldValue),\n });\n }\n\n moveCursorToEnd = () => {\n const range = document.createRange();\n const selection = window.getSelection();\n range.setStart(this.input, this.input.childNodes.length);\n range.collapse(true);\n selection?.removeAllRanges();\n selection?.addRange(range);\n this.input.focus();\n };\n\n handleOptions(option: any): void {\n this.openDropdown = !this.openDropdown;\n\n // not appending Native element as it replaces all existing child nodes with new node\n const autoOptionsTag =\n '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>';\n // text editor adds div when pressing enter , so before appending have to check if its parent node is div else append it to content editable parent\n if (this.input?.lastElementChild?.tagName === 'DIV') {\n this.input.lastElementChild.insertAdjacentHTML(\n 'beforeend',\n autoOptionsTag\n );\n if (this.input.lastElementChild.lastChild?.previousSibling)\n this.input.lastElementChild.lastChild.previousSibling.nodeValue =\n this.input.lastElementChild.lastChild.previousSibling.nodeValue!.replace(\n '$',\n ''\n );\n } else {\n this.input.insertAdjacentHTML('beforeend', autoOptionsTag);\n if (this.input.lastChild?.previousSibling) {\n this.input.lastChild.previousSibling.nodeValue =\n this.input.lastChild.previousSibling.nodeValue!.replace('$', '');\n }\n }\n this.emitInputChange();\n }\n\n public renderAutoOptions(): TemplateResult {\n return html`<div\n class=\"${classMap({\n 'nile-options-container': true,\n 'dropdown-position': this.type === 'text-area',\n })}class\"\n >\n ${this.options &&\n this.options.map((option: any) => {\n return html` <nile-option\n .value=\"${option}\"\n @click=\"${(event: Event) => {\n this.handleOptions(option);\n }}\"\n >${option}\n </nile-option>`;\n })}\n </div>`;\n }\n\n public render(): TemplateResult {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = !!this.errorMessage;\n const type = this.type;\n return html`\n <nile-popup\n .active=\"${this.openDropdown}\"\n sync=\"width\"\n placement=\"bottom\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': true,\n popup: true,\n })}\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ${this.showLabel && this.labelText\n ? html`<label class=\"ods-label\">${this.labelText} </label> ${this\n .required\n ? html`<span class=\"asterik\">*</span>`\n : ''}`\n : ''}\n <div\n contenteditable=\"true\"\n class=${classMap({\n 'content-editable-input': true,\n error: hasErrorMessage,\n 'text-area': type === 'text-area' ? true : false,\n })}\n @keydown=${this.handlekeyDown}\n ></div>\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n\n ${this.renderAutoOptions()}\n </nile-popup>\n `;\n }\n}\n\nexport default NileContentEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-content-editor': NileContentEditor;\n }\n}\n"],"names":["classMap","NileContentEditor","p","this","value","showLabel","labelText","type","required","openDropdown","helpText","errorMessage","moveCursorToEnd","range","document","createRange","selection","window","getSelection","setStart","input","childNodes","length","collapse","removeAllRanges","addRange","focus","_this","_createClass","key","connectedCallback","super","emit","afterFirstRender","then","res","innerHTML","generateHTMLTagsWithValues","handleTypeChange","disconnectedCallback","_afterFirstRender","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","updateComplete","abrupt","sent","stop","apply","arguments","handlekeyDown","event","code","preventDefault","setTimeout","innerText","emitInputChange","includes","generateValuesFromHTMLTags","string","replace","match","option","options","_t","fieldValue","trim","handleOptions","autoOptionsTag","_this$input","lastElementChild","tagName","insertAdjacentHTML","lastChild","previousSibling","nodeValue","renderAutoOptions","html","_templateObject","_taggedTemplateLiteral","map","_templateObject2","render","hasHelpText","hasErrorMessage","_templateObject3","dropdown","popup","_templateObject4","_templateObject5","error","_templateObject6","_templateObject7","NileElement","styles","__decorate","property","prototype","query","state","attribute","watch","waitUntilFirstUpdate","_export","customElement"],"mappings":"onBAoKeA,oJAAAA,mBAAAA,SAAAA,CAAAA,SAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,MAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,cAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,cAAAA,WAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,KAAAA,GAAAA,CAAAA,oBAAAA,MAAAA,CAAAA,MAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,eAAAA,CAAAA,CAAAA,CAAAA,CAAAA,aAAAA,oBAAAA,CAAAA,CAAAA,CAAAA,CAAAA,WAAAA,2BAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SA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M,yBAAmDvG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsG,SAAA,CAAA,OAAA,CAAA,IAAA,IACxBF,CAAA,CAAA,CAAjCG,EAAM,yBAAyDvG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsG,UAAA,aAAA,CAAA,IAAA,EAAA,CAAA,CAEvDF,CAAA,CAAA,CAARI,CAA8CxG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsG,UAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAETF,CAAA,CAAA,CAArCC,CAAS,CAAA,CAAEI,UAAW,WAA6BzG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsG,SAAA,CAAA,UAAA,CAAA,IAAA,EAEVF,CAAAA,CAAAA,CAAAA,CAAA,CAAzCC,CAAS,CAAA,CAAEI,UAAW,eAAqCzG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsG,UAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAc5DF,CAAA,CAAA,CADCM,CAAM,CAAA,MAAA,CAAQ,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAGtC3G,CAAAsG,CAAAA,SAAAA,CAAA,kBAAA,CAAA,IAAA,CAAA,CAAAM,OAAA,KA5CU5G,EAAiBoG,CAAA,CAAA,CAD7BS,CAAc,CAAA,qBAAA,CAAA,CAAA,CACF7G"}
|
1
|
+
{"version":3,"file":"nile-content-editor.cjs.js","sources":["../../../src/nile-content-editor/nile-content-editor.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, TemplateResult } from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-content-editor.css';\nimport { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { KeyCode } from '../internal/enum';\nimport { live } from 'lit/directives/live.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-attribute-expression\n *\n */\n@customElement('nile-content-editor')\nexport class NileContentEditor extends NileElement {\n /**\n * @summary Allows you to handle both input and dropdown selection\n\n * @dependency nile-option\n \n * @event nile-change - Emitted when the control's value changes. \n */\n\n @property() value: string = '';\n\n @property() options: Array<any>;\n\n @property() filteredOptions: Array<any>;\n\n @property() showLabel: boolean = true;\n\n @property() labelText = '';\n\n @property() type = 'text|text-area';\n\n @property() required: boolean = true;\n\n @query('.content-editable-input') contentEditor: HTMLInputElement;\n @query('.nile-options-container') autoOptions: HTMLInputElement;\n\n @state() openDropdown = false;\n\n tagIdentifier = '$';\n\n filteredValue = '';\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'readonly' }) readonly = false;\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n @property({ attribute: 'error' }) error = false;\n\n static styles: CSSResultGroup = styles;\n\n connectedCallback() {\n this.handleOutsideClick = this.handleOutsideClick.bind(this);\n super.connectedCallback();\n this.emit('nile-init');\n this.addOpenListeners();\n this.setInitialValues();\n }\n\n setInitialValues() {\n this.updateComplete.then(res => {\n if (res && !!this.value)\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(\n this.value\n );\n });\n }\n\n addOpenListeners() {\n window.addEventListener('click', this.handleOutsideClick);\n }\n\n removeOpenListeners() {\n window.removeEventListener('click', this.handleOutsideClick);\n }\n\n toggleDropdown(value: boolean) {\n this.openDropdown = value;\n }\n\n handleOutsideClick(event: Event) {\n if (event && event.target) {\n this.toggleDropdown(false);\n }\n }\n\n @watch('type', { waitUntilFirstUpdate: true })\n handleTypeChange() {\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(this.value);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.emit('nile-destroy');\n }\n\n handlePaste(event: ClipboardEvent) {\n event.preventDefault();\n if (event.clipboardData) {\n let text = event.clipboardData.getData('text/plain');\n document.execCommand('insertText', false, text);\n }\n this.emitInputChange();\n }\n\n private handlekeyDown(event: any) {\n if (event.code === KeyCode.ENTER && this.type === 'text') {\n event.preventDefault();\n return;\n }\n if (event.code === KeyCode.ESCAPE) {\n event.preventDefault();\n this.toggleDropdown(false);\n return;\n }\n setTimeout(() => {\n const value = this.contentEditor.innerText;\n this.emitInputChange();\n if (value.includes(this.tagIdentifier)) {\n this.toggleDropdown(true);\n this.filterOptions();\n } else {\n this.toggleDropdown(false);\n }\n });\n }\n\n filterOptions() {\n this.filteredOptions = this.options;\n if (!!this.options.length && !!this.filteredValue) {\n this.filteredOptions = this.options.filter(item =>\n item.startsWith(this.filteredValue)\n );\n } else {\n this.filteredOptions = this.options;\n }\n }\n\n generateValuesFromHTMLTags(string: any): string {\n var pattern =\n /<span class=\"chips(?: chip-error)?\" contenteditable=\"false\">(.*?)<\\/span>/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return '{{' + option + '}}';\n });\n return result;\n }\n\n generateHTMLTagsWithValues(string: any): string {\n var pattern = /{{(.*?)}}/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return this.options.includes(option)\n ? '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>'\n : '<span class=\"chips chip-error\" contenteditable=\"false\">' +\n option +\n '</span>';\n });\n return result;\n }\n\n emitInputChange(): void {\n if (this.contentEditor) {\n let fieldValue = this.contentEditor.innerHTML;\n\n if (this.contentEditor.innerText !== '') {\n fieldValue = this.generateValuesFromHTMLTags(fieldValue);\n }\n fieldValue = fieldValue.replace(/ /g, ' ');\n fieldValue = fieldValue === '<br>' ? '' : fieldValue?.trim();\n this.emit('nile-change', {\n value: this.generateValuesFromHTMLTags(fieldValue),\n });\n }\n }\n\n insertNodes(parentNode: Node, childNodes: NodeList, autoOptionsTag: Node) {\n Array.from(childNodes).map((node: Node, index: number) => {\n if (node.hasChildNodes()) {\n this.insertNodes(node, node.childNodes, autoOptionsTag);\n } else {\n if (node.nodeValue?.includes(this.tagIdentifier)) {\n parentNode.childNodes[index].nodeValue = node.nodeValue?.replace(\n this.tagIdentifier + this.filteredValue,\n ''\n );\n parentNode.childNodes[index].after(autoOptionsTag);\n }\n }\n });\n }\n\n handleOptions(option: any): void {\n this.toggleDropdown(false);\n let autoOptionsTag = document.createElement('span');\n autoOptionsTag.setAttribute('class', 'chips');\n autoOptionsTag.setAttribute('contentEditable', 'false');\n autoOptionsTag.innerText = option;\n this.insertNodes(\n this.contentEditor,\n this.contentEditor.childNodes,\n autoOptionsTag\n );\n this.filteredOptions = this.options;\n this.filteredValue = '';\n this.emitInputChange();\n }\n\n public renderAutoOptions(): TemplateResult {\n return html`<div\n class=\"${classMap({\n 'nile-options-container': true,\n 'dropdown-position': this.type === 'text-area',\n })}\"\n >\n ${this.filteredOptions &&\n this.filteredOptions.map((option: any) => {\n return html` <nile-option\n .value=\"${option}\"\n @click=\"${(event: Event) => {\n this.handleOptions(option);\n }}\"\n >${option}\n </nile-option>`;\n })}\n </div>`;\n }\n\n public render(): TemplateResult {\n const hasHelpText = this.helpText ? true : false;\n const hasError = !!this.error;\n const hasErrorMessage = !!this.errorMessage;\n const readonly = !!this.readonly;\n const type = this.type;\n return html`\n <nile-popup\n .active=\"${live(this.openDropdown)}\"\n sync=\"width\"\n placement=\"bottom\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': true,\n popup: true,\n })}\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ${this.showLabel && this.labelText\n ? html`<label class=\"ods-label\">${this.labelText} </label> ${this\n .required\n ? html`<sapn class=\"asterik\">*</span>`\n : ''}`\n : ''}\n <div\n contenteditable=\"${!readonly}\"\n class=${classMap({\n 'content-editable-input': true,\n error: hasError || hasErrorMessage,\n 'read-only': readonly,\n 'text-area': type === 'text-area' ? true : false,\n })}\n @keydown=${this.handlekeyDown}\n @paste=${this.handlePaste}\n ></div>\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n\n ${this.renderAutoOptions()}\n </nile-popup>\n `;\n }\n}\n\nexport default NileContentEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-content-editor': NileContentEditor;\n }\n}\n"],"names":["NileContentEditor","c","this","value","showLabel","labelText","type","required","openDropdown","tagIdentifier","filteredValue","helpText","readonly","errorMessage","error","_this","_createClass","key","connectedCallback","handleOutsideClick","bind","super","emit","addOpenListeners","setInitialValues","updateComplete","then","res","contentEditor","innerHTML","generateHTMLTagsWithValues","window","addEventListener","removeOpenListeners","removeEventListener","toggleDropdown","event","target","handleTypeChange","disconnectedCallback","handlePaste","preventDefault","clipboardData","text","getData","document","execCommand","emitInputChange","handlekeyDown","code","KeyCode","ENTER","ESCAPE","setTimeout","innerText","includes","filterOptions","filteredOptions","options","length","filter","item","startsWith","generateValuesFromHTMLTags","string","replace","match","option","_this5","_t2","fieldValue","trim","insertNodes","parentNode","childNodes","autoOptionsTag","Array","from","map","node","index","hasChildNodes","nodeValue","after","handleOptions","createElement","setAttribute","renderAutoOptions","_this7","html","_templateObject","_taggedTemplateLiteral","classMap","_templateObject2","render","hasHelpText","hasError","hasErrorMessage","_templateObject3","live","dropdown","popup","_templateObject4","_templateObject5","_templateObject6","_templateObject7","NileElement","styles","__decorate","property","prototype","query","state","attribute","watch","waitUntilFirstUpdate","_export","customElement"],"mappings":"40JAwBaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,EAAN,SAAAC,EAAA,uEASOC,KAAAA,CAAKC,KAAW,CAAA,EAAA,CAMhBD,KAAAA,CAASE,SAAAA,CAAAA,CAAY,CAErBF,CAAAA,KAAAA,CAASG,UAAG,EAEZH,CAAAA,KAAAA,CAAII,KAAG,gBAEPJ,CA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jCG,EAAM,yBAAyD/G,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8G,SAAA,CAAA,aAAA,CAAA,IAAA,EAEvDF,CAAAA,CAAAA,CAAAA,CAAA,CAARI,CAAAA,CAAAA,CAAAA,CAAAA,CAA6BhH,CAAA8G,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAMQF,CAAA,CAAA,CAArCC,CAAS,CAAA,CAAEI,UAAW,WAA6BjH,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8G,SAAA,CAAA,UAAA,CAAA,IAAA,EAEfF,CAAAA,CAAAA,CAAAA,CAAA,CAApCC,CAAAA,CAAS,CAAEI,SAAAA,CAAW,UAA+BjH,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8G,SAAA,CAAA,UAAA,CAAA,IAAA,EAEZF,CAAAA,CAAAA,CAAAA,CAAA,CAAzCC,CAAS,CAAA,CAAEI,SAAW,CAAA,eAAA,CAAA,CAAA,CAAA,CAAqCjH,CAAA8G,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAE1BF,CAAA,CAAA,CAAjCC,CAAS,CAAA,CAAEI,SAAW,CAAA,OAAA,CAAA,CAAA,CAAA,CAAyBjH,CAAA8G,CAAAA,SAAAA,CAAA,YAAA,EAwChDF,CAAAA,CAAAA,CAAAA,CAAA,CADCM,CAAAA,CAAM,MAAQ,CAAA,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAGtCnH,CAAA8G,CAAAA,SAAAA,CAAA,kBAAA,CAAA,IAAA,CAAA,CAAAM,OAAA,KAhFUpH,CAAiB4G,CAAAA,CAAAA,CAAA,CAD7BS,CAAAA,CAAc,wBACFrH"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,e;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){_export("s",e=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .content-editable-wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n }\n\n .dropdown-position {\n position: relative;\n bottom: 60px;\n }\n .content-editable-input {\n box-sizing: border-box;\n width: 100%;\n padding: 9px;\n border: 1px solid #c7ced4;\n border-radius: 4px;\n overflow-x: auto;\n overflow-anchor: none;\n scrollbar-width: none;\n -ms-overflow-style: none;\n cursor: text;\n white-space: nowrap;\n background-color: #ffffff;\n height: 38px;\n }\n .content-editable-input:focus {\n outline: none;\n }\n\n .error {\n border-color: #e5434d;\n }\n\n .chips {\n background: #e5e9eb;\n color: #000;\n border-radius: 4px;\n padding: 6px;\n
|
1
|
+
System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,e;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){_export("s",e=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n width: 100%;\n box-sizing: border-box;\n font-size: 14px;\n }\n\n .content-editable-wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n }\n\n .dropdown-position {\n position: relative;\n bottom: 60px;\n }\n .content-editable-input {\n box-sizing: border-box;\n width: 100%;\n padding: 9px;\n border: 1px solid #c7ced4;\n border-radius: 4px;\n overflow-x: auto;\n overflow-anchor: none;\n scrollbar-width: none;\n -ms-overflow-style: none;\n cursor: text;\n white-space: nowrap;\n background-color: #ffffff;\n height: 38px;\n }\n .content-editable-input:focus {\n outline: none;\n }\n\n .error {\n border-color: #e5434d;\n }\n\n .read-only {\n cursor: not-allowed;\n }\n\n .chips {\n display: inline;\n background: #e5e9eb;\n color: #000;\n border-radius: 4px;\n padding: 6px;\n height: 24px;\n line-height: 10px;\n margin-left: 3px;\n letter-spacing: 0.2px;\n }\n\n .text-area {\n height: 120px;\n overflow: scroll;\n line-height: 26px;\n }\n\n .text-area .chips {\n padding: 4px 8px;\n }\n\n .chip-error {\n background: #f3a5aa;\n }\n .nile-options-container {\n box-sizing: border-box;\n background-color: #ffffff;\n border: 1px solid #c7ced4;\n overflow: auto;\n max-height: 150px;\n }\n\n label {\n display: inline-block;\n margin-bottom: 6px;\n font-family: 'colfax-medium';\n }\n\n .asterik {\n color: #e5434d;\n }\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-content-editor.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-content-editor.css.cjs.js","sources":["../../../src/nile-content-editor/nile-content-editor.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * AttributeExpression CSS\n */\nexport const styles = css`\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .content-editable-wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n }\n\n .dropdown-position {\n position: relative;\n bottom: 60px;\n }\n .content-editable-input {\n box-sizing: border-box;\n width: 100%;\n padding: 9px;\n border: 1px solid #c7ced4;\n border-radius: 4px;\n overflow-x: auto;\n overflow-anchor: none;\n scrollbar-width: none;\n -ms-overflow-style: none;\n cursor: text;\n white-space: nowrap;\n background-color: #ffffff;\n height: 38px;\n }\n .content-editable-input:focus {\n outline: none;\n }\n\n .error {\n border-color: #e5434d;\n }\n\n .chips {\n background: #e5e9eb;\n color: #000;\n border-radius: 4px;\n padding: 6px;\n
|
1
|
+
{"version":3,"file":"nile-content-editor.css.cjs.js","sources":["../../../src/nile-content-editor/nile-content-editor.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * AttributeExpression CSS\n */\nexport const styles = css`\n :host {\n width: 100%;\n box-sizing: border-box;\n font-size: 14px;\n }\n\n .content-editable-wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n }\n\n .dropdown-position {\n position: relative;\n bottom: 60px;\n }\n .content-editable-input {\n box-sizing: border-box;\n width: 100%;\n padding: 9px;\n border: 1px solid #c7ced4;\n border-radius: 4px;\n overflow-x: auto;\n overflow-anchor: none;\n scrollbar-width: none;\n -ms-overflow-style: none;\n cursor: text;\n white-space: nowrap;\n background-color: #ffffff;\n height: 38px;\n }\n .content-editable-input:focus {\n outline: none;\n }\n\n .error {\n border-color: #e5434d;\n }\n\n .read-only {\n cursor: not-allowed;\n }\n\n .chips {\n display: inline;\n background: #e5e9eb;\n color: #000;\n border-radius: 4px;\n padding: 6px;\n height: 24px;\n line-height: 10px;\n margin-left: 3px;\n letter-spacing: 0.2px;\n }\n\n .text-area {\n height: 120px;\n overflow: scroll;\n line-height: 26px;\n }\n\n .text-area .chips {\n padding: 4px 8px;\n }\n\n .chip-error {\n background: #f3a5aa;\n }\n .nile-options-container {\n box-sizing: border-box;\n background-color: #ffffff;\n border: 1px solid #c7ced4;\n overflow: auto;\n max-height: 150px;\n }\n\n label {\n display: inline-block;\n margin-bottom: 6px;\n font-family: 'colfax-medium';\n }\n\n .asterik {\n color: #e5434d;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -2,6 +2,7 @@ import{i as o}from"../index-cd2f9c12.esm.js";const e=o`
|
|
2
2
|
:host {
|
3
3
|
width: 100%;
|
4
4
|
box-sizing: border-box;
|
5
|
+
font-size: 14px;
|
5
6
|
}
|
6
7
|
|
7
8
|
.content-editable-wrapper {
|
@@ -37,21 +38,30 @@ import{i as o}from"../index-cd2f9c12.esm.js";const e=o`
|
|
37
38
|
border-color: #e5434d;
|
38
39
|
}
|
39
40
|
|
41
|
+
.read-only {
|
42
|
+
cursor: not-allowed;
|
43
|
+
}
|
44
|
+
|
40
45
|
.chips {
|
46
|
+
display: inline;
|
41
47
|
background: #e5e9eb;
|
42
48
|
color: #000;
|
43
49
|
border-radius: 4px;
|
44
50
|
padding: 6px;
|
51
|
+
height: 24px;
|
52
|
+
line-height: 10px;
|
45
53
|
margin-left: 3px;
|
46
|
-
display: inline;
|
47
54
|
letter-spacing: 0.2px;
|
48
55
|
}
|
49
56
|
|
50
57
|
.text-area {
|
51
58
|
height: 120px;
|
52
|
-
white-space: pre-wrap;
|
53
59
|
overflow: scroll;
|
54
|
-
line-height:
|
60
|
+
line-height: 26px;
|
61
|
+
}
|
62
|
+
|
63
|
+
.text-area .chips {
|
64
|
+
padding: 4px 8px;
|
55
65
|
}
|
56
66
|
|
57
67
|
.chip-error {
|
@@ -62,6 +72,7 @@ import{i as o}from"../index-cd2f9c12.esm.js";const e=o`
|
|
62
72
|
background-color: #ffffff;
|
63
73
|
border: 1px solid #c7ced4;
|
64
74
|
overflow: auto;
|
75
|
+
max-height: 150px;
|
65
76
|
}
|
66
77
|
|
67
78
|
label {
|
@@ -1,29 +1,30 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{x as
|
2
|
-
class="${r({"nile-options-container":!0,"dropdown-position":"text-area"===this.type})}
|
1
|
+
import{__decorate as t}from"tslib";import{x as i}from"../index-cd2f9c12.esm.js";import{query as e,state as s,customElement as n}from"lit/decorators.js";import{s as o}from"./nile-content-editor.css.esm.js";import{classMap as r}from"lit/directives/class-map.js";import{N as h}from"../internal/nile-element.esm.js";import{w as a}from"../internal/watch.esm.js";import{K as l}from"../internal/enum.esm.js";import{live as p}from"lit/directives/live.js";import{n as d}from"../property-09139d3c.esm.js";import"lit";let c=class extends h{constructor(){super(...arguments),this.value="",this.showLabel=!0,this.labelText="",this.type="text|text-area",this.required=!0,this.openDropdown=!1,this.tagIdentifier="$",this.filteredValue="",this.helpText="",this.readonly=!1,this.errorMessage="",this.error=!1}connectedCallback(){this.handleOutsideClick=this.handleOutsideClick.bind(this),super.connectedCallback(),this.emit("nile-init"),this.addOpenListeners(),this.setInitialValues()}setInitialValues(){this.updateComplete.then((t=>{t&&this.value&&(this.contentEditor.innerHTML=this.generateHTMLTagsWithValues(this.value))}))}addOpenListeners(){window.addEventListener("click",this.handleOutsideClick)}removeOpenListeners(){window.removeEventListener("click",this.handleOutsideClick)}toggleDropdown(t){this.openDropdown=t}handleOutsideClick(t){t&&t.target&&this.toggleDropdown(!1)}handleTypeChange(){this.contentEditor.innerHTML=this.generateHTMLTagsWithValues(this.value)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.emit("nile-destroy")}handlePaste(t){if(t.preventDefault(),t.clipboardData){let i=t.clipboardData.getData("text/plain");document.execCommand("insertText",!1,i)}this.emitInputChange()}handlekeyDown(t){if(t.code!==l.ENTER||"text"!==this.type)return t.code===l.ESCAPE?(t.preventDefault(),void this.toggleDropdown(!1)):void setTimeout((()=>{const t=this.contentEditor.innerText;this.emitInputChange(),t.includes(this.tagIdentifier)?(this.toggleDropdown(!0),this.filterOptions()):this.toggleDropdown(!1)}));t.preventDefault()}filterOptions(){this.filteredOptions=this.options,this.options.length&&this.filteredValue?this.filteredOptions=this.options.filter((t=>t.startsWith(this.filteredValue))):this.filteredOptions=this.options}generateValuesFromHTMLTags(t){return t.replace(/<span class="chips(?: chip-error)?" contenteditable="false">(.*?)<\/span>/g,((t,i)=>"{{"+i+"}}"))}generateHTMLTagsWithValues(t){return t.replace(/{{(.*?)}}/g,((t,i)=>this.options.includes(i)?'<span class="chips" contenteditable="false">'+i+"</span>":'<span class="chips chip-error" contenteditable="false">'+i+"</span>"))}emitInputChange(){if(this.contentEditor){let t=this.contentEditor.innerHTML;""!==this.contentEditor.innerText&&(t=this.generateValuesFromHTMLTags(t)),t=t.replace(/ /g," "),t="<br>"===t?"":t?.trim(),this.emit("nile-change",{value:this.generateValuesFromHTMLTags(t)})}}insertNodes(t,i,e){Array.from(i).map(((i,s)=>{i.hasChildNodes()?this.insertNodes(i,i.childNodes,e):i.nodeValue?.includes(this.tagIdentifier)&&(t.childNodes[s].nodeValue=i.nodeValue?.replace(this.tagIdentifier+this.filteredValue,""),t.childNodes[s].after(e))}))}handleOptions(t){this.toggleDropdown(!1);let i=document.createElement("span");i.setAttribute("class","chips"),i.setAttribute("contentEditable","false"),i.innerText=t,this.insertNodes(this.contentEditor,this.contentEditor.childNodes,i),this.filteredOptions=this.options,this.filteredValue="",this.emitInputChange()}renderAutoOptions(){return i`<div
|
2
|
+
class="${r({"nile-options-container":!0,"dropdown-position":"text-area"===this.type})}"
|
3
3
|
>
|
4
|
-
${this.
|
4
|
+
${this.filteredOptions&&this.filteredOptions.map((t=>i` <nile-option
|
5
5
|
.value="${t}"
|
6
|
-
@click="${
|
6
|
+
@click="${i=>{this.handleOptions(t)}}"
|
7
7
|
>${t}
|
8
8
|
</nile-option>`))}
|
9
|
-
</div>`}render(){const t=!!this.helpText,s=!!this.errorMessage,
|
9
|
+
</div>`}render(){const t=!!this.helpText,e=!!this.error,s=!!this.errorMessage,n=!!this.readonly,o=this.type;return i`
|
10
10
|
<nile-popup
|
11
|
-
.active="${this.openDropdown}"
|
11
|
+
.active="${p(this.openDropdown)}"
|
12
12
|
sync="width"
|
13
13
|
placement="bottom"
|
14
14
|
class=${r({dropdown:!0,"dropdown--open":!0,popup:!0})}
|
15
15
|
>
|
16
16
|
<div class="content-editable-wrapper" slot="anchor">
|
17
|
-
${this.showLabel&&this.labelText?
|
17
|
+
${this.showLabel&&this.labelText?i`<label class="ods-label">${this.labelText} </label> ${this.required?i`<sapn class="asterik">*</span>`:""}`:""}
|
18
18
|
<div
|
19
|
-
contenteditable="
|
20
|
-
class=${r({"content-editable-input":!0,error:s,"text-area":"text-area"===
|
19
|
+
contenteditable="${!n}"
|
20
|
+
class=${r({"content-editable-input":!0,error:e||s,"read-only":n,"text-area":"text-area"===o})}
|
21
21
|
@keydown=${this.handlekeyDown}
|
22
|
+
@paste=${this.handlePaste}
|
22
23
|
></div>
|
23
|
-
${t?
|
24
|
+
${t?i`
|
24
25
|
<nile-form-help-text>${this.helpText}</nile-form-help-text>
|
25
26
|
`:""}
|
26
|
-
${s?
|
27
|
+
${s?i`
|
27
28
|
<nile-form-error-message
|
28
29
|
>${this.errorMessage}</nile-form-error-message
|
29
30
|
>
|
@@ -32,4 +33,4 @@ import{__decorate as t}from"tslib";import{x as e}from"../index-cd2f9c12.esm.js";
|
|
32
33
|
|
33
34
|
${this.renderAutoOptions()}
|
34
35
|
</nile-popup>
|
35
|
-
`}};
|
36
|
+
`}};c.styles=o,t([d()],c.prototype,"value",void 0),t([d()],c.prototype,"options",void 0),t([d()],c.prototype,"filteredOptions",void 0),t([d()],c.prototype,"showLabel",void 0),t([d()],c.prototype,"labelText",void 0),t([d()],c.prototype,"type",void 0),t([d()],c.prototype,"required",void 0),t([e(".content-editable-input")],c.prototype,"contentEditor",void 0),t([e(".nile-options-container")],c.prototype,"autoOptions",void 0),t([s()],c.prototype,"openDropdown",void 0),t([d({attribute:"help-text"})],c.prototype,"helpText",void 0),t([d({attribute:"readonly"})],c.prototype,"readonly",void 0),t([d({attribute:"error-message"})],c.prototype,"errorMessage",void 0),t([d({attribute:"error"})],c.prototype,"error",void 0),t([a("type",{waitUntilFirstUpdate:!0})],c.prototype,"handleTypeChange",null),c=t([n("nile-content-editor")],c);export{c as N};
|