="lines-num lines-num-new"> 144
+			productRefGroup = 504EC3051FED79650016851F /* Products */;
145
+			projectDirPath = "";
146
+			projectRoot = "";
147
+			targets = (
148
+				504EC3031FED79650016851F /* App */,
149
+			);
150
+		};
151
+/* End PBXProject section */
152
+
153
+/* Begin PBXResourcesBuildPhase section */
154
+		504EC3021FED79650016851F /* Resources */ = {
155
+			isa = PBXResourcesBuildPhase;
156
+			buildActionMask = 2147483647;
157
+			files = (
158
+				504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,
159
+				50B271D11FEDC1A000F3C39B /* public in Resources */,
160
+				504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
161
+				50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
162
+				504EC30D1FED79650016851F /* Main.storyboard in Resources */,
163
+				2FAD9763203C412B000D30F8 /* config.xml in Resources */,
164
+			);
165
+			runOnlyForDeploymentPostprocessing = 0;
166
+		};
167
+/* End PBXResourcesBuildPhase section */
168
+
169
+/* Begin PBXShellScriptBuildPhase section */
170
+		6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = {
171
+			isa = PBXShellScriptBuildPhase;
172
+			buildActionMask = 2147483647;
173
+			files = (
174
+			);
175
+			inputPaths = (
176
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
177
+				"${PODS_ROOT}/Manifest.lock",
178
+			);
179
+			name = "[CP] Check Pods Manifest.lock";
180
+			outputPaths = (
181
+				"$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt",
182
+			);
183
+			runOnlyForDeploymentPostprocessing = 0;
184
+			shellPath = /bin/sh;
185
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
186
+			showEnvVarsInLog = 0;
187
+		};
188
+		9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = {
189
+			isa = PBXShellScriptBuildPhase;
190
+			buildActionMask = 2147483647;
191
+			files = (
192
+			);
193
+			inputPaths = (
194
+			);
195
+			name = "[CP] Embed Pods Frameworks";
196
+			outputPaths = (
197
+			);
198
+			runOnlyForDeploymentPostprocessing = 0;
199
+			shellPath = /bin/sh;
200
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n";
201
+			showEnvVarsInLog = 0;
202
+		};
203
+/* End PBXShellScriptBuildPhase section */
204
+
205
+/* Begin PBXSourcesBuildPhase section */
206
+		504EC3001FED79650016851F /* Sources */ = {
207
+			isa = PBXSourcesBuildPhase;
208
+			buildActionMask = 2147483647;
209
+			files = (
210
+				504EC3081FED79650016851F /* AppDelegate.swift in Sources */,
211
+			);
212
+			runOnlyForDeploymentPostprocessing = 0;
213
+		};
214
+/* End PBXSourcesBuildPhase section */
215
+
216
+/* Begin PBXVariantGroup section */
217
+		504EC30B1FED79650016851F /* Main.storyboard */ = {
218
+			isa = PBXVariantGroup;
219
+			children = (
220
+				504EC30C1FED79650016851F /* Base */,
221
+			);
222
+			name = Main.storyboard;
223
+			sourceTree = "<group>";
224
+		};
225
+		504EC3101FED79650016851F /* LaunchScreen.storyboard */ = {
226
+			isa = PBXVariantGroup;
227
+			children = (
228
+				504EC3111FED79650016851F /* Base */,
229
+			);
230
+			name = LaunchScreen.storyboard;
231
+			sourceTree = "<group>";
232
+		};
233
+/* End PBXVariantGroup section */
234
+
235
+/* Begin XCBuildConfiguration section */
236
+		504EC3141FED79650016851F /* Debug */ = {
237
+			isa = XCBuildConfiguration;
238
+			buildSettings = {
239
+				ALWAYS_SEARCH_USER_PATHS = NO;
240
+				CLANG_ANALYZER_NONNULL = YES;
241
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
242
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
243
+				CLANG_CXX_LIBRARY = "libc++";
244
+				CLANG_ENABLE_MODULES = YES;
245
+				CLANG_ENABLE_OBJC_ARC = YES;
246
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
247
+				CLANG_WARN_BOOL_CONVERSION = YES;
248
+				CLANG_WARN_COMMA = YES;
249
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
250
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
251
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
252
+				CLANG_WARN_EMPTY_BODY = YES;
253
+				CLANG_WARN_ENUM_CONVERSION = YES;
254
+				CLANG_WARN_INFINITE_RECURSION = YES;
255
+				CLANG_WARN_INT_CONVERSION = YES;
256
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
257
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
258
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
259
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
260
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
261
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
262
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
263
+				CLANG_WARN_UNREACHABLE_CODE = YES;
264
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
265
+				CODE_SIGN_IDENTITY = "iPhone Developer";
266
+				COPY_PHASE_STRIP = NO;
267
+				DEBUG_INFORMATION_FORMAT = dwarf;
268
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
269
+				ENABLE_TESTABILITY = YES;
270
+				GCC_C_LANGUAGE_STANDARD = gnu11;
271
+				GCC_DYNAMIC_NO_PIC = NO;
272
+				GCC_NO_COMMON_BLOCKS = YES;
273
+				GCC_OPTIMIZATION_LEVEL = 0;
274
+				GCC_PREPROCESSOR_DEFINITIONS = (
275
+					"DEBUG=1",
276
+					"$(inherited)",
277
+				);
278
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
279
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
280
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
281
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
282
+				GCC_WARN_UNUSED_FUNCTION = YES;
283
+				GCC_WARN_UNUSED_VARIABLE = YES;
284
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
285
+				MTL_ENABLE_DEBUG_INFO = YES;
286
+				ONLY_ACTIVE_ARCH = YES;
287
+				SDKROOT = iphoneos;
288
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
289
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
290
+			};
291
+			name = Debug;
292
+		};
293
+		504EC3151FED79650016851F /* Release */ = {
294
+			isa = XCBuildConfiguration;
295
+			buildSettings = {
296
+				ALWAYS_SEARCH_USER_PATHS = NO;
297
+				CLANG_ANALYZER_NONNULL = YES;
298
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
299
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
300
+				CLANG_CXX_LIBRARY = "libc++";
301
+				CLANG_ENABLE_MODULES = YES;
302
+				CLANG_ENABLE_OBJC_ARC = YES;
303
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
304
+				CLANG_WARN_BOOL_CONVERSION = YES;
305
+				CLANG_WARN_COMMA = YES;
306
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
307
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
308
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
309
+				CLANG_WARN_EMPTY_BODY = YES;
310
+				CLANG_WARN_ENUM_CONVERSION = YES;
311
+				CLANG_WARN_INFINITE_RECURSION = YES;
312
+				CLANG_WARN_INT_CONVERSION = YES;
313
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
314
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
315
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
316
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
317
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
318
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
319
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
320
+				CLANG_WARN_UNREACHABLE_CODE = YES;
321
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
322
+				CODE_SIGN_IDENTITY = "iPhone Developer";
323
+				COPY_PHASE_STRIP = NO;
324
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
325
+				ENABLE_NS_ASSERTIONS = NO;
326
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
327
+				GCC_C_LANGUAGE_STANDARD = gnu11;
328
+				GCC_NO_COMMON_BLOCKS = YES;
329
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
330
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
331
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
332
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
333
+				GCC_WARN_UNUSED_FUNCTION = YES;
334
+				GCC_WARN_UNUSED_VARIABLE = YES;
335
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
336
+				MTL_ENABLE_DEBUG_INFO = NO;
337
+				SDKROOT = iphoneos;
338
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
339
+				VALIDATE_PRODUCT = YES;
340
+			};
341
+			name = Release;
342
+		};
343
+		504EC3171FED79650016851F /* Debug */ = {
344
+			isa = XCBuildConfiguration;
345
+			baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
346
+			buildSettings = {
347
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
348
+				CODE_SIGN_STYLE = Automatic;
349
+				CURRENT_PROJECT_VERSION = 1;
350
+				INFOPLIST_FILE = App/Info.plist;
351
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
352
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
353
+				MARKETING_VERSION = 1.0;
354
+				OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
355
+				PRODUCT_BUNDLE_IDENTIFIER = io.ionic.starter;
356
+				PRODUCT_NAME = "$(TARGET_NAME)";
357
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
358
+				SWIFT_VERSION = 5.0;
359
+				TARGETED_DEVICE_FAMILY = "1,2";
360
+			};
361
+			name = Debug;
362
+		};
363
+		504EC3181FED79650016851F /* Release */ = {
364
+			isa = XCBuildConfiguration;
365
+			baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
366
+			buildSettings = {
367
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
368
+				CODE_SIGN_STYLE = Automatic;
369
+				CURRENT_PROJECT_VERSION = 1;
370
+				INFOPLIST_FILE = App/Info.plist;
371
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
372
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
373
+				MARKETING_VERSION = 1.0;
374
+				PRODUCT_BUNDLE_IDENTIFIER = io.ionic.starter;
375
+				PRODUCT_NAME = "$(TARGET_NAME)";
376
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
377
+				SWIFT_VERSION = 5.0;
378
+				TARGETED_DEVICE_FAMILY = "1,2";
379
+			};
380
+			name = Release;
381
+		};
382
+/* End XCBuildConfiguration section */
383
+
384
+/* Begin XCConfigurationList section */
385
+		504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = {
386
+			isa = XCConfigurationList;
387
+			buildConfigurations = (
388
+				504EC3141FED79650016851F /* Debug */,
389
+				504EC3151FED79650016851F /* Release */,
390
+			);
391
+			defaultConfigurationIsVisible = 0;
392
+			defaultConfigurationName = Release;
393
+		};
394
+		504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = {
395
+			isa = XCConfigurationList;
396
+			buildConfigurations = (
397
+				504EC3171FED79650016851F /* Debug */,
398
+				504EC3181FED79650016851F /* Release */,
399
+			);
400
+			defaultConfigurationIsVisible = 0;
401
+			defaultConfigurationName = Release;
402
+		};
403
+/* End XCConfigurationList section */
404
+	};
405
+	rootObject = 504EC2FC1FED79650016851F /* Project object */;
406
+}

+ 7 - 0
ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "self:App.xcodeproj">
6
+   </FileRef>
7
+</Workspace>

+ 10 - 0
ios/App/App.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:App.xcodeproj">
6
+   </FileRef>
7
+   <FileRef
8
+      location = "group:Pods/Pods.xcodeproj">
9
+   </FileRef>
10
+</Workspace>

+ 8 - 0
ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>IDEDidComputeMac32BitWarning</key>
6
+	<true/>
7
+</dict>
8
+</plist>

+ 49 - 0
ios/App/App/AppDelegate.swift

@@ -0,0 +1,49 @@
1
+import UIKit
2
+import Capacitor
3
+
4
+@UIApplicationMain
5
+class AppDelegate: UIResponder, UIApplicationDelegate {
6
+
7
+    var window: UIWindow?
8
+
9
+    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
10
+        // Override point for customization after application launch.
11
+        return true
12
+    }
13
+
14
+    func applicationWillResignActive(_ application: UIApplication) {
15
+        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
16
+        // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
17
+    }
18
+
19
+    func applicationDidEnterBackground(_ application: UIApplication) {
20
+        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
21
+        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
22
+    }
23
+
24
+    func applicationWillEnterForeground(_ application: UIApplication) {
25
+        // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
26
+    }
27
+
28
+    func applicationDidBecomeActive(_ application: UIApplication) {
29
+        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
30
+    }
31
+
32
+    func applicationWillTerminate(_ application: UIApplication) {
33
+        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
34
+    }
35
+
36
+    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
37
+        // Called when the app was launched with a url. Feel free to add additional processing here,
38
+        // but if you want the App API to support tracking app url opens, make sure to keep this call
39
+        return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
40
+    }
41
+
42
+    func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
43
+        // Called when the app was launched with an activity, including Universal Links.
44
+        // Feel free to add additional processing here, but if you want the App API to support
45
+        // tracking app url opens, make sure to keep this call
46
+        return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
47
+    }
48
+
49
+}

BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png


