capacitor-extended-dialog 0.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/CapacitorExtendedDialog.podspec +17 -0
- package/Package.swift +28 -0
- package/README.md +190 -0
- package/android/build.gradle +59 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/albermonte/extendeddialog/DialogStyleOptions.java +99 -0
- package/android/src/main/java/com/albermonte/extendeddialog/ExtendedDialog.java +734 -0
- package/android/src/main/java/com/albermonte/extendeddialog/ExtendedDialogPlugin.java +207 -0
- package/android/src/main/java/com/albermonte/extendeddialog/FullScreenDialogFragment.java +589 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/android/src/main/res/values/themes.xml +34 -0
- package/dist/docs.json +384 -0
- package/dist/esm/definitions.d.ts +101 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +14 -0
- package/dist/esm/web.js +193 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +207 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +210 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/ExtendedDialogPlugin/ExtendedDialog.swift +497 -0
- package/ios/Sources/ExtendedDialogPlugin/ExtendedDialogPlugin.swift +177 -0
- package/ios/Sources/ExtendedDialogPlugin/FullScreenDialogViewController.swift +506 -0
- package/ios/Tests/ExtendedDialogPluginTests/ExtendedDialogPluginTests.swift +15 -0
- package/package.json +80 -0
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class ExtendedDialogWeb extends WebPlugin {
|
|
3
|
+
async alert(options) {
|
|
4
|
+
const message = options.title ? `${options.title}\n\n${options.message}` : options.message;
|
|
5
|
+
window.alert(message);
|
|
6
|
+
}
|
|
7
|
+
async confirm(options) {
|
|
8
|
+
const message = options.title ? `${options.title}\n\n${options.message}` : options.message;
|
|
9
|
+
const result = window.confirm(message);
|
|
10
|
+
return { value: result };
|
|
11
|
+
}
|
|
12
|
+
async prompt(options) {
|
|
13
|
+
var _a;
|
|
14
|
+
// Note: focusInput option is ignored on web as window.prompt() handles focus automatically
|
|
15
|
+
// and does not provide programmatic control over keyboard/focus behavior
|
|
16
|
+
const message = options.title ? `${options.title}\n\n${options.message}` : options.message;
|
|
17
|
+
const result = window.prompt(message, (_a = options.inputText) !== null && _a !== void 0 ? _a : '');
|
|
18
|
+
return {
|
|
19
|
+
value: result !== null && result !== void 0 ? result : '',
|
|
20
|
+
cancelled: result === null,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
async singleSelect(options) {
|
|
24
|
+
return new Promise((resolve) => {
|
|
25
|
+
var _a, _b, _c;
|
|
26
|
+
const overlay = this.createOverlay();
|
|
27
|
+
const dialog = this.createDialogContainer(options.title, options.message, options);
|
|
28
|
+
const optionsContainer = document.createElement('div');
|
|
29
|
+
optionsContainer.style.cssText = 'max-height: 300px; overflow-y: auto; margin: 16px 0;';
|
|
30
|
+
let selectedValue = (_a = options.selectedValue) !== null && _a !== void 0 ? _a : null;
|
|
31
|
+
options.options.forEach((option) => {
|
|
32
|
+
const label = document.createElement('label');
|
|
33
|
+
label.style.cssText =
|
|
34
|
+
'display: flex; align-items: center; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #e0e0e0;';
|
|
35
|
+
const radio = document.createElement('input');
|
|
36
|
+
radio.type = 'radio';
|
|
37
|
+
radio.name = 'singleSelect';
|
|
38
|
+
radio.value = option.value;
|
|
39
|
+
radio.checked = option.value === selectedValue;
|
|
40
|
+
radio.style.cssText = 'margin-right: 12px; width: 20px; height: 20px;';
|
|
41
|
+
radio.addEventListener('change', () => {
|
|
42
|
+
selectedValue = option.value;
|
|
43
|
+
});
|
|
44
|
+
const text = document.createElement('span');
|
|
45
|
+
text.textContent = option.label;
|
|
46
|
+
text.style.cssText = 'font-size: 16px;';
|
|
47
|
+
label.appendChild(radio);
|
|
48
|
+
label.appendChild(text);
|
|
49
|
+
optionsContainer.appendChild(label);
|
|
50
|
+
});
|
|
51
|
+
dialog.appendChild(optionsContainer);
|
|
52
|
+
const buttonContainer = this.createButtonContainer();
|
|
53
|
+
const cancelButton = this.createButton((_b = options.cancelButtonTitle) !== null && _b !== void 0 ? _b : 'Cancel', false, () => {
|
|
54
|
+
this.removeOverlay(overlay);
|
|
55
|
+
resolve({ value: null, cancelled: true });
|
|
56
|
+
}, options);
|
|
57
|
+
const okButton = this.createButton((_c = options.okButtonTitle) !== null && _c !== void 0 ? _c : 'OK', true, () => {
|
|
58
|
+
this.removeOverlay(overlay);
|
|
59
|
+
resolve({ value: selectedValue, cancelled: false });
|
|
60
|
+
}, options);
|
|
61
|
+
buttonContainer.appendChild(cancelButton);
|
|
62
|
+
buttonContainer.appendChild(okButton);
|
|
63
|
+
dialog.appendChild(buttonContainer);
|
|
64
|
+
overlay.appendChild(dialog);
|
|
65
|
+
document.body.appendChild(overlay);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async multiSelect(options) {
|
|
69
|
+
return new Promise((resolve) => {
|
|
70
|
+
var _a, _b, _c;
|
|
71
|
+
const overlay = this.createOverlay();
|
|
72
|
+
const dialog = this.createDialogContainer(options.title, options.message, options);
|
|
73
|
+
const optionsContainer = document.createElement('div');
|
|
74
|
+
optionsContainer.style.cssText = 'max-height: 300px; overflow-y: auto; margin: 16px 0;';
|
|
75
|
+
const selectedValues = new Set((_a = options.selectedValues) !== null && _a !== void 0 ? _a : []);
|
|
76
|
+
options.options.forEach((option) => {
|
|
77
|
+
const label = document.createElement('label');
|
|
78
|
+
label.style.cssText =
|
|
79
|
+
'display: flex; align-items: center; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #e0e0e0;';
|
|
80
|
+
const checkbox = document.createElement('input');
|
|
81
|
+
checkbox.type = 'checkbox';
|
|
82
|
+
checkbox.value = option.value;
|
|
83
|
+
checkbox.checked = selectedValues.has(option.value);
|
|
84
|
+
checkbox.style.cssText = 'margin-right: 12px; width: 20px; height: 20px;';
|
|
85
|
+
checkbox.addEventListener('change', () => {
|
|
86
|
+
if (checkbox.checked) {
|
|
87
|
+
selectedValues.add(option.value);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
selectedValues.delete(option.value);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const text = document.createElement('span');
|
|
94
|
+
text.textContent = option.label;
|
|
95
|
+
text.style.cssText = 'font-size: 16px;';
|
|
96
|
+
label.appendChild(checkbox);
|
|
97
|
+
label.appendChild(text);
|
|
98
|
+
optionsContainer.appendChild(label);
|
|
99
|
+
});
|
|
100
|
+
dialog.appendChild(optionsContainer);
|
|
101
|
+
const buttonContainer = this.createButtonContainer();
|
|
102
|
+
const cancelButton = this.createButton((_b = options.cancelButtonTitle) !== null && _b !== void 0 ? _b : 'Cancel', false, () => {
|
|
103
|
+
this.removeOverlay(overlay);
|
|
104
|
+
resolve({ values: [], cancelled: true });
|
|
105
|
+
}, options);
|
|
106
|
+
const okButton = this.createButton((_c = options.okButtonTitle) !== null && _c !== void 0 ? _c : 'OK', true, () => {
|
|
107
|
+
this.removeOverlay(overlay);
|
|
108
|
+
resolve({ values: Array.from(selectedValues), cancelled: false });
|
|
109
|
+
}, options);
|
|
110
|
+
buttonContainer.appendChild(cancelButton);
|
|
111
|
+
buttonContainer.appendChild(okButton);
|
|
112
|
+
dialog.appendChild(buttonContainer);
|
|
113
|
+
overlay.appendChild(dialog);
|
|
114
|
+
document.body.appendChild(overlay);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
createOverlay() {
|
|
118
|
+
const overlay = document.createElement('div');
|
|
119
|
+
overlay.style.cssText = `
|
|
120
|
+
position: fixed;
|
|
121
|
+
top: 0;
|
|
122
|
+
left: 0;
|
|
123
|
+
right: 0;
|
|
124
|
+
bottom: 0;
|
|
125
|
+
background: rgba(0, 0, 0, 0.5);
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
z-index: 999999;
|
|
130
|
+
`;
|
|
131
|
+
return overlay;
|
|
132
|
+
}
|
|
133
|
+
createDialogContainer(title, message, styleOptions) {
|
|
134
|
+
var _a, _b, _c, _d, _e;
|
|
135
|
+
const dialog = document.createElement('div');
|
|
136
|
+
const bgColor = (_a = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.backgroundColor) !== null && _a !== void 0 ? _a : 'white';
|
|
137
|
+
dialog.style.cssText = `
|
|
138
|
+
background: ${bgColor};
|
|
139
|
+
border-radius: 16px;
|
|
140
|
+
padding: 24px;
|
|
141
|
+
min-width: 300px;
|
|
142
|
+
max-width: 400px;
|
|
143
|
+
max-height: 80vh;
|
|
144
|
+
overflow-y: auto;
|
|
145
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
|
|
146
|
+
`;
|
|
147
|
+
if (title) {
|
|
148
|
+
const titleEl = document.createElement('h2');
|
|
149
|
+
titleEl.textContent = title;
|
|
150
|
+
const titleFontSize = (_b = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.titleFontSize) !== null && _b !== void 0 ? _b : 20;
|
|
151
|
+
const titleColor = (_c = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.titleColor) !== null && _c !== void 0 ? _c : 'inherit';
|
|
152
|
+
titleEl.style.cssText = `margin: 0 0 8px 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor};`;
|
|
153
|
+
dialog.appendChild(titleEl);
|
|
154
|
+
}
|
|
155
|
+
if (message) {
|
|
156
|
+
const messageEl = document.createElement('p');
|
|
157
|
+
messageEl.textContent = message;
|
|
158
|
+
const messageFontSize = (_d = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.messageFontSize) !== null && _d !== void 0 ? _d : 14;
|
|
159
|
+
const messageColor = (_e = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.messageColor) !== null && _e !== void 0 ? _e : '#666';
|
|
160
|
+
messageEl.style.cssText = `margin: 0; font-size: ${messageFontSize}px; color: ${messageColor};`;
|
|
161
|
+
dialog.appendChild(messageEl);
|
|
162
|
+
}
|
|
163
|
+
return dialog;
|
|
164
|
+
}
|
|
165
|
+
createButtonContainer() {
|
|
166
|
+
const container = document.createElement('div');
|
|
167
|
+
container.style.cssText = 'display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px;';
|
|
168
|
+
return container;
|
|
169
|
+
}
|
|
170
|
+
createButton(text, primary, onClick, styleOptions) {
|
|
171
|
+
var _a, _b, _c;
|
|
172
|
+
const button = document.createElement('button');
|
|
173
|
+
button.textContent = text;
|
|
174
|
+
const fontSize = (_a = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.buttonFontSize) !== null && _a !== void 0 ? _a : 14;
|
|
175
|
+
const primaryColor = (_b = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.buttonColor) !== null && _b !== void 0 ? _b : '#6750A4';
|
|
176
|
+
const cancelColor = (_c = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.cancelButtonColor) !== null && _c !== void 0 ? _c : '#6750A4';
|
|
177
|
+
button.style.cssText = `
|
|
178
|
+
padding: 10px 24px;
|
|
179
|
+
border-radius: 8px;
|
|
180
|
+
font-size: ${fontSize}px;
|
|
181
|
+
font-weight: 500;
|
|
182
|
+
cursor: pointer;
|
|
183
|
+
border: none;
|
|
184
|
+
${primary ? `background: ${primaryColor}; color: white;` : `background: transparent; color: ${cancelColor};`}
|
|
185
|
+
`;
|
|
186
|
+
button.addEventListener('click', onClick);
|
|
187
|
+
return button;
|
|
188
|
+
}
|
|
189
|
+
removeOverlay(overlay) {
|
|
190
|
+
overlay.remove();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|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AAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n ExtendedDialogPlugin,\n AlertOptions,\n ConfirmOptions,\n ConfirmResult,\n PromptOptions,\n PromptResult,\n SingleSelectOptions,\n SingleSelectResult,\n MultiSelectOptions,\n MultiSelectResult,\n DialogStyleOptions,\n} from './definitions';\n\nexport class ExtendedDialogWeb extends WebPlugin implements ExtendedDialogPlugin {\n async alert(options: AlertOptions): Promise<void> {\n const message = options.title ? `${options.title}\\n\\n${options.message}` : options.message;\n window.alert(message);\n }\n\n async confirm(options: ConfirmOptions): Promise<ConfirmResult> {\n const message = options.title ? `${options.title}\\n\\n${options.message}` : options.message;\n const result = window.confirm(message);\n return { value: result };\n }\n\n async prompt(options: PromptOptions): Promise<PromptResult> {\n // Note: focusInput option is ignored on web as window.prompt() handles focus automatically\n // and does not provide programmatic control over keyboard/focus behavior\n const message = options.title ? `${options.title}\\n\\n${options.message}` : options.message;\n const result = window.prompt(message, options.inputText ?? '');\n return {\n value: result ?? '',\n cancelled: result === null,\n };\n }\n\n async singleSelect(options: SingleSelectOptions): Promise<SingleSelectResult> {\n return new Promise((resolve) => {\n const overlay = this.createOverlay();\n const dialog = this.createDialogContainer(options.title, options.message, options);\n\n const optionsContainer = document.createElement('div');\n optionsContainer.style.cssText = 'max-height: 300px; overflow-y: auto; margin: 16px 0;';\n\n let selectedValue = options.selectedValue ?? null;\n\n options.options.forEach((option) => {\n const label = document.createElement('label');\n label.style.cssText =\n 'display: flex; align-items: center; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #e0e0e0;';\n\n const radio = document.createElement('input');\n radio.type = 'radio';\n radio.name = 'singleSelect';\n radio.value = option.value;\n radio.checked = option.value === selectedValue;\n radio.style.cssText = 'margin-right: 12px; width: 20px; height: 20px;';\n radio.addEventListener('change', () => {\n selectedValue = option.value;\n });\n\n const text = document.createElement('span');\n text.textContent = option.label;\n text.style.cssText = 'font-size: 16px;';\n\n label.appendChild(radio);\n label.appendChild(text);\n optionsContainer.appendChild(label);\n });\n\n dialog.appendChild(optionsContainer);\n\n const buttonContainer = this.createButtonContainer();\n\n const cancelButton = this.createButton(\n options.cancelButtonTitle ?? 'Cancel',\n false,\n () => {\n this.removeOverlay(overlay);\n resolve({ value: null, cancelled: true });\n },\n options,\n );\n\n const okButton = this.createButton(\n options.okButtonTitle ?? 'OK',\n true,\n () => {\n this.removeOverlay(overlay);\n resolve({ value: selectedValue, cancelled: false });\n },\n options,\n );\n\n buttonContainer.appendChild(cancelButton);\n buttonContainer.appendChild(okButton);\n dialog.appendChild(buttonContainer);\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n\n async multiSelect(options: MultiSelectOptions): Promise<MultiSelectResult> {\n return new Promise((resolve) => {\n const overlay = this.createOverlay();\n const dialog = this.createDialogContainer(options.title, options.message, options);\n\n const optionsContainer = document.createElement('div');\n optionsContainer.style.cssText = 'max-height: 300px; overflow-y: auto; margin: 16px 0;';\n\n const selectedValues = new Set(options.selectedValues ?? []);\n\n options.options.forEach((option) => {\n const label = document.createElement('label');\n label.style.cssText =\n 'display: flex; align-items: center; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #e0e0e0;';\n\n const checkbox = document.createElement('input');\n checkbox.type = 'checkbox';\n checkbox.value = option.value;\n checkbox.checked = selectedValues.has(option.value);\n checkbox.style.cssText = 'margin-right: 12px; width: 20px; height: 20px;';\n checkbox.addEventListener('change', () => {\n if (checkbox.checked) {\n selectedValues.add(option.value);\n } else {\n selectedValues.delete(option.value);\n }\n });\n\n const text = document.createElement('span');\n text.textContent = option.label;\n text.style.cssText = 'font-size: 16px;';\n\n label.appendChild(checkbox);\n label.appendChild(text);\n optionsContainer.appendChild(label);\n });\n\n dialog.appendChild(optionsContainer);\n\n const buttonContainer = this.createButtonContainer();\n\n const cancelButton = this.createButton(\n options.cancelButtonTitle ?? 'Cancel',\n false,\n () => {\n this.removeOverlay(overlay);\n resolve({ values: [], cancelled: true });\n },\n options,\n );\n\n const okButton = this.createButton(\n options.okButtonTitle ?? 'OK',\n true,\n () => {\n this.removeOverlay(overlay);\n resolve({ values: Array.from(selectedValues), cancelled: false });\n },\n options,\n );\n\n buttonContainer.appendChild(cancelButton);\n buttonContainer.appendChild(okButton);\n dialog.appendChild(buttonContainer);\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n\n private createOverlay(): HTMLDivElement {\n const overlay = document.createElement('div');\n overlay.style.cssText = `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 999999;\n `;\n return overlay;\n }\n\n private createDialogContainer(title?: string, message?: string, styleOptions?: DialogStyleOptions): HTMLDivElement {\n const dialog = document.createElement('div');\n const bgColor = styleOptions?.backgroundColor ?? 'white';\n dialog.style.cssText = `\n background: ${bgColor};\n border-radius: 16px;\n padding: 24px;\n min-width: 300px;\n max-width: 400px;\n max-height: 80vh;\n overflow-y: auto;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);\n `;\n\n if (title) {\n const titleEl = document.createElement('h2');\n titleEl.textContent = title;\n const titleFontSize = styleOptions?.titleFontSize ?? 20;\n const titleColor = styleOptions?.titleColor ?? 'inherit';\n titleEl.style.cssText = `margin: 0 0 8px 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor};`;\n dialog.appendChild(titleEl);\n }\n\n if (message) {\n const messageEl = document.createElement('p');\n messageEl.textContent = message;\n const messageFontSize = styleOptions?.messageFontSize ?? 14;\n const messageColor = styleOptions?.messageColor ?? '#666';\n messageEl.style.cssText = `margin: 0; font-size: ${messageFontSize}px; color: ${messageColor};`;\n dialog.appendChild(messageEl);\n }\n\n return dialog;\n }\n\n private createButtonContainer(): HTMLDivElement {\n const container = document.createElement('div');\n container.style.cssText = 'display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px;';\n return container;\n }\n\n private createButton(\n text: string,\n primary: boolean,\n onClick: () => void,\n styleOptions?: DialogStyleOptions,\n ): HTMLButtonElement {\n const button = document.createElement('button');\n button.textContent = text;\n const fontSize = styleOptions?.buttonFontSize ?? 14;\n const primaryColor = styleOptions?.buttonColor ?? '#6750A4';\n const cancelColor = styleOptions?.cancelButtonColor ?? '#6750A4';\n button.style.cssText = `\n padding: 10px 24px;\n border-radius: 8px;\n font-size: ${fontSize}px;\n font-weight: 500;\n cursor: pointer;\n border: none;\n ${primary ? `background: ${primaryColor}; color: white;` : `background: transparent; color: ${cancelColor};`}\n `;\n button.addEventListener('click', onClick);\n return button;\n }\n\n private removeOverlay(overlay: HTMLDivElement): void {\n overlay.remove();\n }\n}\n"]}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
|
|
5
|
+
const ExtendedDialog = core.registerPlugin('ExtendedDialog', {
|
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ExtendedDialogWeb()),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
class ExtendedDialogWeb extends core.WebPlugin {
|
|
10
|
+
async alert(options) {
|
|
11
|
+
const message = options.title ? `${options.title}\n\n${options.message}` : options.message;
|
|
12
|
+
window.alert(message);
|
|
13
|
+
}
|
|
14
|
+
async confirm(options) {
|
|
15
|
+
const message = options.title ? `${options.title}\n\n${options.message}` : options.message;
|
|
16
|
+
const result = window.confirm(message);
|
|
17
|
+
return { value: result };
|
|
18
|
+
}
|
|
19
|
+
async prompt(options) {
|
|
20
|
+
var _a;
|
|
21
|
+
// Note: focusInput option is ignored on web as window.prompt() handles focus automatically
|
|
22
|
+
// and does not provide programmatic control over keyboard/focus behavior
|
|
23
|
+
const message = options.title ? `${options.title}\n\n${options.message}` : options.message;
|
|
24
|
+
const result = window.prompt(message, (_a = options.inputText) !== null && _a !== void 0 ? _a : '');
|
|
25
|
+
return {
|
|
26
|
+
value: result !== null && result !== void 0 ? result : '',
|
|
27
|
+
cancelled: result === null,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
async singleSelect(options) {
|
|
31
|
+
return new Promise((resolve) => {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
const overlay = this.createOverlay();
|
|
34
|
+
const dialog = this.createDialogContainer(options.title, options.message, options);
|
|
35
|
+
const optionsContainer = document.createElement('div');
|
|
36
|
+
optionsContainer.style.cssText = 'max-height: 300px; overflow-y: auto; margin: 16px 0;';
|
|
37
|
+
let selectedValue = (_a = options.selectedValue) !== null && _a !== void 0 ? _a : null;
|
|
38
|
+
options.options.forEach((option) => {
|
|
39
|
+
const label = document.createElement('label');
|
|
40
|
+
label.style.cssText =
|
|
41
|
+
'display: flex; align-items: center; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #e0e0e0;';
|
|
42
|
+
const radio = document.createElement('input');
|
|
43
|
+
radio.type = 'radio';
|
|
44
|
+
radio.name = 'singleSelect';
|
|
45
|
+
radio.value = option.value;
|
|
46
|
+
radio.checked = option.value === selectedValue;
|
|
47
|
+
radio.style.cssText = 'margin-right: 12px; width: 20px; height: 20px;';
|
|
48
|
+
radio.addEventListener('change', () => {
|
|
49
|
+
selectedValue = option.value;
|
|
50
|
+
});
|
|
51
|
+
const text = document.createElement('span');
|
|
52
|
+
text.textContent = option.label;
|
|
53
|
+
text.style.cssText = 'font-size: 16px;';
|
|
54
|
+
label.appendChild(radio);
|
|
55
|
+
label.appendChild(text);
|
|
56
|
+
optionsContainer.appendChild(label);
|
|
57
|
+
});
|
|
58
|
+
dialog.appendChild(optionsContainer);
|
|
59
|
+
const buttonContainer = this.createButtonContainer();
|
|
60
|
+
const cancelButton = this.createButton((_b = options.cancelButtonTitle) !== null && _b !== void 0 ? _b : 'Cancel', false, () => {
|
|
61
|
+
this.removeOverlay(overlay);
|
|
62
|
+
resolve({ value: null, cancelled: true });
|
|
63
|
+
}, options);
|
|
64
|
+
const okButton = this.createButton((_c = options.okButtonTitle) !== null && _c !== void 0 ? _c : 'OK', true, () => {
|
|
65
|
+
this.removeOverlay(overlay);
|
|
66
|
+
resolve({ value: selectedValue, cancelled: false });
|
|
67
|
+
}, options);
|
|
68
|
+
buttonContainer.appendChild(cancelButton);
|
|
69
|
+
buttonContainer.appendChild(okButton);
|
|
70
|
+
dialog.appendChild(buttonContainer);
|
|
71
|
+
overlay.appendChild(dialog);
|
|
72
|
+
document.body.appendChild(overlay);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
async multiSelect(options) {
|
|
76
|
+
return new Promise((resolve) => {
|
|
77
|
+
var _a, _b, _c;
|
|
78
|
+
const overlay = this.createOverlay();
|
|
79
|
+
const dialog = this.createDialogContainer(options.title, options.message, options);
|
|
80
|
+
const optionsContainer = document.createElement('div');
|
|
81
|
+
optionsContainer.style.cssText = 'max-height: 300px; overflow-y: auto; margin: 16px 0;';
|
|
82
|
+
const selectedValues = new Set((_a = options.selectedValues) !== null && _a !== void 0 ? _a : []);
|
|
83
|
+
options.options.forEach((option) => {
|
|
84
|
+
const label = document.createElement('label');
|
|
85
|
+
label.style.cssText =
|
|
86
|
+
'display: flex; align-items: center; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #e0e0e0;';
|
|
87
|
+
const checkbox = document.createElement('input');
|
|
88
|
+
checkbox.type = 'checkbox';
|
|
89
|
+
checkbox.value = option.value;
|
|
90
|
+
checkbox.checked = selectedValues.has(option.value);
|
|
91
|
+
checkbox.style.cssText = 'margin-right: 12px; width: 20px; height: 20px;';
|
|
92
|
+
checkbox.addEventListener('change', () => {
|
|
93
|
+
if (checkbox.checked) {
|
|
94
|
+
selectedValues.add(option.value);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
selectedValues.delete(option.value);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const text = document.createElement('span');
|
|
101
|
+
text.textContent = option.label;
|
|
102
|
+
text.style.cssText = 'font-size: 16px;';
|
|
103
|
+
label.appendChild(checkbox);
|
|
104
|
+
label.appendChild(text);
|
|
105
|
+
optionsContainer.appendChild(label);
|
|
106
|
+
});
|
|
107
|
+
dialog.appendChild(optionsContainer);
|
|
108
|
+
const buttonContainer = this.createButtonContainer();
|
|
109
|
+
const cancelButton = this.createButton((_b = options.cancelButtonTitle) !== null && _b !== void 0 ? _b : 'Cancel', false, () => {
|
|
110
|
+
this.removeOverlay(overlay);
|
|
111
|
+
resolve({ values: [], cancelled: true });
|
|
112
|
+
}, options);
|
|
113
|
+
const okButton = this.createButton((_c = options.okButtonTitle) !== null && _c !== void 0 ? _c : 'OK', true, () => {
|
|
114
|
+
this.removeOverlay(overlay);
|
|
115
|
+
resolve({ values: Array.from(selectedValues), cancelled: false });
|
|
116
|
+
}, options);
|
|
117
|
+
buttonContainer.appendChild(cancelButton);
|
|
118
|
+
buttonContainer.appendChild(okButton);
|
|
119
|
+
dialog.appendChild(buttonContainer);
|
|
120
|
+
overlay.appendChild(dialog);
|
|
121
|
+
document.body.appendChild(overlay);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
createOverlay() {
|
|
125
|
+
const overlay = document.createElement('div');
|
|
126
|
+
overlay.style.cssText = `
|
|
127
|
+
position: fixed;
|
|
128
|
+
top: 0;
|
|
129
|
+
left: 0;
|
|
130
|
+
right: 0;
|
|
131
|
+
bottom: 0;
|
|
132
|
+
background: rgba(0, 0, 0, 0.5);
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
z-index: 999999;
|
|
137
|
+
`;
|
|
138
|
+
return overlay;
|
|
139
|
+
}
|
|
140
|
+
createDialogContainer(title, message, styleOptions) {
|
|
141
|
+
var _a, _b, _c, _d, _e;
|
|
142
|
+
const dialog = document.createElement('div');
|
|
143
|
+
const bgColor = (_a = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.backgroundColor) !== null && _a !== void 0 ? _a : 'white';
|
|
144
|
+
dialog.style.cssText = `
|
|
145
|
+
background: ${bgColor};
|
|
146
|
+
border-radius: 16px;
|
|
147
|
+
padding: 24px;
|
|
148
|
+
min-width: 300px;
|
|
149
|
+
max-width: 400px;
|
|
150
|
+
max-height: 80vh;
|
|
151
|
+
overflow-y: auto;
|
|
152
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
|
|
153
|
+
`;
|
|
154
|
+
if (title) {
|
|
155
|
+
const titleEl = document.createElement('h2');
|
|
156
|
+
titleEl.textContent = title;
|
|
157
|
+
const titleFontSize = (_b = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.titleFontSize) !== null && _b !== void 0 ? _b : 20;
|
|
158
|
+
const titleColor = (_c = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.titleColor) !== null && _c !== void 0 ? _c : 'inherit';
|
|
159
|
+
titleEl.style.cssText = `margin: 0 0 8px 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor};`;
|
|
160
|
+
dialog.appendChild(titleEl);
|
|
161
|
+
}
|
|
162
|
+
if (message) {
|
|
163
|
+
const messageEl = document.createElement('p');
|
|
164
|
+
messageEl.textContent = message;
|
|
165
|
+
const messageFontSize = (_d = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.messageFontSize) !== null && _d !== void 0 ? _d : 14;
|
|
166
|
+
const messageColor = (_e = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.messageColor) !== null && _e !== void 0 ? _e : '#666';
|
|
167
|
+
messageEl.style.cssText = `margin: 0; font-size: ${messageFontSize}px; color: ${messageColor};`;
|
|
168
|
+
dialog.appendChild(messageEl);
|
|
169
|
+
}
|
|
170
|
+
return dialog;
|
|
171
|
+
}
|
|
172
|
+
createButtonContainer() {
|
|
173
|
+
const container = document.createElement('div');
|
|
174
|
+
container.style.cssText = 'display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px;';
|
|
175
|
+
return container;
|
|
176
|
+
}
|
|
177
|
+
createButton(text, primary, onClick, styleOptions) {
|
|
178
|
+
var _a, _b, _c;
|
|
179
|
+
const button = document.createElement('button');
|
|
180
|
+
button.textContent = text;
|
|
181
|
+
const fontSize = (_a = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.buttonFontSize) !== null && _a !== void 0 ? _a : 14;
|
|
182
|
+
const primaryColor = (_b = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.buttonColor) !== null && _b !== void 0 ? _b : '#6750A4';
|
|
183
|
+
const cancelColor = (_c = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.cancelButtonColor) !== null && _c !== void 0 ? _c : '#6750A4';
|
|
184
|
+
button.style.cssText = `
|
|
185
|
+
padding: 10px 24px;
|
|
186
|
+
border-radius: 8px;
|
|
187
|
+
font-size: ${fontSize}px;
|
|
188
|
+
font-weight: 500;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
border: none;
|
|
191
|
+
${primary ? `background: ${primaryColor}; color: white;` : `background: transparent; color: ${cancelColor};`}
|
|
192
|
+
`;
|
|
193
|
+
button.addEventListener('click', onClick);
|
|
194
|
+
return button;
|
|
195
|
+
}
|
|
196
|
+
removeOverlay(overlay) {
|
|
197
|
+
overlay.remove();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
202
|
+
__proto__: null,
|
|
203
|
+
ExtendedDialogWeb: ExtendedDialogWeb
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
exports.ExtendedDialog = ExtendedDialog;
|
|
207
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst ExtendedDialog = registerPlugin('ExtendedDialog', {\n web: () => import('./web').then((m) => new m.ExtendedDialogWeb()),\n});\nexport * from './definitions';\nexport { ExtendedDialog };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ExtendedDialogWeb extends WebPlugin {\n async alert(options) {\n const message = options.title ? `${options.title}\\n\\n${options.message}` : options.message;\n window.alert(message);\n }\n async confirm(options) {\n const message = options.title ? `${options.title}\\n\\n${options.message}` : options.message;\n const result = window.confirm(message);\n return { value: result };\n }\n async prompt(options) {\n var _a;\n // Note: focusInput option is ignored on web as window.prompt() handles focus automatically\n // and does not provide programmatic control over keyboard/focus behavior\n const message = options.title ? `${options.title}\\n\\n${options.message}` : options.message;\n const result = window.prompt(message, (_a = options.inputText) !== null && _a !== void 0 ? _a : '');\n return {\n value: result !== null && result !== void 0 ? result : '',\n cancelled: result === null,\n };\n }\n async singleSelect(options) {\n return new Promise((resolve) => {\n var _a, _b, _c;\n const overlay = this.createOverlay();\n const dialog = this.createDialogContainer(options.title, options.message, options);\n const optionsContainer = document.createElement('div');\n optionsContainer.style.cssText = 'max-height: 300px; overflow-y: auto; margin: 16px 0;';\n let selectedValue = (_a = options.selectedValue) !== null && _a !== void 0 ? _a : null;\n options.options.forEach((option) => {\n const label = document.createElement('label');\n label.style.cssText =\n 'display: flex; align-items: center; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #e0e0e0;';\n const radio = document.createElement('input');\n radio.type = 'radio';\n radio.name = 'singleSelect';\n radio.value = option.value;\n radio.checked = option.value === selectedValue;\n radio.style.cssText = 'margin-right: 12px; width: 20px; height: 20px;';\n radio.addEventListener('change', () => {\n selectedValue = option.value;\n });\n const text = document.createElement('span');\n text.textContent = option.label;\n text.style.cssText = 'font-size: 16px;';\n label.appendChild(radio);\n label.appendChild(text);\n optionsContainer.appendChild(label);\n });\n dialog.appendChild(optionsContainer);\n const buttonContainer = this.createButtonContainer();\n const cancelButton = this.createButton((_b = options.cancelButtonTitle) !== null && _b !== void 0 ? _b : 'Cancel', false, () => {\n this.removeOverlay(overlay);\n resolve({ value: null, cancelled: true });\n }, options);\n const okButton = this.createButton((_c = options.okButtonTitle) !== null && _c !== void 0 ? _c : 'OK', true, () => {\n this.removeOverlay(overlay);\n resolve({ value: selectedValue, cancelled: false });\n }, options);\n buttonContainer.appendChild(cancelButton);\n buttonContainer.appendChild(okButton);\n dialog.appendChild(buttonContainer);\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n async multiSelect(options) {\n return new Promise((resolve) => {\n var _a, _b, _c;\n const overlay = this.createOverlay();\n const dialog = this.createDialogContainer(options.title, options.message, options);\n const optionsContainer = document.createElement('div');\n optionsContainer.style.cssText = 'max-height: 300px; overflow-y: auto; margin: 16px 0;';\n const selectedValues = new Set((_a = options.selectedValues) !== null && _a !== void 0 ? _a : []);\n options.options.forEach((option) => {\n const label = document.createElement('label');\n label.style.cssText =\n 'display: flex; align-items: center; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #e0e0e0;';\n const checkbox = document.createElement('input');\n checkbox.type = 'checkbox';\n checkbox.value = option.value;\n checkbox.checked = selectedValues.has(option.value);\n checkbox.style.cssText = 'margin-right: 12px; width: 20px; height: 20px;';\n checkbox.addEventListener('change', () => {\n if (checkbox.checked) {\n selectedValues.add(option.value);\n }\n else {\n selectedValues.delete(option.value);\n }\n });\n const text = document.createElement('span');\n text.textContent = option.label;\n text.style.cssText = 'font-size: 16px;';\n label.appendChild(checkbox);\n label.appendChild(text);\n optionsContainer.appendChild(label);\n });\n dialog.appendChild(optionsContainer);\n const buttonContainer = this.createButtonContainer();\n const cancelButton = this.createButton((_b = options.cancelButtonTitle) !== null && _b !== void 0 ? _b : 'Cancel', false, () => {\n this.removeOverlay(overlay);\n resolve({ values: [], cancelled: true });\n }, options);\n const okButton = this.createButton((_c = options.okButtonTitle) !== null && _c !== void 0 ? _c : 'OK', true, () => {\n this.removeOverlay(overlay);\n resolve({ values: Array.from(selectedValues), cancelled: false });\n }, options);\n buttonContainer.appendChild(cancelButton);\n buttonContainer.appendChild(okButton);\n dialog.appendChild(buttonContainer);\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n createOverlay() {\n const overlay = document.createElement('div');\n overlay.style.cssText = `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 999999;\n `;\n return overlay;\n }\n createDialogContainer(title, message, styleOptions) {\n var _a, _b, _c, _d, _e;\n const dialog = document.createElement('div');\n const bgColor = (_a = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.backgroundColor) !== null && _a !== void 0 ? _a : 'white';\n dialog.style.cssText = `\n background: ${bgColor};\n border-radius: 16px;\n padding: 24px;\n min-width: 300px;\n max-width: 400px;\n max-height: 80vh;\n overflow-y: auto;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);\n `;\n if (title) {\n const titleEl = document.createElement('h2');\n titleEl.textContent = title;\n const titleFontSize = (_b = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.titleFontSize) !== null && _b !== void 0 ? _b : 20;\n const titleColor = (_c = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.titleColor) !== null && _c !== void 0 ? _c : 'inherit';\n titleEl.style.cssText = `margin: 0 0 8px 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor};`;\n dialog.appendChild(titleEl);\n }\n if (message) {\n const messageEl = document.createElement('p');\n messageEl.textContent = message;\n const messageFontSize = (_d = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.messageFontSize) !== null && _d !== void 0 ? _d : 14;\n const messageColor = (_e = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.messageColor) !== null && _e !== void 0 ? _e : '#666';\n messageEl.style.cssText = `margin: 0; font-size: ${messageFontSize}px; color: ${messageColor};`;\n dialog.appendChild(messageEl);\n }\n return dialog;\n }\n createButtonContainer() {\n const container = document.createElement('div');\n container.style.cssText = 'display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px;';\n return container;\n }\n createButton(text, primary, onClick, styleOptions) {\n var _a, _b, _c;\n const button = document.createElement('button');\n button.textContent = text;\n const fontSize = (_a = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.buttonFontSize) !== null && _a !== void 0 ? _a : 14;\n const primaryColor = (_b = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.buttonColor) !== null && _b !== void 0 ? _b : '#6750A4';\n const cancelColor = (_c = styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.cancelButtonColor) !== null && _c !== void 0 ? _c : '#6750A4';\n button.style.cssText = `\n padding: 10px 24px;\n border-radius: 8px;\n font-size: ${fontSize}px;\n font-weight: 500;\n cursor: pointer;\n border: none;\n ${primary ? `background: ${primaryColor}; color: white;` : `background: transparent; color: ${cancelColor};`}\n `;\n button.addEventListener('click', onClick);\n return button;\n }\n removeOverlay(overlay) {\n overlay.remove();\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;AACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACrE,CAAC;;ACFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;AACjD,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE;AACzB,QAAQ,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO;AAClG,QAAQ,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;AAC7B,IAAI;AACJ,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE;AAC3B,QAAQ,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO;AAClG,QAAQ,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAA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