smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
872 lines (864 loc) • 50.6 kB
JavaScript
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 whenever the ribbon component transitions from its expanded state to a collapsed state. It allows developers to execute custom logic or UI updates in response to the ribbon becoming minimized or hidden from view.
* @param event. The custom event. */
this.onCollapse = new EventEmitter();
/** @description This event is fired when the ribbon begins the process of collapsing, allowing you to execute custom logic before the collapse completes. If you wish to prevent the ribbon from collapsing, you can call event.preventDefault() within your event handler. This will cancel the default collapsing action, keeping the ribbon expanded.
* @param event. The custom event. */
this.onCollapsing = new EventEmitter();
/** @description This event is triggered when a user clicks the dialog launcher button, typically represented by a small icon (such as an arrow or ellipsis) in a component's toolbar or header. The event indicates the user's intention to open an extended options dialog or advanced settings panel related to the component.
* @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 whenever the ribbon interface transitions from its collapsed state to an expanded state, indicating that additional options or tools have become visible to the user. Use this event to execute custom logic or UI updates whenever the ribbon expands.
* @param event. The custom event. */
this.onExpand = new EventEmitter();
/** @description This event is fired when the ribbon component begins to expand. You can intercept and cancel the expansion by calling event.preventDefault() within your event handler function. This allows you to programmatically control whether or not the ribbon expands based on custom logic.
* @param event. The custom event. */
this.onExpanding = new EventEmitter();
/** @description This event is triggered whenever the file menu button is clicked by the user. It is typically used to open, display, or perform actions related to the file menu, such as showing file options or initializing file-related functions. The event provides an opportunity for developers to execute custom logic in response to user interaction with the file menu button.
* @param event. The custom event. */
this.onFileButtonClick = new EventEmitter();
/** @description This event is triggered whenever the user opens the file menu, such as by clicking on the "File" option in the application's main menu bar. It allows developers to execute custom logic immediately when the file menu becomes visible to the user.
* @param event. The custom event. */
this.onFileMenuOpen = new EventEmitter();
/** @description This event is triggered whenever the file menu is closed, either by user interaction or programmatically. It occurs after all menu actions have completed, signaling that the file menu is no longer visible or active. Developers can use this event to execute cleanup operations, update the user interface, or manage application state in response to the menu being closed.
* @param event. The custom event. */
this.onFileMenuClose = new EventEmitter();
/** @description This event is triggered whenever a user clicks on an item within the file menu. It allows you to execute custom actions in response to specific file menu selections, such as opening, saving, or closing a file. The event provides details about the selected menu item, enabling context-aware handling within your application.
* @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 whenever the user selects a different tab, indicating that the active tab within the interface has changed. It allows you to respond to changes in tab selection, such as updating displayed content, fetching new data, or tracking user navigation within tabbed components.
* @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 fired immediately before the active tab changes, allowing you to intercept and potentially prevent the tab switch. To cancel the tab selection change, call event.preventDefault() within your event handler. This provides an opportunity to perform validations or prompt the user before the change is finalized.
* @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 Specifies whether the ribbon interface can be collapsed or expanded by the user, allowing for a more compact or fully visible display as needed. */
get collapsible() {
return this.nativeElement ? this.nativeElement.collapsible : undefined;
}
set collapsible(value) {
this.nativeElement ? this.nativeElement.collapsible = value : undefined;
}
/** @description Specifies the individual tab items to be displayed within the ribbon interface. Each tab item typically represents a distinct category or section, allowing users to easily navigate and access grouped commands or features within the ribbon. */
get dataSource() {
return this.nativeElement ? this.nativeElement.dataSource : undefined;
}
set dataSource(value) {
this.nativeElement ? this.nativeElement.dataSource = value : undefined;
}
/** @description Specifies or retrieves whether the element is disabled, preventing user interaction and making it unresponsive to mouse and keyboard events. When set to true, the element cannot be activated or receive input focus. */
get disabled() {
return this.nativeElement ? this.nativeElement.disabled : undefined;
}
set disabled(value) {
this.nativeElement ? this.nativeElement.disabled = value : undefined;
}
/** @description Specifies the available file menu options displayed within the ribbon interface, defining which actions (such as New, Open, Save, Print, etc.) users can access from the file menu. */
get fileMenu() {
return this.nativeElement ? this.nativeElement.fileMenu : undefined;
}
set fileMenu(value) {
this.nativeElement ? this.nativeElement.fileMenu = value : undefined;
}
/** @description Sets or retrieves the value of the unlockKey property, which is used to authenticate and authorize access to unlock the product. The unlockKey typically functions as a secure code or token required to enable full product functionality. */
get unlockKey() {
return this.nativeElement ? this.nativeElement.unlockKey : undefined;
}
set unlockKey(value) {
this.nativeElement ? this.nativeElement.unlockKey = value : undefined;
}
/** @description Specifies the localization settings for the ribbon, determining the language and regional formatting (such as date, time, and number formats) used for displaying text and other interface elements. */
get locale() {
return this.nativeElement ? this.nativeElement.locale : undefined;
}
set locale(value) {
this.nativeElement ? this.nativeElement.locale = value : undefined;
}
/** @description Specifies the text and content displayed in the ribbon's message area, allowing customization of informational or notification messages shown to users within the ribbon interface. */
get messages() {
return this.nativeElement ? this.nativeElement.messages : undefined;
}
set messages(value) {
this.nativeElement ? this.nativeElement.messages = value : undefined;
}
/** @description Specifies or retrieves a value that determines whether the element’s alignment is optimized for right-to-left (RTL) languages, such as Arabic or Hebrew. This affects the element’s text direction, layout flow, and alignment to accommodate locales that use right-to-left scripts. */
get rightToLeft() {
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
}
set rightToLeft(value) {
this.nativeElement ? this.nativeElement.rightToLeft = value : undefined;
}
/** @description Specifies which tab is currently selected and active in the tab navigation component, typically by its index or identifier. This property controls which tab's content is visible to the user. */
get selectedTab() {
return this.nativeElement ? this.nativeElement.selectedTab : undefined;
}
set selectedTab(value) {
this.nativeElement ? this.nativeElement.selectedTab = value : undefined;
}
/** @description Adds a new tab to the application's ribbon interface. The tab can be specified in one of three ways: as a configuration object defining the tab's properties, as an existing HTMLElement to be used as the tab, or as a string representing the id of an existing HTMLElement to be added as the tab. This provides flexibility in how ribbon tabs are created and integrated.
* @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 Enhances a ribbon tab by adding a new group. The group can be specified in one of the following ways: as an object defining its properties, as a direct reference to an HTMLElement, or as a string representing the id of an existing HTMLElement. This flexibility allows you to create the group dynamically, use an already created DOM element, or reference an element by its id.
* @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 item to a specified ribbon group in the ribbon interface. The new item can be provided in one of the following forms: as a configuration object, as an actual HTMLElement, or by specifying the id of an existing HTMLElement. This offers flexibility in how ribbon items are defined and incorporated into the ribbon group.
* @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 Minimizes the ribbon interface, hiding its commands and options, to provide more workspace on the screen.
*/
collapse() {
if (this.nativeElement.isRendered) {
this.nativeElement.collapse();
}
else {
this.nativeElement.whenRendered(() => {
this.nativeElement.collapse();
});
}
}
/** @description Expands the ribbon interface to reveal additional tools, features, and options that are otherwise hidden from view. This action increases the available workspace by displaying the full set of ribbon commands and controls.
*/
expand() {
if (this.nativeElement.isRendered) {
this.nativeElement.expand();
}
else {
this.nativeElement.whenRendered(() => {
this.nativeElement.expand();
});
}
}
/** @description Removes a specified tab from the ribbon interface, effectively hiding it and its associated commands from the user’s view. This action ensures that the tab and its contents are no longer accessible within the ribbon navigation.
* @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 specified ribbon group from the selected ribbon tab, effectively deleting that group's controls and functionalities from the tab's interface.
* @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 specified ribbon item from its parent ribbon group, effectively deleting the item from the group and updating the user interface accordingly. This operation ensures that the ribbon group no longer displays or interacts with the removed item.
* @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 Activates the specified ribbon tab, bringing its contents into focus and making its associated controls and options accessible to the user.
* @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", unlockKey: "unlockKey", 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
}], unlockKey: [{
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 Specifies whether the tab item is disabled and unresponsive to user interaction. When set to true, the tab cannot be selected or activated by the user. */
get disabled() {
return this.nativeElement ? this.nativeElement.disabled : undefined;
}
set disabled(value) {
this.nativeElement ? this.nativeElement.disabled = value : undefined;
}
/** @description Specifies the text displayed as the label for the tab item, allowing users to identify and select the corresponding tab in the interface. */
get label() {
return this.nativeElement ? this.nativeElement.label : undefined;
}
set label(value) {
this.nativeElement ? this.nativeElement.label = value : undefined;
}
/** @description Indicates whether the tab item is currently active and selected by the user. When set to true, this tab will be visually highlighted and its associated content will be displayed. */
get selected() {
return this.nativeElement ? this.nativeElement.selected : undefined;
}
set selected(value) {
this.nativeElement ? this.nativeElement.selected = value : undefined;
}
/** @description Specifies the ribbon group to which the tab item belongs, enabling organization and grouping of related commands within the ribbon interface. */
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 Specifies the text or title displayed as the label for the ribbon group, helping users identify the purpose or category of the grouped controls within the ribbon interface. */
get label() {
return this.nativeElement ? this.nativeElement.label : undefined;
}
set label(value) {
this.nativeElement ? this.nativeElement.label = value : undefined;
}
/** @description Specifies the icon displayed for the ribbon group. This property defines the visual symbol or image that represents the group within the ribbon interface, enhancing usability and quick identification for users. */
get icon() {
return this.nativeElement ? this.nativeElement.icon : undefined;
}
set icon(value) {
this.nativeElement ? this.nativeElement.icon = value : undefined;
}
/** @description Specifies the CSS class applied to the ribbon group, which controls its appearance and styling. Use this property to customize the look and feel of the ribbon group by assigning one or more class names. */
get cssClass() {
return this.nativeElement ? this.nativeElement.cssClass : undefined;
}
set cssClass(value) {
this.nativeElement ? this.nativeElement.cssClass = value : undefined;
}
/** @description Defines the collection of items displayed within the ribbon group, specifying the individual controls, buttons, menus, or tools that appear as part of the ribbon interface. This property allows customization of the content and arrangement of the ribbon group elements. */
get ribbonItems() {
return this.nativeElement ? this.nativeElement.ribbonItems : undefined;
}
set ribbonItems(value) {
this.nativeElement ? this.nativeElement.ribbonItems = value : undefined;
}
/** @description Specifies the orientation of the ribbon group, such as horizontal or vertical, affecting how its contained items are arranged and displayed within the user interface. */
get direction() {
return this.nativeElement ? this.nativeElement.direction : undefined;
}
set direction(value) {
this.nativeElement ? this.nativeElement.direction = value : undefined;
}
/** @description Defines the configuration options for the dialog launcher button within the ribbon group, specifying its appearance, behavior, and associated actions when activated by the user. */
get dialogLauncher() {
return this.nativeElement ? this.nativeElement.dialogLauncher : undefined;
}
set dialogLauncher(value) {
this.nativeElement ? this.nativeElement.dialogLauncher = value : undefined;
}
/** @description Specifies the minimum width (in pixels) at which the ribbon group will be displayed on a single line. If the available space becomes smaller than this value, the ribbon group will automatically wrap to a new line to maintain a responsive layout. */
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 Specifies whether the ribbon item is disabled and unresponsive to user interactions. If set to 'true', the ribbon item will appear visually inactive and cannot be clicked or selected by the user. If 'false', the item remains enabled and fully interactive. */
get disabled() {
return this.nativeElement ? this.nativeElement.disabled : undefined;
}
set disabled(value) {
this.nativeElement ? this.nativeElement.disabled = value : undefined;
}
/** @description Specifies the text displayed as the label on the ribbon item, providing users with a clear description or name for the ribbon element. */
get label() {
return this.nativeElement ? this.nativeElement.label : undefined;
}
set label(value) {
this.nativeElement ? this.nativeElement.label = value : undefined;
}
/** @description Specifies the category or function of the ribbon item, such as button, dropdown, separator, or other UI element types. This property helps define how the ribbon item behaves and is displayed within the ribbon interface. */
get type() {
return this.nativeElement ? this.nativeElement.type : undefined;
}
set type(value) {
this.nativeElement ? this.nativeElement.type = value : undefined;
}
/** @description Specifies the template used to render the ribbon item. This property accepts one of the following:- An HTMLTemplateElement instance.- The id (string) of an existing HTMLTemplateElement in the DOM.- A function that returns either a template string or an HTML element.This allows you to customize the appearance and content of the ribbon item by providing a static template, referencing a template by id, or generating templates dynamically through a function. */
get template() {
return this.nativeElement ? this.nativeElement.template : undefined;
}
set template(value) {
this.nativeElement ? this.nativeElement.template = value : undefined;
}
/** @description Specifies the dimensions or size configuration (such as small, medium, or large) for the ribbon item, affecting its visual appearance and layout within the ribbon interface. */
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 Specifies the permissible dimensions (such as small, medium, or large) that the ribbon item can be displayed in. This setting controls which size options are available for the ribbon item’s appearance within the user interface. */
get allowedSizes() {
return this.nativeElement ? this.nativeElement.allowedSizes : undefined;
}
set allowedSizes(value) {
this.nativeElement ? this.nativeElement.allowedSizes = value : undefined;
}
/** @description Specifies the icon displayed on the ribbon item. This property sets the visual symbol or graphic that represents the ribbon item in the user interface, allowing users to quickly identify its function. The icon can typically be defined using an icon name, image URL, or SVG markup, depending on the framework or library in use. */
get icon() {
return this.nativeElement ? this.nativeElement.icon : undefined;
}
set icon(value) {
this.nativeElement ? this.nativeElement.icon = value : undefined;
}
/** @description Controls the configuration options for the ribbon item. When the ribbon item is designated as a Smart Element, these settings are applied as its properties, allowing for dynamic customization of its appearance and behavior within the ribbon interface. */
get settings() {
return this.nativeElement ? this.nativeElement.settings : undefined;
}
set settings(value) {
this.nativeElement ? this.nativeElement.settings = value : undefined;
}
/** @description Specifies the CSS class or classes to be applied to the ribbon item, allowing for customized styling and appearance. This property enables developers to control the visual presentation of individual ribbon items by assigning one or more class names. */
get cssClass() {
return this.nativeElement ? this.nativeElement.cssClass : undefined;
}
set cssClass(value) {
this.nativeElement ? this.nativeElement.cssClass = value : undefined;
}
/** @description Assigns a custom function to be executed when the ribbon item is clicked, enabling the implementation of specific actions or behaviors in response to user interaction. */
get onItemClick() {
return this.nativeElement ? this.nativeElement.onItemClick : undefined;
}
set onItemClick(value) {
this.nativeElement ? this.nativeElement.onItemClick = value : undefined;
}
/** @description Registers a handler function that will be triggered when the ribbon item's value or state changes, allowing you to respond dynamically to user interactions or programmatic updates. */
get onItemChange() {
return this.nativeElement ? this.nativeElement.onItemChange : undefined;
}
set onItemChange(value) {
this.nativeElement ? this.nativeElement.onItemChange = value : undefined;
}
/** @description Specifies the text that appears as a tooltip when users hover over the ribbon item, providing additional information or guidance about its function. */
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