Skip to content

Commit 774d184

Browse files
committed
9.1.0
1 parent 50bd574 commit 774d184

File tree

456 files changed

+6501
-2476
lines changed

Some content is hidden

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

456 files changed

+6501
-2476
lines changed

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: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

2-
/* Smart UI v9.0.0 (2020-Dec)
2+
/* Smart UI v9.1.1 (2021-Feb)
33
Copyright (c) 2011-2021 jQWidgets.
44
License: https://htmlelements.com/license/ */ //
55

66
(function () {
77

88

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

1212
let namespace = 'Smart';
@@ -533,6 +533,22 @@ License: https://htmlelements.com/license/ */ //
533533
class Core {
534534
static get isMobile() {
535535
const isMobile = /(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());
536+
const iOS = () => {
537+
return [
538+
'iPad Simulator',
539+
'iPhone Simulator',
540+
'iPod Simulator',
541+
'iPad',
542+
'iPhone',
543+
'iPod'
544+
].includes(navigator.platform)
545+
// iPad on iOS 13 detection
546+
|| (navigator.userAgent.includes('Mac') && 'ontouchend' in document)
547+
}
548+
549+
if (!isMobile) {
550+
return iOS();
551+
}
536552

537553
return isMobile;
538554
}
@@ -771,6 +787,14 @@ License: https://htmlelements.com/license/ */ //
771787
static observeElement(element) {
772788
const that = element;
773789

790+
if (window.Smart.Mode === 'test') {
791+
if (StyleObserver.interval) {
792+
clearInterval(StyleObserver.interval);
793+
}
794+
795+
return;
796+
}
797+
774798
let computedStyle = element._computedStyle || that.hasStyleObserver !== 'resize' ? document.defaultView.getComputedStyle(that, null) : {
775799
};
776800

@@ -1708,14 +1732,15 @@ License: https://htmlelements.com/license/ */ //
17081732
event.originalEvent.stopPropagation();
17091733
}
17101734

1711-
hScrollInfo.visible = horizontalScrollBar.offsetHeight > 0;
1712-
vScrollInfo.visible = verticalScrollBar.offsetWidth > 0;
1735+
hScrollInfo.visible = that.scrollWidth > 0;
1736+
vScrollInfo.visible = that.scrollHeight > 0;
17131737

17141738
if (!pointerCaptured || (!hScrollInfo.visible && !vScrollInfo.visible)) {
17151739
return;
17161740
}
17171741

1718-
const touchScrollRatio = that.container.touchScrollRatio;
1742+
const touchScrollRatio = that.container.touchScrollRatio,
1743+
container = that.container;
17191744
let vScrollRatio, hScrollRatio;
17201745

17211746
if (touchScrollRatio) {
@@ -1724,15 +1749,15 @@ License: https://htmlelements.com/license/ */ //
17241749
hScrollRatio = -touchScrollRatio;
17251750
}
17261751
else if (typeof touchScrollRatio === 'function') {
1727-
vScrollRatio = touchScrollRatio(vScrollInfo.max, vScrollInfo.scrollBar.offsetHeight);
1728-
hScrollRatio = touchScrollRatio(hScrollInfo.max, hScrollInfo.scrollBar.offsetWidth);
1752+
vScrollRatio = touchScrollRatio(vScrollInfo.max, container.offsetHeight);
1753+
hScrollRatio = touchScrollRatio(hScrollInfo.max, container.offsetWidth);
17291754
}
17301755
}
17311756

1732-
vScrollInfo.ratio = vScrollRatio || (-vScrollInfo.max / vScrollInfo.scrollBar.offsetHeight);
1757+
vScrollInfo.ratio = vScrollRatio || (-vScrollInfo.max / container.offsetHeight);
17331758
vScrollInfo.delta = (event.clientY - vScrollInfo.pointerPosition) * vScrollInfo.ratio;
17341759

1735-
hScrollInfo.ratio = hScrollRatio || (-hScrollInfo.max / hScrollInfo.scrollBar.offsetWidth);
1760+
hScrollInfo.ratio = hScrollRatio || (-hScrollInfo.max / container.offsetWidth);
17361761
hScrollInfo.delta = (event.clientX - hScrollInfo.pointerPosition) * hScrollInfo.ratio;
17371762

17381763
let dragged = 'value';
@@ -3937,9 +3962,9 @@ License: https://htmlelements.com/license/ */ //
39373962
console.log('****************************************************************************************************************');
39383963
console.log('****************************************************************************************************************');
39393964
console.log('****************************************************************************************************************');
3940-
console.log('*Smart HTML Elements License Key Not Found.');
3941-
console.log('*This is an evaluation only version, it is not licensed for development projects intended for production.');
3942-
console.log('*if you want to hide the watermark, please send an email to: sales@htmlelements.com for a license.');
3965+
console.log('*jQWidgets License Key Not Found.');
3966+
console.log('*This is an EVALUATION only Version, it is NOT Licensed for software projects intended for PRODUCTION.');
3967+
console.log('*if you want to hide this message, please send an email to: sales@jqwidgets.com for a license.');
39433968
console.log('****************************************************************************************************************');
39443969
console.log('****************************************************************************************************************');
39453970
console.log('****************************************************************************************************************');
@@ -4689,8 +4714,8 @@ License: https://htmlelements.com/license/ */ //
46894714
}
46904715

46914716
if (data && data[that._selector]) {
4692-
delete data[that._selector];
4693-
}
4717+
delete data[that._selector];
4718+
}
46944719
}
46954720

