capacitor-extended-dialog 0.0.13 → 0.0.15
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 +2 -1
- package/Package.swift +4 -2
- package/README.md +75 -77
- package/android/build.gradle +10 -9
- package/android/src/main/java/com/albermonte/extendeddialog/SheetBottomDialogFragment.java +19 -14
- package/android/src/main/java/com/albermonte/extendeddialog/SvgImageLoader.java +90 -0
- package/dist/docs.json +74 -74
- package/dist/esm/definitions.d.ts +16 -4
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.js.map +1 -1
- package/ios/Sources/ExtendedDialogPlugin/FullScreenDialogViewController.swift +22 -17
- package/ios/Sources/ExtendedDialogPlugin/SvgImageLoader.swift +70 -0
- package/package.json +12 -12
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoB5C,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAC9C,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QAC3F,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAuB;QACnC,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QAC3F,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC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,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG;oBACP,OAAO;uBACJ,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;;eAEnC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB;gBACzC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;oBAC1B,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;;;oBAG/B,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,+BAA+B;KACtE,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;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 SheetOptions,\n SheetResult,\n MessageSheetOptions,\n MessageSheetResult,\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(options.contentButtonSpacing);\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(options.contentButtonSpacing);\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(contentButtonSpacing?: number): HTMLDivElement {\n const container = document.createElement('div');\n const spacing = contentButtonSpacing ?? 24;\n container.style.cssText = `display: flex; justify-content: flex-end; gap: 8px; margin-top: ${spacing}px;`;\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 async sheet(options: SheetOptions): Promise<SheetResult> {\n return new Promise((resolve) => {\n const overlay = this.createOverlay();\n const dialog = this.createSheetDialogContainer(options);\n\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\n if (options.headerLogo) {\n const headerLogo = document.createElement('img');\n headerLogo.src = options.headerLogo;\n // Apply corner radius (default 8px, -1 for circle)\n const radiusPx = options.headerLogoCornerRadius;\n let borderRadius: string;\n if (radiusPx !== undefined && radiusPx < 0) {\n // -1 means full circle\n borderRadius = '50%';\n } else {\n borderRadius = `${radiusPx ?? 8}px`;\n }\n headerLogo.style.cssText = `width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; border-radius: ${borderRadius};`;\n headerLogo.onerror = () => {\n headerLogo.style.display = 'none';\n };\n headerSection.appendChild(headerLogo);\n }\n\n const titleEl = document.createElement('h2');\n titleEl.textContent = options.title;\n const titleFontSize = options.titleFontSize ?? 20;\n const titleColor = options.titleColor ?? 'inherit';\n titleEl.style.cssText = `margin: 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor}; text-align: center;`;\n headerSection.appendChild(titleEl);\n\n if (options.subtitle) {\n const subtitleEl = document.createElement('p');\n subtitleEl.textContent = options.subtitle;\n const subtitleFontSize = options.messageFontSize ?? 14;\n const subtitleColor = options.messageColor ?? '#666';\n subtitleEl.style.cssText = `margin: 4px 0 0 0; font-size: ${subtitleFontSize}px; font-weight: 400; color: ${subtitleColor}; text-align: center;`;\n headerSection.appendChild(subtitleEl);\n }\n\n dialog.appendChild(headerSection);\n\n // Rows container\n const rowsContainer = document.createElement('div');\n rowsContainer.style.cssText = 'display: flex; flex-direction: column; gap: 0; margin-bottom: 24px;';\n\n options.rows.forEach((row, index) => {\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\n if (row.logo) {\n const rowLogo = document.createElement('img');\n rowLogo.src = row.logo;\n rowLogo.style.cssText =\n '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\n const rowTitle = document.createElement('span');\n rowTitle.textContent = row.title;\n const messageFontSize = options.messageFontSize ?? 16;\n const messageColor = options.messageColor ?? '#333';\n rowTitle.style.cssText = `font-size: ${messageFontSize}px; color: ${messageColor}; flex: 1;`;\n rowEl.appendChild(rowTitle);\n\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\n rowsContainer.appendChild(rowEl);\n });\n\n dialog.appendChild(rowsContainer);\n\n // For sheets with ≤4 rows and no explicit spacing, add extra spacing to reach ~50% viewport height\n let sheetSpacing = options.contentButtonSpacing;\n if (sheetSpacing === undefined && options.rows.length <= 4) {\n const targetHeight = window.innerHeight * 0.5;\n // Estimate content: padding(48) + header(~80) + rows(~49 each) + buttons(~44) + default spacing(24)\n const estimatedHeight = 48 + 80 + options.rows.length * 49 + 44 + 24;\n if (targetHeight > estimatedHeight) {\n sheetSpacing = 24 + (targetHeight - estimatedHeight);\n }\n }\n\n // Button container\n const buttonContainer = this.createButtonContainer(sheetSpacing);\n\n const cancelButton = this.createButton(\n options.cancelButtonTitle ?? 'Cancel',\n false,\n () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: false });\n },\n options,\n );\n\n const confirmButton = this.createButton(\n options.confirmButtonTitle ?? 'Confirm',\n true,\n () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: true });\n },\n options,\n );\n\n buttonContainer.appendChild(cancelButton);\n buttonContainer.appendChild(confirmButton);\n dialog.appendChild(buttonContainer);\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n\n async messageSheet(options: MessageSheetOptions): Promise<MessageSheetResult> {\n return new Promise((resolve) => {\n const overlay = this.createOverlay();\n const dialog = this.createMessageSheetDialogContainer(options);\n\n const content = document.createElement('div');\n content.style.cssText = 'display: flex; flex-direction: column; flex: 1 1 auto; overflow-y: auto;';\n\n if (options.headerLogo) {\n const headerLogo = document.createElement('img');\n headerLogo.src = options.headerLogo;\n const logoSize = options.mode === 'fullscreen' ? 64 : 48;\n // Apply corner radius (default 8px, -1 for circle)\n const radiusPx = options.headerLogoCornerRadius;\n let borderRadius: string;\n if (radiusPx !== undefined && radiusPx < 0) {\n // -1 means full circle\n borderRadius = '50%';\n } else {\n borderRadius = `${radiusPx ?? 8}px`;\n }\n headerLogo.style.cssText = `width: ${logoSize}px; height: ${logoSize}px; object-fit: contain; margin: 0 auto 16px auto; border-radius: ${borderRadius};`;\n headerLogo.onerror = () => {\n headerLogo.style.display = 'none';\n };\n content.appendChild(headerLogo);\n }\n\n const titleEl = document.createElement('h2');\n titleEl.textContent = options.title;\n const titleFontSize = options.titleFontSize ?? 20;\n const titleColor = options.titleColor ?? 'inherit';\n titleEl.style.cssText = `margin: 0 0 ${options.subtitle ? '4px' : '16px'} 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor}; text-align: center;`;\n content.appendChild(titleEl);\n\n if (options.subtitle) {\n const subtitleEl = document.createElement('p');\n subtitleEl.textContent = options.subtitle;\n const subtitleFontSize = options.messageFontSize ?? 14;\n const subtitleColor = options.messageColor ?? '#666';\n subtitleEl.style.cssText = `margin: 0 0 16px 0; font-size: ${subtitleFontSize}px; font-weight: 400; color: ${subtitleColor}; text-align: center;`;\n content.appendChild(subtitleEl);\n }\n\n const messageEl = document.createElement('p');\n messageEl.textContent = options.message;\n const messageFontSize = options.messageFontSize ?? 16;\n const messageColor = options.messageColor ?? '#666';\n messageEl.style.cssText = `margin: 0; font-size: ${messageFontSize}px; color: ${messageColor}; white-space: pre-wrap; word-break: break-word;`;\n\n const messageContainer = document.createElement('div');\n messageContainer.style.cssText = 'background: #E5E5EA; border-radius: 12px; padding: 16px; margin: 0;';\n messageContainer.appendChild(messageEl);\n content.appendChild(messageContainer);\n\n dialog.appendChild(content);\n\n const spacing = options.contentButtonSpacing ?? 24;\n const buttonContainer = document.createElement('div');\n buttonContainer.style.cssText = `display: flex; flex-direction: column; gap: 12px; margin-top: ${spacing}px;`;\n\n const confirmButton = this.createButton(\n options.confirmButtonTitle ?? 'Confirm',\n true,\n () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: true });\n },\n options,\n );\n\n const cancelButton = this.createButton(\n options.cancelButtonTitle ?? 'Cancel',\n false,\n () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: false });\n },\n options,\n );\n\n buttonContainer.appendChild(confirmButton);\n buttonContainer.appendChild(cancelButton);\n dialog.appendChild(buttonContainer);\n\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n\n private createSheetDialogContainer(options: SheetOptions): HTMLDivElement {\n const dialog = document.createElement('div');\n const bgColor = options.backgroundColor ?? '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 private createMessageSheetDialogContainer(options: MessageSheetOptions): HTMLDivElement {\n const dialog = document.createElement('div');\n const bgColor = options.backgroundColor ?? 'white';\n const isFullscreen = options.mode === 'fullscreen';\n dialog.style.cssText = `\n background: ${bgColor};\n border-radius: ${isFullscreen ? '0' : '16px'};\n padding: 24px;\n width: ${isFullscreen ? '100%' : 'min(90vw, 420px)'};\n height: ${isFullscreen ? '100%' : 'auto'};\n max-height: ${isFullscreen ? '100vh' : '80vh'};\n display: flex;\n flex-direction: column;\n box-shadow: ${isFullscreen ? 'none' : '0 4px 24px rgba(0, 0, 0, 0.2)'};\n `;\n return dialog;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoB5C,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAC9C,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,OAAO,OAAO,C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port type {\n ExtendedDialogPlugin,\n AlertOptions,\n ConfirmOptions,\n ConfirmResult,\n PromptOptions,\n PromptResult,\n SingleSelectOptions,\n SingleSelectResult,\n MultiSelectOptions,\n MultiSelectResult,\n SheetOptions,\n SheetResult,\n MessageSheetOptions,\n MessageSheetResult,\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(options.contentButtonSpacing);\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(options.contentButtonSpacing);\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(contentButtonSpacing?: number): HTMLDivElement {\n const container = document.createElement('div');\n const spacing = contentButtonSpacing ?? 24;\n container.style.cssText = `display: flex; justify-content: flex-end; gap: 8px; margin-top: ${spacing}px;`;\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 async sheet(options: SheetOptions): Promise<SheetResult> {\n return new Promise((resolve) => {\n const overlay = this.createOverlay();\n const dialog = this.createSheetDialogContainer(options);\n\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\n if (options.headerLogo) {\n const headerLogo = document.createElement('img');\n headerLogo.src = options.headerLogo;\n // Apply corner radius (default 8px, -1 for circle)\n const radiusPx = options.headerLogoCornerRadius;\n let borderRadius: string;\n if (radiusPx !== undefined && radiusPx < 0) {\n // -1 means full circle\n borderRadius = '50%';\n } else {\n borderRadius = `${radiusPx ?? 8}px`;\n }\n headerLogo.style.cssText = `width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; border-radius: ${borderRadius};`;\n headerLogo.onerror = () => {\n headerLogo.style.display = 'none';\n };\n headerSection.appendChild(headerLogo);\n }\n\n const titleEl = document.createElement('h2');\n titleEl.textContent = options.title;\n const titleFontSize = options.titleFontSize ?? 20;\n const titleColor = options.titleColor ?? 'inherit';\n titleEl.style.cssText = `margin: 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor}; text-align: center;`;\n headerSection.appendChild(titleEl);\n\n if (options.subtitle) {\n const subtitleEl = document.createElement('p');\n subtitleEl.textContent = options.subtitle;\n const subtitleFontSize = options.messageFontSize ?? 14;\n const subtitleColor = options.messageColor ?? '#666';\n subtitleEl.style.cssText = `margin: 4px 0 0 0; font-size: ${subtitleFontSize}px; font-weight: 400; color: ${subtitleColor}; text-align: center;`;\n headerSection.appendChild(subtitleEl);\n }\n\n dialog.appendChild(headerSection);\n\n // Rows container\n const rowsContainer = document.createElement('div');\n rowsContainer.style.cssText = 'display: flex; flex-direction: column; gap: 0; margin-bottom: 24px;';\n\n options.rows.forEach((row, index) => {\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\n if (row.logo) {\n const rowLogo = document.createElement('img');\n rowLogo.src = row.logo;\n rowLogo.style.cssText =\n '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\n const rowTitle = document.createElement('span');\n rowTitle.textContent = row.title;\n const messageFontSize = options.messageFontSize ?? 16;\n const messageColor = options.messageColor ?? '#333';\n rowTitle.style.cssText = `font-size: ${messageFontSize}px; color: ${messageColor}; flex: 1;`;\n rowEl.appendChild(rowTitle);\n\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\n rowsContainer.appendChild(rowEl);\n });\n\n dialog.appendChild(rowsContainer);\n\n // For sheets with ≤4 rows and no explicit spacing, add extra spacing to reach ~50% viewport height\n let sheetSpacing = options.contentButtonSpacing;\n if (sheetSpacing === undefined && options.rows.length <= 4) {\n const targetHeight = window.innerHeight * 0.5;\n // Estimate content: padding(48) + header(~80) + rows(~49 each) + buttons(~44) + default spacing(24)\n const estimatedHeight = 48 + 80 + options.rows.length * 49 + 44 + 24;\n if (targetHeight > estimatedHeight) {\n sheetSpacing = 24 + (targetHeight - estimatedHeight);\n }\n }\n\n // Button container\n const buttonContainer = this.createButtonContainer(sheetSpacing);\n\n const cancelButton = this.createButton(\n options.cancelButtonTitle ?? 'Cancel',\n false,\n () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: false });\n },\n options,\n );\n\n const confirmButton = this.createButton(\n options.confirmButtonTitle ?? 'Confirm',\n true,\n () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: true });\n },\n options,\n );\n\n buttonContainer.appendChild(cancelButton);\n buttonContainer.appendChild(confirmButton);\n dialog.appendChild(buttonContainer);\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n\n async messageSheet(options: MessageSheetOptions): Promise<MessageSheetResult> {\n return new Promise((resolve) => {\n const overlay = this.createOverlay();\n const dialog = this.createMessageSheetDialogContainer(options);\n\n const content = document.createElement('div');\n content.style.cssText = 'display: flex; flex-direction: column; flex: 1 1 auto; overflow-y: auto;';\n\n if (options.headerLogo) {\n const headerLogo = document.createElement('img');\n headerLogo.src = options.headerLogo;\n const logoSize = options.mode === 'fullscreen' ? 64 : 48;\n // Apply corner radius (default 8px, -1 for circle)\n const radiusPx = options.headerLogoCornerRadius;\n let borderRadius: string;\n if (radiusPx !== undefined && radiusPx < 0) {\n // -1 means full circle\n borderRadius = '50%';\n } else {\n borderRadius = `${radiusPx ?? 8}px`;\n }\n headerLogo.style.cssText = `width: ${logoSize}px; height: ${logoSize}px; object-fit: contain; margin: 0 auto 16px auto; border-radius: ${borderRadius};`;\n headerLogo.onerror = () => {\n headerLogo.style.display = 'none';\n };\n content.appendChild(headerLogo);\n }\n\n const titleEl = document.createElement('h2');\n titleEl.textContent = options.title;\n const titleFontSize = options.titleFontSize ?? 20;\n const titleColor = options.titleColor ?? 'inherit';\n titleEl.style.cssText = `margin: 0 0 ${options.subtitle ? '4px' : '16px'} 0; font-size: ${titleFontSize}px; font-weight: 600; color: ${titleColor}; text-align: center;`;\n content.appendChild(titleEl);\n\n if (options.subtitle) {\n const subtitleEl = document.createElement('p');\n subtitleEl.textContent = options.subtitle;\n const subtitleFontSize = options.messageFontSize ?? 14;\n const subtitleColor = options.messageColor ?? '#666';\n subtitleEl.style.cssText = `margin: 0 0 16px 0; font-size: ${subtitleFontSize}px; font-weight: 400; color: ${subtitleColor}; text-align: center;`;\n content.appendChild(subtitleEl);\n }\n\n const messageEl = document.createElement('p');\n messageEl.textContent = options.message;\n const messageFontSize = options.messageFontSize ?? 16;\n const messageColor = options.messageColor ?? '#666';\n messageEl.style.cssText = `margin: 0; font-size: ${messageFontSize}px; color: ${messageColor}; white-space: pre-wrap; word-break: break-word;`;\n\n const messageContainer = document.createElement('div');\n messageContainer.style.cssText = 'background: #E5E5EA; border-radius: 12px; padding: 16px; margin: 0;';\n messageContainer.appendChild(messageEl);\n content.appendChild(messageContainer);\n\n dialog.appendChild(content);\n\n const spacing = options.contentButtonSpacing ?? 24;\n const buttonContainer = document.createElement('div');\n buttonContainer.style.cssText = `display: flex; flex-direction: column; gap: 12px; margin-top: ${spacing}px;`;\n\n const confirmButton = this.createButton(\n options.confirmButtonTitle ?? 'Confirm',\n true,\n () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: true });\n },\n options,\n );\n\n const cancelButton = this.createButton(\n options.cancelButtonTitle ?? 'Cancel',\n false,\n () => {\n this.removeOverlay(overlay);\n resolve({ confirmed: false });\n },\n options,\n );\n\n buttonContainer.appendChild(confirmButton);\n buttonContainer.appendChild(cancelButton);\n dialog.appendChild(buttonContainer);\n\n overlay.appendChild(dialog);\n document.body.appendChild(overlay);\n });\n }\n\n private createSheetDialogContainer(options: SheetOptions): HTMLDivElement {\n const dialog = document.createElement('div');\n const bgColor = options.backgroundColor ?? '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 private createMessageSheetDialogContainer(options: MessageSheetOptions): HTMLDivElement {\n const dialog = document.createElement('div');\n const bgColor = options.backgroundColor ?? 'white';\n const isFullscreen = options.mode === 'fullscreen';\n dialog.style.cssText = `\n background: ${bgColor};\n border-radius: ${isFullscreen ? '0' : '16px'};\n padding: 24px;\n width: ${isFullscreen ? '100%' : 'min(90vw, 420px)'};\n height: ${isFullscreen ? '100%' : 'auto'};\n max-height: ${isFullscreen ? '100vh' : '80vh'};\n display: flex;\n flex-direction: column;\n box-shadow: ${isFullscreen ? 'none' : '0 4px 24px rgba(0, 0, 0, 0.2)'};\n `;\n return dialog;\n }\n}\n"]}
|
|
@@ -946,25 +946,30 @@ public class FullScreenDialogViewController: UIViewController {
|
|
|
946
946
|
}
|
|
947
947
|
|
|
948
948
|
private func loadImage(from urlString: String, into imageView: UIImageView) {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
imageView.image = image
|
|
956
|
-
}
|
|
949
|
+
if SvgImageLoader.isSvgSource(urlString) {
|
|
950
|
+
let targetSize = imageView.bounds.size == .zero
|
|
951
|
+
? CGSize(width: 64, height: 64)
|
|
952
|
+
: imageView.bounds.size
|
|
953
|
+
SvgImageLoader.render(source: urlString, targetSize: targetSize) { [weak imageView] image in
|
|
954
|
+
imageView?.image = image
|
|
957
955
|
}
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
}.resume()
|
|
956
|
+
return
|
|
957
|
+
}
|
|
958
|
+
if SvgImageLoader.isDataUrl(urlString) {
|
|
959
|
+
if let imageData = SvgImageLoader.decodeDataUrl(urlString),
|
|
960
|
+
let image = UIImage(data: imageData) {
|
|
961
|
+
imageView.image = image
|
|
962
|
+
}
|
|
963
|
+
return
|
|
967
964
|
}
|
|
965
|
+
guard let url = URL(string: urlString) else { return }
|
|
966
|
+
URLSession.shared.dataTask(with: url) { [weak imageView] data, _, _ in
|
|
967
|
+
if let data = data, let image = UIImage(data: data) {
|
|
968
|
+
DispatchQueue.main.async {
|
|
969
|
+
imageView?.image = image
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}.resume()
|
|
968
973
|
}
|
|
969
974
|
|
|
970
975
|
private func applyLiquidGlassStyle() {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import UIKit
|
|
2
|
+
import SVGKit
|
|
3
|
+
|
|
4
|
+
enum SvgImageLoader {
|
|
5
|
+
|
|
6
|
+
private static let svgDataUrlPrefix = "data:image/svg+xml"
|
|
7
|
+
private static let dataUrlPrefix = "data:"
|
|
8
|
+
|
|
9
|
+
static func isDataUrl(_ source: String) -> Bool {
|
|
10
|
+
source.range(of: dataUrlPrefix, options: [.anchored, .caseInsensitive]) != nil
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static func isSvgSource(_ source: String) -> Bool {
|
|
14
|
+
if source.range(of: svgDataUrlPrefix, options: [.anchored, .caseInsensitive]) != nil {
|
|
15
|
+
return true
|
|
16
|
+
}
|
|
17
|
+
if let url = URL(string: source),
|
|
18
|
+
let scheme = url.scheme?.lowercased(),
|
|
19
|
+
scheme == "http" || scheme == "https" {
|
|
20
|
+
return url.pathExtension.caseInsensitiveCompare("svg") == .orderedSame
|
|
21
|
+
}
|
|
22
|
+
return false
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/// Supports `;base64` and percent-encoded payloads.
|
|
26
|
+
static func decodeDataUrl(_ source: String) -> Data? {
|
|
27
|
+
guard let commaIndex = source.firstIndex(of: ",") else { return nil }
|
|
28
|
+
let header = source[..<commaIndex]
|
|
29
|
+
let payload = String(source[source.index(after: commaIndex)...])
|
|
30
|
+
if header.range(of: ";base64", options: .caseInsensitive) != nil {
|
|
31
|
+
return Data(base64Encoded: payload)
|
|
32
|
+
}
|
|
33
|
+
return (payload.removingPercentEncoding ?? payload).data(using: .utf8)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// Uses image's intrinsic size when `targetSize` is `.zero`.
|
|
37
|
+
static func render(source: String, targetSize: CGSize, completion: @escaping (UIImage?) -> Void) {
|
|
38
|
+
if isDataUrl(source) {
|
|
39
|
+
guard let data = decodeDataUrl(source) else {
|
|
40
|
+
completion(nil); return
|
|
41
|
+
}
|
|
42
|
+
DispatchQueue.global(qos: .userInitiated).async {
|
|
43
|
+
let image = render(data: data, targetSize: targetSize)
|
|
44
|
+
DispatchQueue.main.async { completion(image) }
|
|
45
|
+
}
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
guard let url = URL(string: source) else {
|
|
49
|
+
completion(nil); return
|
|
50
|
+
}
|
|
51
|
+
URLSession.shared.dataTask(with: url) { data, _, _ in
|
|
52
|
+
guard let data = data else {
|
|
53
|
+
DispatchQueue.main.async { completion(nil) }
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
DispatchQueue.global(qos: .userInitiated).async {
|
|
57
|
+
let image = render(data: data, targetSize: targetSize)
|
|
58
|
+
DispatchQueue.main.async { completion(image) }
|
|
59
|
+
}
|
|
60
|
+
}.resume()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private static func render(data: Data, targetSize: CGSize) -> UIImage? {
|
|
64
|
+
guard let svgImage = SVGKImage(data: data) else { return nil }
|
|
65
|
+
if targetSize.width > 0 && targetSize.height > 0 && svgImage.size != targetSize {
|
|
66
|
+
svgImage.size = targetSize
|
|
67
|
+
}
|
|
68
|
+
return svgImage.uiImage
|
|
69
|
+
}
|
|
70
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-extended-dialog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Show native dialogs and sheets in Capacitor with Material 3 and Liquid Glass UI",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -46,23 +46,23 @@
|
|
|
46
46
|
"prepublishOnly": "npm run build"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@capacitor/android": "^
|
|
50
|
-
"@capacitor/core": "^
|
|
51
|
-
"@capacitor/docgen": "^0.3.
|
|
52
|
-
"@capacitor/ios": "^
|
|
49
|
+
"@capacitor/android": "^8.0.0",
|
|
50
|
+
"@capacitor/core": "^8.0.0",
|
|
51
|
+
"@capacitor/docgen": "^0.3.1",
|
|
52
|
+
"@capacitor/ios": "^8.0.0",
|
|
53
53
|
"@ionic/eslint-config": "^0.4.0",
|
|
54
54
|
"@ionic/prettier-config": "^4.0.0",
|
|
55
55
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
56
|
-
"eslint": "^8.57.
|
|
57
|
-
"prettier": "^3.
|
|
58
|
-
"prettier-plugin-java": "^2.
|
|
59
|
-
"rimraf": "^6.0
|
|
60
|
-
"rollup": "^4.
|
|
56
|
+
"eslint": "^8.57.1",
|
|
57
|
+
"prettier": "^3.6.2",
|
|
58
|
+
"prettier-plugin-java": "^2.7.7",
|
|
59
|
+
"rimraf": "^6.1.0",
|
|
60
|
+
"rollup": "^4.53.2",
|
|
61
61
|
"swiftlint": "^2.0.0",
|
|
62
|
-
"typescript": "
|
|
62
|
+
"typescript": "^5.9.3"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@capacitor/core": ">=
|
|
65
|
+
"@capacitor/core": ">=8.0.0"
|
|
66
66
|
},
|
|
67
67
|
"prettier": "@ionic/prettier-config",
|
|
68
68
|
"swiftlint": "@ionic/swiftlint-config",
|