smart-webcomponents-react 15.2.2 → 15.2.9
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/index.d.ts +4 -0
- package/package.json +1 -1
- package/source/modules/smart.3dchart.js +2 -2
- package/source/modules/smart.accordion.js +1 -1
- package/source/modules/smart.array.js +2 -2
- package/source/modules/smart.barcode.js +1 -1
- package/source/modules/smart.breadcrumb.js +1 -1
- package/source/modules/smart.button.js +1 -1
- package/source/modules/smart.buttongroup.js +1 -1
- package/source/modules/smart.calendar.js +1 -1
- package/source/modules/smart.card.js +1 -1
- package/source/modules/smart.cardview.js +2 -2
- package/source/modules/smart.carousel.js +1 -1
- package/source/modules/smart.chart.js +1 -1
- package/source/modules/smart.checkbox.js +1 -1
- package/source/modules/smart.checkinput.js +1 -1
- package/source/modules/smart.chip.js +1 -1
- package/source/modules/smart.colorinput.js +1 -1
- package/source/modules/smart.colorpanel.js +2 -2
- package/source/modules/smart.colorpicker.js +2 -2
- package/source/modules/smart.combobox.js +2 -2
- package/source/modules/smart.common.js +1 -1
- package/source/modules/smart.countryinput.js +1 -1
- package/source/modules/smart.dateinput.js +1 -1
- package/source/modules/smart.daterangeinput.js +2 -2
- package/source/modules/smart.datetimepicker.js +2 -2
- package/source/modules/smart.dockinglayout.js +1 -1
- package/source/modules/smart.dropdownbutton.js +1 -1
- package/source/modules/smart.dropdownlist.js +2 -2
- package/source/modules/smart.editor.js +2 -2
- package/source/modules/smart.element.js +1 -1
- package/source/modules/smart.fileupload.js +2 -2
- package/source/modules/smart.form.js +1 -1
- package/source/modules/smart.formulaparser.js +1 -1
- package/source/modules/smart.ganttchart.js +3 -3
- package/source/modules/smart.gauge.js +1 -1
- package/source/modules/smart.grid.js +6 -6
- package/source/modules/smart.gridpanel.js +2 -2
- package/source/modules/smart.input.js +1 -1
- package/source/modules/smart.kanban.js +2 -2
- package/source/modules/smart.layout.js +1 -1
- package/source/modules/smart.led.js +1 -1
- package/source/modules/smart.listbox.js +2 -2
- package/source/modules/smart.listmenu.js +1 -1
- package/source/modules/smart.map.js +1 -1
- package/source/modules/smart.maskedtextbox.js +1 -1
- package/source/modules/smart.menu.js +1 -1
- package/source/modules/smart.multicomboinput.js +1 -1
- package/source/modules/smart.multiinput.js +1 -1
- package/source/modules/smart.multilinetextbox.js +2 -2
- package/source/modules/smart.multisplitbutton.js +2 -2
- package/source/modules/smart.numberinput.js +1 -1
- package/source/modules/smart.numerictextbox.js +2 -2
- package/source/modules/smart.pager.js +2 -2
- package/source/modules/smart.passwordinput.js +1 -1
- package/source/modules/smart.passwordtextbox.js +1 -1
- package/source/modules/smart.path.js +1 -1
- package/source/modules/smart.phoneinput.js +1 -1
- package/source/modules/smart.pivottable.js +3 -3
- package/source/modules/smart.progressbar.js +1 -1
- package/source/modules/smart.qrcode.js +1 -1
- package/source/modules/smart.querybuilder.js +2 -2
- package/source/modules/smart.radiobutton.js +1 -1
- package/source/modules/smart.rating.js +1 -1
- package/source/modules/smart.router.js +1 -1
- package/source/modules/smart.scheduler.js +2 -2
- package/source/modules/smart.scrollbar.js +1 -1
- package/source/modules/smart.slider.js +1 -1
- package/source/modules/smart.sortable.js +1 -1
- package/source/modules/smart.splitter.js +1 -1
- package/source/modules/smart.switchbutton.js +1 -1
- package/source/modules/smart.table.js +3 -3
- package/source/modules/smart.tabs.js +1 -1
- package/source/modules/smart.tank.js +1 -1
- package/source/modules/smart.textarea.js +1 -1
- package/source/modules/smart.textbox.js +2 -2
- package/source/modules/smart.timeinput.js +1 -1
- package/source/modules/smart.timepicker.js +1 -1
- package/source/modules/smart.toast.js +1 -1
- package/source/modules/smart.tooltip.js +1 -1
- package/source/modules/smart.tree.js +1 -1
- package/source/modules/smart.validator.js +1 -1
- package/source/modules/smart.window.js +2 -2
- package/source/smart.3dchart.js +1 -1
- package/source/smart.accordion.js +1 -1
- package/source/smart.ajax.js +1 -1
- package/source/smart.array.js +1 -1
- package/source/smart.barcode.js +1 -1
- package/source/smart.bootstrap.js +1 -1
- package/source/smart.breadcrumb.js +1 -1
- package/source/smart.button.js +1 -1
- package/source/smart.buttongroup.js +1 -1
- package/source/smart.calendar.js +1 -1
- package/source/smart.card.js +1 -1
- package/source/smart.cardview.js +1 -1
- package/source/smart.carousel.js +1 -1
- package/source/smart.chart.annotations.js +1 -1
- package/source/smart.chart.api.js +1 -1
- package/source/smart.chart.core.js +1 -1
- package/source/smart.chart.js +1 -1
- package/source/smart.chart.rangeselector.js +1 -1
- package/source/smart.chart.waterfall.js +1 -1
- package/source/smart.checkbox.js +1 -1
- package/source/smart.checkinput.js +1 -1
- package/source/smart.chip.js +1 -1
- package/source/smart.colorinput.js +1 -1
- package/source/smart.colorpanel.js +1 -1
- package/source/smart.colorpicker.js +1 -1
- package/source/smart.combobox.js +1 -1
- package/source/smart.complex.js +1 -1
- package/source/smart.core.js +1 -1
- package/source/smart.countryinput.js +1 -1
- package/source/smart.data.js +1 -1
- package/source/smart.date.js +1 -1
- package/source/smart.dateformatpanel.js +1 -1
- package/source/smart.dateinput.js +1 -1
- package/source/smart.daterangeinput.js +1 -1
- package/source/smart.datetimepicker.js +1 -1
- package/source/smart.dockinglayout.js +1 -1
- package/source/smart.draw.js +1 -1
- package/source/smart.dropdownbutton.js +1 -1
- package/source/smart.dropdownlist.js +1 -1
- package/source/smart.editor.js +1 -1
- package/source/smart.element.js +1 -1
- package/source/smart.elements.js +6 -6
- package/source/smart.export.js +1 -1
- package/source/smart.fileupload.js +1 -1
- package/source/smart.filter.js +1 -1
- package/source/smart.filterbuilder.js +1 -1
- package/source/smart.filterpanel.js +1 -1
- package/source/smart.form.js +1 -1
- package/source/smart.format.js +1 -1
- package/source/smart.formulaparser.js +1 -1
- package/source/smart.ganttchart.js +1 -1
- package/source/smart.gauge.js +1 -1
- package/source/smart.grid.cell.js +2 -2
- package/source/smart.grid.chart.js +1 -1
- package/source/smart.grid.column.js +1 -1
- package/source/smart.grid.core.js +2 -2
- package/source/smart.grid.dialog.js +1 -1
- package/source/smart.grid.edit.js +1 -1
- package/source/smart.grid.export.js +1 -1
- package/source/smart.grid.filter.js +1 -1
- package/source/smart.grid.group.js +1 -1
- package/source/smart.grid.js +1 -1
- package/source/smart.grid.menu.js +2 -2
- package/source/smart.grid.pager.js +1 -1
- package/source/smart.grid.reorder.js +1 -1
- package/source/smart.grid.resize.js +1 -1
- package/source/smart.grid.row.js +1 -1
- package/source/smart.grid.select.js +1 -1
- package/source/smart.grid.sort.js +1 -1
- package/source/smart.grid.toolbar.js +1 -1
- package/source/smart.grid.tree.js +1 -1
- package/source/smart.grid.view.js +1 -1
- package/source/smart.gridpanel.js +1 -1
- package/source/smart.input.js +1 -1
- package/source/smart.kanban.js +1 -1
- package/source/smart.layout.js +1 -1
- package/source/smart.led.js +1 -1
- package/source/smart.listbox.js +2 -2
- package/source/smart.listmenu.js +1 -1
- package/source/smart.map.js +1 -1
- package/source/smart.maskedtextbox.js +1 -1
- package/source/smart.math.js +1 -1
- package/source/smart.menu.js +1 -1
- package/source/smart.multicomboinput.js +1 -1
- package/source/smart.multiinput.js +1 -1
- package/source/smart.multilinetextbox.js +1 -1
- package/source/smart.multisplitbutton.js +1 -1
- package/source/smart.numberformatpanel.js +1 -1
- package/source/smart.numberinput.js +1 -1
- package/source/smart.numeric.js +1 -1
- package/source/smart.numerictextbox.js +1 -1
- package/source/smart.pager.js +2 -2
- package/source/smart.passwordinput.js +1 -1
- package/source/smart.passwordtextbox.js +1 -1
- package/source/smart.path.js +1 -1
- package/source/smart.phoneinput.js +1 -1
- package/source/smart.pivottable.js +1 -1
- package/source/smart.powerbutton.js +1 -1
- package/source/smart.progressbar.js +1 -1
- package/source/smart.qrcode.js +1 -1
- package/source/smart.radiobutton.js +1 -1
- package/source/smart.rating.js +1 -1
- package/source/smart.router.js +1 -1
- package/source/smart.scheduler.js +1 -1
- package/source/smart.scrollbar.js +1 -1
- package/source/smart.slider.js +1 -1
- package/source/smart.sortable.js +1 -1
- package/source/smart.splitter.js +1 -1
- package/source/smart.switchbutton.js +1 -1
- package/source/smart.table.js +1 -1
- package/source/smart.tabs.js +1 -1
- package/source/smart.tank.js +1 -1
- package/source/smart.textarea.js +1 -1
- package/source/smart.textbox.js +1 -1
- package/source/smart.tickintervalhandler.js +1 -1
- package/source/smart.timeinput.js +1 -1
- package/source/smart.timepicker.js +1 -1
- package/source/smart.toast.js +1 -1
- package/source/smart.tooltip.js +1 -1
- package/source/smart.tree.js +1 -1
- package/source/smart.validationpanel.js +1 -1
- package/source/smart.validator.js +1 -1
- package/source/smart.window.js +1 -1
- package/source/typescript/smart.elements.d.ts +4 -0
- package/source/typescript/smart.table.d.ts +4 -0
- package/table/table.d.ts +3 -0
- package/table/table.esm.js +12 -0
- package/table/table.umd.js +12 -0
- package/source/modules/smart.ribbon.js +0 -286
- package/source/smart.ribbon.js +0 -6
- package/source/styles/components/smart.ribbon.css +0 -13
- package/source/styles/default/smart.ribbon.css +0 -235
package/source/smart.ribbon.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* Smart UI v15.2.5 (2023-05-19)
|
|
3
|
-
Copyright (c) 2011-2023 jQWidgets.
|
|
4
|
-
License: https://htmlelements.com/license/ */ //
|
|
5
|
-
|
|
6
|
-
Smart("smart-ribbon",class extends Smart.ContentElement{static get properties(){return{animationType:{type:"string",value:"advanced",allowedValues:["none","simple","advanced"]},collapsible:{type:"boolean",value:!1},selectedTab:{type:"number",value:0},dataSource:{type:"array",value:[]},disabled:{type:"boolean",value:!1},fileMenu:{type:"object",value:{enabled:{type:"boolean",value:!0},items:{type:"array",value:[]},type:{type:"string",value:"dropDown",allowedValues:["dropDown","button"]}}},locale:{type:"string",value:""},messages:{type:"object",value:{en:{collapse:"Collapse",expand:"Expand"}}}}}static get styleUrls(){return["smart.ribbon.css"]}_setDefaults(){this._itemSizes=["grouped","iconOnly","verySmall","small","normal","large"]}template(){return'<div class="smart-ribbon"><div class="smart-ribbon-header"><div class="smart-ribbon-file-container"></div><div class="smart-ribbon-header-tabs"></div></div><div class="smart-ribbon-tabs"></div></div>'}refresh(){this._refreshHeaderTabs(),this._refreshTabs(),this._setFileMenu()}static get listeners(){return{}}_getNextSize(e){const t=["grouped","iconOnly","verySmall","small","normal","large"],s=t.indexOf(e);return t[s+1]}_getPreviousSize(e){const t=["grouped","iconOnly","verySmall","small","normal","large"],s=t.indexOf(e);return t[s-1]}propertyChangedHandler(e,t,s){super.propertyChangedHandler(e,t,s),"selectedTab"!==e&&this.refresh()}async _calculateSizes(e,t,s){let i=t.cloneNode(!0);i.style.width=document.querySelector(".smart-ribbon-tabs").offsetWidth+"px",i.style.height=(t.offsetHeight||50)+"px",i.style.position="absolute",i.style.visibility="hidden",i.style.display="block",i.style.left="-10000px",s&&i.setAttribute("collapsed",""),this._setGroupSideContainer(s,i.querySelector(".smart-ribbon-tab-side-container")),this.appendChild(i),await this._attemptReduce(i,e,s),i.parentNode.removeChild(i)}_attemptResize(e){let t=e;if(t||(t=this.querySelector(".smart-ribbon-tab[active]")),!t)return!1;const s=parseInt(t.getAttribute("tab-index")),i=this.dataSource[s],o=t.offsetWidth,a=t.querySelectorAll(".smart-ribbon-group"),r=this.collapsed?i._collapsedStates:i._states;for(let e=0;e<r.length;e++){let t=r[e];if(t.width<o||e===r.length-1){for(let s=e;s<r.length;s++){const e=r[s];if(e.width===t.width&&e.groupIndex<t.groupIndex&&(t=e),e.width!==t.width)break}for(let e=a.length-1;e>=0;e--){const s=a[e].querySelector(".smart-ribbon-group-items"),i=t.ribbonGroups[e];(this.collapsed||e>=t.groupIndex&&s.appliedSize!==t.size)&&this._refreshGroup(i,s,t.size,this.collapsed)}return!0}}}_resizeEventHandler(){this._attemptResize()}_checkForOverflow(e){return e||(e=this.querySelector(".smart-ribbon-tab[active]")),!!e&&e.querySelector(".smart-ribbon-tab-groups").offsetWidth+e.querySelector(".smart-ribbon-tab-side-container").offsetWidth>e.offsetWidth}_checkForOverflowAsync(e){const t=this;return new Promise(((s,i)=>{setTimeout((()=>{s(t._checkForOverflow(e))}))}))}_getWidthAsync(e){return new Promise(((t,s)=>{setTimeout((()=>{const s=e.querySelector(".smart-ribbon-tab-groups"),i=e.querySelector(".smart-ribbon-tab-side-container");t(s.offsetWidth+i.offsetWidth)}))}))}async _attemptReduce(e,t,s){const i=parseInt(e.getAttribute("tab-index")),o=Array.from(e.querySelectorAll(".smart-ribbon-group"));for(let a=o.length-1;a>=0;a--){const r=o[a].querySelector(".smart-ribbon-group-items"),l=this.dataSource[i].ribbonGroups[a];this._refreshGroup(l,r,t,s);const n=await this._getWidthAsync(e);s?this.dataSource[i]._collapsedStates.push({ribbonGroups:this.dataSource[i].ribbonGroups,width:n,size:t,groupIndex:a}):this.dataSource[i]._states.push({ribbonGroups:this.dataSource[i].ribbonGroups,width:n,size:t,groupIndex:a})}return"grouped"!==t&&await this._attemptReduce(e,this._getPreviousSize(t),s),!0}_refreshGroup(e,t,s,i=!1){const o=this;if(void 0===i&&(i=o.collapsed),t.appliedSize!==s||t.appliedState!==i){for(;t.firstChild;)t.removeChild(t.firstChild);if(t.appliedSize=s,t.appliedState=i,"grouped"!==s||i)this._setGroupItems(e,t,s,i),t.parentNode.classList.remove("smart-ribbon-group-grouped");else{const s={label:e.label,type:"dropDownButton",settings:{dropDownAppendTo:"body",dropDownWidth:"auto"}},i=o._setRibbonGroupControl(s);i.classList.add("smart-ribbon-group-drop-down");const a=document.createElement("div");this._setRibbonGroup(e,a,"large"),i.querySelector("smart-drop-down-button").appendChild(a),t.appendChild(i),t.parentNode.classList.add("smart-ribbon-group-grouped")}}}_handleTabSelection(e){const t=this,s=(t._headerTabs,t.querySelector(".smart-ribbon-header-tab[selected]"));s&&s.removeAttribute("selected"),e.setAttribute("selected","");const i=e.getAttribute("tab-index"),o=t.querySelector(".smart-ribbon-tab[active]");o&&o.removeAttribute("active");const a=t.querySelector(`.smart-ribbon-tab[tab-index="${i}"]`);a&&a.setAttribute("active",""),t._attemptResize()}_selectTab(e){const t=this._headerTabs;e<0||e>=t.length||this._handleTabSelection(t[e])}_setFileMenu(){const e=this;!e.fileMenu.visible&&e.fileButton&&(e.fileButton.parentNode.removeChild(e.fileButton),e.fileButton=null);let t=e._fileButton;if(!t){if("dropDown"===this.fileMenu.type){e._fileButton=document.createElement("smart-drop-down-button"),e._fileButton.setAttribute("dropDownOpenMode","click"),e._fileButton.placeholder="File",e._fileButton.dropDownWidth="auto",e._fileButton.dropDownHeight="auto",e._fileButton.verticalScrollBarVisibility="hidden";const t=document.createElement("smart-menu");t.classList.add("smart-ribbon-file-menu"),t.mode="tree",t.dataSource=e.fileMenu.items,t.animation=e.animationType,e._fileButton.appendChild(t)}else e._fileButton=document.createElement("smart-button"),e._fileButton.textContent="File";e._fileButton.classList.add("smart-ribbon-file-button"),e._fileButton.addEventListener("click",(function(){})),this.fileMenu.template?"string"==typeof this.fileMenu.template?(e.querySelector(".smart-ribbon-file-container").innerHTML=this.fileMenu.template,e._fileButton=e.querySelector(".smart-ribbon-file-container").firstChild):"function"==typeof this.fileMenu.template?(this.fileMenu.template(t),e.querySelector(".smart-ribbon-file-container").appendChild(e._fileButton)):this.fileMenu.template instanceof HTMLElement&&e.querySelector(".smart-ribbon-file-container").appendChild(this.fileMenu.template):e.querySelector(".smart-ribbon-file-container").appendChild(e._fileButton)}}_refreshHeaderTabs(){this._setHeaderTabs()}async _refreshTabs(){this.collapsed?await this._setCollapsedTabs():await this._setRibbonTabs(),setTimeout((()=>{this.collapsed?this._setRibbonTabs():this._setCollapsedTabs()}))}_applyCollapseSize(e,t){for(let s=e.collapseSizes.length-1;s>=0;s--)if(this._itemSizes.indexOf(e.collapseSizes[s])-1<=this._itemSizes.indexOf(t))return e.size=e.collapseSizes[s],e.collapseSizes[s];return"hidden"}_applySize(e,t){for(let s=e.allowedSizes.length-1;s>=0;s--)if(this._itemSizes.indexOf(e.allowedSizes[s])<=this._itemSizes.indexOf(t))return e.size=e.allowedSizes[s],e.allowedSizes[s]}_setHeaderTabs(){const e=this,t=e.querySelector(".smart-ribbon-header-tabs"),s=e.dataSource;for(;t.firstChild;)t.removeChild(t.firstChild);for(let i=0;i<s.length;i++){const o=s[i],a=document.createElement("div");a.classList.add("smart-ribbon-header-tab"),a.innerHTML='<span class="smart-ribbon-header-tab-label">'+o.label+"</span>",a.setAttribute("tab-index",i),a.addEventListener("click",(function(){e.selectedTab=parseInt(this.getAttribute("tab-index")),e._handleTabSelection(this)})),t.appendChild(a),i===e.selectedTab&&a.setAttribute("selected","")}e._headerTabs=t.querySelectorAll(".smart-ribbon-header-tab")}async _setCollapsedTabs(e="verySmall"){let t=this.querySelector(".smart-ribbon-tabs").cloneNode(!0);await this._setRibbonTabs(e,t,!0),this._collapsedTabs=t}async _setRibbonTabs(e="large",t,s){const i=this;t||(t=i.querySelector(".smart-ribbon-tabs"));const o=i.dataSource;for(;t.firstChild;)t.removeChild(t.firstChild);for(let a=0;a<o.length;a++){let r=o[a];const l=document.createElement("div");l.classList.add("smart-ribbon-tab"),l.setAttribute("tab-index",a),l.setAttribute("allowed-size",e);const n=document.createElement("div");n.classList.add("smart-ribbon-tab-groups"),l.appendChild(n);const d=document.createElement("div");d.classList.add("smart-ribbon-tab-side-container"),d.classList.add(this.collapsed?"collapsed":"expanded"),l.appendChild(d),this._setGroupSideContainer(this.collapsed,d);const c=r.ribbonGroups;for(let t=0;t<c.length;t++)i._setRibbonGroup(c[t],n,e);t.appendChild(l),r._states||(r._states=[]),r._collapsedStates||(r._collapsedStates=[]),await this._calculateSizes(e,l,s),i.selectedTab===a&&i._selectTab(a)}s||(this._ribbonTabs=t)}_setGroupSideContainer(e,t){const s=this,i=document.createElement("smart-button");i.innerHTML='<span class="smart-ribbon-tab-collapse-button"></span>',i.classList.add("flat"),i.classList.add("very-small"),i.addEventListener("click",(function(){s.collapsed?s.expand():s.collapse()})),t.appendChild(i)}expand(){const e=this;e.collapsed=!1,this._collapsedTabs.replaceWith(this._ribbonTabs),Array.from(e.querySelector(".smart-ribbon-tabs").children).forEach((e=>{e.removeAttribute("collapsed")})),e._selectTab(e.selectedTab)}collapse(){const e=this;e._collapsedTabs&&(e.collapsed=!0,this._ribbonTabs.replaceWith(this._collapsedTabs),Array.from(e.querySelector(".smart-ribbon-tabs").children).forEach((e=>{e.setAttribute("collapsed","")})),e._selectTab(e.selectedTab))}_setGroupDefaultValues(e){const t=["grouped","iconOnly","verySmall","small","normal","large"];e.size&&t.includes(e.size)||(e.size="normal"),e.allowedSizes||(e.allowedSizes=t.slice(0,t.indexOf(e.size)))}_setItemDefaultValues(e,t){const s=["iconOnly","verySmall","small","normal","large"],i=["hidden","iconOnly","verySmall"];e.size&&s.includes(e.size)||(e.size="normal"),t&&"normal"==e.size&&(e.size="verySmall"),e.allowedSizes||(e.allowedSizes=s.slice(0,s.indexOf(e.size)+1)),e.collapseSizes||(e.collapseSizes=i.slice(0,i.indexOf(e.collapseSize)+1)),e.settings||(e.settings={})}_setRibbonGroup(e,t,s="large",i){const o=document.createElement("div");o.classList.add("smart-ribbon-group");const a=document.createElement("div");a.classList.add("smart-ribbon-group-items"),o.appendChild(a),this._setGroupItems(e,a,s,i);const r=document.createElement("div");r.classList.add("smart-ribbon-group-header"),r.innerHTML='<span class="smart-ribbon-group-header-label">'+e.label+"</span>",o.appendChild(r),t.appendChild(o)}_setGroupItems(e,t,s,i){const o=e.ribbonItems;this._setGroupDefaultValues(e),this._itemSizes.indexOf(s)<=this._itemSizes.indexOf(e.wrapSize)?t.classList.add("smart-ribbon-group-small"):t.classList.remove("smart-ribbon-group-small");for(let e=0;e<o.length;e++)if("group"!==o[e].type)this._setItemDefaultValues(o[e],i),i?this._applyCollapseSize(o[e],s):this._applySize(o[e],s),this._setRibbonGroupControl(o[e],t);else{this._setGroupDefaultValues(o[e]),this._applySize(o[e],s);const i=document.createElement("div");i.classList.add("smart-ribbon-inner-group"),"vertical"===o[e].direction?i.classList.add("smart-ribbon-vertical-group"):"horizontal"===o[e].direction&&i.classList.add("smart-ribbon-horizontal-group"),this._setGroupItems(o[e],i,s),t.appendChild(i)}}_setRibbonGroupControl(e,t){const s=document.createElement("div");return s.classList.add("smart-ribbon-group-item"),e.parentNode=s,e.type.indexOf("button")>-1||e.type.indexOf("Button")>-1?s.appendChild(this._createButtonControl(e,e.type)):"colorInput"===e.type?s.appendChild(this._createColorInputControl(e)):"colorPicker"===e.type?s.appendChild(this._createColorPickerControl(e)):"comboBox"===e.type?s.appendChild(this._createComboBoxControl(e)):"dropDownList"===e.type?s.appendChild(this._createDropDownListControl(e)):"input"===e.type?s.appendChild(this._createInputControl(e)):"separator"===e.type?s.appendChild(this._createSeparatorControl(e)):s.appendChild(this._createCustomControl(e)),t&&t.appendChild(s),s}_createButtonControl(e,t="button"){let s,i;switch(t){case"button":s=document.createElement("smart-button"),this._applyItemSettings(s,e);break;case"toggleButton":s=document.createElement("smart-toggle-button"),this._applyItemSettings(s,e);break;case"dropDownButton":s=document.createElement("smart-drop-down-button"),i=document.createElement("span"),i.innerHTML=e.label,this._handleIcon(e,i),e.settings||(e.settings={}),e.settings.placeholderTemplate=i.innerHTML,e.settings.dropDownButtonPosition="bottom",this._applyItemSettings(s,e,["label","icon"]);break;case"multiSplitButton":s=document.createElement("smart-multi-split-button"),this._applyItemSettings(s,e)}return s.classList.add("smart-ribbon-group-item-button"),s}_createColorInputControl(e){const t=document.createElement("smart-color-input");return this._applyItemSettings(t,e),t.classList.add("smart-ribbon-group-item-color-input"),t}_createColorPickerControl(e){const t=document.createElement("smart-color-picker");return e.settings.dropDownAppendTo||(e.settings.dropDownAppendTo="body"),"iconOnly"!==e.size&&"small"!==e.size||e.settings.valueDisplayMode||(e.settings.valueDisplayMode="colorBox"),e.settings.dropDownOpenMode||(e.settings.dropDownOpenMode="dropDownButton"),this._applyItemSettings(t,e,["label","icon"]),t.classList.add("smart-ribbon-group-item-color-picker"),t}_createComboBoxControl(e){const t=document.createElement("smart-combo-box");return t.classList.add("smart-ribbon-group-item-combo-box"),e.settings.dropDownAppendTo||(e.settings.dropDownAppendTo="body"),this._applyItemSettings(t,e,["label","icon"]),t}_createDropDownListControl(e){const t=document.createElement("smart-drop-down-list");return t.classList.add("smart-ribbon-group-item-drop-down-list"),e.settings.dropDownAppendTo||(e.settings.dropDownAppendTo="body"),this._applyItemSettings(t,e,["label","icon"]),t}_createInputControl(e){const t=document.createElement("smart-input");return this._applyItemSettings(t,e),t.classList.add("smart-ribbon-group-item-input"),t}_createSeparatorControl(){const e=document.createElement("div");return e.classList.add("smart-ribbon-group-item-separator"),e}_createCustomControl(e){const t=document.createElement("div");return this._applyItemSettings(t,e),t.classList.add("smart-ribbon-group-item-custom-control"),t}_applyItemSettings(e,t,s=[]){if(t._template=t.template,t._collapsedTemplate=t.collapsedTemplate,t.id&&(e.id=t.id),t.class&&t.class.split(" ").forEach((t=>e.classList.add(t))),t.width&&(e.style.width=t.width),t.disabled&&(e.disabled=t.disabled),t.onChange&&e.addEventListener("change",t.onChange),t.onClick&&e.addEventListener("click",t.onClick),t.icon&&!s.includes("icon")&&this._handleIcon(t,e),t.label&&!t.collapsed&&"iconOnly"!==t.size&&!s.includes("label")){const s=document.createElement("span");s.classList.add("smart-ribbon-group-item-label"),s.textContent=t.label,e.appendChild(s)}if((t.tooltip||"iconOnly"===t.size)&&!s.includes("tooltip")){const s=t.tooltip||t.label,i=this._createTooltip(e,s);t.parentNode.appendChild(i)}if(t.settings)for(let s in t.settings)e[s]=t.settings[s];switch(t.template&&!t.collapsed&&("string"==typeof t.template?e.innerHTML=t.template:"function"==typeof t.template?t.template(t,t.size):t.template instanceof HTMLElement&&e.appendChild(t.template)),t.collapsedTemplate&&t.collapsed&&("string"==typeof t.collapsedTemplate?e.innerHTML=t.collapsedTemplate:"function"==typeof t.collapsedTemplate?t.collapsedTemplate(t):t.collapsedTemplate instanceof HTMLElement&&e.appendChild(t.collapsedTemplate)),t.size){case"large":e.classList.add("large");break;case"normal":e.classList.add("normal");break;case"small":e.classList.add("small");break;case"verySmall":e.classList.add("very-small");break;case"iconOnly":e.classList.add("very-small"),e.classList.add("icon-only")}}_handleIcon(e,t){const s=document.createElement("span");s.classList.add("smart-ribbon-group-item-icon");let i=[];if(!e.icon)return[];if("<"===e.icon[0]?s.innerHTML=e.icon:e.icon.split(" ").forEach((e=>{s.classList.add(e)})),("large"===e.size||"normal"===e.size)&&!e.collapsed){const e=document.createElement("div");e.classList.add("smart-ribbon-group-item-flex-break"),t?t.prepend(e):i.push(e)}return t?t.prepend(s):i.push(s),i}_createTooltip(e,t){const s=document.createElement("smart-tooltip");return s.classList.add("smart-ribbon-group-item-tooltip"),s.selector=e,s.innerHTML=t,s.theme=this.theme,s.position="bottom",s}ready(){super.ready(),this._setDefaults(),this.refresh(),this._resizeObserver=new ResizeObserver((e=>{clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout((()=>{this._resizeEventHandler()}),10)})),this._resizeObserver.observe(this.querySelector(".smart-ribbon-tabs"))}});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
@import url("./../default/smart.ribbon.css");
|
|
2
|
-
@import url("./../default/smart.scrollviewer.css");
|
|
3
|
-
@import url("./../default/smart.menu.css");
|
|
4
|
-
@import url("./../default/smart.button.css");
|
|
5
|
-
@import url("./../default/smart.toggle.css");
|
|
6
|
-
@import url("./../default/smart.dropdown.css");
|
|
7
|
-
@import url("./../default/smart.textbox.css");
|
|
8
|
-
@import url("./../default/smart.dropdownbutton.css");
|
|
9
|
-
@import url("./../default/smart.dropdownlist.css");
|
|
10
|
-
@import url("./../default/smart.multisplitbutton.css");
|
|
11
|
-
@import url("./../default/smart.colorpanel.css");
|
|
12
|
-
@import url("./../default/smart.colorpicker.css");
|
|
13
|
-
@import url("./../default/smart.tooltip.css");
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
smart-ribbon .smart-ribbon-header {
|
|
2
|
-
display: flex;
|
|
3
|
-
border: var(--smart-border-width) solid var(--smart-surface);
|
|
4
|
-
background: var(--smart-surface);
|
|
5
|
-
color: var(--smart-surface-color);
|
|
6
|
-
padding: var(--smart-tabs-header-padding);
|
|
7
|
-
height: var(--smart-ribbon-tab-header-height);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.smart-ribbon-file-container smart-drop-down-button .smart-action-button{
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
width: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.smart-ribbon-file-container smart-drop-down-button, .smart-ribbon-file-container smart-button{
|
|
17
|
-
text-align: center;
|
|
18
|
-
--smart-editor-addon-width: 0;
|
|
19
|
-
--smart-border-radius: 0;
|
|
20
|
-
--smart-border-top-right-radius: var(--smart-border-radius);
|
|
21
|
-
--smart-border-bottom-right-radius: var(--smart-border-radius);
|
|
22
|
-
--smart-border-top-left-radius: var(--smart-border-radius);
|
|
23
|
-
--smart-border-bottom-left-radius: var(--smart-border-radius);
|
|
24
|
-
border-radius: 0px;
|
|
25
|
-
min-width: 70px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.smart-ribbon-file-container smart-menu {
|
|
29
|
-
--smart-menu-vertical-default-height: auto;
|
|
30
|
-
border: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.smart-ribbon-header .smart-ribbon-header-tabs {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex: 1;
|
|
36
|
-
overflow: hidden;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.smart-ribbon-header-tabs .smart-ribbon-header-tab{
|
|
40
|
-
display: flex;
|
|
41
|
-
flex: 1;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
border: var(--smart-border-width) solid var(--smart-surface);
|
|
45
|
-
border-bottom: none;
|
|
46
|
-
background: var(--smart-surface);
|
|
47
|
-
color: var(--smart-surface-color);
|
|
48
|
-
padding: var(--smart-tabs-header-tab-padding);
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
max-width: var(--smart-ribbon-tab-header-width);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.smart-ribbon-header-tabs .smart-ribbon-header-tab:hover {
|
|
54
|
-
background: var(--smart-ui-state-hover);
|
|
55
|
-
color: var(--smart-ui-state-color-hover);
|
|
56
|
-
border-color: var(--smart-ui-state-border-hover);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.smart-ribbon-header-tabs .smart-ribbon-header-tab[selected] {
|
|
60
|
-
background-color: var(--smart-ui-state-selected);
|
|
61
|
-
border-color: var(--smart-item-border-selected);
|
|
62
|
-
border-width: 0 0 var(--smart-border-width) 0;
|
|
63
|
-
color: var(--smart-ui-state-color-selected);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.smart-ribbon-tabs .smart-ribbon-tab {
|
|
67
|
-
height: var(--smart-ribbon-tab-height);
|
|
68
|
-
display: none;
|
|
69
|
-
flex-direction: row;
|
|
70
|
-
border: var(--smart-border-width) solid var(--smart-surface);
|
|
71
|
-
border-top: none;
|
|
72
|
-
color: var(--smart-surface-color);
|
|
73
|
-
padding: var(--smart-tabs-tab-padding);
|
|
74
|
-
overflow-y: hidden;
|
|
75
|
-
overflow-x: hidden;
|
|
76
|
-
background: #fff;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.smart-ribbon-tab[collapsed]{
|
|
80
|
-
height: var(--smart-ribbon-collapsed-tab-height);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.smart-ribbon-tab[active]{
|
|
84
|
-
display: flex;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.smart-ribbon-tab .smart-ribbon-tab-groups{
|
|
88
|
-
display: inline-flex;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.smart-ribbon-tab .smart-ribbon-tab-side-container{
|
|
92
|
-
width: 40px;
|
|
93
|
-
display: flex;
|
|
94
|
-
flex-direction: column;
|
|
95
|
-
align-items: center;
|
|
96
|
-
justify-content: end;
|
|
97
|
-
margin-left: auto;
|
|
98
|
-
margin-right: 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.smart-ribbon-tab[collapsed] .smart-ribbon-tab-side-container{
|
|
102
|
-
justify-content: center;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.smart-ribbon-tab-side-container .smart-ribbon-tab-collapse-button{
|
|
106
|
-
font-family: var(--smart-font-family-icon);
|
|
107
|
-
font-size: calc(var(--smart-font-size) * 1.5);
|
|
108
|
-
cursor: pointer;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.smart-ribbon-tabs .smart-ribbon-tab-collapse-button:after{
|
|
112
|
-
content: var(--smart-icon-arrow-up);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.smart-ribbon-tab[collapsed] .smart-ribbon-tab-collapse-button:after{
|
|
116
|
-
content: var(--smart-icon-arrow-down);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.smart-ribbon-group{
|
|
120
|
-
display: flex;
|
|
121
|
-
flex-wrap: nowrap;
|
|
122
|
-
flex-direction: column;
|
|
123
|
-
flex: 1;
|
|
124
|
-
border-color: var(--smart-ribbon-border-color);
|
|
125
|
-
border-width: 0 var(--smart-border-width) 0 0;
|
|
126
|
-
border-style: solid;
|
|
127
|
-
color: var(--smart-surface-color);
|
|
128
|
-
padding: 10px 10px 0 10px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
.smart-ribbon-tab[collapsed] .smart-ribbon-group{
|
|
133
|
-
padding: 2px;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.smart-ribbon-group-items .smart-ribbon-group-item-separator{
|
|
138
|
-
width: 1px;
|
|
139
|
-
background: var(--smart-ribbon-border-color);
|
|
140
|
-
margin: 0 5px;
|
|
141
|
-
height: 100%;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.smart-ribbon-group .smart-ribbon-group-items{
|
|
145
|
-
width: 100%;
|
|
146
|
-
display: flex;
|
|
147
|
-
flex-direction: row;
|
|
148
|
-
flex: 1;
|
|
149
|
-
overflow: hidden;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.smart-ribbon-inner-group{
|
|
153
|
-
display: flex;
|
|
154
|
-
justify-content: space-around;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.smart-ribbon-vertical-group{
|
|
158
|
-
flex-direction: column;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.smart-ribbon-tab[collapsed] .smart-ribbon-vertical-group{
|
|
162
|
-
flex-direction: row;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.smart-ribbon-horizontal-group{
|
|
166
|
-
flex-direction: row;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.smart-ribbon-inner-group.smart-ribbon-group-small, .smart-ribbon-group-items.smart-ribbon-group-small {
|
|
170
|
-
flex-wrap: wrap;
|
|
171
|
-
justify-content: left;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.smart-ribbon-tab[collapsed] .smart-ribbon-inner-group.smart-ribbon-group-small, .smart-ribbon-tab[collapsed] .smart-ribbon-group-items.smart-ribbon-group-small {
|
|
175
|
-
flex-wrap: nowrap;
|
|
176
|
-
justify-content: space-around;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.smart-ribbon-group-small .smart-ribbon-group-item{
|
|
180
|
-
flex: 100%;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.smart-ribbon-group-item{
|
|
184
|
-
display: flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.smart-ribbon-group-item > smart-button {
|
|
189
|
-
height: 100%;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.smart-ribbon-group-item > .large, .smart-ribbon-group-item > .normal{
|
|
193
|
-
height: 100%;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.smart-ribbon-group-item-label{
|
|
197
|
-
vertical-align: super;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.smart-ribbon-group-item > smart-color-picker.small, .smart-ribbon-group-item > smart-color-picker.very-small{
|
|
201
|
-
width: fit-content;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.smart-ribbon-group-item-flex-break{
|
|
205
|
-
flex-basis: 100%;
|
|
206
|
-
height: 0;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.smart-ribbon-group .smart-ribbon-group-header-label{
|
|
210
|
-
display: flex;
|
|
211
|
-
flex-direction: row;
|
|
212
|
-
align-items: center;
|
|
213
|
-
justify-content: center;
|
|
214
|
-
font-size: calc(var(--smart-font-size) * 0.75);
|
|
215
|
-
padding: 10px 0 5px 0;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.smart-ribbon-group.smart-ribbon-group-grouped{
|
|
219
|
-
padding-top: 0px;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.smart-ribbon-group-grouped .smart-ribbon-group-header-label, .smart-ribbon-tab[collapsed] .smart-ribbon-group-header-label{
|
|
223
|
-
display: none;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.smart-ribbon-group-drop-down{
|
|
227
|
-
display: flex;
|
|
228
|
-
flex-direction: row;
|
|
229
|
-
align-items: center;
|
|
230
|
-
justify-content: center;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.smart-ribbon-group-drop-down smart-drop-down-button {
|
|
234
|
-
min-width: 75px;
|
|
235
|
-
}
|