@watermarkinsights/ripple 3.5.1 → 3.6.0-1
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/README.md +3 -3
- package/dist/cjs/{functions-8fb310fe.js → functions-0cf2d639.js} +1128 -486
- package/dist/cjs/{global-d687de5e.js → global-0fb343e1.js} +65 -65
- package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
- package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/priv-chart-popover.cjs.entry.js +79 -79
- package/dist/cjs/priv-datepicker.cjs.entry.js +667 -667
- package/dist/cjs/priv-navigator-button.cjs.entry.js +18 -18
- package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
- package/dist/cjs/ripple.cjs.js +2 -2
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +341 -341
- package/dist/cjs/wm-button.cjs.entry.js +218 -218
- package/dist/cjs/wm-chart-slice.cjs.entry.js +13 -13
- package/dist/cjs/wm-chart.cjs.entry.js +475 -475
- package/dist/cjs/wm-datepicker.cjs.entry.js +256 -256
- package/dist/cjs/wm-input.cjs.entry.js +134 -133
- package/dist/cjs/wm-modal-footer.cjs.entry.js +31 -31
- package/dist/cjs/wm-modal-header.cjs.entry.js +34 -34
- package/dist/cjs/wm-modal.cjs.entry.js +161 -161
- package/dist/cjs/wm-navigator.cjs.entry.js +268 -268
- package/dist/cjs/wm-network-uploader.cjs.entry.js +420 -420
- package/dist/cjs/wm-option_2.cjs.entry.js +494 -492
- package/dist/cjs/wm-pagination.cjs.entry.js +167 -167
- package/dist/cjs/wm-search.cjs.entry.js +231 -231
- package/dist/cjs/wm-snackbar.cjs.entry.js +170 -170
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +300 -300
- package/dist/cjs/wm-tag-input.cjs.entry.js +570 -556
- package/dist/cjs/wm-timepicker.cjs.entry.js +380 -379
- package/dist/cjs/wm-toggletip.cjs.entry.js +124 -124
- package/dist/cjs/wm-uploader.cjs.entry.js +359 -347
- package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
- package/dist/collection/components/wm-button/wm-button.js +485 -485
- package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.css +1 -0
- package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.js +232 -232
- package/dist/collection/components/wm-chart/wm-chart-slice.js +64 -64
- package/dist/collection/components/wm-chart/wm-chart.css +4 -0
- package/dist/collection/components/wm-chart/wm-chart.js +719 -719
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1015 -1015
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +462 -462
- package/dist/collection/components/wm-input/wm-input.js +424 -423
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
- package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
- package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
- package/dist/collection/components/wm-modal/wm-modal.js +459 -459
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
- package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
- package/dist/collection/components/wm-option/wm-option.js +422 -422
- package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
- package/dist/collection/components/wm-search/wm-search.js +479 -479
- package/dist/collection/components/wm-select/wm-select.js +720 -718
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +219 -219
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +331 -331
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +801 -787
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +580 -579
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +753 -753
- package/dist/collection/components/wm-uploader/wm-uploader.css +18 -11
- package/dist/collection/components/wm-uploader/wm-uploader.js +793 -748
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
- package/dist/collection/dev/scripts.js +20 -20
- package/dist/collection/global/__mocks__/functions.js +6 -6
- package/dist/collection/global/functions.js +445 -445
- package/dist/collection/global/global.js +72 -72
- package/dist/collection/global/interfaces.js +49 -49
- package/dist/collection/global/services/__mocks__/http-service.js +130 -130
- package/dist/collection/global/services/http-service.js +50 -50
- package/dist/collection/lang/lang.js +5 -5
- package/dist/collection/lang/missing.js +39 -0
- package/dist/collection/lang/piglatin.js +93 -93
- package/dist/esm/{functions-c315390d.js → functions-223fb0dc.js} +1128 -486
- package/dist/esm/{global-3ff216e8.js → global-8a3e8079.js} +65 -65
- package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
- package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
- package/dist/esm/loader.js +2 -2
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-chart-popover.entry.js +79 -79
- package/dist/esm/priv-datepicker.entry.js +667 -667
- package/dist/esm/priv-navigator-button.entry.js +18 -18
- package/dist/esm/priv-navigator-item.entry.js +23 -23
- package/dist/esm/ripple.js +2 -2
- package/dist/esm/wm-action-menu_2.entry.js +341 -341
- package/dist/esm/wm-button.entry.js +218 -218
- package/dist/esm/wm-chart-slice.entry.js +13 -13
- package/dist/esm/wm-chart.entry.js +475 -475
- package/dist/esm/wm-datepicker.entry.js +256 -256
- package/dist/esm/wm-input.entry.js +134 -133
- package/dist/esm/wm-modal-footer.entry.js +31 -31
- package/dist/esm/wm-modal-header.entry.js +34 -34
- package/dist/esm/wm-modal.entry.js +161 -161
- package/dist/esm/wm-navigator.entry.js +268 -268
- package/dist/esm/wm-network-uploader.entry.js +420 -420
- package/dist/esm/wm-option_2.entry.js +494 -492
- package/dist/esm/wm-pagination.entry.js +167 -167
- package/dist/esm/wm-search.entry.js +231 -231
- package/dist/esm/wm-snackbar.entry.js +170 -170
- package/dist/esm/wm-tab-item_3.entry.js +300 -300
- package/dist/esm/wm-tag-input.entry.js +570 -556
- package/dist/esm/wm-timepicker.entry.js +380 -379
- package/dist/esm/wm-toggletip.entry.js +124 -124
- package/dist/esm/wm-uploader.entry.js +360 -348
- package/dist/esm/wm-wrapper.entry.js +12 -12
- package/dist/ripple/{p-374b4fa6.entry.js → p-03f14a00.entry.js} +1 -1
- package/dist/ripple/{p-c724ce54.entry.js → p-0663e9fc.entry.js} +1 -1
- package/dist/ripple/{p-36da5d4a.entry.js → p-07f557b0.entry.js} +1 -1
- package/dist/ripple/{p-dea72d46.entry.js → p-0b1cdd4e.entry.js} +1 -1
- package/dist/ripple/p-0b412b16.entry.js +1 -0
- package/dist/ripple/p-1ed06170.js +1 -0
- package/dist/ripple/{p-ba9d3069.entry.js → p-1fdd85ea.entry.js} +1 -1
- package/dist/ripple/p-2d7891e9.entry.js +1 -0
- package/dist/ripple/{p-41f39509.entry.js → p-427c4723.entry.js} +1 -1
- package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
- package/dist/ripple/{p-5ffa983b.entry.js → p-6b28f3fe.entry.js} +1 -1
- package/dist/ripple/{p-e574fb73.entry.js → p-6d0b3f08.entry.js} +1 -1
- package/dist/ripple/{p-7bbd123c.entry.js → p-94f584c5.entry.js} +1 -1
- package/dist/ripple/{p-b03382ea.entry.js → p-a84de435.entry.js} +1 -1
- package/dist/ripple/{p-c5e44367.entry.js → p-addbfa91.entry.js} +1 -1
- package/dist/ripple/p-b14062a7.entry.js +1 -0
- package/dist/ripple/p-c5d718c7.entry.js +1 -0
- package/dist/ripple/p-c637686e.entry.js +1 -0
- package/dist/ripple/{p-042d6449.entry.js → p-c8655e6c.entry.js} +1 -1
- package/dist/ripple/p-cf075b3b.js +16 -0
- package/dist/ripple/{p-d69c1688.entry.js → p-d5938de0.entry.js} +1 -1
- package/dist/ripple/{p-b4a8c8d3.entry.js → p-e26c9858.entry.js} +1 -1
- package/dist/ripple/p-f23d6211.entry.js +1 -0
- package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
- package/dist/types/components/wm-button/wm-button.d.ts +44 -44
- package/dist/types/components/wm-chart/priv-chart-popover/priv-chart-popover.d.ts +23 -23
- package/dist/types/components/wm-chart/wm-chart-slice.d.ts +8 -8
- package/dist/types/components/wm-chart/wm-chart.d.ts +82 -82
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +76 -76
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
- package/dist/types/components/wm-input/wm-input.d.ts +46 -46
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
- package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
- package/dist/types/components/wm-option/wm-option.d.ts +32 -32
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
- package/dist/types/components/wm-search/wm-search.d.ts +86 -86
- package/dist/types/components/wm-select/wm-select.d.ts +66 -66
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -91
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
- package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +84 -80
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
- package/dist/types/components.d.ts +28 -24
- package/dist/types/global/__mocks__/functions.d.ts +6 -6
- package/dist/types/global/functions.d.ts +40 -40
- package/dist/types/global/global.d.ts +1 -1
- package/dist/types/global/interfaces.d.ts +34 -34
- package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
- package/dist/types/global/services/http-service.d.ts +4 -4
- package/dist/types/lang/lang.d.ts +5 -5
- package/package.json +47 -46
- package/dist/ripple/p-34694011.entry.js +0 -1
- package/dist/ripple/p-3eb955b4.entry.js +0 -1
- package/dist/ripple/p-75a9ba2f.entry.js +0 -1
- package/dist/ripple/p-a50439f1.entry.js +0 -1
- package/dist/ripple/p-d5fafa9c.entry.js +0 -1
- package/dist/ripple/p-ddf5bb8f.js +0 -1
- package/dist/ripple/p-e60fe2f5.js +0 -16
- package/dist/ripple/p-ec5db255.entry.js +0 -1
|
@@ -1,80 +1,84 @@
|
|
|
1
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
interface UploadedFile {
|
|
3
|
-
name: string;
|
|
4
|
-
id: string;
|
|
5
|
-
type: string;
|
|
6
|
-
lastUpdated: string;
|
|
7
|
-
progress?: number;
|
|
8
|
-
}
|
|
9
|
-
interface ErrorFile {
|
|
10
|
-
name: string;
|
|
11
|
-
message: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class Uploader {
|
|
14
|
-
el: HTMLWmUploaderElement;
|
|
15
|
-
private liveRegion?;
|
|
16
|
-
private inputEl?;
|
|
17
|
-
uploaderType: "1" | "2" | null;
|
|
18
|
-
type: "1" | "2" | null;
|
|
19
|
-
get tempUploaderType(): "1" | "2";
|
|
20
|
-
buttonText: string;
|
|
21
|
-
info?: string;
|
|
22
|
-
emptyStateText: string;
|
|
23
|
-
icon: string;
|
|
24
|
-
fileTypes: string;
|
|
25
|
-
maxSize: number;
|
|
26
|
-
maxFiles?: number;
|
|
27
|
-
sortBy: "name" | "date";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
interface UploadedFile {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
lastUpdated: string;
|
|
7
|
+
progress?: number;
|
|
8
|
+
}
|
|
9
|
+
interface ErrorFile {
|
|
10
|
+
name: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class Uploader {
|
|
14
|
+
el: HTMLWmUploaderElement;
|
|
15
|
+
private liveRegion?;
|
|
16
|
+
private inputEl?;
|
|
17
|
+
uploaderType: "1" | "2" | null;
|
|
18
|
+
type: "1" | "2" | null;
|
|
19
|
+
get tempUploaderType(): "1" | "2";
|
|
20
|
+
buttonText: string;
|
|
21
|
+
info?: string;
|
|
22
|
+
emptyStateText: string;
|
|
23
|
+
icon: string;
|
|
24
|
+
fileTypes: string;
|
|
25
|
+
maxSize: number;
|
|
26
|
+
maxFiles?: number;
|
|
27
|
+
sortBy: "name" | "date";
|
|
28
|
+
buttonType: "primary" | "secondary";
|
|
29
|
+
buttonPosition: "left" | "right";
|
|
30
|
+
files?: string;
|
|
31
|
+
private fileList;
|
|
32
|
+
filesToUpload: File[];
|
|
33
|
+
isTabbing: boolean;
|
|
34
|
+
rejectedFiles?: string;
|
|
35
|
+
errorList: ErrorFile[];
|
|
36
|
+
notif?: {
|
|
37
|
+
id: number;
|
|
38
|
+
message: string;
|
|
39
|
+
} | null;
|
|
40
|
+
numFilesInProgress?: number | null;
|
|
41
|
+
private srProgress?;
|
|
42
|
+
private inputId;
|
|
43
|
+
wmUploaderFilesSelected: EventEmitter;
|
|
44
|
+
wmFilesSelected: EventEmitter;
|
|
45
|
+
wmUploaderDeleteFile: EventEmitter;
|
|
46
|
+
wmDeleteFile: EventEmitter;
|
|
47
|
+
wmUploaderDownloadFile: EventEmitter;
|
|
48
|
+
wmDownloadFile: EventEmitter;
|
|
49
|
+
get buttonsideText(): any;
|
|
50
|
+
toggleTabbingOn(): void;
|
|
51
|
+
toggleTabbingOff(): void;
|
|
52
|
+
handleUploadProgress(ev: CustomEvent): void;
|
|
53
|
+
parseFiles(): void;
|
|
54
|
+
parseRejectedFiles(): void;
|
|
55
|
+
setMaxSize(): void;
|
|
56
|
+
uploadNotifications(newNum: number, oldNum: number): void;
|
|
57
|
+
isValidSize(size: number): boolean;
|
|
58
|
+
isDuplicate(name: string): UploadedFile | undefined;
|
|
59
|
+
isEmpty(): boolean;
|
|
60
|
+
isDisabled(): boolean;
|
|
61
|
+
isItemUploading(item: UploadedFile): boolean;
|
|
62
|
+
clearErrors(): void;
|
|
63
|
+
handleFiles(ev: Event): void;
|
|
64
|
+
downloadFile(file: UploadedFile): void;
|
|
65
|
+
deleteFile(file: UploadedFile): void;
|
|
66
|
+
componentWillLoad(): void;
|
|
67
|
+
componentDidLoad(): void;
|
|
68
|
+
sortByButtonPosition(elements: HTMLElement[]): HTMLElement[];
|
|
69
|
+
renderUploadSvg(): any;
|
|
70
|
+
renderIcon(): any;
|
|
71
|
+
renderInfo(): any;
|
|
72
|
+
renderNotif(): any;
|
|
73
|
+
renderUploadButton(classes: string): any;
|
|
74
|
+
renderEmptyState(): any;
|
|
75
|
+
renderErrorList(): any;
|
|
76
|
+
renderFileInProgress(item: UploadedFile): any;
|
|
77
|
+
renderFile(item: UploadedFile): any;
|
|
78
|
+
renderFileList(): any;
|
|
79
|
+
renderHeader(): any;
|
|
80
|
+
renderFooter(): any;
|
|
81
|
+
renderWithItems(): any;
|
|
82
|
+
render(): any;
|
|
83
|
+
}
|
|
84
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
export declare class Wrapper {
|
|
3
|
-
el: any;
|
|
4
|
-
wmWrapperLoaded: EventEmitter<void>;
|
|
5
|
-
componentDidLoad(): void;
|
|
6
|
-
render(): void;
|
|
7
|
-
}
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
export declare class Wrapper {
|
|
3
|
+
el: any;
|
|
4
|
+
wmWrapperLoaded: EventEmitter<void>;
|
|
5
|
+
componentDidLoad(): void;
|
|
6
|
+
render(): void;
|
|
7
|
+
}
|
|
@@ -45,13 +45,13 @@ export namespace Components {
|
|
|
45
45
|
"disabled": boolean;
|
|
46
46
|
"labelForIdenticalButtons"?: string;
|
|
47
47
|
"tooltip"?: string;
|
|
48
|
-
"tooltipPosition"?: | "top"
|
|
49
|
-
| "bottom"
|
|
50
|
-
| "left"
|
|
51
|
-
| "right"
|
|
52
|
-
| "bottom-left"
|
|
53
|
-
| "bottom-right"
|
|
54
|
-
| "top-right"
|
|
48
|
+
"tooltipPosition"?: | "top"
|
|
49
|
+
| "bottom"
|
|
50
|
+
| "left"
|
|
51
|
+
| "right"
|
|
52
|
+
| "bottom-left"
|
|
53
|
+
| "bottom-right"
|
|
54
|
+
| "top-right"
|
|
55
55
|
| "top-left";
|
|
56
56
|
}
|
|
57
57
|
interface WmButton {
|
|
@@ -267,7 +267,9 @@ export namespace Components {
|
|
|
267
267
|
"tooltipText"?: string;
|
|
268
268
|
}
|
|
269
269
|
interface WmUploader {
|
|
270
|
+
"buttonPosition": "left" | "right";
|
|
270
271
|
"buttonText": string;
|
|
272
|
+
"buttonType": "primary" | "secondary";
|
|
271
273
|
"emptyStateText": string;
|
|
272
274
|
"fileTypes": string;
|
|
273
275
|
"files"?: string;
|
|
@@ -526,9 +528,9 @@ declare namespace LocalJSX {
|
|
|
526
528
|
interface PrivNavigatorItem {
|
|
527
529
|
"focused"?: boolean;
|
|
528
530
|
"link"?: string;
|
|
529
|
-
"onKeydownOnNavItem"?: (event: CustomEvent<{
|
|
530
|
-
navItem: HTMLPrivNavigatorItemElement;
|
|
531
|
-
key: string;
|
|
531
|
+
"onKeydownOnNavItem"?: (event: CustomEvent<{
|
|
532
|
+
navItem: HTMLPrivNavigatorItemElement;
|
|
533
|
+
key: string;
|
|
532
534
|
}>) => void;
|
|
533
535
|
"selected"?: boolean;
|
|
534
536
|
}
|
|
@@ -541,13 +543,13 @@ declare namespace LocalJSX {
|
|
|
541
543
|
"onMenuLoaded"?: (event: CustomEvent<any>) => void;
|
|
542
544
|
"onWmActionMenuLoaded"?: (event: CustomEvent<any>) => void;
|
|
543
545
|
"tooltip"?: string;
|
|
544
|
-
"tooltipPosition"?: | "top"
|
|
545
|
-
| "bottom"
|
|
546
|
-
| "left"
|
|
547
|
-
| "right"
|
|
548
|
-
| "bottom-left"
|
|
549
|
-
| "bottom-right"
|
|
550
|
-
| "top-right"
|
|
546
|
+
"tooltipPosition"?: | "top"
|
|
547
|
+
| "bottom"
|
|
548
|
+
| "left"
|
|
549
|
+
| "right"
|
|
550
|
+
| "bottom-left"
|
|
551
|
+
| "bottom-right"
|
|
552
|
+
| "top-right"
|
|
551
553
|
| "top-left";
|
|
552
554
|
}
|
|
553
555
|
interface WmButton {
|
|
@@ -753,9 +755,9 @@ declare namespace LocalJSX {
|
|
|
753
755
|
"onWmSnackbarSnackFinished"?: (event: CustomEvent<Object>) => void;
|
|
754
756
|
}
|
|
755
757
|
interface WmTabItem {
|
|
756
|
-
"onKeydownOnTabItem"?: (event: CustomEvent<{
|
|
757
|
-
tabItem: HTMLWmTabItemElement;
|
|
758
|
-
key: string;
|
|
758
|
+
"onKeydownOnTabItem"?: (event: CustomEvent<{
|
|
759
|
+
tabItem: HTMLWmTabItemElement;
|
|
760
|
+
key: string;
|
|
759
761
|
}>) => void;
|
|
760
762
|
"onTabItemLoaded"?: (event: CustomEvent<{ tab: HTMLWmTabItemElement }>) => void;
|
|
761
763
|
"onTabSelected"?: (event: CustomEvent<{ tabId: string }>) => void;
|
|
@@ -813,10 +815,10 @@ declare namespace LocalJSX {
|
|
|
813
815
|
"label"?: string;
|
|
814
816
|
"labelPosition"?: "top" | "left" | "none";
|
|
815
817
|
"onWmTimepickerNewValidValue"?: (event: CustomEvent<{ value: string }>) => void;
|
|
816
|
-
"onWmTimepickerOnChange"?: (event: CustomEvent<{
|
|
817
|
-
// deprecated in favor of wmTimepickerNewValidValue and standard input event
|
|
818
|
-
value: string;
|
|
819
|
-
isValid: boolean;
|
|
818
|
+
"onWmTimepickerOnChange"?: (event: CustomEvent<{
|
|
819
|
+
// deprecated in favor of wmTimepickerNewValidValue and standard input event
|
|
820
|
+
value: string;
|
|
821
|
+
isValid: boolean;
|
|
820
822
|
}>) => void;
|
|
821
823
|
"preventValidation"?: string;
|
|
822
824
|
"requiredField"?: boolean;
|
|
@@ -829,7 +831,9 @@ declare namespace LocalJSX {
|
|
|
829
831
|
"tooltipText"?: string;
|
|
830
832
|
}
|
|
831
833
|
interface WmUploader {
|
|
834
|
+
"buttonPosition"?: "left" | "right";
|
|
832
835
|
"buttonText": string;
|
|
836
|
+
"buttonType"?: "primary" | "secondary";
|
|
833
837
|
"emptyStateText": string;
|
|
834
838
|
"fileTypes"?: string;
|
|
835
839
|
"files"?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const generateId: () => string;
|
|
2
|
-
export declare const getTextDir: () => string;
|
|
3
|
-
export declare const intl: {
|
|
4
|
-
formatMessage: (_: string) => string;
|
|
5
|
-
};
|
|
6
|
-
export declare const adjustTooltipPosition: () => string;
|
|
1
|
+
export declare const generateId: () => string;
|
|
2
|
+
export declare const getTextDir: () => string;
|
|
3
|
+
export declare const intl: {
|
|
4
|
+
formatMessage: (_: string) => string;
|
|
5
|
+
};
|
|
6
|
+
export declare const adjustTooltipPosition: () => string;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { TooltipPosition } from "./interfaces";
|
|
2
|
-
export declare const intl: import("@formatjs/intl").IntlShape<string>;
|
|
3
|
-
export declare function generateId(): string;
|
|
4
|
-
export declare function debounce(fn: any, wait: number): (this: any) => void;
|
|
5
|
-
export declare function getTextDir(): string;
|
|
6
|
-
export declare function getPosition(el: HTMLElement): {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function findParentWithScrollbar(el: HTMLElement): HTMLElement | undefined;
|
|
11
|
-
export declare function findParentWithHiddenOverflow(el: HTMLElement): HTMLElement | undefined;
|
|
12
|
-
export declare function getClosableElementMeasurements(fixedEl: HTMLElement, closableEl: HTMLElement): {
|
|
13
|
-
closableElHeight: number;
|
|
14
|
-
closableElWidth: number;
|
|
15
|
-
spaceAbove: number;
|
|
16
|
-
spaceBelow: number;
|
|
17
|
-
spaceLeft: number;
|
|
18
|
-
spaceRight: number;
|
|
19
|
-
};
|
|
20
|
-
export declare function shouldOpenUp(fixedEl: HTMLElement, //the element visible on the page when the component is closed
|
|
21
|
-
closableEl: HTMLElement, //the dropdown/popup/etc that becomes visible when the component is open
|
|
22
|
-
offsetAbove?: number, // if closableEl covers a part of fixedEl, that part should be offset
|
|
23
|
-
offsetBelow?: number): boolean;
|
|
24
|
-
export declare function shouldOpenDown(fixedEl: HTMLElement, //the element visible on the page when the component is closed
|
|
25
|
-
closableEl: HTMLElement, //the dropdown/popup/etc that becomes visible when the component is open
|
|
26
|
-
offsetAbove?: number, // if closableEl covers a part of fixedEl, that part should be offset
|
|
27
|
-
offsetBelow?: number): boolean;
|
|
28
|
-
export declare function shouldShiftRight(fixedEl: HTMLElement, closableEl: HTMLElement): boolean;
|
|
29
|
-
export declare function shouldShiftLeft(fixedEl: HTMLElement, closableEl: HTMLElement): boolean;
|
|
30
|
-
export declare function adjustTooltipPosition(tPos: TooltipPosition, el: HTMLElement, tooltipEl: HTMLElement): TooltipPosition;
|
|
31
|
-
export declare function hasRoomRight(x: any, spaceNeeded: number): boolean;
|
|
32
|
-
export declare function checkForActiveElInShadow(element: HTMLElement): HTMLElement;
|
|
33
|
-
export declare function checkForFocusableElInShadow(element: HTMLElement): HTMLElement;
|
|
34
|
-
export declare function isFocusable(element: any): boolean;
|
|
35
|
-
export declare function getFirstFocusableDescendant(element: HTMLElement): HTMLElement | undefined;
|
|
36
|
-
export declare function hasValidType(file: File, types: string): any;
|
|
37
|
-
export declare function getAcceptedMimeTypesList(acceptedExtensions: string[]): any;
|
|
38
|
-
export declare function snakeCaseToCamelCase(str: string): string;
|
|
39
|
-
export declare function getNewIndexToFocus(currentIndex: number, direction: string, listLength: number): number;
|
|
40
|
-
export declare function isRelatedTarget(ev: FocusEvent, id: string): boolean | null;
|
|
1
|
+
import { TooltipPosition } from "./interfaces";
|
|
2
|
+
export declare const intl: import("@formatjs/intl").IntlShape<string>;
|
|
3
|
+
export declare function generateId(): string;
|
|
4
|
+
export declare function debounce(fn: any, wait: number): (this: any) => void;
|
|
5
|
+
export declare function getTextDir(): string;
|
|
6
|
+
export declare function getPosition(el: HTMLElement): {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function findParentWithScrollbar(el: HTMLElement): HTMLElement | undefined;
|
|
11
|
+
export declare function findParentWithHiddenOverflow(el: HTMLElement): HTMLElement | undefined;
|
|
12
|
+
export declare function getClosableElementMeasurements(fixedEl: HTMLElement, closableEl: HTMLElement): {
|
|
13
|
+
closableElHeight: number;
|
|
14
|
+
closableElWidth: number;
|
|
15
|
+
spaceAbove: number;
|
|
16
|
+
spaceBelow: number;
|
|
17
|
+
spaceLeft: number;
|
|
18
|
+
spaceRight: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function shouldOpenUp(fixedEl: HTMLElement, //the element visible on the page when the component is closed
|
|
21
|
+
closableEl: HTMLElement, //the dropdown/popup/etc that becomes visible when the component is open
|
|
22
|
+
offsetAbove?: number, // if closableEl covers a part of fixedEl, that part should be offset
|
|
23
|
+
offsetBelow?: number): boolean;
|
|
24
|
+
export declare function shouldOpenDown(fixedEl: HTMLElement, //the element visible on the page when the component is closed
|
|
25
|
+
closableEl: HTMLElement, //the dropdown/popup/etc that becomes visible when the component is open
|
|
26
|
+
offsetAbove?: number, // if closableEl covers a part of fixedEl, that part should be offset
|
|
27
|
+
offsetBelow?: number): boolean;
|
|
28
|
+
export declare function shouldShiftRight(fixedEl: HTMLElement, closableEl: HTMLElement): boolean;
|
|
29
|
+
export declare function shouldShiftLeft(fixedEl: HTMLElement, closableEl: HTMLElement): boolean;
|
|
30
|
+
export declare function adjustTooltipPosition(tPos: TooltipPosition, el: HTMLElement, tooltipEl: HTMLElement): TooltipPosition;
|
|
31
|
+
export declare function hasRoomRight(x: any, spaceNeeded: number): boolean;
|
|
32
|
+
export declare function checkForActiveElInShadow(element: HTMLElement): HTMLElement;
|
|
33
|
+
export declare function checkForFocusableElInShadow(element: HTMLElement): HTMLElement;
|
|
34
|
+
export declare function isFocusable(element: any): boolean;
|
|
35
|
+
export declare function getFirstFocusableDescendant(element: HTMLElement): HTMLElement | undefined;
|
|
36
|
+
export declare function hasValidType(file: File, types: string): any;
|
|
37
|
+
export declare function getAcceptedMimeTypesList(acceptedExtensions: string[]): any;
|
|
38
|
+
export declare function snakeCaseToCamelCase(str: string): string;
|
|
39
|
+
export declare function getNewIndexToFocus(currentIndex: number, direction: string, listLength: number): number;
|
|
40
|
+
export declare function isRelatedTarget(ev: FocusEvent, id: string): boolean | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export declare type Notification = {
|
|
2
|
-
message: string;
|
|
3
|
-
id: string;
|
|
4
|
-
link: string;
|
|
5
|
-
newWindow: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare type label = string | undefined;
|
|
8
|
-
export declare type CssClassMap = {
|
|
9
|
-
[className: string]: boolean;
|
|
10
|
-
};
|
|
11
|
-
interface IconLabels {
|
|
12
|
-
[index: string]: string;
|
|
13
|
-
}
|
|
14
|
-
export declare type Product = {
|
|
15
|
-
description?: string;
|
|
16
|
-
samlLinkUrl?: string;
|
|
17
|
-
iconUrl: string;
|
|
18
|
-
id: string;
|
|
19
|
-
linkUrl: string;
|
|
20
|
-
name: string;
|
|
21
|
-
};
|
|
22
|
-
export declare type NavigatorPayload = {
|
|
23
|
-
connection_name?: string;
|
|
24
|
-
current_product_id: string;
|
|
25
|
-
email: string;
|
|
26
|
-
logout_url: string;
|
|
27
|
-
products: Product[];
|
|
28
|
-
};
|
|
29
|
-
export declare const iconLabels: IconLabels;
|
|
30
|
-
export declare function getIconCodeFromName(icon: string): string;
|
|
31
|
-
export declare const defaultMode = "planning";
|
|
32
|
-
export declare const getWmMode: (ref?: any) => any;
|
|
33
|
-
export declare type TooltipPosition = "top" | "bottom" | "left" | "right" | "bottom-left" | "bottom-right" | "top-right" | "top-left";
|
|
34
|
-
export {};
|
|
1
|
+
export declare type Notification = {
|
|
2
|
+
message: string;
|
|
3
|
+
id: string;
|
|
4
|
+
link: string;
|
|
5
|
+
newWindow: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type label = string | undefined;
|
|
8
|
+
export declare type CssClassMap = {
|
|
9
|
+
[className: string]: boolean;
|
|
10
|
+
};
|
|
11
|
+
interface IconLabels {
|
|
12
|
+
[index: string]: string;
|
|
13
|
+
}
|
|
14
|
+
export declare type Product = {
|
|
15
|
+
description?: string;
|
|
16
|
+
samlLinkUrl?: string;
|
|
17
|
+
iconUrl: string;
|
|
18
|
+
id: string;
|
|
19
|
+
linkUrl: string;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
export declare type NavigatorPayload = {
|
|
23
|
+
connection_name?: string;
|
|
24
|
+
current_product_id: string;
|
|
25
|
+
email: string;
|
|
26
|
+
logout_url: string;
|
|
27
|
+
products: Product[];
|
|
28
|
+
};
|
|
29
|
+
export declare const iconLabels: IconLabels;
|
|
30
|
+
export declare function getIconCodeFromName(icon: string): string;
|
|
31
|
+
export declare const defaultMode = "planning";
|
|
32
|
+
export declare const getWmMode: (ref?: any) => any;
|
|
33
|
+
export declare type TooltipPosition = "top" | "bottom" | "left" | "right" | "bottom-left" | "bottom-right" | "top-right" | "top-left";
|
|
34
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const getRequest: (url: string) => Promise<any>;
|
|
2
|
-
export declare const postRequest: (url: string, payload: any) => Promise<void | {
|
|
3
|
-
url: string;
|
|
4
|
-
}>;
|
|
5
|
-
export declare const deleteRequest: (url: string) => Promise<void>;
|
|
6
|
-
export declare const putRequest: (_url: string, _file: any) => Promise<void>;
|
|
1
|
+
export declare const getRequest: (url: string) => Promise<any>;
|
|
2
|
+
export declare const postRequest: (url: string, payload: any) => Promise<void | {
|
|
3
|
+
url: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const deleteRequest: (url: string) => Promise<void>;
|
|
6
|
+
export declare const putRequest: (_url: string, _file: any) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getRequest: (url: string) => Promise<any>;
|
|
2
|
-
export declare const postRequest: (url: string, payload: Object) => Promise<any>;
|
|
3
|
-
export declare const deleteRequest: (url: string) => Promise<any>;
|
|
4
|
-
export declare const putRequest: (url: string, file: File, onProgress: Function) => Promise<unknown>;
|
|
1
|
+
export declare const getRequest: (url: string) => Promise<any>;
|
|
2
|
+
export declare const postRequest: (url: string, payload: Object) => Promise<any>;
|
|
3
|
+
export declare const deleteRequest: (url: string) => Promise<any>;
|
|
4
|
+
export declare const putRequest: (url: string, file: File, onProgress: Function) => Promise<unknown>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import en from "./compiled-lang/en.json";
|
|
2
|
-
import fr from "./compiled-lang/fr.json";
|
|
3
|
-
import es from "./compiled-lang/es.json";
|
|
4
|
-
import pig from "./compiled-lang/pig.json";
|
|
5
|
-
export { en, fr, es, pig };
|
|
1
|
+
import en from "./compiled-lang/en.json";
|
|
2
|
+
import fr from "./compiled-lang/fr.json";
|
|
3
|
+
import es from "./compiled-lang/es.json";
|
|
4
|
+
import pig from "./compiled-lang/pig.json";
|
|
5
|
+
export { en, fr, es, pig };
|
package/package.json
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@watermarkinsights/ripple",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "Ripple Component Library",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"module": "dist/index.js",
|
|
7
|
-
"main": "dist/index.cjs.js",
|
|
8
|
-
"unpkg": "dist/ripple/ripple.js",
|
|
9
|
-
"types": "dist/types/components.d.ts",
|
|
10
|
-
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
-
"files": [
|
|
12
|
-
"dist/"
|
|
13
|
-
],
|
|
14
|
-
"es2017": "dist/esm/index.mjs",
|
|
15
|
-
"es2015": "dist/esm/index.mjs",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"local.pss": "sh ./scripts/build-local-pss.sh",
|
|
18
|
-
"local.aqua": "sh ./scripts/build-local-aqf.sh",
|
|
19
|
-
"local.ripple": "sh ./scripts/build-local-ripple.sh",
|
|
20
|
-
"local.wrappers": "sh ./scripts/build-local-wrappers.sh",
|
|
21
|
-
"build": "stencil build",
|
|
22
|
-
"release": "sh ./scripts/release.sh",
|
|
23
|
-
"start": "stencil build --dev --watch --serve",
|
|
24
|
-
"test": "stencil test --spec --e2e",
|
|
25
|
-
"test.snapshot": "stencil test --spec --e2e -u",
|
|
26
|
-
"test.watch": "stencil test --spec --e2e --watch",
|
|
27
|
-
"test.watchAll": "stencil test --spec --e2e --watchAll",
|
|
28
|
-
"test.coverage": "stencil test --spec --coverage --collectCoverageFrom='src/**/*.{js,jsx,ts,tsx}'",
|
|
29
|
-
"extract": "formatjs extract ./src/**/*.tsx --out-file ./src/lang/en.json && node ./src/lang/piglatin.js",
|
|
30
|
-
"compile": "formatjs compile-folder ./src/lang src/lang/compiled-lang/ --ast"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@stencil/
|
|
37
|
-
"@stencil/
|
|
38
|
-
"@
|
|
39
|
-
"@types/
|
|
40
|
-
"
|
|
41
|
-
"jest
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@watermarkinsights/ripple",
|
|
3
|
+
"version": "3.6.0-1",
|
|
4
|
+
"description": "Ripple Component Library",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"main": "dist/index.cjs.js",
|
|
8
|
+
"unpkg": "dist/ripple/ripple.js",
|
|
9
|
+
"types": "dist/types/components.d.ts",
|
|
10
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/"
|
|
13
|
+
],
|
|
14
|
+
"es2017": "dist/esm/index.mjs",
|
|
15
|
+
"es2015": "dist/esm/index.mjs",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"local.pss": "sh ./scripts/build-local-pss.sh",
|
|
18
|
+
"local.aqua": "sh ./scripts/build-local-aqf.sh",
|
|
19
|
+
"local.ripple": "sh ./scripts/build-local-ripple.sh",
|
|
20
|
+
"local.wrappers": "sh ./scripts/build-local-wrappers.sh",
|
|
21
|
+
"build": "stencil build",
|
|
22
|
+
"release": "sh ./scripts/release.sh",
|
|
23
|
+
"start": "stencil build --dev --watch --serve",
|
|
24
|
+
"test": "stencil test --spec --e2e",
|
|
25
|
+
"test.snapshot": "stencil test --spec --e2e -u",
|
|
26
|
+
"test.watch": "stencil test --spec --e2e --watch",
|
|
27
|
+
"test.watchAll": "stencil test --spec --e2e --watchAll",
|
|
28
|
+
"test.coverage": "stencil test --spec --coverage --collectCoverageFrom='src/**/*.{js,jsx,ts,tsx}'",
|
|
29
|
+
"extract": "formatjs extract './src/**/*.tsx' --out-file './src/lang/en.json' && node './src/lang/piglatin.js'",
|
|
30
|
+
"compile": "formatjs compile-folder ./src/lang src/lang/compiled-lang/ --ast",
|
|
31
|
+
"missing": "node './src/lang/missing.js'"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@axe-core/puppeteer": "^4.1.1",
|
|
35
|
+
"@formatjs/cli": "^4.2.11",
|
|
36
|
+
"@stencil/core": "^2.5.2",
|
|
37
|
+
"@stencil/react-output-target": "^0.0.9",
|
|
38
|
+
"@stencil/sass": "^1.4.1",
|
|
39
|
+
"@types/jest": "^26.0.23",
|
|
40
|
+
"@types/puppeteer": "^5.4.3",
|
|
41
|
+
"jest": "^26.6.3",
|
|
42
|
+
"jest-cli": "^26.6.3"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@formatjs/intl": "^1.10.5"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,H as r,g as a}from"./p-9baa3039.js";import{i as s,g as p,e as n}from"./p-e60fe2f5.js";const o=class{constructor(e){i(this,e),this.wmInputValueChanged=t(this,"wmInputValueChanged",7),this.labelPosition="top",this.value="",this.disabled=!1,this.placeholder="",this.requiredField=!1,this.type="text",this.step=1,this.announcement="",this.previousBlurredValue="",this.displayedErrorMessage="",this.uid="",this.requiredErrorMessage=s.formatMessage({id:"global.requiredError",defaultMessage:"This field is required."}),this.numberErrorMessage=s.formatMessage({id:"input.numberError",defaultMessage:"Please enter a valid number."})}get charCount(){return this.value.length}componentWillLoad(){this.uid=this.el.id?this.el.id:p(),this.el.focus=function(){this.disabled||this.shadowRoot.querySelector("input").focus()},this.label||console.error("wm-input requires the label property")}componentDidLoad(){this.value&&(this.inputEl.value=this.value,this.previousBlurredValue=this.inputEl.value)}handleErrorMessage(){this.displayedErrorMessage=this.validate()}handleKeyDown(i){const t=i.ctrlKey||i.metaKey||i.altKey;/^.$/.test(i.key)&&!t&&this.characterLimit&&this.inputEl.value.length>=this.characterLimit&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit))}handleBlur(i){this.value!==this.previousBlurredValue&&this.wmInputValueChanged.emit({value:this.value}),this.previousBlurredValue=this.value,this.preventValidation&&n(i,this.preventValidation)||(this.displayedErrorMessage=this.validate()),this.inputWrapperEl.classList.remove("focus")}handleInput(i){this.value=i.target.value,this.characterLimit&&this.charCount>=this.characterLimit-5&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit))}handleFocus(){this.inputWrapperEl.classList.add("focus")}validate(){const i=[this.validateNumber.bind(this),this.validateRequired.bind(this)];return this.errorMessage?this.errorMessage:i.reduce(((i,t)=>i||t()),"")}validateRequired(){return this.requiredField&&""===this.value?this.requiredErrorMessage:""}validateNumber(){return"number"===this.type&&this.inputEl.validity.badInput?this.numberErrorMessage:""}announce(i){this.liveRegionEl.textContent===i&&(i+=" "),this.announcement=i}generateCharacterLimitWarning(i,t){const e=s.formatMessage({id:"input.charactersEntered",defaultMessage:"{x, number} of {y, number} characters entered."},{x:i,y:t}),r=s.formatMessage({id:"input.characterLimitReached",defaultMessage:"No additional characters will be entered."});return`${e}${i>=t?" "+r:""}`}generateCharacterLimitLabel(i){return s.formatMessage({id:"input.characterLimit",defaultMessage:"{limit, number} characters allowed."},{limit:i})}renderErrorMessage(){return this.errorMessage||this.displayedErrorMessage}render(){return e(r,{id:this.uid},e("div",{class:`wrapper label-${this.labelPosition} ${this.errorMessage||this.displayedErrorMessage?"invalid":""}`,ref:i=>this.inputWrapperEl=i},e("div",{class:"label-wrapper"},"none"!==this.labelPosition&&e("label",{htmlFor:`inputfield-${this.uid}`,class:"label"},this.label,this.requiredField&&e("span",{class:"required","aria-hidden":"true"},"*"))),e("div",{class:"inner-wrapper"},e("div",{class:"inputfield-wrapper"},e("input",{ref:i=>this.inputEl=i,id:`inputfield-${this.uid}`,disabled:this.disabled,"aria-label":`${this.label}${this.characterLimit?" "+this.generateCharacterLimitLabel(this.characterLimit):""}`,"aria-describedby":`info-${this.uid} error-${this.uid}`,onInput:i=>this.handleInput(i),onKeyDown:i=>this.handleKeyDown(i),onBlur:i=>this.handleBlur(i),onFocus:this.handleFocus.bind(this),placeholder:this.placeholder,autocomplete:"off",required:this.requiredField,maxLength:this.characterLimit||void 0,type:this.type,step:this.step,max:this.max,min:this.min}),this.characterLimit&&"number"==typeof this.characterLimit?e("div",{class:"character-count"},this.charCount,"/",this.characterLimit):""),this.info&&e("div",{id:`info-${this.uid}`,class:"info"},this.info),e("div",{id:`error-${this.uid}`,"aria-live":"assertive",class:"error-message","aria-atomic":"true"},this.renderErrorMessage()),e("div",{class:"sr-only","aria-live":"polite","aria-atomic":"true",ref:i=>this.liveRegionEl=i},this.announcement))))}get el(){return a(this)}static get watchers(){return{errorMessage:["handleErrorMessage"]}}};o.style='@charset "UTF-8";:host,wm-input{font-family:inherit;width:100%}:host *,wm-input *{box-sizing:border-box}:host .wrapper,wm-input .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-input .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-input .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-input .wrapper.label-left{flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-input .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-input .wrapper.label-left .label-wrapper .label{display:flex;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-input .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-input .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-input .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-input .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-input .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-input .wrapper .inner-wrapper{width:100%}:host .wrapper .inputfield-wrapper,wm-input .wrapper .inputfield-wrapper{height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:flex}:host .wrapper .character-count,wm-input .wrapper .character-count{display:flex;align-items:center;justify-content:center;min-width:5rem;background-color:rgba(74, 74, 74, 0.05);font-size:0.875rem;font-weight:500;align-self:stretch}:host .wrapper input,wm-input .wrapper input{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:none;font-family:inherit;font-size:0.875rem;height:100%;flex:1;padding:0.75rem 1rem;width:100%}:host .wrapper input:disabled,wm-input .wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper input:focus,wm-input .wrapper input:focus{outline:none}:host .wrapper .info,wm-input .wrapper .info{font-style:italic;line-height:100%;margin:4px 0}:host .wrapper.invalid .inputfield-wrapper,wm-input .wrapper.invalid .inputfield-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error-message,wm-input .wrapper.invalid .error-message{color:#c0392b;margin:4px 0;display:block;font-style:italic;line-height:100%}:host .wrapper:focus .inputfield-wrapper,:host .wrapper.focus .inputfield-wrapper,wm-input .wrapper:focus .inputfield-wrapper,wm-input .wrapper.focus .inputfield-wrapper{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}:host .sr-only,wm-input .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{o as wm_input}
|