+ 116 - 0
ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,116 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "size" : "20x20",
5
+      "idiom" : "iphone",
6
+      "filename" : "AppIcon-20x20@2x.png",
7
+      "scale" : "2x"
8
+    },
9
+    {
10
+      "size" : "20x20",
11
+      "idiom" : "iphone",
12
+      "filename" : "AppIcon-20x20@3x.png",
13
+      "scale" : "3x"
14
+    },
15
+    {
16
+      "size" : "29x29",
17
+      "idiom" : "iphone",
18
+      "filename" : "AppIcon-29x29@2x-1.png",
19
+      "scale" : "2x"
20
+    },
21
+    {
22
+      "size" : "29x29",
23
+      "idiom" : "iphone",
24
+      "filename" : "AppIcon-29x29@3x.png",
25
+      "scale" : "3x"
26
+    },
27
+    {
28
+      "size" : "40x40",
29
+      "idiom" : "iphone",
30
+      "filename" : "AppIcon-40x40@2x.png",
31
+      "scale" : "2x"
32
+    },
33
+    {
34
+      "size" : "40x40",
35
+      "idiom" : "iphone",
36
+      "filename" : "AppIcon-40x40@3x.png",
37
+      "scale" : "3x"
38
+    },
39
+    {
40
+      "size" : "60x60",
41
+      "idiom" : "iphone",
42
+      "filename" : "AppIcon-60x60@2x.png",
43
+      "scale" : "2x"
44
+    },
45
+    {
46
+      "size" : "60x60",
47
+      "idiom" : "iphone",
48
+      "filename" : "AppIcon-60x60@3x.png",
49
+      "scale" : "3x"
50
+    },
51
+    {
52
+      "size" : "20x20",
53
+      "idiom" : "ipad",
54
+      "filename" : "AppIcon-20x20@1x.png",
55
+      "scale" : "1x"
56
+    },
57
+    {
58
+      "size" : "20x20",
59
+      "idiom" : "ipad",
60
+      "filename" : "AppIcon-20x20@2x-1.png",
61
+      "scale" : "2x"
62
+    },
63
+    {
64
+      "size" : "29x29",
65
+      "idiom" : "ipad",
66
+      "filename" : "AppIcon-29x29@1x.png",
67
+      "scale" : "1x"
68
+    },
69
+    {
70
+      "size" : "29x29",
71
+      "idiom" : "ipad",
72
+      "filename" : "AppIcon-29x29@2x.png",
73
+      "scale" : "2x"
74
+    },
75
+    {
76
+      "size" : "40x40",
77
+      "idiom" : "ipad",
78
+      "filename" : "AppIcon-40x40@1x.png",
79
+      "scale" : "1x"
80
+    },
81
+    {
82
+      "size" : "40x40",
83
+      "idiom" : "ipad",
84
+      "filename" : "AppIcon-40x40@2x-1.png",
85
+      "scale" : "2x"
86
+    },
87
+    {
88
+      "size" : "76x76",
89
+      "idiom" : "ipad",
90
+      "filename" : "AppIcon-76x76@1x.png",
91
+      "scale" : "1x"
92
+    },
93
+    {
94
+      "size" : "76x76",
95
+      "idiom" : "ipad",
96
+      "filename" : "AppIcon-76x76@2x.png",
97
+      "scale" : "2x"
98
+    },
99
+    {
100
+      "size" : "83.5x83.5",
101
+      "idiom" : "ipad",
102
+      "filename" : "AppIcon-83.5x83.5@2x.png",
103
+      "scale" : "2x"
104
+    },
105
+    {
106
+      "size" : "1024x1024",
107
+      "idiom" : "ios-marketing",
108
+      "filename" : "AppIcon-512@2x.png",
109
+      "scale" : "1x"
110
+    }
111
+  ],
112
+  "info" : {
113
+    "version" : 1,
114
+    "author" : "xcode"
115
+  }
116
+}

+ 6 - 0
ios/App/App/Assets.xcassets/Contents.json

@@ -0,0 +1,6 @@
1
+{
2
+  "info" : {
3
+    "version" : 1,
4
+    "author" : "xcode"
5
+  }
6
+}

+ 23 - 0
ios/App/App/Assets.xcassets/Splash.imageset/Contents.json

@@ -0,0 +1,23 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "splash-2732x2732-2.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "filename" : "splash-2732x2732-1.png",
11
+      "scale" : "2x"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "filename" : "splash-2732x2732.png",
16
+      "scale" : "3x"
17
+    }
18
+  ],
19
+  "info" : {
20
+    "version" : 1,
21
+    "author" : "xcode"
22
+  }
23
+}

BIN
ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png


BIN
ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png


BIN
ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png


+ 32 - 0
ios/App/App/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,32 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17132" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3
+    <device id="retina4_7" orientation="portrait" appearance="light"/>
4
+    <dependencies>
5
+        <deployment identifier="iOS"/>
6
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17105"/>
7
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
8
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9
+    </dependencies>
10
+    <scenes>
11
+        <!--View Controller-->
12
+        <scene sceneID="EHf-IW-A2E">
13
+            <objects>
14
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
15
+                    <imageView key="view" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Splash" id="snD-IY-ifK">
16
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
17
+                        <autoresizingMask key="autoresizingMask"/>
18
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
19
+                    </imageView>
20
+                </viewController>
21
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
22
+            </objects>
23
+            <point key="canvasLocation" x="53" y="375"/>
24
+        </scene>
25
+    </scenes>
26
+    <resources>
27
+        <image name="Splash" width="1366" height="1366"/>
28
+        <systemColor name="systemBackgroundColor">
29
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
30
+        </systemColor>
31
+    </resources>
32
+</document>

+ 19 - 0
ios/App/App/Base.lproj/Main.storyboard

@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3
+    <device id="retina4_7" orientation="portrait">
4
+        <adaptation id="fullscreen"/>
5
+    </device>
6
+    <dependencies>
7
+        <deployment identifier="iOS"/>
8
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
9
+    </dependencies>
10
+    <scenes>
11
+        <!--Bridge View Controller-->
12
+        <scene sceneID="tne-QT-ifu">
13
+            <objects>
14
+                <viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
15
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
16
+            </objects>
17
+        </scene>
18
+    </scenes>
19
+</document>

+ 49 - 0
ios/App/App/Info.plist

@@ -0,0 +1,49 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleDisplayName</key>
8
+        <string>ra100</string>
9
+	<key>CFBundleExecutable</key>
10
+	<string>$(EXECUTABLE_NAME)</string>
11
+	<key>CFBundleIdentifier</key>
12
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
+	<key>CFBundleInfoDictionaryVersion</key>
14
+	<string>6.0</string>
15
+	<key>CFBundleName</key>
16
+	<string>$(PRODUCT_NAME)</string>
17
+	<key>CFBundlePackageType</key>
18
+	<string>APPL</string>
19
+	<key>CFBundleShortVersionString</key>
20
+	<string>$(MARKETING_VERSION)</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>$(CURRENT_PROJECT_VERSION)</string>
23
+	<key>LSRequiresIPhoneOS</key>
24
+	<true/>
25
+	<key>UILaunchStoryboardName</key>
26
+	<string>LaunchScreen</string>
27
+	<key>UIMainStoryboardFile</key>
28
+	<string>Main</string>
29
+	<key>UIRequiredDeviceCapabilities</key>
30
+	<array>
31
+		<string>armv7</string>
32
+	</array>
33
+	<key>UISupportedInterfaceOrientations</key>
34
+	<array>
35
+		<string>UIInterfaceOrientationPortrait</string>
36
+		<string>UIInterfaceOrientationLandscapeLeft</string>
37
+		<string>UIInterfaceOrientationLandscapeRight</string>
38
+	</array>
39
+	<key>UISupportedInterfaceOrientations~ipad</key>
40
+	<array>
41
+		<string>UIInterfaceOrientationPortrait</string>
42
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
43
+		<string>UIInterfaceOrientationLandscapeLeft</string>
44
+		<string>UIInterfaceOrientationLandscapeRight</string>
45
+	</array>
46
+	<key>UIViewControllerBasedStatusBarAppearance</key>
47
+	<true/>
48
+</dict>
49
+</plist>

+ 27 - 0
ios/App/Podfile

@@ -0,0 +1,27 @@
1
+require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
2
+
3
+platform :ios, '13.0'
4
+use_frameworks!
5
+
6
+# workaround to avoid Xcode caching of Pods that requires
7
+# Product -> Clean Build Folder after new Cordova plugins installed
8
+# Requires CocoaPods 1.6 or newer
9
+install! 'cocoapods', :disable_input_output_paths => true
10
+
11
+def capacitor_pods
12
+  pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
13
+  pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
14
+  pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
15
+  pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
16
+  pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
17
+  pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
18
+end
19
+
20
+target 'App' do
21
+  capacitor_pods
22
+  # Add your Pods here
23
+end
24
+
25
+post_install do |installer|
26
+  assertDeploymentTarget(installer)
27
+end

Diferenças do arquivo suprimidas por serem muito extensas
+ 43 - 16987
package-lock.json


+ 1 - 0
package.json

@@ -22,6 +22,7 @@
22 22
     "@capacitor/app": "4.1.0",
23 23
     "@capacitor/core": "4.4.0",
24 24
     "@capacitor/haptics": "4.0.1",
25
+    "@capacitor/ios": "4.4.0",
25 26
     "@capacitor/keyboard": "4.0.1",
26 27
     "@capacitor/status-bar": "4.0.1",
27 28
     "@fortawesome/angular-fontawesome": "^0.11.1",

+ 1 - 1
src/app/home/home.page.html

@@ -72,4 +72,4 @@
72 72
     <img src="../../../assets/img-static/banner-320x100.jpeg" alt="">
73 73
   </ion-grid>
74 74
 
75
-</ion-content>
75
+</ion-content>

BIN
www/IBMPlexSansThai-Regular.ttf


BIN
www/IBMPlexSansThai-SemiBold.ttf


BIN
www/K2D-Light.ttf


BIN
www/Montserrat-Medium.ttf


BIN
www/Prompt-Medium.ttf


BIN
www/Prompt-Regular.ttf


Diferenças do arquivo suprimidas por serem muito extensas
+ 3244 - 0
www/assets/api/news-api.json


BIN
www/assets/fonts/IBMPlexSansThai-Regular.ttf


BIN
www/assets/fonts/IBMPlexSansThai-SemiBold.ttf


BIN
www/assets/fonts/K2D-Light.ttf


BIN
www/assets/fonts/Montserrat-Medium.ttf


BIN
www/assets/fonts/Montserrat-SemiBold.ttf


BIN
www/assets/fonts/Prompt-Light.ttf


BIN
www/assets/fonts/Prompt-Medium.ttf


BIN
www/assets/fonts/Prompt-Regular.ttf


BIN
www/assets/icon/favicon.png


BIN
www/assets/icon/logo-fm99.png


BIN
www/assets/img-static/SEI129887404-c4a9.jpg


BIN
www/assets/img-static/background_982645-1-min.png


BIN
www/assets/img-static/banner-250x250.jpeg


BIN
www/assets/img-static/banner-320x100.jpeg


BIN
www/assets/img-static/banner-320x50.jpeg


BIN
www/assets/img-static/bg-content-min.jpg


BIN
www/assets/img-static/fb-Ad-1.jpeg


BIN
www/assets/img-static/fb-Ad-2.jpeg


BIN
www/assets/img-static/fb-Ad-3.jpeg


BIN
www/assets/img-static/mqdefault-1.jpg


BIN
www/assets/img-static/mqdefault-2.jpg


BIN
www/assets/img-static/mqdefault-3.jpg


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/assets/shapes.svg


BIN
www/background_982645-1-min.png


BIN
www/bg-content-min.jpg


Diferenças do arquivo suprimidas por serem muito extensas
+ 1329 - 0
www/common.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/common.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 1823 - 0
www/default-node_modules_ionic_core_dist_esm_parse-71f28cd7_js-node_modules_ionic_core_dist_esm_t-0c999b.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/default-node_modules_ionic_core_dist_esm_parse-71f28cd7_js-node_modules_ionic_core_dist_esm_t-0c999b.js.map


+ 26 - 0
www/index.html

@@ -0,0 +1,26 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+<head>
5
+  <meta charset="utf-8"/>
6
+  <title>Ionic App</title>
7
+
8
+  <base href="/"/>
9
+
10
+  <meta name="color-scheme" content="light dark"/>
11
+  <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
12
+  <meta name="format-detection" content="telephone=no"/>
13
+  <meta name="msapplication-tap-highlight" content="no"/>
14
+
15
+  <link rel="icon" type="image/png" href="assets/icon/favicon.png"/>
16
+
17
+  <!-- add to homescreen for ios -->
18
+  <meta name="apple-mobile-web-app-capable" content="yes"/>
19
+  <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
20
+<link rel="stylesheet" href="styles.css"></head>
21
+
22
+<body>
23
+  <app-root></app-root>
24
+<script src="runtime.js" type="module"></script><script src="polyfills.js" type="module"></script><script src="vendor.js" type="module"></script><script src="main.js" type="module"></script></body>
25
+
26
+</html>

Diferenças do arquivo suprimidas por serem muito extensas
+ 501 - 0
www/main.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/main.js.map


+ 239 - 0
www/node_modules_ionic_core_dist_esm_index-0bc00b33_js.js

