Skip to content

Commit

Permalink
Merge pull request #185 from KorzhCom/dev
Browse files Browse the repository at this point in the history
Version 1.5.2
  • Loading branch information
korzh authored Feb 7, 2024
2 parents 689d87b + 411a5ed commit f63bc43
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 32 deletions.
2 changes: 1 addition & 1 deletion easydata.js/bundles/crud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"defaults"
],
"dependencies": {
"@easydata/crud": "1.4.21"
"@easydata/crud": "^1.5.2"
},
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion easydata.js/packs/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@easydata/core",
"version": "1.5.1",
"version": "1.5.2",
"description": "EasyData.JS core functions, classes, and data structures",
"types": "./dist/types/public_api.d.ts",
"main": "./dist/easydata.core.cjs.js",
Expand Down
6 changes: 3 additions & 3 deletions easydata.js/packs/crud/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@easydata/crud",
"version": "1.5.1",
"version": "1.5.2",
"description": "EasyData.JS UI widgets and views for CRUD manipulations",
"types": "./dist/types/public_api.d.ts",
"main": "./dist/easydata.crud.cjs.js",
Expand Down Expand Up @@ -31,8 +31,8 @@
"defaults and supports es6-module"
],
"peerDependencies": {
"@easydata/core": "1.4.21",
"@easydata/ui": "1.4.21"
"@easydata/core": "^1.5.2",
"@easydata/ui": "^1.5.2"
},
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion easydata.js/packs/crud/src/form/entity_form_builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DataContext } from '../main/data_context';
import { EntityEditForm } from './entity_edit_form';
import { TextFilterWidget } from '../widgets/text_filter_widget';

const isIE = browserUtils.IsIE();
const isIE = browserUtils.isIE();

export type FormBuildParams = {
values?: DataRow,
Expand Down
4 changes: 2 additions & 2 deletions easydata.js/packs/crud/src/widgets/text_filter_widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export class TextFilterWidget {
private filterInput: HTMLInputElement;

private render() {
const horizClass = browserUtils.IsIE()
const horizClass = browserUtils.isIE()
? 'kfrm-fields-ie is-horizontal'
: 'kfrm-fields is-horizontal';

const isEdgeOrIE = browserUtils.IsIE() || browserUtils.IsEdge();
const isEdgeOrIE = browserUtils.isIE() || browserUtils.isEdge();

domel(this.slot)
.addClass(horizClass)
Expand Down
4 changes: 2 additions & 2 deletions easydata.js/packs/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@easydata/ui",
"version": "1.5.1",
"version": "1.5.2",
"description": "EasyData.JS: DOM manipulation functions and UI widgets",
"types": "./dist/types/public_api.d.ts",
"main": "./dist/easydata.ui.cjs.js",
Expand Down Expand Up @@ -35,7 +35,7 @@
"defaults"
],
"peerDependencies": {
"@easydata/core": "^1.4.21"
"@easydata/core": "^1.5.2"
},
"files": [
"dist"
Expand Down
23 changes: 8 additions & 15 deletions easydata.js/packs/ui/src/utils/browser_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@ export namespace browserUtils {

let _isIE: boolean = null;

export function IsIE(): boolean {
let mobileModeChangeHandler: (newValue: boolean) => void;

export function isIE(): boolean {
if (_isIE === null) {
const ua = navigator.userAgent;
/* MSIE used to detect old browsers and Trident used to newer ones*/
_isIE = ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1;
return ua.includes('MSIE') || ua.includes('Trident')
}
return _isIE;
}

export function IsEdge(): boolean {
export function isEdge(): boolean {
const ua = window.navigator.userAgent;

return !IsIE() && ua.includes('Edge/')
return !isIE() && ua.includes('Edge/')
}

export function IsFirefox(): boolean {

export function isFirefox(): boolean {
if (_isFirefox === null) {
const ua = navigator.userAgent;
_isFirefox = ua.toLowerCase().indexOf('firefox') > -1;
_isFirefox = ua.toLowerCase().includes('firefox');
}

return _isFirefox;
}

Expand Down Expand Up @@ -68,13 +66,8 @@ export namespace browserUtils {
}
}

let mobileModeChangeHandler: (newValue: boolean) => void;
export function onMobileModeChanged(callback: (newValue: boolean) => void) {
mobileModeChangeHandler = callback;
}

export function getMobileCssClass(): string | null {
return isMobileMode() ? 'k-mobile' : null;
}

}
5 changes: 4 additions & 1 deletion easydata.js/packs/ui/src/utils/ui-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function getViewportSize() {

export function getDocSize() {

if (browserUtils.IsIE())
if (browserUtils.isIE())
return getWinSize();

const width = Math.max(document.documentElement.clientWidth, document.body.clientWidth || 0);
Expand Down Expand Up @@ -272,3 +272,6 @@ export function slideUp(target: HTMLElement, duration: number, callback?: () =>

export const eqCssPrefix = 'eqjs';
export const eqCssMobile = 'eqjs-mobile';
export function getMobileCssClass(): string | null {
return browserUtils.isMobileMode() ? 'k-mobile' : null;
}
6 changes: 3 additions & 3 deletions easydata.js/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "1.5.1",
"baseVersion": "1.5.1",
"assetVersion": "01_05_01",
"version": "1.5.2",
"baseVersion": "1.5.2",
"assetVersion": "01_05_02",
"tag": "latest"
}
6 changes: 3 additions & 3 deletions easydata.net/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"assemblyVersion": "1.5.1.1",
"packageVersion": "1.5.1",
"assetVersion": "01_05_01"
"assemblyVersion": "1.5.2.1",
"packageVersion": "1.5.2",
"assetVersion": "01_05_02"
}

0 comments on commit f63bc43

Please sign in to comment.