@lblod/ember-rdfa-editor-lblod-plugins 19.2.0 → 19.3.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/addon/components/location-plugin/edit.gts +198 -106
  3. package/addon/components/location-plugin/insert.gts +167 -35
  4. package/addon/components/location-plugin/map.gts +131 -0
  5. package/addon/components/location-plugin/nodeview.gts +67 -0
  6. package/addon/components/snippet-plugin/nodes/placeholder.gts +27 -1
  7. package/addon/components/snippet-plugin/snippet-insert-placeholder.gts +6 -2
  8. package/addon/components/snippet-plugin/snippet-list/snippet-list-modal.ts +10 -2
  9. package/addon/components/snippet-plugin/snippet-list-select-rdfa.ts +5 -3
  10. package/addon/components/variable-plugin/address/nodeview.ts +1 -0
  11. package/addon/components/variable-plugin/date/nodeview.ts +3 -0
  12. package/addon/components/variable-plugin/location/nodeview.ts +3 -0
  13. package/addon/components/variable-plugin/number/nodeview.ts +1 -0
  14. package/addon/components/variable-plugin/text/insert.ts +3 -1
  15. package/addon/components/variable-plugin/variable/nodeview.ts +3 -0
  16. package/addon/plugins/location-plugin/node-contents/address.ts +203 -0
  17. package/addon/plugins/location-plugin/node-contents/index.ts +40 -0
  18. package/addon/plugins/location-plugin/node-contents/place.ts +57 -0
  19. package/addon/plugins/location-plugin/node-contents/point.ts +75 -0
  20. package/addon/plugins/location-plugin/node.ts +210 -0
  21. package/addon/plugins/location-plugin/utils/address-helpers.ts +87 -98
  22. package/addon/plugins/location-plugin/utils/geo-helpers.ts +152 -0
  23. package/addon/plugins/location-plugin/utils/node-utils.ts +1 -1
  24. package/addon/plugins/snippet-plugin/commands/index.ts +1 -1
  25. package/addon/plugins/snippet-plugin/commands/update-snippet-ids.ts +12 -2
  26. package/addon/plugins/snippet-plugin/nodes/snippet-placeholder.ts +12 -2
  27. package/addon/plugins/variable-plugin/recreateUuidsOnPaste.ts +95 -0
  28. package/addon/plugins/variable-plugin/variables/address.ts +1 -1
  29. package/addon/utils/constants.ts +1 -0
  30. package/app/styles/location-plugin.scss +27 -0
  31. package/app/styles/variable-plugin.scss +3 -2
  32. package/declarations/addon/components/location-plugin/edit.d.ts +18 -9
  33. package/declarations/addon/components/location-plugin/insert.d.ts +20 -5
  34. package/declarations/addon/components/location-plugin/map.d.ts +25 -0
  35. package/declarations/addon/components/location-plugin/nodeview.d.ts +10 -9
  36. package/declarations/addon/components/snippet-plugin/nodes/placeholder.d.ts +5 -0
  37. package/declarations/addon/components/snippet-plugin/snippet-insert-placeholder.d.ts +1 -1
  38. package/declarations/addon/components/snippet-plugin/snippet-list/snippet-list-modal.d.ts +1 -1
  39. package/declarations/addon/components/snippet-plugin/snippet-list-select-rdfa.d.ts +1 -1
  40. package/declarations/addon/plugins/location-plugin/node-contents/address.d.ts +6 -0
  41. package/declarations/addon/plugins/location-plugin/node-contents/index.d.ts +22 -0
  42. package/declarations/addon/plugins/location-plugin/node-contents/place.d.ts +4 -0
  43. package/declarations/addon/plugins/location-plugin/node-contents/point.d.ts +6 -0
  44. package/declarations/addon/plugins/location-plugin/node.d.ts +7 -0
  45. package/declarations/addon/plugins/location-plugin/utils/address-helpers.d.ts +23 -30
  46. package/declarations/addon/plugins/location-plugin/utils/geo-helpers.d.ts +69 -0
  47. package/declarations/addon/plugins/snippet-plugin/commands/index.d.ts +1 -1
  48. package/declarations/addon/plugins/snippet-plugin/commands/update-snippet-ids.d.ts +5 -2
  49. package/declarations/addon/plugins/snippet-plugin/nodes/snippet-placeholder.d.ts +1 -1
  50. package/declarations/addon/plugins/variable-plugin/recreateUuidsOnPaste.d.ts +3 -0
  51. package/declarations/addon/utils/constants.d.ts +1 -0
  52. package/package.json +9 -4
  53. package/pnpm-lock.yaml +171 -4
  54. package/translations/en-US.yaml +42 -1
  55. package/translations/nl-BE.yaml +43 -1
  56. package/types/ember-leaflet.d.ts +78 -0
  57. package/addon/components/location-plugin/insert-variable.gts +0 -67
  58. package/addon/components/location-plugin/nodeview.hbs +0 -20
  59. package/addon/components/location-plugin/nodeview.ts +0 -49
  60. package/addon/plugins/location-plugin/address.ts +0 -405
  61. package/declarations/addon/components/location-plugin/insert-variable.d.ts +0 -17
  62. package/declarations/addon/plugins/location-plugin/address.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @lblod/ember-rdfa-editor-lblod-plugins
