@aquera/nile-elements 0.0.36-3 → 0.0.37

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.
Files changed (34) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +0 -1
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js +5 -73
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +17 -39
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +111 -217
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +1 -1
  11. package/dist/index.iife.js +340 -454
  12. package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
  13. package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
  14. package/dist/nile-content-editor/nile-content-editor.css.esm.js +0 -1
  15. package/dist/nile-switcher/index.cjs.js +1 -1
  16. package/dist/nile-switcher/index.esm.js +1 -1
  17. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  18. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  19. package/dist/nile-switcher/nile-switcher.css.cjs.js +1 -1
  20. package/dist/nile-switcher/nile-switcher.css.cjs.js.map +1 -1
  21. package/dist/nile-switcher/nile-switcher.css.esm.js +7 -75
  22. package/dist/nile-switcher/nile-switcher.esm.js +51 -101
  23. package/dist/src/nile-content-editor/nile-content-editor.css.js +0 -1
  24. package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  25. package/dist/src/nile-switcher/nile-switcher.css.js +5 -73
  26. package/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  27. package/dist/src/nile-switcher/nile-switcher.d.ts +17 -39
  28. package/dist/src/nile-switcher/nile-switcher.js +111 -217
  29. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/src/nile-content-editor/nile-content-editor.css.ts +0 -1
  33. package/src/nile-switcher/nile-switcher.css.ts +5 -73
  34. package/src/nile-switcher/nile-switcher.ts +172 -255
