UNPKG

smart-webcomponents-angular

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-0098f7.svg)](https://jqwidgets.com/license/)

885 lines (874 loc) 41.5 kB
if(typeof window !== 'undefined') { if (!window['Smart']) { window['Smart'] = { RenderMode: 'manual' }; } else { window['Smart'].RenderMode = 'manual'; } } import './../source/modules/smart.ribbon'; import * as i0 from '@angular/core'; import { EventEmitter, Directive, Output, Input, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; class BaseElement { constructor(ref) { this.onCreate = new EventEmitter(); this.onReady = new EventEmitter(); this.onAttach = new EventEmitter(); this.onDetach = new EventEmitter(); const that = this; this.nativeElement = ref.nativeElement; that.nativeElement.onAttached = () => { that.onAttach.emit(that.nativeElement); }; that.nativeElement.onDetached = () => { that.onDetach.emit(that.nativeElement); }; } addEventListener(type, listener, options = false) { this.nativeElement.addEventListener(type, listener, options); } removeEventListener(type, listener, options = false) { this.nativeElement.removeEventListener(type, listener, options); } dispatchEvent(event) { return this.nativeElement.dispatchEvent(event); } blur() { this.nativeElement.blur(); } click() { this.nativeElement.click(); } focus(options) { this.nativeElement.focus(options); } /** @description Sets or gets the license. */ get license() { return this.nativeElement ? this.nativeElement.license : undefined; } set license(value) { this.nativeElement ? this.nativeElement.license = value : undefined; } /** @description Sets or gets the language. Used in conjunction with the property messages. */ get locale() { return this.nativeElement ? this.nativeElement.locale : undefined; } set locale(value) { this.nativeElement ? this.nativeElement.locale = value : undefined; } /** @description Callback used to customize the format of the messages that are returned from the Localization Module. */ get localizeFormatFunction() { return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined; } set localizeFormatFunction(value) { this.nativeElement ? this.nativeElement.localizeFormatFunction = value : undefined; } /** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */ get messages() { return this.nativeElement ? this.nativeElement.messages : undefined; } set messages(value) { this.nativeElement ? this.nativeElement.messages = value : undefined; } /** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */ get rightToLeft() { return this.nativeElement ? this.nativeElement.rightToLeft : undefined; } set rightToLeft(value) { this.nativeElement ? this.nativeElement.rightToLeft = value : undefined; } /** @description Determines the theme. Theme defines the look of the element */ get theme() { return this.nativeElement ? this.nativeElement.theme : undefined; } set theme(value) { this.nativeElement ? this.nativeElement.theme = value : undefined; } } BaseElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); BaseElement.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: BaseElement, inputs: { license: "license", locale: "locale", localizeFormatFunction: "localizeFormatFunction", messages: "messages", rightToLeft: "rightToLeft", theme: "theme" }, outputs: { onCreate: "onCreate", onReady: "onReady", onAttach: "onAttach", onDetach: "onDetach" }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseElement, decorators: [{ type: Directive }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { onCreate: [{ type: Output }], onReady: [{ type: Output }], onAttach: [{ type: Output }], onDetach: [{ type: Output }], license: [{ type: Input }], locale: [{ type: Input }], localizeFormatFunction: [{ type: Input }], messages: [{ type: Input }], rightToLeft: [{ type: Input }], theme: [{ type: Input }] } }); let Smart; if (typeof window !== "undefined") { Smart = window.Smart; } class RibbonComponent extends BaseElement { constructor(ref) { super(ref); this.eventHandlers = []; /** @description This event is triggered when the ribbon is collapsed. * @param event. The custom event. */ this.onCollapse = new EventEmitter(); /** @description This event is triggered when the ribbon is collapsing. The event can be canceled by calling event.preventDefault() in the event handler function. * @param event. The custom event. */ this.onCollapsing = new EventEmitter(); /** @description This event is triggered when the dialog launcher is clicked. * @param event. The custom event. Custom event was created with: event.detail( groupLabel, groupId) * groupLabel - The label of the dialog launcher's ribbon group. * groupId - The id of the dialog launcher's ribbon group. */ this.onDialogLauncherClick = new EventEmitter(); /** @description This event is triggered when the ribbon is expanded. * @param event. The custom event. */ this.onExpand = new EventEmitter(); /** @description This event is triggered when the ribbon is expanding. The event can be canceled by calling event.preventDefault() in the event handler function. * @param event. The custom event. */ this.onExpanding = new EventEmitter(); /** @description This event is triggered when the file menu button is clicked. * @param event. The custom event. */ this.onFileButtonClick = new EventEmitter(); /** @description This event is triggered when the file menu is opened. * @param event. The custom event. */ this.onFileMenuOpen = new EventEmitter(); /** @description This event is triggered when the file menu is closed. * @param event. The custom event. */ this.onFileMenuClose = new EventEmitter(); /** @description This event is triggered when a file menu item is clicked. * @param event. The custom event. Custom event was created with: event.detail( item) * item - The file menu item. */ this.onFileMenuItemClick = new EventEmitter(); /** @description This event is triggered when the tab selection is changed. * @param event. The custom event. Custom event was created with: event.detail( oldIndex, index) * oldIndex - The previous tab index. * index - The new index of the selected tab. */ this.onSelect = new EventEmitter(); /** @description This event is triggered when the tab selection is changing. The event can be canceled by calling event.preventDefault() in the event handler function. * @param event. The custom event. Custom event was created with: event.detail( oldIndex, index) * oldIndex - The previous tab index. * index - The new index of the selected tab. */ this.onSelecting = new EventEmitter(); this.nativeElement = ref.nativeElement; } /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties = {}) { this.nativeElement = document.createElement('smart-ribbon'); for (let propertyName in properties) { this.nativeElement[propertyName] = properties[propertyName]; } return this.nativeElement; } /** @description Determines whether the ribbon is collapsible. */ get collapsible() { return this.nativeElement ? this.nativeElement.collapsible : undefined; } set collapsible(value) { this.nativeElement ? this.nativeElement.collapsible = value : undefined; } /** @description Determines the tab items of the ribbon. */ get dataSource() { return this.nativeElement ? this.nativeElement.dataSource : undefined; } set dataSource(value) { this.nativeElement ? this.nativeElement.dataSource = value : undefined; } /** @description Sets or gets the value indicating whether the element is disabled. */ get disabled() { return this.nativeElement ? this.nativeElement.disabled : undefined; } set disabled(value) { this.nativeElement ? this.nativeElement.disabled = value : undefined; } /** @description Determines the file menu options of the ribbon. */ get fileMenu() { return this.nativeElement ? this.nativeElement.fileMenu : undefined; } set fileMenu(value) { this.nativeElement ? this.nativeElement.fileMenu = value : undefined; } /** @description Sets or gets the license which unlocks the product. */ get license() { return this.nativeElement ? this.nativeElement.license : undefined; } set license(value) { this.nativeElement ? this.nativeElement.license = value : undefined; } /** @description Determines the locale of the ribbon. */ get locale() { return this.nativeElement ? this.nativeElement.locale : undefined; } set locale(value) { this.nativeElement ? this.nativeElement.locale = value : undefined; } /** @description Determines the messages of the ribbon */ get messages() { return this.nativeElement ? this.nativeElement.messages : undefined; } set messages(value) { this.nativeElement ? this.nativeElement.messages = value : undefined; } /** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */ get rightToLeft() { return this.nativeElement ? this.nativeElement.rightToLeft : undefined; } set rightToLeft(value) { this.nativeElement ? this.nativeElement.rightToLeft = value : undefined; } /** @description Determines the selected tab. */ get selectedTab() { return this.nativeElement ? this.nativeElement.selectedTab : undefined; } set selectedTab(value) { this.nativeElement ? this.nativeElement.selectedTab = value : undefined; } /** @description Adds a new ribbon tab to the ribbon. The tab can be added as an object, HTMLElement or id to an HTMLElement. * @param {any} tab. The ribbon tab to be added. */ addTab(tab) { if (this.nativeElement.isRendered) { this.nativeElement.addTab(tab); } else { this.nativeElement.whenRendered(() => { this.nativeElement.addTab(tab); }); } } /** @description Adds a new group to a ribbon tab. The group can be added as an object, HTMLElement or id to an HTMLElement. * @param {any} tab. The id, index or HTMLElement of the parent ribbon tab. * @param {any} group. The ribbon group to be added. */ addGroup(tab, group) { if (this.nativeElement.isRendered) { this.nativeElement.addGroup(tab, group); } else { this.nativeElement.whenRendered(() => { this.nativeElement.addGroup(tab, group); }); } } /** @description Adds a new ribbon item to a ribbon group. The item can be added as an object, HTMLElement or id to an HTMLElement. * @param {string | number | HTMLElement} tab. The id, index or HTMLElement of the parent ribbon tab. * @param {string | HTMLElement} group. The id or HTMLElement of the parent ribbon group. * @param {any} item. The ribbon item to be added. */ addItem(tab, group, item) { if (this.nativeElement.isRendered) { this.nativeElement.addItem(tab, group, item); } else { this.nativeElement.whenRendered(() => { this.nativeElement.addItem(tab, group, item); }); } } /** @description Collapses the ribbon. */ collapse() { if (this.nativeElement.isRendered) { this.nativeElement.collapse(); } else { this.nativeElement.whenRendered(() => { this.nativeElement.collapse(); }); } } /** @description Expands the ribbon. */ expand() { if (this.nativeElement.isRendered) { this.nativeElement.expand(); } else { this.nativeElement.whenRendered(() => { this.nativeElement.expand(); }); } } /** @description Removes a ribbon tab from the ribbon. * @param {string | number} ribbonTab. The id or index of the ribbon tab to be removed. */ removeTab(ribbonTab) { if (this.nativeElement.isRendered) { this.nativeElement.removeTab(ribbonTab); } else { this.nativeElement.whenRendered(() => { this.nativeElement.removeTab(ribbonTab); }); } } /** @description Removes a ribbon group from a ribbon tab. * @param {string | number} ribbonTabIndex?. The id or index of the parent ribbon tab. * @param {string | number} ribbonGroup?. The id or index of the ribbon group to be removed. */ removeGroup(ribbonTabIndex, ribbonGroup) { if (this.nativeElement.isRendered) { this.nativeElement.removeGroup(ribbonTabIndex, ribbonGroup); } else { this.nativeElement.whenRendered(() => { this.nativeElement.removeGroup(ribbonTabIndex, ribbonGroup); }); } } /** @description Removes a ribbon item from a ribbon group. * @param {string | number} ribbonTabIndex?. The id or index of the parent ribbon tab. * @param {string | number} ribbonGroup?. The id or index of the parent ribbon group. * @param {string | number} ribbonItem?. The id or index of the ribbon item to be removed. */ removeItem(ribbonTabIndex, ribbonGroup, ribbonItem) { if (this.nativeElement.isRendered) { this.nativeElement.removeItem(ribbonTabIndex, ribbonGroup, ribbonItem); } else { this.nativeElement.whenRendered(() => { this.nativeElement.removeItem(ribbonTabIndex, ribbonGroup, ribbonItem); }); } } /** @description Selects a ribbon tab. * @param {string | number} ribbonTabIndex. The index of the ribbon tab to be selected. */ selectTab(ribbonTabIndex) { if (this.nativeElement.isRendered) { this.nativeElement.selectTab(ribbonTabIndex); } else { this.nativeElement.whenRendered(() => { this.nativeElement.selectTab(ribbonTabIndex); }); } } get isRendered() { return this.nativeElement ? this.nativeElement.isRendered : false; } ngOnInit() { } ngAfterViewInit() { const that = this; that.onCreate.emit(that.nativeElement); if (Smart) Smart.Render(); this.nativeElement.classList.add('smart-angular'); if (this.nativeElement.whenRendered) this.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); }); this.listen(); } ngOnDestroy() { this.unlisten(); } ngOnChanges(changes) { if (this.nativeElement && this.nativeElement.isRendered) { for (const propName in changes) { if (changes.hasOwnProperty(propName)) { this.nativeElement[propName] = changes[propName].currentValue; } } } } /** @description Add event listeners. */ listen() { const that = this; that.eventHandlers['collapseHandler'] = (event) => { that.onCollapse.emit(event); }; that.nativeElement.addEventListener('collapse', that.eventHandlers['collapseHandler']); that.eventHandlers['collapsingHandler'] = (event) => { that.onCollapsing.emit(event); }; that.nativeElement.addEventListener('collapsing', that.eventHandlers['collapsingHandler']); that.eventHandlers['dialogLauncherClickHandler'] = (event) => { that.onDialogLauncherClick.emit(event); }; that.nativeElement.addEventListener('dialogLauncherClick', that.eventHandlers['dialogLauncherClickHandler']); that.eventHandlers['expandHandler'] = (event) => { that.onExpand.emit(event); }; that.nativeElement.addEventListener('expand', that.eventHandlers['expandHandler']); that.eventHandlers['expandingHandler'] = (event) => { that.onExpanding.emit(event); }; that.nativeElement.addEventListener('expanding', that.eventHandlers['expandingHandler']); that.eventHandlers['fileButtonClickHandler'] = (event) => { that.onFileButtonClick.emit(event); }; that.nativeElement.addEventListener('fileButtonClick', that.eventHandlers['fileButtonClickHandler']); that.eventHandlers['fileMenuOpenHandler'] = (event) => { that.onFileMenuOpen.emit(event); }; that.nativeElement.addEventListener('fileMenuOpen', that.eventHandlers['fileMenuOpenHandler']); that.eventHandlers['fileMenuCloseHandler'] = (event) => { that.onFileMenuClose.emit(event); }; that.nativeElement.addEventListener('fileMenuClose', that.eventHandlers['fileMenuCloseHandler']); that.eventHandlers['fileMenuItemClickHandler'] = (event) => { that.onFileMenuItemClick.emit(event); }; that.nativeElement.addEventListener('fileMenuItemClick', that.eventHandlers['fileMenuItemClickHandler']); that.eventHandlers['selectHandler'] = (event) => { that.onSelect.emit(event); }; that.nativeElement.addEventListener('select', that.eventHandlers['selectHandler']); that.eventHandlers['selectingHandler'] = (event) => { that.onSelecting.emit(event); }; that.nativeElement.addEventListener('selecting', that.eventHandlers['selectingHandler']); } /** @description Remove event listeners. */ unlisten() { const that = this; if (that.eventHandlers['collapseHandler']) { that.nativeElement.removeEventListener('collapse', that.eventHandlers['collapseHandler']); } if (that.eventHandlers['collapsingHandler']) { that.nativeElement.removeEventListener('collapsing', that.eventHandlers['collapsingHandler']); } if (that.eventHandlers['dialogLauncherClickHandler']) { that.nativeElement.removeEventListener('dialogLauncherClick', that.eventHandlers['dialogLauncherClickHandler']); } if (that.eventHandlers['expandHandler']) { that.nativeElement.removeEventListener('expand', that.eventHandlers['expandHandler']); } if (that.eventHandlers['expandingHandler']) { that.nativeElement.removeEventListener('expanding', that.eventHandlers['expandingHandler']); } if (that.eventHandlers['fileButtonClickHandler']) { that.nativeElement.removeEventListener('fileButtonClick', that.eventHandlers['fileButtonClickHandler']); } if (that.eventHandlers['fileMenuOpenHandler']) { that.nativeElement.removeEventListener('fileMenuOpen', that.eventHandlers['fileMenuOpenHandler']); } if (that.eventHandlers['fileMenuCloseHandler']) { that.nativeElement.removeEventListener('fileMenuClose', that.eventHandlers['fileMenuCloseHandler']); } if (that.eventHandlers['fileMenuItemClickHandler']) { that.nativeElement.removeEventListener('fileMenuItemClick', that.eventHandlers['fileMenuItemClickHandler']); } if (that.eventHandlers['selectHandler']) { that.nativeElement.removeEventListener('select', that.eventHandlers['selectHandler']); } if (that.eventHandlers['selectingHandler']) { that.nativeElement.removeEventListener('selecting', that.eventHandlers['selectingHandler']); } } } RibbonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); RibbonComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: RibbonComponent, selector: "smart-ribbon, [smart-ribbon]", inputs: { collapsible: "collapsible", dataSource: "dataSource", disabled: "disabled", fileMenu: "fileMenu", license: "license", locale: "locale", messages: "messages", rightToLeft: "rightToLeft", selectedTab: "selectedTab" }, outputs: { onCollapse: "onCollapse", onCollapsing: "onCollapsing", onDialogLauncherClick: "onDialogLauncherClick", onExpand: "onExpand", onExpanding: "onExpanding", onFileButtonClick: "onFileButtonClick", onFileMenuOpen: "onFileMenuOpen", onFileMenuClose: "onFileMenuClose", onFileMenuItemClick: "onFileMenuItemClick", onSelect: "onSelect", onSelecting: "onSelecting" }, exportAs: ["smart-ribbon"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonComponent, decorators: [{ type: Directive, args: [{ exportAs: 'smart-ribbon', selector: 'smart-ribbon, [smart-ribbon]' }] }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { collapsible: [{ type: Input }], dataSource: [{ type: Input }], disabled: [{ type: Input }], fileMenu: [{ type: Input }], license: [{ type: Input }], locale: [{ type: Input }], messages: [{ type: Input }], rightToLeft: [{ type: Input }], selectedTab: [{ type: Input }], onCollapse: [{ type: Output }], onCollapsing: [{ type: Output }], onDialogLauncherClick: [{ type: Output }], onExpand: [{ type: Output }], onExpanding: [{ type: Output }], onFileButtonClick: [{ type: Output }], onFileMenuOpen: [{ type: Output }], onFileMenuClose: [{ type: Output }], onFileMenuItemClick: [{ type: Output }], onSelect: [{ type: Output }], onSelecting: [{ type: Output }] } }); class RibbonTabComponent extends BaseElement { constructor(ref) { super(ref); this.eventHandlers = []; this.nativeElement = ref.nativeElement; } /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties = {}) { this.nativeElement = document.createElement('smart-ribbon-tab'); for (let propertyName in properties) { this.nativeElement[propertyName] = properties[propertyName]; } return this.nativeElement; } /** @description Determines whether the tab item is disabled. */ get disabled() { return this.nativeElement ? this.nativeElement.disabled : undefined; } set disabled(value) { this.nativeElement ? this.nativeElement.disabled = value : undefined; } /** @description Determines the label of the tab item. */ get label() { return this.nativeElement ? this.nativeElement.label : undefined; } set label(value) { this.nativeElement ? this.nativeElement.label = value : undefined; } /** @description Determines whether the tab item is selected. */ get selected() { return this.nativeElement ? this.nativeElement.selected : undefined; } set selected(value) { this.nativeElement ? this.nativeElement.selected = value : undefined; } /** @description Determines the ribbon group of the tab item */ get ribbonGroups() { return this.nativeElement ? this.nativeElement.ribbonGroups : undefined; } set ribbonGroups(value) { this.nativeElement ? this.nativeElement.ribbonGroups = value : undefined; } get isRendered() { return this.nativeElement ? this.nativeElement.isRendered : false; } ngOnInit() { } ngAfterViewInit() { const that = this; that.onCreate.emit(that.nativeElement); this.nativeElement.classList.add('smart-angular'); if (this.nativeElement.whenRendered) this.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); }); } ngOnDestroy() { } ngOnChanges(changes) { if (this.nativeElement && this.nativeElement.isRendered) { for (const propName in changes) { if (changes.hasOwnProperty(propName)) { this.nativeElement[propName] = changes[propName].currentValue; } } } } } RibbonTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonTabComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); RibbonTabComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: RibbonTabComponent, selector: "smart-ribbon-tab, [smart-ribbon-tab]", inputs: { disabled: "disabled", label: "label", selected: "selected", ribbonGroups: "ribbonGroups" }, exportAs: ["smart-ribbon-tab"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonTabComponent, decorators: [{ type: Directive, args: [{ exportAs: 'smart-ribbon-tab', selector: 'smart-ribbon-tab, [smart-ribbon-tab]' }] }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { disabled: [{ type: Input }], label: [{ type: Input }], selected: [{ type: Input }], ribbonGroups: [{ type: Input }] } }); class RibbonGroupComponent extends BaseElement { constructor(ref) { super(ref); this.eventHandlers = []; this.nativeElement = ref.nativeElement; } /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties = {}) { this.nativeElement = document.createElement('smart-ribbon-group'); for (let propertyName in properties) { this.nativeElement[propertyName] = properties[propertyName]; } return this.nativeElement; } /** @description Determines the label of the ribbon group. */ get label() { return this.nativeElement ? this.nativeElement.label : undefined; } set label(value) { this.nativeElement ? this.nativeElement.label = value : undefined; } /** @description Determines the icon of the ribbon group. */ get icon() { return this.nativeElement ? this.nativeElement.icon : undefined; } set icon(value) { this.nativeElement ? this.nativeElement.icon = value : undefined; } /** @description Determines the class of the ribbon group. */ get cssClass() { return this.nativeElement ? this.nativeElement.cssClass : undefined; } set cssClass(value) { this.nativeElement ? this.nativeElement.cssClass = value : undefined; } /** @description Determines the ribbon items of the ribbon group. */ get ribbonItems() { return this.nativeElement ? this.nativeElement.ribbonItems : undefined; } set ribbonItems(value) { this.nativeElement ? this.nativeElement.ribbonItems = value : undefined; } /** @description Determines the direction of the ribbon group. */ get direction() { return this.nativeElement ? this.nativeElement.direction : undefined; } set direction(value) { this.nativeElement ? this.nativeElement.direction = value : undefined; } /** @description Determines the settings of the dialog launcher of the ribbon group. */ get dialogLauncher() { return this.nativeElement ? this.nativeElement.dialogLauncher : undefined; } set dialogLauncher(value) { this.nativeElement ? this.nativeElement.dialogLauncher = value : undefined; } /** @description Determines the size, below which the ribbon group will be wrapped. */ get wrapSize() { return this.nativeElement ? this.nativeElement.wrapSize : undefined; } set wrapSize(value) { this.nativeElement ? this.nativeElement.wrapSize = value : undefined; } get isRendered() { return this.nativeElement ? this.nativeElement.isRendered : false; } ngOnInit() { } ngAfterViewInit() { const that = this; that.onCreate.emit(that.nativeElement); this.nativeElement.classList.add('smart-angular'); if (this.nativeElement.whenRendered) this.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); }); } ngOnDestroy() { } ngOnChanges(changes) { if (this.nativeElement && this.nativeElement.isRendered) { for (const propName in changes) { if (changes.hasOwnProperty(propName)) { this.nativeElement[propName] = changes[propName].currentValue; } } } } } RibbonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonGroupComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); RibbonGroupComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: RibbonGroupComponent, selector: "smart-ribbon-group, [smart-ribbon-group]", inputs: { label: "label", icon: "icon", cssClass: "cssClass", ribbonItems: "ribbonItems", direction: "direction", dialogLauncher: "dialogLauncher", wrapSize: "wrapSize" }, exportAs: ["smart-ribbon-group"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonGroupComponent, decorators: [{ type: Directive, args: [{ exportAs: 'smart-ribbon-group', selector: 'smart-ribbon-group, [smart-ribbon-group]' }] }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { label: [{ type: Input }], icon: [{ type: Input }], cssClass: [{ type: Input }], ribbonItems: [{ type: Input }], direction: [{ type: Input }], dialogLauncher: [{ type: Input }], wrapSize: [{ type: Input }] } }); class RibbonItemComponent extends BaseElement { constructor(ref) { super(ref); this.eventHandlers = []; this.nativeElement = ref.nativeElement; } /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties = {}) { this.nativeElement = document.createElement('smart-ribbon-item'); for (let propertyName in properties) { this.nativeElement[propertyName] = properties[propertyName]; } return this.nativeElement; } /** @description Determines whether the ribbon item is disabled. */ get disabled() { return this.nativeElement ? this.nativeElement.disabled : undefined; } set disabled(value) { this.nativeElement ? this.nativeElement.disabled = value : undefined; } /** @description Determines the label of the ribbon item. */ get label() { return this.nativeElement ? this.nativeElement.label : undefined; } set label(value) { this.nativeElement ? this.nativeElement.label = value : undefined; } /** @description Determines the type of the ribbon item. */ get type() { return this.nativeElement ? this.nativeElement.type : undefined; } set type(value) { this.nativeElement ? this.nativeElement.type = value : undefined; } /** @description Determines the template of the ribbon item. Accepts HTMLTemplateElement, an id of an HTMLTemplateElement or a Function. */ get template() { return this.nativeElement ? this.nativeElement.template : undefined; } set template(value) { this.nativeElement ? this.nativeElement.template = value : undefined; } /** @description Determines the size of the ribbon item. */ get size() { return this.nativeElement ? this.nativeElement.size : undefined; } set size(value) { this.nativeElement ? this.nativeElement.size = value : undefined; } /** @description */ get sizeChanged() { return this.nativeElement ? this.nativeElement.sizeChanged : undefined; } set sizeChanged(value) { this.nativeElement ? this.nativeElement.sizeChanged = value : undefined; } /** @description Determines the allowed sizes of the ribbon item. */ get allowedSizes() { return this.nativeElement ? this.nativeElement.allowedSizes : undefined; } set allowedSizes(value) { this.nativeElement ? this.nativeElement.allowedSizes = value : undefined; } /** @description Determines the icon of the ribbon item. */ get icon() { return this.nativeElement ? this.nativeElement.icon : undefined; } set icon(value) { this.nativeElement ? this.nativeElement.icon = value : undefined; } /** @description Determines the settings of the ribbon item. The settings will be applied as properties if the ribbon item is set to a Smart Element. */ get settings() { return this.nativeElement ? this.nativeElement.settings : undefined; } set settings(value) { this.nativeElement ? this.nativeElement.settings = value : undefined; } /** @description Determines the class of the ribbon item. */ get cssClass() { return this.nativeElement ? this.nativeElement.cssClass : undefined; } set cssClass(value) { this.nativeElement ? this.nativeElement.cssClass = value : undefined; } /** @description Sets a click event handler for the ribbon item. */ get onItemClick() { return this.nativeElement ? this.nativeElement.onItemClick : undefined; } set onItemClick(value) { this.nativeElement ? this.nativeElement.onItemClick = value : undefined; } /** @description Sets a change event handler for the ribbon item. */ get onItemChange() { return this.nativeElement ? this.nativeElement.onItemChange : undefined; } set onItemChange(value) { this.nativeElement ? this.nativeElement.onItemChange = value : undefined; } /** @description Determines the tooltip of the ribbon item. */ get tooltip() { return this.nativeElement ? this.nativeElement.tooltip : undefined; } set tooltip(value) { this.nativeElement ? this.nativeElement.tooltip = value : undefined; } get isRendered() { return this.nativeElement ? this.nativeElement.isRendered : false; } ngOnInit() { } ngAfterViewInit() { const that = this; that.onCreate.emit(that.nativeElement); this.nativeElement.classList.add('smart-angular'); if (this.nativeElement.whenRendered) this.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); }); } ngOnDestroy() { } ngOnChanges(changes) { if (this.nativeElement && this.nativeElement.isRendered) { for (const propName in changes) { if (changes.hasOwnProperty(propName)) { this.nativeElement[propName] = changes[propName].currentValue; } } } } } RibbonItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); RibbonItemComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: RibbonItemComponent, selector: "smart-ribbon-item, [smart-ribbon-item]", inputs: { disabled: "disabled", label: "label", type: "type", template: "template", size: "size", sizeChanged: "sizeChanged", allowedSizes: "allowedSizes", icon: "icon", settings: "settings", cssClass: "cssClass", onItemClick: "onItemClick", onItemChange: "onItemChange", tooltip: "tooltip" }, exportAs: ["smart-ribbon-item"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonItemComponent, decorators: [{ type: Directive, args: [{ exportAs: 'smart-ribbon-item', selector: 'smart-ribbon-item, [smart-ribbon-item]' }] }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { disabled: [{ type: Input }], label: [{ type: Input }], type: [{ type: Input }], template: [{ type: Input }], size: [{ type: Input }], sizeChanged: [{ type: Input }], allowedSizes: [{ type: Input }], icon: [{ type: Input }], settings: [{ type: Input }], cssClass: [{ type: Input }], onItemClick: [{ type: Input }], onItemChange: [{ type: Input }], tooltip: [{ type: Input }] } }); class RibbonModule { } RibbonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); RibbonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonModule, declarations: [RibbonComponent, RibbonTabComponent, RibbonGroupComponent, RibbonItemComponent], exports: [RibbonComponent, RibbonTabComponent, RibbonGroupComponent, RibbonItemComponent] }); RibbonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RibbonModule, decorators: [{ type: NgModule, args: [{ declarations: [RibbonComponent, RibbonTabComponent, RibbonGroupComponent, RibbonItemComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], exports: [RibbonComponent, RibbonTabComponent, RibbonGroupComponent, RibbonItemComponent] }] }] }); /** * Generated bundle index. Do not edit. */ export { RibbonComponent, RibbonGroupComponent, RibbonItemComponent, RibbonModule, RibbonTabComponent, Smart }; //# sourceMappingURL=smart-webcomponents-angular-ribbon.mjs.map