46964721
/** Called when a property value is changed. */
@@ -5083,6 +5108,10 @@ License: https://htmlelements.com/license/ */ //
50835108
else {
50845109
const modules = proto.modules;
50855110

5111+
if (!modules) {
5112+
return;
5113+
}
5114+
50865115
for (let i = 0; i < modules.length; i += 1) {
50875116
const module = modules[i];
50885117
const proto = module.prototype;
@@ -7715,6 +7744,7 @@ License: https://htmlelements.com/license/ */ //
77157744
RenderMode: userDefinedSettings.RenderMode || 'auto',
77167745
Render: render,
77177746
Data: data,
7747+
Mode: userDefinedSettings.Mode || 'production',
77187748
License: 'Evaluation'
77197749
});
77207750

@@ -7986,11 +8016,11 @@ License: https://htmlelements.com/license/ */ //
79868016
return;
79878017
}
79888018

7989-
const computedVerticalScrollBarVisibility = that.computedVerticalScrollBarVisibility,
8019+
const computedVerticalScrollBarVisibility = that.scrollHeight > 0,
8020+
computedHorizontalScrollBarVisibility = that.scrollWidth > 0,
79908021
coords = that._touchCoords;
79918022

7992-
if (!that.computedHorizontalScrollBarVisibility && !computedVerticalScrollBarVisibility ||
7993-
!coords) {
8023+
if (!computedVerticalScrollBarVisibility && !computedHorizontalScrollBarVisibility || !coords) {
79948024
return;
79958025
}
79968026

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": "9.0.0",
1+
{"name":"smart-webcomponents","version": "9.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.accordion.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ export class AccordionComponent extends BaseElement implements OnInit, AfterView
4242
this.nativeElement ? this.nativeElement.animation = value : undefined;
4343
}
4444

45+
/** @description Determines the data source that will be loaded to the Accordion. */
46+
@Input()
47+
get dataSource(): any {
48+
return this.nativeElement ? this.nativeElement.dataSource : undefined;
49+
}
50+
set dataSource(value: any) {
51+
this.nativeElement ? this.nativeElement.dataSource = value : undefined;
52+
}
53+
4554
/** @description Enables or disables the accordion. Disabled elements can not be interacted with. */
4655
@Input()
4756
get disabled(): boolean {

source/angular/button/smart.togglebutton.ts

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,26 @@ export class ToggleButtonComponent extends BaseElement implements OnInit, AfterV
147147
this.nativeElement ? this.nativeElement.value = value : undefined;
148148
}
149149

150-
/** @description This event is triggered when the state of the element is changed.
151-
* @param event. The custom event. */
150+
/** @description This event is triggered when the widget is checked/unchecked.
151+
* @param event. The custom event. Custom event was created with: event.detail( value, oldValue, changeType)
152+
* value - A boolean value indicating the new state of the button ( checked or not ).
153+
* oldValue - A boolean value indicating the previous state of the button ( checked or not ).
154+
* changeType - A string flag indicating whether the change event was triggered via API or an event.
155+
*/
152156
@Output() onChange: EventEmitter<CustomEvent> = new EventEmitter();
153157

158+
/** @description This event is triggered when the widget is checked.
159+
* @param event. The custom event. Custom event was created with: event.detail( changeType)
160+
* changeType - A string flag indicating whether the change event was triggered via API or an event.
161+
*/
162+
@Output() onCheckValue: EventEmitter<CustomEvent> = new EventEmitter();
163+
164+
/** @description This event is triggered when the widget is unchecked.
165+
* @param event. The custom event. Custom event was created with: event.detail( changeType)
166+
* changeType - A string flag indicating whether the change event was triggered via API or an event.
167+
*/
168+
@Output() onUncheckValue: EventEmitter<CustomEvent> = new EventEmitter();
169+
154170

155171
get isRendered(): boolean {
156172
return this.nativeElement ? this.nativeElement.isRendered : false;
@@ -190,6 +206,12 @@ export class ToggleButtonComponent extends BaseElement implements OnInit, AfterV
190206
that.eventHandlers['changeHandler'] = (event: CustomEvent) => { that.onChange.emit(event); }
191207
that.nativeElement.addEventListener('change', that.eventHandlers['changeHandler']);
192208

209+
that.eventHandlers['checkValueHandler'] = (event: CustomEvent) => { that.onCheckValue.emit(event); }
210+
that.nativeElement.addEventListener('checkValue', that.eventHandlers['checkValueHandler']);
211+
212+
that.eventHandlers['uncheckValueHandler'] = (event: CustomEvent) => { that.onUncheckValue.emit(event); }
213+
that.nativeElement.addEventListener('uncheckValue', that.eventHandlers['uncheckValueHandler']);
214+
193215
}
194216

195217
/** @description Remove event listeners. */
@@ -199,5 +221,13 @@ export class ToggleButtonComponent extends BaseElement implements OnInit, AfterV
199221
that.nativeElement.removeEventListener('change', that.eventHandlers['changeHandler']);
200222
}
201223

