@madgex/design-system 13.3.2 → 13.5.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.
@@ -31,6 +31,12 @@
31
31
  #}{{ checkboxParams.name }}-{{ option.value }}{#
32
32
  #}{% endif -%}
33
33
  {%- endset -%}
34
+ {% set optionLabelPlain = option.labelText | striptags | trim %}
35
+ {% if checkboxParams.pathPrefix %}
36
+ {% set currentPath = checkboxParams.pathPrefix ~ ' / ' ~ optionLabelPlain %}
37
+ {% else %}
38
+ {% set currentPath = optionLabelPlain %}
39
+ {% endif %}
34
40
  {%- set isSelected = false -%}
35
41
  {%- set accordionIsExpanded = false -%}
36
42
  {% if checkboxParams.selectedOptions %}
@@ -60,6 +66,7 @@
60
66
  name: checkboxParams.name,
61
67
  id: optionId,
62
68
  value: option.value,
69
+ dataPath: currentPath,
63
70
  optional: true
64
71
  }) }}
65
72
  {% if option.options and option.options.length %}
@@ -80,7 +87,8 @@
80
87
  options: option.options,
81
88
  selectedOptions: checkboxParams.selectedOptions,
82
89
  name: checkboxParams.name,
83
- disabled: checkboxParams.disabled
90
+ disabled: checkboxParams.disabled,
91
+ pathPrefix: currentPath
84
92
  }) }}
85
93
  </div>
86
94
  </fieldset>
@@ -128,7 +136,8 @@
128
136
  selectedOptions: params.selectedOptions,
129
137
  name: name,
130
138
  disabled: params.disabled,
131
- i18n: params.i18n
139
+ i18n: params.i18n,
140
+ pathPrefix: ''
132
141
  }) }}
133
142
  </div>
134
143
  </fieldset>
@@ -92,6 +92,14 @@ module.exports = {
92
92
  options: [
93
93
  { value: 600102, labelText: 'Artist agency & management', options: [] },
94
94
  { value: 600104, labelText: 'Arts education &amp; training', options: [] },
95
+ {
96
+ value: 123,
97
+ labelText: 'Art sales',
98
+ options: [
99
+ { value: 12301, labelText: 'Art auction', options: [] },
100
+ { value: 12302, labelText: 'Art dealer', options: [] },
101
+ ],
102
+ },
95
103
  { value: 104, labelText: 'Dance', options: [] },
96
104
  { value: 600105, labelText: 'Events', options: [] },
97
105
  { value: 600106, labelText: 'Festival', options: [] },
@@ -5,4 +5,5 @@ document.addEventListener('DOMContentLoaded', async () => {
5
5
  switchStateScript.init();
6
6
  notificationScript.init();
7
7
  await import('../components/timeout-dialog/mds-timeout-dialog-standalone.js');
8
+ await import('../components/image-cropper/mds-image-cropper-standalone.js');
8
9
  });
package/src/js/index.js CHANGED
@@ -13,6 +13,7 @@ import { MdsDropdownNav } from '../components/dropdown-nav/dropdown-nav';
13
13
  import { MdsTimeoutDialog } from '../components/timeout-dialog/timeout-dialog';
14
14
  import { MdsCardLink } from '../components/card/card-link';
15
15
  import { MdsConditionalSection } from '../components/conditional-section/conditional-section';
16
+ import { MdsImageCropper } from '../components/image-cropper/image-cropper';
16
17
 
17
18
  if (!window.customElements.get('mds-dropdown-nav')) {
18
19
  window.customElements.define('mds-dropdown-nav', MdsDropdownNav);
@@ -26,7 +27,9 @@ if (!window.customElements.get('mds-card-link')) {
26
27
  if (!window.customElements.get('mds-conditional-section')) {
27
28
  window.customElements.define('mds-conditional-section', MdsConditionalSection);
28
29
  }
29
-
30
+ if (!window.customElements.get('mds-image-cropper')) {
31
+ window.customElements.define('mds-image-cropper', MdsImageCropper);
32
+ }
30
33
  const initAll = () => {
31
34
  tabs.init();
32
35
  accordion.init();
@@ -17,3 +17,4 @@
17
17
  @import '../../components/skip-link/skip-link';
18
18
  @import '../../components/media-block/media-block';
19
19
  @import '../../components/timeout-dialog/timeout-dialog';
20
+ @import '../../components/image-cropper/image-cropper';