@internetarchive/modal-manager 0.2.8 → 0.2.9-alpha.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.
Files changed (73) hide show
  1. package/.editorconfig +29 -29
  2. package/.eslintrc.js +14 -14
  3. package/.github/workflows/ci.yml +26 -26
  4. package/LICENSE +661 -661
  5. package/README.md +139 -139
  6. package/custom-elements.json +170 -170
  7. package/demo/index.html +278 -278
  8. package/dist/index.d.ts +7 -7
  9. package/dist/index.js +5 -5
  10. package/dist/index.js.map +1 -1
  11. package/dist/src/modal-config.d.ts +92 -92
  12. package/dist/src/modal-config.js +22 -22
  13. package/dist/src/modal-config.js.map +1 -1
  14. package/dist/src/modal-manager-host-bridge-interface.d.ts +12 -12
  15. package/dist/src/modal-manager-host-bridge-interface.js.map +1 -1
  16. package/dist/src/modal-manager-host-bridge.d.ts +34 -34
  17. package/dist/src/modal-manager-host-bridge.js +62 -62
  18. package/dist/src/modal-manager-host-bridge.js.map +1 -1
  19. package/dist/src/modal-manager-interface.d.ts +25 -25
  20. package/dist/src/modal-manager-interface.js.map +1 -1
  21. package/dist/src/modal-manager-mode.d.ts +10 -10
  22. package/dist/src/modal-manager-mode.js +11 -11
  23. package/dist/src/modal-manager-mode.js.map +1 -1
  24. package/dist/src/modal-manager.d.ts +108 -108
  25. package/dist/src/modal-manager.js +189 -189
  26. package/dist/src/modal-manager.js.map +1 -1
  27. package/dist/src/modal-template.d.ts +32 -32
  28. package/dist/src/modal-template.js +276 -276
  29. package/dist/src/modal-template.js.map +1 -1
  30. package/dist/test/modal-config.test.d.ts +1 -1
  31. package/dist/test/modal-config.test.js +61 -61
  32. package/dist/test/modal-config.test.js.map +1 -1
  33. package/dist/test/modal-manager.test.d.ts +1 -1
  34. package/dist/test/modal-manager.test.js +200 -200
  35. package/dist/test/modal-manager.test.js.map +1 -1
  36. package/dist/test/modal-template.test.d.ts +1 -1
  37. package/dist/test/modal-template.test.js +95 -95
  38. package/dist/test/modal-template.test.js.map +1 -1
  39. package/docs/assets/css/main.css +2678 -2678
  40. package/docs/classes/_src_modal_config_.modalconfig.html +429 -429
  41. package/docs/classes/_src_modal_manager_.modalmanager.html +7702 -7702
  42. package/docs/classes/_src_modal_manager_host_bridge_.modalmanagerhostbridge.html +409 -409
  43. package/docs/classes/_src_modal_template_.modaltemplate.html +7096 -7096
  44. package/docs/enums/_src_modal_manager_mode_.modalmanagermode.html +196 -196
  45. package/docs/globals.html +150 -150
  46. package/docs/index.html +252 -252
  47. package/docs/interfaces/_src_modal_manager_host_bridge_interface_.modalmanagerhostbridgeinterface.html +210 -210
  48. package/docs/interfaces/_src_modal_manager_interface_.modalmanagerinterface.html +7095 -7095
  49. package/docs/modules/_index_.html +208 -208
  50. package/docs/modules/_src_modal_config_.html +146 -146
  51. package/docs/modules/_src_modal_manager_.html +146 -146
  52. package/docs/modules/_src_modal_manager_host_bridge_.html +146 -146
  53. package/docs/modules/_src_modal_manager_host_bridge_interface_.html +146 -146
  54. package/docs/modules/_src_modal_manager_interface_.html +146 -146
  55. package/docs/modules/_src_modal_manager_mode_.html +146 -146
  56. package/docs/modules/_src_modal_template_.html +146 -146
  57. package/docs/modules/_test_modal_config_test_.html +106 -106
  58. package/docs/modules/_test_modal_manager_test_.html +106 -106
  59. package/docs/modules/_test_modal_template_test_.html +106 -106
  60. package/index.ts +7 -7
  61. package/karma.conf.js +24 -24
  62. package/package.json +82 -82
  63. package/src/modal-config.ts +117 -117
  64. package/src/modal-manager-host-bridge-interface.ts +13 -13
  65. package/src/modal-manager-host-bridge.ts +82 -82
  66. package/src/modal-manager-interface.ts +28 -28
  67. package/src/modal-manager-mode.ts +10 -10
  68. package/src/modal-manager.ts +228 -228
  69. package/src/modal-template.ts +279 -279
  70. package/test/modal-config.test.ts +69 -69
  71. package/test/modal-manager.test.ts +245 -245
  72. package/test/modal-template.test.ts +111 -111
  73. package/tsconfig.json +20 -20
