@aquera/nile-elements 0.1.66-beta-1.1 → 0.1.67-beta-1.1

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/demo/index.html CHANGED
@@ -92,13 +92,6 @@
92
92
  row.addEventListener('nile-change', (e) => {
93
93
  console.log('[row] nile-change detail:', e.detail);
94
94
  });
95
-
96
-
97
- setTimeout(() => {
98
-
99
- row.expanded = !row.expanded;
100
- console.log('Toggled row.expanded to', row.expanded);
101
- });
102
95
  });
103
96
  </script>
104
97
 
package/dist/index.js CHANGED
@@ -8055,7 +8055,7 @@ class tN{constructor(M){this._element=null;const e=M??window;this._node=e,M&&(th
8055
8055
  z-index: 1;
8056
8056
  }
8057
8057
 
8058
- `;let bL=class extends PM{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.onExpandIconClick=M=>{M.stopPropagation(),this.expanded=!this.expanded}}static get styles(){return[YL]}updated(M){super.updated?.(M),M.has("expanded")&&this.dispatchEvent(new CustomEvent("nile-change",{detail:{expanded:this.expanded},bubbles:!0,composed:!0}))}handleSortingAlter(M){const e=[...this.querySelectorAll("nile-table-header-item")];for(let t=0;t<e.length;t++){const i=e[t];i.textContent==M.detail.value.curr_sort_string||(i.sorting_ct=0)}}render(){return R`
8058
+ `;let bL=class extends PM{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1}static get styles(){return[YL]}toggleExpand(M){this.expanded=!this.expanded,this.dispatchEvent(new CustomEvent("nile-change",{detail:{expanded:this.expanded},bubbles:!0,composed:!0}))}handleSortingAlter(M){const e=[...this.querySelectorAll("nile-table-header-item")];for(let t=0;t<e.length;t++){const i=e[t];i.textContent==M.detail.value.curr_sort_string||(i.sorting_ct=0)}}render(){return R`
8059
8059
  <div part="row-container" class="row-container">
8060
8060
  <div
8061
8061
  part="nile-row"
@@ -8067,7 +8067,7 @@ class tN{constructor(M){this._element=null;const e=M??window;this._node=e,M&&(th
8067
8067
  <nile-icon
8068
8068
  class="expand-icon"
8069
8069
  name="${this.expanded?"chevron-up":"chevron-down"}"
8070
- @click=${this.onExpandIconClick}
8070
+ @click=${this.toggleExpand}
8071
8071
  role="button"
8072
8072
  size="10"
8073
8073
  aria-label="${this.expanded?"Collapse row":"Expand row"}">
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-table-row.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,t,s,n,o,i,l,_templateObject,_templateObject2,_templateObject3,a;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;n=_litDecoratorsJs.query;o=_litDecoratorsJs.customElement;},function(_nileTableRowCssCjsJs){i=_nileTableRowCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",a=/*#__PURE__*/function(_l){function a(){var _this;_classCallCheck(this,a);_this=_callSuper(this,a,arguments),_this.expandable=!1,_this.expanded=!1,_this.onExpandIconClick=function(e){e.stopPropagation(),_this.expanded=!_this.expanded;};return _this;}_inherits(a,_l);return _createClass(a,[{key:"updated",value:function updated(e){var _superPropGet2;(_superPropGet2=_superPropGet(a,"updated",this,3))!==null&&_superPropGet2!==void 0&&_superPropGet2([e]),e.has("expanded")&&this.dispatchEvent(new CustomEvent("nile-change",{detail:{expanded:this.expanded},bubbles:!0,composed:!0}));}},{key:"handleSortingAlter",value:function handleSortingAlter(e){var t=_toConsumableArray(this.querySelectorAll("nile-table-header-item"));for(var _s=0;_s<t.length;_s++){var _n=t[_s];_n.textContent==e.detail.value.curr_sort_string||(_n.sorting_ct=0);}}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div part=\"row-container\" class=\"row-container\">\n <div\n part=\"nile-row\"\n class=\"row "," ","\"\n @nile-click-sort=\"","\"\n >\n ","\n <slot></slot>\n </div>\n\n ","\n </div>\n "])),this.expandable?"expandable":"",this.expanded?"expanded":"",this.handleSortingAlter,this.expandable?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <slot name=\"expandableIcon\">\n <nile-icon\n class=\"expand-icon\"\n name=\"","\"\n @click=","\n role=\"button\"\n size=\"10\"\n aria-label=\"","\">\n </nile-icon> </slot>"])),this.expanded?"chevron-up":"chevron-down",this.onExpandIconClick,this.expanded?"Collapse row":"Expand row"):null,this.expandable&&this.expanded?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div class=\"expanded-content\">\n <slot name=\"expanded\"></slot>\n </div>"]))):null);}}],[{key:"styles",get:function get(){return[i];}}]);}(l));e([s({type:Boolean,reflect:!0})],a.prototype,"expandable",void 0),e([s({type:Boolean,reflect:!0})],a.prototype,"expanded",void 0),e([n('slot[name="expanded"]')],a.prototype,"_expandedSlot",void 0),_export("N",a=e([o("nile-table-row")],a));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-table-row.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,t,o,s,n,i,l,_templateObject,_templateObject2,_templateObject3,a;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){o=_litDecoratorsJs.property;s=_litDecoratorsJs.query;n=_litDecoratorsJs.customElement;},function(_nileTableRowCssCjsJs){i=_nileTableRowCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",a=/*#__PURE__*/function(_l){function a(){var _this;_classCallCheck(this,a);_this=_callSuper(this,a,arguments),_this.expandable=!1,_this.expanded=!1;return _this;}_inherits(a,_l);return _createClass(a,[{key:"toggleExpand",value:function toggleExpand(e){this.expanded=!this.expanded,this.dispatchEvent(new CustomEvent("nile-change",{detail:{expanded:this.expanded},bubbles:!0,composed:!0}));}},{key:"handleSortingAlter",value:function handleSortingAlter(e){var t=_toConsumableArray(this.querySelectorAll("nile-table-header-item"));for(var _o=0;_o<t.length;_o++){var _s=t[_o];_s.textContent==e.detail.value.curr_sort_string||(_s.sorting_ct=0);}}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div part=\"row-container\" class=\"row-container\">\n <div\n part=\"nile-row\"\n class=\"row "," ","\"\n @nile-click-sort=\"","\"\n >\n ","\n <slot></slot>\n </div>\n\n ","\n </div>\n "])),this.expandable?"expandable":"",this.expanded?"expanded":"",this.handleSortingAlter,this.expandable?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <slot name=\"expandableIcon\">\n <nile-icon\n class=\"expand-icon\"\n name=\"","\"\n @click=","\n role=\"button\"\n size=\"10\"\n aria-label=\"","\">\n </nile-icon> </slot>"])),this.expanded?"chevron-up":"chevron-down",this.toggleExpand,this.expanded?"Collapse row":"Expand row"):null,this.expandable&&this.expanded?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div class=\"expanded-content\">\n <slot name=\"expanded\"></slot>\n </div>"]))):null);}}],[{key:"styles",get:function get(){return[i];}}]);}(l));e([o({type:Boolean,reflect:!0})],a.prototype,"expandable",void 0),e([o({type:Boolean,reflect:!0})],a.prototype,"expanded",void 0),e([s('slot[name="expanded"]')],a.prototype,"_expandedSlot",void 0),_export("N",a=e([n("nile-table-row")],a));}};});
2
2
  //# sourceMappingURL=nile-table-row.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-table-row.cjs.js","sources":["../../../src/nile-table-row/nile-table-row.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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-row.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n *nile-table-row component.\n *\n * @tag nile-table-row\n *\n */\n@customElement('nile-table-row')\nexport class NileTableRow extends NileElement {\n /**\n * The styles for TableRow\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n\n\n\n @property({ type: Boolean, reflect: true }) expandable = false;\n\n\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n @query('slot[name=\"expanded\"]')\n private _expandedSlot!: HTMLSlotElement;\n\n\n \nprivate onExpandIconClick = (e: MouseEvent) => {\n e.stopPropagation();\n this.expanded = !this.expanded; \n};\n\nprotected updated(changedProps: Map<string, unknown>) {\n super.updated?.(changedProps);\n if (changedProps.has('expanded')) {\n this.dispatchEvent(new CustomEvent('nile-change', {\n detail: { expanded: this.expanded },\n bubbles: true,\n composed: true,\n }));\n }\n}\n\n\n\n private handleSortingAlter(event: CustomEvent) {\n const header_items: any = [\n ...this.querySelectorAll('nile-table-header-item'),\n ];\n for (let i = 0; i < header_items.length; i++) {\n const header = header_items[i];\n const haveIcon = header.textContent == event.detail.value.curr_sort_string;\n if (!haveIcon) {\n header.sorting_ct = 0;\n }\n }\n }\n\n public render(): TemplateResult {\n return html`\n <div part=\"row-container\" class=\"row-container\">\n <div\n part=\"nile-row\"\n class=\"row ${this.expandable ? 'expandable' : ''} ${this.expanded ? 'expanded' : ''}\"\n @nile-click-sort=\"${this.handleSortingAlter}\"\n >\n ${this.expandable\n ? html`\n <slot name=\"expandableIcon\">\n <nile-icon\n class=\"expand-icon\"\n name=\"${this.expanded ? 'chevron-up' : 'chevron-down'}\"\n @click=${this.onExpandIconClick}\n role=\"button\"\n size=\"10\"\n aria-label=\"${this.expanded ? 'Collapse row' : 'Expand row'}\">\n </nile-icon> </slot>`\n : null}\n <slot></slot>\n </div>\n\n ${this.expandable && this.expanded\n ? html`\n <div class=\"expanded-content\">\n <slot name=\"expanded\"></slot>\n </div>`\n : null}\n </div>\n `;\n }\n /* #endregion */\n}\nexport default NileTableRow;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-row': NileTableRow;\n }\n}\n"],"names":["NileTableRow","_l","a","constructor","this","expandable","expanded","onExpandIconClick","e","stopPropagation","_this","_inherits","_createClass","key","value","updated","changedProps","super","has","dispatchEvent","CustomEvent","detail","bubbles","composed","handleSortingAlter","event","header_items","querySelectorAll","i","length","header","textContent","curr_sort_string","sorting_ct","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","_templateObject3","get","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","query","customElement"],"mappings":"mqJAwBaA,CAAN,uBAAAC,EAAA,EAAA,SAAA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,EAAA,CADxBO,CAAAA,CAAc,mBACFlD"}
