@capacitor/action-sheet 8.0.0-alpha.1 → 8.0.0-beta.0

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/Package.swift CHANGED
@@ -10,7 +10,7 @@ let package = Package(
10
10
  targets: ["ActionSheetPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0-beta")
14
14
  ],
15
15
  targets: [
16
16
  .target(
package/README.md CHANGED
@@ -13,7 +13,7 @@ npx cap sync
13
13
 
14
14
  This plugin will use the following project variables (defined in your app's `variables.gradle` file):
15
15
 
16
- - `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.12.0`)
16
+ - `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.13.0`)
17
17
 
18
18
  ## PWA Notes
19
19
 
@@ -1,10 +1,10 @@
1
1
  ext {
2
2
  capacitorVersion = System.getenv('CAPACITOR_VERSION')
3
3
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
4
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
5
- androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.12.0'
6
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
7
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
4
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
5
+ androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.13.0'
6
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
7
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
8
8
  }
9
9
 
10
10
  buildscript {
@@ -12,11 +12,11 @@ buildscript {
12
12
  google()
13
13
  mavenCentral()
14
14
  maven {
15
- url "https://plugins.gradle.org/m2/"
15
+ url = "https://plugins.gradle.org/m2/"
16
16
  }
17
17
  }
18
18
  dependencies {
19
- classpath 'com.android.tools.build:gradle:8.7.2'
19
+ classpath 'com.android.tools.build:gradle:8.13.0'
20
20
  if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
21
21
  classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
22
22
  }
@@ -31,8 +31,8 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
31
31
  }
32
32
 
33
33
  android {
34
- namespace "com.capacitorjs.plugins.actionsheet"
35
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
34
+ namespace = "com.capacitorjs.plugins.actionsheet"
35
+ compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
36
36
  defaultConfig {
37
37
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
38
38
  targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
@@ -47,7 +47,7 @@ android {
47
47
  }
48
48
  }
49
49
  lintOptions {
50
- abortOnError false
50
+ abortOnError = false
51
51
  }
52
52
  compileOptions {
53
53
  sourceCompatibility JavaVersion.VERSION_21
@@ -101,15 +101,13 @@ public class ActionSheet extends BottomSheetDialogFragment {
101
101
  tv.setTextColor(Color.parseColor("#000000"));
102
102
  tv.setPadding(layoutPaddingPx12, layoutPaddingPx12, layoutPaddingPx12, layoutPaddingPx12);
103
103
  tv.setText(options[i].getTitle());
104
- tv.setOnClickListener(
105
- view -> {
106
- Logger.debug("CliCKED: " + optionIndex);
104
+ tv.setOnClickListener((view) -> {
105
+ Logger.debug("CliCKED: " + optionIndex);
107
106
 
108
- if (listener != null) {
109
- listener.onSelect(optionIndex);
110
- }
107
+ if (listener != null) {
108
+ listener.onSelect(optionIndex);
111
109
  }
112
- );
110
+ });
113
111
  layout.addView(tv);
114
112
  }
115
113
 
@@ -40,14 +40,12 @@ public class ActionSheetPlugin extends Plugin {
40
40
  implementation.setTitle(title);
41
41
  implementation.setOptions(actionOptions);
42
42
  implementation.setCancelable(false);
43
- implementation.setOnSelectedListener(
44
- index -> {
45
- JSObject ret = new JSObject();
46
- ret.put("index", index);
47
- call.resolve(ret);
48
- implementation.dismiss();
49
- }
50
- );
43
+ implementation.setOnSelectedListener((index) -> {
44
+ JSObject ret = new JSObject();
45
+ ret.put("index", index);
46
+ call.resolve(ret);
47
+ implementation.dismiss();
48
+ });
51
49
  implementation.show(getActivity().getSupportFragmentManager(), "capacitorModalsActionSheet");
52
50
  } catch (JSONException ex) {
53
51
  Logger.error("JSON error processing an option for showActions", ex);
@@ -86,17 +86,17 @@ export interface ActionSheetPlugin {
86
86
  * @deprecated Use `ShowActionsOptions`.
87
87
  * @since 1.0.0
88
88
  */
89
- export declare type ActionSheetOptions = ShowActionsOptions;
89
+ export type ActionSheetOptions = ShowActionsOptions;
90
90
  /**
91
91
  * @deprecated Use `ShowActionsResult`.
92
92
  * @since 1.0.0
93
93
  */
94
- export declare type ActionSheetResult = ShowActionsResult;
94
+ export type ActionSheetResult = ShowActionsResult;
95
95
  /**
96
96
  * @deprecated Use `ActionSheetButton`.
97
97
  * @since 1.0.0
98
98
  */
99
- export declare type ActionSheetOption = ActionSheetButton;
99
+ export type ActionSheetOption = ActionSheetButton;
100
100
  /**
101
101
  * @deprecated Use `ActionSheetButtonStyle`.
102
102
  * @since 1.0.0
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { registerPlugin } from '@capacitor/core';
2
2
  const ActionSheet = registerPlugin('ActionSheet', {
3
- web: () => import('./web').then(m => new m.ActionSheetWeb()),
3
+ web: () => import('./web').then((m) => new m.ActionSheetWeb()),
4
4
  });
5
5
  export * from './definitions';
6
6
  export { ActionSheet };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,WAAW,GAAG,cAAc,CAAoB,aAAa,EAAE;IACnE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;CAC7D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { ActionSheetPlugin } from './definitions';\n\nconst ActionSheet = registerPlugin<ActionSheetPlugin>('ActionSheet', {\n web: () => import('./web').then(m => new m.ActionSheetWeb()),\n});\n\nexport * from './definitions';\nexport { ActionSheet };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,WAAW,GAAG,cAAc,CAAoB,aAAa,EAAE;IACnE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;CAC/D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { ActionSheetPlugin } from './definitions';\n\nconst ActionSheet = registerPlugin<ActionSheetPlugin>('ActionSheet', {\n web: () => import('./web').then((m) => new m.ActionSheetWeb()),\n});\n\nexport * from './definitions';\nexport { ActionSheet };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,MAAM,OAAO,cAAe,SAAQ,SAAS;IAC3C,KAAK,CAAC,WAAW,CAAC,OAA2B;QAC3C,OAAO,IAAI,OAAO,CAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;YACzD,IAAI,WAAW,GAAQ,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;YAClE,IAAI,CAAC,WAAW,EAAE;gBAChB,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;gBACzD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;aACxC;YACD,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;YACnC,WAAW,CAAC,UAAU,GAAG,KAAK,CAAC;YAC/B,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YACtC,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,KAAK,EAAE,CAAM,EAAE,EAAE;gBAC3D,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;gBAC3B,OAAO,CAAC;oBACN,KAAK,EAAE,SAAS;iBACjB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n ActionSheetPlugin,\n ShowActionsResult,\n ShowActionsOptions,\n} from './definitions';\n\nexport class ActionSheetWeb extends WebPlugin implements ActionSheetPlugin {\n async showActions(options: ShowActionsOptions): Promise<ShowActionsResult> {\n return new Promise<ShowActionsResult>((resolve, _reject) => {\n let actionSheet: any = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.title;\n actionSheet.cancelable = false;\n actionSheet.options = options.options;\n actionSheet.addEventListener('onSelection', async (e: any) => {\n const selection = e.detail;\n resolve({\n index: selection,\n });\n });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,cAAe,SAAQ,SAAS;IAC3C,KAAK,CAAC,WAAW,CAAC,OAA2B;QAC3C,OAAO,IAAI,OAAO,CAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;YACzD,IAAI,WAAW,GAAQ,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;YAClE,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;gBACzD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YACzC,CAAC;YACD,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;YACnC,WAAW,CAAC,UAAU,GAAG,KAAK,CAAC;YAC/B,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YACtC,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,KAAK,EAAE,CAAM,EAAE,EAAE;gBAC3D,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;gBAC3B,OAAO,CAAC;oBACN,KAAK,EAAE,SAAS;iBACjB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ActionSheetPlugin, ShowActionsResult, ShowActionsOptions } from './definitions';\n\nexport class ActionSheetWeb extends WebPlugin implements ActionSheetPlugin {\n async showActions(options: ShowActionsOptions): Promise<ShowActionsResult> {\n return new Promise<ShowActionsResult>((resolve, _reject) => {\n let actionSheet: any = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.title;\n actionSheet.cancelable = false;\n actionSheet.options = options.options;\n actionSheet.addEventListener('onSelection', async (e: any) => {\n const selection = e.detail;\n resolve({\n index: selection,\n });\n });\n });\n }\n}\n"]}
@@ -31,7 +31,7 @@ exports.ActionSheetButtonStyle = void 0;
31
31
  const ActionSheetOptionStyle = exports.ActionSheetButtonStyle;
32
32
 
33
33
  const ActionSheet = core.registerPlugin('ActionSheet', {
34
- web: () => Promise.resolve().then(function () { return web; }).then(m => new m.ActionSheetWeb()),
34
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ActionSheetWeb()),
35
35
  });
36
36
 
37
37
  class ActionSheetWeb extends core.WebPlugin {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ActionSheetButtonStyle;\n(function (ActionSheetButtonStyle) {\n /**\n * Default style of the option.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Default\"] = \"DEFAULT\";\n /**\n * Style to use on destructive options.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Destructive\"] = \"DESTRUCTIVE\";\n /**\n * Style to use on the option that cancels the Action Sheet.\n * If used, should be on the latest availabe option.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Cancel\"] = \"CANCEL\";\n})(ActionSheetButtonStyle || (ActionSheetButtonStyle = {}));\n/**\n * @deprecated Use `ActionSheetButtonStyle`.\n * @since 1.0.0\n */\nexport const ActionSheetOptionStyle = ActionSheetButtonStyle;\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst ActionSheet = registerPlugin('ActionSheet', {\n web: () => import('./web').then(m => new m.ActionSheetWeb()),\n});\nexport * from './definitions';\nexport { ActionSheet };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ActionSheetWeb extends WebPlugin {\n async showActions(options) {\n return new Promise((resolve, _reject) => {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.title;\n actionSheet.cancelable = false;\n actionSheet.options = options.options;\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n resolve({\n index: selection,\n });\n });\n });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ActionSheetButtonStyle","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,sBAAsB,EAAE;AACnC;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB,CAAC,SAAS,CAAC,GAAG,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB,CAAC,aAAa,CAAC,GAAG,aAAa;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AAC/C,CAAC,EAAEA,8BAAsB,KAAKA,8BAAsB,GAAG,EAAE,CAAC,CAAC;AAC3D;AACA;AACA;AACA;AACY,MAAC,sBAAsB,GAAGA;;ACzBjC,MAAC,WAAW,GAAGC,mBAAc,CAAC,aAAa,EAAE;AAClD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;AAChE,CAAC;;ACFM,MAAM,cAAc,SAASC,cAAS,CAAC;AAC9C,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK;AACjD,YAAY,IAAI,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC;AACxE,YAAY,IAAI,CAAC,WAAW,EAAE;AAC9B,gBAAgB,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC;AACxE,gBAAgB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC;AACtD,YAAY;AACZ,YAAY,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK;AAC9C,YAAY,WAAW,CAAC,UAAU,GAAG,KAAK;AAC1C,YAAY,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO;AACjD,YAAY,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK;AACrE,gBAAgB,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM;AAC1C,gBAAgB,OAAO,CAAC;AACxB,oBAAoB,KAAK,EAAE,SAAS;AACpC,iBAAiB,CAAC;AAClB,YAAY,CAAC,CAAC;AACd,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ActionSheetButtonStyle;\n(function (ActionSheetButtonStyle) {\n /**\n * Default style of the option.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Default\"] = \"DEFAULT\";\n /**\n * Style to use on destructive options.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Destructive\"] = \"DESTRUCTIVE\";\n /**\n * Style to use on the option that cancels the Action Sheet.\n * If used, should be on the latest availabe option.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Cancel\"] = \"CANCEL\";\n})(ActionSheetButtonStyle || (ActionSheetButtonStyle = {}));\n/**\n * @deprecated Use `ActionSheetButtonStyle`.\n * @since 1.0.0\n */\nexport const ActionSheetOptionStyle = ActionSheetButtonStyle;\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst ActionSheet = registerPlugin('ActionSheet', {\n web: () => import('./web').then((m) => new m.ActionSheetWeb()),\n});\nexport * from './definitions';\nexport { ActionSheet };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ActionSheetWeb extends WebPlugin {\n async showActions(options) {\n return new Promise((resolve, _reject) => {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.title;\n actionSheet.cancelable = false;\n actionSheet.options = options.options;\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n resolve({\n index: selection,\n });\n });\n });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ActionSheetButtonStyle","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,sBAAsB,EAAE;AACnC;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB,CAAC,SAAS,CAAC,GAAG,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB,CAAC,aAAa,CAAC,GAAG,aAAa;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AAC/C,CAAC,EAAEA,8BAAsB,KAAKA,8BAAsB,GAAG,EAAE,CAAC,CAAC;AAC3D;AACA;AACA;AACA;AACY,MAAC,sBAAsB,GAAGA;;ACzBjC,MAAC,WAAW,GAAGC,mBAAc,CAAC,aAAa,EAAE;AAClD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;AAClE,CAAC;;ACFM,MAAM,cAAc,SAASC,cAAS,CAAC;AAC9C,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK;AACjD,YAAY,IAAI,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC;AACxE,YAAY,IAAI,CAAC,WAAW,EAAE;AAC9B,gBAAgB,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC;AACxE,gBAAgB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC;AACtD,YAAY;AACZ,YAAY,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK;AAC9C,YAAY,WAAW,CAAC,UAAU,GAAG,KAAK;AAC1C,YAAY,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO;AACjD,YAAY,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK;AACrE,gBAAgB,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM;AAC1C,gBAAgB,OAAO,CAAC;AACxB,oBAAoB,KAAK,EAAE,SAAS;AACpC,iBAAiB,CAAC;AAClB,YAAY,CAAC,CAAC;AACd,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ;;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -30,7 +30,7 @@ var capacitorActionSheet = (function (exports, core) {
30
30
  const ActionSheetOptionStyle = exports.ActionSheetButtonStyle;
31
31
 
32
32
  const ActionSheet = core.registerPlugin('ActionSheet', {
33
- web: () => Promise.resolve().then(function () { return web; }).then(m => new m.ActionSheetWeb()),
33
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ActionSheetWeb()),
34
34
  });
35
35
 
36
36
  class ActionSheetWeb extends core.WebPlugin {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ActionSheetButtonStyle;\n(function (ActionSheetButtonStyle) {\n /**\n * Default style of the option.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Default\"] = \"DEFAULT\";\n /**\n * Style to use on destructive options.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Destructive\"] = \"DESTRUCTIVE\";\n /**\n * Style to use on the option that cancels the Action Sheet.\n * If used, should be on the latest availabe option.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Cancel\"] = \"CANCEL\";\n})(ActionSheetButtonStyle || (ActionSheetButtonStyle = {}));\n/**\n * @deprecated Use `ActionSheetButtonStyle`.\n * @since 1.0.0\n */\nexport const ActionSheetOptionStyle = ActionSheetButtonStyle;\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst ActionSheet = registerPlugin('ActionSheet', {\n web: () => import('./web').then(m => new m.ActionSheetWeb()),\n});\nexport * from './definitions';\nexport { ActionSheet };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ActionSheetWeb extends WebPlugin {\n async showActions(options) {\n return new Promise((resolve, _reject) => {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.title;\n actionSheet.cancelable = false;\n actionSheet.options = options.options;\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n resolve({\n index: selection,\n });\n });\n });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ActionSheetButtonStyle","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,sBAAsB,EAAE;IACnC;IACA;IACA;IACA;IACA;IACA,IAAI,sBAAsB,CAAC,SAAS,CAAC,GAAG,SAAS;IACjD;IACA;IACA;IACA;IACA;IACA,IAAI,sBAAsB,CAAC,aAAa,CAAC,GAAG,aAAa;IACzD;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,sBAAsB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IAC/C,CAAC,EAAEA,8BAAsB,KAAKA,8BAAsB,GAAG,EAAE,CAAC,CAAC;IAC3D;IACA;IACA;IACA;AACY,UAAC,sBAAsB,GAAGA;;ACzBjC,UAAC,WAAW,GAAGC,mBAAc,CAAC,aAAa,EAAE;IAClD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;IAChE,CAAC;;ICFM,MAAM,cAAc,SAASC,cAAS,CAAC;IAC9C,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK;IACjD,YAAY,IAAI,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACxE,YAAY,IAAI,CAAC,WAAW,EAAE;IAC9B,gBAAgB,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACxE,gBAAgB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC;IACtD,YAAY;IACZ,YAAY,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK;IAC9C,YAAY,WAAW,CAAC,UAAU,GAAG,KAAK;IAC1C,YAAY,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO;IACjD,YAAY,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK;IACrE,gBAAgB,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM;IAC1C,gBAAgB,OAAO,CAAC;IACxB,oBAAoB,KAAK,EAAE,SAAS;IACpC,iBAAiB,CAAC;IAClB,YAAY,CAAC,CAAC;IACd,QAAQ,CAAC,CAAC;IACV,IAAI;IACJ;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ActionSheetButtonStyle;\n(function (ActionSheetButtonStyle) {\n /**\n * Default style of the option.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Default\"] = \"DEFAULT\";\n /**\n * Style to use on destructive options.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Destructive\"] = \"DESTRUCTIVE\";\n /**\n * Style to use on the option that cancels the Action Sheet.\n * If used, should be on the latest availabe option.\n *\n * @since 1.0.0\n */\n ActionSheetButtonStyle[\"Cancel\"] = \"CANCEL\";\n})(ActionSheetButtonStyle || (ActionSheetButtonStyle = {}));\n/**\n * @deprecated Use `ActionSheetButtonStyle`.\n * @since 1.0.0\n */\nexport const ActionSheetOptionStyle = ActionSheetButtonStyle;\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst ActionSheet = registerPlugin('ActionSheet', {\n web: () => import('./web').then((m) => new m.ActionSheetWeb()),\n});\nexport * from './definitions';\nexport { ActionSheet };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ActionSheetWeb extends WebPlugin {\n async showActions(options) {\n return new Promise((resolve, _reject) => {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.title;\n actionSheet.cancelable = false;\n actionSheet.options = options.options;\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n resolve({\n index: selection,\n });\n });\n });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ActionSheetButtonStyle","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,sBAAsB,EAAE;IACnC;IACA;IACA;IACA;IACA;IACA,IAAI,sBAAsB,CAAC,SAAS,CAAC,GAAG,SAAS;IACjD;IACA;IACA;IACA;IACA;IACA,IAAI,sBAAsB,CAAC,aAAa,CAAC,GAAG,aAAa;IACzD;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,sBAAsB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IAC/C,CAAC,EAAEA,8BAAsB,KAAKA,8BAAsB,GAAG,EAAE,CAAC,CAAC;IAC3D;IACA;IACA;IACA;AACY,UAAC,sBAAsB,GAAGA;;ACzBjC,UAAC,WAAW,GAAGC,mBAAc,CAAC,aAAa,EAAE;IAClD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;IAClE,CAAC;;ICFM,MAAM,cAAc,SAASC,cAAS,CAAC;IAC9C,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK;IACjD,YAAY,IAAI,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACxE,YAAY,IAAI,CAAC,WAAW,EAAE;IAC9B,gBAAgB,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACxE,gBAAgB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC;IACtD,YAAY;IACZ,YAAY,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK;IAC9C,YAAY,WAAW,CAAC,UAAU,GAAG,KAAK;IAC1C,YAAY,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO;IACjD,YAAY,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK;IACrE,gBAAgB,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM;IAC1C,gBAAgB,OAAO,CAAC;IACxB,oBAAoB,KAAK,EAAE,SAAS;IACpC,iBAAiB,CAAC;IAClB,YAAY,CAAC,CAAC;IACd,QAAQ,CAAC,CAAC;IACV,IAAI;IACJ;;;;;;;;;;;;;;;;"}
@@ -29,7 +29,7 @@ public class ActionSheetPlugin: CAPPlugin, CAPBridgedPlugin {
29
29
  } else if style == "CANCEL" {
30
30
  buttonStyle = .cancel
31
31
  }
32
- let action = UIAlertAction(title: title, style: buttonStyle, handler: { (_) -> Void in
32
+ let action = UIAlertAction(title: title, style: buttonStyle, handler: { (_) in
33
33
  call.resolve([
34
34
  "index": index
35
35
  ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/action-sheet",
3
- "version": "8.0.0-alpha.1",
3
+ "version": "8.0.0-beta.0",
4
4
  "description": "The Action Sheet API provides access to native Action Sheets, which come up from the bottom of the screen and display actions a user can take.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -37,7 +37,7 @@
37
37
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
38
38
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
39
39
  "eslint": "eslint . --ext ts",
40
- "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
40
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
41
41
  "swiftlint": "node-swiftlint",
42
42
  "docgen": "docgen --api ActionSheetPlugin --output-readme README.md --output-json dist/docs.json",
43
43
  "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
@@ -49,18 +49,18 @@
49
49
  "devDependencies": {
50
50
  "@capacitor/android": "next",
51
51
  "@capacitor/core": "next",
52
- "@capacitor/docgen": "0.2.2",
52
+ "@capacitor/docgen": "0.3.0",
53
53
  "@capacitor/ios": "next",
54
54
  "@ionic/eslint-config": "^0.4.0",
55
- "@ionic/prettier-config": "~1.0.1",
56
- "@ionic/swiftlint-config": "^1.1.2",
57
- "eslint": "^8.57.0",
58
- "prettier": "~2.3.0",
59
- "prettier-plugin-java": "~1.0.2",
60
- "rimraf": "^6.0.1",
61
- "rollup": "^4.26.0",
62
- "swiftlint": "^1.0.1",
63
- "typescript": "~4.1.5"
55
+ "@ionic/prettier-config": "^4.0.0",
56
+ "@ionic/swiftlint-config": "^2.0.0",
57
+ "eslint": "^8.57.1",
58
+ "prettier": "^3.6.2",
59
+ "prettier-plugin-java": "^2.7.7",
60
+ "rimraf": "^6.1.0",
61
+ "rollup": "^4.53.2",
62
+ "swiftlint": "^2.0.0",
63
+ "typescript": "^5.9.3"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@capacitor/core": "next"
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "4c2f39a8fc78578c919a81ba410d6a37e70152d0"
84
+ "gitHead": "06921fb53dc712720523c13836a92ba371054dcb"
85
85
  }