@maggioli-design-system/mds-progress 2.9.0 → 2.9.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.
@@ -1,8 +1,8 @@
1
1
  export class KeyboardManager {
2
2
  constructor() {
3
- this.elements = [];
3
+ this.elements = new Map();
4
4
  this.handleClickBehaviorDispatchEvent = (event) => {
5
- if (event.code === 'Space' || event.code === 'Enter' || event.code === 'NumpadEnter') {
5
+ if (event.code === 'Enter' || event.code === 'NumpadEnter') {
6
6
  event.target.click();
7
7
  }
8
8
  };
@@ -12,20 +12,25 @@ export class KeyboardManager {
12
12
  }
13
13
  };
14
14
  this.addElement = (el, name = 'element') => {
15
- this.elements[name] = el;
15
+ if (!el) {
16
+ throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
17
+ }
18
+ this.elements.set(name, el);
19
+ };
20
+ this.removeElement = (name = 'element') => {
21
+ this.detachClickBehavior(name);
22
+ this.elements.delete(name);
16
23
  };
17
24
  this.attachClickBehavior = (name = 'element') => {
18
- if (this.elements[name]) {
19
- this.elements[name].addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
20
- }
25
+ var _a;
26
+ (_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
21
27
  };
22
28
  this.detachClickBehavior = (name = 'element') => {
23
- if (this.elements[name]) {
24
- this.elements[name].removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
25
- }
29
+ var _a;
30
+ (_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
26
31
  };
27
- this.attachEscapeBehavior = (callBack) => {
28
- this.escapeCallback = callBack;
32
+ this.attachEscapeBehavior = (callback) => {
33
+ this.escapeCallback = callback;
29
34
  if (window !== undefined) {
30
35
  window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
31
36
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-02-09T14:53:43",
2
+ "timestamp": "2024-04-18T15:17:33",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.10.0",
package/dist/stats.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-02-09T14:53:43",
2
+ "timestamp": "2024-04-18T15:17:33",
3
3
  "compiler": {
4
4
  "name": "node",
5
5
  "version": "20.10.0"
@@ -4,8 +4,9 @@ export declare class KeyboardManager {
4
4
  private handleClickBehaviorDispatchEvent;
5
5
  private handleEscapeBehaviorDispatchEvent;
6
6
  addElement: (el: HTMLElement, name?: string) => void;
7
+ removeElement: (name?: string) => void;
7
8
  attachClickBehavior: (name?: string) => void;
8
9
  detachClickBehavior: (name?: string) => void;
9
- attachEscapeBehavior: (callBack: () => void) => void;
10
+ attachEscapeBehavior: (callback: () => void) => void;
10
11
  detachEscapeBehavior: () => void;
11
12
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-02-09T14:18:39",
2
+ "timestamp": "2024-04-18T15:04:37",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.10.0",
@@ -325,6 +325,11 @@
325
325
  "docstring": "",
326
326
  "path": "src/components/mds-chip/meta/interface.ts"
327
327
  },
328
+ "src/components/mds-dropdown/meta/types.ts::DropdownInteractionType": {
329
+ "declaration": "export type DropdownInteractionType =\n | 'click'\n | 'mouseover'",
330
+ "docstring": "",
331
+ "path": "src/components/mds-dropdown/meta/types.ts"
332
+ },
328
333
  "src/type/floating-ui.ts::FloatingUIPlacement": {
329
334
  "declaration": "export type FloatingUIPlacement =\n | 'bottom'\n | 'bottom-end'\n | 'bottom-start'\n | 'left'\n | 'left-end'\n | 'left-start'\n | 'right'\n | 'right-end'\n | 'right-start'\n | 'top'\n | 'top-end'\n | 'top-start'",
330
335
  "docstring": "",
@@ -400,6 +405,11 @@
400
405
  "docstring": "",
401
406
  "path": "src/components/mds-header/meta/event-detail.ts"
402
407
  },
408
+ "src/components/mds-horizontal-scroll/meta/types.ts::ViewportType": {
409
+ "declaration": "export type ViewportType =\n | 'all'\n | 'tv'\n | 'xlarge'\n | 'large'\n | 'wide'\n | 'desktop'\n | 'tablet'\n | 'none'",
410
+ "docstring": "",
411
+ "path": "src/components/mds-horizontal-scroll/meta/types.ts"
412
+ },
403
413
  "src/components/mds-horizontal-scroll/meta/types.ts::SnapType": {
404
414
  "declaration": "export type SnapType =\n | 'center'\n | 'end'\n | 'none'\n | 'start'",
405
415
  "docstring": "",
@@ -490,13 +500,13 @@
490
500
  "docstring": "",
491
501
  "path": "src/components/mds-input-switch/meta/types.ts"
492
502
  },
493
- "src/type/input.ts::InputValueType": {
494
- "declaration": "export type InputValueType =\n | null\n | number\n | string\n | undefined",
503
+ "src/components/mds-input-switch/meta/event-detail.ts::MdsInputSwitchEventDetail": {
504
+ "declaration": "export interface MdsInputSwitchEventDetail {\n name: string\n checked: boolean\n value: string\n}",
495
505
  "docstring": "",
496
- "path": "src/type/input.ts"
506
+ "path": "src/components/mds-input-switch/meta/event-detail.ts"
497
507
  },
498
508
  "src/components/mds-input-upload/meta/types.ts::AttachmentSort": {
499
- "declaration": "enum AttachmentSort {\n status = 'status',\n date = 'date',\n}",
509
+ "declaration": "type AttachmentSort =\n 'status' |\n 'date'",
500
510
  "docstring": "",
501
511
  "path": "src/components/mds-input-upload/meta/types.ts"
502
512
  },
@@ -545,6 +555,11 @@
545
555
  "docstring": "",
546
556
  "path": "src/components/mds-push-notification/meta/types.ts"
547
557
  },
558
+ "src/components/mds-push-notification/meta/event-detail.ts::MdsPushNotificationEventDetail": {
559
+ "declaration": "export interface MdsPushNotificationEventDetail {\n id: string;\n}",
560
+ "docstring": "",
561
+ "path": "src/components/mds-push-notification/meta/event-detail.ts"
562
+ },
548
563
  "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
549
564
  "declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
550
565
  "docstring": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-progress",
3
- "version": "2.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "mds-progress is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "test": "stencil test --spec --e2e"
25
25
  },
26
26
  "dependencies": {
27
- "@maggioli-design-system/styles": "14.2.1",
27
+ "@maggioli-design-system/styles": "14.3.2",
28
28
  "@stencil/core": "4.10.0"
29
29
  },
30
30
  "license": "MIT",
@@ -1,9 +1,9 @@
1
1
  export class KeyboardManager {
2
2
  private escapeCallback: () => void
3
- private elements = []
3
+ private elements = new Map<string, HTMLElement>()
4
4
 
5
5
  private handleClickBehaviorDispatchEvent = (event: KeyboardEvent): void => {
6
- if (event.code === 'Space' || event.code === 'Enter' || event.code === 'NumpadEnter') {
6
+ if (event.code === 'Enter' || event.code === 'NumpadEnter') {
7
7
  (event.target as HTMLElement).click()
8
8
  }
9
9
  }
@@ -15,30 +15,34 @@ export class KeyboardManager {
15
15
  }
16
16
 
17
17
  addElement = (el: HTMLElement, name = 'element'): void => {
18
- this.elements[name] = el
18
+ if (!el) {
19
+ throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`)
20
+ }
21
+ this.elements.set(name, el)
22
+ }
23
+
24
+ removeElement = (name: string = 'element'): void => {
25
+ this.detachClickBehavior(name)
26
+ this.elements.delete(name)
19
27
  }
20
28
 
21
29
  attachClickBehavior = (name = 'element'): void => {
22
- if (this.elements[name]) {
23
- this.elements[name].addEventListener('keydown', this.handleClickBehaviorDispatchEvent)
24
- }
30
+ this.elements.get(name)?.addEventListener('keydown', this.handleClickBehaviorDispatchEvent)
25
31
  }
26
32
 
27
33
  detachClickBehavior = (name = 'element'): void => {
28
- if (this.elements[name]) {
29
- this.elements[name].removeEventListener('keydown', this.handleClickBehaviorDispatchEvent)
30
- }
34
+ this.elements.get(name)?.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent)
31
35
  }
32
36
 
33
- attachEscapeBehavior = (callBack: () => void): void => {
34
- this.escapeCallback = callBack
37
+ attachEscapeBehavior = (callback: () => void): void => {
38
+ this.escapeCallback = callback
35
39
  if (window !== undefined) {
36
40
  window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
37
41
  }
38
42
  }
39
43
 
40
44
  detachEscapeBehavior = (): void => {
41
- this.escapeCallback = () => {return}
45
+ this.escapeCallback = () => { return }
42
46
  if (window !== undefined) {
43
47
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
44
48
  }
@@ -12,6 +12,10 @@
12
12
  "mdi/replay",
13
13
  "mdi/vector-curve",
14
14
  "mgg/abitazione-principale",
15
+ "mgg/action-email-overlay-progress-10",
16
+ "mgg/action-email-overlay-progress-90",
17
+ "mgg/action-email-send-wait",
18
+ "mgg/action-email-send-warning",
15
19
  "mgg/action-hide-down-side",
16
20
  "mgg/action-hide-left-side",
17
21
  "mgg/action-hide-right-side",
@@ -51,6 +55,7 @@
51
55
  "mgg/cancelled-sheet",
52
56
  "mgg/car-license",
53
57
  "mgg/card-stamping",
58
+ "mgg/check-small",
54
59
  "mgg/checklist",
55
60
  "mgg/checklist-settings",
56
61
  "mgg/citizenship",
@@ -63,6 +68,7 @@
63
68
  "mgg/data-analytics-time",
64
69
  "mgg/data-category-alt",
65
70
  "mgg/data-civil-union",
71
+ "mgg/data-cleaning",
66
72
  "mgg/data-death-civil-union",
67
73
  "mgg/data-death-marriage",
68
74
  "mgg/data-end-civil-union",
@@ -73,6 +79,8 @@
73
79
  "mgg/document-less",
74
80
  "mgg/document-magic",
75
81
  "mgg/document-rename",
82
+ "mgg/download-csv",
83
+ "mgg/download-json",
76
84
  "mgg/electronic-document",
77
85
  "mgg/email-open-check",
78
86
  "mgg/email-open-off",
@@ -104,6 +112,7 @@
104
112
  "mgg/forwarded-with-a-single-sending",
105
113
  "mgg/fullscreen-on-alt",
106
114
  "mgg/google-check-small",
115
+ "mgg/google-experiment",
107
116
  "mgg/google-keyboard-double-arrow-down",
108
117
  "mgg/google-keyboard-double-arrow-up",
109
118
  "mgg/google-place-item",
@@ -134,6 +143,7 @@
134
143
  "mgg/logo-gpl",
135
144
  "mgg/logo-ilibro",
136
145
  "mgg/map-marker-settings",
146
+ "mgg/masks-office",
137
147
  "mgg/military-draft",
138
148
  "mgg/money-bag-settings",
139
149
  "mgg/money-on-hand",
@@ -171,6 +181,8 @@
171
181
  "mgg/pagopa",
172
182
  "mgg/partial-wall",
173
183
  "mgg/payment-settings",
184
+ "mgg/pec-handshake",
185
+ "mgg/pec-ok",
174
186
  "mgg/pec-sent-to-the-not-pec-recipient",
175
187
  "mgg/places-green",
176
188
  "mgg/places-green-doc",
@@ -191,6 +203,7 @@
191
203
  "mgg/search-maggioli",
192
204
  "mgg/send-progress",
193
205
  "mgg/sending-error",
206
+ "mgg/session",
194
207
  "mgg/settings-attachment",
195
208
  "mgg/sign-shop",
196
209
  "mgg/square-viewfinder",
@@ -1,5 +1,9 @@
1
1
  [
2
2
  "mgg/abitazione-principale",
3
+ "mgg/action-email-overlay-progress-10",
4
+ "mgg/action-email-overlay-progress-90",
5
+ "mgg/action-email-send-wait",
6
+ "mgg/action-email-send-warning",
3
7
  "mgg/action-hide-down-side",
4
8
  "mgg/action-hide-left-side",
5
9
  "mgg/action-hide-right-side",
@@ -39,6 +43,7 @@
39
43
  "mgg/cancelled-sheet",
40
44
  "mgg/car-license",
41
45
  "mgg/card-stamping",
46
+ "mgg/check-small",
42
47
  "mgg/checklist-settings",
43
48
  "mgg/checklist",
44
49
  "mgg/citizenship",
@@ -51,6 +56,7 @@
51
56
  "mgg/data-analytics-time",
52
57
  "mgg/data-category-alt",
53
58
  "mgg/data-civil-union",
59
+ "mgg/data-cleaning",
54
60
  "mgg/data-death-civil-union",
55
61
  "mgg/data-death-marriage",
56
62
  "mgg/data-end-civil-union",
@@ -61,6 +67,8 @@
61
67
  "mgg/document-less",
62
68
  "mgg/document-magic",
63
69
  "mgg/document-rename",
70
+ "mgg/download-csv",
71
+ "mgg/download-json",
64
72
  "mgg/electronic-document",
65
73
  "mgg/email-open-check",
66
74
  "mgg/email-open-off",
@@ -92,6 +100,7 @@
92
100
  "mgg/forwarded-with-a-single-sending",
93
101
  "mgg/fullscreen-on-alt",
94
102
  "mgg/google-check-small",
103
+ "mgg/google-experiment",
95
104
  "mgg/google-keyboard-double-arrow-down",
96
105
  "mgg/google-keyboard-double-arrow-up",
97
106
  "mgg/google-place-item",
@@ -122,6 +131,7 @@
122
131
  "mgg/logo-gpl",
123
132
  "mgg/logo-ilibro",
124
133
  "mgg/map-marker-settings",
134
+ "mgg/masks-office",
125
135
  "mgg/military-draft",
126
136
  "mgg/money-bag-settings",
127
137
  "mgg/money-on-hand",
@@ -159,6 +169,8 @@
159
169
  "mgg/pagopa",
160
170
  "mgg/partial-wall",
161
171
  "mgg/payment-settings",
172
+ "mgg/pec-handshake",
173
+ "mgg/pec-ok",
162
174
  "mgg/pec-sent-to-the-not-pec-recipient",
163
175
  "mgg/places-green-doc",
164
176
  "mgg/places-green-history",
@@ -179,6 +191,7 @@
179
191
  "mgg/search-maggioli",
180
192
  "mgg/send-progress",
181
193
  "mgg/sending-error",
194
+ "mgg/session",
182
195
  "mgg/settings-attachment",
183
196
  "mgg/sign-shop",
184
197
  "mgg/square-viewfinder",