one
Version:
One is a React framework for web, iOS, and Android apps.
1 lines • 4.43 kB
Source Map (JSON)
{"version":3,"file":"index.js","names":[],"sources":["esm/platform/notifications/index.js"],"sourcesContent":["import {\n DEFAULT_ACTION_IDENTIFIER,\n assertCategoryActions,\n assertCategoryIdentifier,\n assertCategoryOptions,\n toNativeImportance\n} from \"./types\";\nconst denied = {\n status: \"denied\",\n granted: false,\n canAskAgain: false\n};\nasync function getPermissions() {\n return { ...denied };\n}\nasync function requestPermissions(_options = {}) {\n return { ...denied };\n}\nfunction setCategory(identifier, actions, options) {\n assertCategoryIdentifier(identifier, \"setCategory\");\n assertCategoryActions(actions, \"setCategory\");\n assertCategoryOptions(options, \"setCategory\");\n const category = {\n identifier,\n actions: actions.map((action) => ({ ...action }))\n };\n if (options !== void 0) {\n category.options = { ...options };\n }\n return Promise.resolve(category);\n}\nasync function getCategories() {\n return [];\n}\nasync function deleteCategory(identifier) {\n assertCategoryIdentifier(identifier, \"deleteCategory\");\n return false;\n}\nasync function getBadgeCount() {\n return 0;\n}\nasync function setBadgeCount(_count) {\n return false;\n}\nasync function setChannel(_channelId, channel) {\n toNativeImportance(channel.importance);\n return null;\n}\nasync function getChannel(_channelId) {\n return null;\n}\nasync function getChannels() {\n return [];\n}\nasync function deleteChannel(_channelId) {\n}\nconst inert = { remove: () => {\n} };\nfunction addReceivedListener(_listener) {\n return inert;\n}\nfunction addResponseReceivedListener(_listener) {\n return inert;\n}\nasync function getDevicePushToken() {\n throw new Error(\"Notifications.getDevicePushToken needs an iOS or Android build\");\n}\nfunction addPushTokenListener(_listener) {\n return inert;\n}\nfunction setHandler(_handler) {\n}\nfunction getLastResponse() {\n return null;\n}\nfunction clearLastResponse() {\n}\nasync function schedule(_request) {\n throw new Error(\"Notifications.schedule needs an iOS or Android build\");\n}\nasync function cancelScheduled(_identifier) {\n}\nasync function cancelAllScheduled() {\n}\nasync function getAllScheduled() {\n return [];\n}\nasync function getPresented() {\n return [];\n}\nasync function dismiss(_identifier) {\n}\nasync function dismissAll() {\n}\nconst Notifications = Object.freeze({\n getPermissions,\n requestPermissions,\n getBadgeCount,\n setBadgeCount,\n setCategory,\n getCategories,\n deleteCategory,\n setChannel,\n getChannel,\n getChannels,\n deleteChannel,\n addReceivedListener,\n addResponseReceivedListener,\n getDevicePushToken,\n addPushTokenListener,\n setHandler,\n getLastResponse,\n clearLastResponse,\n schedule,\n cancelScheduled,\n cancelAllScheduled,\n getAllScheduled,\n getPresented,\n dismiss,\n dismissAll,\n DEFAULT_ACTION_IDENTIFIER\n});\nexport {\n Notifications\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AAOA,MAAM,SAAS;CACb,QAAQ;CACR,SAAS;CACT,aAAa;AACf;AACA,eAAe,iBAAiB;CAC9B,OAAO,EAAE,GAAG,OAAO;AACrB;AACA,eAAe,mBAAmB,WAAW,CAAC,GAAG;CAC/C,OAAO,EAAE,GAAG,OAAO;AACrB;AACA,SAAS,YAAY,YAAY,SAAS,SAAS;CACjD,yBAAyB,YAAY,aAAa;CAClD,sBAAsB,SAAS,aAAa;CAC5C,sBAAsB,SAAS,aAAa;CAC5C,MAAM,WAAW;EACf;EACA,SAAS,QAAQ,KAAK,YAAY,EAAE,GAAG,OAAO,EAAE;CAClD;CACA,IAAI,YAAY,KAAK,GAAG;EACtB,SAAS,UAAU,EAAE,GAAG,QAAQ;CAClC;CACA,OAAO,QAAQ,QAAQ,QAAQ;AACjC;AACA,eAAe,gBAAgB;CAC7B,OAAO,CAAC;AACV;AACA,eAAe,eAAe,YAAY;CACxC,yBAAyB,YAAY,gBAAgB;CACrD,OAAO;AACT;AACA,eAAe,gBAAgB;CAC7B,OAAO;AACT;AACA,eAAe,cAAc,QAAQ;CACnC,OAAO;AACT;AACA,eAAe,WAAW,YAAY,SAAS;CAC7C,mBAAmB,QAAQ,UAAU;CACrC,OAAO;AACT;AACA,eAAe,WAAW,YAAY;CACpC,OAAO;AACT;AACA,eAAe,cAAc;CAC3B,OAAO,CAAC;AACV;AAC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