@@ -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 box-sizing: border-box;\n font-size: 14px;\n overflow: hidden;\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: 1px;\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: auto;\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 background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\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 .no-border {\n border: none;\n }\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 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: 1px;\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: auto;\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 background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\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 .no-border {\n border: none;\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 box-sizing: border-box;\n font-size: 14px;\n overflow: hidden;\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: 1px;\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: auto;\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 background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\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 .no-border {\n border: none;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
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 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: 1px;\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: auto;\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 background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\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 .no-border {\n border: none;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -2,7 +2,6 @@ import{i as o}from"../index-cd2f9c12.esm.js";const e=o`
2
2
  :host {
3
3
  box-sizing: border-box;
4
4
  font-size: 14px;
5
- overflow: hidden;
6
5
  }
7
6
 
8
7
  .content-editable-wrapper {
@@ -1,2 +1,2 @@
1
- System.register(["./nile-switcher.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-switcher.css.cjs.js","../internal/nile-element.cjs.js","lit","lit/directives/choose.js","lit/directives/class-map.js","lit/directives/repeat.js","../internal/watch.cjs.js","../internal/slot.cjs.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileSwitcherCjsJs){_export("NileSwitcher",_nileSwitcherCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileSwitcherCssCjsJs){},function(_internalNileElementCjsJs){},function(_lit){},function(_litDirectivesChooseJs){},function(_litDirectivesClassMapJs){},function(_litDirectivesRepeatJs){},function(_internalWatchCjsJs){},function(_internalSlotCjsJs){},function(_property002CjsJs){}],execute:function(){}};});
1
+ System.register(["./nile-switcher.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-switcher.css.cjs.js","../internal/nile-element.cjs.js","lit","lit/directives/choose.js","lit/directives/class-map.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileSwitcherCjsJs){_export("NileSwitcher",_nileSwitcherCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileSwitcherCssCjsJs){},function(_internalNileElementCjsJs){},function(_lit){},function(_litDirectivesChooseJs){},function(_litDirectivesClassMapJs){},function(_property002CjsJs){}],execute:function(){}};});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- export{N as NileSwitcher}from"./nile-switcher.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-switcher.css.esm.js";import"../internal/nile-element.esm.js";import"lit";import"lit/directives/choose.js";import"lit/directives/class-map.js";import"lit/directives/repeat.js";import"../internal/watch.esm.js";import"../internal/slot.esm.js";import"../property-09139d3c.esm.js";
1
+ export{N as NileSwitcher}from"./nile-switcher.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-switcher.css.esm.js";import"../internal/nile-element.esm.js";import"lit";import"lit/directives/choose.js";import"lit/directives/class-map.js";import"../property-09139d3c.esm.js";
@@ -1,2 +1,2 @@
1
- System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-switcher.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/choose.js","lit/directives/class-map.js","lit/directives/repeat.js","../internal/watch.cjs.js","../internal/slot.cjs.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,r,s,n,o,l,a,c,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,h,p,u,$,b;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){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.customElement;},function(_nileSwitcherCssCjsJs){r=_nileSwitcherCssCjsJs.s;},function(_internalNileElementCjsJs){s=_internalNileElementCjsJs.N;},function(_litDirectivesChooseJs){n=_litDirectivesChooseJs.choose;},function(_litDirectivesClassMapJs){o=_litDirectivesClassMapJs.classMap;},function(_litDirectivesRepeatJs){l=_litDirectivesRepeatJs.repeat;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalSlotCjsJs){c=_internalSlotCjsJs.H;},function(_property002CjsJs){d=_property002CjsJs.n;},function(_lit){}],execute:function(){!function(e){e.INLINE="inline",e.BLOCK="block";}(h||(h={})),function(e){e.DEFAULT="defaultInput",e.SWITCH="switchInput";}(p||(p={})),function(e){e.DROPDOWN="dropdown",e.TEXT="text",e.CHECKBOX="checkbox",e.TEXTAREA="text-area",e.RADIO="radio",e.CONTENTEDITOR="content-editor",e.OBJECT_MAPPER="object-mapper",e.CODE_EDITOR="code-editor";}(u||(u={})),function(e){e.CREATE="create",e.EDIT="edit";}($||($={}));_export("N",b=/*#__PURE__*/function(_s){_inherits(b,_s);var _super=_createSuper(b);function b(){var _this;_classCallCheck(this,b);_this=_super.apply(this,arguments),_this.hasSlotController=new c(_assertThisInitialized(_this),"label"),_this.current=0,_this.isToggleSwitch=function(e){return void 0===e||e;};return _this;}_createClass(b,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(b.prototype),"connectedCallback",this).call(this),this.emit("nile-init");}},{key:"handleSwitcherChange",value:function handleSwitcherChange(){this.setCurrentInput();}},{key:"setCurrentInput",value:function setCurrentInput(){var _this$nileSwitchConfi,_this2=this;((_this$nileSwitchConfi=this.nileSwitchConfig)===null||_this$nileSwitchConfi===void 0?void 0:_this$nileSwitchConfi.inputs)&&(this.currentInput=this.nileSwitchConfig.inputs.filter(function(e,t){return t===_this2.current;})[0]);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(b.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"renderNileText",value:function renderNileText(e){var _this3=this;var i=e.value,r=e.label,s=e.placeholder,n=e.disabled,l=e.required,a=e.error,c=e.errorMessage,d=e.inputType,h=e.noborder;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-input\n class=","\n .value=","\n .label=","\n .disabled=","\n .required=","\n .errorMessage=","\n .placeholder=","\n .error=","\n @nile-input=","\n ></nile-input>"])),o({"switcher-input":!0,"switcher-input--noborder":!!h}),i,r,n,l,c,s,a,function(e){_this3.handleChange(e,d);});}},{key:"renderDropdown",value:function renderDropdown(e){var _this4=this;var i=e.options,r=e.multiple,s=e.placeholder,n=e.disabled,o=e.value,l=e.error,a=e.errorMessage,c=e.inputType;return t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-select\n part=\"dropdown\"\n class=\"switcher-dropdown\"\n .placeholder=","\n .disabled=\"","\"\n .multiple=\"","\"\n .value=\"","\"\n .error=\"","\"\n .errorMessage=\"","\"\n @nile-change=","\n >\n ","\n </nile-select>"])),s,n,r,o,l,a,function(e){_this4.handleChange(e,c);},i===null||i===void 0?void 0:i.map(function(e){return t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-option .value=\"","\">"," </nile-option>"])),e,e);}));}},{key:"renderNileTextArea",value:function renderNileTextArea(e){var _this5=this;var i=e.value,r=e.disabled,s=e.readonly,n=e.errorMessage,o=e.error,l=e.inputType;return t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-textarea\n class=\"switcher-textarea\"\n .value=","\n .disabled=","\n ?readonly=","\n .error=","\n .errorMessage=","\n @nile-input=","\n ></nile-textarea>"])),i,r,s,o,n,function(e){_this5.handleChange(e,l);});}},{key:"renderNileCheckBox",value:function renderNileCheckBox(e){var _this6=this;var i=e.value,r=e.label,s=e.disabled,n=e.inputType;return t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-checkbox\n class=\"switcher-checkbox\"\n .checked=","\n .label=","\n .disabled=","\n @valueChange=","\n ></nile-checkbox\n >; "])),i,r,s,function(e){_this6.handleChange(e,n);});}},{key:"renderNileRadio",value:function renderNileRadio(e){var _this7=this;var i=e.options,r=e.value,s=e.disabled,n=e.errorMessage,o=e.inputType,l=!!n;return t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-radio-group\n class=\"switcher-radio-group\"\n .value=","\n .disabled=","\n @change=","\n >\n ","\n ","\n </nile-radio-group> "])),r,s,function(e){_this7.handleChange(e,o);},i&&i.map(function(e){return t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-radio .value=\"","\">"," </nile-radio>"])),e,e);}),l?this.renderErrorMessage(n):"");}},{key:"renderErrorMessage",value:function renderErrorMessage(e){return t(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-form-error-message>","</nile-form-error-message>\n "])),e);}},{key:"renderContentEditor",value:function renderContentEditor(e){var _this8=this;var i=e.options,r=e.inputType,s=e.errorMessage,n=e.type,o=e.readonly,l=e.noborder,a=e.value;return t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-content-editor\n class=\"switcher-content-editor\"\n .value=","\n .options=","\n .type=","\n .readonly=","\n .noborder=","\n .errorMessage=","\n @nile-change=","\n >\n </nile-content-editor>"])),a,i,n,o,l,s,function(e){_this8.handleChange(e,r);});}},{key:"renderObjectMapper",value:function renderObjectMapper(){var _this9=this;var e=this.currentInput.noborder;this.currentInput.mode;var i=this.currentInput.mode===$.CREATE?"Click to Create - Not Mapped":"Click to Edit";return t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-input\n class=","\n .value=","\n readonly=\"true\"\n @click=\"","\"\n >\n <nile-icon\n class=\"pointer-cursor switcher-object-mapper-icon\"\n slot=\"suffix\"\n name=\"collapse\"\n color=\"#005EA6\"\n size=\"16\"\n >\n </nile-icon>\n </nile-input>"])),o({"switcher-object-mapper":!0,"switcher-object-mapper--noborder":!!e}),i,function(e){return _this9.handleChange(e,u.OBJECT_MAPPER);});}},{key:"renderCodeEditor",value:function renderCodeEditor(e){var _this10=this;var i=e.value,r=e.multiLine,s=e.customAutoCompletions,n=e.disabled,l=e.readonly,a=e.errorMessage,c=e.error,d=e.inputType,h=e.noborder;return t(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-code-editor\n part=\"switcher-code-editor\"\n class=","\n @nile-expand=\"","\"\n @nile-change=\"","\"\n .multiline=\"","\"\n .value=\"","\"\n .customOptions=\"","\"\n ></nile-code-editor> "])),o({"code-editor":!0}),function(e){return _this10.handleExpand(e,u.CODE_EDITOR);},function(e){return _this10.handleChange(e,u.CODE_EDITOR);},r,i,s);}},{key:"handleExpand",value:function handleExpand(e,t){this.currentInput.expand=e.detail.expand,this.emit("nile-change",{input:this.currentInput});}},{key:"handleChange",value:function handleChange(e,t){switch(t){case u.OBJECT_MAPPER:this.currentInput.value="clicked";break;case u.CHECKBOX:this.currentInput.value=e.detail.checked;break;case u.CODE_EDITOR:default:this.currentInput.value=e.detail.value;}e.stopPropagation(),this.emit("nile-change",{input:this.currentInput});}},{key:"renderIcon",value:function renderIcon(){var _this11=this;var e=this.nileSwitchConfig.inputs,i=this.nileSwitchConfig.align===h.BLOCK?"top":"bottom";return t(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <div part=\"icons-container\" class=\"switcher-icons-container\">\n ","\n </div>\n "])),l(e,function(e,r){return t(_templateObject13||(_templateObject13=_taggedTemplateLiteral([" <nile-tooltip\n class=","\n content=","\n placement=","\n >\n <div class=",">\n <nile-icon\n size=\"16\"\n class=","\n .name=","\n color=\"#000000\"\n @click=","\n ></nile-icon>\n <div>\n \n </nile-tooltip>"])),o({"switcher-tooltip-container":!0}),e.helperText,i,o({"switcher-icon-container":!0,current:r===_this11.current}),o({"pointer-cursor":!0}),e.icon,function(){return _this11.toggleField(e,r);});}));}},{key:"toggleField",value:function toggleField(e,t){this.emit("nile-switch",{inputClicked:t,currentInput:e});}},{key:"singleFieldSwitcher",value:function singleFieldSwitcher(){var _this12=this;return this.currentInput||this.setCurrentInput(),t(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n ","\n "])),n(this.currentInput.inputType,[[u.TEXT,function(){return _this12.renderNileText(_this12.currentInput);}],[u.CHECKBOX,function(){return _this12.renderNileCheckBox(_this12.currentInput);}],[u.TEXTAREA,function(){return _this12.renderNileTextArea(_this12.currentInput);}],[u.RADIO,function(){return _this12.renderNileRadio(_this12.currentInput);}],[u.DROPDOWN,function(){return _this12.renderDropdown(_this12.currentInput);}],[u.CONTENTEDITOR,function(){return _this12.renderContentEditor(_this12.currentInput);}],[u.OBJECT_MAPPER,function(){return _this12.renderObjectMapper();}],[u.CODE_EDITOR,function(){return _this12.renderCodeEditor(_this12.currentInput);}]],function(){return _this12.renderNileText(_this12.currentInput);}));}},{key:"render",value:function render(){var e=this.hasSlotController.test("label"),i=this.nileSwitchConfig.align;return t(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["<div\n part=\"base\"\n class=","\n >\n <div class=\"label-container\">\n ","\n ","\n </div>\n ","\n </div>"])),o({"switcher-block":i===h.BLOCK,"switcher-inline":i===h.INLINE,"switcher-container":!0}),e?t(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <label\n part=\"switcher-label\"\n class=\"switcher__label\"\n for=\"input\"\n >\n <slot name=\"label\"></slot>\n </label>\n </div> "]))):"",this.renderIcon(),this.singleFieldSwitcher());}}]);return b;}(s));b.styles=r,e([d({type:Object})],b.prototype,"nileSwitchConfig",void 0),e([d({type:Number})],b.prototype,"current",void 0),e([d({type:Object})],b.prototype,"currentInput",void 0),e([a(["current"],{waitUntilFirstUpdate:!0})],b.prototype,"handleSwitcherChange",null),_export("N",b=e([i("nile-switcher")],b));}};});
1
+ System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-switcher.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/choose.js","lit/directives/class-map.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var e,i,t,r,n,s,o,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,a,c,d;function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}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){e=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){t=_litDecoratorsJs.customElement;},function(_nileSwitcherCssCjsJs){r=_nileSwitcherCssCjsJs.s;},function(_internalNileElementCjsJs){n=_internalNileElementCjsJs.N;},function(_litDirectivesChooseJs){s=_litDirectivesChooseJs.choose;},function(_litDirectivesClassMapJs){o=_litDirectivesClassMapJs.classMap;},function(_property002CjsJs){l=_property002CjsJs.n;},function(_lit){}],execute:function(){!function(e){e.DEFAULT="defaultInput",e.SWITCH="switchInput";}(a||(a={})),function(e){e.DROPDOWN="dropdown",e.TEXT="text",e.CHECKBOX="checkbox",e.TEXTAREA="text-area",e.RADIO="radio",e.CONTENTEDITOR="content-editor";}(c||(c={}));_export("N",d=/*#__PURE__*/function(_n){_inherits(d,_n);var _super=_createSuper(d);function d(){_classCallCheck(this,d);return _super.apply(this,arguments);}_createClass(d,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(d.prototype),"connectedCallback",this).call(this),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(d.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"renderNileText",value:function renderNileText(e,t){var _this=this;var r=e.value,n=e.label,s=e.placeholder,o=e.disabled,l=e.required,a=e.error,c=e.errorMessage,_d=e.inputType;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-input\n .value=","\n .label=","\n .disabled=","\n .required=","\n .errorMessage=","\n .placeholder=","\n .error=","\n @nile-input=","\n ></nile-input>"])),r,n,o,l,c,s,a,function(e){_this.handleChange(e,t,_d);});}},{key:"renderDropdown",value:function renderDropdown(e,t){var _this2=this;var r=e.options,n=e.multiple,s=e.placeholder,o=e.disabled,l=e.value,a=e.error,c=e.errorMessage,_d2=e.inputType;return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-select\n .placeholder=","\n .disabled=\"","\"\n .multiple=\"","\"\n .value=\"","\"\n .error=\"","\"\n .errorMessage=\"","\"\n @nile-change=","\n >\n ","\n </nile-select>"])),s,o,n,l,a,c,function(e){_this2.handleChange(e,t,_d2);},r===null||r===void 0?void 0:r.map(function(e){return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-option .value=\"","\">"," </nile-option>"])),e,e);}));}},{key:"renderNileTextArea",value:function renderNileTextArea(e,t){var _this3=this;var r=e.value,n=e.disabled,s=e.readonly,o=e.errorMessage,l=e.error,a=e.inputType;return i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-textarea\n .value=","\n .disabled=","\n ?readonly=","\n .error=","\n .errorMessage=","\n @nile-input=","\n ></nile-textarea>"])),r,n,s,l,o,function(e){_this3.handleChange(e,t,a);});}},{key:"renderNileCheckBox",value:function renderNileCheckBox(e,t){var _this4=this;var r=e.value,n=e.label,s=e.disabled,o=e.inputType;return i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-checkbox\n .checked=","\n .label=","\n .disabled=","\n @valueChange=","\n ></nile-checkbox\n >; "])),r,n,s,function(e){_this4.handleChange(e,t,o);});}},{key:"renderNileRadio",value:function renderNileRadio(e,t){var _this5=this;var r=e.options,n=e.value,s=e.disabled,o=e.inputType,l=e.errorMessage,a=!!l;return i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-radio-group\n .value=","\n .disabled=","\n @change=","\n >\n ","\n ","\n </nile-radio-group> "])),n,s,function(e){_this5.handleChange(e,t,o);},r&&r.map(function(e){return i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-radio .value=\"","\">"," </nile-radio>"])),e,e);}),a?this.renderErrorMessage(l):"");}},{key:"renderErrorMessage",value:function renderErrorMessage(e){return i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-form-error-message>","</nile-form-error-message>\n "])),e);}},{key:"renderContentEditor",value:function renderContentEditor(e,t){var _this6=this;var r=e.options,n=e.inputType,s=e.errorMessage,o=e.type,l=e.readonly,a=e.noborder,c=e.value;return i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-content-editor\n .value=","\n .options=","\n .type=","\n .readonly=","\n .noborder=","\n .errorMessage=","\n @nile-change=","\n >\n </nile-content-editor>"])),c,r,o,l,a,s,function(e){_this6.handleChange(e,t,n);});}},{key:"handleChange",value:function handleChange(e,i,t){t===c.CHECKBOX?this.nileSwitchConfig[i].value=e.detail.checked:this.nileSwitchConfig[i].value=e.detail.value,e.stopPropagation(),this.emit("nile-change",{config:this.nileSwitchConfig});}},{key:"renderIcon",value:function renderIcon(e,t){var r=e.helperText,n=t.helperText,s=this.nileSwitchConfig.toggleSwitch?"stringinput":"header-functions",l=this.nileSwitchConfig.toggleSwitch?r||"switch to ".concat(e.inputType):n||"switch to ".concat(t.inputType);return i(_templateObject10||(_templateObject10=_taggedTemplateLiteral([" <nile-tooltip\n class=","\n content=","\n placement=\"bottom\"\n >\n <nile-icon\n size=\"14\"\n class=","\n .name=","\n color=\"#005EA6\"\n @click=","\n ></nile-icon>\n </nile-tooltip>"])),o({"tooltip-container":!0}),l,o({"pointer-cursor":!0}),s,this.toggleField);}},{key:"toggleField",value:function toggleField(){this.nileSwitchConfig.confirmation||(this.nileSwitchConfig=_objectSpread(_objectSpread({},this.nileSwitchConfig),{},{toggleSwitch:!this.nileSwitchConfig.toggleSwitch})),this.emit("nile-switch",{config:this.nileSwitchConfig});}},{key:"singleFieldSwitcher",value:function singleFieldSwitcher(e,t,r,n){var _this7=this;var o=e.inputType,l=t.inputType;return i(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n ","\n ","\n "])),r?s(l,[[c.TEXTAREA,function(){return _this7.renderNileTextArea(t,a.SWITCH);}],[c.TEXT,function(){return _this7.renderNileText(t,a.SWITCH);}],[c.CONTENTEDITOR,function(){return _this7.renderContentEditor(t,a.SWITCH);}]],function(){return _this7.renderNileTextArea(t,a.SWITCH);}):s(o,[[c.TEXT,function(){return _this7.renderNileText(e,a.DEFAULT);}],[c.CHECKBOX,function(){return _this7.renderNileCheckBox(e,a.DEFAULT);}],[c.TEXTAREA,function(){return _this7.renderNileTextArea(e,a.DEFAULT);}],[c.RADIO,function(){return _this7.renderNileRadio(e,a.DEFAULT);}],[c.DROPDOWN,function(){return _this7.renderDropdown(_this7.nileSwitchConfig.defaultInput,a.DEFAULT);}],[c.CONTENTEDITOR,function(){return _this7.renderContentEditor(_this7.nileSwitchConfig.defaultInput,a.DEFAULT);}]],function(){return _this7.renderNileText(e,a.DEFAULT);}),n?"":this.renderIcon(e,t));}},{key:"render",value:function render(){var _this$nileSwitchConfi=this.nileSwitchConfig,e=_this$nileSwitchConfi.toggleSwitch,t=_this$nileSwitchConfi.defaultInput,r=_this$nileSwitchConfi.switchInput,n=_this$nileSwitchConfi.disable;return i(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<div class=\"input-container\">\n ","\n </div>"])),this.singleFieldSwitcher(t,r,e,!!n));}}]);return d;}(n));d.styles=r,e([l({type:Object})],d.prototype,"nileSwitchConfig",void 0),_export("N",d=e([t("nile-switcher")],d));}};});
2
2
  //# sourceMappingURL=nile-switcher.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-switcher.cjs.js","sources":["../../../src/nile-switcher/nile-switcher.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 } from 'lit/decorators.js';\nimport { styles } from './nile-switcher.css';\nimport NileElement from '../internal/nile-element';\nimport { CSSResultGroup } from 'lit';\nimport { choose } from 'lit/directives/choose.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport { watch } from '../internal/watch';\nimport { HasSlotController } from '../internal/slot';\n\n/**\n * @summary Allows you to switch between nile elements\n *\n * @dependency nile-icon\n * @dependency nile-input\n * @dependency nile-checkbox\n * @dependency nile-dropdown\n * @dependency nile-textarea\n *\n * @event nile-change - Emitted when the control's value changes.\n * @event nile-switch - Emitted when the nile component is being switched.\n */\n\nexport interface switchconfig {\n [key: string]: any;\n toggleSwitch: boolean;\n disable?: boolean;\n confirmation?: boolean;\n align: 'block' | 'inline';\n inputs: switchInputType[];\n}\n\nexport interface switchInputType {\n inputType:\n | INPUT_TYPE_NAMES.DROPDOWN\n | INPUT_TYPE_NAMES.TEXT\n | INPUT_TYPE_NAMES.CHECKBOX\n | INPUT_TYPE_NAMES.TEXTAREA\n | INPUT_TYPE_NAMES.RADIO\n | INPUT_TYPE_NAMES.CONTENTEDITOR\n | INPUT_TYPE_NAMES.OBJECT_MAPPER\n | INPUT_TYPE_NAMES.CODE_EDITOR;\n value?: String | boolean;\n label?: String;\n readonly?: boolean;\n type?: string;\n icon: string;\n mode?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n error?: boolean;\n errorMessage?: string;\n options?: Array<any>;\n customAutoCompletions?: any;\n helperText?: string;\n multiple?: boolean;\n noborder?: boolean;\n multiLine?: boolean;\n expand?: boolean;\n}\n\nexport enum POSITIONS {\n INLINE = 'inline',\n BLOCK = 'block',\n}\n\nexport enum INPUT_TYPE {\n DEFAULT = 'defaultInput',\n SWITCH = 'switchInput',\n}\n\nexport enum INPUT_TYPE_NAMES {\n DROPDOWN = 'dropdown',\n TEXT = 'text',\n CHECKBOX = 'checkbox',\n TEXTAREA = 'text-area',\n RADIO = 'radio',\n CONTENTEDITOR = 'content-editor',\n OBJECT_MAPPER = 'object-mapper',\n CODE_EDITOR = 'code-editor',\n}\n\nexport enum MODE {\n CREATE = 'create',\n EDIT = 'edit',\n}\n\n@customElement('nile-switcher')\nexport class NileSwitcher extends NileElement {\n /**\n * The styles for nile switcher\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'label');\n\n @property({ type: Object }) nileSwitchConfig: switchconfig;\n\n @property({ type: Number }) current: Number = 0;\n\n @property({ type: Object }) currentInput: switchInputType;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n @watch(['current'], { waitUntilFirstUpdate: true })\n handleSwitcherChange() {\n this.setCurrentInput();\n }\n\n setCurrentInput() {\n if (this.nileSwitchConfig?.inputs) {\n this.currentInput = this.nileSwitchConfig.inputs.filter(\n (input: switchInputType, index: Number) => {\n return index === this.current;\n }\n )[0];\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n renderNileText(Input: switchInputType) {\n const {\n value,\n label,\n placeholder,\n disabled,\n required,\n error,\n errorMessage,\n inputType,\n noborder,\n } = Input;\n return html`<nile-input\n class=${classMap({\n 'switcher-input': true,\n 'switcher-input--noborder': !!noborder,\n })}\n .value=${value}\n .label=${label}\n .disabled=${disabled}\n .required=${required}\n .errorMessage=${errorMessage}\n .placeholder=${placeholder}\n .error=${error}\n @nile-input=${(e: CustomEvent) => {\n this.handleChange(e, inputType);\n }}\n ></nile-input>`;\n }\n\n renderDropdown(Input: switchInputType) {\n const {\n options,\n multiple,\n placeholder,\n disabled,\n value,\n error,\n errorMessage,\n inputType,\n } = Input;\n\n return html`<nile-select\n part=\"dropdown\"\n class=\"switcher-dropdown\"\n .placeholder=${placeholder}\n .disabled=\"${disabled}\"\n .multiple=\"${multiple}\"\n .value=\"${value}\"\n .error=\"${error}\"\n .errorMessage=\"${errorMessage}\"\n @nile-change=${(e: CustomEvent) => {\n this.handleChange(e, inputType);\n }}\n >\n ${options?.map((option: any) => {\n return html`<nile-option .value=\"${option}\">${option} </nile-option>`;\n })}\n </nile-select>`;\n }\n\n renderNileTextArea(Input: switchInputType) {\n const { value, disabled, readonly, errorMessage, error, inputType } = Input;\n\n return html`<nile-textarea\n class=\"switcher-textarea\"\n .value=${value}\n .disabled=${disabled}\n ?readonly=${readonly}\n .error=${error}\n .errorMessage=${errorMessage}\n @nile-input=${(e: CustomEvent) => {\n this.handleChange(e, inputType);\n }}\n ></nile-textarea>`;\n }\n\n renderNileCheckBox(Input: switchInputType) {\n const { value, label, disabled, inputType } = Input;\n\n return html`<nile-checkbox\n class=\"switcher-checkbox\"\n .checked=${value}\n .label=${label}\n .disabled=${disabled}\n @valueChange=${(e: CustomEvent) => {\n this.handleChange(e, inputType);\n }}\n ></nile-checkbox\n >; `;\n }\n\n renderNileRadio(Input: switchInputType) {\n const { options, value, disabled, errorMessage, inputType } = Input;\n\n const haserrorMessage = !!errorMessage;\n\n return html`<nile-radio-group\n class=\"switcher-radio-group\"\n .value=${value}\n .disabled=${disabled}\n @change=${(e: CustomEvent) => {\n this.handleChange(e, inputType);\n }}\n >\n ${options &&\n options.map((option: any) => {\n return html`<nile-radio .value=\"${option}\">${option} </nile-radio>`;\n })}\n ${haserrorMessage ? this.renderErrorMessage(errorMessage) : ''}\n </nile-radio-group> `;\n }\n\n renderErrorMessage(errorMessage: string) {\n return html`\n <nile-form-error-message>${errorMessage}</nile-form-error-message>\n `;\n }\n\n renderContentEditor(Input: switchInputType) {\n let { options, inputType, errorMessage, type, readonly, noborder, value } =\n Input;\n return html`<nile-content-editor\n class=\"switcher-content-editor\"\n .value=${value}\n .options=${options}\n .type=${type}\n .readonly=${readonly}\n .noborder=${noborder}\n .errorMessage=${errorMessage}\n @nile-change=${(e: CustomEvent) => {\n this.handleChange(e, inputType);\n }}\n >\n </nile-content-editor>`;\n }\n\n renderObjectMapper() {\n const noborder = this.currentInput.noborder;\n const mode = this.currentInput.mode;\n const value =\n this.currentInput.mode === MODE.CREATE\n ? 'Click to Create - Not Mapped'\n : 'Click to Edit';\n\n return html`<nile-input\n class=${classMap({\n 'switcher-object-mapper': true,\n 'switcher-object-mapper--noborder': !!noborder,\n })}\n .value=${value}\n readonly=\"true\"\n @click=\"${(e: CustomEvent) =>\n this.handleChange(e, INPUT_TYPE_NAMES.OBJECT_MAPPER)}\"\n >\n <nile-icon\n class=\"pointer-cursor switcher-object-mapper-icon\"\n slot=\"suffix\"\n name=\"collapse\"\n color=\"#005EA6\"\n size=\"16\"\n >\n </nile-icon>\n </nile-input>`;\n }\n\n renderCodeEditor(Input: switchInputType) {\n const {\n value,\n multiLine,\n customAutoCompletions,\n disabled,\n readonly,\n errorMessage,\n error,\n inputType,\n noborder,\n } = Input;\n return html`<nile-code-editor\n part=\"switcher-code-editor\"\n class=${classMap({\n 'code-editor': true,\n })}\n @nile-expand=\"${(e: CustomEvent) =>\n this.handleExpand(e, INPUT_TYPE_NAMES.CODE_EDITOR)}\"\n @nile-change=\"${(e: CustomEvent) =>\n this.handleChange(e, INPUT_TYPE_NAMES.CODE_EDITOR)}\"\n .multiline=\"${multiLine}\"\n .value=\"${value}\"\n .customOptions=\"${customAutoCompletions}\"\n ></nile-code-editor> `;\n }\n\n handleExpand(event: CustomEvent, inputType: string) {\n this.currentInput.expand = event.detail.expand;\n this.emit('nile-change', { input: this.currentInput });\n }\n\n handleChange(event: CustomEvent, inputType: string) {\n switch (inputType) {\n case INPUT_TYPE_NAMES.OBJECT_MAPPER:\n this.currentInput.value = 'clicked';\n break;\n case INPUT_TYPE_NAMES.CHECKBOX:\n this.currentInput.value = event.detail.checked;\n break;\n case INPUT_TYPE_NAMES.CODE_EDITOR:\n this.currentInput.value = event.detail.value;\n break;\n default:\n this.currentInput.value = event.detail.value;\n }\n event.stopPropagation();\n this.emit('nile-change', { input: this.currentInput });\n }\n\n renderIcon() {\n const inputs = this.nileSwitchConfig.inputs;\n const toolTipPosition =\n this.nileSwitchConfig.align === POSITIONS.BLOCK ? 'top' : 'bottom';\n\n return html`\n <div part=\"icons-container\" class=\"switcher-icons-container\">\n ${repeat(\n inputs,\n (input: any, index: number) => html` <nile-tooltip\n class=${classMap({\n 'switcher-tooltip-container': true,\n })}\n content=${input.helperText}\n placement=${toolTipPosition}\n >\n <div class=${classMap({\n 'switcher-icon-container': true,\n current: index === this.current,\n })}>\n <nile-icon\n size=\"16\"\n class=${classMap({\n 'pointer-cursor': true,\n })}\n .name=${input.icon}\n color=\"#000000\"\n @click=${() => this.toggleField(input, index)}\n ></nile-icon>\n <div>\n \n </nile-tooltip>`\n )}\n </div>\n `;\n }\n\n isToggleSwitch = (item: any) => {\n return typeof item === 'undefined' || item;\n };\n\n toggleField(currentInput: switchInputType, index: Number) {\n this.emit('nile-switch', {\n inputClicked: index,\n currentInput: currentInput,\n });\n }\n\n singleFieldSwitcher() {\n if (!this.currentInput) {\n this.setCurrentInput();\n }\n return html`\n ${choose(\n this.currentInput.inputType,\n [\n [INPUT_TYPE_NAMES.TEXT, () => this.renderNileText(this.currentInput)],\n [\n INPUT_TYPE_NAMES.CHECKBOX,\n () => this.renderNileCheckBox(this.currentInput),\n ],\n [\n INPUT_TYPE_NAMES.TEXTAREA,\n () => this.renderNileTextArea(this.currentInput),\n ],\n [\n INPUT_TYPE_NAMES.RADIO,\n () => this.renderNileRadio(this.currentInput),\n ],\n [\n INPUT_TYPE_NAMES.DROPDOWN,\n () => this.renderDropdown(this.currentInput),\n ],\n [\n INPUT_TYPE_NAMES.CONTENTEDITOR,\n () => this.renderContentEditor(this.currentInput),\n ],\n [INPUT_TYPE_NAMES.OBJECT_MAPPER, () => this.renderObjectMapper()],\n [\n INPUT_TYPE_NAMES.CODE_EDITOR,\n () => this.renderCodeEditor(this.currentInput),\n ],\n ],\n () => this.renderNileText(this.currentInput)\n )}\n `;\n }\n\n public render(): TemplateResult {\n const hasLabelSlot = this.hasSlotController.test('label');\n const align = this.nileSwitchConfig.align;\n return html`<div\n part=\"base\"\n class=${classMap({\n 'switcher-block': align === POSITIONS.BLOCK,\n 'switcher-inline': align === POSITIONS.INLINE,\n 'switcher-container': true,\n })}\n >\n <div class=\"label-container\">\n ${hasLabelSlot\n ? html`\n <label\n part=\"switcher-label\"\n class=\"switcher__label\"\n for=\"input\"\n >\n <slot name=\"label\"></slot>\n </label>\n </div> `\n : ''}\n ${this.renderIcon()}\n </div>\n ${this.singleFieldSwitcher()}\n </div>`;\n }\n}\n\nexport default NileSwitcher;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-switcher': NileSwitcher;\n }\n}\n"],"names":["POSITIONS","INLINE","BLOCK","INPUT_TYPE","DEFAULT","SWITCH","INPUT_TYPE_NAMES","DROPDOWN","TEXT","CHECKBOX","TEXTAREA","RADIO","CONTENTEDITOR","OBJECT_MAPPER","CODE_EDITOR","MODE","CREATE","EDIT","_export","NileSwitcher","b","this","hasSlotController","HasSlotController","current","isToggleSwitch","item","_this","_createClass","key","value","connectedCallback","super","emit","handleSwitcherChange","setCurrentInput","nileSwitchConfig","inputs","currentInput","filter","input","index","disconnectedCallback","renderNileText","Input","_this3","label","placeholder","disabled","required","error","errorMessage","inputType","noborder","html","_templateObject","_taggedTemplateLiteral","classMap","e","handleChange","renderDropdown","_this4","options","multiple","_templateObject2","map","option","_templateObject3","renderNileTextArea","readonly","_templateObject4","renderNileCheckBox","_this6","_templateObject5","renderNileRadio","haserrorMessage","_templateObject6","_templateObject7","renderErrorMessage","_templateObject8","renderContentEditor","_this8","type","_templateObject9","renderObjectMapper","mode","_templateObject10","renderCodeEditor","multiLine","customAutoCompletions","_templateObject11","handleExpand","event","expand","detail","checked","stopPropagation","renderIcon","toolTipPosition","align","_templateObject12","repeat","_templateObject13","helperText","icon","toggleField","inputClicked","singleFieldSwitcher","_this12","_templateObject14","choose","render","hasLabelSlot","test","_templateObject15","_templateObject16","NileElement","styles","__decorate","property","Object","prototype","Number","watch","waitUntilFirstUpdate","customElement"],"mappings":"0gKAsEA,CAAA,SAAYA,GACVA,CAAA,CAAAC,MAAA,CAAA,SACAD,CAAA,CAAAE,KAAA,CAAA,OACD,EAHD,CAAYF,IAAAA,CAGX,CAAA,CAAA,IAED,SAAYG,CAAAA,CAAAA,CACVA,EAAAC,OAAA,CAAA,cAAA,CACAD,EAAAE,MAAA,CAAA,aACD,EAHD,CAAYF,CAAAA,GAAAA,EAGX,CAAA,CAAA,CAAA,CAAA,CAED,SAAYG,CACVA,CAAAA,CAAAA,CAAAA,CAAAC,SAAA,UACAD,CAAAA,CAAAA,CAAAE,KAAA,MACAF,CAAAA,CAAAA,CAAAG,SAAA,UACAH,CAAAA,CAAAA,CAAAI,SAAA,WACAJ,CAAAA,CAAAA,CAAAK,MAAA,OACAL,CAAAA,CAAAA,CAAAM,cAAA,gBACAN,CAAAA,CAAAA,CAAAO,cAAA,eACAP,CAAAA,CAAAA,CAAAQ,YAAA,aACD,EATD,CAAYR,CAAAA,GAAAA,CAAAA,CASX,CAAA,CAED,CAAA,CAAA,CAAA,SAAYS,GACVA,CAAA,CAAAC,MAAA,CAAA,SACAD,CAAA,CAAAE,IAAA,CAAA,MACD,EAHD,CAAYF,IAAAA,CAGX,CAAA,CAAA,IAGMG,OAAA,KAAMC,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,EAAN,SAAAC,EAAA,uEAOYC,KAAAA,CAAiBC,iBAAG,CAA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BAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAG3CzG,CAAAsG,CAAAA,SAAAA,CAAA,sBAAA,CAAA,IAAA,CAAA,CAAAvG,OAAA,KAvBUC,EAAYmG,CAAA,CAAA,CADxBO,CAAc,CAAA,eAAA,CAAA,CAAA,CACF1G"}
1
+ {"version":3,"file":"nile-switcher.cjs.js","sources":["../../../src/nile-switcher/nile-switcher.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 } from 'lit/decorators.js';\nimport { styles } from './nile-switcher.css';\nimport NileElement from '../internal/nile-element';\nimport { CSSResultGroup } from 'lit';\nimport { choose } from 'lit/directives/choose.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\n/**\n * @summary Allows you to switch between nile elements\n\n * @dependency nile-icon\n * @dependency nile-input\n * @dependency nile-checkbox\n * @dependency nile-dropdown\n * @dependency nile-textarea\n *\n \n * @event nile-change - Emitted when the control's value changes.\n * @event nile-switch - Emitted when the nile component is being switched.\n \n */\n\nexport interface switchconfig {\n [key: string]: any;\n toggleSwitch: boolean;\n disable?: boolean;\n confirmation?: boolean;\n defaultInput: switchInputType;\n switchInput: switchInputType;\n}\n\nexport interface switchInputType {\n inputType:\n | INPUT_TYPE_NAMES.DROPDOWN\n | INPUT_TYPE_NAMES.TEXT\n | INPUT_TYPE_NAMES.CHECKBOX\n | INPUT_TYPE_NAMES.TEXTAREA\n | INPUT_TYPE_NAMES.RADIO\n | INPUT_TYPE_NAMES.CONTENTEDITOR;\n value?: String | boolean;\n label?: String;\n readonly?: boolean;\n type?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n error?: boolean;\n errorMessage?: string;\n options?: Array<any>;\n helperText?: string;\n multiple?: boolean;\n noborder?: boolean;\n}\n\nexport enum INPUT_TYPE {\n DEFAULT = 'defaultInput',\n SWITCH = 'switchInput',\n}\n\nexport enum INPUT_TYPE_NAMES {\n DROPDOWN = 'dropdown',\n TEXT = 'text',\n CHECKBOX = 'checkbox',\n TEXTAREA = 'text-area',\n RADIO = 'radio',\n CONTENTEDITOR = 'content-editor',\n}\n\n@customElement('nile-switcher')\nexport class NileSwitcher extends NileElement {\n /**\n * The styles for nile switcher\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n static styles: CSSResultGroup = styles;\n @property({ type: Object }) nileSwitchConfig: switchconfig;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n renderNileText(Input: switchInputType, inputType: string) {\n const {\n value,\n label,\n placeholder,\n disabled,\n required,\n error,\n errorMessage,\n inputType: inputTypeName,\n } = Input;\n return html`<nile-input\n .value=${value}\n .label=${label}\n .disabled=${disabled}\n .required=${required}\n .errorMessage=${errorMessage}\n .placeholder=${placeholder}\n .error=${error}\n @nile-input=${(e: CustomEvent) => {\n this.handleChange(e, inputType, inputTypeName);\n }}\n ></nile-input>`;\n }\n\n renderDropdown(Input: switchInputType, inputType: string) {\n const {\n options,\n multiple,\n placeholder,\n disabled,\n value,\n error,\n errorMessage,\n inputType: inputTypeName,\n } = Input;\n\n return html`<nile-select\n .placeholder=${placeholder}\n .disabled=\"${disabled}\"\n .multiple=\"${multiple}\"\n .value=\"${value}\"\n .error=\"${error}\"\n .errorMessage=\"${errorMessage}\"\n @nile-change=${(e: CustomEvent) => {\n this.handleChange(e, inputType, inputTypeName);\n }}\n >\n ${options?.map((option: any) => {\n return html`<nile-option .value=\"${option}\">${option} </nile-option>`;\n })}\n </nile-select>`;\n }\n\n renderNileTextArea(Input: switchInputType, inputType: string) {\n const {\n value,\n disabled,\n readonly,\n errorMessage,\n error,\n inputType: inputTypeName,\n } = Input;\n\n return html`<nile-textarea\n .value=${value}\n .disabled=${disabled}\n ?readonly=${readonly}\n .error=${error}\n .errorMessage=${errorMessage}\n @nile-input=${(e: CustomEvent) => {\n this.handleChange(e, inputType, inputTypeName);\n }}\n ></nile-textarea>`;\n }\n\n renderNileCheckBox(Input: switchInputType, inputType: string) {\n const { value, label, disabled, inputType: inputTypeName } = Input;\n\n return html`<nile-checkbox\n .checked=${value}\n .label=${label}\n .disabled=${disabled}\n @valueChange=${(e: CustomEvent) => {\n this.handleChange(e, inputType, inputTypeName);\n }}\n ></nile-checkbox\n >; `;\n }\n\n renderNileRadio(Input: switchInputType, inputType: string) {\n const {\n options,\n value,\n disabled,\n inputType: inputTypeName,\n errorMessage,\n } = Input;\n\n const haserrorMessage = !!errorMessage;\n\n return html`<nile-radio-group\n .value=${value}\n .disabled=${disabled}\n @change=${(e: CustomEvent) => {\n this.handleChange(e, inputType, inputTypeName);\n }}\n >\n ${options &&\n options.map((option: any) => {\n return html`<nile-radio .value=\"${option}\">${option} </nile-radio>`;\n })}\n ${haserrorMessage ? this.renderErrorMessage(errorMessage) : ''}\n </nile-radio-group> `;\n }\n\n renderErrorMessage(errorMessage: string) {\n return html`\n <nile-form-error-message>${errorMessage}</nile-form-error-message>\n `;\n }\n\n renderContentEditor(Input: switchInputType, inputType: string) {\n let {\n options,\n inputType: inputTypeName,\n errorMessage,\n type,\n readonly,\n noborder,\n value,\n } = Input;\n return html`<nile-content-editor\n .value=${value}\n .options=${options}\n .type=${type}\n .readonly=${readonly}\n .noborder=${noborder}\n .errorMessage=${errorMessage}\n @nile-change=${(e: CustomEvent) => {\n this.handleChange(e, inputType, inputTypeName);\n }}\n >\n </nile-content-editor>`;\n }\n\n handleChange(event: CustomEvent, inputType: string, inputTypeName: string) {\n if (inputTypeName === INPUT_TYPE_NAMES.CHECKBOX) {\n this.nileSwitchConfig[inputType as keyof switchconfig].value =\n event.detail.checked;\n } else {\n this.nileSwitchConfig[inputType as keyof switchconfig].value =\n event.detail.value;\n }\n event.stopPropagation();\n this.emit('nile-change', { config: this.nileSwitchConfig });\n }\n\n renderIcon(defaultInput: switchInputType, switchInput: switchInputType) {\n const defaultHelperText = defaultInput.helperText;\n const switchHelperText = switchInput.helperText;\n\n const icon = !this.nileSwitchConfig.toggleSwitch\n ? 'header-functions'\n : 'stringinput';\n\n const helperText = !this.nileSwitchConfig.toggleSwitch\n ? !!switchHelperText\n ? switchHelperText\n : `switch to ${switchInput.inputType}`\n : !!defaultHelperText\n ? defaultHelperText\n : `switch to ${defaultInput.inputType}`;\n\n return html` <nile-tooltip\n class=${classMap({\n 'tooltip-container': true,\n })}\n content=${helperText}\n placement=\"bottom\"\n >\n <nile-icon\n size=\"14\"\n class=${classMap({\n 'pointer-cursor': true,\n })}\n .name=${icon}\n color=\"#005EA6\"\n @click=${this.toggleField}\n ></nile-icon>\n </nile-tooltip>`;\n }\n\n toggleField() {\n if (!this.nileSwitchConfig.confirmation) {\n this.nileSwitchConfig = {\n ...this.nileSwitchConfig,\n toggleSwitch: !this.nileSwitchConfig.toggleSwitch,\n };\n }\n this.emit('nile-switch', { config: this.nileSwitchConfig });\n }\n\n singleFieldSwitcher(\n defaultInput: switchInputType,\n switchInput: switchInputType,\n toggleField: boolean,\n disable: boolean\n ) {\n const defaultInputType = defaultInput.inputType;\n const switchInputType = switchInput.inputType;\n return html`\n ${!toggleField\n ? choose(\n defaultInputType,\n [\n [\n INPUT_TYPE_NAMES.TEXT,\n () => this.renderNileText(defaultInput, INPUT_TYPE.DEFAULT),\n ],\n [\n INPUT_TYPE_NAMES.CHECKBOX,\n () => this.renderNileCheckBox(defaultInput, INPUT_TYPE.DEFAULT),\n ],\n [\n INPUT_TYPE_NAMES.TEXTAREA,\n () => this.renderNileTextArea(defaultInput, INPUT_TYPE.DEFAULT),\n ],\n [\n INPUT_TYPE_NAMES.RADIO,\n () => this.renderNileRadio(defaultInput, INPUT_TYPE.DEFAULT),\n ],\n [\n INPUT_TYPE_NAMES.DROPDOWN,\n () =>\n this.renderDropdown(\n this.nileSwitchConfig.defaultInput,\n INPUT_TYPE.DEFAULT\n ),\n ],\n [\n INPUT_TYPE_NAMES.CONTENTEDITOR,\n () =>\n this.renderContentEditor(\n this.nileSwitchConfig.defaultInput,\n INPUT_TYPE.DEFAULT\n ),\n ],\n ],\n () => this.renderNileText(defaultInput, INPUT_TYPE.DEFAULT)\n )\n : choose(\n switchInputType,\n [\n [\n INPUT_TYPE_NAMES.TEXTAREA,\n () => this.renderNileTextArea(switchInput, INPUT_TYPE.SWITCH),\n ],\n [\n INPUT_TYPE_NAMES.TEXT,\n () => this.renderNileText(switchInput, INPUT_TYPE.SWITCH),\n ],\n [\n INPUT_TYPE_NAMES.CONTENTEDITOR,\n () => this.renderContentEditor(switchInput, INPUT_TYPE.SWITCH),\n ],\n ],\n\n () => this.renderNileTextArea(switchInput, INPUT_TYPE.SWITCH)\n )}\n ${!disable ? this.renderIcon(defaultInput, switchInput) : ''}\n `;\n }\n public render(): TemplateResult {\n const {\n toggleSwitch: toggleField,\n defaultInput,\n switchInput,\n disable,\n } = this.nileSwitchConfig;\n\n return html`<div class=\"input-container\">\n ${this.singleFieldSwitcher(\n defaultInput,\n switchInput,\n toggleField,\n !!disable\n )}\n </div>`;\n }\n}\n\nexport default NileSwitcher;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-switcher': NileSwitcher;\n }\n}\n"],"names":["INPUT_TYPE","DEFAULT","SWITCH","INPUT_TYPE_NAMES","DROPDOWN","TEXT","CHECKBOX","TEXTAREA","RADIO","CONTENTEDITOR","_export","NileSwitcher","_n","_inherits","d","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","connectedCallback","super","this","emit","disconnectedCallback","renderNileText","Input","inputType","label","placeholder","disabled","required","error","errorMessage","inputTypeName","html","_templateObject","_taggedTemplateLiteral","e","handleChange","renderDropdown","options","multiple","_templateObject2","map","option","_templateObject3","renderNileTextArea","readonly","_templateObject4","renderNileCheckBox","_templateObject5","renderNileRadio","haserrorMessage","_templateObject6","_templateObject7","renderErrorMessage","_templateObject8","renderContentEditor","type","noborder","_templateObject9","event","nileSwitchConfig","detail","checked","stopPropagation","config","renderIcon","defaultInput","switchInput","defaultHelperText","helperText","switchHelperText","icon","toggleSwitch","concat","_templateObject10","classMap","toggleField","confirmation","_objectSpread","singleFieldSwitcher","disable","defaultInputType","switchInputType","_templateObject11","choose","render","_this$nileSwitchConfi","_templateObject12","NileElement","styles","__decorate","property","Object","prototype","customElement"],"mappings":"i/KA8DA,CAAA,SAAYA,CACVA,CAAAA,CAAAA,CAAAA,CAAAC,OAAA,CAAA,cAAA,CACAD,EAAAE,MAAA,CAAA,aACD,EAHD,CAAYF,CAAAA,GAAAA,EAGX,CAAA,CAAA,CAAA,CAAA,CAED,SAAYG,CAAAA,CAAAA,CACVA,CAAA,CAAAC,QAAA,CAAA,WACAD,CAAA,CAAAE,IAAA,CAAA,MACAF,CAAAA,CAAAA,CAAAG,QAAA,CAAA,UAAA,CACAH,EAAAI,QAAA,CAAA,WAAA,CACAJ,CAAA,CAAAK,KAAA,CAAA,OACAL,CAAAA,CAAAA,CAAAM,cAAA,gBACD,EAPD,CAAYN,CAAAA,GAAAA,CAAAA,CAOX,CAAA,CAGM,CAAA,CAAA,CAAAO,OAAA,KAAMC,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,WAAAA,EAAA,EAAAG,eAAA,MAAAH,CAAA,SAAAC,MAAA,CAAAG,KAAA,MAAAC,SAAA,GAAAC,YAAA,CAAAN,CAAA,GAAAO,GAAA,qBAAAC,KAAA,CAQL,SAAAC,kBAAA,EACEC,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,4BAAAA,IAAAA,OACAC,KAAKC,IAAK,CAAA,WAAA,CACX,EAED,GAAAL,GAAA,wBAAAC,KAAA,UAAAK,qBAAA,CAAAA,CACEH,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,+BAAAA,IAAAA,OACAC,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ACjB,iBACEgB,CAAAA,MAAKoC,CAAAA,mBAAAA,CACHpC,MAAKyC,CAAAA,gBAAAA,CAAiBM,YACtBxE,CAAAA,CAAAA,CAAWC,aAInB,iBAAMwB,CAAAA,MAAAA,CAAKG,cAAe4C,CAAAA,CAAAA,CAAcxE,CAAWC,CAAAA,OAAAA,CAAAA,EAAAA,CAAAA,CAqBtDqF,CAAuD,CAAA,EAAA,CAA7C7D,IAAK8C,CAAAA,UAAAA,CAAWC,CAAcC,CAAAA,CAAAA,CAAAA,EAE9C,CACM,GAAApD,GAAA,UAAAC,KAAA,UAAAqE,OAAA,CAAAA,CACL,IAAAC,qBAAA,CAKInE,IAAKyC,CAAAA,gBAAAA,CAJOgB,wBAAdJ,YAAAA,CACAN,CAAAA,CAAAA,qBAAAA,CADyBA,YACzBA,CACAC,CAAAA,CAAAA,qBAAAA,CADYA,WACZA,CACAa,CAAAA,CAAAA,qBAAAA,CADWA,OACXA,CAGF,MAAOhD,CAAAA,CAAI,CAAAuD,iBAAA,GAAAA,iBAAA,CAAArD,sBAAA,8DACPf,IAAK4D,CAAAA,mBAAAA,CACLb,CACAC,CAAAA,CAAAA,CACAS,CACEI,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAGP,CAAA,WAAAxE,CAAA,GAnT+BgF,CAQhC,GAHOnF,EAAMoF,MAAmBA,CAAAA,CAAAA,CACJC,EAAA,CAA3BC,CAAAA,CAAS,CAAEnC,IAAMoC,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAyCvF,CAAAwF,CAAAA,SAAAA,CAAA,uBAAA,EANhDxF,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYqF,EAAA,CADxBI,CAAAA,CAAc,kBACFzF"}
@@ -1,2 +1,2 @@
1
- System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,r;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){e=_index001CjsJs.i;}],execute:function(){_export("s",r=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .pointer-cursor {\n cursor: pointer;\n }\n\n .switcher__label {\n display: flex;\n align-items: center;\n color: inherit;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n switcher-object-mapper:hover {\n display: flex;\n }\n .switcher-icon-container.current {\n background: var(--nile-colors-primary-100);\n }\n\n .switcher-container {\n display: flex;\n }\n\n .switcher-inline {\n gap: 0.5rem;\n }\n\n .switcher-block {\n flex-direction: column;\n }\n\n .switcher-inline > :nth-child(2) {\n flex: 1;\n overflow: hidden;\n }\n\n .switcher-icons-container {\n display: flex;\n margin-left: auto;\n gap: 0.5rem;\n max-height: 38px;\n align-items: center;\n }\n\n .switcher-block > .switcher-icons-container {\n margin-left: auto;\n }\n\n .label-container {\n display: flex;\n }\n\n .switcher-icon-container {\n cursor: pointer;\n justify-content: center;\n display: flex;\n align-items: center;\n margin-bottom: 6px;\n height: 28px;\n width: 28px;\n border-radius: 4px;\n }\n nile-radio {\n display: inline-block;\n padding-right: 10px;\n }\n\n .switcher-object-mapper-icon {\n display: none;\n }\n .switcher-object-mapper:hover > .switcher-object-mapper-icon {\n display: block;\n }\n .switcher-object-mapper::part(input) {\n color: var(--nile-colors-primary-600);\n cursor: pointer;\n }\n\n .switcher-input--noborder::part(base) {\n border: none;\n }\n .switcher-object-mapper--noborder::part(base) {\n border: none;\n }\n"]))));}};});
1
+ System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var i,_templateObject,n;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){i=_index001CjsJs.i;}],execute:function(){_export("s",n=i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .pointer-cursor {\n cursor: pointer;\n }\n .input-container {\n display: flex;\n gap: 0.5rem;\n }\n\n .input-container > :first-child {\n max-width: 98%;\n min-width: 98%;\n }\n\n nile-icon {\n max-height: 38px;\n }\n\n nile-radio {\n display: inline-block;\n padding-right: 10px;\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-switcher.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-switcher.css.cjs.js","sources":["../../../src/nile-switcher/nile-switcher.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 * FieldGenerator CSS\n */\nexport const styles = css`\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .pointer-cursor {\n cursor: pointer;\n }\n\n .switcher__label {\n display: flex;\n align-items: center;\n color: inherit;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n switcher-object-mapper:hover {\n display: flex;\n }\n .switcher-icon-container.current {\n background: var(--nile-colors-primary-100);\n }\n\n .switcher-container {\n display: flex;\n }\n\n .switcher-inline {\n gap: 0.5rem;\n }\n\n .switcher-block {\n flex-direction: column;\n }\n\n .switcher-inline > :nth-child(2) {\n flex: 1;\n overflow: hidden;\n }\n\n .switcher-icons-container {\n display: flex;\n margin-left: auto;\n gap: 0.5rem;\n max-height: 38px;\n align-items: center;\n }\n\n .switcher-block > .switcher-icons-container {\n margin-left: auto;\n }\n\n .label-container {\n display: flex;\n }\n\n .switcher-icon-container {\n cursor: pointer;\n justify-content: center;\n display: flex;\n align-items: center;\n margin-bottom: 6px;\n height: 28px;\n width: 28px;\n border-radius: 4px;\n }\n nile-radio {\n display: inline-block;\n padding-right: 10px;\n }\n\n .switcher-object-mapper-icon {\n display: none;\n }\n .switcher-object-mapper:hover > .switcher-object-mapper-icon {\n display: block;\n }\n .switcher-object-mapper::part(input) {\n color: var(--nile-colors-primary-600);\n cursor: pointer;\n }\n\n .switcher-input--noborder::part(base) {\n border: none;\n }\n .switcher-object-mapper--noborder::part(base) {\n border: none;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-switcher.css.cjs.js","sources":["../../../src/nile-switcher/nile-switcher.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 * FieldGenerator CSS\n */\nexport const styles = css`\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .pointer-cursor {\n cursor: pointer;\n }\n .input-container {\n display: flex;\n gap: 0.5rem;\n }\n\n .input-container > :first-child {\n max-width: 98%;\n min-width: 98%;\n }\n\n nile-icon {\n max-height: 38px;\n }\n\n nile-radio {\n display: inline-block;\n padding-right: 10px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,4 +1,4 @@
1
- import{i as e}from"../index-cd2f9c12.esm.js";const r=e`
1
+ import{i}from"../index-cd2f9c12.esm.js";const n=i`
2
2
  :host {
3
3
  width: 100%;
4
4
  box-sizing: border-box;
@@ -7,90 +7,22 @@ import{i as e}from"../index-cd2f9c12.esm.js";const r=e`
7
7
  .pointer-cursor {
8
8
  cursor: pointer;
9
9
  }
10
-
11
- .switcher__label {
12
- display: flex;
13
- align-items: center;
14
- color: inherit;
15
- color: var(--nile-colors-dark-900);
16
- font-family: Colfax-regular;
17
- font-size: 14px;
18
- font-style: normal;
19
- font-weight: 400;
20
- line-height: 14px;
21
- letter-spacing: 0.2px;
22
- }
23
-
24
- switcher-object-mapper:hover {
25
- display: flex;
26
- }
27
- .switcher-icon-container.current {
28
- background: var(--nile-colors-primary-100);
29
- }
30
-
31
- .switcher-container {
10
+ .input-container {
32
11
  display: flex;
33
- }
34
-
35
- .switcher-inline {
36
12
  gap: 0.5rem;
37
13
  }
38
14
 
39
- .switcher-block {
40
- flex-direction: column;
41
- }
42
-
43
- .switcher-inline > :nth-child(2) {
44
- flex: 1;
45
- overflow: hidden;
15
+ .input-container > :first-child {
16
+ max-width: 98%;
17
+ min-width: 98%;
46
18
  }
47
19
 
48
- .switcher-icons-container {
49
- display: flex;
50
- margin-left: auto;
51
- gap: 0.5rem;
20
+ nile-icon {
52
21
  max-height: 38px;
53
- align-items: center;
54
- }
55
-
56
- .switcher-block > .switcher-icons-container {
57
- margin-left: auto;
58
- }
59
-
60
- .label-container {
61
- display: flex;
62
22
  }
63
23
 
64
- .switcher-icon-container {
65
- cursor: pointer;
66
- justify-content: center;
67
- display: flex;
68
- align-items: center;
69
- margin-bottom: 6px;
70
- height: 28px;
71
- width: 28px;
72
- border-radius: 4px;
73
- }
74
24
  nile-radio {
75
25
  display: inline-block;
76
26
  padding-right: 10px;
77
27
  }
78
-
79
- .switcher-object-mapper-icon {
80
- display: none;
81
- }
82
- .switcher-object-mapper:hover > .switcher-object-mapper-icon {
83
- display: block;
84
- }
85
- .switcher-object-mapper::part(input) {
86
- color: var(--nile-colors-primary-600);
87
- cursor: pointer;
88
- }
89
-
90
- .switcher-input--noborder::part(base) {
91
- border: none;
92
- }
93
- .switcher-object-mapper--noborder::part(base) {
94
- border: none;
95
- }
96
- `;export{r as s};
28
+ `;export{n as s};
@@ -1,118 +1,68 @@
1
- import{__decorate as e}from"tslib";import{x as t}from"../index-cd2f9c12.esm.js";import{customElement as i}from"lit/decorators.js";import{s as r}from"./nile-switcher.css.esm.js";import{N as s}from"../internal/nile-element.esm.js";import{choose as n}from"lit/directives/choose.js";import{classMap as o}from"lit/directives/class-map.js";import{repeat as l}from"lit/directives/repeat.js";import{w as a}from"../internal/watch.esm.js";import{H as c}from"../internal/slot.esm.js";import{n as d}from"../property-09139d3c.esm.js";import"lit";var h,p,u,$;!function(e){e.INLINE="inline",e.BLOCK="block"}(h||(h={})),function(e){e.DEFAULT="defaultInput",e.SWITCH="switchInput"}(p||(p={})),function(e){e.DROPDOWN="dropdown",e.TEXT="text",e.CHECKBOX="checkbox",e.TEXTAREA="text-area",e.RADIO="radio",e.CONTENTEDITOR="content-editor",e.OBJECT_MAPPER="object-mapper",e.CODE_EDITOR="code-editor"}(u||(u={})),function(e){e.CREATE="create",e.EDIT="edit"}($||($={}));let m=class extends s{constructor(){super(...arguments),this.hasSlotController=new c(this,"label"),this.current=0,this.isToggleSwitch=e=>void 0===e||e}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}handleSwitcherChange(){this.setCurrentInput()}setCurrentInput(){this.nileSwitchConfig?.inputs&&(this.currentInput=this.nileSwitchConfig.inputs.filter(((e,t)=>t===this.current))[0])}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}renderNileText(e){const{value:i,label:r,placeholder:s,disabled:n,required:l,error:a,errorMessage:c,inputType:d,noborder:h}=e;return t`<nile-input
2
- class=${o({"switcher-input":!0,"switcher-input--noborder":!!h})}
3
- .value=${i}
4
- .label=${r}
5
- .disabled=${n}
1
+ import{__decorate as e}from"tslib";import{x as i}from"../index-cd2f9c12.esm.js";import{customElement as t}from"lit/decorators.js";import{s as r}from"./nile-switcher.css.esm.js";import{N as n}from"../internal/nile-element.esm.js";import{choose as s}from"lit/directives/choose.js";import{classMap as o}from"lit/directives/class-map.js";import{n as l}from"../property-09139d3c.esm.js";import"lit";var a,c;!function(e){e.DEFAULT="defaultInput",e.SWITCH="switchInput"}(a||(a={})),function(e){e.DROPDOWN="dropdown",e.TEXT="text",e.CHECKBOX="checkbox",e.TEXTAREA="text-area",e.RADIO="radio",e.CONTENTEDITOR="content-editor"}(c||(c={}));let d=class extends n{connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}renderNileText(e,t){const{value:r,label:n,placeholder:s,disabled:o,required:l,error:a,errorMessage:c,inputType:d}=e;return i`<nile-input
2
+ .value=${r}
3
+ .label=${n}
4
+ .disabled=${o}
6
5
  .required=${l}
7
6
  .errorMessage=${c}
8
7
  .placeholder=${s}
9
8
  .error=${a}
10
- @nile-input=${e=>{this.handleChange(e,d)}}
11
- ></nile-input>`}renderDropdown(e){const{options:i,multiple:r,placeholder:s,disabled:n,value:o,error:l,errorMessage:a,inputType:c}=e;return t`<nile-select
12
- part="dropdown"
13
- class="switcher-dropdown"
9
+ @nile-input=${e=>{this.handleChange(e,t,d)}}
10
+ ></nile-input>`}renderDropdown(e,t){const{options:r,multiple:n,placeholder:s,disabled:o,value:l,error:a,errorMessage:c,inputType:d}=e;return i`<nile-select
14
11
  .placeholder=${s}
15
- .disabled="${n}"
16
- .multiple="${r}"
17
- .value="${o}"
18
- .error="${l}"
19
- .errorMessage="${a}"
20
- @nile-change=${e=>{this.handleChange(e,c)}}
12
+ .disabled="${o}"
13
+ .multiple="${n}"
14
+ .value="${l}"
15
+ .error="${a}"
16
+ .errorMessage="${c}"
17
+ @nile-change=${e=>{this.handleChange(e,t,d)}}
21
18
  >
22
- ${i?.map((e=>t`<nile-option .value="${e}">${e} </nile-option>`))}
23
- </nile-select>`}renderNileTextArea(e){const{value:i,disabled:r,readonly:s,errorMessage:n,error:o,inputType:l}=e;return t`<nile-textarea
24
- class="switcher-textarea"
25
- .value=${i}
26
- .disabled=${r}
19
+ ${r?.map((e=>i`<nile-option .value="${e}">${e} </nile-option>`))}
20
+ </nile-select>`}renderNileTextArea(e,t){const{value:r,disabled:n,readonly:s,errorMessage:o,error:l,inputType:a}=e;return i`<nile-textarea
21
+ .value=${r}
22
+ .disabled=${n}
27
23
  ?readonly=${s}
28
- .error=${o}
29
- .errorMessage=${n}
30
- @nile-input=${e=>{this.handleChange(e,l)}}
31
- ></nile-textarea>`}renderNileCheckBox(e){const{value:i,label:r,disabled:s,inputType:n}=e;return t`<nile-checkbox
32
- class="switcher-checkbox"
33
- .checked=${i}
34
- .label=${r}
24
+ .error=${l}
25
+ .errorMessage=${o}
26
+ @nile-input=${e=>{this.handleChange(e,t,a)}}
27
+ ></nile-textarea>`}renderNileCheckBox(e,t){const{value:r,label:n,disabled:s,inputType:o}=e;return i`<nile-checkbox
28
+ .checked=${r}
29
+ .label=${n}
35
30
  .disabled=${s}
36
- @valueChange=${e=>{this.handleChange(e,n)}}
31
+ @valueChange=${e=>{this.handleChange(e,t,o)}}
37
32
  ></nile-checkbox
38
- >; `}renderNileRadio(e){const{options:i,value:r,disabled:s,errorMessage:n,inputType:o}=e,l=!!n;return t`<nile-radio-group
39
- class="switcher-radio-group"
40
- .value=${r}
33
+ >; `}renderNileRadio(e,t){const{options:r,value:n,disabled:s,inputType:o,errorMessage:l}=e,a=!!l;return i`<nile-radio-group
34
+ .value=${n}
41
35
  .disabled=${s}
42
- @change=${e=>{this.handleChange(e,o)}}
36
+ @change=${e=>{this.handleChange(e,t,o)}}
43
37
  >
44
- ${i&&i.map((e=>t`<nile-radio .value="${e}">${e} </nile-radio>`))}
45
- ${l?this.renderErrorMessage(n):""}
46
- </nile-radio-group> `}renderErrorMessage(e){return t`
38
+ ${r&&r.map((e=>i`<nile-radio .value="${e}">${e} </nile-radio>`))}
39
+ ${a?this.renderErrorMessage(l):""}
40
+ </nile-radio-group> `}renderErrorMessage(e){return i`
47
41
  <nile-form-error-message>${e}</nile-form-error-message>
48
- `}renderContentEditor(e){let{options:i,inputType:r,errorMessage:s,type:n,readonly:o,noborder:l,value:a}=e;return t`<nile-content-editor
49
- class="switcher-content-editor"
50
- .value=${a}
51
- .options=${i}
52
- .type=${n}
53
- .readonly=${o}
54
- .noborder=${l}
42
+ `}renderContentEditor(e,t){let{options:r,inputType:n,errorMessage:s,type:o,readonly:l,noborder:a,value:c}=e;return i`<nile-content-editor
43
+ .value=${c}
44
+ .options=${r}
45
+ .type=${o}
46
+ .readonly=${l}
47
+ .noborder=${a}
55
48
  .errorMessage=${s}
56
- @nile-change=${e=>{this.handleChange(e,r)}}
49
+ @nile-change=${e=>{this.handleChange(e,t,n)}}
57
50
  >
58
- </nile-content-editor>`}renderObjectMapper(){const e=this.currentInput.noborder;this.currentInput.mode;const i=this.currentInput.mode===$.CREATE?"Click to Create - Not Mapped":"Click to Edit";return t`<nile-input
59
- class=${o({"switcher-object-mapper":!0,"switcher-object-mapper--noborder":!!e})}
60
- .value=${i}
61
- readonly="true"
62
- @click="${e=>this.handleChange(e,u.OBJECT_MAPPER)}"
51
+ </nile-content-editor>`}handleChange(e,i,t){t===c.CHECKBOX?this.nileSwitchConfig[i].value=e.detail.checked:this.nileSwitchConfig[i].value=e.detail.value,e.stopPropagation(),this.emit("nile-change",{config:this.nileSwitchConfig})}renderIcon(e,t){const r=e.helperText,n=t.helperText,s=this.nileSwitchConfig.toggleSwitch?"stringinput":"header-functions",l=this.nileSwitchConfig.toggleSwitch?r||`switch to ${e.inputType}`:n||`switch to ${t.inputType}`;return i` <nile-tooltip
52
+ class=${o({"tooltip-container":!0})}
53
+ content=${l}
54
+ placement="bottom"
63
55
  >
64
56
  <nile-icon
65
- class="pointer-cursor switcher-object-mapper-icon"
66
- slot="suffix"
67
- name="collapse"
57
+ size="14"
58
+ class=${o({"pointer-cursor":!0})}
59
+ .name=${s}
68
60
  color="#005EA6"
69
- size="16"
70
- >
71
- </nile-icon>
72
- </nile-input>`}renderCodeEditor(e){const{value:i,multiLine:r,customAutoCompletions:s,disabled:n,readonly:l,errorMessage:a,error:c,inputType:d,noborder:h}=e;return t`<nile-code-editor
73
- part="switcher-code-editor"
74
- class=${o({"code-editor":!0})}
75
- @nile-expand="${e=>this.handleExpand(e,u.CODE_EDITOR)}"
76
- @nile-change="${e=>this.handleChange(e,u.CODE_EDITOR)}"
77
- .multiline="${r}"
78
- .value="${i}"
79
- .customOptions="${s}"
80
- ></nile-code-editor> `}handleExpand(e,t){this.currentInput.expand=e.detail.expand,this.emit("nile-change",{input:this.currentInput})}handleChange(e,t){switch(t){case u.OBJECT_MAPPER:this.currentInput.value="clicked";break;case u.CHECKBOX:this.currentInput.value=e.detail.checked;break;case u.CODE_EDITOR:default:this.currentInput.value=e.detail.value}e.stopPropagation(),this.emit("nile-change",{input:this.currentInput})}renderIcon(){const e=this.nileSwitchConfig.inputs,i=this.nileSwitchConfig.align===h.BLOCK?"top":"bottom";return t`
81
- <div part="icons-container" class="switcher-icons-container">
82
- ${l(e,((e,r)=>t` <nile-tooltip
83
- class=${o({"switcher-tooltip-container":!0})}
84
- content=${e.helperText}
85
- placement=${i}
86
- >
87
- <div class=${o({"switcher-icon-container":!0,current:r===this.current})}>
88
- <nile-icon
89
- size="16"
90
- class=${o({"pointer-cursor":!0})}
91
- .name=${e.icon}
92
- color="#000000"
93
- @click=${()=>this.toggleField(e,r)}
94
- ></nile-icon>
95
- <div>
96
-
97
- </nile-tooltip>`))}
98
- </div>
99
- `}toggleField(e,t){this.emit("nile-switch",{inputClicked:t,currentInput:e})}singleFieldSwitcher(){return this.currentInput||this.setCurrentInput(),t`
100
- ${n(this.currentInput.inputType,[[u.TEXT,()=>this.renderNileText(this.currentInput)],[u.CHECKBOX,()=>this.renderNileCheckBox(this.currentInput)],[u.TEXTAREA,()=>this.renderNileTextArea(this.currentInput)],[u.RADIO,()=>this.renderNileRadio(this.currentInput)],[u.DROPDOWN,()=>this.renderDropdown(this.currentInput)],[u.CONTENTEDITOR,()=>this.renderContentEditor(this.currentInput)],[u.OBJECT_MAPPER,()=>this.renderObjectMapper()],[u.CODE_EDITOR,()=>this.renderCodeEditor(this.currentInput)]],(()=>this.renderNileText(this.currentInput)))}
101
- `}render(){const e=this.hasSlotController.test("label"),i=this.nileSwitchConfig.align;return t`<div
102
- part="base"
103
- class=${o({"switcher-block":i===h.BLOCK,"switcher-inline":i===h.INLINE,"switcher-container":!0})}
104
- >
105
- <div class="label-container">
106
- ${e?t`
107
- <label
108
- part="switcher-label"
109
- class="switcher__label"
110
- for="input"
111
- >
112
- <slot name="label"></slot>
113
- </label>
114
- </div> `:""}
115
- ${this.renderIcon()}
116
- </div>
117
- ${this.singleFieldSwitcher()}
118
- </div>`}};m.styles=r,e([d({type:Object})],m.prototype,"nileSwitchConfig",void 0),e([d({type:Number})],m.prototype,"current",void 0),e([d({type:Object})],m.prototype,"currentInput",void 0),e([a(["current"],{waitUntilFirstUpdate:!0})],m.prototype,"handleSwitcherChange",null),m=e([i("nile-switcher")],m);export{m as N};
61
+ @click=${this.toggleField}
62
+ ></nile-icon>
63
+ </nile-tooltip>`}toggleField(){this.nileSwitchConfig.confirmation||(this.nileSwitchConfig={...this.nileSwitchConfig,toggleSwitch:!this.nileSwitchConfig.toggleSwitch}),this.emit("nile-switch",{config:this.nileSwitchConfig})}singleFieldSwitcher(e,t,r,n){const o=e.inputType,l=t.inputType;return i`
64
+ ${r?s(l,[[c.TEXTAREA,()=>this.renderNileTextArea(t,a.SWITCH)],[c.TEXT,()=>this.renderNileText(t,a.SWITCH)],[c.CONTENTEDITOR,()=>this.renderContentEditor(t,a.SWITCH)]],(()=>this.renderNileTextArea(t,a.SWITCH))):s(o,[[c.TEXT,()=>this.renderNileText(e,a.DEFAULT)],[c.CHECKBOX,()=>this.renderNileCheckBox(e,a.DEFAULT)],[c.TEXTAREA,()=>this.renderNileTextArea(e,a.DEFAULT)],[c.RADIO,()=>this.renderNileRadio(e,a.DEFAULT)],[c.DROPDOWN,()=>this.renderDropdown(this.nileSwitchConfig.defaultInput,a.DEFAULT)],[c.CONTENTEDITOR,()=>this.renderContentEditor(this.nileSwitchConfig.defaultInput,a.DEFAULT)]],(()=>this.renderNileText(e,a.DEFAULT)))}
65
+ ${n?"":this.renderIcon(e,t)}
66
+ `}render(){const{toggleSwitch:e,defaultInput:t,switchInput:r,disable:n}=this.nileSwitchConfig;return i`<div class="input-container">
67
+ ${this.singleFieldSwitcher(t,r,e,!!n)}
68
+ </div>`}};d.styles=r,e([l({type:Object})],d.prototype,"nileSwitchConfig",void 0),d=e([t("nile-switcher")],d);export{d as N};
@@ -12,7 +12,6 @@ export const styles = css `
12
12
  :host {
13
13
  box-sizing: border-box;
14
14
  font-size: 14px;
15
- overflow: hidden;
16
15
  }
17
16
 
18
17
  .content-editable-wrapper {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-content-editor.css.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 box-sizing: border-box;\n font-size: 14px;\n overflow: hidden;\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: 1px;\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: auto;\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 background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\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 .no-border {\n border: none;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-content-editor.css.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 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: 1px;\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: auto;\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 background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\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 .no-border {\n border: none;\n }\n`;\n\nexport default [styles];\n"]}