@@ -1,92 +1,92 @@
1
- import { TemplateResult } from 'lit';
2
- /**
3
- * Configuration to show a modal
4
- *
5
- * @export
6
- * @class ModalConfig
7
- */
8
- export declare class ModalConfig {
9
- /**
10
- * The title that shows in the header
11
- *
12
- * @type {(TemplateResult | undefined)}
13
- * @memberof ModalConfig
14
- */
15
- title?: TemplateResult;
16
- /**
17
- * The subtitle shown in the header under the title
18
- *
19
- * @type {(TemplateResult | undefined)}
20
- * @memberof ModalConfig
21
- */
22
- subtitle?: TemplateResult;
23
- /**
24
- * The headline shown at the top of the content section
25
- *
26
- * @type {(TemplateResult | undefined)}
27
- * @memberof ModalConfig
28
- */
29
- headline?: TemplateResult;
30
- /**
31
- * The text shown below the headline in the content section
32
- *
33
- * @type {(TemplateResult | undefined)}
34
- * @memberof ModalConfig
35
- */
36
- message?: TemplateResult;
37
- /**
38
- * The background color of the header
39
- *
40
- * @memberof ModalConfig
41
- */
42
- headerColor: string;
43
- /**
44
- * The background color of the body
45
- *
46
- * @memberof ModalConfig
47
- */
48
- bodyColor: string;
49
- /**
50
- * Show or hide the processing indicator
51
- *
52
- * @memberof ModalConfig
53
- */
54
- showProcessingIndicator: boolean;
55
- /**
56
- * Set the processing image mode, currently `processing` or `complete`
57
- *
58
- * @memberof ModalConfig
59
- */
60
- processingImageMode: string;
61
- /**
62
- * Show the close button
63
- *
64
- * @memberof ModalConfig
65
- */
66
- showCloseButton: boolean;
67
- /**
68
- * Show the close button
69
- *
70
- * @memberof ModalConfig
71
- */
72
- showHeaderLogo: boolean;
73
- /**
74
- * Close the modal if the user taps on the background
75
- *
76
- * @memberof ModalConfig
77
- */
78
- closeOnBackdropClick: boolean;
79
- constructor(options?: {
80
- title?: TemplateResult;
81
- subtitle?: TemplateResult;
82
- headline?: TemplateResult;
83
- message?: TemplateResult;
84
- headerColor?: string;
85
- bodyColor?: string;
86
- showProcessingIndicator?: boolean;
87
- processingImageMode?: string;
88
- showCloseButton?: boolean;
89
- showHeaderLogo?: boolean;
90
- closeOnBackdropClick?: boolean;
91
- });
92
- }
1
+ import { TemplateResult } from 'lit';
2
+ /**
3
+ * Configuration to show a modal
4
+ *
5
+ * @export
6
+ * @class ModalConfig
7
+ */
8
+ export declare class ModalConfig {
9
+ /**
10
+ * The title that shows in the header
11
+ *
12
+ * @type {(TemplateResult | undefined)}
13
+ * @memberof ModalConfig
14
+ */
15
+ title?: TemplateResult;
16
+ /**
17
+ * The subtitle shown in the header under the title
18
+ *
19
+ * @type {(TemplateResult | undefined)}
20
+ * @memberof ModalConfig
21
+ */
22
+ subtitle?: TemplateResult;
23
+ /**
24
+ * The headline shown at the top of the content section
25
+ *
26
+ * @type {(TemplateResult | undefined)}
27
+ * @memberof ModalConfig
28
+ */
29
+ headline?: TemplateResult;
30
+ /**
31
+ * The text shown below the headline in the content section
32
+ *
33
+ * @type {(TemplateResult | undefined)}
34
+ * @memberof ModalConfig
35
+ */
36
+ message?: TemplateResult;
37
+ /**
38
+ * The background color of the header
39
+ *
40
+ * @memberof ModalConfig
41
+ */
42
+ headerColor: string;
43
+ /**
44
+ * The background color of the body
45
+ *
46
+ * @memberof ModalConfig
47
+ */
48
+ bodyColor: string;
49
+ /**
50
+ * Show or hide the processing indicator
51
+ *
52
+ * @memberof ModalConfig
53
+ */
54
+ showProcessingIndicator: boolean;
55
+ /**
56
+ * Set the processing image mode, currently `processing` or `complete`
57
+ *
58
+ * @memberof ModalConfig
59
+ */
60
+ processingImageMode: string;
61
+ /**
62
+ * Show the close button
63
+ *
64
+ * @memberof ModalConfig
65
+ */
66
+ showCloseButton: boolean;
67
+ /**
68
+ * Show the close button
69
+ *
70
+ * @memberof ModalConfig
71
+ */
72
+ showHeaderLogo: boolean;
73
+ /**
74
+ * Close the modal if the user taps on the background
75
+ *
76
+ * @memberof ModalConfig
77
+ */
78
+ closeOnBackdropClick: boolean;
79
+ constructor(options?: {
80
+ title?: TemplateResult;
81
+ subtitle?: TemplateResult;
82
+ headline?: TemplateResult;
83
+ message?: TemplateResult;
84
+ headerColor?: string;
85
+ bodyColor?: string;
86
+ showProcessingIndicator?: boolean;
87
+ processingImageMode?: string;
88
+ showCloseButton?: boolean;
89
+ showHeaderLogo?: boolean;
90
+ closeOnBackdropClick?: boolean;
91
+ });
92
+ }
@@ -1,23 +1,23 @@
1
- /**
2
- * Configuration to show a modal
3
- *
4
- * @export
5
- * @class ModalConfig
6
- */
7
- export class ModalConfig {
8
- constructor(options) {
9
- var _a, _b, _c, _d, _e, _f, _g;
10
- this.title = options === null || options === void 0 ? void 0 : options.title;
11
- this.subtitle = options === null || options === void 0 ? void 0 : options.subtitle;
12
- this.headline = options === null || options === void 0 ? void 0 : options.headline;
13
- this.message = options === null || options === void 0 ? void 0 : options.message;
14
- this.headerColor = (_a = options === null || options === void 0 ? void 0 : options.headerColor) !== null && _a !== void 0 ? _a : '#55A183';
15
- this.bodyColor = (_b = options === null || options === void 0 ? void 0 : options.bodyColor) !== null && _b !== void 0 ? _b : '#f5f5f7';
16
- this.showProcessingIndicator = (_c = options === null || options === void 0 ? void 0 : options.showProcessingIndicator) !== null && _c !== void 0 ? _c : false;
17
- this.processingImageMode = (_d = options === null || options === void 0 ? void 0 : options.processingImageMode) !== null && _d !== void 0 ? _d : 'complete';
18
- this.showCloseButton = (_e = options === null || options === void 0 ? void 0 : options.showCloseButton) !== null && _e !== void 0 ? _e : true;
19
- this.showHeaderLogo = (_f = options === null || options === void 0 ? void 0 : options.showHeaderLogo) !== null && _f !== void 0 ? _f : true;
20
- this.closeOnBackdropClick = (_g = options === null || options === void 0 ? void 0 : options.closeOnBackdropClick) !== null && _g !== void 0 ? _g : true;
21
- }
22
- }
1
+ /**
2
+ * Configuration to show a modal
3
+ *
4
+ * @export
5
+ * @class ModalConfig
6
+ */
7
+ export class ModalConfig {
8
+ constructor(options) {
9
+ var _a, _b, _c, _d, _e, _f, _g;
10
+ this.title = options === null || options === void 0 ? void 0 : options.title;
11
+ this.subtitle = options === null || options === void 0 ? void 0 : options.subtitle;
12
+ this.headline = options === null || options === void 0 ? void 0 : options.headline;
13
+ this.message = options === null || options === void 0 ? void 0 : options.message;
14
+ this.headerColor = (_a = options === null || options === void 0 ? void 0 : options.headerColor) !== null && _a !== void 0 ? _a : '#55A183';
15
+ this.bodyColor = (_b = options === null || options === void 0 ? void 0 : options.bodyColor) !== null && _b !== void 0 ? _b : '#f5f5f7';
16
+ this.showProcessingIndicator = (_c = options === null || options === void 0 ? void 0 : options.showProcessingIndicator) !== null && _c !== void 0 ? _c : false;
17
+ this.processingImageMode = (_d = options === null || options === void 0 ? void 0 : options.processingImageMode) !== null && _d !== void 0 ? _d : 'complete';
18
+ this.showCloseButton = (_e = options === null || options === void 0 ? void 0 : options.showCloseButton) !== null && _e !== void 0 ? _e : true;
19
+ this.showHeaderLogo = (_f = options === null || options === void 0 ? void 0 : options.showHeaderLogo) !== null && _f !== void 0 ? _f : true;
20
+ this.closeOnBackdropClick = (_g = options === null || options === void 0 ? void 0 : options.closeOnBackdropClick) !== null && _g !== void 0 ? _g : true;
21
+ }
22
+ }
23
23
  //# sourceMappingURL=modal-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal-config.js","sourceRoot":"","sources":["../../src/modal-config.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IAkFtB,YAAY,OAYX;;QACC,IAAI,CAAC,KAAK,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;QAEhC,IAAI,CAAC,WAAW,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,SAAS,CAAC;QACrD,IAAI,CAAC,SAAS,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,SAAS,CAAC;QACjD,IAAI,CAAC,uBAAuB,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB,mCAAI,KAAK,CAAC;QACzE,IAAI,CAAC,mBAAmB,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,mBAAmB,mCAAI,UAAU,CAAC;QACtE,IAAI,CAAC,eAAe,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,mCAAI,IAAI,CAAC;QACxD,IAAI,CAAC,cAAc,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,mCAAI,IAAI,CAAC;QACtD,IAAI,CAAC,oBAAoB,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,mCAAI,IAAI,CAAC;IACpE,CAAC;CACF","sourcesContent":["import { TemplateResult } from 'lit';\n\n/**\n * Configuration to show a modal\n *\n * @export\n * @class ModalConfig\n */\nexport class ModalConfig {\n /**\n * The title that shows in the header\n *\n * @type {(TemplateResult | undefined)}\n * @memberof ModalConfig\n */\n title?: TemplateResult;\n\n /**\n * The subtitle shown in the header under the title\n *\n * @type {(TemplateResult | undefined)}\n * @memberof ModalConfig\n */\n subtitle?: TemplateResult;\n\n /**\n * The headline shown at the top of the content section\n *\n * @type {(TemplateResult | undefined)}\n * @memberof ModalConfig\n */\n headline?: TemplateResult;\n\n /**\n * The text shown below the headline in the content section\n *\n * @type {(TemplateResult | undefined)}\n * @memberof ModalConfig\n */\n message?: TemplateResult;\n\n /**\n * The background color of the header\n *\n * @memberof ModalConfig\n */\n headerColor: string;\n\n /**\n * The background color of the body\n *\n * @memberof ModalConfig\n */\n bodyColor: string;\n\n /**\n * Show or hide the processing indicator\n *\n * @memberof ModalConfig\n */\n showProcessingIndicator: boolean;\n\n /**\n * Set the processing image mode, currently `processing` or `complete`\n *\n * @memberof ModalConfig\n */\n processingImageMode: string;\n\n /**\n * Show the close button\n *\n * @memberof ModalConfig\n */\n showCloseButton: boolean;\n\n /**\n * Show the close button\n *\n * @memberof ModalConfig\n */\n showHeaderLogo: boolean;\n\n /**\n * Close the modal if the user taps on the background\n *\n * @memberof ModalConfig\n */\n closeOnBackdropClick: boolean;\n\n constructor(options?: {\n title?: TemplateResult;\n subtitle?: TemplateResult;\n headline?: TemplateResult;\n message?: TemplateResult;\n headerColor?: string;\n bodyColor?: string;\n showProcessingIndicator?: boolean;\n processingImageMode?: string;\n showCloseButton?: boolean;\n showHeaderLogo?: boolean;\n closeOnBackdropClick?: boolean;\n }) {\n this.title = options?.title;\n this.subtitle = options?.subtitle;\n this.headline = options?.headline;\n this.message = options?.message;\n\n this.headerColor = options?.headerColor ?? '#55A183';\n this.bodyColor = options?.bodyColor ?? '#f5f5f7';\n this.showProcessingIndicator = options?.showProcessingIndicator ?? false;\n this.processingImageMode = options?.processingImageMode ?? 'complete';\n this.showCloseButton = options?.showCloseButton ?? true;\n this.showHeaderLogo = options?.showHeaderLogo ?? true;\n this.closeOnBackdropClick = options?.closeOnBackdropClick ?? true;\n }\n}\n"]}