1
+ {"version":3,"file":"nile-table-row.cjs.js","sources":["../../../src/nile-table-row/nile-table-row.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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-row.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n *nile-table-row component.\n *\n * @tag nile-table-row\n *\n */\n@customElement('nile-table-row')\nexport class NileTableRow extends NileElement {\n /**\n * The styles for TableRow\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n\n\n\n @property({ type: Boolean, reflect: true }) expandable = false;\n\n\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n @query('slot[name=\"expanded\"]')\n private _expandedSlot!: HTMLSlotElement;\n\n\n private toggleExpand(e: MouseEvent): void {\n this.expanded = !this.expanded;\n this.dispatchEvent(new CustomEvent('nile-change', {\n detail: { expanded: this.expanded },\n bubbles: true,\n composed: true,\n }));\n }\n\n\n private handleSortingAlter(event: CustomEvent) {\n const header_items: any = [\n ...this.querySelectorAll('nile-table-header-item'),\n ];\n for (let i = 0; i < header_items.length; i++) {\n const header = header_items[i];\n const haveIcon = header.textContent == event.detail.value.curr_sort_string;\n if (!haveIcon) {\n header.sorting_ct = 0;\n }\n }\n }\n\n public render(): TemplateResult {\n return html`\n <div part=\"row-container\" class=\"row-container\">\n <div\n part=\"nile-row\"\n class=\"row ${this.expandable ? 'expandable' : ''} ${this.expanded ? 'expanded' : ''}\"\n @nile-click-sort=\"${this.handleSortingAlter}\"\n >\n ${this.expandable\n ? html`\n <slot name=\"expandableIcon\">\n <nile-icon\n class=\"expand-icon\"\n name=\"${this.expanded ? 'chevron-up' : 'chevron-down'}\"\n @click=${this.toggleExpand}\n role=\"button\"\n size=\"10\"\n aria-label=\"${this.expanded ? 'Collapse row' : 'Expand row'}\">\n </nile-icon> </slot>`\n : null}\n <slot></slot>\n </div>\n\n ${this.expandable && this.expanded\n ? html`\n <div class=\"expanded-content\">\n <slot name=\"expanded\"></slot>\n </div>`\n : null}\n </div>\n `;\n }\n /* #endregion */\n}\nexport default NileTableRow;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-row': NileTableRow;\n }\n}\n"],"names":["NileTableRow","a","this","expandable","expanded","_this","_inherits","_l","_createClass","key","value","toggleExpand","e","dispatchEvent","CustomEvent","detail","bubbles","composed","handleSortingAlter","event","header_items","querySelectorAll","i","length","header","textContent","curr_sort_string","sorting_ct","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","_templateObject3","get","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","query","customElement"],"mappings":"spIAwBaA,4BAAN,SAAAC,EAAA,uEAqBuCC,KAAAA,CAAUC,UAAAA,CAAAA,CAAG,EAGbD,KAAAA,CAAQE,QAAAA,CAAAA,CAAG,CA8DxD,QAAAC,KAAA,EAjFQC,SAAA,CAAAL,CAAA,CAAAM,EAAA,SAAAC,YAAA,CAAAP,CAAA,GAAAQ,GAAA,gBAAAC,KAAA,CAyBC,SAAAC,YAAAA,CAAaC,CACnBV,CAAAA,CAAAA,IAAAA,CAAKE,UAAYF,IAAKE,CAAAA,QAAAA,CACtBF,KAAKW,aAAc,CAAA,GAAIC,CAAAA,YAAY,aAAe,CAAA,CAChDC,OAAQ,CAAEX,QAAAA,CAAUF,KAAKE,QACzBY,CAAAA,CAAAA,OAAAA,CAAAA,CAAS,EACTC,QAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAEb,EAGO,GAAAR,GAAA,sBAAAC,KAAA,UAAAQ,kBAAAA,CAAmBC,GACzB,GAAMC,CAAAA,CA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AA,CAAAA,CAAA,CAA3CC,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,OAAAA,CAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyBzC,EAAA0C,SAAA,CAAA,UAAA,CAAA,IAAA,EAGrDL,CAAAA,CAAAA,CAAAA,CAAA,CADPM,CAAM,CAAA,uBAAA,CAAA,CAAA,CACiC3C,CAAA0C,CAAAA,SAAAA,CAAA,oBAAA,EA3B7B1C,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYqC,EAAA,CADxBO,CAAAA,CAAc,mBACF5C"}
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as s,query as n,customElement as o}from"lit/decorators.js";import{s as i}from"./nile-table-row.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";let a=class extends l{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.onExpandIconClick=e=>{e.stopPropagation(),this.expanded=!this.expanded}}static get styles(){return[i]}updated(e){super.updated?.(e),e.has("expanded")&&this.dispatchEvent(new CustomEvent("nile-change",{detail:{expanded:this.expanded},bubbles:!0,composed:!0}))}handleSortingAlter(e){const t=[...this.querySelectorAll("nile-table-header-item")];for(let s=0;s<t.length;s++){const n=t[s];n.textContent==e.detail.value.curr_sort_string||(n.sorting_ct=0)}}render(){return t`
1
+ import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as o,query as s,customElement as n}from"lit/decorators.js";import{s as i}from"./nile-table-row.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";let a=class extends l{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1}static get styles(){return[i]}toggleExpand(e){this.expanded=!this.expanded,this.dispatchEvent(new CustomEvent("nile-change",{detail:{expanded:this.expanded},bubbles:!0,composed:!0}))}handleSortingAlter(e){const t=[...this.querySelectorAll("nile-table-header-item")];for(let o=0;o<t.length;o++){const s=t[o];s.textContent==e.detail.value.curr_sort_string||(s.sorting_ct=0)}}render(){return t`
2
2
  <div part="row-container" class="row-container">
3
3
  <div
4
4
  part="nile-row"
@@ -10,7 +10,7 @@ import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as
10
10
  <nile-icon
11
11
  class="expand-icon"
12
12
  name="${this.expanded?"chevron-up":"chevron-down"}"
13
- @click=${this.onExpandIconClick}
13
+ @click=${this.toggleExpand}
14
14
  role="button"
15
15
  size="10"
16
16
  aria-label="${this.expanded?"Collapse row":"Expand row"}">
@@ -23,4 +23,4 @@ import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as
23
23
  <slot name="expanded"></slot>
24
24
  </div>`:null}
25
25
  </div>
26
- `}};e([s({type:Boolean,reflect:!0})],a.prototype,"expandable",void 0),e([s({type:Boolean,reflect:!0})],a.prototype,"expanded",void 0),e([n('slot[name="expanded"]')],a.prototype,"_expandedSlot",void 0),a=e([o("nile-table-row")],a);export{a as N};
26
+ `}};e([o({type:Boolean,reflect:!0})],a.prototype,"expandable",void 0),e([o({type:Boolean,reflect:!0})],a.prototype,"expanded",void 0),e([s('slot[name="expanded"]')],a.prototype,"_expandedSlot",void 0),a=e([n("nile-table-row")],a);export{a as N};
@@ -25,8 +25,7 @@ export declare class NileTableRow extends NileElement {
25
25
  expandable: boolean;
26
26
  expanded: boolean;
27
27
  private _expandedSlot;
28
- private onExpandIconClick;
29
- protected updated(changedProps: Map<string, unknown>): void;
28
+ private toggleExpand;
30
29
  private handleSortingAlter;
31
30
  render(): TemplateResult;
32
31
  }
@@ -26,10 +26,6 @@ let NileTableRow = class NileTableRow extends NileElement {
26
26
  */
27
27
  this.expandable = false;
28
28
  this.expanded = false;
29
- this.onExpandIconClick = (e) => {
30
- e.stopPropagation();
31
- this.expanded = !this.expanded;
32
- };
33
29
  /* #endregion */
34
30
  }
35
31
  /**
@@ -39,15 +35,13 @@ let NileTableRow = class NileTableRow extends NileElement {
39
35
  static get styles() {
40
36
  return [styles];
41
37
  }
42
- updated(changedProps) {
43
- super.updated?.(changedProps);
44
- if (changedProps.has('expanded')) {
45
- this.dispatchEvent(new CustomEvent('nile-change', {
46
- detail: { expanded: this.expanded },
47
- bubbles: true,
48
- composed: true,
49
- }));
50
- }
38
+ toggleExpand(e) {
39
+ this.expanded = !this.expanded;
40
+ this.dispatchEvent(new CustomEvent('nile-change', {
41
+ detail: { expanded: this.expanded },
42
+ bubbles: true,
43
+ composed: true,
44
+ }));
51
45
  }
52
46
  handleSortingAlter(event) {
53
47
  const header_items = [
@@ -75,7 +69,7 @@ let NileTableRow = class NileTableRow extends NileElement {
75
69
  <nile-icon
76
70
  class="expand-icon"
77
71
  name="${this.expanded ? 'chevron-up' : 'chevron-down'}"
78
- @click=${this.onExpandIconClick}
72
+ @click=${this.toggleExpand}
79
73
  role="button"
80
74
  size="10"
81
75
  aria-label="${this.expanded ? 'Collapse row' : 'Expand row'}">
@@ -1 +1 @@
1
- {"version":3,"file":"nile-table-row.js","sourceRoot":"","sources":["../../../src/nile-table-row/nile-table-row.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAAtC;;QASL,gBAAgB;QAEhB,qBAAqB;QAErB;;;WAGG;QAKyC,eAAU,GAAG,KAAK,CAAC;QAGnB,aAAQ,GAAG,KAAK,CAAC;QAOvD,sBAAiB,GAAG,CAAC,CAAa,EAAE,EAAE;YAC5C,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,CAAC,CAAC;QA4DA,gBAAgB;IAClB,CAAC;IA9FC;;;OAGG;IAC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,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc;yBAC7C,IAAI,CAAC,iBAAiB;;;8BAGjB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY;mCACxC;YACvB,CAAC,CAAC,IAAI;;;;UAIR,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ;YAChC,CAAC,CAAC,IAAI,CAAA;;;qBAGK;YACX,CAAC,CAAC,IAAI;;KAEX,CAAC;IACJ,CAAC;CAEF,CAAA;AA1E6C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAoB;AAGnB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AAGrD;IADP,KAAK,CAAC,uBAAuB,CAAC;mDACS;AA3B7B,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CA+FxB;;AACD,eAAe,YAAY,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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-row.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n *nile-table-row component.\n *\n * @tag nile-table-row\n *\n */\n@customElement('nile-table-row')\nexport class NileTableRow extends NileElement {\n /**\n * The styles for TableRow\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n\n\n\n @property({ type: Boolean, reflect: true }) expandable = false;\n\n\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n @query('slot[name=\"expanded\"]')\n private _expandedSlot!: HTMLSlotElement;\n\n\n \nprivate onExpandIconClick = (e: MouseEvent) => {\n e.stopPropagation();\n this.expanded = !this.expanded; \n};\n\nprotected updated(changedProps: Map<string, unknown>) {\n super.updated?.(changedProps);\n if (changedProps.has('expanded')) {\n this.dispatchEvent(new CustomEvent('nile-change', {\n detail: { expanded: this.expanded },\n bubbles: true,\n composed: true,\n }));\n }\n}\n\n\n\n private handleSortingAlter(event: CustomEvent) {\n const header_items: any = [\n ...this.querySelectorAll('nile-table-header-item'),\n ];\n for (let i = 0; i < header_items.length; i++) {\n const header = header_items[i];\n const haveIcon = header.textContent == event.detail.value.curr_sort_string;\n if (!haveIcon) {\n header.sorting_ct = 0;\n }\n }\n }\n\n public render(): TemplateResult {\n return html`\n <div part=\"row-container\" class=\"row-container\">\n <div\n part=\"nile-row\"\n class=\"row ${this.expandable ? 'expandable' : ''} ${this.expanded ? 'expanded' : ''}\"\n @nile-click-sort=\"${this.handleSortingAlter}\"\n >\n ${this.expandable\n ? html`\n <slot name=\"expandableIcon\">\n <nile-icon\n class=\"expand-icon\"\n name=\"${this.expanded ? 'chevron-up' : 'chevron-down'}\"\n @click=${this.onExpandIconClick}\n role=\"button\"\n size=\"10\"\n aria-label=\"${this.expanded ? 'Collapse row' : 'Expand row'}\">\n </nile-icon> </slot>`\n : null}\n <slot></slot>\n </div>\n\n ${this.expandable && this.expanded\n ? html`\n <div class=\"expanded-content\">\n <slot name=\"expanded\"></slot>\n </div>`\n : null}\n </div>\n `;\n }\n /* #endregion */\n}\nexport default NileTableRow;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-row': NileTableRow;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-table-row.js","sourceRoot":"","sources":["../../../src/nile-table-row/nile-table-row.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ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AAA;;;;uBAIQ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;8BAC/D,IAAI,CAAC,kBAAkB;;YAEzC,IAAI,CAAC,UAAU;YACf,CAAC,CAAC,IAAI,CAAA;;;;yBAIO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc;yBAC7C,IAAI,CAAC,YAAY;;;8BAGZ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY;mCACxC;YACvB,CAAC,CAAC,IAAI;;;;UAIR,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ;YAChC,CAAC,CAAC,IAAI,CAAA;;;qBAGK;YACX,CAAC,CAAC,IAAI;;KAEX,CAAC;IACJ,CAAC;CAEF,CAAA;AAjE6C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAoB;AAGnB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AAGrD;IADP,KAAK,CAAC,uBAAuB,CAAC;mDACS;AA3B7B,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CAsFxB;;AACD,eAAe,YAAY,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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-row.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n *nile-table-row component.\n *\n * @tag nile-table-row\n *\n */\n@customElement('nile-table-row')\nexport class NileTableRow extends NileElement {\n /**\n * The styles for TableRow\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n\n\n\n @property({ type: Boolean, reflect: true }) expandable = false;\n\n\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n @query('slot[name=\"expanded\"]')\n private _expandedSlot!: HTMLSlotElement;\n\n\n private toggleExpand(e: MouseEvent): void {\n this.expanded = !this.expanded;\n this.dispatchEvent(new CustomEvent('nile-change', {\n detail: { expanded: this.expanded },\n bubbles: true,\n composed: true,\n }));\n }\n\n\n private handleSortingAlter(event: CustomEvent) {\n const header_items: any = [\n ...this.querySelectorAll('nile-table-header-item'),\n ];\n for (let i = 0; i < header_items.length; i++) {\n const header = header_items[i];\n const haveIcon = header.textContent == event.detail.value.curr_sort_string;\n if (!haveIcon) {\n header.sorting_ct = 0;\n }\n }\n }\n\n public render(): TemplateResult {\n return html`\n <div part=\"row-container\" class=\"row-container\">\n <div\n part=\"nile-row\"\n class=\"row ${this.expandable ? 'expandable' : ''} ${this.expanded ? 'expanded' : ''}\"\n @nile-click-sort=\"${this.handleSortingAlter}\"\n >\n ${this.expandable\n ? html`\n <slot name=\"expandableIcon\">\n <nile-icon\n class=\"expand-icon\"\n name=\"${this.expanded ? 'chevron-up' : 'chevron-down'}\"\n @click=${this.toggleExpand}\n role=\"button\"\n size=\"10\"\n aria-label=\"${this.expanded ? 'Collapse row' : 'Expand row'}\">\n </nile-icon> </slot>`\n : null}\n <slot></slot>\n </div>\n\n ${this.expandable && this.expanded\n ? html`\n <div class=\"expanded-content\">\n <slot name=\"expanded\"></slot>\n </div>`\n : null}\n </div>\n `;\n }\n /* #endregion */\n}\nexport default NileTableRow;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-row': NileTableRow;\n }\n}\n"]}