goblin-desktop 4.2.0 → 4.2.2
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.
- package/.editorconfig +9 -9
- package/.zou-flow +2 -2
- package/LICENSE +21 -21
- package/README.md +108 -108
- package/builders/builders.js +3 -3
- package/builders/wizard.js +462 -462
- package/contexts.js +13 -13
- package/desktop-manager.js +10 -10
- package/desktop-window.js +13 -13
- package/desktop.js +13 -13
- package/eslint.config.js +65 -65
- package/lib/service.js +137 -137
- package/package.json +48 -48
- package/password-wizard.js +24 -24
- package/quest-run-wizard.js +24 -24
- package/taskbar.js +13 -13
- package/widgets/audio/sfx.js +177 -177
- package/widgets/board/view.js +37 -37
- package/widgets/board/widget.js +65 -65
- package/widgets/contexts/logic-handlers.js +36 -36
- package/widgets/contexts/service.js +40 -40
- package/widgets/contexts/view.js +21 -21
- package/widgets/contexts/widget.js +147 -147
- package/widgets/datagrid/datagrid-entity.js +82 -82
- package/widgets/datagrid/datagrid-headers.js +274 -274
- package/widgets/datagrid/styles.js +13 -13
- package/widgets/datagrid/widget.js +192 -192
- package/widgets/datagrid-cell/styles.js +52 -52
- package/widgets/datagrid-cell/widget.js +41 -41
- package/widgets/datagrid-item/styles.js +15 -15
- package/widgets/datagrid-item/widget.js +74 -74
- package/widgets/default/view.js +160 -160
- package/widgets/desktop/compensator.js +9 -9
- package/widgets/desktop/logic-handlers.js +243 -243
- package/widgets/desktop/reducer.js +35 -35
- package/widgets/desktop/service.js +858 -858
- package/widgets/desktop/styles.js +28 -28
- package/widgets/desktop/widget.js +191 -191
- package/widgets/desktop-clock/styles.js +69 -69
- package/widgets/desktop-clock/widget.js +387 -387
- package/widgets/desktop-clock-clock/styles.js +56 -56
- package/widgets/desktop-clock-clock/widget.js +96 -96
- package/widgets/desktop-clock-menu/styles.js +129 -129
- package/widgets/desktop-clock-menu/widget.js +63 -63
- package/widgets/desktop-connection-status/reducer.js +15 -15
- package/widgets/desktop-connection-status/styles.js +44 -44
- package/widgets/desktop-connection-status/widget.js +134 -134
- package/widgets/desktop-content/widget.js +68 -68
- package/widgets/desktop-footer/reducer.js +31 -31
- package/widgets/desktop-footer/styles.js +36 -36
- package/widgets/desktop-footer/widget.js +52 -52
- package/widgets/desktop-monitors/styles.js +155 -155
- package/widgets/desktop-monitors/widget.js +272 -272
- package/widgets/desktop-notebook/styles.js +155 -155
- package/widgets/desktop-notebook/widget.js +252 -252
- package/widgets/desktop-notifications/styles.js +147 -147
- package/widgets/desktop-notifications/widget.js +231 -231
- package/widgets/desktop-scale/reducer.js +15 -15
- package/widgets/desktop-scale/styles.js +49 -49
- package/widgets/desktop-scale/widget.js +173 -172
- package/widgets/desktop-state-monitor/styles.js +72 -72
- package/widgets/desktop-state-monitor/widget.js +123 -123
- package/widgets/desktop-taskbar/widget.js +57 -57
- package/widgets/desktop-themes-menu/widget.js +121 -121
- package/widgets/desktop-topbar/widget.js +201 -201
- package/widgets/desktop-window/service.js +56 -56
- package/widgets/desktop-window/styles.js +22 -22
- package/widgets/desktop-window/widget.js +70 -70
- package/widgets/detail/compensator.js +17 -17
- package/widgets/detail/view.js +40 -40
- package/widgets/detail/widget.js +119 -119
- package/widgets/editor/widget.js +82 -82
- package/widgets/entity-alerts/styles.js +77 -77
- package/widgets/entity-alerts/widget.js +328 -328
- package/widgets/entity-list/styles.js +66 -66
- package/widgets/entity-list/view.js +36 -36
- package/widgets/entity-list/widget.js +209 -209
- package/widgets/entity-list-item/widget.js +68 -68
- package/widgets/entity-row/styles.js +105 -105
- package/widgets/entity-row/widget.js +524 -524
- package/widgets/entity-row-button/styles.js +46 -46
- package/widgets/entity-row-button/widget.js +57 -57
- package/widgets/entity-view/reducer.js +20 -20
- package/widgets/entity-view/styles.js +90 -90
- package/widgets/entity-view/widget.js +601 -601
- package/widgets/facet-checkbox/styles.js +17 -17
- package/widgets/facet-checkbox/widget.js +43 -43
- package/widgets/facet-filter/widget.js +94 -94
- package/widgets/facet-filter-add/styles.js +30 -30
- package/widgets/facet-filter-add/widget.js +105 -105
- package/widgets/facet-filter-button/styles.js +74 -74
- package/widgets/facet-filter-button/widget.js +214 -214
- package/widgets/facet-filter-list-dialog/styles.js +59 -59
- package/widgets/facet-filter-list-dialog/widget.js +273 -273
- package/widgets/facet-filter-list-dialog-footer/styles.js +22 -22
- package/widgets/facet-filter-list-dialog-footer/widget.js +105 -105
- package/widgets/facet-filter-range-dialog/styles.js +82 -82
- package/widgets/facet-filter-range-dialog/widget.js +399 -399
- package/widgets/facet-filter-range-dialog-footer/styles.js +22 -22
- package/widgets/facet-filter-range-dialog-footer/widget.js +182 -182
- package/widgets/gamepad/widget.js +75 -75
- package/widgets/helpers/facet-helpers.js +105 -105
- package/widgets/hinter/reducer.js +35 -35
- package/widgets/hinter/styles.js +79 -79
- package/widgets/hinter/view.js +32 -32
- package/widgets/hinter/widget.js +289 -291
- package/widgets/junction/styles.js +22 -22
- package/widgets/junction/widget.js +50 -50
- package/widgets/main-tab-menu/styles.js +17 -17
- package/widgets/main-tab-menu/widget.js +130 -130
- package/widgets/map/view.js +49 -49
- package/widgets/map/widget.js +64 -64
- package/widgets/monitor/reducer.js +15 -15
- package/widgets/monitor/widget.js +60 -60
- package/widgets/navigating-layer/widget.js +25 -25
- package/widgets/notifications-button/widget.js +44 -44
- package/widgets/password-wizard/service.js +53 -53
- package/widgets/password-wizard/ui.js +66 -66
- package/widgets/plugin/reducer.js +19 -19
- package/widgets/plugin/styles.js +294 -294
- package/widgets/plugin/widget.js +622 -622
- package/widgets/quest-run-wizard/service.js +49 -49
- package/widgets/quest-run-wizard/ui.js +25 -25
- package/widgets/search/styles.js +80 -80
- package/widgets/search/widget.js +283 -285
- package/widgets/simple/view.js +28 -28
- package/widgets/status-filters/widget.js +121 -121
- package/widgets/tab/styles.js +16 -16
- package/widgets/tab/widget.js +89 -89
- package/widgets/tab-content/widget.js +35 -35
- package/widgets/tabs/widget.js +48 -48
- package/widgets/taskbar/service.js +99 -99
- package/widgets/taskbar/view.js +27 -27
- package/widgets/taskbar/widget.js +167 -167
- package/widgets/widget-doc-caller/reducer.js +15 -15
- package/widgets/widget-doc-caller/styles.js +20 -20
- package/widgets/widget-doc-caller/widget.js +55 -55
- package/widgets/wizard/widget.js +298 -298
- package/widgets/wizard-buttons/widget.js +111 -111
- package/widgets/workitem/styles.js +286 -286
- package/widgets/workitem/view.js +62 -62
- package/widgets/workitem/widget.js +988 -988
- package/widgets/workitem-dialog/widget.js +86 -86
- package/widgets/workitem-fields/widget.js +64 -64
package/widgets/search/widget.js
CHANGED
|
@@ -1,285 +1,283 @@
|
|
|
1
|
-
//T:2019-04-09
|
|
2
|
-
|
|
3
|
-
import T from 't';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import FrontendForm from 'goblin-laboratory/widgets/frontend-form/widget';
|
|
6
|
-
import Widget from 'goblin-laboratory/widgets/widget';
|
|
7
|
-
import throttle from 'lodash/throttle';
|
|
8
|
-
|
|
9
|
-
import Container from 'goblin-gadgets/widgets/container/widget';
|
|
10
|
-
import Label from 'goblin-gadgets/widgets/label/widget';
|
|
11
|
-
import Button from 'goblin-gadgets/widgets/button/widget';
|
|
12
|
-
import CommandButton from 'goblin-gadgets/widgets/command-button/widget';
|
|
13
|
-
import StatusFilters from 'goblin-desktop/widgets/status-filters/widget';
|
|
14
|
-
import C from 'goblin-laboratory/widgets/connect-helpers/c';
|
|
15
|
-
import TextField from 'goblin-gadgets/widgets/text-field/widget';
|
|
16
|
-
|
|
17
|
-
import EntityView from 'goblin-desktop/widgets/entity-view/widget';
|
|
18
|
-
|
|
19
|
-
/******************************************************************************/
|
|
20
|
-
|
|
21
|
-
class HinterNewButton extends Widget {
|
|
22
|
-
constructor() {
|
|
23
|
-
super(...arguments);
|
|
24
|
-
this.onNew = this.onNew.bind(this);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
static get wiring() {
|
|
28
|
-
return {
|
|
29
|
-
id: 'id',
|
|
30
|
-
type: 'type',
|
|
31
|
-
kind: 'kind',
|
|
32
|
-
title: 'title',
|
|
33
|
-
glyph: 'glyph',
|
|
34
|
-
status: 'status',
|
|
35
|
-
onNew: 'onNew',
|
|
36
|
-
withDetails: 'withDetails',
|
|
37
|
-
newButtonTitle: 'newButtonTitle',
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
onNew() {
|
|
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
|
-
this.
|
|
113
|
-
this.
|
|
114
|
-
this.
|
|
115
|
-
this.
|
|
116
|
-
this.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
<
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
<
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
{this.
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
export default Widget.Wired(ConnectedSearch);
|
|
1
|
+
//T:2019-04-09
|
|
2
|
+
|
|
3
|
+
import T from 't';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import FrontendForm from 'goblin-laboratory/widgets/frontend-form/widget';
|
|
6
|
+
import Widget from 'goblin-laboratory/widgets/widget';
|
|
7
|
+
import throttle from 'lodash/throttle';
|
|
8
|
+
|
|
9
|
+
import Container from 'goblin-gadgets/widgets/container/widget';
|
|
10
|
+
import Label from 'goblin-gadgets/widgets/label/widget';
|
|
11
|
+
import Button from 'goblin-gadgets/widgets/button/widget';
|
|
12
|
+
import CommandButton from 'goblin-gadgets/widgets/command-button/widget';
|
|
13
|
+
import StatusFilters from 'goblin-desktop/widgets/status-filters/widget';
|
|
14
|
+
import C from 'goblin-laboratory/widgets/connect-helpers/c';
|
|
15
|
+
import TextField from 'goblin-gadgets/widgets/text-field/widget';
|
|
16
|
+
|
|
17
|
+
import EntityView from 'goblin-desktop/widgets/entity-view/widget';
|
|
18
|
+
|
|
19
|
+
/******************************************************************************/
|
|
20
|
+
|
|
21
|
+
class HinterNewButton extends Widget {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.onNew = this.onNew.bind(this);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static get wiring() {
|
|
28
|
+
return {
|
|
29
|
+
id: 'id',
|
|
30
|
+
type: 'type',
|
|
31
|
+
kind: 'kind',
|
|
32
|
+
title: 'title',
|
|
33
|
+
glyph: 'glyph',
|
|
34
|
+
status: 'status',
|
|
35
|
+
onNew: 'onNew',
|
|
36
|
+
withDetails: 'withDetails',
|
|
37
|
+
newButtonTitle: 'newButtonTitle',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
onNew() {
|
|
42
|
+
this.doFor(this.props.id, 'create-new', {
|
|
43
|
+
value: '',
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
render() {
|
|
48
|
+
const {id, onNew, title, type} = this.props;
|
|
49
|
+
if (!id) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
{onNew ? (
|
|
55
|
+
<CommandButton
|
|
56
|
+
command={`${type}-workitem.edit`}
|
|
57
|
+
kind="action"
|
|
58
|
+
place="1/1"
|
|
59
|
+
glyph="solid/plus"
|
|
60
|
+
text={title}
|
|
61
|
+
grow="1"
|
|
62
|
+
onClick={this.onNew}
|
|
63
|
+
/>
|
|
64
|
+
) : null}
|
|
65
|
+
</>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const NewEntityButton = Widget.Wired(HinterNewButton);
|
|
70
|
+
|
|
71
|
+
/******************************************************************************/
|
|
72
|
+
|
|
73
|
+
class CountNC extends Widget {
|
|
74
|
+
render() {
|
|
75
|
+
const p = this.props;
|
|
76
|
+
return (
|
|
77
|
+
<Container busy={p.count === undefined}>
|
|
78
|
+
<Label
|
|
79
|
+
text={T(
|
|
80
|
+
`{count, plural,
|
|
81
|
+
=0 {Aucun élément}
|
|
82
|
+
one {1/{initialCount} élément}
|
|
83
|
+
other {{count}/{initialCount} éléments}
|
|
84
|
+
}`,
|
|
85
|
+
null,
|
|
86
|
+
{count: p.count, initialCount: p.initialCount}
|
|
87
|
+
)}
|
|
88
|
+
/>
|
|
89
|
+
</Container>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const Count = Widget.connect((state, props) => {
|
|
94
|
+
return {
|
|
95
|
+
count: state.get(`backend.${props.id}.count`, 0),
|
|
96
|
+
initialCount: state.get(`backend.${props.id}.initialCount`, 0),
|
|
97
|
+
};
|
|
98
|
+
})(CountNC);
|
|
99
|
+
|
|
100
|
+
/******************************************************************************/
|
|
101
|
+
|
|
102
|
+
class Search extends Widget {
|
|
103
|
+
constructor() {
|
|
104
|
+
super(...arguments);
|
|
105
|
+
|
|
106
|
+
this.state = {
|
|
107
|
+
showParams: true,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
this.onToggleParams = this.onToggleParams.bind(this);
|
|
111
|
+
this._entityIds = [];
|
|
112
|
+
this._drillDownInternal = this._drillDownInternal.bind(this);
|
|
113
|
+
this._drillDown = throttle(this._drillDownInternal, 100).bind(this);
|
|
114
|
+
this.drillDown = this.drillDown.bind(this);
|
|
115
|
+
this.filter = this.filter.bind(this);
|
|
116
|
+
this.resetFilter = this.resetFilter.bind(this);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static get wiring() {
|
|
120
|
+
return {
|
|
121
|
+
id: 'id',
|
|
122
|
+
name: 'name',
|
|
123
|
+
title: 'title',
|
|
124
|
+
type: 'type',
|
|
125
|
+
hinter: 'hinter',
|
|
126
|
+
hinterId: 'hinterId',
|
|
127
|
+
hintText: 'hintText',
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//#region get/set
|
|
132
|
+
get showParams() {
|
|
133
|
+
return this.state.showParams;
|
|
134
|
+
}
|
|
135
|
+
set showParams(value) {
|
|
136
|
+
this.setState({
|
|
137
|
+
showParams: value,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
|
|
142
|
+
onToggleParams() {
|
|
143
|
+
this.showParams = !this.showParams;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
_drillDownInternal() {
|
|
147
|
+
const name = this.props.name || `${this.props.type}-search`;
|
|
148
|
+
this.doAs(name, 'drill-down', {
|
|
149
|
+
entityIds: this._entityIds,
|
|
150
|
+
view: ['isReady', {meta: {summaries: ['description']}}],
|
|
151
|
+
});
|
|
152
|
+
this._entityIds = [];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
drillDown(entityId) {
|
|
156
|
+
this._entityIds.push(entityId);
|
|
157
|
+
this._drillDown();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
filter(value) {
|
|
161
|
+
this.dispatchTo(
|
|
162
|
+
this.props.id,
|
|
163
|
+
{type: 'select-row', rowId: null, entityId: null},
|
|
164
|
+
'entity-view'
|
|
165
|
+
);
|
|
166
|
+
this.dispatchTo(
|
|
167
|
+
this.props.id,
|
|
168
|
+
{type: 'CHANGE', path: 'value', newValue: value},
|
|
169
|
+
'frontend-form'
|
|
170
|
+
);
|
|
171
|
+
this.doFor(`list@${this.props.id}`, 'set-filter-value', {
|
|
172
|
+
filterValue: value,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
resetFilter() {
|
|
177
|
+
this.filter('');
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
renderParams() {
|
|
181
|
+
const listId = `list@${this.props.id}`;
|
|
182
|
+
return (
|
|
183
|
+
<div className={this.styles.classNames.params}>
|
|
184
|
+
<div className={this.styles.classNames.pane}>
|
|
185
|
+
<Label text={this.props.title} grow="1" kind="title" />
|
|
186
|
+
<div className={this.styles.classNames.separator} />
|
|
187
|
+
<FrontendForm widgetId={this.props.id}>
|
|
188
|
+
<Container kind="row">
|
|
189
|
+
<TextField
|
|
190
|
+
grow="1"
|
|
191
|
+
hintText={this.props.hintText || T('Chercher')}
|
|
192
|
+
value={C('.value')}
|
|
193
|
+
changeMode="throttled"
|
|
194
|
+
throttleDelay={600}
|
|
195
|
+
onChange={this.filter}
|
|
196
|
+
autoFocus={true}
|
|
197
|
+
selectAllOnFocus={true}
|
|
198
|
+
shape={this.props.hasFilter ? 'left-rounded' : 'rounded'}
|
|
199
|
+
horizontalSpacing={this.props.hasFilter ? 'overlap' : null}
|
|
200
|
+
/>
|
|
201
|
+
{this.props.hasFilter ? (
|
|
202
|
+
<Button
|
|
203
|
+
shape="right-rounded"
|
|
204
|
+
glyph="solid/times"
|
|
205
|
+
tooltip={T('Tout montrer')}
|
|
206
|
+
onClick={this.resetFilter}
|
|
207
|
+
/>
|
|
208
|
+
) : null}
|
|
209
|
+
</Container>
|
|
210
|
+
</FrontendForm>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<div className={this.styles.classNames.scrollablePane}>
|
|
214
|
+
<StatusFilters id={listId} type={this.props.type} />
|
|
215
|
+
<div className={this.styles.classNames.separator} />
|
|
216
|
+
<Count id={listId} />
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<div className={this.styles.classNames.sajex} />
|
|
220
|
+
|
|
221
|
+
<Container kind="actions">
|
|
222
|
+
<NewEntityButton id={`hinter@${this.props.type}@${this.props.id}`} />
|
|
223
|
+
</Container>
|
|
224
|
+
</div>
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
renderList() {
|
|
229
|
+
return (
|
|
230
|
+
<EntityView
|
|
231
|
+
id={this.props.id}
|
|
232
|
+
hinter={this.props.hinter}
|
|
233
|
+
type={this.props.type}
|
|
234
|
+
/>
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
renderButton() {
|
|
239
|
+
const style = this.showParams
|
|
240
|
+
? this.styles.classNames.button
|
|
241
|
+
: this.styles.classNames.buttonWithoutParams;
|
|
242
|
+
|
|
243
|
+
return (
|
|
244
|
+
<div className={style}>
|
|
245
|
+
<Button
|
|
246
|
+
kind="subaction"
|
|
247
|
+
width="20px"
|
|
248
|
+
height="20px"
|
|
249
|
+
glyph={this.showParams ? 'solid/chevron-left' : 'solid/chevron-right'}
|
|
250
|
+
glyphSize="80%"
|
|
251
|
+
onClick={this.onToggleParams}
|
|
252
|
+
/>
|
|
253
|
+
</div>
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
render() {
|
|
258
|
+
if (!this.props.id || !this.props.type) {
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const style = this.showParams
|
|
263
|
+
? this.styles.classNames.search
|
|
264
|
+
: this.styles.classNames.searchWithoutParams;
|
|
265
|
+
|
|
266
|
+
return (
|
|
267
|
+
<div className={style}>
|
|
268
|
+
{this.renderParams()}
|
|
269
|
+
{this.renderList()}
|
|
270
|
+
{this.renderButton()}
|
|
271
|
+
</div>
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/******************************************************************************/
|
|
277
|
+
|
|
278
|
+
const ConnectedSearch = Widget.connect((state, prop) => {
|
|
279
|
+
const hasFilter = !!state.get(`widgets.${prop.id}.value`, null);
|
|
280
|
+
return {hasFilter};
|
|
281
|
+
})(Search);
|
|
282
|
+
|
|
283
|
+
export default Widget.Wired(ConnectedSearch);
|
package/widgets/simple/view.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
//T:2019-02-27
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import importer from 'goblin_importer';
|
|
5
|
-
import Widget from 'goblin-laboratory/widgets/widget';
|
|
6
|
-
import View from 'goblin-laboratory/widgets/view';
|
|
7
|
-
import Container from 'goblin-gadgets/widgets/container/widget';
|
|
8
|
-
|
|
9
|
-
const widgetImporter = importer('widget');
|
|
10
|
-
|
|
11
|
-
class SimpleView extends View {
|
|
12
|
-
render() {
|
|
13
|
-
const {workitemId} = this.props;
|
|
14
|
-
if (!workitemId) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const workitem = workitemId.split('@')[0];
|
|
19
|
-
const WiredWidget = Widget.Wired(widgetImporter(workitem));
|
|
20
|
-
return (
|
|
21
|
-
<Container kind="views">
|
|
22
|
-
<WiredWidget id={workitemId} />
|
|
23
|
-
</Container>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default SimpleView;
|
|
1
|
+
//T:2019-02-27
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import importer from 'goblin_importer';
|
|
5
|
+
import Widget from 'goblin-laboratory/widgets/widget';
|
|
6
|
+
import View from 'goblin-laboratory/widgets/view';
|
|
7
|
+
import Container from 'goblin-gadgets/widgets/container/widget';
|
|
8
|
+
|
|
9
|
+
const widgetImporter = importer('widget');
|
|
10
|
+
|
|
11
|
+
class SimpleView extends View {
|
|
12
|
+
render() {
|
|
13
|
+
const {workitemId} = this.props;
|
|
14
|
+
if (!workitemId) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const workitem = workitemId.split('@')[0];
|
|
19
|
+
const WiredWidget = Widget.Wired(widgetImporter(workitem));
|
|
20
|
+
return (
|
|
21
|
+
<Container kind="views">
|
|
22
|
+
<WiredWidget id={workitemId} />
|
|
23
|
+
</Container>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default SimpleView;
|