Skip to content

Commit eb887bf

Browse files
committed
Smart UI 8.1.1
1 parent 258dc71 commit eb887bf

File tree

677 files changed

+9118
-5691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

677 files changed

+9118
-5691
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Smart UI
2-
Web Components, Angular UI Components and React UI Components for Professional Web Applications
2+
Web Components, Anguiar UI Components and React UI Components for Professional Web Applications
33

44
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/collection/HTMLElements/smarthtmlelements-core)
55

bootstrap/source/smart.element.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

framework/smart.element.js

Lines changed: 72 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

2-
/* Smart UI v8.0.0 (2020-Sep)
2+
/* Smart UI v8.1.1 (2020-Nov)
33
Copyright (c) 2011-2020 jQWidgets.
44
License: https://htmlelements.com/license/ */ //
55

66
(function () {
77

88

9-
const Version = '7.7.1';
9+
const Version = '8.0.1';
1010
const templates = [];
1111

1212
let namespace = 'Smart';
@@ -943,9 +943,29 @@ License: https://htmlelements.com/license/ */ //
943943
listen(eventType) {
944944
const that = this;
945945

946-
if (eventType === 'resize') {
947-
if (!that.target.resizeTrigger && that.target !== document && that.target !== window && that.target.hasResizeObserver !== false) {
946+
if (eventType === 'resize' && that.target !== document && that.target !== window && that.target.hasResizeObserver !== false) {
947+
if (Smart.Utilities.Core.Browser.Firefox) {
948+
if (!that.target.resizeObserver) {
949+
let firstCallPassed = false;
950+
const resizeObserver = new ResizeObserver(() => {
951+
if (!firstCallPassed) {
952+
firstCallPassed = true;
953+
return;
954+
}
955+
956+
const resizeEvent = new CustomEvent('resize', {
957+
bubbles: false,
958+
cancelable: true
959+
});
960+
961+
that.resize(resizeEvent);
962+
});
948963

964+
resizeObserver.observe(that.target);
965+
that.target.resizeObserver = resizeObserver;
966+
}
967+
}
968+
else if (!that.target.resizeTrigger) {
949969
const container = document.createElement('div');
950970
container.className = 'smart-resize-trigger-container';
951971
container.innerHTML =
@@ -1104,18 +1124,26 @@ License: https://htmlelements.com/license/ */ //
11041124
delete that.target._handleDocumentUpId;
11051125
}
11061126

1107-
if (eventType === 'resize' && that.target.resizeTrigger) {
1108-
const container = that.target.resizeTrigger;
1109-
const expand = container.childNodes[0];
1110-
const shrink = container.childNodes[1];
1127+
if (eventType === 'resize') {
1128+
if (Smart.Utilities.Core.Browser.Firefox) {
1129+
if (that.target.resizeObserver) {
1130+
that.target.resizeObserver.unobserve(that.target);
1131+
delete that.target.resizeObserver;
1132+
}
1133+
}
1134+
else if (that.target.resizeTrigger) {
1135+
const container = that.target.resizeTrigger;
1136+
const expand = container.childNodes[0];
1137+
const shrink = container.childNodes[1];
11111138

1112-
expand.removeEventListener('scroll', that.target.resizeHandler);
1113-
shrink.removeEventListener('scroll', that.target.resizeHandler);
1139+
expand.removeEventListener('scroll', that.target.resizeHandler);
1140+
shrink.removeEventListener('scroll', that.target.resizeHandler);
11141141

1115-
that.target.resizeHandler = null;
1116-
container.parentNode.removeChild(container);
1142+
that.target.resizeHandler = null;
1143+
container.parentNode.removeChild(container);
11171144

1118-
delete that.target.resizeTrigger;
1145+
delete that.target.resizeTrigger;
1146+
}
11191147
}
11201148
}
11211149

@@ -3567,7 +3595,7 @@ License: https://htmlelements.com/license/ */ //
35673595
if (rootNode.host) {
35683596
const getNodeParents = (node) => {
35693597
let matched = [node],
3570-
current = node.parentNode;
3598+
current = node.parentNode;
35713599

35723600
while (current && current.nodeType !== 9) {
35733601
if (current instanceof HTMLElement === true) {
@@ -4566,6 +4594,10 @@ License: https://htmlelements.com/license/ */ //
45664594
that.attributeChanged(name, oldValue, newValue);
45674595
}
45684596

4597+
if (that.onAttributeChanged) {
4598+
that.onAttributeChanged(name, oldValue, newValue);
4599+
}
4600+
45694601
if (!property || (property && property.isUpdating)) {
45704602
return;
45714603
}
@@ -6045,8 +6077,9 @@ License: https://htmlelements.com/license/ */ //
60456077

60466078
get isInShadowDOM() {
60476079
const that = this;
6080+
const rootNode = that.getRootNode();
60486081

6049-
return that.getRootNode() !== document;
6082+
return rootNode !== document && rootNode !== that;
60506083
}
60516084

60526085
getShadowRootOrBody() {
@@ -6455,6 +6488,25 @@ License: https://htmlelements.com/license/ */ //
64556488
that.classList.remove('smart-element-init');
64566489
}
64576490

6491+
if (document.readyState === 'complete') {
6492+
if (window[namespace].isAngular === undefined) {
6493+
window[namespace].isAngular = document.body.querySelector('[ng-version]') !== null;
6494+
}
6495+
6496+
if (window[namespace].isAngular) {
6497+
for (let i = 0; i < that.parents.length; i++) {
6498+
if (that.parents[i].nodeName.toLowerCase().startsWith(namespace.toLowerCase() + '-')) {
6499+
break;
6500+
}
6501+
6502+
if (that.parents[i].hasAttribute('ng-version')) {
6503+
window[namespace].RenderMode = 'manual';
6504+
break;
6505+
}
6506+
}
6507+
}
6508+
}
6509+
64586510
if (document.readyState === 'complete' && window[namespace].RenderMode !== 'manual' /*&& !ElementRegistry.isRegistering */) {
64596511
const parents = that.parents;
64606512

@@ -6992,6 +7044,7 @@ License: https://htmlelements.com/license/ */ //
69927044
const itemProxy = new Proxy(item, {
69937045
deleteProperty: function (target, property) {
69947046
delete target[property];
7047+
return true;
69957048
},
69967049
set: function (target, property, value/*, receiver*/) {
69977050
const oldValue = target[property];
@@ -7655,6 +7708,7 @@ License: https://htmlelements.com/license/ */ //
76557708
Version: Version,
76567709
RenderMode: userDefinedSettings.RenderMode || 'auto',
76577710
Render: render,
7711+
Data: data,
76587712
License: 'Evaluation'
76597713
});
76607714

@@ -7843,8 +7897,8 @@ License: https://htmlelements.com/license/ */ //
78437897
<content></content>
78447898
</div>
78457899
</div>
7846-
<smart-scroll-bar id="verticalScrollBar" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" orientation="vertical"></smart-scroll-bar>
7847-
<smart-scroll-bar id="horizontalScrollBar" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]"></smart-scroll-bar>
7900+
<smart-scroll-bar id="verticalScrollBar" theme="[[theme]]" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" orientation="vertical"></smart-scroll-bar>
7901+
<smart-scroll-bar id="horizontalScrollBar" theme="[[theme]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]"></smart-scroll-bar>
78487902
</div>`;
78497903
}
78507904

@@ -8615,7 +8669,7 @@ License: https://htmlelements.com/license/ */ //
86158669
that._dropDownParent = that.getRootNode().host.shadowRoot;
86168670
}
86178671
else {
8618-
that._dropDownParent = document.body;
8672+
that._dropDownParent = document.body;
86198673
}
86208674
}
86218675
else if (dropDownAppendTo instanceof HTMLElement) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
{"name":"smart-webcomponents","version": "8.0.0",
1+
{"name":"smart-webcomponents","version": "8.1.1",
22
"description":"Web Components &amp; Custom Elements for Professional Web Applications","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/HTMLElements/smart-elements.git"},"author":"https://htmlelements.com","bugs":{"url":"https://github.com/HTMLElements/smart-elements/issues"},"homepage":"https://github.com/HTMLElements/smart-elements#readme","keywords":["custom","element","bootstrap","chart","treegrid","gantt","gantt chart","query builder","colorpicker","colorpanel","chart web component","chart custom element","tables","table","docking layot","charting","datagridview","bootstrap grid","tabs","combobox","dropdownlist","listbox","input","password","ui components","user interface","components","bootstrap components","smart components","custom elements","grid web component","grid custom element","chart custom element","chart web component","javascript grid","javascript datagrid","javascript datatable","datatable","bootstrap datagrid","material datagrid","bootstrap datatable","bootstrap table","grid","grid web component","datagrid web component","data grid","datagrid bootstrap","bootstrap grid","carousel custom element","html carousel","material web components","webcomponents","material webcomponents", "gantt", "scheduler", "docking", "datagrid", "gridview", "webcomponent", "webcomponents", "web_components", "ui", "user interface", "front end", "bootsrap grid", "custom elements","material customelements"],"license":"ISC"}

source/angular/accordion/smart.accordionitem.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ export class AccordionItemComponent extends BaseElement implements OnInit, After
9696

9797
that.onCreate.emit(that.nativeElement);
9898

99-
Smart.Render();
100-
10199
this.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); });
102100
this.listen();
103101
}

source/angular/buttongroup/smart.buttongroup.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { ButtonGroup } from './../index';
2-
import { Animation, ClickMode, ElementRenderMode} from './../index';
2+
import { Animation, ButtonGroupSelectionMode, ElementRenderMode} from './../index';
33
import { Component, Directive, AfterViewInit, ElementRef, Input, OnInit, OnChanges, OnDestroy, SimpleChanges, Output, EventEmitter } from '@angular/core';
44
import { BaseElement, Smart } from './smart.element';
5-
export { Animation, ClickMode, ElementRenderMode} from './../index';
5+
export { Animation, ButtonGroupSelectionMode, ElementRenderMode} from './../index';
66
export { Smart } from './smart.element';
77
export { ButtonGroup } from './../index';
88

@@ -50,10 +50,10 @@ export class ButtonGroupComponent extends BaseElement implements OnInit, AfterVi
5050

5151
/** @description Determines the selection mode for the element. */
5252
@Input()
53-
get selectionMode(): ClickMode {
53+
get selectionMode(): ButtonGroupSelectionMode {
5454
return this.nativeElement ? this.nativeElement.selectionMode : undefined;
5555
}
56-
set selectionMode(value: ClickMode) {
56+
set selectionMode(value: ButtonGroupSelectionMode) {
5757
this.nativeElement ? this.nativeElement.selectionMode = value : undefined;
5858
}
5959

source/angular/chart/smart.chart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ export class ChartComponent extends BaseElement implements OnInit, AfterViewInit
149149

150150
/** @description Sets the chart's data source. */
151151
@Input()
152-
get dataSource(): any {
152+
get dataSource(): any[] {
153153
return this.nativeElement ? this.nativeElement.dataSource : undefined;
154154
}
155-
set dataSource(value: any) {
155+
set dataSource(value: any[]) {
156156
this.nativeElement ? this.nativeElement.dataSource = value : undefined;
157157
}
158158

source/angular/colorinput/smart.colorinput.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { ColorInput } from './../index';
2-
import { Animation, ColorDisplayMode, DropDownButtonPosition, ColorQueryMode, ColorValueDisplayMode, ColorValueFormat, ElementRenderMode} from './../index';
2+
import { Animation, ColorInputDisplayMode, DropDownButtonPosition, ColorQueryMode, ColorValueDisplayMode, ColorValueFormat, ElementRenderMode} from './../index';
33
import { Component, Directive, AfterViewInit, ElementRef, Input, OnInit, OnChanges, OnDestroy, SimpleChanges, forwardRef, ChangeDetectionStrategy, Output, EventEmitter } from '@angular/core';
44
import { BaseElement, Smart } from './smart.element';
5-
export { Animation, ColorDisplayMode, DropDownButtonPosition, ColorQueryMode, ColorValueDisplayMode, ColorValueFormat, ElementRenderMode} from './../index';
5+
export { Animation, ColorInputDisplayMode, DropDownButtonPosition, ColorQueryMode, ColorValueDisplayMode, ColorValueFormat, ElementRenderMode} from './../index';
66
export { Smart } from './smart.element';
77
export { ColorInput } from './../index';
88
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
@@ -90,10 +90,10 @@ export class ColorInputComponent extends BaseElement implements OnInit, AfterVie
9090

9191
/** @description Determines the colors that will be displayed and their layout. */
9292
@Input()
93-
get displayMode(): ColorDisplayMode {
93+
get displayMode(): ColorInputDisplayMode {
9494
return this.nativeElement ? this.nativeElement.displayMode : undefined;
9595
}
96-
set displayMode(value: ColorDisplayMode) {
96+
set displayMode(value: ColorInputDisplayMode) {
9797
this.nativeElement ? this.nativeElement.displayMode = value : undefined;
9898
}
9999

source/angular/combobox/smart.listitem.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ export class ListItemComponent extends BaseElement implements OnInit, AfterViewI
142142

143143
that.onCreate.emit(that.nativeElement);
144144

145-
Smart.Render();
146-
147145
this.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); });
148146
}
149147

source/angular/combobox/smart.listitemsgroup.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ export class ListItemsGroupComponent extends BaseElement implements OnInit, Afte
5252

5353
that.onCreate.emit(that.nativeElement);
5454

55-
Smart.Render();
56-
5755
this.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); });
5856
}
5957

0 commit comments

Comments
 (0)