@@ -0,0 +1,239 @@
1
+"use strict";
2
+(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["node_modules_ionic_core_dist_esm_index-0bc00b33_js"],{
3
+
4
+/***/ 1612:
5
+/*!*************************************************************!*\
6
+  !*** ./node_modules/@ionic/core/dist/esm/index-0bc00b33.js ***!
7
+  \*************************************************************/
8
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
+
10
+__webpack_require__.r(__webpack_exports__);
11
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
+/* harmony export */   "startTapClick": () => (/* binding */ startTapClick)
13
+/* harmony export */ });
14
+/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 9234);
15
+/*!
16
+ * (C) Ionic http://ionicframework.com - MIT License
17
+ */
18
+
19
+
20
+const startTapClick = config => {
21
+  let lastTouch = -MOUSE_WAIT * 10;
22
+  let lastActivated = 0;
23
+  let activatableEle;
24
+  let activeRipple;
25
+  let activeDefer;
26
+  const useRippleEffect = config.getBoolean('animated', true) && config.getBoolean('rippleEffect', true);
27
+  const clearDefers = new WeakMap(); // Touch Events
28
+
29
+  const onTouchStart = ev => {
30
+    lastTouch = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_0__.u)(ev);
31
+    pointerDown(ev);
32
+  };
33
+
34
+  const onTouchEnd = ev => {
35
+    lastTouch = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_0__.u)(ev);
36
+    pointerUp(ev);
37
+  };
38
+
39
+  const onMouseDown = ev => {
40
+    // Ignore right clicks
41
+    if (ev.button === 2) {
42
+      return;
43
+    }
44
+
45
+    const t = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_0__.u)(ev) - MOUSE_WAIT;
46
+
47
+    if (lastTouch < t) {
48
+      pointerDown(ev);
49
+    }
50
+  };
51
+
52
+  const onMouseUp = ev => {
53
+    const t = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_0__.u)(ev) - MOUSE_WAIT;
54
+
55
+    if (lastTouch < t) {
56
+      pointerUp(ev);
57
+    }
58
+  };
59
+
60
+  const cancelActive = () => {
61
+    clearTimeout(activeDefer);
62
+    activeDefer = undefined;
63
+
64
+    if (activatableEle) {
65
+      removeActivated(false);
66
+      activatableEle = undefined;
67
+    }
68
+  };
69
+
70
+  const pointerDown = ev => {
71
+    if (activatableEle) {
72
+      return;
73
+    }
74
+
75
+    setActivatedElement(getActivatableTarget(ev), ev);
76
+  };
77
+
78
+  const pointerUp = ev => {
79
+    setActivatedElement(undefined, ev);
80
+  };
81
+
82
+  const setActivatedElement = (el, ev) => {
83
+    // do nothing
84
+    if (el && el === activatableEle) {
85
+      return;
86
+    }
87
+
88
+    clearTimeout(activeDefer);
89
+    activeDefer = undefined;
90
+    const {
91
+      x,
92
+      y
93
+    } = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_0__.p)(ev); // deactivate selected
94
+
95
+    if (activatableEle) {
96
+      if (clearDefers.has(activatableEle)) {
97
+        throw new Error('internal error');
98
+      }
99
+
100
+      if (!activatableEle.classList.contains(ACTIVATED)) {
101
+        addActivated(activatableEle, x, y);
102
+      }
103
+
104
+      removeActivated(true);
105
+    } // activate
106
+
107
+
108
+    if (el) {
109
+      const deferId = clearDefers.get(el);
110
+
111
+      if (deferId) {
112
+        clearTimeout(deferId);
113
+        clearDefers.delete(el);
114
+      }
115
+
116
+      const delay = isInstant(el) ? 0 : ADD_ACTIVATED_DEFERS;
117
+      el.classList.remove(ACTIVATED);
118
+      activeDefer = setTimeout(() => {
119
+        addActivated(el, x, y);
120
+        activeDefer = undefined;
121
+      }, delay);
122
+    }
123
+
124
+    activatableEle = el;
125
+  };
126
+
127
+  const addActivated = (el, x, y) => {
128
+    lastActivated = Date.now();
129
+    el.classList.add(ACTIVATED);
130
+    if (!useRippleEffect) return;
131
+    const rippleEffect = getRippleEffect(el);
132
+
133
+    if (rippleEffect !== null) {
134
+      removeRipple();
135
+      activeRipple = rippleEffect.addRipple(x, y);
136
+    }
137
+  };
138
+
139
+  const removeRipple = () => {
140
+    if (activeRipple !== undefined) {
141
+      activeRipple.then(remove => remove());
142
+      activeRipple = undefined;
143
+    }
144
+  };
145
+
146
+  const removeActivated = smooth => {
147
+    removeRipple();
148
+    const active = activatableEle;
149
+
150
+    if (!active) {
151
+      return;
152
+    }
153
+
154
+    const time = CLEAR_STATE_DEFERS - Date.now() + lastActivated;
155
+
156
+    if (smooth && time > 0 && !isInstant(active)) {
157
+      const deferId = setTimeout(() => {
158
+        active.classList.remove(ACTIVATED);
159
+        clearDefers.delete(active);
160
+      }, CLEAR_STATE_DEFERS);
161
+      clearDefers.set(active, deferId);
162
+    } else {
163
+      active.classList.remove(ACTIVATED);
164
+    }
165
+  };
166
+
167
+  const doc = document;
168
+  doc.addEventListener('ionGestureCaptured', cancelActive);
169
+  doc.addEventListener('touchstart', onTouchStart, true);
170
+  doc.addEventListener('touchcancel', onTouchEnd, true);
171
+  doc.addEventListener('touchend', onTouchEnd, true);
172
+  /**
173
+   * Tap click effects such as the ripple effect should
174
+   * not happen when scrolling. For example, if a user scrolls
175
+   * the page but also happens to do a touchstart on a button
176
+   * as part of the scroll, the ripple effect should not
177
+   * be dispatched. The ripple effect should only happen
178
+   * if the button is activated and the page is not scrolling.
179
+   *
180
+   * pointercancel is dispatched on a gesture when scrolling
181
+   * starts, so this lets us avoid having to listen for
182
+   * ion-content's scroll events.
183
+   */
184
+
185
+  doc.addEventListener('pointercancel', cancelActive, true);
186
+  doc.addEventListener('mousedown', onMouseDown, true);
187
+  doc.addEventListener('mouseup', onMouseUp, true);
188
+};
189
+
190
+const getActivatableTarget = ev => {
191
+  if (ev.composedPath !== undefined) {
192
+    /**
193
+     * composedPath returns EventTarget[]. However,
194
+     * objects other than Element can be targets too.
195
+     * For example, AudioContext can be a target. In this
196
+     * case, we know that the event is a UIEvent so we
197
+     * can assume that the path will contain either Element
198
+     * or ShadowRoot.
199
+     */
200
+    const path = ev.composedPath();
201
+
202
+    for (let i = 0; i < path.length - 2; i++) {
203
+      const el = path[i];
204
+
205
+      if (!(el instanceof ShadowRoot) && el.classList.contains('ion-activatable')) {
206
+        return el;
207
+      }
208
+    }
209
+  } else {
210
+    return ev.target.closest('.ion-activatable');
211
+  }
212
+};
213
+
214
+const isInstant = el => {
215
+  return el.classList.contains('ion-activatable-instant');
216
+};
217
+
218
+const getRippleEffect = el => {
219
+  if (el.shadowRoot) {
220
+    const ripple = el.shadowRoot.querySelector('ion-ripple-effect');
221
+
222
+    if (ripple) {
223
+      return ripple;
224
+    }
225
+  }
226
+
227
+  return el.querySelector('ion-ripple-effect');
228
+};
229
+
230
+const ACTIVATED = 'ion-activated';
231
+const ADD_ACTIVATED_DEFERS = 200;
232
+const CLEAR_STATE_DEFERS = 200;
233
+const MOUSE_WAIT = 2500;
234
+
235
+
236
+/***/ })
237
+
238
+}]);
239
+//# sourceMappingURL=node_modules_ionic_core_dist_esm_index-0bc00b33_js.js.map

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_index-0bc00b33_js.js.map


+ 526 - 0
www/node_modules_ionic_core_dist_esm_input-shims-6ed8f5a5_js.js

