This commit is contained in:
2025-12-11 11:23:02 +00:00
parent 52ffe81352
commit 278000bb36
6 changed files with 50 additions and 48 deletions

View File

@@ -36,13 +36,13 @@ export class TestComplexTypes extends DeesElement {
`;
@property({ type: Array })
public stringArray: string[] = ['apple', 'banana', 'cherry'];
accessor stringArray: string[] = ['apple', 'banana', 'cherry'];
@property({ type: Array })
public numberArray: number[] = [1, 2, 3, 4, 5];
accessor numberArray: number[] = [1, 2, 3, 4, 5];
@property({ attribute: false })
public complexData: IComplexData = {
accessor complexData: IComplexData = {
name: 'Default Name',
age: 0,
tags: [],
@@ -54,19 +54,19 @@ export class TestComplexTypes extends DeesElement {
};
@property({ type: Object })
public simpleObject = {
accessor simpleObject = {
key1: 'value1',
key2: 'value2',
key3: 123
};
@property({ attribute: false })
public functionProperty = () => {
accessor functionProperty = () => {
console.log('This is a function property');
};
@property({ type: Date })
public dateProperty = new Date();
accessor dateProperty = new Date();
public static styles = [
css`

View File

@@ -21,35 +21,35 @@ export class TestDemoelement extends DeesElement {
public static demo = () => html`<test-demoelement>This is a slot text</test-demoelement>`;
@property()
public notTyped = 'hello';
accessor notTyped = 'hello';
@property({
type: String,
})
public typedAndNotInitizalized: string;
accessor typedAndNotInitizalized: string;
@property()
public notTypedAndNotInitizalized: string;
accessor notTypedAndNotInitizalized: string;
@property({
type: Boolean,
})
public demoBoolean = false;
accessor demoBoolean = false;
@property({
type: String,
})
public demoString = 'default demo string';
accessor demoString = 'default demo string';
@property({
type: Number,
})
public demoNumber = 2;
accessor demoNumber = 2;
@property({
type: ETestEnum,
})
public demoENum: ETestEnum = ETestEnum.first;
accessor demoENum: ETestEnum = ETestEnum.first;
constructor() {
super();

View File

@@ -13,60 +13,60 @@ export class TestEdgeCases extends DeesElement {
// Property with null value
@property({ type: String })
public nullableString: string | null = null;
accessor nullableString: string | null = null;
// Property with undefined value
@property({ type: Number })
public undefinedNumber: number | undefined = undefined;
accessor undefinedNumber: number | undefined = undefined;
// Very long string
@property({ type: String })
public longString: string = 'Lorem ipsum '.repeat(50);
accessor longString: string = 'Lorem ipsum '.repeat(50);
// Property with special characters
@property({ type: String })
public specialChars: string = '!@#$%^&*()_+-=[]{}|;\':",./<>?`~';
accessor specialChars: string = '!@#$%^&*()_+-=[]{}|;\':",./<>?`~';
// Property that could cause rendering issues
@property({ type: String })
public htmlString: string = '<script>alert("test")</script><b>Bold text</b>';
accessor htmlString: string = '<script>alert("test")</script><b>Bold text</b>';
// Numeric edge cases
@property({ type: Number })
public infinityNumber: number = Infinity;
accessor infinityNumber: number = Infinity;
@property({ type: Number })
public nanNumber: number = NaN;
accessor nanNumber: number = NaN;
@property({ type: Number })
public veryLargeNumber: number = Number.MAX_SAFE_INTEGER;
accessor veryLargeNumber: number = Number.MAX_SAFE_INTEGER;
@property({ type: Number })
public verySmallNumber: number = Number.MIN_SAFE_INTEGER;
accessor verySmallNumber: number = Number.MIN_SAFE_INTEGER;
@property({ type: Number })
public floatNumber: number = 3.14159265359;
accessor floatNumber: number = 3.14159265359;
// Boolean-like values
@property({ type: String })
public booleanString: string = 'false';
accessor booleanString: string = 'false';
@property({ type: Number })
public booleanNumber: number = 0;
accessor booleanNumber: number = 0;
// Empty values
@property({ type: String })
public emptyString: string = '';
accessor emptyString: string = '';
@property({ type: Array })
public emptyArray: any[] = [];
accessor emptyArray: any[] = [];
@property({ type: Object })
public emptyObject: {} = {};
accessor emptyObject: {} = {};
// Circular reference (should not break properties panel)
@property({ attribute: false })
public circularRef: any = (() => {
accessor circularRef: any = (() => {
const obj: any = { name: 'circular' };
obj.self = obj;
return obj;

View File

@@ -23,13 +23,13 @@ class TestNestedWrapper extends DeesElement {
@customElement('test-nested-target')
class TestNestedTarget extends DeesElement {
@property({ type: String })
public message: string = 'I am deeply nested!';
accessor message: string = 'I am deeply nested!';
@property({ type: Number })
public depth: number = 0;
accessor depth: number = 0;
@property({ type: Boolean })
public found: boolean = false;
accessor found: boolean = false;
public static styles = [
css`
@@ -67,7 +67,7 @@ export class TestNested extends DeesElement {
`;
@property({ type: String })
public testId: string = 'nested-test';
accessor testId: string = 'nested-test';
public static styles = [
css`

View File

@@ -39,13 +39,13 @@ export class TestWithWrapper extends DeesElement {
`;
@property({ type: String })
public dynamicValue: string = 'Initial value';
accessor dynamicValue: string = 'Initial value';
@property({ type: Number })
public counter: number = 0;
accessor counter: number = 0;
@property({ type: Boolean })
public isActive: boolean = false;
accessor isActive: boolean = false;
public static styles = [
css`