bm-core-ui 2.8.2 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,59 +0,0 @@
1
- // @type interface BMLayoutEditorDelegate extends BMWindowDelegate
2
-
3
- /**
4
- * The specification for a `BMLayoutEditorDelegate` object, which is used to provide information to the layout editor regarding additional settings and can
5
- * receive various lifecycle callbacks from it.
6
- */
7
- function BMLayoutEditorDelegate() {} // <constructor>
8
-
9
- BMLayoutEditorDelegate.prototype = {
10
-
11
- /**
12
- * Invoked by the layout editor to obtain an optional list of additional tabs to use when creating the settings
13
- * panel for a view.
14
- *
15
- * Delegates that implement this method should return an array of additional tabs that will be added to the panel.
16
- *
17
- * It is not required to add the actual settings to the tabs from this method. Instead, the layout editor will invoke
18
- * the `layoutEditorAdditionalSettingSectionsForTab(_, _)` method to obtain the settings to add after this method returns.
19
- * @param editor <BMLayoutEditor> The layout editor invoking this method.
20
- * @param view <BMView> The view for which to add additional tabs.
21
- * @return <[BMLayoutEditorSettingsTab]> An array of settings tabs.
22
- */
23
- layoutEditorAdditionalSettingTabsForView(editor, view) {
24
-
25
- },
26
-
27
- /**
28
- * Invoked by the layout editor to obtain an optional list of additional tabs to use when creating the settings
29
- * panel for a constraint.
30
- *
31
- * Delegates that implement this method should return an array of additional tabs that will be added to the panel.
32
- *
33
- * It is not required to add the actual settings to the tabs from this method. Instead, the layout editor will invoke
34
- * the `layoutEditorAdditionalSettingSectionsForTab(_, _)` method to obtain the settings to add after this method returns.
35
- * @param editor <BMLayoutEditor> The layout editor invoking this method.
36
- * @param constraint <BMLayoutConstraint> The view for which to add additional tabs.
37
- * @return <[BMLayoutEditorSettingsTab]> An array of settings tabs.
38
- */
39
- layoutEditorAdditionalSettingTabsForConstraint(editor, constraint) {
40
-
41
- },
42
-
43
- /**
44
- * Invoked by the layout editor to obtain an optional list of additional setting sections to add to the given tab when
45
- * creating the settings panel for a selected object. This method will also be invoked whenever the settings for the given
46
- * tab have been invalidated.
47
- *
48
- * Delegates that implement this method should return an array of additional sesctions that will be added to the panel.
49
- * @param editor <BMLayoutEditor> The layout editor invoking this method.
50
- * @param tab <BMLayoutEditorSettingsTab> The tab for which to add additional settings.
51
- * @return <[BMLayoutEditorSettingsSection]> An array of settings ssections.
52
- */
53
- layoutEditorAdditionalSettingSectionsForTab(editor, tab) {
54
-
55
- }
56
-
57
- };
58
-
59
- // @endtype
@@ -1,46 +0,0 @@
1
- // @type interface BMLayoutEditorSettingsDelegate
2
-
3
- /**
4
- * The specification for a `BMLayoutEditorSettingsDelegate` object, which is used to provide information to the layout editor regarding the variation status of
5
- * settings and implements the behvaiour for when settings are changed.
6
- *
7
- * The `BMView` and `BMLayoutConstraint` classes implement this interface for standard settings. View subclasses can override these methods and provide
8
- * additional settings and behaviours for them. Whenever these methods are overridden, the subclasses should invoke the superclass implementation to allow
9
- * the correct handling of standard settings.
10
- *
11
- * All of the methods defined in this protocol are required; omitting any method will lead to a runtime error when the layout editor
12
- * attempts to invoke it on the delegate object.
13
- */
14
- function BMLayoutEditorSettingsDelegate() {} // <constructor>
15
-
16
- BMLayoutEditorSettingsDelegate.prototype = {
17
-
18
- /**
19
- * Invoked by the layout editor to determine which variations are currently active for the
20
- * setting given as a parameter.
21
- * @param editor <BMLayoutEditor> The layout editor invoking this method.
22
- * @param setting <BMLayoutEditorSetting> The setting for which to retrieve variations.
23
- * @return <[BMLayoutVariation]> An array of active variations.
24
- */
25
- layoutEditorActiveVariationsForSetting(editor, setting) {
26
-
27
- },
28
-
29
- /**
30
- * Invoked by the layout editor when the value for a setting changes. If the value that changed
31
- * is specific to a size class, that size class will be given as a parameter.
32
- * @param editor <BMLayoutEditor> The layout editor invoking this method.
33
- * @param value <AnyObject> The new value of the setting.
34
- * {
35
- * @param setting <BMLayoutEditorSetting> The setting that was changed.
36
- * @param forSizeClass <BMLayoutSizeClass, nullable> If specified, this indicates that the new value applies to a certain size class.
37
- * In this case, the value of this parameter indicates the size class to which the new value applies.
38
- * }
39
- */
40
- layoutEditorSettingValueDidChange(value, {setting, forSizeClass}) {
41
-
42
- }
43
-
44
- };
45
-
46
- // @endtype
@@ -1,202 +0,0 @@
1
- // @type interface BMLayoutVariation
2
-
3
- /**
4
- * The specification of an object that represents a variation of a value within a CoreUI layout.
5
- */
6
- function BMLayoutVariation() {} // <constructor>
7
-
8
- BMLayoutVariation.prototype = {
9
-
10
- /**
11
- * The name of the item to which this variation applies.
12
- */
13
- get name() { // <String>
14
-
15
- },
16
-
17
- /**
18
- * The size class for which this variation is active.
19
- */
20
- get sizeClass() { // <BMLayoutSizeClass>
21
-
22
- },
23
-
24
- /**
25
- * The value of this variation.
26
- */
27
- get value() { // <any>
28
-
29
- },
30
- }
31
-
32
- // @endtype
33
-
34
- // @type interface BMLayoutVariableVariation extends BMLayoutVariation
35
-
36
- /**
37
- * The specification of an object that represents a variation of a layout variable within a CoreUI layout.
38
- */
39
- function BMLayoutVariableVariation() {} // <constructor>
40
-
41
- BMLayoutVariableVariation.prototype = {
42
-
43
- /**
44
- * The value of this variation.
45
- */
46
- get value() { // <Number>
47
-
48
- },
49
- }
50
-
51
- // @endtype
52
-
53
- // @type interface BMLayoutVariableProvider
54
-
55
- /**
56
- * The specification for a `BMLayoutVariableProvider` object, which is used to provide information to the layout editor regarding which
57
- * of the currently defined layout variables are applicable to the current context.
58
- *
59
- * The `BMView` class itself implements this interface and can be used whenever any specific behaviour is not required for adding, modifying
60
- * or removing layout variables.
61
- *
62
- * All of the methods defined in this protocol are required; omitting any method will lead to a runtime error when the layout editor
63
- * attempts to invoke it on the provider object.
64
- */
65
- function BMLayoutVariableProvider() {} // <constructor>
66
-
67
- BMLayoutVariableProvider.prototype = {
68
-
69
- /**
70
- * Invoked by the layout editor to determine if layout variables are available.
71
- * If layout variables are unavailable, the layout editor will not allow the creation of layout variables
72
- * and display a message to the user indicating this.
73
- * @return <Boolean> `YES` if layout variables are available, `NO` otherwise.
74
- */
75
- canUseLayoutVariables() {
76
-
77
- },
78
-
79
- /**
80
- * Invoked by the layout editor if layout variables are unavailable.
81
- * This method should return a string that represents the error message that will be displayed
82
- * to the use if layout variables are unavailable.
83
- * @return <String> A message to display to the user.
84
- */
85
- unavailableLayoutVariablesUserLabel() {
86
-
87
- },
88
-
89
- /**
90
- * Invoked by the layout editor during its initialization to cause this layout variable provider
91
- * to prepare the layout variables that should be available in the current context.
92
- *
93
- * The layout editor will invoke this method only once during initialization and before any other method is
94
- * invoked on this layout variable provider.
95
- */
96
- prepareLayoutVariables() {
97
-
98
- },
99
-
100
- /**
101
- * This getter must return an object that represent the currently defined layout variables.
102
- * The property names represent the layout variable names and their values represent each variable's value.
103
- * The layout editor will not modify the object returned by this getter and it must also not be modified by any
104
- * external source throughout its lifetime.
105
- *
106
- * The layout editor may invoke this method several times throughout its lifecycle, typically whenever
107
- * the layout variables popup is opened or whenever autocomplete suggestions should be displayed while
108
- * the user is editing a constraint's constant.
109
- *
110
- * The layout variables returned by this method must also be registered with CoreUI.
111
- */
112
- get layoutVariables() { // <Object<String, Number>>
113
-
114
- },
115
-
116
- /**
117
- * Invoked by the layout editor to obtain the variations defined for the given layout variables.
118
- * Layout variable providers should typically obtain the variations from CoreUI as layout variables with
119
- * the same name must have the same variations in all contexts in which they apply.
120
- * @param named <String> The name of the layout variable.
121
- * @return <[BMLayoutVariableVariation]> An array of variations for the given layout variable.
122
- */
123
- variationsForLayoutVariableNamed(named) {
124
-
125
- },
126
-
127
- /**
128
- * This method will be invoked by the layout editor when the user creates a new layout variable
129
- * with the given value.
130
- * This method will also be invoked whenever the default value of a layout variable changes.
131
- *
132
- * The layout variable provider must register this layout variable with CoreUI.
133
- * @param named <String> The name to use for this layout variable.
134
- * {
135
- * @param withValue <Number> The default value to use for this layout variable, when there are no
136
- * active size classes variations.
137
- * }
138
- */
139
- registerLayoutVariableNamed(named, {withValue: value}) {
140
-
141
- },
142
-
143
- /**
144
- * This method will be invoked to rename an existing layout variable.
145
- * @param named <String> The layout variable's current name.
146
- * {
147
- * @param toName <String> The new name to use for the layout variable.
148
- * }
149
- */
150
- renameLayoutVariableNamed(named, {toName: newName}) {
151
- },
152
-
153
- /**
154
- * This method will be invoked by the layout editor when the user deletes a previously created layout variable.
155
- *
156
- * The layout variable provider must also unregister this layout variable from CoreUI.
157
- * @param named <String> The name of the layout variable to remove.
158
- */
159
- unregisterLayoutVariableNamed(named) {
160
- },
161
-
162
- /**
163
- * Invoked by the layout editor when the user sets a variation for the given layout variable
164
- * when the given size class is active.
165
- * If a variation for the given layout variable already exists for the given size class,
166
- * its value should be updated to the specified value.
167
- *
168
- * The layout variable provider must also register this variation with CoreUI.
169
- * @param value <Number> The value for the given layout variable when the given size class is active.
170
- * {
171
- * @param named <String> The name of the layout variable.
172
- * @param inSizeClass <BMLayoutSizeClass> The size class for which this variation will be active.
173
- * }
174
- */
175
- setLayoutVariableValue(value, {named: name, inSizeClass: sizeClass}) {
176
- },
177
-
178
- /**
179
- * Invoked by the layout editor when the user removes a variation for the given
180
- * layout variable for the given size class.
181
- *
182
- * The layout variable provider must also unregister this variation from CoreUI.
183
- * @param name <String> The name of the layout variable.
184
- * {
185
- * @param inSizeClass <BMLayoutSizeClass> The size class from which to remove this variation.
186
- * }
187
- */
188
- removeVariationForLayoutVariableNamed(name, {inSizeClass: sizeClass}) {
189
- },
190
-
191
- /**
192
- * Invoked by the layout editor when editing finishes and this layout variable provider should persist
193
- * any changes that have occurred to the layout variables. This method may be invoked several times while
194
- * the layout editor is open.
195
- */
196
- persistLayoutVariables() {
197
-
198
- },
199
-
200
- };
201
-
202
- // @endtype