@@ -0,0 +1,526 @@
1
+"use strict";
2
+(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["node_modules_ionic_core_dist_esm_input-shims-6ed8f5a5_js"],{
3
+
4
+/***/ 4508:
5
+/*!*******************************************************************!*\
6
+  !*** ./node_modules/@ionic/core/dist/esm/input-shims-6ed8f5a5.js ***!
7
+  \*******************************************************************/
8
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
+
10
+__webpack_require__.r(__webpack_exports__);
11
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
+/* harmony export */   "startInputShims": () => (/* binding */ startInputShims)
13
+/* harmony export */ });
14
+/* harmony import */ var _Users_simplicoltd_projects_fm99_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 1670);
15
+/* harmony import */ var _index_5d0c8232_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index-5d0c8232.js */ 3081);
16
+/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 9234);
17
+/* harmony import */ var _index_c4b11676_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index-c4b11676.js */ 9273);
18
+
19
+
20
+/*!
21
+ * (C) Ionic http://ionicframework.com - MIT License
22
+ */
23
+
24
+
25
+
26
+const cloneMap = new WeakMap();
27
+
28
+const relocateInput = (componentEl, inputEl, shouldRelocate, inputRelativeY = 0) => {
29
+  if (cloneMap.has(componentEl) === shouldRelocate) {
30
+    return;
31
+  }
32
+
33
+  if (shouldRelocate) {
34
+    addClone(componentEl, inputEl, inputRelativeY);
35
+  } else {
36
+    removeClone(componentEl, inputEl);
37
+  }
38
+};
39
+
40
+const isFocused = input => {
41
+  return input === input.getRootNode().activeElement;
42
+};
43
+
44
+const addClone = (componentEl, inputEl, inputRelativeY) => {
45
+  // this allows for the actual input to receive the focus from
46
+  // the user's touch event, but before it receives focus, it
47
+  // moves the actual input to a location that will not screw
48
+  // up the app's layout, and does not allow the native browser
49
+  // to attempt to scroll the input into place (messing up headers/footers)
50
+  // the cloned input fills the area of where native input should be
51
+  // while the native input fakes out the browser by relocating itself
52
+  // before it receives the actual focus event
53
+  // We hide the focused input (with the visible caret) invisible by making it scale(0),
54
+  const parentEl = inputEl.parentNode; // DOM WRITES
55
+
56
+  const clonedEl = inputEl.cloneNode(false);
57
+  clonedEl.classList.add('cloned-input');
58
+  clonedEl.tabIndex = -1;
59
+  parentEl.appendChild(clonedEl);
60
+  cloneMap.set(componentEl, clonedEl);
61
+  const doc = componentEl.ownerDocument;
62
+  const tx = doc.dir === 'rtl' ? 9999 : -9999;
63
+  componentEl.style.pointerEvents = 'none';
64
+  inputEl.style.transform = `translate3d(${tx}px,${inputRelativeY}px,0) scale(0)`;
65
+};
66
+
67
+const removeClone = (componentEl, inputEl) => {
68
+  const clone = cloneMap.get(componentEl);
69
+
70
+  if (clone) {
71
+    cloneMap.delete(componentEl);
72
+    clone.remove();
73
+  }
74
+
75
+  componentEl.style.pointerEvents = '';
76
+  inputEl.style.transform = '';
77
+};
78
+
79
+const enableHideCaretOnScroll = (componentEl, inputEl, scrollEl) => {
80
+  if (!scrollEl || !inputEl) {
81
+    return () => {
82
+      return;
83
+    };
84
+  }
85
+
86
+  const scrollHideCaret = shouldHideCaret => {
87
+    if (isFocused(inputEl)) {
88
+      relocateInput(componentEl, inputEl, shouldHideCaret);
89
+    }
90
+  };
91
+
92
+  const onBlur = () => relocateInput(componentEl, inputEl, false);
93
+
94
+  const hideCaret = () => scrollHideCaret(true);
95
+
96
+  const showCaret = () => scrollHideCaret(false);
97
+
98
+  (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.a)(scrollEl, 'ionScrollStart', hideCaret);
99
+  (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.a)(scrollEl, 'ionScrollEnd', showCaret);
100
+  inputEl.addEventListener('blur', onBlur);
101
+  return () => {
102
+    (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.b)(scrollEl, 'ionScrollStart', hideCaret);
103
+    (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.b)(scrollEl, 'ionScrollEnd', showCaret);
104
+    inputEl.addEventListener('ionBlur', onBlur);
105
+  };
106
+};
107
+
108
+const SKIP_SELECTOR = 'input, textarea, [no-blur], [contenteditable]';
109
+
110
+const enableInputBlurring = () => {
111
+  let focused = true;
112
+  let didScroll = false;
113
+  const doc = document;
114
+
115
+  const onScroll = () => {
116
+    didScroll = true;
117
+  };
118
+
119
+  const onFocusin = () => {
120
+    focused = true;
121
+  };
122
+
123
+  const onTouchend = ev => {
124
+    // if app did scroll return early
125
+    if (didScroll) {
126
+      didScroll = false;
127
+      return;
128
+    }
129
+
130
+    const active = doc.activeElement;
131
+
132
+    if (!active) {
133
+      return;
134
+    } // only blur if the active element is a text-input or a textarea
135
+
136
+
137
+    if (active.matches(SKIP_SELECTOR)) {
138
+      return;
139
+    } // if the selected target is the active element, do not blur
140
+
141
+
142
+    const tapped = ev.target;
143
+
144
+    if (tapped === active) {
145
+      return;
146
+    }
147
+
148
+    if (tapped.matches(SKIP_SELECTOR) || tapped.closest(SKIP_SELECTOR)) {
149
+      return;
150
+    }
151
+
152
+    focused = false; // TODO: find a better way, why 50ms?
153
+
154
+    setTimeout(() => {
155
+      if (!focused) {
156
+        active.blur();
157
+      }
158
+    }, 50);
159
+  };
160
+
161
+  (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.a)(doc, 'ionScrollStart', onScroll);
162
+  doc.addEventListener('focusin', onFocusin, true);
163
+  doc.addEventListener('touchend', onTouchend, false);
164
+  return () => {
165
+    (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.b)(doc, 'ionScrollStart', onScroll, true);
166
+    doc.removeEventListener('focusin', onFocusin, true);
167
+    doc.removeEventListener('touchend', onTouchend, false);
168
+  };
169
+};
170
+
171
+const SCROLL_ASSIST_SPEED = 0.3;
172
+
173
+const getScrollData = (componentEl, contentEl, keyboardHeight) => {
174
+  var _a;
175
+
176
+  const itemEl = (_a = componentEl.closest('ion-item,[ion-item]')) !== null && _a !== void 0 ? _a : componentEl;
177
+  return calcScrollData(itemEl.getBoundingClientRect(), contentEl.getBoundingClientRect(), keyboardHeight, componentEl.ownerDocument.defaultView.innerHeight);
178
+};
179
+
180
+const calcScrollData = (inputRect, contentRect, keyboardHeight, platformHeight) => {
181
+  // compute input's Y values relative to the body
182
+  const inputTop = inputRect.top;
183
+  const inputBottom = inputRect.bottom; // compute visible area
184
+
185
+  const visibleAreaTop = contentRect.top;
186
+  const visibleAreaBottom = Math.min(contentRect.bottom, platformHeight - keyboardHeight); // compute safe area
187
+
188
+  const safeAreaTop = visibleAreaTop + 15;
189
+  const safeAreaBottom = visibleAreaBottom * 0.75; // figure out if each edge of the input is within the safe area
190
+
191
+  const distanceToBottom = safeAreaBottom - inputBottom;
192
+  const distanceToTop = safeAreaTop - inputTop; // desiredScrollAmount is the negated distance to the safe area according to our calculations.
193
+
194
+  const desiredScrollAmount = Math.round(distanceToBottom < 0 ? -distanceToBottom : distanceToTop > 0 ? -distanceToTop : 0); // our calculations make some assumptions that aren't always true, like the keyboard being closed when an input
195
+  // gets focus, so make sure we don't scroll the input above the visible area
196
+
197
+  const scrollAmount = Math.min(desiredScrollAmount, inputTop - visibleAreaTop);
198
+  const distance = Math.abs(scrollAmount);
199
+  const duration = distance / SCROLL_ASSIST_SPEED;
200
+  const scrollDuration = Math.min(400, Math.max(150, duration));
201
+  return {
202
+    scrollAmount,
203
+    scrollDuration,
204
+    scrollPadding: keyboardHeight,
205
+    inputSafeY: -(inputTop - safeAreaTop) + 4
206
+  };
207
+};
208
+
209
+const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardHeight) => {
210
+  let coord;
211
+
212
+  const touchStart = ev => {
213
+    coord = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.p)(ev);
214
+  };
215
+
216
+  const touchEnd = ev => {
217
+    // input cover touchend/mouseup
218
+    if (!coord) {
219
+      return;
220
+    } // get where the touchend/mouseup ended
221
+
222
+
223
+    const endCoord = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.p)(ev); // focus this input if the pointer hasn't moved XX pixels
224
+    // and the input doesn't already have focus
225
+
226
+    if (!hasPointerMoved(6, coord, endCoord) && !isFocused(inputEl)) {
227
+      // begin the input focus process
228
+      jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight);
229
+    }
230
+  };
231
+
232
+  componentEl.addEventListener('touchstart', touchStart, {
233
+    capture: true,
234
+    passive: true
235
+  });
236
+  componentEl.addEventListener('touchend', touchEnd, true);
237
+  return () => {
238
+    componentEl.removeEventListener('touchstart', touchStart, true);
239
+    componentEl.removeEventListener('touchend', touchEnd, true);
240
+  };
241
+};
242
+
243
+const jsSetFocus = /*#__PURE__*/function () {
244
+  var _ref = (0,_Users_simplicoltd_projects_fm99_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (componentEl, inputEl, contentEl, footerEl, keyboardHeight) {
245
+    if (!contentEl && !footerEl) {
246
+      return;
247
+    }
248
+
249
+    const scrollData = getScrollData(componentEl, contentEl || footerEl, keyboardHeight);
250
+
251
+    if (contentEl && Math.abs(scrollData.scrollAmount) < 4) {
252
+      // the text input is in a safe position that doesn't
253
+      // require it to be scrolled into view, just set focus now
254
+      inputEl.focus();
255
+      return;
256
+    } // temporarily move the focus to the focus holder so the browser
257
+    // doesn't freak out while it's trying to get the input in place
258
+    // at this point the native text input still does not have focus
259
+
260
+
261
+    relocateInput(componentEl, inputEl, true, scrollData.inputSafeY);
262
+    inputEl.focus();
263
+    /**
264
+     * Relocating/Focusing input causes the
265
+     * click event to be cancelled, so
266
+     * manually fire one here.
267
+     */
268
+
269
+    (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.r)(() => componentEl.click());
270
+
271
+    if (typeof window !== 'undefined') {
272
+      let scrollContentTimeout;
273
+
274
+      const scrollContent = /*#__PURE__*/function () {
275
+        var _ref2 = (0,_Users_simplicoltd_projects_fm99_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
276
+          // clean up listeners and timeouts
277
+          if (scrollContentTimeout !== undefined) {
278
+            clearTimeout(scrollContentTimeout);
279
+          }
280
+
281
+          window.removeEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
282
+          window.removeEventListener('ionKeyboardDidShow', scrollContent); // scroll the input into place
283
+
284
+          if (contentEl) {
285
+            yield (0,_index_5d0c8232_js__WEBPACK_IMPORTED_MODULE_1__.c)(contentEl, 0, scrollData.scrollAmount, scrollData.scrollDuration);
286
+          } // the scroll view is in the correct position now
287
+          // give the native text input focus
288
+
289
+
290
+          relocateInput(componentEl, inputEl, false, scrollData.inputSafeY); // ensure this is the focused input
291
+
292
+          inputEl.focus();
293
+        });
294
+
295
+        return function scrollContent() {
296
+          return _ref2.apply(this, arguments);
297
+        };
298
+      }();
299
+
300
+      const doubleKeyboardEventListener = () => {
301
+        window.removeEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
302
+        window.addEventListener('ionKeyboardDidShow', scrollContent);
303
+      };
304
+
305
+      if (contentEl) {
306
+        const scrollEl = yield (0,_index_5d0c8232_js__WEBPACK_IMPORTED_MODULE_1__.g)(contentEl);
307
+        /**
308
+         * scrollData will only consider the amount we need
309
+         * to scroll in order to properly bring the input
310
+         * into view. It will not consider the amount
311
+         * we can scroll in the content element.
312
+         * As a result, scrollData may request a greater
313
+         * scroll position than is currently available
314
+         * in the DOM. If this is the case, we need to
315
+         * wait for the webview to resize/the keyboard
316
+         * to show in order for additional scroll
317
+         * bandwidth to become available.
318
+         */
319
+
320
+        const totalScrollAmount = scrollEl.scrollHeight - scrollEl.clientHeight;
321
+
322
+        if (scrollData.scrollAmount > totalScrollAmount - scrollEl.scrollTop) {
323
+          /**
324
+           * On iOS devices, the system will show a "Passwords" bar above the keyboard
325
+           * after the initial keyboard is shown. This prevents the webview from resizing
326
+           * until the "Passwords" bar is shown, so we need to wait for that to happen first.
327
+           */
328
+          if (inputEl.type === 'password') {
329
+            // Add 50px to account for the "Passwords" bar
330
+            scrollData.scrollAmount += 50;
331
+            window.addEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
332
+          } else {
333
+            window.addEventListener('ionKeyboardDidShow', scrollContent);
334
+          }
335
+          /**
336
+           * This should only fire in 2 instances:
337
+           * 1. The app is very slow.
338
+           * 2. The app is running in a browser on an old OS
339
+           * that does not support Ionic Keyboard Events
340
+           */
341
+
342
+
343
+          scrollContentTimeout = setTimeout(scrollContent, 1000);
344
+          return;
345
+        }
346
+      }
347
+
348
+      scrollContent();
349
+    }
350
+  });
351
+
352
+  return function jsSetFocus(_x, _x2, _x3, _x4, _x5) {
353
+    return _ref.apply(this, arguments);
354
+  };
355
+}();
356
+
357
+const hasPointerMoved = (threshold, startCoord, endCoord) => {
358
+  if (startCoord && endCoord) {
359
+    const deltaX = startCoord.x - endCoord.x;
360
+    const deltaY = startCoord.y - endCoord.y;
361
+    const distance = deltaX * deltaX + deltaY * deltaY;
362
+    return distance > threshold * threshold;
363
+  }
364
+
365
+  return false;
366
+};
367
+
368
+const PADDING_TIMER_KEY = '$ionPaddingTimer';
369
+
370
+const enableScrollPadding = keyboardHeight => {
371
+  const doc = document;
372
+
373
+  const onFocusin = ev => {
374
+    setScrollPadding(ev.target, keyboardHeight);
375
+  };
376
+
377
+  const onFocusout = ev => {
378
+    setScrollPadding(ev.target, 0);
379
+  };
380
+
381
+  doc.addEventListener('focusin', onFocusin);
382
+  doc.addEventListener('focusout', onFocusout);
383
+  return () => {
384
+    doc.removeEventListener('focusin', onFocusin);
385
+    doc.removeEventListener('focusout', onFocusout);
386
+  };
387
+};
388
+
389
+const setScrollPadding = (input, keyboardHeight) => {
390
+  var _a, _b;
391
+
392
+  if (input.tagName !== 'INPUT') {
393
+    return;
394
+  }
395
+
396
+  if (input.parentElement && input.parentElement.tagName === 'ION-INPUT') {
397
+    return;
398
+  }
399
+
400
+  if (((_b = (_a = input.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.tagName) === 'ION-SEARCHBAR') {
401
+    return;
402
+  }
403
+
404
+  const el = (0,_index_5d0c8232_js__WEBPACK_IMPORTED_MODULE_1__.f)(input);
405
+
406
+  if (el === null) {
407
+    return;
408
+  }
409
+
410
+  const timer = el[PADDING_TIMER_KEY];
411
+
412
+  if (timer) {
413
+    clearTimeout(timer);
414
+  }
415
+
416
+  if (keyboardHeight > 0) {
417
+    el.style.setProperty('--keyboard-offset', `${keyboardHeight}px`);
418
+  } else {
419
+    el[PADDING_TIMER_KEY] = setTimeout(() => {
420
+      el.style.setProperty('--keyboard-offset', '0px');
421
+    }, 120);
422
+  }
423
+};
424
+
425
+const INPUT_BLURRING = true;
426
+const SCROLL_PADDING = true;
427
+
428
+const startInputShims = config => {
429
+  const doc = document;
430
+  const keyboardHeight = config.getNumber('keyboardHeight', 290);
431
+  const scrollAssist = config.getBoolean('scrollAssist', true);
432
+  const hideCaret = config.getBoolean('hideCaretOnScroll', true);
433
+  const inputBlurring = config.getBoolean('inputBlurring', true);
434
+  const scrollPadding = config.getBoolean('scrollPadding', true);
435
+  const inputs = Array.from(doc.querySelectorAll('ion-input, ion-textarea'));
436
+  const hideCaretMap = new WeakMap();
437
+  const scrollAssistMap = new WeakMap();
438
+
439
+  const registerInput = /*#__PURE__*/function () {
440
+    var _ref3 = (0,_Users_simplicoltd_projects_fm99_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (componentEl) {
441
+      yield new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.c)(componentEl, resolve));
442
+      const inputRoot = componentEl.shadowRoot || componentEl;
443
+      const inputEl = inputRoot.querySelector('input') || inputRoot.querySelector('textarea');
444
+      const scrollEl = (0,_index_5d0c8232_js__WEBPACK_IMPORTED_MODULE_1__.f)(componentEl);
445
+      const footerEl = !scrollEl ? componentEl.closest('ion-footer') : null;
446
+
447
+      if (!inputEl) {
448
+        return;
449
+      }
450
+
451
+      if (!!scrollEl && hideCaret && !hideCaretMap.has(componentEl)) {
452
+        const rmFn = enableHideCaretOnScroll(componentEl, inputEl, scrollEl);
453
+        hideCaretMap.set(componentEl, rmFn);
454
+      }
455
+      /**
456
+       * date/datetime-locale inputs on mobile devices show date picker
457
+       * overlays instead of keyboards. As a result, scroll assist is
458
+       * not needed. This also works around a bug in iOS <16 where
459
+       * scroll assist causes the browser to lock up. See FW-1997.
460
+       */
461
+
462
+
463
+      const isDateInput = inputEl.type === 'date' || inputEl.type === 'datetime-local';
464
+
465
+      if (!isDateInput && (!!scrollEl || !!footerEl) && scrollAssist && !scrollAssistMap.has(componentEl)) {
466
+        const rmFn = enableScrollAssist(componentEl, inputEl, scrollEl, footerEl, keyboardHeight);
467
+        scrollAssistMap.set(componentEl, rmFn);
468
+      }
469
+    });
470
+
471
+    return function registerInput(_x6) {
472
+      return _ref3.apply(this, arguments);
473
+    };
474
+  }();
475
+
476
+  const unregisterInput = componentEl => {
477
+    if (hideCaret) {
478
+      const fn = hideCaretMap.get(componentEl);
479
+
480
+      if (fn) {
481
+        fn();
482
+      }
483
+
484
+      hideCaretMap.delete(componentEl);
485
+    }
486
+
487
+    if (scrollAssist) {
488
+      const fn = scrollAssistMap.get(componentEl);
489
+
490
+      if (fn) {
491
+        fn();
492
+      }
493
+
494
+      scrollAssistMap.delete(componentEl);
495
+    }
496
+  };
497
+
498
+  if (inputBlurring && INPUT_BLURRING) {
499
+    enableInputBlurring();
500
+  }
501
+
502
+  if (scrollPadding && SCROLL_PADDING) {
503
+    enableScrollPadding(keyboardHeight);
504
+  } // Input might be already loaded in the DOM before ion-device-hacks did.
505
+  // At this point we need to look for all of the inputs not registered yet
506
+  // and register them.
507
+
508
+
509
+  for (const input of inputs) {
510
+    registerInput(input);
511
+  }
512
+
513
+  doc.addEventListener('ionInputDidLoad', ev => {
514
+    registerInput(ev.detail);
515
+  });
516
+  doc.addEventListener('ionInputDidUnload', ev => {
517
+    unregisterInput(ev.detail);
518
+  });
519
+};
520
+
521
+
522
+
523
+/***/ })
524
+
525
+}]);
526
+//# sourceMappingURL=node_modules_ionic_core_dist_esm_input-shims-6ed8f5a5_js.js.map

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_input-shims-6ed8f5a5_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 799 - 0
www/node_modules_ionic_core_dist_esm_ion-accordion_2_entry_js.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-accordion_2_entry_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 450 - 0
www/node_modules_ionic_core_dist_esm_ion-action-sheet_entry_js.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-action-sheet_entry_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 780 - 0
www/node_modules_ionic_core_dist_esm_ion-alert_entry_js.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-alert_entry_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 1726 - 0
www/node_modules_ionic_core_dist_esm_ion-app_8_entry_js.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-app_8_entry_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 160 - 0
www/node_modules_ionic_core_dist_esm_ion-avatar_3_entry_js.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-avatar_3_entry_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 257 - 0
www/node_modules_ionic_core_dist_esm_ion-back-button_entry_js.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-back-button_entry_js.js.map


