capacitor-extended-dialog 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +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,KAA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,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,SAAS;AACxK,QAAQ,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG;AAC/B;AACA;AACA,iBAAiB,EAAE,QAAQ,CAAC;AAC5B;AACA;AACA;AACA,MAAM,EAAE,OAAO,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,eAAe,CAAC,GAAG,CAAC,gCAAgC,EAAE,WAAW,CAAC,CAAC,CAAC;AAClH,IAAI,CAAC;AACL,QAAQ,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC;AACjD,QAAQ,OAAO,MAAM;AACrB,IAAI;AACJ,IAAI,aAAa,CAAC,OAAO,EAAE;AAC3B,QAAQ,OAAO,CAAC,MAAM,EAAE;AACxB,IAAI;AACJ;;;;;;;;;"}
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 async sheet(options) {\n return new Promise((resolve) => {\n var _a, _b, _c, _d;\n const overlay = this.createOverlay();\n const dialog = this.createSheetDialogContainer(options);\n // Header section with logo and title\n const headerSection = document.createElement('div');\n headerSection.style.cssText = 'display: flex; flex-direction: column; align-items: center; margin-bottom: 24px;';\n if (options.headerLogo) {\n const headerLogo = document.createElement('img');\n headerLogo.src = options.headerLogo;\n headerLogo.style.cssText = 'width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; border-radius: 8px;';\n headerLogo.onerror = () => {\n headerLogo.style.display = 'none';\n };\n headerSection.appendChild(headerLogo);\n }\n const titleEl = document.createElement('h2');\n titleEl.textContent = options.title;\n const titleFontSize = (_a = options.titleFontSize) !== null && _a !== void 0 ? _a : 20;\n const titleColor = (_b = options.titleColor) !== null && _b !== void 0 ? _b : 'inherit';\n titleEl.style.cssText = `margin: 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor}; text-align: center;`;\n headerSection.appendChild(titleEl);\n dialog.appendChild(headerSection);\n // Rows container\n const rowsContainer = document.createElement('div');\n rowsContainer.style.cssText = 'display: flex; flex-direction: column; gap: 0; margin-bottom: 24px;';\n options.rows.forEach((row, index) => {\n var _a, _b;\n const rowEl = document.createElement('div');\n rowEl.style.cssText = `\n display: flex;\n align-items: center;\n padding: 16px 0;\n ${index < options.rows.length - 1 ? 'border-bottom: 1px solid #e0e0e0;' : ''}\n `;\n if (row.logo) {\n const rowLogo = document.createElement('img');\n rowLogo.src = row.logo;\n rowLogo.style.cssText = 'width: 24px; height: 24px; object-fit: contain; margin-right: 12px; border-radius: 4px; flex-shrink: 0;';\n rowLogo.onerror = () => {\n rowLogo.style.display = 'none';\n };\n rowEl.appendChild(rowLogo);\n }\n const rowTitle = document.createElement('span');\n rowTitle.textContent = row.title;\n const messageFontSize = (_a = options.messageFontSize) !== null && _a !== void 0 ? _a : 16;\n const messageColor = (_b = options.messageColor) !== null && _b !== void 0 ? _b : '#333';\n rowTitle.style.cssText = `font-size: ${messageFontSize}px; color: ${messageColor}; flex: 1;`;\n rowEl.appendChild(rowTitle);\n if (row.value) {\n const rowValue = document.createElement('span');\n rowValue.textContent = row.value;\n rowValue.style.cssText = `font-size: ${messageFontSize}px; color: #666; text-align: right; margin-left: 12px;`;\n rowEl.appendChild(rowValue);\n }\n rowsContainer.appendChild(rowEl);\n });\n dialog.appendChild(rowsContainer);\n // Button container\n const buttonContainer = this.createButtonContainer();\n const cancelButton = this.createButton((_c = options.cancelButtonTitle) !== null && _c !== void 0 ? _c : 'Cancel', false, () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: false });\n }, options);\n const confirmButton = this.createButton((_d = options.confirmButtonTitle) !== null && _d !== void 0 ? _d : 'Confirm', true, () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: true });\n }, options);\n buttonContainer.appendChild(cancelButton);\n buttonContainer.appendChild(confirmButton);\n dialog.appendChild(buttonContainer);\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n createSheetDialogContainer(options) {\n var _a;\n const dialog = document.createElement('div');\n const bgColor = (_a = options.backgroundColor) !== null && _a !== void 0 ? _a : 'white';\n dialog.style.cssText = `\n background: ${bgColor};\n border-radius: 16px;\n padding: 24px;\n min-width: 320px;\n max-width: 420px;\n max-height: 80vh;\n overflow-y: auto;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);\n `;\n return dialog;\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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I,EAAE;AACd,QAAQ,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AACpD,QAAQ,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,eAAe,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,OAAO;AAC/F,QAAQ,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG;AAC/B,kBAAkB,EAAE,OAAO,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,CAAC;AACL,QAAQ,OAAO,MAAM;AACrB,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -195,6 +195,99 @@ var capacitorExtendedDialog = (function (exports, core) {
195
195
  removeOverlay(overlay) {
196
196
  overlay.remove();
197
197
  }
198
+ async sheet(options) {
199
+ return new Promise((resolve) => {
200
+ var _a, _b, _c, _d;
201
+ const overlay = this.createOverlay();
202
+ const dialog = this.createSheetDialogContainer(options);
203
+ // Header section with logo and title
204
+ const headerSection = document.createElement('div');
205
+ headerSection.style.cssText = 'display: flex; flex-direction: column; align-items: center; margin-bottom: 24px;';
206
+ if (options.headerLogo) {
207
+ const headerLogo = document.createElement('img');
208
+ headerLogo.src = options.headerLogo;
209
+ headerLogo.style.cssText = 'width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; border-radius: 8px;';
210
+ headerLogo.onerror = () => {
211
+ headerLogo.style.display = 'none';
212
+ };
213
+ headerSection.appendChild(headerLogo);
214
+ }
215
+ const titleEl = document.createElement('h2');
216
+ titleEl.textContent = options.title;
217
+ const titleFontSize = (_a = options.titleFontSize) !== null && _a !== void 0 ? _a : 20;
218
+ const titleColor = (_b = options.titleColor) !== null && _b !== void 0 ? _b : 'inherit';
219
+ titleEl.style.cssText = `margin: 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor}; text-align: center;`;
220
+ headerSection.appendChild(titleEl);
221
+ dialog.appendChild(headerSection);
222
+ // Rows container
223
+ const rowsContainer = document.createElement('div');
224
+ rowsContainer.style.cssText = 'display: flex; flex-direction: column; gap: 0; margin-bottom: 24px;';
225
+ options.rows.forEach((row, index) => {
226
+ var _a, _b;
227
+ const rowEl = document.createElement('div');
228
+ rowEl.style.cssText = `
229
+ display: flex;
230
+ align-items: center;
231
+ padding: 16px 0;
232
+ ${index < options.rows.length - 1 ? 'border-bottom: 1px solid #e0e0e0;' : ''}
233
+ `;
234
+ if (row.logo) {
235
+ const rowLogo = document.createElement('img');
236
+ rowLogo.src = row.logo;
237
+ rowLogo.style.cssText = 'width: 24px; height: 24px; object-fit: contain; margin-right: 12px; border-radius: 4px; flex-shrink: 0;';
238
+ rowLogo.onerror = () => {
239
+ rowLogo.style.display = 'none';
240
+ };
241
+ rowEl.appendChild(rowLogo);
242
+ }
243
+ const rowTitle = document.createElement('span');
244
+ rowTitle.textContent = row.title;
245
+ const messageFontSize = (_a = options.messageFontSize) !== null && _a !== void 0 ? _a : 16;
246
+ const messageColor = (_b = options.messageColor) !== null && _b !== void 0 ? _b : '#333';
247
+ rowTitle.style.cssText = `font-size: ${messageFontSize}px; color: ${messageColor}; flex: 1;`;
248
+ rowEl.appendChild(rowTitle);
249
+ if (row.value) {
250
+ const rowValue = document.createElement('span');
251
+ rowValue.textContent = row.value;
252
+ rowValue.style.cssText = `font-size: ${messageFontSize}px; color: #666; text-align: right; margin-left: 12px;`;
253
+ rowEl.appendChild(rowValue);
254
+ }
255
+ rowsContainer.appendChild(rowEl);
256
+ });
257
+ dialog.appendChild(rowsContainer);
258
+ // Button container
259
+ const buttonContainer = this.createButtonContainer();
260
+ const cancelButton = this.createButton((_c = options.cancelButtonTitle) !== null && _c !== void 0 ? _c : 'Cancel', false, () => {
261
+ this.removeOverlay(overlay);
262
+ resolve({ confirmed: false });
263
+ }, options);
264
+ const confirmButton = this.createButton((_d = options.confirmButtonTitle) !== null && _d !== void 0 ? _d : 'Confirm', true, () => {
265
+ this.removeOverlay(overlay);
266
+ resolve({ confirmed: true });
267
+ }, options);
268
+ buttonContainer.appendChild(cancelButton);
269
+ buttonContainer.appendChild(confirmButton);
270
+ dialog.appendChild(buttonContainer);
271
+ overlay.appendChild(dialog);
272
+ document.body.appendChild(overlay);
273
+ });
274
+ }
275
+ createSheetDialogContainer(options) {
276
+ var _a;
277
+ const dialog = document.createElement('div');
278
+ const bgColor = (_a = options.backgroundColor) !== null && _a !== void 0 ? _a : 'white';
279
+ dialog.style.cssText = `
280
+ background: ${bgColor};
281
+ border-radius: 16px;
282
+ padding: 24px;
283
+ min-width: 320px;
284
+ max-width: 420px;
285
+ max-height: 80vh;
286
+ overflow-y: auto;
287
+ box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
288
+ `;
289
+ return dialog;
290
+ }
198
291
  }
199
292
 
200
293
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.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}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,cAAc,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,EAAE;IAC3J,QAAQ,MAAM,YAAY,GAAG,CAAC,EAAE,GAAG,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,SAAS;IACnK,QAAQ,MAAM,WAAW,GAAG,CAAC,EAAE,GAAG,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC,iBAAiB,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,SAAS;IACxK,QAAQ,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG;AAC/B;AACA;AACA,iBAAiB,EAAE,QAAQ,CAAC;AAC5B;AACA;AACA;AACA,MAAM,EAAE,OAAO,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,eAAe,CAAC,GAAG,CAAC,gCAAgC,EAAE,WAAW,CAAC,CAAC,CAAC;AAClH,IAAI,CAAC;IACL,QAAQ,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC;IACjD,QAAQ,OAAO,MAAM;IACrB,IAAI;IACJ,IAAI,aAAa,CAAC,OAAO,EAAE;IAC3B,QAAQ,OAAO,CAAC,MAAM,EAAE;IACxB,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.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 async sheet(options) {\n return new Promise((resolve) => {\n var _a, _b, _c, _d;\n const overlay = this.createOverlay();\n const dialog = this.createSheetDialogContainer(options);\n // Header section with logo and title\n const headerSection = document.createElement('div');\n headerSection.style.cssText = 'display: flex; flex-direction: column; align-items: center; margin-bottom: 24px;';\n if (options.headerLogo) {\n const headerLogo = document.createElement('img');\n headerLogo.src = options.headerLogo;\n headerLogo.style.cssText = 'width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; border-radius: 8px;';\n headerLogo.onerror = () => {\n headerLogo.style.display = 'none';\n };\n headerSection.appendChild(headerLogo);\n }\n const titleEl = document.createElement('h2');\n titleEl.textContent = options.title;\n const titleFontSize = (_a = options.titleFontSize) !== null && _a !== void 0 ? _a : 20;\n const titleColor = (_b = options.titleColor) !== null && _b !== void 0 ? _b : 'inherit';\n titleEl.style.cssText = `margin: 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor}; text-align: center;`;\n headerSection.appendChild(titleEl);\n dialog.appendChild(headerSection);\n // Rows container\n const rowsContainer = document.createElement('div');\n rowsContainer.style.cssText = 'display: flex; flex-direction: column; gap: 0; margin-bottom: 24px;';\n options.rows.forEach((row, index) => {\n var _a, _b;\n const rowEl = document.createElement('div');\n rowEl.style.cssText = `\n display: flex;\n align-items: center;\n padding: 16px 0;\n ${index < options.rows.length - 1 ? 'border-bottom: 1px solid #e0e0e0;' : ''}\n `;\n if (row.logo) {\n const rowLogo = document.createElement('img');\n rowLogo.src = row.logo;\n rowLogo.style.cssText = 'width: 24px; height: 24px; object-fit: contain; margin-right: 12px; border-radius: 4px; flex-shrink: 0;';\n rowLogo.onerror = () => {\n rowLogo.style.display = 'none';\n };\n rowEl.appendChild(rowLogo);\n }\n const rowTitle = document.createElement('span');\n rowTitle.textContent = row.title;\n const messageFontSize = (_a = options.messageFontSize) !== null && _a !== void 0 ? _a : 16;\n const messageColor = (_b = options.messageColor) !== null && _b !== void 0 ? _b : '#333';\n rowTitle.style.cssText = `font-size: ${messageFontSize}px; color: ${messageColor}; flex: 1;`;\n rowEl.appendChild(rowTitle);\n if (row.value) {\n const rowValue = document.createElement('span');\n rowValue.textContent = row.value;\n rowValue.style.cssText = `font-size: ${messageFontSize}px; color: #666; text-align: right; margin-left: 12px;`;\n rowEl.appendChild(rowValue);\n }\n rowsContainer.appendChild(rowEl);\n });\n dialog.appendChild(rowsContainer);\n // Button container\n const buttonContainer = this.createButtonContainer();\n const cancelButton = this.createButton((_c = options.cancelButtonTitle) !== null && _c !== void 0 ? _c : 'Cancel', false, () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: false });\n }, options);\n const confirmButton = this.createButton((_d = options.confirmButtonTitle) !== null && _d !== void 0 ? _d : 'Confirm', true, () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: true });\n }, options);\n buttonContainer.appendChild(cancelButton);\n buttonContainer.appendChild(confirmButton);\n dialog.appendChild(buttonContainer);\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n createSheetDialogContainer(options) {\n var _a;\n const dialog = document.createElement('div');\n const bgColor = (_a = options.backgroundColor) !== null && _a !== void 0 ? _a : 'white';\n dialog.style.cssText = `\n background: ${bgColor};\n border-radius: 16px;\n padding: 24px;\n min-width: 320px;\n max-width: 420px;\n max-height: 80vh;\n overflow-y: auto;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);\n `;\n return dialog;\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,EAAE,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,eAAe,CAAC,WAAW,CAAC,YAAY,CAAC;IACrD,YAAY,eAAe,CAAC,WAAW,CAAC,aAAa,CAAC;IACtD,YAAY,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC;IAC/C,YAAY,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC;IACvC,YAAY,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;IAC9C,QAAQ,CAAC,CAAC;IACV,IAAI;IACJ,IAAI,0BAA0B,CAAC,OAAO,EAAE;IACxC,QAAQ,IAAI,EAAE;IACd,QAAQ,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;IACpD,QAAQ,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,eAAe,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,OAAO;IAC/F,QAAQ,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG;AAC/B,kBAAkB,EAAE,OAAO,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,CAAC;IACL,QAAQ,OAAO,MAAM;IACrB,IAAI;IACJ;;;;;;;;;;;;;;;"}
@@ -6,6 +6,12 @@ public struct SelectOption {
6
6
  let value: String
7
7
  }
8
8
 
9
+ public struct SheetRow {
10
+ let title: String
11
+ let logo: String?
12
+ let value: String?
13
+ }
14
+
9
15
  public struct DialogStyleOptions {
10
16
  var buttonColor: UIColor?
11
17
  var cancelButtonColor: UIColor?
@@ -77,6 +83,7 @@ public struct DialogStyleOptions {
77
83
  public typealias PromptCallback = (String, Bool) -> Void
78
84
  public typealias SingleSelectCallback = (String?, Bool) -> Void
79
85
  public typealias MultiSelectCallback = ([String], Bool) -> Void
86
+ public typealias SheetCallback = (Bool) -> Void
80
87
 
81
88
  // MARK: - Alert
82
89
 
@@ -404,6 +411,73 @@ public struct DialogStyleOptions {
404
411
  presentFullScreen(vc)
405
412
  }
406
413
 
414
+ // MARK: - Sheet
415
+
416
+ public func showSheet(
417
+ title: String,
418
+ headerLogo: String?,
419
+ rows: [[String: String]],
420
+ confirmButtonTitle: String?,
421
+ cancelButtonTitle: String?,
422
+ fullscreen: Bool,
423
+ styleOptions: DialogStyleOptions? = nil,
424
+ callback: @escaping SheetCallback
425
+ ) {
426
+ DispatchQueue.main.async {
427
+ let sheetRows = rows.compactMap { dict -> SheetRow? in
428
+ guard let rowTitle = dict["title"] else { return nil }
429
+ return SheetRow(title: rowTitle, logo: dict["logo"], value: dict["value"])
430
+ }
431
+
432
+ if fullscreen {
433
+ self.showFullScreenSheet(title: title, headerLogo: headerLogo, rows: sheetRows, confirmButtonTitle: confirmButtonTitle, cancelButtonTitle: cancelButtonTitle, styleOptions: styleOptions, callback: callback)
434
+ } else {
435
+ self.showBasicSheet(title: title, headerLogo: headerLogo, rows: sheetRows, confirmButtonTitle: confirmButtonTitle, cancelButtonTitle: cancelButtonTitle, styleOptions: styleOptions, callback: callback)
436
+ }
437
+ }
438
+ }
439
+
440
+ private func showBasicSheet(title: String, headerLogo: String?, rows: [SheetRow], confirmButtonTitle: String?, cancelButtonTitle: String?, styleOptions: DialogStyleOptions?, callback: @escaping SheetCallback) {
441
+ // Use FullScreenDialogViewController in sheet presentation mode for basic sheet
442
+ let vc = FullScreenDialogViewController(
443
+ dialogType: .sheet,
444
+ dialogTitle: title,
445
+ message: "",
446
+ okButtonTitle: confirmButtonTitle ?? "Confirm",
447
+ cancelButtonTitle: cancelButtonTitle ?? "Cancel",
448
+ inputPlaceholder: nil,
449
+ inputText: nil,
450
+ options: nil,
451
+ selectedValue: nil,
452
+ selectedValues: nil,
453
+ styleOptions: styleOptions
454
+ )
455
+ vc.sheetCallback = callback
456
+ vc.headerLogo = headerLogo
457
+ vc.sheetRows = rows
458
+ presentBasicSheet(vc)
459
+ }
460
+
461
+ private func showFullScreenSheet(title: String, headerLogo: String?, rows: [SheetRow], confirmButtonTitle: String?, cancelButtonTitle: String?, styleOptions: DialogStyleOptions?, callback: @escaping SheetCallback) {
462
+ let vc = FullScreenDialogViewController(
463
+ dialogType: .sheet,
464
+ dialogTitle: title,
465
+ message: "",
466
+ okButtonTitle: confirmButtonTitle ?? "Confirm",
467
+ cancelButtonTitle: cancelButtonTitle ?? "Cancel",
468
+ inputPlaceholder: nil,
469
+ inputText: nil,
470
+ options: nil,
471
+ selectedValue: nil,
472
+ selectedValues: nil,
473
+ styleOptions: styleOptions
474
+ )
475
+ vc.sheetCallback = callback
476
+ vc.headerLogo = headerLogo
477
+ vc.sheetRows = rows
478
+ presentFullScreen(vc)
479
+ }
480
+
407
481
  // MARK: - Helpers
408
482
 
409
483
  private func applyLiquidGlassStyle(to alert: UIAlertController) {
@@ -470,9 +544,28 @@ public struct DialogStyleOptions {
470
544
  viewController.modalPresentationStyle = .pageSheet
471
545
  viewController.modalTransitionStyle = .coverVertical
472
546
 
473
- if #available(iOS 15.0, *) {
547
+ // Trigger layout so preferredContentSize is computed before configuring detents
548
+ viewController.loadViewIfNeeded()
549
+
550
+ if #available(iOS 16.0, *) {
551
+ if let sheet = viewController.sheetPresentationController {
552
+ // Use dynamic detent based on content height, capped at 80%
553
+ let customDetent = UISheetPresentationController.Detent.custom { context in
554
+ let maxHeight = context.maximumDetentValue * 0.8
555
+ let contentHeight = viewController.preferredContentSize.height
556
+ if contentHeight > 0 {
557
+ return min(contentHeight, maxHeight)
558
+ }
559
+ return maxHeight
560
+ }
561
+ sheet.detents = [customDetent, .large()]
562
+ sheet.prefersGrabberVisible = true
563
+ sheet.prefersScrollingExpandsWhenScrolledToEdge = false
564
+ }
565
+ } else if #available(iOS 15.0, *) {
474
566
  if let sheet = viewController.sheetPresentationController {
475
- sheet.detents = [.medium(), .large()]
567
+ // Fallback for iOS 15: use large detent to ensure content is visible
568
+ sheet.detents = [.large()]
476
569
  sheet.prefersGrabberVisible = true
477
570
  sheet.prefersScrollingExpandsWhenScrolledToEdge = false
478
571
  }
@@ -489,9 +582,18 @@ public struct DialogStyleOptions {
489
582
  }
490
583
 
491
584
  while let presentedViewController = topController.presentedViewController {
585
+ // Skip view controllers that are being dismissed or not in window hierarchy
586
+ if presentedViewController.isBeingDismissed || presentedViewController.view.window == nil {
587
+ break
588
+ }
492
589
  topController = presentedViewController
493
590
  }
494
591
 
592
+ // If the top controller is being dismissed or not in window, fall back to root
593
+ if topController.isBeingDismissed || topController.view.window == nil {
594
+ return window.rootViewController
595
+ }
596
+
495
597
  return topController
496
598
  }
497
599
  }
@@ -10,7 +10,8 @@ public class ExtendedDialogPlugin: CAPPlugin, CAPBridgedPlugin {
10
10
  CAPPluginMethod(name: "confirm", returnType: CAPPluginReturnPromise),
11
11
  CAPPluginMethod(name: "prompt", returnType: CAPPluginReturnPromise),
12
12
  CAPPluginMethod(name: "singleSelect", returnType: CAPPluginReturnPromise),
13
- CAPPluginMethod(name: "multiSelect", returnType: CAPPluginReturnPromise)
13
+ CAPPluginMethod(name: "multiSelect", returnType: CAPPluginReturnPromise),
14
+ CAPPluginMethod(name: "sheet", returnType: CAPPluginReturnPromise)
14
15
  ]
15
16
 
16
17
  private let implementation = ExtendedDialog()
@@ -174,4 +175,33 @@ public class ExtendedDialogPlugin: CAPPlugin, CAPBridgedPlugin {
174
175
  ])
175
176
  }
176
177
  }
178
+
179
+ @objc func sheet(_ call: CAPPluginCall) {
180
+ guard let title = call.getString("title") else {
181
+ call.reject("title is required")
182
+ return
183
+ }
184
+ guard let rowsArray = call.getArray("rows") as? [[String: String]] else {
185
+ call.reject("rows is required")
186
+ return
187
+ }
188
+ let headerLogo = call.getString("headerLogo")
189
+ let confirmButtonTitle = call.getString("confirmButtonTitle")
190
+ let cancelButtonTitle = call.getString("cancelButtonTitle")
191
+ let mode = call.getString("mode") ?? "basic"
192
+ let fullscreen = mode == "fullscreen"
193
+ let styleOptions = extractStyleOptions(call)
194
+
195
+ implementation.showSheet(
196
+ title: title,
197
+ headerLogo: headerLogo,
198
+ rows: rowsArray,
199
+ confirmButtonTitle: confirmButtonTitle,
200
+ cancelButtonTitle: cancelButtonTitle,
201
+ fullscreen: fullscreen,
202
+ styleOptions: styleOptions
203
+ ) { confirmed in
204
+ call.resolve(["confirmed": confirmed])
205
+ }
206
+ }
177
207
  }