224+
if (that.eventHandlers['checkValueHandler']) {
225+
that.nativeElement.removeEventListener('checkValue', that.eventHandlers['checkValueHandler']);
226+
}
227+
228+
if (that.eventHandlers['uncheckValueHandler']) {
229+
that.nativeElement.removeEventListener('uncheckValue', that.eventHandlers['uncheckValueHandler']);
230+
}
231+
202232
}
203233
}

source/angular/calendar/smart.calendar.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,19 @@ export class CalendarComponent extends BaseElement implements OnInit, AfterViewI
135135

136136
/** @description Determines the height of the month's drop down inside the Calendar. */
137137
@Input()
138-
get dropDownHeight(): string {
138+
get dropDownHeight(): string | number {
139139
return this.nativeElement ? this.nativeElement.dropDownHeight : undefined;
140140
}
141-
set dropDownHeight(value: string) {
141+
set dropDownHeight(value: string | number) {
142142
this.nativeElement ? this.nativeElement.dropDownHeight = value : undefined;
143143
}
144144

145145
/** @description Determines the width of the month's drop down inside the Calendar. */
146146
@Input()
147-
get dropDownWidth(): string {
147+
get dropDownWidth(): string | number {
148148
return this.nativeElement ? this.nativeElement.dropDownWidth : undefined;
149149
}
150-
set dropDownWidth(value: string) {
150+
set dropDownWidth(value: string | number) {
151151
this.nativeElement ? this.nativeElement.dropDownWidth = value : undefined;
152152
}
153153

@@ -243,10 +243,10 @@ export class CalendarComponent extends BaseElement implements OnInit, AfterViewI
243243

244244
/** @description Determines the max date for the Calendar. Accepts date objects and valid date string formats. */
245245
@Input()
246-
get max(): any {
246+
get max(): string | Date {
247247
return this.nativeElement ? this.nativeElement.max : undefined;
248248
}
249-
set max(value: any) {
249+
set max(value: string | Date) {
250250
this.nativeElement ? this.nativeElement.max = value : undefined;
251251
}
252252

@@ -261,10 +261,10 @@ export class CalendarComponent extends BaseElement implements OnInit, AfterViewI
261261

262262
/** @description Determines the min date for the Calendar. Accepts date objects and valid date string formats. */
263263
@Input()
264-
get min(): any {
264+
get min(): string | Date {
265265
return this.nativeElement ? this.nativeElement.min : undefined;
266266
}
267-
set min(value: any) {
267+
set min(value: string | Date) {
268268
this.nativeElement ? this.nativeElement.min = value : undefined;
269269
}
270270

@@ -306,10 +306,10 @@ export class CalendarComponent extends BaseElement implements OnInit, AfterViewI
306306

307307
/** @description Sets restricted dates. Restricted dates are dates that cannot be selected/hovered/focused. They are visualy styled as restricted. The dates can be javascript date objects or strings representing a valid date. */
308308
@Input()
309-
get restrictedDates(): string[] {
309+
get restrictedDates(): string[] | Date[] {
310310
return this.nativeElement ? this.nativeElement.restrictedDates : undefined;
311311
}
312-
set restrictedDates(value: string[]) {
312+
set restrictedDates(value: string[] | Date[]) {
313313
this.nativeElement ? this.nativeElement.restrictedDates = value : undefined;
314314
}
315315

source/angular/card/smart.card.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class CardComponent extends BaseElement implements OnInit, AfterViewInit,
6666
this.nativeElement ? this.nativeElement.disabled = value : undefined;
6767
}
6868

69-
/** @description Sets custom card template. The template can be the id of an HTMLTemplate element inside the DOM or it's reference. The content of the template may hold one or many property placeholders in format {{property}}. These placeholders will be replaced with the values of the corresponding properties defined in the dataSource object. */
69+
/** @description Sets custom card template. The template can be the ID of an HTMLTemplate element inside the DOM or it's reference. The content of the template may hold one or many property placeholders in format {{property}}. These placeholders will be replaced with the values of the corresponding properties defined in the dataSource object. When setting the property to template ID, the property type is 'string'. */
7070
@Input()
7171
get itemTemplate(): any {
7272
return this.nativeElement ? this.nativeElement.itemTemplate : undefined;

source/angular/carousel/smart.carousel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ export class CarouselComponent extends BaseElement implements OnInit, AfterViewI
4141

4242
/** @description The items switch automatically if set to true or to a custom number(representing the timeout in milliseconds). This property works if slideShow property is enabled. */
4343
@Input()
44-
get autoPlay(): any {
44+
get autoPlay(): boolean {
4545
return this.nativeElement ? this.nativeElement.autoPlay : undefined;
4646
}
47-
set autoPlay(value: any) {
47+
set autoPlay(value: boolean) {
4848
this.nativeElement ? this.nativeElement.autoPlay = value : undefined;
4949
}
5050

0 commit comments

Comments
 (0)