+ 97 - 0
www/node_modules_ionic_core_dist_esm_ion-backdrop_entry_js.js

@@ -0,0 +1,97 @@
1
+"use strict";
2
+(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["node_modules_ionic_core_dist_esm_ion-backdrop_entry_js"],{
3
+
4
+/***/ 3059:
5
+/*!*****************************************************************!*\
6
+  !*** ./node_modules/@ionic/core/dist/esm/ion-backdrop.entry.js ***!
7
+  \*****************************************************************/
8
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
+
10
+__webpack_require__.r(__webpack_exports__);
11
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
+/* harmony export */   "ion_backdrop": () => (/* binding */ Backdrop)
13
+/* harmony export */ });
14
+/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-8e692445.js */ 1559);
15
+/* harmony import */ var _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-c95cf239.js */ 8607);
16
+/* harmony import */ var _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gesture-controller-17060b7c.js */ 6379);
17
+/*!
18
+ * (C) Ionic http://ionicframework.com - MIT License
19
+ */
20
+
21
+
22
+
23
+const backdropIosCss = ":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";
24
+const backdropMdCss = ":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";
25
+const Backdrop = class {
26
+  constructor(hostRef) {
27
+    (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.r)(this, hostRef);
28
+    this.ionBackdropTap = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.e)(this, "ionBackdropTap", 7);
29
+    this.blocker = _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_2__.G.createBlocker({
30
+      disableScroll: true
31
+    });
32
+    /**
33
+     * If `true`, the backdrop will be visible.
34
+     */
35
+
36
+    this.visible = true;
37
+    /**
38
+     * If `true`, the backdrop will can be clicked and will emit the `ionBackdropTap` event.
39
+     */
40
+
41
+    this.tappable = true;
42
+    /**
43
+     * If `true`, the backdrop will stop propagation on tap.
44
+     */
45
+
46
+    this.stopPropagation = true;
47
+  }
48
+
49
+  connectedCallback() {
50
+    if (this.stopPropagation) {
51
+      this.blocker.block();
52
+    }
53
+  }
54
+
55
+  disconnectedCallback() {
56
+    this.blocker.unblock();
57
+  }
58
+
59
+  onMouseDown(ev) {
60
+    this.emitTap(ev);
61
+  }
62
+
63
+  emitTap(ev) {
64
+    if (this.stopPropagation) {
65
+      ev.preventDefault();
66
+      ev.stopPropagation();
67
+    }
68
+
69
+    if (this.tappable) {
70
+      this.ionBackdropTap.emit();
71
+    }
72
+  }
73
+
74
+  render() {
75
+    const mode = (0,_ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__.b)(this);
76
+    return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.H, {
77
+      tabindex: "-1",
78
+      "aria-hidden": "true",
79
+      class: {
80
+        [mode]: true,
81
+        'backdrop-hide': !this.visible,
82
+        'backdrop-no-tappable': !this.tappable
83
+      }
84
+    });
85
+  }
86
+
87
+};
88
+Backdrop.style = {
89
+  ios: backdropIosCss,
90
+  md: backdropMdCss
91
+};
92
+
93
+
94
+/***/ })
95
+
96
+}]);
97
+//# sourceMappingURL=node_modules_ionic_core_dist_esm_ion-backdrop_entry_js.js.map

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-backdrop_entry_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 414 - 0
www/node_modules_ionic_core_dist_esm_ion-breadcrumb_2_entry_js.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-breadcrumb_2_entry_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 770 - 0
www/node_modules_ionic_core_dist_esm_ion-button_2_entry_js.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
www/node_modules_ionic_core_dist_esm_ion-button_2_entry_js.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 299 - 0
www/node_modules_ionic_core_dist_esm_ion-card_5_entry_js.js


+ 0 - 0
www/node_modules_ionic_core_dist_esm_ion-card_5_entry_js.js.map


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff

tum/whitesports - Gogs: Simplico Git Service

説明なし

