Skip to content

Commit 113c4c1

Browse files
author
pipeline
committed
v19.2.44 is released
1 parent 61a1d88 commit 113c4c1

File tree

442 files changed

+7771
-2170
lines changed

Some content is hidden

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

442 files changed

+7771
-2170
lines changed

components/barcodegenerator/src/barcode-generator/barcodegenerator.component.ts

+47-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
import Vue from 'vue';
2-
import { ComponentBase, EJComponentDecorator } from '@syncfusion/ej2-vue-base';
1+
import { Options } from 'vue-class-component';
2+
import { ComponentBase, EJComponentDecorator, getProps, allVue, gh } from '@syncfusion/ej2-vue-base';
3+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
4+
35
import { BarcodeGenerator } from '@syncfusion/ej2-barcode-generator';
46

57

8+
// {{VueImport}}
69
export const properties: string[] = ['backgroundColor', 'displayText', 'enableCheckSum', 'enablePersistence', 'enableRtl', 'foreColor', 'height', 'locale', 'margin', 'mode', 'type', 'value', 'width', 'invalid'];
710
export const modelProps: string[] = [];
811

12+
export const testProp: any = getProps({props: properties});
13+
export const props = testProp[0];
14+
export const watch = testProp[1];
15+
16+
export const emitProbs: any = Object.keys(watch);
17+
emitProbs.push('modelchanged');
18+
for (let props of modelProps) {
19+
emitProbs.push(
20+
'update:'+props
21+
);
22+
}
23+
24+
export const isExecute: any = gh ? false : true;
25+
26+
export let tempProxy: any;
27+
928
/**
1029
* Represents vue Barcode Component
1130
* ```html
@@ -14,7 +33,14 @@ export const modelProps: string[] = [];
1433
*/
1534
@EJComponentDecorator({
1635
props: properties
17-
})
36+
},isExecute)
37+
38+
/* Start Options({
39+
props: props,
40+
watch: watch,
41+
emits: emitProbs
42+
}) End */
43+
1844
export class BarcodeGeneratorComponent extends ComponentBase {
1945

2046
public ej2Instances: any;
@@ -24,31 +50,46 @@ export class BarcodeGeneratorComponent extends ComponentBase {
2450
protected hasInjectedModules: boolean = false;
2551
public tagMapper: { [key: string]: Object } = {};
2652
public tagNameMapper: Object = {};
53+
public isVue3: boolean;
2754

2855
constructor() {
29-
super();
56+
super(arguments);
57+
this.isVue3 = !isExecute;
3058
this.ej2Instances = new BarcodeGenerator({});
3159
this.bindProperties();
3260
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
3361
this.ej2Instances.setProperties = this.setProperties;
62+
tempProxy = this;
3463
}
3564
public setProperties(prop: any, muteOnChange: boolean): void {
65+
if(this.isVue3) {
66+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
67+
}
3668
if (this.ej2Instances && this.ej2Instances._setProperties) {
3769
this.ej2Instances._setProperties(prop, muteOnChange);
3870
}
3971
if (prop && this.models && this.models.length) {
4072
Object.keys(prop).map((key: string): void => {
4173
this.models.map((model: string): void => {
4274
if ((key === model) && !(/datasource/i.test(key))) {
43-
this.$emit('update:' + key, prop[key]);
75+
if (this.isVue3) {
76+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
77+
} else {
78+
(this as any).$emit('update:' + key, prop[key]);
79+
}
4480
}
4581
});
4682
});
4783
}
4884
}
4985

5086
public render(createElement: any) {
51-
return createElement('div', (this as any).$slots.default);
87+
let h: any = gh || createElement;
88+
let slots: any = null;
89+
if(!isNullOrUndefined((this as any).$slots.default)) {
90+
slots = gh ? (this as any).$slots.default() : (this as any).$slots.default;
91+
}
92+
return h('div', slots);
5293
}
5394

5495
public exportAsBase64Image(exportType: Object): Object {

components/barcodegenerator/src/datamatrix-generator/datamatrixgenerator.component.ts

+47-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
import Vue from 'vue';
2-
import { ComponentBase, EJComponentDecorator } from '@syncfusion/ej2-vue-base';
1+
import { Options } from 'vue-class-component';
2+
import { ComponentBase, EJComponentDecorator, getProps, allVue, gh } from '@syncfusion/ej2-vue-base';
3+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
4+
35
import { DataMatrixGenerator } from '@syncfusion/ej2-barcode-generator';
46

57

8+
// {{VueImport}}
69
export const properties: string[] = ['backgroundColor', 'displayText', 'enablePersistence', 'enableRtl', 'encoding', 'foreColor', 'height', 'locale', 'margin', 'mode', 'size', 'value', 'width', 'xDimension', 'invalid'];
710
export const modelProps: string[] = [];
811

12+
export const testProp: any = getProps({props: properties});
13+
export const props = testProp[0];
14+
export const watch = testProp[1];
15+
16+
export const emitProbs: any = Object.keys(watch);
17+
emitProbs.push('modelchanged');
18+
for (let props of modelProps) {
19+
emitProbs.push(
20+
'update:'+props
21+
);
22+
}
23+
24+
export const isExecute: any = gh ? false : true;
25+
26+
export let tempProxy: any;
27+
928
/**
1029
* Represents vue DataMatrix Component
1130
* ```html
@@ -14,7 +33,14 @@ export const modelProps: string[] = [];
1433
*/
1534
@EJComponentDecorator({
1635
props: properties
17-
})
36+
},isExecute)
37+
38+
/* Start Options({
39+
props: props,
40+
watch: watch,
41+
emits: emitProbs
42+
}) End */
43+
1844
export class DataMatrixGeneratorComponent extends ComponentBase {
1945

2046
public ej2Instances: any;
@@ -24,31 +50,46 @@ export class DataMatrixGeneratorComponent extends ComponentBase {
2450
protected hasInjectedModules: boolean = false;
2551
public tagMapper: { [key: string]: Object } = {};
2652
public tagNameMapper: Object = {};
53+
public isVue3: boolean;
2754

2855
constructor() {
29-
super();
56+
super(arguments);
57+
this.isVue3 = !isExecute;
3058
this.ej2Instances = new DataMatrixGenerator({});
3159
this.bindProperties();
3260
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
3361
this.ej2Instances.setProperties = this.setProperties;
62+
tempProxy = this;
3463
}
3564
public setProperties(prop: any, muteOnChange: boolean): void {
65+
if(this.isVue3) {
66+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
67+
}
3668
if (this.ej2Instances && this.ej2Instances._setProperties) {
3769
this.ej2Instances._setProperties(prop, muteOnChange);
3870
}
3971
if (prop && this.models && this.models.length) {
4072
Object.keys(prop).map((key: string): void => {
4173
this.models.map((model: string): void => {
4274
if ((key === model) && !(/datasource/i.test(key))) {
43-
this.$emit('update:' + key, prop[key]);
75+
if (this.isVue3) {
76+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
77+
} else {
78+
(this as any).$emit('update:' + key, prop[key]);
79+
}
4480
}
4581
});
4682
});
4783
}
4884
}
4985

5086
public render(createElement: any) {
51-
return createElement('div', (this as any).$slots.default);
87+
let h: any = gh || createElement;
88+
let slots: any = null;
89+
if(!isNullOrUndefined((this as any).$slots.default)) {
90+
slots = gh ? (this as any).$slots.default() : (this as any).$slots.default;
91+
}
92+
return h('div', slots);
5293
}
5394

5495
public exportAsBase64Image(barcodeExportType: Object): Object {

components/barcodegenerator/src/qrcode-generator/qrcodegenerator.component.ts

+47-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
import Vue from 'vue';
2-
import { ComponentBase, EJComponentDecorator } from '@syncfusion/ej2-vue-base';
1+
import { Options } from 'vue-class-component';
2+
import { ComponentBase, EJComponentDecorator, getProps, allVue, gh } from '@syncfusion/ej2-vue-base';
3+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
4+
35
import { QRCodeGenerator } from '@syncfusion/ej2-barcode-generator';
46

57

8+
// {{VueImport}}
69
export const properties: string[] = ['backgroundColor', 'displayText', 'enablePersistence', 'enableRtl', 'errorCorrectionLevel', 'foreColor', 'height', 'locale', 'margin', 'mode', 'value', 'version', 'width', 'xDimension', 'invalid'];
710
export const modelProps: string[] = [];
811

12+
export const testProp: any = getProps({props: properties});
13+
export const props = testProp[0];
14+
export const watch = testProp[1];
15+
16+
export const emitProbs: any = Object.keys(watch);
17+
emitProbs.push('modelchanged');
18+
for (let props of modelProps) {
19+
emitProbs.push(
20+
'update:'+props
21+
);
22+
}
23+
24+
export const isExecute: any = gh ? false : true;
25+
26+
export let tempProxy: any;
27+
928
/**
1029
* Represents vue QRCode Component
1130
* ```html
@@ -14,7 +33,14 @@ export const modelProps: string[] = [];
1433
*/
1534
@EJComponentDecorator({
1635
props: properties
17-
})
36+
},isExecute)
37+
38+
/* Start Options({
39+
props: props,
40+
watch: watch,
41+
emits: emitProbs
42+
}) End */
43+
1844
export class QRCodeGeneratorComponent extends ComponentBase {
1945

2046
public ej2Instances: any;
@@ -24,31 +50,46 @@ export class QRCodeGeneratorComponent extends ComponentBase {
2450
protected hasInjectedModules: boolean = false;
2551
public tagMapper: { [key: string]: Object } = {};
2652
public tagNameMapper: Object = {};
53+
public isVue3: boolean;
2754

2855
constructor() {
29-
super();
56+
super(arguments);
57+
this.isVue3 = !isExecute;
3058
this.ej2Instances = new QRCodeGenerator({});
3159
this.bindProperties();
3260
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
3361
this.ej2Instances.setProperties = this.setProperties;
62+
tempProxy = this;
3463
}
3564
public setProperties(prop: any, muteOnChange: boolean): void {
65+
if(this.isVue3) {
66+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
67+
}
3668
if (this.ej2Instances && this.ej2Instances._setProperties) {
3769
this.ej2Instances._setProperties(prop, muteOnChange);
3870
}
3971
if (prop && this.models && this.models.length) {
4072
Object.keys(prop).map((key: string): void => {
4173
this.models.map((model: string): void => {
4274
if ((key === model) && !(/datasource/i.test(key))) {
43-
this.$emit('update:' + key, prop[key]);
75+
if (this.isVue3) {
76+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
77+
} else {
78+
(this as any).$emit('update:' + key, prop[key]);
79+
}
4480
}
4581
});
4682
});
4783
}
4884
}
4985

5086
public render(createElement: any) {
51-
return createElement('div', (this as any).$slots.default);
87+
let h: any = gh || createElement;
88+
let slots: any = null;
89+
if(!isNullOrUndefined((this as any).$slots.default)) {
90+
slots = gh ? (this as any).$slots.default() : (this as any).$slots.default;
91+
}
92+
return h('div', slots);
5293
}
5394

5495
public exportAsBase64Image(barcodeExportType: Object): Object {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import 'ej2-barcode-generator/styles/barcode/tailwind-dark.scss';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import 'ej2-barcode-generator/styles/barcode/tailwind.scss';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import 'barcode/tailwind-dark.scss';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import 'barcode/tailwind.scss';

components/base/CHANGELOG.md

-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,3 @@ Base library provide options to enable following Vue functionalities in Essentia
7272

7373
- The individual npm package will no longer bundle dependent component's style. The online web tool [CRG](https://crg.syncfusion.com/) can be used to combine specific set of component and its dependent component styles.
7474

75-

components/base/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ Check the license detail [here](https://github.com/syncfusion/ej2-vue-ui-compone
8080

8181
Check the changelog [here](https://ej2.syncfusion.com/vue/documentation/release-notes?utm_source=npm&utm_campaign=ej2-vue-base)
8282

83-
© Copyright 2018 Syncfusion, Inc. All Rights Reserved.
83+
© Copyright 2019 Syncfusion, Inc. All Rights Reserved.
8484
The Syncfusion Essential Studio license and copyright applies to this distribution.

0 commit comments

Comments
 (0)