1
+ {"version":3,"file":"modal-config.js","sourceRoot":"","sources":["../../src/modal-config.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IAkFtB,YAAY,OAYX;;QACC,IAAI,CAAC,KAAK,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;QAEhC,IAAI,CAAC,WAAW,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,SAAS,CAAC;QACrD,IAAI,CAAC,SAAS,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,SAAS,CAAC;QACjD,IAAI,CAAC,uBAAuB,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB,mCAAI,KAAK,CAAC;QACzE,IAAI,CAAC,mBAAmB,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,mBAAmB,mCAAI,UAAU,CAAC;QACtE,IAAI,CAAC,eAAe,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,mCAAI,IAAI,CAAC;QACxD,IAAI,CAAC,cAAc,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,mCAAI,IAAI,CAAC;QACtD,IAAI,CAAC,oBAAoB,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,mCAAI,IAAI,CAAC;IACpE,CAAC;CACF","sourcesContent":["import { TemplateResult } from 'lit';\r\n\r\n/**\r\n * Configuration to show a modal\r\n *\r\n * @export\r\n * @class ModalConfig\r\n */\r\nexport class ModalConfig {\r\n /**\r\n * The title that shows in the header\r\n *\r\n * @type {(TemplateResult | undefined)}\r\n * @memberof ModalConfig\r\n */\r\n title?: TemplateResult;\r\n\r\n /**\r\n * The subtitle shown in the header under the title\r\n *\r\n * @type {(TemplateResult | undefined)}\r\n * @memberof ModalConfig\r\n */\r\n subtitle?: TemplateResult;\r\n\r\n /**\r\n * The headline shown at the top of the content section\r\n *\r\n * @type {(TemplateResult | undefined)}\r\n * @memberof ModalConfig\r\n */\r\n headline?: TemplateResult;\r\n\r\n /**\r\n * The text shown below the headline in the content section\r\n *\r\n * @type {(TemplateResult | undefined)}\r\n * @memberof ModalConfig\r\n */\r\n message?: TemplateResult;\r\n\r\n /**\r\n * The background color of the header\r\n *\r\n * @memberof ModalConfig\r\n */\r\n headerColor: string;\r\n\r\n /**\r\n * The background color of the body\r\n *\r\n * @memberof ModalConfig\r\n */\r\n bodyColor: string;\r\n\r\n /**\r\n * Show or hide the processing indicator\r\n *\r\n * @memberof ModalConfig\r\n */\r\n showProcessingIndicator: boolean;\r\n\r\n /**\r\n * Set the processing image mode, currently `processing` or `complete`\r\n *\r\n * @memberof ModalConfig\r\n */\r\n processingImageMode: string;\r\n\r\n /**\r\n * Show the close button\r\n *\r\n * @memberof ModalConfig\r\n */\r\n showCloseButton: boolean;\r\n\r\n /**\r\n * Show the close button\r\n *\r\n * @memberof ModalConfig\r\n */\r\n showHeaderLogo: boolean;\r\n\r\n /**\r\n * Close the modal if the user taps on the background\r\n *\r\n * @memberof ModalConfig\r\n */\r\n closeOnBackdropClick: boolean;\r\n\r\n constructor(options?: {\r\n title?: TemplateResult;\r\n subtitle?: TemplateResult;\r\n headline?: TemplateResult;\r\n message?: TemplateResult;\r\n headerColor?: string;\r\n bodyColor?: string;\r\n showProcessingIndicator?: boolean;\r\n processingImageMode?: string;\r\n showCloseButton?: boolean;\r\n showHeaderLogo?: boolean;\r\n closeOnBackdropClick?: boolean;\r\n }) {\r\n this.title = options?.title;\r\n this.subtitle = options?.subtitle;\r\n this.headline = options?.headline;\r\n this.message = options?.message;\r\n\r\n this.headerColor = options?.headerColor ?? '#55A183';\r\n this.bodyColor = options?.bodyColor ?? '#f5f5f7';\r\n this.showProcessingIndicator = options?.showProcessingIndicator ?? false;\r\n this.processingImageMode = options?.processingImageMode ?? 'complete';\r\n this.showCloseButton = options?.showCloseButton ?? true;\r\n this.showHeaderLogo = options?.showHeaderLogo ?? true;\r\n this.closeOnBackdropClick = options?.closeOnBackdropClick ?? true;\r\n }\r\n}\r\n"]}
@@ -1,12 +1,12 @@
1
- import { ModalManagerMode } from './modal-manager-mode';
2
- /**
3
- * The ModalManagerHostBridgeInterface is a delegate interface for
4
- * the host to implement environment-specific changes when the modal
5
- * is open or closed.
6
- *
7
- * A default implementation is provided, but can be overridden if
8
- * it does not work for the environment.
9
- */
10
- export interface ModalManagerHostBridgeInterface {
11
- handleModeChange(mode: ModalManagerMode): void;
12
- }
1
+ import { ModalManagerMode } from './modal-manager-mode';
2
+ /**
3
+ * The ModalManagerHostBridgeInterface is a delegate interface for
4
+ * the host to implement environment-specific changes when the modal
5
+ * is open or closed.
6
+ *
7
+ * A default implementation is provided, but can be overridden if
8
+ * it does not work for the environment.
9
+ */
10
+ export interface ModalManagerHostBridgeInterface {
11
+ handleModeChange(mode: ModalManagerMode): void;
12
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"modal-manager-host-bridge-interface.js","sourceRoot":"","sources":["../../src/modal-manager-host-bridge-interface.ts"],"names":[],"mappings":"","sourcesContent":["import { ModalManagerMode } from './modal-manager-mode';\n\n/**\n * The ModalManagerHostBridgeInterface is a delegate interface for\n * the host to implement environment-specific changes when the modal\n * is open or closed.\n *\n * A default implementation is provided, but can be overridden if\n * it does not work for the environment.\n */\nexport interface ModalManagerHostBridgeInterface {\n handleModeChange(mode: ModalManagerMode): void;\n}\n"]}
1
+ {"version":3,"file":"modal-manager-host-bridge-interface.js","sourceRoot":"","sources":["../../src/modal-manager-host-bridge-interface.ts"],"names":[],"mappings":"","sourcesContent":["import { ModalManagerMode } from './modal-manager-mode';\r\n\r\n/**\r\n * The ModalManagerHostBridgeInterface is a delegate interface for\r\n * the host to implement environment-specific changes when the modal\r\n * is open or closed.\r\n *\r\n * A default implementation is provided, but can be overridden if\r\n * it does not work for the environment.\r\n */\r\nexport interface ModalManagerHostBridgeInterface {\r\n handleModeChange(mode: ModalManagerMode): void;\r\n}\r\n"]}
@@ -1,34 +1,34 @@
1
- import { ModalManagerHostBridgeInterface } from './modal-manager-host-bridge-interface';
2
- import { ModalManagerInterface } from './modal-manager-interface';
3
- import { ModalManagerMode } from './modal-manager-mode';
4
- /**
5
- * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the
6
- * host that sets up environment-specific changes when the modal opens and closes.
7
- *
8
- * For instance, when the modal opens, this adds a class to the `<body>` tag for styling
9
- * and adds a `resize` listener to fix a Safari shadow root issue.
10
- *
11
- * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass
12
- * them into the `ModalManager` if this one does not work for their environment.
13
- *
14
- * @export
15
- * @class ModalManagerHostBridge
16
- * @implements {ModalManagerHostBridgeInterface}
17
- */
18
- export declare class ModalManagerHostBridge implements ModalManagerHostBridgeInterface {
19
- private modalManager;
20
- constructor(modalManager: ModalManagerInterface);
21
- /**
22
- * Handle the mode change
23
- *
24
- * @private
25
- * @memberof ModalManager
26
- */
27
- handleModeChange(mode: ModalManagerMode): void;
28
- private windowResizeThrottler;
29
- private updateModalContainerHeight;
30
- private stopDocumentScroll;
31
- private resumeDocumentScroll;
32
- private startResizeListener;
33
- private stopResizeListener;
34
- }
1
+ import { ModalManagerHostBridgeInterface } from './modal-manager-host-bridge-interface';
2
+ import { ModalManagerInterface } from './modal-manager-interface';
3
+ import { ModalManagerMode } from './modal-manager-mode';
4
+ /**
5
+ * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the
6
+ * host that sets up environment-specific changes when the modal opens and closes.
7
+ *
8
+ * For instance, when the modal opens, this adds a class to the `<body>` tag for styling
9
+ * and adds a `resize` listener to fix a Safari shadow root issue.
10
+ *
11
+ * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass
12
+ * them into the `ModalManager` if this one does not work for their environment.
13
+ *
14
+ * @export
15
+ * @class ModalManagerHostBridge
16
+ * @implements {ModalManagerHostBridgeInterface}
17
+ */
18
+ export declare class ModalManagerHostBridge implements ModalManagerHostBridgeInterface {
19
+ private modalManager;
20
+ constructor(modalManager: ModalManagerInterface);
21
+ /**
22
+ * Handle the mode change
23
+ *
24
+ * @private
25
+ * @memberof ModalManager
26
+ */
27
+ handleModeChange(mode: ModalManagerMode): void;
28
+ private windowResizeThrottler;
29
+ private updateModalContainerHeight;
30
+ private stopDocumentScroll;
31
+ private resumeDocumentScroll;
32
+ private startResizeListener;
33
+ private stopResizeListener;
34
+ }
@@ -1,63 +1,63 @@
1
- import { throttle } from 'throttle-debounce';
2
- import { ModalManagerMode } from './modal-manager-mode';
3
- /**
4
- * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the
5
- * host that sets up environment-specific changes when the modal opens and closes.
6
- *
7
- * For instance, when the modal opens, this adds a class to the `<body>` tag for styling
8
- * and adds a `resize` listener to fix a Safari shadow root issue.
9
- *
10
- * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass
11
- * them into the `ModalManager` if this one does not work for their environment.
12
- *
13
- * @export
14
- * @class ModalManagerHostBridge
15
- * @implements {ModalManagerHostBridgeInterface}
16
- */
17
- export class ModalManagerHostBridge {
18
- constructor(modalManager) {
19
- this.windowResizeThrottler = throttle(100, this.updateModalContainerHeight, { noLeading: false, noTrailing: false }).bind(this);
20
- this.modalManager = modalManager;
21
- }
22
- /**
23
- * Handle the mode change
24
- *
25
- * @private
26
- * @memberof ModalManager
27
- */
28
- handleModeChange(mode) {
29
- switch (mode) {
30
- case ModalManagerMode.Open:
31
- this.startResizeListener();
32
- this.stopDocumentScroll();
33
- break;
34
- case ModalManagerMode.Closed:
35
- this.stopResizeListener();
36
- this.resumeDocumentScroll();
37
- break;
38
- }
39
- }
40
- // This is a workaround for Safari. Safari does not update shadowRoot elements calculated
41
- // based on the viewport size (ie. `calc(100vh - 10px)`). It does an initial calculation correctly,
42
- // but resizing the window does not cause the calculation to update. Firefox and Chrome both handle
43
- // this correctly.
44
- // It doesn't matter what css variable you set, it is just forcing Safari to do an update.
45
- // Also note that the value has to change on each update for Safari to do the update,
46
- // ie. you can't just set a static value.
47
- updateModalContainerHeight() {
48
- this.modalManager.style.setProperty('--containerHeight', `${window.innerHeight}px`);
49
- }
50
- stopDocumentScroll() {
51
- document.body.classList.add('modal-manager-open');
52
- }
53
- resumeDocumentScroll() {
54
- document.body.classList.remove('modal-manager-open');
55
- }
56
- startResizeListener() {
57
- window.addEventListener('resize', this.windowResizeThrottler);
58
- }
59
- stopResizeListener() {
60
- window.removeEventListener('resize', this.windowResizeThrottler);
61
- }
62
- }
1
+ import { throttle } from 'throttle-debounce';
2
+ import { ModalManagerMode } from './modal-manager-mode';
3
+ /**
4
+ * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the
5
+ * host that sets up environment-specific changes when the modal opens and closes.
6
+ *
7
+ * For instance, when the modal opens, this adds a class to the `<body>` tag for styling
8
+ * and adds a `resize` listener to fix a Safari shadow root issue.
9
+ *
10
+ * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass
11
+ * them into the `ModalManager` if this one does not work for their environment.
12
+ *
13
+ * @export
14
+ * @class ModalManagerHostBridge
15
+ * @implements {ModalManagerHostBridgeInterface}
16
+ */
17
+ export class ModalManagerHostBridge {
18
+ constructor(modalManager) {
19
+ this.windowResizeThrottler = throttle(100, this.updateModalContainerHeight, { noLeading: false, noTrailing: false }).bind(this);
20
+ this.modalManager = modalManager;
21
+ }
22
+ /**
23
+ * Handle the mode change
24
+ *
25
+ * @private
26
+ * @memberof ModalManager
27
+ */
28
+ handleModeChange(mode) {
29
+ switch (mode) {
30
+ case ModalManagerMode.Open:
31
+ this.startResizeListener();
32
+ this.stopDocumentScroll();
33
+ break;
34
+ case ModalManagerMode.Closed:
35
+ this.stopResizeListener();
36
+ this.resumeDocumentScroll();
37
+ break;
38
+ }
39
+ }
40
+ // This is a workaround for Safari. Safari does not update shadowRoot elements calculated
41
+ // based on the viewport size (ie. `calc(100vh - 10px)`). It does an initial calculation correctly,
42
+ // but resizing the window does not cause the calculation to update. Firefox and Chrome both handle
43
+ // this correctly.
44
+ // It doesn't matter what css variable you set, it is just forcing Safari to do an update.
45
+ // Also note that the value has to change on each update for Safari to do the update,
46
+ // ie. you can't just set a static value.
47
+ updateModalContainerHeight() {
48
+ this.modalManager.style.setProperty('--containerHeight', `${window.innerHeight}px`);
49
+ }
50
+ stopDocumentScroll() {
51
+ document.body.classList.add('modal-manager-open');
52
+ }
53
+ resumeDocumentScroll() {
54
+ document.body.classList.remove('modal-manager-open');
55
+ }
56
+ startResizeListener() {
57
+ window.addEventListener('resize', this.windowResizeThrottler);
58
+ }
59
+ stopResizeListener() {
60
+ window.removeEventListener('resize', this.windowResizeThrottler);
61
+ }
62
+ }
63
63
  //# sourceMappingURL=modal-manager-host-bridge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal-manager-host-bridge.js","sourceRoot":"","sources":["../../src/modal-manager-host-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,sBAAsB;IAGjC,YAAY,YAAmC;QAuBvC,0BAAqB,GAAyB,QAAQ,CAC5D,GAAG,EACH,IAAI,CAAC,0BAA0B,EAC/B,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CACxC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QA1BX,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,IAAsB;QACrC,QAAQ,IAAI,EAAE;YACZ,KAAK,gBAAgB,CAAC,IAAI;gBACxB,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC1B,MAAM;YACR,KAAK,gBAAgB,CAAC,MAAM;gBAC1B,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC1B,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBAC5B,MAAM;SACT;IACH,CAAC;IAQD,yFAAyF;IACzF,mGAAmG;IACnG,mGAAmG;IACnG,kBAAkB;IAClB,0FAA0F;IAC1F,qFAAqF;IACrF,yCAAyC;IACjC,0BAA0B;QAChC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CACjC,mBAAmB,EACnB,GAAG,MAAM,CAAC,WAAW,IAAI,CAC1B,CAAC;IACJ,CAAC;IAEO,kBAAkB;QACxB,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACpD,CAAC;IAEO,oBAAoB;QAC1B,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACvD,CAAC;IAEO,mBAAmB;QACzB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAChE,CAAC;IAEO,kBAAkB;QACxB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,CAAC;CACF","sourcesContent":["import { throttle } from 'throttle-debounce';\n\nimport { ModalManagerHostBridgeInterface } from './modal-manager-host-bridge-interface';\nimport { ModalManagerInterface } from './modal-manager-interface';\nimport { ModalManagerMode } from './modal-manager-mode';\n\n/**\n * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the\n * host that sets up environment-specific changes when the modal opens and closes.\n *\n * For instance, when the modal opens, this adds a class to the `<body>` tag for styling\n * and adds a `resize` listener to fix a Safari shadow root issue.\n *\n * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass\n * them into the `ModalManager` if this one does not work for their environment.\n *\n * @export\n * @class ModalManagerHostBridge\n * @implements {ModalManagerHostBridgeInterface}\n */\nexport class ModalManagerHostBridge implements ModalManagerHostBridgeInterface {\n private modalManager: ModalManagerInterface;\n\n constructor(modalManager: ModalManagerInterface) {\n this.modalManager = modalManager;\n }\n\n /**\n * Handle the mode change\n *\n * @private\n * @memberof ModalManager\n */\n handleModeChange(mode: ModalManagerMode): void {\n switch (mode) {\n case ModalManagerMode.Open:\n this.startResizeListener();\n this.stopDocumentScroll();\n break;\n case ModalManagerMode.Closed:\n this.stopResizeListener();\n this.resumeDocumentScroll();\n break;\n }\n }\n\n private windowResizeThrottler: throttle<() => void> = throttle(\n 100,\n this.updateModalContainerHeight,\n { noLeading: false, noTrailing: false }\n ).bind(this);\n\n // This is a workaround for Safari. Safari does not update shadowRoot elements calculated\n // based on the viewport size (ie. `calc(100vh - 10px)`). It does an initial calculation correctly,\n // but resizing the window does not cause the calculation to update. Firefox and Chrome both handle\n // this correctly.\n // It doesn't matter what css variable you set, it is just forcing Safari to do an update.\n // Also note that the value has to change on each update for Safari to do the update,\n // ie. you can't just set a static value.\n private updateModalContainerHeight(): void {\n this.modalManager.style.setProperty(\n '--containerHeight',\n `${window.innerHeight}px`\n );\n }\n\n private stopDocumentScroll(): void {\n document.body.classList.add('modal-manager-open');\n }\n\n private resumeDocumentScroll(): void {\n document.body.classList.remove('modal-manager-open');\n }\n\n private startResizeListener(): void {\n window.addEventListener('resize', this.windowResizeThrottler);\n }\n\n private stopResizeListener(): void {\n window.removeEventListener('resize', this.windowResizeThrottler);\n }\n}\n"]}
1
+ {"version":3,"file":"modal-manager-host-bridge.js","sourceRoot":"","sources":["../../src/modal-manager-host-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,sBAAsB;IAGjC,YAAY,YAAmC;QAuBvC,0BAAqB,GAAyB,QAAQ,CAC5D,GAAG,EACH,IAAI,CAAC,0BAA0B,EAC/B,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CACxC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QA1BX,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,IAAsB;QACrC,QAAQ,IAAI,EAAE;YACZ,KAAK,gBAAgB,CAAC,IAAI;gBACxB,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC1B,MAAM;YACR,KAAK,gBAAgB,CAAC,MAAM;gBAC1B,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC1B,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBAC5B,MAAM;SACT;IACH,CAAC;IAQD,yFAAyF;IACzF,mGAAmG;IACnG,mGAAmG;IACnG,kBAAkB;IAClB,0FAA0F;IAC1F,qFAAqF;IACrF,yCAAyC;IACjC,0BAA0B;QAChC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CACjC,mBAAmB,EACnB,GAAG,MAAM,CAAC,WAAW,IAAI,CAC1B,CAAC;IACJ,CAAC;IAEO,kBAAkB;QACxB,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACpD,CAAC;IAEO,oBAAoB;QAC1B,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACvD,CAAC;IAEO,mBAAmB;QACzB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAChE,CAAC;IAEO,kBAAkB;QACxB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,CAAC;CACF","sourcesContent":["import { throttle } from 'throttle-debounce';\r\n\r\nimport { ModalManagerHostBridgeInterface } from './modal-manager-host-bridge-interface';\r\nimport { ModalManagerInterface } from './modal-manager-interface';\r\nimport { ModalManagerMode } from './modal-manager-mode';\r\n\r\n/**\r\n * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the\r\n * host that sets up environment-specific changes when the modal opens and closes.\r\n *\r\n * For instance, when the modal opens, this adds a class to the `<body>` tag for styling\r\n * and adds a `resize` listener to fix a Safari shadow root issue.\r\n *\r\n * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass\r\n * them into the `ModalManager` if this one does not work for their environment.\r\n *\r\n * @export\r\n * @class ModalManagerHostBridge\r\n * @implements {ModalManagerHostBridgeInterface}\r\n */\r\nexport class ModalManagerHostBridge implements ModalManagerHostBridgeInterface {\r\n private modalManager: ModalManagerInterface;\r\n\r\n constructor(modalManager: ModalManagerInterface) {\r\n this.modalManager = modalManager;\r\n }\r\n\r\n /**\r\n * Handle the mode change\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n handleModeChange(mode: ModalManagerMode): void {\r\n switch (mode) {\r\n case ModalManagerMode.Open:\r\n this.startResizeListener();\r\n this.stopDocumentScroll();\r\n break;\r\n case ModalManagerMode.Closed:\r\n this.stopResizeListener();\r\n this.resumeDocumentScroll();\r\n break;\r\n }\r\n }\r\n\r\n private windowResizeThrottler: throttle<() => void> = throttle(\r\n 100,\r\n this.updateModalContainerHeight,\r\n { noLeading: false, noTrailing: false }\r\n ).bind(this);\r\n\r\n // This is a workaround for Safari. Safari does not update shadowRoot elements calculated\r\n // based on the viewport size (ie. `calc(100vh - 10px)`). It does an initial calculation correctly,\r\n // but resizing the window does not cause the calculation to update. Firefox and Chrome both handle\r\n // this correctly.\r\n // It doesn't matter what css variable you set, it is just forcing Safari to do an update.\r\n // Also note that the value has to change on each update for Safari to do the update,\r\n // ie. you can't just set a static value.\r\n private updateModalContainerHeight(): void {\r\n this.modalManager.style.setProperty(\r\n '--containerHeight',\r\n `${window.innerHeight}px`\r\n );\r\n }\r\n\r\n private stopDocumentScroll(): void {\r\n document.body.classList.add('modal-manager-open');\r\n }\r\n\r\n private resumeDocumentScroll(): void {\r\n document.body.classList.remove('modal-manager-open');\r\n }\r\n\r\n private startResizeListener(): void {\r\n window.addEventListener('resize', this.windowResizeThrottler);\r\n }\r\n\r\n private stopResizeListener(): void {\r\n window.removeEventListener('resize', this.windowResizeThrottler);\r\n }\r\n}\r\n"]}
@@ -1,25 +1,25 @@
1
- import { LitElement, TemplateResult } from 'lit';
2
- import { ModalConfig } from './modal-config';
3
- import { ModalManagerMode } from './modal-manager-mode';
4
- export interface ModalManagerInterface extends LitElement {
5
- /**
6
- * Get the current modal mode.
7
- */
8
- getMode(): ModalManagerMode;
9
- /**
10
- * Show a modal from a given ModalConfig
11
- *
12
- * @param config ModalConfig
13
- * @param customModalContent TemplateResult | undefined
14
- * @param userClosedModalCallback () => void | undefined an optional callback when the modal is closed
15
- */
16
- showModal(options: {
17
- config: ModalConfig;
18
- customModalContent?: TemplateResult;
19
- userClosedModalCallback?: () => void;
20
- }): Promise<void>;
21
- /**
22
- * Close the currently open modal
23
- */
24
- closeModal(): void;
25
- }
1
+ import { LitElement, TemplateResult } from 'lit';
2
+ import { ModalConfig } from './modal-config';
3
+ import { ModalManagerMode } from './modal-manager-mode';
4
+ export interface ModalManagerInterface extends LitElement {
5
+ /**
6
+ * Get the current modal mode.
7
+ */
8
+ getMode(): ModalManagerMode;
9
+ /**
10
+ * Show a modal from a given ModalConfig
11
+ *
12
+ * @param config ModalConfig
13
+ * @param customModalContent TemplateResult | undefined
14
+ * @param userClosedModalCallback () => void | undefined an optional callback when the modal is closed
15
+ */
16
+ showModal(options: {
17
+ config: ModalConfig;
18
+ customModalContent?: TemplateResult;
19
+ userClosedModalCallback?: () => void;
20
+ }): Promise<void>;
21
+ /**
22
+ * Close the currently open modal
23
+ */
24
+ closeModal(): void;
25
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"modal-manager-interface.js","sourceRoot":"","sources":["../../src/modal-manager-interface.ts"],"names":[],"mappings":"","sourcesContent":["import { LitElement, TemplateResult } from 'lit';\nimport { ModalConfig } from './modal-config';\nimport { ModalManagerMode } from './modal-manager-mode';\n\nexport interface ModalManagerInterface extends LitElement {\n /**\n * Get the current modal mode.\n */\n getMode(): ModalManagerMode;\n\n /**\n * Show a modal from a given ModalConfig\n *\n * @param config ModalConfig\n * @param customModalContent TemplateResult | undefined\n * @param userClosedModalCallback () => void | undefined an optional callback when the modal is closed\n */\n showModal(options: {\n config: ModalConfig;\n customModalContent?: TemplateResult;\n userClosedModalCallback?: () => void;\n }): Promise<void>;\n\n /**\n * Close the currently open modal\n */\n closeModal(): void;\n}\n"]}
1
+ {"version":3,"file":"modal-manager-interface.js","sourceRoot":"","sources":["../../src/modal-manager-interface.ts"],"names":[],"mappings":"","sourcesContent":["import { LitElement, TemplateResult } from 'lit';\r\nimport { ModalConfig } from './modal-config';\r\nimport { ModalManagerMode } from './modal-manager-mode';\r\n\r\nexport interface ModalManagerInterface extends LitElement {\r\n /**\r\n * Get the current modal mode.\r\n */\r\n getMode(): ModalManagerMode;\r\n\r\n /**\r\n * Show a modal from a given ModalConfig\r\n *\r\n * @param config ModalConfig\r\n * @param customModalContent TemplateResult | undefined\r\n * @param userClosedModalCallback () => void | undefined an optional callback when the modal is closed\r\n */\r\n showModal(options: {\r\n config: ModalConfig;\r\n customModalContent?: TemplateResult;\r\n userClosedModalCallback?: () => void;\r\n }): Promise<void>;\r\n\r\n /**\r\n * Close the currently open modal\r\n */\r\n closeModal(): void;\r\n}\r\n"]}
@@ -1,10 +1,10 @@
1
- /**
2
- * Various modes the modal can be in
3
- *
4
- * @export
5
- * @enum {number}
6
- */
7
- export declare enum ModalManagerMode {
8
- Open = "open",
9
- Closed = "closed"
10
- }
1
+ /**
2
+ * Various modes the modal can be in
3
+ *
4
+ * @export
5
+ * @enum {number}
6
+ */
7
+ export declare enum ModalManagerMode {
8
+ Open = "open",
9
+ Closed = "closed"
10
+ }
@@ -1,12 +1,12 @@
1
- /**
2
- * Various modes the modal can be in
3
- *
4
- * @export
5
- * @enum {number}
6
- */
7
- export var ModalManagerMode;
8
- (function (ModalManagerMode) {
9
- ModalManagerMode["Open"] = "open";
10
- ModalManagerMode["Closed"] = "closed";
11
- })(ModalManagerMode || (ModalManagerMode = {}));
1
+ /**
2
+ * Various modes the modal can be in
3
+ *
4
+ * @export
5
+ * @enum {number}
6
+ */
7
+ export var ModalManagerMode;
8
+ (function (ModalManagerMode) {
9
+ ModalManagerMode["Open"] = "open";
10
+ ModalManagerMode["Closed"] = "closed";
11
+ })(ModalManagerMode || (ModalManagerMode = {}));
12
12
  //# sourceMappingURL=modal-manager-mode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal-manager-mode.js","sourceRoot":"","sources":["../../src/modal-manager-mode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B","sourcesContent":["/**\n * Various modes the modal can be in\n *\n * @export\n * @enum {number}\n */\nexport enum ModalManagerMode {\n Open = 'open',\n Closed = 'closed',\n}\n"]}
1
+ {"version":3,"file":"modal-manager-mode.js","sourceRoot":"","sources":["../../src/modal-manager-mode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B","sourcesContent":["/**\r\n * Various modes the modal can be in\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nexport enum ModalManagerMode {\r\n Open = 'open',\r\n Closed = 'closed',\r\n}\r\n"]}