class-wp-list-table.php 41KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525
  1. <?php
  2. /**
  3. * Administration API: WP_List_Table class
  4. *
  5. * @package WordPress
  6. * @subpackage List_Table
  7. * @since 3.1.0
  8. */
  9. /**
  10. * Base class for displaying a list of items in an ajaxified HTML table.
  11. *
  12. * @since 3.1.0
  13. * @access private
  14. */
  15. class WP_List_Table {
  16. /**
  17. * The current list of items.
  18. *
  19. * @since 3.1.0
  20. * @var array
  21. */
  22. public $items;
  23. /**
  24. * Various information about the current table.
  25. *
  26. * @since 3.1.0
  27. * @var array
  28. */
  29. protected $_args;
  30. /**
  31. * Various information needed for displaying the pagination.
  32. *
  33. * @since 3.1.0
  34. * @var array
  35. */
  36. protected $_pagination_args = array();
  37. /**
  38. * The current screen.
  39. *
  40. * @since 3.1.0
  41. * @var WP_Screen
  42. */
  43. protected $screen;
  44. /**
  45. * Cached bulk actions.
  46. *
  47. * @since 3.1.0
  48. * @var array
  49. */
  50. private $_actions;
  51. /**
  52. * Cached pagination output.
  53. *
  54. * @since 3.1.0
  55. * @var string
  56. */
  57. private $_pagination;
  58. /**
  59. * The view switcher modes.
  60. *
  61. * @since 4.1.0
  62. * @var array
  63. */
  64. protected $modes = array();
  65. /**
  66. * Stores the value returned by ->get_column_info().
  67. *
  68. * @since 4.1.0
  69. * @var array
  70. */
  71. protected $_column_headers;
  72. /**
  73. * {@internal Missing Summary}
  74. *
  75. * @var array
  76. */
  77. protected $compat_fields = array( '_args', '_pagination_args', 'screen', '_actions', '_pagination' );
  78. /**
  79. * {@internal Missing Summary}
  80. *
  81. * @var array
  82. */
  83. protected $compat_methods = array(
  84. 'set_pagination_args',
  85. 'get_views',
  86. 'get_bulk_actions',
  87. 'bulk_actions',
  88. 'row_actions',
  89. 'months_dropdown',
  90. 'view_switcher',
  91. 'comments_bubble',
  92. 'get_items_per_page',
  93. 'pagination',
  94. 'get_sortable_columns',
  95. 'get_column_info',
  96. 'get_table_classes',
  97. 'display_tablenav',
  98. 'extra_tablenav',
  99. 'single_row_columns',
  100. );
  101. /**
  102. * Constructor.
  103. *
  104. * The child class should call this constructor from its own constructor to override
  105. * the default $args.
  106. *
  107. * @since 3.1.0
  108. *
  109. * @param array|string $args {
  110. * Array or string of arguments.
  111. *
  112. * @type string $plural Plural value used for labels and the objects being listed.
  113. * This affects things such as CSS class-names and nonces used
  114. * in the list table, e.g. 'posts'. Default empty.
  115. * @type string $singular Singular label for an object being listed, e.g. 'post'.
  116. * Default empty
  117. * @type bool $ajax Whether the list table supports Ajax. This includes loading
  118. * and sorting data, for example. If true, the class will call
  119. * the _js_vars() method in the footer to provide variables
  120. * to any scripts handling Ajax events. Default false.
  121. * @type string $screen String containing the hook name used to determine the current
  122. * screen. If left null, the current screen will be automatically set.
  123. * Default null.
  124. * }
  125. */
  126. public function __construct( $args = array() ) {
  127. $args = wp_parse_args(
  128. $args,
  129. array(
  130. 'plural' => '',
  131. 'singular' => '',
  132. 'ajax' => false,
  133. 'screen' => null,
  134. )
  135. );
  136. $this->screen = convert_to_screen( $args['screen'] );
  137. add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
  138. if ( ! $args['plural'] ) {
  139. $args['plural'] = $this->screen->base;
  140. }
  141. $args['plural'] = sanitize_key( $args['plural'] );
  142. $args['singular'] = sanitize_key( $args['singular'] );
  143. $this->_args = $args;
  144. if ( $args['ajax'] ) {
  145. // wp_enqueue_script( 'list-table' );
  146. add_action( 'admin_footer', array( $this, '_js_vars' ) );
  147. }
  148. if ( empty( $this->modes ) ) {
  149. $this->modes = array(
  150. 'list' => __( 'Compact view' ),
  151. 'excerpt' => __( 'Extended view' ),
  152. );
  153. }
  154. }
  155. /**
  156. * Make private properties readable for backward compatibility.
  157. *
  158. * @since 4.0.0
  159. *
  160. * @param string $name Property to get.
  161. * @return mixed Property.
  162. */
  163. public function __get( $name ) {
  164. if ( in_array( $name, $this->compat_fields, true ) ) {
  165. return $this->$name;
  166. }
  167. }
  168. /**
  169. * Make private properties settable for backward compatibility.
  170. *
  171. * @since 4.0.0
  172. *
  173. * @param string $name Property to check if set.
  174. * @param mixed $value Property value.
  175. * @return mixed Newly-set property.
  176. */
  177. public function __set( $name, $value ) {
  178. if ( in_array( $name, $this->compat_fields, true ) ) {
  179. return $this->$name = $value;
  180. }
  181. }
  182. /**
  183. * Make private properties checkable for backward compatibility.
  184. *
  185. * @since 4.0.0
  186. *
  187. * @param string $name Property to check if set.
  188. * @return bool Whether the property is set.
  189. */
  190. public function __isset( $name ) {
  191. if ( in_array( $name, $this->compat_fields, true ) ) {
  192. return isset( $this->$name );
  193. }
  194. }
  195. /**
  196. * Make private properties un-settable for backward compatibility.
  197. *
  198. * @since 4.0.0
  199. *
  200. * @param string $name Property to unset.
  201. */
  202. public function __unset( $name ) {
  203. if ( in_array( $name, $this->compat_fields, true ) ) {
  204. unset( $this->$name );
  205. }
  206. }
  207. /**
  208. * Make private/protected methods readable for backward compatibility.
  209. *
  210. * @since 4.0.0
  211. *
  212. * @param string $name Method to call.
  213. * @param array $arguments Arguments to pass when calling.
  214. * @return mixed|bool Return value of the callback, false otherwise.
  215. */
  216. public function __call( $name, $arguments ) {
  217. if ( in_array( $name, $this->compat_methods, true ) ) {
  218. return $this->$name( ...$arguments );
  219. }
  220. return false;
  221. }
  222. /**
  223. * Checks the current user's permissions
  224. *
  225. * @since 3.1.0
  226. * @abstract
  227. */
  228. public function ajax_user_can() {
  229. die( 'function WP_List_Table::ajax_user_can() must be overridden in a subclass.' );
  230. }
  231. /**
  232. * Prepares the list of items for displaying.
  233. *
  234. * @uses WP_List_Table::set_pagination_args()
  235. *
  236. * @since 3.1.0
  237. * @abstract
  238. */
  239. public function prepare_items() {
  240. die( 'function WP_List_Table::prepare_items() must be overridden in a subclass.' );
  241. }
  242. /**
  243. * An internal method that sets all the necessary pagination arguments
  244. *
  245. * @since 3.1.0
  246. *
  247. * @param array|string $args Array or string of arguments with information about the pagination.
  248. */
  249. protected function set_pagination_args( $args ) {
  250. $args = wp_parse_args(
  251. $args,
  252. array(
  253. 'total_items' => 0,
  254. 'total_pages' => 0,
  255. 'per_page' => 0,
  256. )
  257. );
  258. if ( ! $args['total_pages'] && $args['per_page'] > 0 ) {
  259. $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
  260. }
  261. // Redirect if page number is invalid and headers are not already sent.
  262. if ( ! headers_sent() && ! wp_doing_ajax() && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
  263. wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
  264. exit;
  265. }
  266. $this->_pagination_args = $args;
  267. }
  268. /**
  269. * Access the pagination args.
  270. *
  271. * @since 3.1.0
  272. *
  273. * @param string $key Pagination argument to retrieve. Common values include 'total_items',
  274. * 'total_pages', 'per_page', or 'infinite_scroll'.
  275. * @return int Number of items that correspond to the given pagination argument.
  276. */
  277. public function get_pagination_arg( $key ) {
  278. if ( 'page' === $key ) {
  279. return $this->get_pagenum();
  280. }
  281. if ( isset( $this->_pagination_args[ $key ] ) ) {
  282. return $this->_pagination_args[ $key ];
  283. }
  284. }
  285. /**
  286. * Whether the table has items to display or not
  287. *
  288. * @since 3.1.0
  289. *
  290. * @return bool
  291. */
  292. public function has_items() {
  293. return ! empty( $this->items );
  294. }
  295. /**
  296. * Message to be displayed when there are no items
  297. *
  298. * @since 3.1.0
  299. */
  300. public function no_items() {
  301. _e( 'No items found.' );
  302. }
  303. /**
  304. * Displays the search box.
  305. *
  306. * @since 3.1.0
  307. *
  308. * @param string $text The 'submit' button label.
  309. * @param string $input_id ID attribute value for the search input field.
  310. */
  311. public function search_box( $text, $input_id ) {
  312. if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) {
  313. return;
  314. }
  315. $input_id = $input_id . '-search-input';
  316. if ( ! empty( $_REQUEST['orderby'] ) ) {
  317. echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
  318. }
  319. if ( ! empty( $_REQUEST['order'] ) ) {
  320. echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
  321. }
  322. if ( ! empty( $_REQUEST['post_mime_type'] ) ) {
  323. echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
  324. }
  325. if ( ! empty( $_REQUEST['detached'] ) ) {
  326. echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
  327. }
  328. ?>
  329. <p class="search-box">
  330. <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
  331. <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
  332. <?php submit_button( $text, '', '', false, array( 'id' => 'search-submit' ) ); ?>
  333. </p>
  334. <?php
  335. }
  336. /**
  337. * Gets the list of views available on this table.
  338. *
  339. * The format is an associative array:
  340. * - `'id' => 'link'`
  341. *
  342. * @since 3.1.0
  343. *
  344. * @return array
  345. */
  346. protected function get_views() {
  347. return array();
  348. }
  349. /**
  350. * Displays the list of views available on this table.
  351. *
  352. * @since 3.1.0
  353. */
  354. public function views() {
  355. $views = $this->get_views();
  356. /**
  357. * Filters the list of available list table views.
  358. *
  359. * The dynamic portion of the hook name, `$this->screen->id`, refers
  360. * to the ID of the current screen.
  361. *
  362. * @since 3.1.0
  363. *
  364. * @param string[] $views An array of available list table views.
  365. */
  366. $views = apply_filters( "views_{$this->screen->id}", $views );
  367. if ( empty( $views ) ) {
  368. return;
  369. }
  370. $this->screen->render_screen_reader_content( 'heading_views' );
  371. echo "<ul class='subsubsub'>\n";
  372. foreach ( $views as $class => $view ) {
  373. $views[ $class ] = "\t<li class='$class'>$view";
  374. }
  375. echo implode( " |</li>\n", $views ) . "</li>\n";
  376. echo '</ul>';
  377. }
  378. /**
  379. * Retrieves the list of bulk actions available for this table.
  380. *
  381. * The format is an associative array where each element represents either a top level option value and label, or
  382. * an array representing an optgroup and its options.
  383. *
  384. * For a standard option, the array element key is the field value and the array element value is the field label.
  385. *
  386. * For an optgroup, the array element key is the label and the array element value is an associative array of
  387. * options as above.
  388. *
  389. * Example:
  390. *
  391. * [
  392. * 'edit' => 'Edit',
  393. * 'delete' => 'Delete',
  394. * 'Change State' => [
  395. * 'feature' => 'Featured',
  396. * 'sale' => 'On Sale',
  397. * ]
  398. * ]
  399. *
  400. * @since 3.1.0
  401. * @since 5.6.0 A bulk action can now contain an array of options in order to create an optgroup.
  402. *
  403. * @return array
  404. */
  405. protected function get_bulk_actions() {
  406. return array();
  407. }
  408. /**
  409. * Displays the bulk actions dropdown.
  410. *
  411. * @since 3.1.0
  412. *
  413. * @param string $which The location of the bulk actions: 'top' or 'bottom'.
  414. * This is designated as optional for backward compatibility.
  415. */
  416. protected function bulk_actions( $which = '' ) {
  417. if ( is_null( $this->_actions ) ) {
  418. $this->_actions = $this->get_bulk_actions();
  419. /**
  420. * Filters the items in the bulk actions menu of the list table.
  421. *
  422. * The dynamic portion of the hook name, `$this->screen->id`, refers
  423. * to the ID of the current screen.
  424. *
  425. * @since 3.1.0
  426. * @since 5.6.0 A bulk action can now contain an array of options in order to create an optgroup.
  427. *
  428. * @param array $actions An array of the available bulk actions.
  429. */
  430. $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
  431. $two = '';
  432. } else {
  433. $two = '2';
  434. }
  435. if ( empty( $this->_actions ) ) {
  436. return;
  437. }
  438. echo '<label for="bulk-action-selector-' . esc_attr( $which ) . '" class="screen-reader-text">' . __( 'Select bulk action' ) . '</label>';
  439. echo '<select name="action' . $two . '" id="bulk-action-selector-' . esc_attr( $which ) . "\">\n";
  440. echo '<option value="-1">' . __( 'Bulk actions' ) . "</option>\n";
  441. foreach ( $this->_actions as $key => $value ) {
  442. if ( is_array( $value ) ) {
  443. echo "\t" . '<optgroup label="' . esc_attr( $key ) . '">' . "\n";
  444. foreach ( $value as $name => $title ) {
  445. $class = ( 'edit' === $name ) ? ' class="hide-if-no-js"' : '';
  446. echo "\t\t" . '<option value="' . esc_attr( $name ) . '"' . $class . '>' . $title . "</option>\n";
  447. }
  448. echo "\t" . "</optgroup>\n";
  449. } else {
  450. $class = ( 'edit' === $key ) ? ' class="hide-if-no-js"' : '';
  451. echo "\t" . '<option value="' . esc_attr( $key ) . '"' . $class . '>' . $value . "</option>\n";
  452. }
  453. }
  454. echo "</select>\n";
  455. submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
  456. echo "\n";
  457. }
  458. /**
  459. * Gets the current action selected from the bulk actions dropdown.
  460. *
  461. * @since 3.1.0
  462. *
  463. * @return string|false The action name. False if no action was selected.
  464. */
  465. public function current_action() {
  466. if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) ) {
  467. return false;
  468. }
  469. if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
  470. return $_REQUEST['action'];
  471. }
  472. return false;
  473. }
  474. /**
  475. * Generates the required HTML for a list of row action links.
  476. *
  477. * @since 3.1.0
  478. *
  479. * @param string[] $actions An array of action links.
  480. * @param bool $always_visible Whether the actions should be always visible.
  481. * @return string The HTML for the row actions.
  482. */
  483. protected function row_actions( $actions, $always_visible = false ) {
  484. $action_count = count( $actions );
  485. if ( ! $action_count ) {
  486. return '';
  487. }
  488. $mode = get_user_setting( 'posts_list_mode', 'list' );
  489. if ( 'excerpt' === $mode ) {
  490. $always_visible = true;
  491. }
  492. $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
  493. $i = 0;
  494. foreach ( $actions as $action => $link ) {
  495. ++$i;
  496. $sep = ( $i < $action_count ) ? ' | ' : '';
  497. $out .= "<span class='$action'>$link$sep</span>";
  498. }
  499. $out .= '</div>';
  500. $out .= '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>';
  501. return $out;
  502. }
  503. /**
  504. * Displays a dropdown for filtering items in the list table by month.
  505. *
  506. * @since 3.1.0
  507. *
  508. * @global wpdb $wpdb WordPress database abstraction object.
  509. * @global WP_Locale $wp_locale WordPress date and time locale object.
  510. *
  511. * @param string $post_type The post type.
  512. */
  513. protected function months_dropdown( $post_type ) {
  514. global $wpdb, $wp_locale;
  515. /**
  516. * Filters whether to remove the 'Months' drop-down from the post list table.
  517. *
  518. * @since 4.2.0
  519. *
  520. * @param bool $disable Whether to disable the drop-down. Default false.
  521. * @param string $post_type The post type.
  522. */
  523. if ( apply_filters( 'disable_months_dropdown', false, $post_type ) ) {
  524. return;
  525. }
  526. /**
  527. * Filters to short-circuit performing the months dropdown query.
  528. *
  529. * @since 5.7.0
  530. *
  531. * @param object[]|false $months 'Months' drop-down results. Default false.
  532. * @param string $post_type The post type.
  533. */
  534. $months = apply_filters( 'pre_months_dropdown_query', false, $post_type );
  535. if ( ! is_array( $months ) ) {
  536. $extra_checks = "AND post_status != 'auto-draft'";
  537. if ( ! isset( $_GET['post_status'] ) || 'trash' !== $_GET['post_status'] ) {
  538. $extra_checks .= " AND post_status != 'trash'";
  539. } elseif ( isset( $_GET['post_status'] ) ) {
  540. $extra_checks = $wpdb->prepare( ' AND post_status = %s', $_GET['post_status'] );
  541. }
  542. $months = $wpdb->get_results(
  543. $wpdb->prepare(
  544. "
  545. SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
  546. FROM $wpdb->posts
  547. WHERE post_type = %s
  548. $extra_checks
  549. ORDER BY post_date DESC
  550. ",
  551. $post_type
  552. )
  553. );
  554. }
  555. /**
  556. * Filters the 'Months' drop-down results.
  557. *
  558. * @since 3.7.0
  559. *
  560. * @param object[] $months Array of the months drop-down query results.
  561. * @param string $post_type The post type.
  562. */
  563. $months = apply_filters( 'months_dropdown_results', $months, $post_type );
  564. $month_count = count( $months );
  565. if ( ! $month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) {
  566. return;
  567. }
  568. $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
  569. ?>
  570. <label for="filter-by-date" class="screen-reader-text"><?php echo get_post_type_object( $post_type )->labels->filter_by_date; ?></label>
  571. <select name="m" id="filter-by-date">
  572. <option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
  573. <?php
  574. foreach ( $months as $arc_row ) {
  575. if ( 0 == $arc_row->year ) {
  576. continue;
  577. }
  578. $month = zeroise( $arc_row->month, 2 );
  579. $year = $arc_row->year;
  580. printf(
  581. "<option %s value='%s'>%s</option>\n",
  582. selected( $m, $year . $month, false ),
  583. esc_attr( $arc_row->year . $month ),
  584. /* translators: 1: Month name, 2: 4-digit year. */
  585. sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
  586. );
  587. }
  588. ?>
  589. </select>
  590. <?php
  591. }
  592. /**
  593. * Displays a view switcher.
  594. *
  595. * @since 3.1.0
  596. *
  597. * @param string $current_mode
  598. */
  599. protected function view_switcher( $current_mode ) {
  600. ?>
  601. <input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
  602. <div class="view-switch">
  603. <?php
  604. foreach ( $this->modes as $mode => $title ) {
  605. $classes = array( 'view-' . $mode );
  606. $aria_current = '';
  607. if ( $current_mode === $mode ) {
  608. $classes[] = 'current';
  609. $aria_current = ' aria-current="page"';
  610. }
  611. printf(
  612. "<a href='%s' class='%s' id='view-switch-$mode'$aria_current><span class='screen-reader-text'>%s</span></a>\n",
  613. esc_url( remove_query_arg( 'attachment-filter', add_query_arg( 'mode', $mode ) ) ),
  614. implode( ' ', $classes ),
  615. $title
  616. );
  617. }
  618. ?>
  619. </div>
  620. <?php
  621. }
  622. /**
  623. * Displays a comment count bubble.
  624. *
  625. * @since 3.1.0
  626. *
  627. * @param int $post_id The post ID.
  628. * @param int $pending_comments Number of pending comments.
  629. */
  630. protected function comments_bubble( $post_id, $pending_comments ) {
  631. $approved_comments = get_comments_number();
  632. $approved_comments_number = number_format_i18n( $approved_comments );
  633. $pending_comments_number = number_format_i18n( $pending_comments );
  634. $approved_only_phrase = sprintf(
  635. /* translators: %s: Number of comments. */
  636. _n( '%s comment', '%s comments', $approved_comments ),
  637. $approved_comments_number
  638. );
  639. $approved_phrase = sprintf(
  640. /* translators: %s: Number of comments. */
  641. _n( '%s approved comment', '%s approved comments', $approved_comments ),
  642. $approved_comments_number
  643. );
  644. $pending_phrase = sprintf(
  645. /* translators: %s: Number of comments. */
  646. _n( '%s pending comment', '%s pending comments', $pending_comments ),
  647. $pending_comments_number
  648. );
  649. if ( ! $approved_comments && ! $pending_comments ) {
  650. // No comments at all.
  651. printf(
  652. '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">%s</span>',
  653. __( 'No comments' )
  654. );
  655. } elseif ( $approved_comments && 'trash' === get_post_status( $post_id ) ) {
  656. // Don't link the comment bubble for a trashed post.
  657. printf(
  658. '<span class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
  659. $approved_comments_number,
  660. $pending_comments ? $approved_phrase : $approved_only_phrase
  661. );
  662. } elseif ( $approved_comments ) {
  663. // Link the comment bubble to approved comments.
  664. printf(
  665. '<a href="%s" class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
  666. esc_url(
  667. add_query_arg(
  668. array(
  669. 'p' => $post_id,
  670. 'comment_status' => 'approved',
  671. ),
  672. admin_url( 'edit-comments.php' )
  673. )
  674. ),
  675. $approved_comments_number,
  676. $pending_comments ? $approved_phrase : $approved_only_phrase
  677. );
  678. } else {
  679. // Don't link the comment bubble when there are no approved comments.
  680. printf(
  681. '<span class="post-com-count post-com-count-no-comments"><span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
  682. $approved_comments_number,
  683. $pending_comments ? __( 'No approved comments' ) : __( 'No comments' )
  684. );
  685. }
  686. if ( $pending_comments ) {
  687. printf(
  688. '<a href="%s" class="post-com-count post-com-count-pending"><span class="comment-count-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
  689. esc_url(
  690. add_query_arg(
  691. array(
  692. 'p' => $post_id,
  693. 'comment_status' => 'moderated',
  694. ),
  695. admin_url( 'edit-comments.php' )
  696. )
  697. ),
  698. $pending_comments_number,
  699. $pending_phrase
  700. );
  701. } else {
  702. printf(
  703. '<span class="post-com-count post-com-count-pending post-com-count-no-pending"><span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
  704. $pending_comments_number,
  705. $approved_comments ? __( 'No pending comments' ) : __( 'No comments' )
  706. );
  707. }
  708. }
  709. /**
  710. * Gets the current page number.
  711. *
  712. * @since 3.1.0
  713. *
  714. * @return int
  715. */
  716. public function get_pagenum() {
  717. $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
  718. if ( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) {
  719. $pagenum = $this->_pagination_args['total_pages'];
  720. }
  721. return max( 1, $pagenum );
  722. }
  723. /**
  724. * Gets the number of items to display on a single page.
  725. *
  726. * @since 3.1.0
  727. *
  728. * @param string $option
  729. * @param int $default
  730. * @return int
  731. */
  732. protected function get_items_per_page( $option, $default = 20 ) {
  733. $per_page = (int) get_user_option( $option );
  734. if ( empty( $per_page ) || $per_page < 1 ) {
  735. $per_page = $default;
  736. }
  737. /**
  738. * Filters the number of items to be displayed on each page of the list table.
  739. *
  740. * The dynamic hook name, `$option`, refers to the `per_page` option depending
  741. * on the type of list table in use. Possible filter names include:
  742. *
  743. * - `edit_comments_per_page`
  744. * - `sites_network_per_page`
  745. * - `site_themes_network_per_page`
  746. * - `themes_network_per_page'`
  747. * - `users_network_per_page`
  748. * - `edit_post_per_page`
  749. * - `edit_page_per_page'`
  750. * - `edit_{$post_type}_per_page`
  751. * - `edit_post_tag_per_page`
  752. * - `edit_category_per_page`
  753. * - `edit_{$taxonomy}_per_page`
  754. * - `site_users_network_per_page`
  755. * - `users_per_page`
  756. *
  757. * @since 2.9.0
  758. *
  759. * @param int $per_page Number of items to be displayed. Default 20.
  760. */
  761. return (int) apply_filters( "{$option}", $per_page );
  762. }
  763. /**
  764. * Displays the pagination.
  765. *
  766. * @since 3.1.0
  767. *
  768. * @param string $which
  769. */
  770. protected function pagination( $which ) {
  771. if ( empty( $this->_pagination_args ) ) {
  772. return;
  773. }
  774. $total_items = $this->_pagination_args['total_items'];
  775. $total_pages = $this->_pagination_args['total_pages'];
  776. $infinite_scroll = false;
  777. if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
  778. $infinite_scroll = $this->_pagination_args['infinite_scroll'];
  779. }
  780. if ( 'top' === $which && $total_pages > 1 ) {
  781. $this->screen->render_screen_reader_content( 'heading_pagination' );
  782. }
  783. $output = '<span class="displaying-num">' . sprintf(
  784. /* translators: %s: Number of items. */
  785. _n( '%s item', '%s items', $total_items ),
  786. number_format_i18n( $total_items )
  787. ) . '</span>';
  788. $current = $this->get_pagenum();
  789. $removable_query_args = wp_removable_query_args();
  790. $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
  791. $current_url = remove_query_arg( $removable_query_args, $current_url );
  792. $page_links = array();
  793. $total_pages_before = '<span class="paging-input">';
  794. $total_pages_after = '</span></span>';
  795. $disable_first = false;
  796. $disable_last = false;
  797. $disable_prev = false;
  798. $disable_next = false;
  799. if ( 1 == $current ) {
  800. $disable_first = true;
  801. $disable_prev = true;
  802. }
  803. if ( 2 == $current ) {
  804. $disable_first = true;
  805. }
  806. if ( $total_pages == $current ) {
  807. $disable_last = true;
  808. $disable_next = true;
  809. }
  810. if ( $total_pages - 1 == $current ) {
  811. $disable_last = true;
  812. }
  813. if ( $disable_first ) {
  814. $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&laquo;</span>';
  815. } else {
  816. $page_links[] = sprintf(
  817. "<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
  818. esc_url( remove_query_arg( 'paged', $current_url ) ),
  819. __( 'First page' ),
  820. '&laquo;'
  821. );
  822. }
  823. if ( $disable_prev ) {
  824. $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&lsaquo;</span>';
  825. } else {
  826. $page_links[] = sprintf(
  827. "<a class='prev-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
  828. esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
  829. __( 'Previous page' ),
  830. '&lsaquo;'
  831. );
  832. }
  833. if ( 'bottom' === $which ) {
  834. $html_current_page = $current;
  835. $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input"><span class="tablenav-paging-text">';
  836. } else {
  837. $html_current_page = sprintf(
  838. "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' /><span class='tablenav-paging-text'>",
  839. '<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
  840. $current,
  841. strlen( $total_pages )
  842. );
  843. }
  844. $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
  845. $page_links[] = $total_pages_before . sprintf(
  846. /* translators: 1: Current page, 2: Total pages. */
  847. _x( '%1$s of %2$s', 'paging' ),
  848. $html_current_page,
  849. $html_total_pages
  850. ) . $total_pages_after;
  851. if ( $disable_next ) {
  852. $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&rsaquo;</span>';
  853. } else {
  854. $page_links[] = sprintf(
  855. "<a class='next-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
  856. esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
  857. __( 'Next page' ),
  858. '&rsaquo;'
  859. );
  860. }
  861. if ( $disable_last ) {
  862. $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&raquo;</span>';
  863. } else {
  864. $page_links[] = sprintf(
  865. "<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
  866. esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
  867. __( 'Last page' ),
  868. '&raquo;'
  869. );
  870. }
  871. $pagination_links_class = 'pagination-links';
  872. if ( ! empty( $infinite_scroll ) ) {
  873. $pagination_links_class .= ' hide-if-js';
  874. }
  875. $output .= "\n<span class='$pagination_links_class'>" . implode( "\n", $page_links ) . '</span>';
  876. if ( $total_pages ) {
  877. $page_class = $total_pages < 2 ? ' one-page' : '';
  878. } else {
  879. $page_class = ' no-pages';
  880. }
  881. $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
  882. echo $this->_pagination;
  883. }
  884. /**
  885. * Gets a list of columns.
  886. *
  887. * The format is:
  888. * - `'internal-name' => 'Title'`
  889. *
  890. * @since 3.1.0
  891. * @abstract
  892. *
  893. * @return array
  894. */
  895. public function get_columns() {
  896. die( 'function WP_List_Table::get_columns() must be overridden in a subclass.' );
  897. }
  898. /**
  899. * Gets a list of sortable columns.
  900. *
  901. * The format is:
  902. * - `'internal-name' => 'orderby'`
  903. * - `'internal-name' => array( 'orderby', 'asc' )` - The second element sets the initial sorting order.
  904. * - `'internal-name' => array( 'orderby', true )` - The second element makes the initial order descending.
  905. *
  906. * @since 3.1.0
  907. *
  908. * @return array
  909. */
  910. protected function get_sortable_columns() {
  911. return array();
  912. }
  913. /**
  914. * Gets the name of the default primary column.
  915. *
  916. * @since 4.3.0
  917. *
  918. * @return string Name of the default primary column, in this case, an empty string.
  919. */
  920. protected function get_default_primary_column_name() {
  921. $columns = $this->get_columns();
  922. $column = '';
  923. if ( empty( $columns ) ) {
  924. return $column;
  925. }
  926. // We need a primary defined so responsive views show something,
  927. // so let's fall back to the first non-checkbox column.
  928. foreach ( $columns as $col => $column_name ) {
  929. if ( 'cb' === $col ) {
  930. continue;
  931. }
  932. $column = $col;
  933. break;
  934. }
  935. return $column;
  936. }
  937. /**
  938. * Public wrapper for WP_List_Table::get_default_primary_column_name().
  939. *
  940. * @since 4.4.0
  941. *
  942. * @return string Name of the default primary column.
  943. */
  944. public function get_primary_column() {
  945. return $this->get_primary_column_name();
  946. }
  947. /**
  948. * Gets the name of the primary column.
  949. *
  950. * @since 4.3.0
  951. *
  952. * @return string The name of the primary column.
  953. */
  954. protected function get_primary_column_name() {
  955. $columns = get_column_headers( $this->screen );
  956. $default = $this->get_default_primary_column_name();
  957. // If the primary column doesn't exist,
  958. // fall back to the first non-checkbox column.
  959. if ( ! isset( $columns[ $default ] ) ) {
  960. $default = self::get_default_primary_column_name();
  961. }
  962. /**
  963. * Filters the name of the primary column for the current list table.
  964. *
  965. * @since 4.3.0
  966. *
  967. * @param string $default Column name default for the specific list table, e.g. 'name'.
  968. * @param string $context Screen ID for specific list table, e.g. 'plugins'.
  969. */
  970. $column = apply_filters( 'list_table_primary_column', $default, $this->screen->id );
  971. if ( empty( $column ) || ! isset( $columns[ $column ] ) ) {
  972. $column = $default;
  973. }
  974. return $column;
  975. }
  976. /**
  977. * Gets a list of all, hidden, and sortable columns, with filter applied.
  978. *
  979. * @since 3.1.0
  980. *
  981. * @return array
  982. */
  983. protected function get_column_info() {
  984. // $_column_headers is already set / cached.
  985. if ( isset( $this->_column_headers ) && is_array( $this->_column_headers ) ) {
  986. /*
  987. * Backward compatibility for `$_column_headers` format prior to WordPress 4.3.
  988. *
  989. * In WordPress 4.3 the primary column name was added as a fourth item in the
  990. * column headers property. This ensures the primary column name is included
  991. * in plugins setting the property directly in the three item format.
  992. */
  993. $column_headers = array( array(), array(), array(), $this->get_primary_column_name() );
  994. foreach ( $this->_column_headers as $key => $value ) {
  995. $column_headers[ $key ] = $value;
  996. }
  997. return $column_headers;
  998. }
  999. $columns = get_column_headers( $this->screen );
  1000. $hidden = get_hidden_columns( $this->screen );
  1001. $sortable_columns = $this->get_sortable_columns();
  1002. /**
  1003. * Filters the list table sortable columns for a specific screen.
  1004. *
  1005. * The dynamic portion of the hook name, `$this->screen->id`, refers
  1006. * to the ID of the current screen.
  1007. *
  1008. * @since 3.1.0
  1009. *
  1010. * @param array $sortable_columns An array of sortable columns.
  1011. */
  1012. $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );
  1013. $sortable = array();
  1014. foreach ( $_sortable as $id => $data ) {
  1015. if ( empty( $data ) ) {
  1016. continue;
  1017. }
  1018. $data = (array) $data;
  1019. if ( ! isset( $data[1] ) ) {
  1020. $data[1] = false;
  1021. }
  1022. $sortable[ $id ] = $data;
  1023. }
  1024. $primary = $this->get_primary_column_name();
  1025. $this->_column_headers = array( $columns, $hidden, $sortable, $primary );
  1026. return $this->_column_headers;
  1027. }
  1028. /**
  1029. * Returns the number of visible columns.
  1030. *
  1031. * @since 3.1.0
  1032. *
  1033. * @return int
  1034. */
  1035. public function get_column_count() {
  1036. list ( $columns, $hidden ) = $this->get_column_info();
  1037. $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
  1038. return count( $columns ) - count( $hidden );
  1039. }
  1040. /**
  1041. * Prints column headers, accounting for hidden and sortable columns.
  1042. *
  1043. * @since 3.1.0
  1044. *
  1045. * @param bool $with_id Whether to set the ID attribute or not
  1046. */
  1047. public function print_column_headers( $with_id = true ) {
  1048. list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
  1049. $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
  1050. $current_url = remove_query_arg( 'paged', $current_url );
  1051. if ( isset( $_GET['orderby'] ) ) {
  1052. $current_orderby = $_GET['orderby'];
  1053. } else {
  1054. $current_orderby = '';
  1055. }
  1056. if ( isset( $_GET['order'] ) && 'desc' === $_GET['order'] ) {
  1057. $current_order = 'desc';
  1058. } else {
  1059. $current_order = 'asc';
  1060. }
  1061. if ( ! empty( $columns['cb'] ) ) {
  1062. static $cb_counter = 1;
  1063. $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
  1064. . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
  1065. $cb_counter++;
  1066. }
  1067. foreach ( $columns as $column_key => $column_display_name ) {
  1068. $class = array( 'manage-column', "column-$column_key" );
  1069. if ( in_array( $column_key, $hidden, true ) ) {
  1070. $class[] = 'hidden';
  1071. }
  1072. if ( 'cb' === $column_key ) {
  1073. $class[] = 'check-column';
  1074. } elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ), true ) ) {
  1075. $class[] = 'num';
  1076. }
  1077. if ( $column_key === $primary ) {
  1078. $class[] = 'column-primary';
  1079. }
  1080. if ( isset( $sortable[ $column_key ] ) ) {
  1081. list( $orderby, $desc_first ) = $sortable[ $column_key ];
  1082. if ( $current_orderby === $orderby ) {
  1083. $order = 'asc' === $current_order ? 'desc' : 'asc';
  1084. $class[] = 'sorted';
  1085. $class[] = $current_order;
  1086. } else {
  1087. $order = strtolower( $desc_first );
  1088. if ( ! in_array( $order, array( 'desc', 'asc' ), true ) ) {
  1089. $order = $desc_first ? 'desc' : 'asc';
  1090. }
  1091. $class[] = 'sortable';
  1092. $class[] = 'desc' === $order ? 'asc' : 'desc';
  1093. }
  1094. $column_display_name = sprintf(
  1095. '<a href="%s"><span>%s</span><span class="sorting-indicator"></span></a>',
  1096. esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ),
  1097. $column_display_name
  1098. );
  1099. }
  1100. $tag = ( 'cb' === $column_key ) ? 'td' : 'th';
  1101. $scope = ( 'th' === $tag ) ? 'scope="col"' : '';
  1102. $id = $with_id ? "id='$column_key'" : '';
  1103. if ( ! empty( $class ) ) {
  1104. $class = "class='" . implode( ' ', $class ) . "'";
  1105. }
  1106. echo "<$tag $scope $id $class>$column_display_name</$tag>";
  1107. }
  1108. }
  1109. /**
  1110. * Displays the table.
  1111. *
  1112. * @since 3.1.0
  1113. */
  1114. public function display() {
  1115. $singular = $this->_args['singular'];
  1116. $this->display_tablenav( 'top' );
  1117. $this->screen->render_screen_reader_content( 'heading_list' );
  1118. ?>
  1119. <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
  1120. <thead>
  1121. <tr>
  1122. <?php $this->print_column_headers(); ?>
  1123. </tr>
  1124. </thead>
  1125. <tbody id="the-list"
  1126. <?php
  1127. if ( $singular ) {
  1128. echo " data-wp-lists='list:$singular'";
  1129. }
  1130. ?>
  1131. >
  1132. <?php $this->display_rows_or_placeholder(); ?>
  1133. </tbody>
  1134. <tfoot>
  1135. <tr>
  1136. <?php $this->print_column_headers( false ); ?>
  1137. </tr>
  1138. </tfoot>
  1139. </table>
  1140. <?php
  1141. $this->display_tablenav( 'bottom' );
  1142. }
  1143. /**
  1144. * Gets a list of CSS classes for the WP_List_Table table tag.
  1145. *
  1146. * @since 3.1.0
  1147. *
  1148. * @return string[] Array of CSS classes for the table tag.
  1149. */
  1150. protected function get_table_classes() {
  1151. $mode = get_user_setting( 'posts_list_mode', 'list' );
  1152. $mode_class = esc_attr( 'table-view-' . $mode );
  1153. return array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] );
  1154. }
  1155. /**
  1156. * Generates the table navigation above or below the table
  1157. *
  1158. * @since 3.1.0
  1159. * @param string $which
  1160. */
  1161. protected function display_tablenav( $which ) {
  1162. if ( 'top' === $which ) {
  1163. wp_nonce_field( 'bulk-' . $this->_args['plural'] );
  1164. }
  1165. ?>
  1166. <div class="tablenav <?php echo esc_attr( $which ); ?>">
  1167. <?php if ( $this->has_items() ) : ?>
  1168. <div class="alignleft actions bulkactions">
  1169. <?php $this->bulk_actions( $which ); ?>
  1170. </div>
  1171. <?php
  1172. endif;
  1173. $this->extra_tablenav( $which );
  1174. $this->pagination( $which );
  1175. ?>
  1176. <br class="clear" />
  1177. </div>
  1178. <?php
  1179. }
  1180. /**
  1181. * Extra controls to be displayed between bulk actions and pagination.
  1182. *
  1183. * @since 3.1.0
  1184. *
  1185. * @param string $which
  1186. */
  1187. protected function extra_tablenav( $which ) {}
  1188. /**
  1189. * Generates the tbody element for the list table.
  1190. *
  1191. * @since 3.1.0
  1192. */
  1193. public function display_rows_or_placeholder() {
  1194. if ( $this->has_items() ) {
  1195. $this->display_rows();
  1196. } else {
  1197. echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
  1198. $this->no_items();
  1199. echo '</td></tr>';
  1200. }
  1201. }
  1202. /**
  1203. * Generates the table rows.
  1204. *
  1205. * @since 3.1.0
  1206. */
  1207. public function display_rows() {
  1208. foreach ( $this->items as $item ) {
  1209. $this->single_row( $item );
  1210. }
  1211. }
  1212. /**
  1213. * Generates content for a single row of the table.
  1214. *
  1215. * @since 3.1.0
  1216. *
  1217. * @param object|array $item The current item
  1218. */
  1219. public function single_row( $item ) {
  1220. echo '<tr>';
  1221. $this->single_row_columns( $item );
  1222. echo '</tr>';
  1223. }
  1224. /**
  1225. * @param object|array $item
  1226. * @param string $column_name
  1227. */
  1228. protected function column_default( $item, $column_name ) {}
  1229. /**
  1230. * @param object|array $item
  1231. */
  1232. protected function column_cb( $item ) {}
  1233. /**
  1234. * Generates the columns for a single row of the table.
  1235. *
  1236. * @since 3.1.0
  1237. *
  1238. * @param object|array $item The current item.
  1239. */
  1240. protected function single_row_columns( $item ) {
  1241. list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
  1242. foreach ( $columns as $column_name => $column_display_name ) {
  1243. $classes = "$column_name column-$column_name";
  1244. if ( $primary === $column_name ) {
  1245. $classes .= ' has-row-actions column-primary';
  1246. }
  1247. if ( in_array( $column_name, $hidden, true ) ) {
  1248. $classes .= ' hidden';
  1249. }
  1250. // Comments column uses HTML in the display name with screen reader text.
  1251. // Strip tags to get closer to a user-friendly string.
  1252. $data = 'data-colname="' . esc_attr( wp_strip_all_tags( $column_display_name ) ) . '"';
  1253. $attributes = "class='$classes' $data";
  1254. if ( 'cb' === $column_name ) {
  1255. echo '<th scope="row" class="check-column">';
  1256. echo $this->column_cb( $item );
  1257. echo '</th>';
  1258. } elseif ( method_exists( $this, '_column_' . $column_name ) ) {
  1259. echo call_user_func(
  1260. array( $this, '_column_' . $column_name ),
  1261. $item,
  1262. $classes,
  1263. $data,
  1264. $primary
  1265. );
  1266. } elseif ( method_exists( $this, 'column_' . $column_name ) ) {
  1267. echo "<td $attributes>";
  1268. echo call_user_func( array( $this, 'column_' . $column_name ), $item );
  1269. echo $this->handle_row_actions( $item, $column_name, $primary );
  1270. echo '</td>';
  1271. } else {
  1272. echo "<td $attributes>";
  1273. echo $this->column_default( $item, $column_name );
  1274. echo $this->handle_row_actions( $item, $column_name, $primary );
  1275. echo '</td>';
  1276. }
  1277. }
  1278. }
  1279. /**
  1280. * Generates and display row actions links for the list table.
  1281. *
  1282. * @since 4.3.0
  1283. *
  1284. * @param object|array $item The item being acted upon.
  1285. * @param string $column_name Current column name.
  1286. * @param string $primary Primary column name.
  1287. * @return string The row actions HTML, or an empty string
  1288. * if the current column is not the primary column.
  1289. */
  1290. protected function handle_row_actions( $item, $column_name, $primary ) {
  1291. return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>' : '';
  1292. }
  1293. /**
  1294. * Handles an incoming ajax request (called from admin-ajax.php)
  1295. *
  1296. * @since 3.1.0
  1297. */
  1298. public function ajax_response() {
  1299. $this->prepare_items();
  1300. ob_start();
  1301. if ( ! empty( $_REQUEST['no_placeholder'] ) ) {
  1302. $this->display_rows();
  1303. } else {
  1304. $this->display_rows_or_placeholder();
  1305. }
  1306. $rows = ob_get_clean();
  1307. $response = array( 'rows' => $rows );
  1308. if ( isset( $this->_pagination_args['total_items'] ) ) {
  1309. $response['total_items_i18n'] = sprintf(
  1310. /* translators: Number of items. */
  1311. _n( '%s item', '%s items', $this->_pagination_args['total_items'] ),
  1312. number_format_i18n( $this->_pagination_args['total_items'] )
  1313. );
  1314. }
  1315. if ( isset( $this->_pagination_args['total_pages'] ) ) {
  1316. $response['total_pages'] = $this->_pagination_args['total_pages'];
  1317. $response['total_pages_i18n'] = number_format_i18n( $this->_pagination_args['total_pages'] );
  1318. }
  1319. die( wp_json_encode( $response ) );
  1320. }
  1321. /**
  1322. * Sends required variables to JavaScript land.
  1323. *
  1324. * @since 3.1.0
  1325. */
  1326. public function _js_vars() {
  1327. $args = array(
  1328. 'class' => get_class( $this ),
  1329. 'screen' => array(
  1330. 'id' => $this->screen->id,
  1331. 'base' => $this->screen->base,
  1332. ),
  1333. );
  1334. printf( "<script type='text/javascript'>list_args = %s;</script>\n", wp_json_encode( $args ) );
  1335. }
  1336. }