2
2
 
3
+ ## 19.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#433](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/433) [`b43ae7e6b08b2b78e21a2ab6b2dfee3d044b5297`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/b43ae7e6b08b2b78e21a2ab6b2dfee3d044b5297) Thanks [@lagartoverde](https://github.com/lagartoverde)! - Hide label if the variable is filled
8
+
9
+ - [#439](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/439) [`3c848481a9725b86c3bc4bd82d7381a3dfc2e509`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/3c848481a9725b86c3bc4bd82d7381a3dfc2e509) Thanks [@piemonkey](https://github.com/piemonkey)! - Add ability to select geographical positions from a map to the location plugin
10
+
11
+ - [#436](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/436) [`2b270eccf55469187dd2273d6953a286b4868154`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/2b270eccf55469187dd2273d6953a286b4868154) Thanks [@lagartoverde](https://github.com/lagartoverde)! - Changed UI of snippet placeholder to show which lists you can insert from
12
+
13
+ - [#435](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/435) [`596b85bfe9c85a3a24b6964d44381cea8909698f`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/596b85bfe9c85a3a24b6964d44381cea8909698f) Thanks [@dkozickis](https://github.com/dkozickis)! - GN-4820: Paste variables
14
+
15
+ Pasting variable (which was copied from same editor) will now paste actual variable, not just the text that was contained inside it.
16
+
17
+ ### Patch Changes
18
+
19
+ - [#437](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/437) [`f2c4ece21d5a2c56029f7111361719220eeaefef`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/f2c4ece21d5a2c56029f7111361719220eeaefef) Thanks [@dkozickis](https://github.com/dkozickis)! - GN-4692: Add missing `nl-BE` translation for besluit topic plugin
20
+
3
21
  ## 19.2.0
4
22
 
5
23
  ### Minor Changes
@@ -8,16 +8,20 @@ import { service } from '@ember/service';
8
8
  import { on } from '@ember/modifier';
9
9
  import type { SafeString } from '@ember/template/-private/handlebars';
10
10
  import not from 'ember-truth-helpers/helpers/not';
11
+ import eq from 'ember-truth-helpers/helpers/eq';
11
12
  import IntlService from 'ember-intl/services/intl';
12
13
  import t from 'ember-intl/helpers/t';
13
- import AuLabel from '@appuniversum/ember-appuniversum/components/au-label';
14
14
  import PowerSelect from 'ember-power-select/components/power-select';
15
+ import AuLabel from '@appuniversum/ember-appuniversum/components/au-label';
15
16
  import AuAlert, {
16
17
  type AuAlertSignature,
17
18
  } from '@appuniversum/ember-appuniversum/components/au-alert';
19
+ import AuFormRow from '@appuniversum/ember-appuniversum/components/au-form-row';
20
+ import AuRadioGroup from '@appuniversum/ember-appuniversum/components/au-radio-group';
21
+ import AuFieldset from '@appuniversum/ember-appuniversum/components/au-fieldset';
22
+ import AuHeading from '@appuniversum/ember-appuniversum/components/au-heading';
18
23
  import { AlertTriangleIcon } from '@appuniversum/ember-appuniversum/components/icons/alert-triangle';
19
24
  import { CheckIcon } from '@appuniversum/ember-appuniversum/components/icons/check';
20
- import { SayController } from '@lblod/ember-rdfa-editor';
21
25
  import { ResolvedPNode } from '@lblod/ember-rdfa-editor/utils/_private/types';
22
26
  import AuNativeInput from '@lblod/ember-rdfa-editor-lblod-plugins/components/au-native-input';
23
27
  import {
@@ -28,6 +32,9 @@ import {
28
32
  resolveAddress,
29
33
  resolveStreet,
30
34
  } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/location-plugin/utils/address-helpers';
35
+ import { type Point } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/location-plugin/utils/geo-helpers';
36
+ import { type NodeContentsUtils } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/location-plugin/node-contents';
37
+ import { type LocationType } from './map';
31
38
 
32
39
  interface Message {
33
40
  skin: AuAlertSignature['Args']['skin'];
@@ -36,20 +43,28 @@ interface Message {
36
43
  body: string | SafeString;
37
44
  }
38
45
 
39
- type Args = {
40
- controller: SayController;
41
- defaultMunicipality?: string;
42
- selectedAddressVariable: ResolvedPNode | null;
43
- setAddressToInsert: (address: Address | undefined) => void;
44
- setIsLoading?: (isLoading: boolean) => void;
46
+ type Signature = {
47
+ Args: {
48
+ locationType: LocationType;
49
+ setLocationType: (type: LocationType) => void;
50
+ defaultMunicipality?: string;
51
+ currentAddress?: Address;
52
+ selectedLocationNode: ResolvedPNode | null;
53
+ setAddressToInsert: (address: Address | undefined) => void;
54
+ setIsLoading?: (isLoading: boolean) => void;
55
+ placeName?: string;
56
+ setPlaceName: (name: string) => void;
57
+ nodeContentsUtils: NodeContentsUtils;
58
+ };
59
+ Element: HTMLFormElement;
45
60
  };
46
61
 
47
- export default class AddressEditComponent extends Component<Args> {
62
+ export default class LocationPluginEditComponent extends Component<Signature> {
48
63
  @service declare intl: IntlService;
49
64
 
50
65
  @trackedReset({
51
66
  memo: 'currentAddress',
52
- update(component: AddressEditComponent) {
67
+ update(component: LocationPluginEditComponent) {
53
68
  const { currentMunicipality } = component;
54
69
  return currentMunicipality
55
70
  ? currentMunicipality
@@ -60,7 +75,7 @@ export default class AddressEditComponent extends Component<Args> {
60
75
 
61
76
  @trackedReset({
62
77
  memo: 'currentAddress',
63
- update(component: AddressEditComponent) {
78
+ update(component: LocationPluginEditComponent) {
64
79
  return component.currentStreetName;
65
80
  },
66
81
  })
@@ -68,7 +83,7 @@ export default class AddressEditComponent extends Component<Args> {
68
83
 
69
84
  @trackedReset({
70
85
  memo: 'currentAddress',
71
- update(component: AddressEditComponent) {
86
+ update(component: LocationPluginEditComponent) {
72
87
  return component.currentHousenumber;
73
88
  },
74
89
  })
@@ -76,7 +91,7 @@ export default class AddressEditComponent extends Component<Args> {
76
91
 
77
92
  @trackedReset({
78
93
  memo: 'currentAddress',
79
- update(component: AddressEditComponent) {
94
+ update(component: LocationPluginEditComponent) {
80
95
  return component.currentBusnumber;
81
96
  },
82
97
  })
@@ -93,7 +108,7 @@ export default class AddressEditComponent extends Component<Args> {
93
108
  return {
94
109
  skin: 'success',
95
110
  icon: CheckIcon,
96
- title: this.intl.t('editor-plugins.address.edit.success.address-found'),
111
+ title: this.intl.t('location-plugin.search.success.address-found'),
97
112
  body: value.formatted,
98
113
  };
99
114
  }
@@ -109,10 +124,10 @@ export default class AddressEditComponent extends Component<Args> {
109
124
  skin: 'warning',
110
125
  icon: AlertTriangleIcon,
111
126
  title: this.intl.t(
112
- 'editor-plugins.address.edit.errors.address-not-found-short',
127
+ 'location-plugin.search.errors.address-not-found-short',
113
128
  ),
114
129
  body: this.intl.t(
115
- 'editor-plugins.address.edit.errors.alternative-address',
130
+ 'location-plugin.search.errors.alternative-address',
116
131
  { address: this.newAddress.error.alternativeAddress.formatted },
117
132
  ),
118
133
  };
@@ -121,8 +136,11 @@ export default class AddressEditComponent extends Component<Args> {
121
136
  return {
122
137
  skin: 'warning',
123
138
  icon: AlertTriangleIcon,
124
- title: this.intl.t(error.translation, { status: error.status }),
125
- body: this.intl.t('editor-plugins.address.edit.errors.contact', {
139
+ title: this.intl.t(error.translation, {
140
+ status: error.status,
141
+ coords: error.coords,
142
+ }),
143
+ body: this.intl.t('location-plugin.search.errors.contact', {
126
144
  htmlSafe: true,
127
145
  email: 'gelinktnotuleren@vlaanderen.be',
128
146
  }),
@@ -133,8 +151,11 @@ export default class AddressEditComponent extends Component<Args> {
133
151
  }
134
152
 
135
153
  get currentAddress() {
136
- return this.args.selectedAddressVariable?.value.attrs
137
- .value as Address | null;
154
+ const currentLocation = this.args.selectedLocationNode?.value.attrs
155
+ .value as Address | Point | null;
156
+ return currentLocation && currentLocation instanceof Address
157
+ ? currentLocation
158
+ : null;
138
159
  }
139
160
 
140
161
  get currentMunicipality() {
@@ -188,9 +209,18 @@ export default class AddressEditComponent extends Component<Args> {
188
209
  resolveAddressTask = restartableTask(async () => {
189
210
  const { newStreetName, newMunicipality, newHousenumber, newBusnumber } =
190
211
  this;
212
+ if (
213
+ this.currentAddress &&
214
+ newStreetName === this.currentAddress.street &&
215
+ newMunicipality === this.currentAddress.municipality &&
216
+ newHousenumber === this.currentAddress.housenumber &&
217
+ newBusnumber === this.currentAddress.busnumber
218
+ ) {
219
+ // No need to re-search, nothing has changed
220
+ return;
221
+ }
191
222
  if (newMunicipality && newStreetName) {
192
223
  this.args.setIsLoading?.(true);
193
- this.args.setAddressToInsert(undefined);
194
224
  try {
195
225
  if (
196
226
  this.currentAddress?.sameAs({
@@ -200,28 +230,40 @@ export default class AddressEditComponent extends Component<Args> {
200
230
  housenumber: newHousenumber,
201
231
  })
202
232
  ) {
203
- this.args.setAddressToInsert(this.currentAddress);
204
233
  return this.currentAddress;
205
234
  } else {
206
235
  await timeout(200);
207
236
  if (newHousenumber) {
208
- const address = await resolveAddress({
209
- street: newStreetName,
210
- municipality: newMunicipality,
211
- housenumber: newHousenumber,
212
- busnumber: newBusnumber,
213
- });
237
+ const address = await resolveAddress(
238
+ {
239
+ street: newStreetName,
240
+ municipality: newMunicipality,
241
+ housenumber: newHousenumber,
242
+ busnumber: newBusnumber,
243
+ },
244
+ this.args.nodeContentsUtils,
245
+ );
214
246
  this.args.setAddressToInsert(address);
215
247
  return address;
216
248
  } else {
217
- const address = await resolveStreet({
218
- street: newStreetName,
219
- municipality: newMunicipality,
220
- });
249
+ const address = await resolveStreet(
250
+ {
251
+ street: newStreetName,
252
+ municipality: newMunicipality,
253
+ },
254
+ this.args.nodeContentsUtils,
255
+ );
221
256
  this.args.setAddressToInsert(address);
222
257
  return address;
223
258
  }
224
259
  }
260
+ } catch (err) {
261
+ if (err instanceof AddressError && err.alternativeAddress) {
262
+ this.args.setAddressToInsert(err.alternativeAddress);
263
+ } else {
264
+ this.args.setAddressToInsert(undefined);
265
+ }
266
+ throw err;
225
267
  } finally {
226
268
  this.args.setIsLoading?.(false);
227
269
  }
@@ -267,8 +309,9 @@ export default class AddressEditComponent extends Component<Args> {
267
309
  this.newBusnumber = (event.target as HTMLInputElement).value;
268
310
  }
269
311
 
270
- get controller() {
271
- return this.args.controller;
312
+ @action
313
+ updatePlaceName(event: InputEvent) {
314
+ this.args.setPlaceName((event.target as HTMLInputElement).value);
272
315
  }
273
316
 
274
317
  searchMunicipality = restartableTask(async (term: string) => {
@@ -287,84 +330,133 @@ export default class AddressEditComponent extends Component<Args> {
287
330
  });
288
331
 
289
332
  <template>
290
- <form class='au-c-form'>
291
- <AuLabel for='municipality-select'>
292
- {{t 'editor-plugins.address.edit.municipality.label'}}*
293
- </AuLabel>
294
- <PowerSelect
295
- id='municipality-select'
296
- @loadingMessage={{t 'editor-plugins.utils.loading'}}
297
- @searchMessage={{t
298
- 'editor-plugins.address.edit.municipality.search-message'
299
- }}
300
- @noMatchesMessage={{t
301
- 'editor-plugins.address.edit.municipality.no-results'
302
- }}
303
- @placeholder={{t
304
- 'editor-plugins.address.edit.municipality.placeholder'
305
- }}
306
- @allowClear={{true}}
307
- @renderInPlace={{true}}
308
- @searchEnabled={{true}}
309
- @search={{perform this.searchMunicipality}}
310
- @selected={{this.newMunicipality}}
311
- @onChange={{this.selectMunicipality}}
312
- as |municipality|
313
- >
314
- {{municipality}}
315
- </PowerSelect>
316
- <AuLabel for='streetname-select'>
317
- {{t 'editor-plugins.address.edit.street.label'}}*
318
- </AuLabel>
319
- <PowerSelect
320
- id='streetname-select'
321
- @loadingMessage={{t 'editor-plugins.utils.loading'}}
322
- @searchMessage={{t 'editor-plugins.address.edit.street.search-message'}}
323
- @noMatchesMessage={{t 'editor-plugins.address.edit.street.no-results'}}
324
- @placeholder={{t 'editor-plugins.address.edit.street.placeholder'}}
325
- @allowClear={{true}}
326
- @renderInPlace={{true}}
327
- @searchEnabled={{true}}
328
- @search={{perform this.searchStreet}}
329
- @selected={{this.newStreetName}}
330
- @disabled={{not this.canUpdateStreet}}
331
- @onChange={{this.selectStreet}}
332
- as |street|
333
- >
334
- {{street}}
335
- </PowerSelect>
336
- <div class='au-o-grid au-o-grid--tiny'>
337
- <div class='au-o-grid__item au-u-1-2@medium'>
338
- <AuLabel for='housenumber-select'>
339
- {{t 'editor-plugins.address.edit.housenumber.label'}}
333
+ <form class='au-c-form' ...attributes>
334
+ <AuFieldset @alignment='inline' as |fs|>
335
+ <fs.legend>
336
+ {{t 'location-plugin.search.type'}}
337
+ </fs.legend>
338
+ <fs.content>
339
+ <AuRadioGroup
340
+ id='location-type'
341
+ @alignment='inline'
342
+ @selected={{@locationType}}
343
+ @onChange={{@setLocationType}}
344
+ as |Group|
345
+ >
346
+ <Group.Radio @value='address'>
347
+ {{t 'location-plugin.types.address'}}
348
+ </Group.Radio>
349
+ <Group.Radio @value='place'>
350
+ {{t 'location-plugin.types.place'}}
351
+ </Group.Radio>
352
+ </AuRadioGroup>
353
+ </fs.content>
354
+ </AuFieldset>
355
+ {{#if (eq @locationType 'place')}}
356
+ <AuFormRow>
357
+ <AuLabel for='place-name'>
358
+ {{t 'location-plugin.search.place-name.label'}}*
340
359
  </AuLabel>
341
360
  <AuNativeInput
342
- id='housenumber-select'
343
- placeholder={{t
344
- 'editor-plugins.address.edit.housenumber.placeholder'
345
- }}
361
+ id='place-name'
362
+ placeholder={{t 'location-plugin.search.place-name.placeholder'}}
346
363
  @width='block'
347
- value={{this.newHousenumber}}
348
- @disabled={{not this.canUpdateHousenumber}}
349
- {{on 'input' this.updateHousenumber}}
364
+ value={{@placeName}}
365
+ {{on 'input' this.updatePlaceName}}
350
366
  />
351
- </div>
352
- <div class='au-o-grid__item au-u-1-2@medium'>
353
- <AuLabel for='busnumber-select'>
354
- {{t 'editor-plugins.address.edit.busnumber.label'}}
355
- </AuLabel>
356
- <AuNativeInput
357
- id='busnumber-select'
358
- placeholder={{t
359
- 'editor-plugins.address.edit.busnumber.placeholder'
367
+ </AuFormRow>
368
+ <AuHeading @level='6' @skin='6'>
369
+ {{t 'location-plugin.search.title'}}
370
+ </AuHeading>
371
+ <p class='au-u-para-tiny au-u-margin-none'>
372
+ {{t 'location-plugin.search.hint'}}
373
+ </p>
374
+ {{/if}}
375
+ <AuFormRow>
376
+ <AuLabel for='municipality-select'>
377
+ {{t 'location-plugin.search.municipality.label'}}
378
+ </AuLabel>
379
+ <PowerSelect
380
+ id='municipality-select'
381
+ @loadingMessage={{t 'editor-plugins.utils.loading'}}
382
+ @searchMessage={{t
383
+ 'location-plugin.search.municipality.search-message'
384
+ }}
385
+ @noMatchesMessage={{t
386
+ 'location-plugin.search.municipality.no-results'
387
+ }}
388
+ @placeholder={{t 'location-plugin.search.municipality.placeholder'}}
389
+ @allowClear={{true}}
390
+ @renderInPlace={{true}}
391
+ @searchEnabled={{true}}
392
+ @search={{perform this.searchMunicipality}}
393
+ @selected={{this.newMunicipality}}
394
+ @onChange={{this.selectMunicipality}}
395
+ as |municipality|
396
+ >
397
+ {{municipality}}
398
+ </PowerSelect>
399
+ </AuFormRow>
400
+ <AuFormRow>
401
+ <AuLabel for='streetname-select'>
402
+ {{t 'location-plugin.search.street.label'}}
403
+ </AuLabel>
404
+ <PowerSelect
405
+ id='streetname-select'
406
+ @loadingMessage={{t 'editor-plugins.utils.loading'}}
407
+ @searchMessage={{t 'location-plugin.search.street.search-message'}}
408
+ @noMatchesMessage={{t 'location-plugin.search.street.no-results'}}
409
+ @placeholder={{t 'location-plugin.search.street.placeholder'}}
410
+ @allowClear={{true}}
411
+ @renderInPlace={{true}}
412
+ @searchEnabled={{true}}
413
+ @search={{perform this.searchStreet}}
414
+ @selected={{this.newStreetName}}
415
+ @disabled={{not this.canUpdateStreet}}
416
+ @onChange={{this.selectStreet}}
417
+ as |street|
418
+ >
419
+ {{street}}
420
+ </PowerSelect>
421
+ </AuFormRow>
422
+ <AuFormRow>
423
+ <div class='au-o-grid au-o-grid--tiny'>
424
+ <div
425
+ class={{if
426
+ (eq @locationType 'address')
427
+ 'au-o-grid__item au-u-1-2@medium'
428
+ 'au-o-grid__item'
360
429
  }}
361
- @width='block'
362
- value={{this.newBusnumber}}
363
- @disabled={{not this.canUpdateBusnumber}}
364
- {{on 'input' this.updateBusnumber}}
365
- />
430
+ >
431
+ <AuLabel for='housenumber-select'>
432
+ {{t 'location-plugin.search.housenumber.label'}}
433
+ </AuLabel>
434
+ <AuNativeInput
435
+ id='housenumber-select'
436
+ placeholder={{t 'location-plugin.search.housenumber.placeholder'}}
437
+ @width='block'
438
+ value={{this.newHousenumber}}
439
+ @disabled={{not this.canUpdateHousenumber}}
440
+ {{on 'input' this.updateHousenumber}}
441
+ />
442
+ </div>
443
+ {{#if (eq @locationType 'address')}}
444
+ <div class='au-o-grid__item au-u-1-2@medium'>
445
+ <AuLabel for='busnumber-select'>
446
+ {{t 'location-plugin.search.busnumber.label'}}
447
+ </AuLabel>
448
+ <AuNativeInput
449
+ id='busnumber-select'
450
+ placeholder={{t 'location-plugin.search.busnumber.placeholder'}}
451
+ @width='block'
452
+ value={{this.newBusnumber}}
453
+ @disabled={{not this.canUpdateBusnumber}}
454
+ {{on 'input' this.updateBusnumber}}
455
+ />
456
+ </div>
457
+ {{/if}}
366
458
  </div>
367
- </div>
459
+ </AuFormRow>
368
460
 
369
461
  {{#if this.message}}
370
462
  <AuAlert