-
Notifications
You must be signed in to change notification settings - Fork 443
Expand file tree
/
Copy pathdefault_value_controller.ts
More file actions
113 lines (98 loc) · 3.92 KB
/
default_value_controller.ts
File metadata and controls
113 lines (98 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import { Controller } from "../../core/controller"
import { ValueDefinitionMap, ValueDescriptorMap } from "../../core/value_properties"
export class DefaultValueController extends Controller {
static values: ValueDefinitionMap = {
defaultBoolean: false,
defaultBooleanTrue: { type: Boolean, default: true },
defaultBooleanFalse: { type: Boolean, default: false },
defaultBooleanOverride: true,
defaultBooleanWithTypeConstant: Boolean,
defaultBooleanWithTypeProperty: { type: Boolean },
defaultString: "",
defaultStringHello: { type: String, default: "Hello" },
defaultStringOverride: "Override me",
defaultStringWithTypeConstant: String,
defaultStringWithTypeProperty: { type: String },
defaultNumber: 0,
defaultNumberThousand: { type: Number, default: 1000 },
defaultNumberZero: { type: Number, default: 0 },
defaultNumberOverride: 9999,
defaultNumberWithTypeConstant: Number,
defaultNumberWithTypeProperty: { type: Number },
defaultArray: [],
defaultArrayFilled: { type: Array, default: [1, 2, 3] },
defaultArrayOverride: [9, 9, 9],
defaultArrayWithTypeConstant: Array,
defaultArrayWithTypeProperty: { type: Array },
defaultObject: {},
defaultObjectPerson: { type: Object, default: { name: "David" } },
defaultObjectOverride: { override: "me" },
defaultObjectWithTypeConstant: Object,
defaultObjectWithTypeProperty: { type: Object },
}
valueDescriptorMap!: ValueDescriptorMap
defaultBooleanValue!: boolean
hasDefaultBooleanValue!: boolean
defaultBooleanTrueValue!: boolean
defaultBooleanFalseValue!: boolean
hasDefaultBooleanTrueValue!: boolean
hasDefaultBooleanFalseValue!: boolean
defaultBooleanOverrideValue!: boolean
hasDefaultBooleanOverrideValue!: boolean
defaultBooleanWithTypeConstantValue!: boolean
hasDefaultBooleanWithTypeConstantValue!: boolean
defaultBooleanWithTypePropertyValue!: boolean
hasDefaultBooleanWithTypePropertyValue!: boolean
defaultStringValue!: string
hasDefaultStringValue!: boolean
defaultStringHelloValue!: string
hasDefaultStringHelloValue!: boolean
defaultStringOverrideValue!: string
hasDefaultStringOverrideValue!: boolean
defaultStringWithTypeConstantValue!: string
hasDefaultStringWithTypeConstantValue!: boolean
defaultStringWithTypePropertyValue!: string
hasDefaultStringWithTypePropertyValue!: boolean
defaultNumberValue!: number
hasDefaultNumberValue!: boolean
defaultNumberThousandValue!: number
hasDefaultNumberThousandValue!: boolean
defaultNumberZeroValue!: number
hasDefaultNumberZeroValue!: boolean
defaultNumberOverrideValue!: number
hasDefaultNumberOverrideValue!: boolean
defaultNumberWithTypeConstantValue!: number
hasDefaultNumberWithTypeConstantValue!: boolean
defaultNumberWithTypePropertyValue!: number
hasDefaultNumberWithTypePropertyValue!: boolean
defaultArrayValue!: any[]
hasDefaultArrayValue!: boolean
defaultArrayFilledValue!: { [key: string]: any }
hasDefaultArrayFilledValue!: boolean
defaultArrayOverrideValue!: { [key: string]: any }
hasDefaultArrayOverrideValue!: boolean
defaultArrayWithTypeConstantValue!: any[]
hasDefaultArrayWithTypeConstantValue!: boolean
defaultArrayWithTypePropertyValue!: any[]
hasDefaultArrayWithTypePropertyValue!: boolean
defaultObjectValue!: object
hasDefaultObjectValue!: boolean
defaultObjectPersonValue!: object
hasDefaultObjectPersonValue!: boolean
defaultObjectOverrideValue!: object
hasDefaultObjectOverrideValue!: boolean
defaultObjectWithTypeConstantValue!: object
hasDefaultObjectWithTypeConstantValue!: boolean
defaultObjectWithTypePropertyValue!: object
hasDefaultObjectWithTypePropertyValue!: boolean
lifecycleCallbacks: string[] = []
initialize() {
this.lifecycleCallbacks.push("initialize")
}
connect() {
this.lifecycleCallbacks.push("connect")
}
defaultBooleanValueChanged() {
this.lifecycleCallbacks.push("defaultBooleanValueChanged")
}
}