igs-slm 0.1.0b0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. igs_slm-0.1.0b0.dist-info/LICENSE +21 -0
  2. igs_slm-0.1.0b0.dist-info/METADATA +151 -0
  3. igs_slm-0.1.0b0.dist-info/RECORD +447 -0
  4. igs_slm-0.1.0b0.dist-info/WHEEL +4 -0
  5. igs_slm-0.1.0b0.dist-info/entry_points.txt +3 -0
  6. igs_tools/__init__.py +0 -0
  7. igs_tools/connection.py +88 -0
  8. igs_tools/defines/__init__.py +8 -0
  9. igs_tools/defines/constellation.py +21 -0
  10. igs_tools/defines/data_center.py +75 -0
  11. igs_tools/defines/rinex.py +49 -0
  12. igs_tools/directory.py +247 -0
  13. igs_tools/utils.py +66 -0
  14. slm/__init__.py +21 -0
  15. slm/admin.py +674 -0
  16. slm/api/edit/__init__.py +0 -0
  17. slm/api/edit/serializers.py +316 -0
  18. slm/api/edit/views.py +1632 -0
  19. slm/api/fields.py +89 -0
  20. slm/api/filter.py +504 -0
  21. slm/api/pagination.py +55 -0
  22. slm/api/permissions.py +65 -0
  23. slm/api/public/__init__.py +0 -0
  24. slm/api/public/serializers.py +249 -0
  25. slm/api/public/views.py +606 -0
  26. slm/api/serializers.py +132 -0
  27. slm/api/views.py +148 -0
  28. slm/apps.py +323 -0
  29. slm/authentication.py +198 -0
  30. slm/bin/__init__.py +0 -0
  31. slm/bin/startproject.py +262 -0
  32. slm/bin/templates/{{ project_dir }}/pyproject.toml +35 -0
  33. slm/bin/templates/{{ project_dir }}/sites/__init__.py +0 -0
  34. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/__init__.py +0 -0
  35. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/base.py +15 -0
  36. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/__init__.py +56 -0
  37. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/local.py +4 -0
  38. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/wsgi.py +16 -0
  39. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/manage.py +34 -0
  40. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/production/__init__.py +61 -0
  41. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/production/wsgi.py +16 -0
  42. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/urls.py +7 -0
  43. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +11 -0
  44. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/__init__.py +0 -0
  45. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/admin.py +5 -0
  46. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/apps.py +14 -0
  47. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/__init__.py +0 -0
  48. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/commands/__init__.py +0 -0
  49. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/commands/import_archive.py +64 -0
  50. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/migrations/__init__.py +0 -0
  51. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/models.py +6 -0
  52. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/templates/slm/base.html +8 -0
  53. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/urls.py +10 -0
  54. slm/bin/templates/{{ project_dir }}/{{ extension_app }}/views.py +5 -0
  55. slm/defines/AlertLevel.py +24 -0
  56. slm/defines/AntennaCalibration.py +25 -0
  57. slm/defines/AntennaFeatures.py +27 -0
  58. slm/defines/AntennaReferencePoint.py +22 -0
  59. slm/defines/Aspiration.py +13 -0
  60. slm/defines/CardinalDirection.py +19 -0
  61. slm/defines/CollocationStatus.py +12 -0
  62. slm/defines/EquipmentState.py +22 -0
  63. slm/defines/FlagSeverity.py +14 -0
  64. slm/defines/FractureSpacing.py +15 -0
  65. slm/defines/FrequencyStandardType.py +15 -0
  66. slm/defines/GeodesyMLVersion.py +48 -0
  67. slm/defines/ISOCountry.py +1194 -0
  68. slm/defines/Instrumentation.py +19 -0
  69. slm/defines/LogEntryType.py +30 -0
  70. slm/defines/SLMFileType.py +18 -0
  71. slm/defines/SiteFileUploadStatus.py +61 -0
  72. slm/defines/SiteLogFormat.py +49 -0
  73. slm/defines/SiteLogStatus.py +78 -0
  74. slm/defines/TectonicPlates.py +28 -0
  75. slm/defines/__init__.py +46 -0
  76. slm/forms.py +1126 -0
  77. slm/jinja2/slm/sitelog/ascii_9char.log +346 -0
  78. slm/jinja2/slm/sitelog/legacy.log +346 -0
  79. slm/jinja2/slm/sitelog/xsd/0.4/collocationInformation.xml +12 -0
  80. slm/jinja2/slm/sitelog/xsd/0.4/condition.xml +12 -0
  81. slm/jinja2/slm/sitelog/xsd/0.4/contact.xml +52 -0
  82. slm/jinja2/slm/sitelog/xsd/0.4/formInformation.xml +5 -0
  83. slm/jinja2/slm/sitelog/xsd/0.4/frequencyStandard.xml +12 -0
  84. slm/jinja2/slm/sitelog/xsd/0.4/gnssAntenna.xml +16 -0
  85. slm/jinja2/slm/sitelog/xsd/0.4/gnssReceiver.xml +11 -0
  86. slm/jinja2/slm/sitelog/xsd/0.4/humiditySensor.xml +13 -0
  87. slm/jinja2/slm/sitelog/xsd/0.4/localEpisodicEffect.xml +10 -0
  88. slm/jinja2/slm/sitelog/xsd/0.4/moreInformation.xml +22 -0
  89. slm/jinja2/slm/sitelog/xsd/0.4/multipathSource.xml +10 -0
  90. slm/jinja2/slm/sitelog/xsd/0.4/otherInstrumentation.xml +5 -0
  91. slm/jinja2/slm/sitelog/xsd/0.4/pressureSensor.xml +12 -0
  92. slm/jinja2/slm/sitelog/xsd/0.4/radioInterference.xml +11 -0
  93. slm/jinja2/slm/sitelog/xsd/0.4/sensor.xml +16 -0
  94. slm/jinja2/slm/sitelog/xsd/0.4/signalObstruction.xml +10 -0
  95. slm/jinja2/slm/sitelog/xsd/0.4/siteIdentification.xml +22 -0
  96. slm/jinja2/slm/sitelog/xsd/0.4/siteLocation.xml +21 -0
  97. slm/jinja2/slm/sitelog/xsd/0.4/surveyedLocalTie.xml +20 -0
  98. slm/jinja2/slm/sitelog/xsd/0.4/temperatureSensor.xml +13 -0
  99. slm/jinja2/slm/sitelog/xsd/0.4/waterVaporSensor.xml +11 -0
  100. slm/jinja2/slm/sitelog/xsd/0.5/document.xml +10 -0
  101. slm/jinja2/slm/sitelog/xsd/geodesyml_0.4.xml +99 -0
  102. slm/jinja2/slm/sitelog/xsd/geodesyml_0.5.xml +112 -0
  103. slm/management/__init__.py +0 -0
  104. slm/management/commands/__init__.py +53 -0
  105. slm/management/commands/build_index.py +96 -0
  106. slm/management/commands/generate_sinex.py +675 -0
  107. slm/management/commands/head_from_index.py +541 -0
  108. slm/management/commands/import_archive.py +908 -0
  109. slm/management/commands/import_equipment.py +351 -0
  110. slm/management/commands/set_site.py +56 -0
  111. slm/management/commands/sitelog.py +144 -0
  112. slm/management/commands/synchronize.py +60 -0
  113. slm/management/commands/update_data_availability.py +167 -0
  114. slm/management/commands/validate_db.py +186 -0
  115. slm/management/commands/validate_gml.py +73 -0
  116. slm/map/__init__.py +1 -0
  117. slm/map/admin.py +5 -0
  118. slm/map/api/__init__.py +0 -0
  119. slm/map/api/edit/__init__.py +0 -0
  120. slm/map/api/edit/serializers.py +28 -0
  121. slm/map/api/edit/views.py +46 -0
  122. slm/map/api/public/__init__.py +0 -0
  123. slm/map/api/public/serializers.py +29 -0
  124. slm/map/api/public/views.py +64 -0
  125. slm/map/apps.py +7 -0
  126. slm/map/defines.py +53 -0
  127. slm/map/migrations/0001_initial.py +115 -0
  128. slm/map/migrations/__init__.py +0 -0
  129. slm/map/models.py +63 -0
  130. slm/map/static/slm/css/map.css +86 -0
  131. slm/map/static/slm/js/map.js +159 -0
  132. slm/map/templates/slm/map.html +374 -0
  133. slm/map/templates/slm/station/base.html +11 -0
  134. slm/map/templates/slm/station/edit.html +10 -0
  135. slm/map/templates/slm/top_nav.html +17 -0
  136. slm/map/templatetags/__init__.py +0 -0
  137. slm/map/templatetags/slm_map.py +18 -0
  138. slm/map/urls.py +25 -0
  139. slm/map/views.py +36 -0
  140. slm/middleware.py +29 -0
  141. slm/migrations/0001_alter_siteantenna_marker_enu_alter_sitelocation_llh_and_more.py +47 -0
  142. slm/migrations/0001_initial.py +4826 -0
  143. slm/migrations/0002_alter_dataavailability_site.py +22 -0
  144. slm/migrations/0003_remove_logentry_slm_logentr_site_lo_7a2af7_idx_and_more.py +80 -0
  145. slm/migrations/0004_alter_logentry_timestamp_and_more.py +25 -0
  146. slm/migrations/0005_alter_logentry_options_alter_logentry_section_and_more.py +46 -0
  147. slm/migrations/0006_alter_logentry_options_alter_logentry_index_together.py +24 -0
  148. slm/migrations/0007_alter_dataavailability_rate.py +23 -0
  149. slm/migrations/0008_alter_archiveindex_options_and_more.py +64 -0
  150. slm/migrations/0009_alter_archiveindex_end.py +21 -0
  151. slm/migrations/0010_alter_dataavailability_rinex_version_and_more.py +844 -0
  152. slm/migrations/0011_alter_siteidentification_fracture_spacing.py +33 -0
  153. slm/migrations/0012_alter_logentry_type.py +36 -0
  154. slm/migrations/0013_unpublishedfilesalert.py +48 -0
  155. slm/migrations/0014_sitelogpublished.py +48 -0
  156. slm/migrations/0015_alter_siteantenna_options_and_more.py +181 -0
  157. slm/migrations/0016_alter_antenna_description_alter_radome_description_and_more.py +42 -0
  158. slm/migrations/0017_alter_logentry_unique_together_and_more.py +54 -0
  159. slm/migrations/0018_afix_deleted.py +34 -0
  160. slm/migrations/0018_alter_siteantenna_options_and_more.py +244 -0
  161. slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +101 -0
  162. slm/migrations/0020_alter_manufacturer_options.py +16 -0
  163. slm/migrations/0021_alter_siteform_report_type.py +23 -0
  164. slm/migrations/0022_rename_antcal_antenna_radome_slm_antcal_antenna_20827a_idx_and_more.py +297 -0
  165. slm/migrations/0023_archivedsitelog_gml_version_and_more.py +55 -0
  166. slm/migrations/0024_alter_agency_name_alter_agency_shortname.py +24 -0
  167. slm/migrations/0025_alter_archivedsitelog_log_format_and_more.py +61 -0
  168. slm/migrations/0026_alter_archivedsitelog_log_format_and_more.py +61 -0
  169. slm/migrations/0027_importalert_file_contents_importalert_findings_and_more.py +41 -0
  170. slm/migrations/0028_antenna_replaced_manufacturer_url_radome_replaced_and_more.py +46 -0
  171. slm/migrations/0029_manufacturer_full_name.py +17 -0
  172. slm/migrations/0030_alter_antenna_state_alter_radome_state_and_more.py +43 -0
  173. slm/migrations/__init__.py +0 -0
  174. slm/migrations/load_satellitesystems.py +27 -0
  175. slm/models/__init__.py +118 -0
  176. slm/models/about.py +14 -0
  177. slm/models/alerts.py +1204 -0
  178. slm/models/data.py +58 -0
  179. slm/models/equipment.py +229 -0
  180. slm/models/help.py +14 -0
  181. slm/models/index.py +428 -0
  182. slm/models/sitelog.py +4279 -0
  183. slm/models/system.py +723 -0
  184. slm/models/user.py +304 -0
  185. slm/parsing/__init__.py +786 -0
  186. slm/parsing/legacy/__init__.py +4 -0
  187. slm/parsing/legacy/binding.py +817 -0
  188. slm/parsing/legacy/parser.py +377 -0
  189. slm/parsing/xsd/__init__.py +34 -0
  190. slm/parsing/xsd/binding.py +86 -0
  191. slm/parsing/xsd/geodesyml/0.4/commonTypes.xsd +133 -0
  192. slm/parsing/xsd/geodesyml/0.4/contact.xsd +29 -0
  193. slm/parsing/xsd/geodesyml/0.4/dataStreams.xsd +129 -0
  194. slm/parsing/xsd/geodesyml/0.4/document.xsd +64 -0
  195. slm/parsing/xsd/geodesyml/0.4/equipment.xsd +427 -0
  196. slm/parsing/xsd/geodesyml/0.4/fieldMeasurement.xsd +170 -0
  197. slm/parsing/xsd/geodesyml/0.4/geodesyML.xsd +71 -0
  198. slm/parsing/xsd/geodesyml/0.4/geodeticEquipment.xsd +343 -0
  199. slm/parsing/xsd/geodesyml/0.4/geodeticMonument.xsd +147 -0
  200. slm/parsing/xsd/geodesyml/0.4/lineage.xsd +614 -0
  201. slm/parsing/xsd/geodesyml/0.4/localInterferences.xsd +131 -0
  202. slm/parsing/xsd/geodesyml/0.4/measurement.xsd +473 -0
  203. slm/parsing/xsd/geodesyml/0.4/monumentInfo.xsd +251 -0
  204. slm/parsing/xsd/geodesyml/0.4/observationSystem.xsd +429 -0
  205. slm/parsing/xsd/geodesyml/0.4/project.xsd +38 -0
  206. slm/parsing/xsd/geodesyml/0.4/quality.xsd +176 -0
  207. slm/parsing/xsd/geodesyml/0.4/referenceFrame.xsd +194 -0
  208. slm/parsing/xsd/geodesyml/0.4/siteLog.xsd +71 -0
  209. slm/parsing/xsd/geodesyml/0.5/commonTypes.xsd +133 -0
  210. slm/parsing/xsd/geodesyml/0.5/contact.xsd +29 -0
  211. slm/parsing/xsd/geodesyml/0.5/dataStreams.xsd +129 -0
  212. slm/parsing/xsd/geodesyml/0.5/document.xsd +64 -0
  213. slm/parsing/xsd/geodesyml/0.5/equipment.xsd +427 -0
  214. slm/parsing/xsd/geodesyml/0.5/fieldMeasurement.xsd +170 -0
  215. slm/parsing/xsd/geodesyml/0.5/geodesyML.xsd +71 -0
  216. slm/parsing/xsd/geodesyml/0.5/geodeticEquipment.xsd +343 -0
  217. slm/parsing/xsd/geodesyml/0.5/geodeticMonument.xsd +147 -0
  218. slm/parsing/xsd/geodesyml/0.5/lineage.xsd +614 -0
  219. slm/parsing/xsd/geodesyml/0.5/localInterferences.xsd +131 -0
  220. slm/parsing/xsd/geodesyml/0.5/measurement.xsd +473 -0
  221. slm/parsing/xsd/geodesyml/0.5/monumentInfo.xsd +306 -0
  222. slm/parsing/xsd/geodesyml/0.5/observationSystem.xsd +429 -0
  223. slm/parsing/xsd/geodesyml/0.5/project.xsd +38 -0
  224. slm/parsing/xsd/geodesyml/0.5/quality.xsd +176 -0
  225. slm/parsing/xsd/geodesyml/0.5/referenceFrame.xsd +194 -0
  226. slm/parsing/xsd/geodesyml/0.5/siteLog.xsd +73 -0
  227. slm/parsing/xsd/parser.py +116 -0
  228. slm/parsing/xsd/resolver.py +28 -0
  229. slm/receivers/__init__.py +11 -0
  230. slm/receivers/alerts.py +87 -0
  231. slm/receivers/cleanup.py +41 -0
  232. slm/receivers/event_loggers.py +175 -0
  233. slm/receivers/index.py +67 -0
  234. slm/settings/__init__.py +55 -0
  235. slm/settings/auth.py +15 -0
  236. slm/settings/ckeditor.py +14 -0
  237. slm/settings/debug.py +47 -0
  238. slm/settings/internationalization.py +12 -0
  239. slm/settings/logging.py +113 -0
  240. slm/settings/platform/__init__.py +0 -0
  241. slm/settings/platform/darwin.py +10 -0
  242. slm/settings/rest.py +21 -0
  243. slm/settings/root.py +152 -0
  244. slm/settings/routines.py +43 -0
  245. slm/settings/secrets.py +37 -0
  246. slm/settings/security.py +5 -0
  247. slm/settings/slm.py +188 -0
  248. slm/settings/static_templates.py +53 -0
  249. slm/settings/templates.py +29 -0
  250. slm/settings/uploads.py +8 -0
  251. slm/settings/urls.py +126 -0
  252. slm/settings/validation.py +196 -0
  253. slm/signals.py +250 -0
  254. slm/singleton.py +49 -0
  255. slm/static/rest_framework/css/bootstrap-tweaks.css +204 -0
  256. slm/static/rest_framework/css/bootstrap.min.css +7 -0
  257. slm/static/rest_framework/css/bootstrap.min.css.map +1 -0
  258. slm/static/rest_framework/css/default.css +82 -0
  259. slm/static/rest_framework/css/prettify.css +30 -0
  260. slm/static/rest_framework/docs/css/base.css +344 -0
  261. slm/static/rest_framework/docs/css/highlight.css +125 -0
  262. slm/static/rest_framework/docs/css/jquery.json-view.min.css +11 -0
  263. slm/static/rest_framework/docs/img/favicon.ico +0 -0
  264. slm/static/rest_framework/docs/img/grid.png +0 -0
  265. slm/static/rest_framework/docs/js/api.js +321 -0
  266. slm/static/rest_framework/docs/js/highlight.pack.js +2 -0
  267. slm/static/rest_framework/docs/js/jquery.json-view.min.js +7 -0
  268. slm/static/rest_framework/img/grid.png +0 -0
  269. slm/static/rest_framework/js/ajax-form.js +127 -0
  270. slm/static/rest_framework/js/bootstrap.bundle.min.js +7 -0
  271. slm/static/rest_framework/js/bootstrap.bundle.min.js.map +1 -0
  272. slm/static/rest_framework/js/bootstrap.min.js.map +1 -0
  273. slm/static/rest_framework/js/coreapi-0.1.1.js +2043 -0
  274. slm/static/rest_framework/js/csrf.js +52 -0
  275. slm/static/rest_framework/js/default.js +47 -0
  276. slm/static/rest_framework/js/jquery-3.5.1.min.js +2 -0
  277. slm/static/rest_framework/js/prettify-min.js +28 -0
  278. slm/static/slm/css/admin.css +3 -0
  279. slm/static/slm/css/defines.css +82 -0
  280. slm/static/slm/css/forms.css +1 -0
  281. slm/static/slm/css/style.css +1004 -0
  282. slm/static/slm/img/email-branding.png +0 -0
  283. slm/static/slm/img/favicon.ico +0 -0
  284. slm/static/slm/img/login-bg.jpg +0 -0
  285. slm/static/slm/img/slm-logo.svg +4 -0
  286. slm/static/slm/js/autocomplete.js +341 -0
  287. slm/static/slm/js/enums.js +322 -0
  288. slm/static/slm/js/fileIcons.js +30 -0
  289. slm/static/slm/js/form.js +404 -0
  290. slm/static/slm/js/formWidget.js +23 -0
  291. slm/static/slm/js/persistable.js +33 -0
  292. slm/static/slm/js/slm.js +1028 -0
  293. slm/static/slm/js/time24.js +212 -0
  294. slm/static_templates/slm/css/defines.css +26 -0
  295. slm/static_templates/slm/js/enums.js +28 -0
  296. slm/static_templates/slm/js/fileIcons.js +16 -0
  297. slm/static_templates/slm/js/urls.js +5 -0
  298. slm/templates/account/base.html +20 -0
  299. slm/templates/account/email/base.html +43 -0
  300. slm/templates/account/email/base_message.txt +7 -0
  301. slm/templates/account/email/email_confirmation_message.html +16 -0
  302. slm/templates/account/email/email_confirmation_message.txt +7 -0
  303. slm/templates/account/email/email_confirmation_signup_message.html +1 -0
  304. slm/templates/account/email/email_confirmation_signup_message.txt +1 -0
  305. slm/templates/account/email/email_confirmation_signup_subject.txt +1 -0
  306. slm/templates/account/email/email_confirmation_subject.txt +4 -0
  307. slm/templates/account/email/password_reset_key_message.html +28 -0
  308. slm/templates/account/email/password_reset_key_message.txt +9 -0
  309. slm/templates/account/email/password_reset_key_subject.txt +4 -0
  310. slm/templates/account/email/unknown_account_message.html +25 -0
  311. slm/templates/account/email/unknown_account_message.txt +12 -0
  312. slm/templates/account/email/unknown_account_subject.txt +4 -0
  313. slm/templates/account/login.html +67 -0
  314. slm/templates/account/logout.html +38 -0
  315. slm/templates/account/password_change.html +48 -0
  316. slm/templates/account/password_reset.html +51 -0
  317. slm/templates/account/password_reset_done.html +20 -0
  318. slm/templates/account/password_reset_from_key.html +52 -0
  319. slm/templates/account/password_reset_from_key_done.html +17 -0
  320. slm/templates/admin/base.html +7 -0
  321. slm/templates/messages.html +8 -0
  322. slm/templates/rest_framework/README +16 -0
  323. slm/templates/rest_framework/admin/detail.html +10 -0
  324. slm/templates/rest_framework/admin/dict_value.html +11 -0
  325. slm/templates/rest_framework/admin/list.html +32 -0
  326. slm/templates/rest_framework/admin/list_value.html +11 -0
  327. slm/templates/rest_framework/admin/simple_list_value.html +2 -0
  328. slm/templates/rest_framework/admin.html +282 -0
  329. slm/templates/rest_framework/api.html +3 -0
  330. slm/templates/rest_framework/base.html +334 -0
  331. slm/templates/rest_framework/docs/auth/basic.html +42 -0
  332. slm/templates/rest_framework/docs/auth/session.html +40 -0
  333. slm/templates/rest_framework/docs/auth/token.html +41 -0
  334. slm/templates/rest_framework/docs/document.html +37 -0
  335. slm/templates/rest_framework/docs/error.html +71 -0
  336. slm/templates/rest_framework/docs/index.html +55 -0
  337. slm/templates/rest_framework/docs/interact.html +57 -0
  338. slm/templates/rest_framework/docs/langs/javascript-intro.html +5 -0
  339. slm/templates/rest_framework/docs/langs/javascript.html +15 -0
  340. slm/templates/rest_framework/docs/langs/python-intro.html +3 -0
  341. slm/templates/rest_framework/docs/langs/python.html +13 -0
  342. slm/templates/rest_framework/docs/langs/shell-intro.html +3 -0
  343. slm/templates/rest_framework/docs/langs/shell.html +6 -0
  344. slm/templates/rest_framework/docs/link.html +113 -0
  345. slm/templates/rest_framework/docs/sidebar.html +78 -0
  346. slm/templates/rest_framework/filters/base.html +16 -0
  347. slm/templates/rest_framework/filters/ordering.html +17 -0
  348. slm/templates/rest_framework/filters/search.html +13 -0
  349. slm/templates/rest_framework/horizontal/checkbox.html +23 -0
  350. slm/templates/rest_framework/horizontal/checkbox_multiple.html +32 -0
  351. slm/templates/rest_framework/horizontal/dict_field.html +11 -0
  352. slm/templates/rest_framework/horizontal/fieldset.html +16 -0
  353. slm/templates/rest_framework/horizontal/form.html +6 -0
  354. slm/templates/rest_framework/horizontal/input.html +21 -0
  355. slm/templates/rest_framework/horizontal/list_field.html +11 -0
  356. slm/templates/rest_framework/horizontal/list_fieldset.html +13 -0
  357. slm/templates/rest_framework/horizontal/radio.html +42 -0
  358. slm/templates/rest_framework/horizontal/select.html +36 -0
  359. slm/templates/rest_framework/horizontal/select_multiple.html +38 -0
  360. slm/templates/rest_framework/horizontal/textarea.html +21 -0
  361. slm/templates/rest_framework/inline/checkbox.html +8 -0
  362. slm/templates/rest_framework/inline/checkbox_multiple.html +14 -0
  363. slm/templates/rest_framework/inline/dict_field.html +9 -0
  364. slm/templates/rest_framework/inline/fieldset.html +6 -0
  365. slm/templates/rest_framework/inline/form.html +8 -0
  366. slm/templates/rest_framework/inline/input.html +9 -0
  367. slm/templates/rest_framework/inline/list_field.html +9 -0
  368. slm/templates/rest_framework/inline/list_fieldset.html +3 -0
  369. slm/templates/rest_framework/inline/radio.html +25 -0
  370. slm/templates/rest_framework/inline/select.html +24 -0
  371. slm/templates/rest_framework/inline/select_multiple.html +25 -0
  372. slm/templates/rest_framework/inline/textarea.html +9 -0
  373. slm/templates/rest_framework/login.html +3 -0
  374. slm/templates/rest_framework/login_base.html +65 -0
  375. slm/templates/rest_framework/pagination/numbers.html +47 -0
  376. slm/templates/rest_framework/pagination/previous_and_next.html +21 -0
  377. slm/templates/rest_framework/raw_data_form.html +11 -0
  378. slm/templates/rest_framework/schema.js +3 -0
  379. slm/templates/rest_framework/vertical/checkbox.html +16 -0
  380. slm/templates/rest_framework/vertical/checkbox_multiple.html +30 -0
  381. slm/templates/rest_framework/vertical/dict_field.html +7 -0
  382. slm/templates/rest_framework/vertical/fieldset.html +13 -0
  383. slm/templates/rest_framework/vertical/form.html +6 -0
  384. slm/templates/rest_framework/vertical/input.html +17 -0
  385. slm/templates/rest_framework/vertical/list_field.html +7 -0
  386. slm/templates/rest_framework/vertical/list_fieldset.html +7 -0
  387. slm/templates/rest_framework/vertical/radio.html +40 -0
  388. slm/templates/rest_framework/vertical/select.html +34 -0
  389. slm/templates/rest_framework/vertical/select_multiple.html +31 -0
  390. slm/templates/rest_framework/vertical/textarea.html +17 -0
  391. slm/templates/slm/about.html +21 -0
  392. slm/templates/slm/alerts/alert.html +15 -0
  393. slm/templates/slm/alerts/geodesymlinvalid.html +8 -0
  394. slm/templates/slm/alerts/importalert.html +10 -0
  395. slm/templates/slm/alerts.html +18 -0
  396. slm/templates/slm/auth_menu.html +41 -0
  397. slm/templates/slm/base.html +195 -0
  398. slm/templates/slm/emails/alert_issued.html +31 -0
  399. slm/templates/slm/emails/alert_issued.txt +9 -0
  400. slm/templates/slm/emails/base.html +6 -0
  401. slm/templates/slm/emails/changes_rejected.txt +7 -0
  402. slm/templates/slm/emails/review_requested.txt +7 -0
  403. slm/templates/slm/forms/widgets/auto_complete.html +21 -0
  404. slm/templates/slm/forms/widgets/auto_complete_multiple.html +18 -0
  405. slm/templates/slm/forms/widgets/checkbox_multiple.html +6 -0
  406. slm/templates/slm/forms/widgets/inline_multi.html +1 -0
  407. slm/templates/slm/forms/widgets/splitdatetime.html +14 -0
  408. slm/templates/slm/forms/widgets/time24.html +37 -0
  409. slm/templates/slm/help.html +54 -0
  410. slm/templates/slm/messages.html +13 -0
  411. slm/templates/slm/new_site.html +88 -0
  412. slm/templates/slm/profile.html +57 -0
  413. slm/templates/slm/register.html +40 -0
  414. slm/templates/slm/reports/file_log.html +43 -0
  415. slm/templates/slm/reports/head_log.html +23 -0
  416. slm/templates/slm/reports/head_report.html +55 -0
  417. slm/templates/slm/reports/index_log.html +23 -0
  418. slm/templates/slm/reports/index_report.html +71 -0
  419. slm/templates/slm/station/alert.html +8 -0
  420. slm/templates/slm/station/alerts.html +19 -0
  421. slm/templates/slm/station/base.html +104 -0
  422. slm/templates/slm/station/download.html +87 -0
  423. slm/templates/slm/station/edit.html +283 -0
  424. slm/templates/slm/station/form.html +110 -0
  425. slm/templates/slm/station/log.html +18 -0
  426. slm/templates/slm/station/review.html +461 -0
  427. slm/templates/slm/station/upload.html +295 -0
  428. slm/templates/slm/station/uploads/attachment.html +20 -0
  429. slm/templates/slm/station/uploads/geodesyml.html +1 -0
  430. slm/templates/slm/station/uploads/image.html +27 -0
  431. slm/templates/slm/station/uploads/json.html +0 -0
  432. slm/templates/slm/station/uploads/legacy.html +77 -0
  433. slm/templates/slm/top_nav.html +14 -0
  434. slm/templates/slm/user_activity.html +16 -0
  435. slm/templates/slm/widgets/alert_scroll.html +135 -0
  436. slm/templates/slm/widgets/filelist.html +258 -0
  437. slm/templates/slm/widgets/legend.html +12 -0
  438. slm/templates/slm/widgets/log_scroll.html +88 -0
  439. slm/templates/slm/widgets/stationlist.html +233 -0
  440. slm/templatetags/__init__.py +0 -0
  441. slm/templatetags/jinja2.py +9 -0
  442. slm/templatetags/slm.py +459 -0
  443. slm/urls.py +148 -0
  444. slm/utils.py +299 -0
  445. slm/validators.py +297 -0
  446. slm/views.py +654 -0
  447. slm/widgets.py +134 -0
Binary file
Binary file
Binary file
@@ -0,0 +1,4 @@
1
+ <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="25" cy="25" r="25" fill="white"/>
3
+ <path d="M10.8974 25.641C10.8974 23.6752 11.266 21.8376 12.0032 20.1282C12.7404 18.4188 13.75 16.9284 15.0321 15.6571C16.3141 14.3857 17.8098 13.3814 19.5192 12.6442C21.2286 11.9071 23.0556 11.5385 25 11.5385C26.9444 11.5385 28.7714 11.9071 30.4808 12.6442C32.1902 13.3814 33.6859 14.3857 34.9679 15.6571C36.25 16.9284 37.2596 18.4188 37.9968 20.1282C38.734 21.8376 39.1026 23.6752 39.1026 25.641H37.1795C37.1795 23.953 36.859 22.3665 36.2179 20.8814C35.5769 19.3964 34.7062 18.1036 33.6058 17.0032C32.5053 15.9028 31.2126 15.0374 29.7276 14.4071C28.2425 13.7767 26.6667 13.4615 25 13.4615C23.3333 13.4615 21.7575 13.7767 20.2724 14.4071C18.7874 15.0374 17.4947 15.9028 16.3942 17.0032C15.2938 18.1036 14.4231 19.3964 13.7821 20.8814C13.141 22.3665 12.8205 23.953 12.8205 25.641H10.8974ZM16.5064 25.641C16.5064 23.2692 17.3344 21.2607 18.9904 19.6154C20.6464 17.9701 22.6496 17.1474 25 17.1474C27.3504 17.1474 29.3536 17.9701 31.0096 19.6154C32.6656 21.2607 33.4936 23.2692 33.4936 25.641H31.5705C31.5705 23.8034 30.9295 22.2489 29.6474 20.9776C28.3654 19.7062 26.8162 19.0705 25 19.0705C23.1838 19.0705 21.6346 19.7062 20.3526 20.9776C19.0705 22.2489 18.4295 23.8034 18.4295 25.641H16.5064ZM21.1538 38.9744L19.8077 37.6282L24.0385 33.3974V28.3974C23.4615 28.141 22.9968 27.7618 22.6442 27.2596C22.2917 26.7575 22.1154 26.218 22.1154 25.641C22.1154 24.8291 22.3932 24.1453 22.9487 23.5897C23.5043 23.0342 24.188 22.7564 25 22.7564C25.812 22.7564 26.4957 23.0342 27.0513 23.5897C27.6068 24.1453 27.8846 24.8291 27.8846 25.641C27.8846 26.218 27.7083 26.7575 27.3558 27.2596C27.0032 27.7618 26.5385 28.141 25.9615 28.3974V33.3974L30.1923 37.6282L28.8462 38.9744L25 35.1282L21.1538 38.9744Z" fill="black"/>
4
+ </svg>
@@ -0,0 +1,341 @@
1
+ import { FormWidget } from "./formWidget.js";
2
+
3
+ export class AutoComplete extends FormWidget {
4
+ /**
5
+ * https://api.jqueryui.com/autocomplete/
6
+ *
7
+ * Expects the following data parameters on the auto complete container:
8
+ *
9
+ * data-service-url: (required) The url to fetch suggestions from ajax
10
+ * data-search-param: (required) The url query parameter to use for the search string
11
+ * data-label-param: (optional) The property to use as the label (default: search-param)
12
+ * data-value-param: (optional) The property to use as the value (default: label-param)
13
+ * data-renderSuggestion: (optional) A javascript function body accepting an obj argument and
14
+ * returning a string label to use for the suggestion.
15
+ *
16
+ * When providing a render suggestion, text that is searchable should be
17
+ * wrapped in <span class="matchable"></span>
18
+ */
19
+
20
+ textInput;
21
+ formField;
22
+
23
+ paramName;
24
+ serviceUrl;
25
+ valueParam;
26
+ selected;
27
+
28
+ // if theres a full match on the first suggestion when the field is
29
+ // defocused (enter or click away) we set the value to that first match.
30
+ newResponse; // toggle used to only check the first menu item
31
+ fullMatch;
32
+ firstSuggestion;
33
+
34
+ renderSuggestion(suggestion) {
35
+ return `<span class="matchable">${suggestion[this.labelParam]}</span>`;
36
+ }
37
+
38
+ inputUpdated() {
39
+ /**
40
+ * When a user changes search text, we unset the set value if one is
41
+ * set, remove any html, reset the search box to the raw search string
42
+ * and set the cursor to the end.
43
+ */
44
+ const label = this.textInput.html();
45
+ const searchStr = this.textInput.find('.matchable').text();
46
+ const value = this.formField.val();
47
+ if (value) {
48
+ if (label !== this.selected[value]) {
49
+ this.remove(this.formField.val());
50
+ this.textInput.html(searchStr);
51
+ let sel = window.getSelection();
52
+ sel.selectAllChildren(this.textInput.get(0));
53
+ sel.collapseToEnd();
54
+ }
55
+ }
56
+ }
57
+
58
+ getSuggestion(value) {
59
+ /**
60
+ * Return the suggestion exactly matching the value.
61
+ */
62
+ const query = {};
63
+ query[this.valueParam] = value;
64
+ let suggestion = null;
65
+ $.ajax({
66
+ url: this.serviceUrl,
67
+ data: query,
68
+ async: false
69
+ }).done(
70
+ function(data) {
71
+ if (data.length > 0) {
72
+ suggestion = this.makeSuggestion(data[0]);
73
+ }
74
+ }.bind(this)
75
+ ).fail(function(jqXHR) {console.log(jqXHR);});
76
+ return suggestion;
77
+ }
78
+
79
+ makeSuggestion(suggestion) {
80
+ return {
81
+ label: this.renderSuggestion(suggestion),
82
+ value: suggestion[this.valueParam],
83
+ basic: suggestion[this.labelParam]
84
+ }
85
+ }
86
+
87
+ filterResponse(data) {
88
+ this.inputUpdated();
89
+ const suggestions = [];
90
+ this.newResponse = true;
91
+ this.fullMatch = false;
92
+ if (data.length > 0) {
93
+ this.firstSuggestion = this.makeSuggestion(data[0]);
94
+ } else {
95
+ this.firstSuggestion = null;
96
+ }
97
+ for (const suggestion of data) {
98
+ if (this.selected.hasOwnProperty(
99
+ suggestion[this.valueParam].toString()
100
+ )) {
101
+ continue;
102
+ }
103
+ suggestions.push(this.makeSuggestion(suggestion));
104
+ }
105
+ return suggestions;
106
+ }
107
+
108
+ constructor(options) {
109
+ super(options.container);
110
+ this.textInput = this.container.find('.search-input');
111
+ this.formField = this.container.find(':input').first();
112
+ this.selected = {};
113
+ if (this.textInput.val()) {
114
+ this.selected[this.textInput.val()] = this.textInput.html();
115
+ }
116
+ this.serviceUrl = this.textInput.data('serviceUrl');
117
+ this.source = this.textInput.data('source');
118
+ this.searchParam = this.textInput.data('searchParam');
119
+ this.labelParam = this.textInput.data('labelParam') || this.searchParam;
120
+ this.valueParam = this.textInput.data('valueParam') || this.labelParam;
121
+ this.queryParams = this.textInput.data('queryParams') || {};
122
+ this.menuClass = this.textInput.data('menuClass') || '';
123
+
124
+ if (this.textInput.data('renderSuggestion')) {
125
+ this.renderSuggestion = new Function(
126
+ 'obj',
127
+ this.textInput.data('renderSuggestion')
128
+ );
129
+ }
130
+
131
+ // blur the input when enter is pressed
132
+ this.textInput.keypress(function(e) {
133
+ if (e.which === 13) {
134
+ $(this).trigger('blur');
135
+ }
136
+ });
137
+
138
+ this.textInput.blur(() => {
139
+ if (this.fullMatch && this.firstSuggestion) {
140
+ this.add(this.firstSuggestion);
141
+ }
142
+ });
143
+
144
+ this.autocomplete = this.textInput.autocomplete({
145
+ delay: 250,
146
+ minLength: 0,
147
+ source: this.serviceUrl ? (request, response) => {
148
+ const data = this.queryParams;
149
+ data[this.searchParam] = request.term;
150
+ $.ajax({url: this.serviceUrl, data: data}).done(
151
+ function(data) {
152
+ response(this.filterResponse(data));
153
+ }.bind(this)
154
+ ).fail(function(jqXHR) {console.log(jqXHR);});
155
+ }: (request, response) => {
156
+ const data = $.ui.autocomplete.filter(this.source, request.term);
157
+ response(
158
+ this.filterResponse(
159
+ data
160
+ )
161
+ );
162
+ },
163
+ change: function(event, ui) {
164
+ this.formField.trigger('change');
165
+ }.bind(this),
166
+ select: function(event, ui) {
167
+ this.add(ui.item);
168
+ event.preventDefault();
169
+ }.bind(this),
170
+ focus: function(event, ui) {
171
+ this.textInput.html(ui.item.basic);
172
+ return false;
173
+ }.bind(this),
174
+
175
+ }).bind('focus', function() { $(this).autocomplete('search'); } );
176
+
177
+ const checkFullMatch = function(text, term) {
178
+ this.fullMatch |= text.toUpperCase() === term.toUpperCase();
179
+ if (!this.fullMatch) {
180
+ // special case for (text)
181
+ if (text.startsWith('(')) {
182
+ text = text.substring(1);
183
+ }
184
+ if (text.endsWith(')')) {
185
+ text = text.substring(0, text.length-1);
186
+ }
187
+ this.fullMatch |= text.toUpperCase() === term.toUpperCase();
188
+ }
189
+ }.bind(this);
190
+
191
+ const newResponse = function(newResponse=null) {
192
+ if (newResponse !== null) {
193
+ this.newResponse = newResponse;
194
+ }
195
+ return this.newResponse;
196
+ }.bind(this)
197
+
198
+ this.autocomplete.data('ui-autocomplete')._renderItem = function (ul, item) {
199
+ const label = $(`<div>${item.label}</div>`);
200
+ if (this.term) {
201
+ label.find('span.matchable').each((idx, child) => {
202
+ if (newResponse()) {
203
+ checkFullMatch($(child).text(), this.term);
204
+ }
205
+ $(child).html(
206
+ String($(child).text()).replace(
207
+ new RegExp(this.term, 'gi'),
208
+ "<span class='autocomplete-match'>$&</span>")
209
+ );
210
+ });
211
+ }
212
+ newResponse(false);
213
+ return $('<li></li>')
214
+ .data('item.ui-autocomplete', item)
215
+ .append(label)
216
+ .appendTo(ul);
217
+ };
218
+
219
+ if (this.menuClass) {
220
+ const menuClass = this.menuClass;
221
+ this.autocomplete.data('ui-autocomplete')._renderMenu = function (ul, items) {
222
+ const that = this;
223
+ $.each(items, function (index, item) {
224
+ that._renderItemData(ul, item);
225
+ });
226
+ $(ul).addClass(menuClass);
227
+ }
228
+ }
229
+ }
230
+
231
+ add(item) {
232
+ this.remove(this.formField.val());
233
+ this.selected[item.value.toString()] = item.label;
234
+ this.formField.val(item.value.toString());
235
+ this.textInput.html(item.label);
236
+ }
237
+
238
+ remove(value) {
239
+ value = value.toString();
240
+ if (this.selected.hasOwnProperty(value)) {
241
+ delete this.selected[value];
242
+ }
243
+ this.formField.val('');
244
+ this.textInput.html('');
245
+ }
246
+
247
+ clear() {
248
+ for (const value of Object.keys(this.selected)) { this.remove(value, false); }
249
+ }
250
+
251
+ persist() {
252
+ this.persisted = this.selected;
253
+ }
254
+
255
+ revive() {
256
+ if (this.persisted) {
257
+ this.clear();
258
+ for (const [value, label] of Object.entries(this.persisted)) {
259
+ this.add({value: value, label: label});
260
+ }
261
+ }
262
+ }
263
+
264
+ changed() {}
265
+ }
266
+
267
+ export class AutoCompleteMultiple extends AutoComplete {
268
+ /**
269
+ * https://github.com/devbridge/jQuery-Autocomplete
270
+ *
271
+ * Expects the following data parameters on the auto complete container:
272
+ *
273
+ * data-service-url: (required) The url to fetch suggestions from via ajax
274
+ * data-search-param: (required) The url query parameter to use for the search string
275
+ * data-label-param: (optional) The property to use as the label (default: search-param)
276
+ * data-value-param: (optional) The property to use as the value (default: label-param)
277
+ * data-renderSuggestion: (optional) A javascript function body accepting an obj argument and
278
+ * returning a string label to use for the suggestion.
279
+ *
280
+ * When providing a render suggestion, text that is searchable should be
281
+ * wrapped in <span class="matchable"></span>
282
+ */
283
+
284
+ display;
285
+
286
+ inputUpdated() { };
287
+
288
+ constructor(options) {
289
+ super(options);
290
+ this.display = this.container.find('.select-display');
291
+ this.selected = {};
292
+ this.formField.find('option:selected').each(
293
+ (idx, opt) => { this.selected[$(opt).val()] = $(opt).html(); }
294
+ );
295
+
296
+ this.display.find(`div.autocomplete-selection span:last-child`).click(function(event) {
297
+ this.remove($(event.target).closest('div.autocomplete-selection').data('value'));
298
+ }.bind(this));
299
+ }
300
+
301
+ add(item, trigger=true) {
302
+ this.textInput.html('');
303
+ this.selected[item.value.toString()] = item.label;
304
+ if (this.formField.find(`option[value="${item.value}"]`).length === 0) {
305
+ this.formField.prepend($(
306
+ `<option value="${item.value}" selected>${item.label}</option>`
307
+ ));
308
+ }
309
+ if (this.display.find(`div.autocomplete-selection[data-value="${item.value}"]`).length === 0) {
310
+ this.display.prepend(
311
+ `<div class="autocomplete-selection" data-value="${item.value}">${item.label}<span></span></div>`
312
+ );
313
+ }
314
+ this.display.find(`div.autocomplete-selection[data-value="${item.value}"] span:last-child`).click(function() {
315
+ this.remove(item.value);
316
+ }.bind(this));
317
+ }
318
+
319
+ remove(value, trigger=true) {
320
+ value = value.toString();
321
+ if (this.selected.hasOwnProperty(value)) {
322
+ delete this.selected[value];
323
+ }
324
+ this.formField.find(`option[value="${value}"]`).remove();
325
+ this.display.find(`div.autocomplete-selection[data-value="${value}"]`).remove();
326
+ }
327
+
328
+ changed() {
329
+ /**
330
+ * The underlying select has been updated - we must refresh the
331
+ * component to match it
332
+ */
333
+ const selected = this.formField.find('option:selected');
334
+ if (selected.length === 0) { return this.clear(); }
335
+ /* todo - only clear case handled above
336
+ selected.each(
337
+ (idx, opt) => { this.selected[$(opt).val()] = $(opt).html(); }
338
+ );
339
+ */
340
+ }
341
+ }
@@ -0,0 +1,322 @@
1
+ if (typeof slm === 'undefined' || slm == null) { var slm = {}; }
2
+
3
+ class LogEntryType {
4
+
5
+ static SITE_PROPOSED = new LogEntryType(1, "SITE_PROPOSED", "Site Proposed", "slm-log-site-proposed");
6
+ static ADD = new LogEntryType(2, "ADD", "Add", "slm-log-add");
7
+ static UPDATE = new LogEntryType(3, "UPDATE", "Update", "slm-log-update");
8
+ static DELETE = new LogEntryType(4, "DELETE", "Delete", "slm-log-delete");
9
+ static PUBLISH = new LogEntryType(5, "PUBLISH", "Publish", "slm-log-publish");
10
+ static LOG_UPLOAD = new LogEntryType(6, "LOG_UPLOAD", "Log Upload", "slm-log-log-upload");
11
+ static IMAGE_UPLOAD = new LogEntryType(7, "IMAGE_UPLOAD", "Image Upload", "slm-log-image-upload");
12
+ static ATTACHMENT_UPLOAD = new LogEntryType(8, "ATTACHMENT_UPLOAD", "Attachment Upload", "slm-log-attachment-upload");
13
+ static IMAGE_PUBLISH = new LogEntryType(9, "IMAGE_PUBLISH", "Image Published", "slm-log-image-published");
14
+ static ATTACHMENT_PUBLISH = new LogEntryType(10, "ATTACHMENT_PUBLISH", "Attachment Published", "slm-log-attachment-published");
15
+ static IMAGE_UNPUBLISH = new LogEntryType(11, "IMAGE_UNPUBLISH", "Image Unpublished", "slm-log-image-unpublished");
16
+ static ATTACHMENT_UNPUBLISH = new LogEntryType(12, "ATTACHMENT_UNPUBLISH", "Attachment Unpublished", "slm-log-attachment-unpublished");
17
+ static IMAGE_DELETE = new LogEntryType(13, "IMAGE_DELETE", "Image Deleted", "slm-log-image-deleted");
18
+ static ATTACHMENT_DELETE = new LogEntryType(14, "ATTACHMENT_DELETE", "Attachment Deleted", "slm-log-attachment-deleted");
19
+ static REVERT = new LogEntryType(15, "REVERT", "Revert", "slm-log-revert");
20
+
21
+ constructor (value, name, label, css) {
22
+ this.value = value;
23
+ this.name = name;
24
+ this.label = label;
25
+ this.css = css;
26
+ }
27
+
28
+ static ciCompare(a, b) {
29
+ return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0 : a === b;
30
+ }
31
+
32
+ toString() {
33
+ return this.label;
34
+ }
35
+
36
+ static get(value) {
37
+ if (value instanceof this) {
38
+ return value;
39
+ }
40
+
41
+ for (const en of this) {
42
+ if (en.value === value) {
43
+ return en;
44
+ }
45
+ }
46
+ for (const en of this) {
47
+ if (this.ciCompare(en.name, value)) {
48
+ return en;
49
+ }
50
+ }
51
+ return null;
52
+ }
53
+
54
+ static [Symbol.iterator]() {
55
+ return [LogEntryType.SITE_PROPOSED, LogEntryType.ADD, LogEntryType.UPDATE, LogEntryType.DELETE, LogEntryType.PUBLISH, LogEntryType.LOG_UPLOAD, LogEntryType.IMAGE_UPLOAD, LogEntryType.ATTACHMENT_UPLOAD, LogEntryType.IMAGE_PUBLISH, LogEntryType.ATTACHMENT_PUBLISH, LogEntryType.IMAGE_UNPUBLISH, LogEntryType.ATTACHMENT_UNPUBLISH, LogEntryType.IMAGE_DELETE, LogEntryType.ATTACHMENT_DELETE, LogEntryType.REVERT][Symbol.iterator]();
56
+ }
57
+ }
58
+ class SiteLogStatus {
59
+
60
+ static FORMER = new SiteLogStatus(1, "FORMER", "Former", "Site is no longer maintained and logs are not published.", "slm-status-former", "#3D4543");
61
+ static PROPOSED = new SiteLogStatus(2, "PROPOSED", "Proposed", "This is a new Site that has never been published.", "slm-status-proposed", "#913D88");
62
+ static UPDATED = new SiteLogStatus(3, "UPDATED", "Updated", "Site log or section has unpublished updates.", "slm-status-updated", "#0079AD");
63
+ static PUBLISHED = new SiteLogStatus(4, "PUBLISHED", "Published", "Site log or section is published with no unpublished changes.", "slm-status-published", "#0D820D");
64
+ static EMPTY = new SiteLogStatus(5, "EMPTY", "Empty", "Site log section is empty or deleted.", "slm-status-empty", "#D3D3D3");
65
+ static SUSPENDED = new SiteLogStatus(6, "SUSPENDED", "Suspended", "Site has been temporarily suspended and does not appear in public data.", "slm-status-suspended", "#E0041A");
66
+
67
+ constructor (value, name, label, help, css, color) {
68
+ this.value = value;
69
+ this.name = name;
70
+ this.label = label;
71
+ this.help = help;
72
+ this.css = css;
73
+ this.color = color;
74
+ }
75
+
76
+ static ciCompare(a, b) {
77
+ return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0 : a === b;
78
+ }
79
+
80
+ toString() {
81
+ return this.label;
82
+ }
83
+
84
+ static get(value) {
85
+ if (value instanceof this) {
86
+ return value;
87
+ }
88
+
89
+ for (const en of this) {
90
+ if (en.value === value) {
91
+ return en;
92
+ }
93
+ }
94
+ for (const en of this) {
95
+ if (this.ciCompare(en.name, value)) {
96
+ return en;
97
+ }
98
+ }
99
+ return null;
100
+ }
101
+
102
+ static [Symbol.iterator]() {
103
+ return [SiteLogStatus.FORMER, SiteLogStatus.PROPOSED, SiteLogStatus.UPDATED, SiteLogStatus.PUBLISHED, SiteLogStatus.EMPTY, SiteLogStatus.SUSPENDED][Symbol.iterator]();
104
+ }
105
+ }
106
+ class AlertLevel {
107
+
108
+ static NOTICE = new AlertLevel(1, "NOTICE", "NOTICE", "slm-alert-notice", "#12CAF0");
109
+ static WARNING = new AlertLevel(2, "WARNING", "WARNING", "slm-alert-warning", "#E3AA00");
110
+ static ERROR = new AlertLevel(3, "ERROR", "ERROR", "slm-alert-error", "#DD3444");
111
+
112
+ constructor (value, name, label, css, color) {
113
+ this.value = value;
114
+ this.name = name;
115
+ this.label = label;
116
+ this.css = css;
117
+ this.color = color;
118
+ }
119
+
120
+ static ciCompare(a, b) {
121
+ return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0 : a === b;
122
+ }
123
+
124
+ toString() {
125
+ return this.name;
126
+ }
127
+
128
+ static get(value) {
129
+ if (value instanceof this) {
130
+ return value;
131
+ }
132
+
133
+ for (const en of this) {
134
+ if (en.value === value) {
135
+ return en;
136
+ }
137
+ }
138
+ for (const en of this) {
139
+ if (this.ciCompare(en.name, value)) {
140
+ return en;
141
+ }
142
+ }
143
+ for (const en of this) {
144
+ if (en.label === value) {
145
+ return en;
146
+ }
147
+ }
148
+ return null;
149
+ }
150
+
151
+ static [Symbol.iterator]() {
152
+ return [AlertLevel.NOTICE, AlertLevel.WARNING, AlertLevel.ERROR][Symbol.iterator]();
153
+ }
154
+ }
155
+ class SiteFileUploadStatus {
156
+
157
+ static UNPUBLISHED = new SiteFileUploadStatus(1, "UNPUBLISHED", "Unpublished File", "The file is pending moderation before it will be made public.", "slm-upload-unpublished file", "#0079AD");
158
+ static PUBLISHED = new SiteFileUploadStatus(2, "PUBLISHED", "Published File", "The file is published and is publicly available as an attachment to the site.", "slm-upload-published file", "#0D820D");
159
+ static INVALID = new SiteFileUploadStatus(3, "INVALID", "Invalid Site Log", "The file did not pass validation.", "slm-upload-invalid site log", "#8b0000");
160
+ static WARNINGS = new SiteFileUploadStatus(4, "WARNINGS", "Warnings Site Log", "The file is valid but has some warnings.", "slm-upload-warnings site log", "#E3AA00");
161
+ static VALID = new SiteFileUploadStatus(5, "VALID", "Valid Site Log", "The file is valid.", "slm-upload-valid site log", "#0D820D");
162
+
163
+ constructor (value, name, label, help, css, color) {
164
+ this.value = value;
165
+ this.name = name;
166
+ this.label = label;
167
+ this.help = help;
168
+ this.css = css;
169
+ this.color = color;
170
+ }
171
+
172
+ static ciCompare(a, b) {
173
+ return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0 : a === b;
174
+ }
175
+
176
+ toString() {
177
+ return this.label;
178
+ }
179
+
180
+ static get(value) {
181
+ if (value instanceof this) {
182
+ return value;
183
+ }
184
+
185
+ for (const en of this) {
186
+ if (en.value === value) {
187
+ return en;
188
+ }
189
+ }
190
+ for (const en of this) {
191
+ if (this.ciCompare(en.name, value)) {
192
+ return en;
193
+ }
194
+ }
195
+ return null;
196
+ }
197
+
198
+ static [Symbol.iterator]() {
199
+ return [SiteFileUploadStatus.UNPUBLISHED, SiteFileUploadStatus.PUBLISHED, SiteFileUploadStatus.INVALID, SiteFileUploadStatus.WARNINGS, SiteFileUploadStatus.VALID][Symbol.iterator]();
200
+ }
201
+ }
202
+ class SiteLogFormat {
203
+
204
+ static LEGACY = new SiteLogFormat(1, "LEGACY", "Legacy (ASCII)", "text/plain", "bi bi-file-text", "log", ["text", "txt", "legacy"]);
205
+ static GEODESY_ML = new SiteLogFormat(2, "GEODESY_ML", "GeodesyML", "application/xml", "bi bi-filetype-xml", "xml", ["xml"]);
206
+ static JSON = new SiteLogFormat(3, "JSON", "JSON", "application/json", "bi bi-filetype-json", "json", ["json", "js"]);
207
+ static ASCII_9CHAR = new SiteLogFormat(4, "ASCII_9CHAR", "ASCII (9-Char)", "text/plain", "bi bi-file-text", "log", ["text", "txt", "9char"]);
208
+
209
+ constructor (value, name, label, mimetype, icon, ext, alts) {
210
+ this.value = value;
211
+ this.name = name;
212
+ this.label = label;
213
+ this.mimetype = mimetype;
214
+ this.icon = icon;
215
+ this.ext = ext;
216
+ this.alts = alts;
217
+ }
218
+
219
+ static ciCompare(a, b) {
220
+ return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0 : a === b;
221
+ }
222
+
223
+ toString() {
224
+ return this.label;
225
+ }
226
+
227
+ static get(value) {
228
+ if (value instanceof this) {
229
+ return value;
230
+ }
231
+
232
+ for (const en of this) {
233
+ if (en.value === value) {
234
+ return en;
235
+ }
236
+ }
237
+ for (const en of this) {
238
+ if (this.ciCompare(en.name, value)) {
239
+ return en;
240
+ }
241
+ }
242
+ return null;
243
+ }
244
+
245
+ static [Symbol.iterator]() {
246
+ return [SiteLogFormat.LEGACY, SiteLogFormat.GEODESY_ML, SiteLogFormat.JSON, SiteLogFormat.ASCII_9CHAR][Symbol.iterator]();
247
+ }
248
+ }
249
+ class SLMFileType {
250
+
251
+ static SITE_LOG = new SLMFileType(1, "SITE_LOG", "Site Log", "log");
252
+ static SITE_IMAGE = new SLMFileType(2, "SITE_IMAGE", "Site Image", "image");
253
+ static ATTACHMENT = new SLMFileType(3, "ATTACHMENT", "Attachment", "attachment");
254
+
255
+ constructor (value, name, label, type) {
256
+ this.value = value;
257
+ this.name = name;
258
+ this.label = label;
259
+ this.type = type;
260
+ }
261
+
262
+ static ciCompare(a, b) {
263
+ return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0 : a === b;
264
+ }
265
+
266
+ toString() {
267
+ return this.label;
268
+ }
269
+
270
+ static get(value) {
271
+ if (value instanceof this) {
272
+ return value;
273
+ }
274
+
275
+ for (const en of this) {
276
+ if (en.value === value) {
277
+ return en;
278
+ }
279
+ }
280
+ for (const en of this) {
281
+ if (this.ciCompare(en.name, value)) {
282
+ return en;
283
+ }
284
+ }
285
+ for (const en of this) {
286
+ if (en.type === value) {
287
+ return en;
288
+ }
289
+ }
290
+ return null;
291
+ }
292
+
293
+ static [Symbol.iterator]() {
294
+ return [SLMFileType.SITE_LOG, SLMFileType.SITE_IMAGE, SLMFileType.ATTACHMENT][Symbol.iterator]();
295
+ }
296
+ }
297
+
298
+
299
+ SiteLogStatus.prototype.set = function (child) {
300
+ if (
301
+ this === SiteLogStatus.PUBLISHED ||
302
+ this === SiteLogStatus.UPDATED ||
303
+ this === SiteLogStatus.EMPTY
304
+ ) {
305
+ return child;
306
+ }
307
+ return this.merge(child);
308
+ };
309
+
310
+ SiteLogStatus.prototype.merge = function (sibling) {
311
+ if (sibling !== null && sibling.value < this.value) {
312
+ return sibling;
313
+ }
314
+ return this;
315
+ };
316
+
317
+ slm.LogEntryType = LogEntryType;
318
+ slm.SiteLogStatus = SiteLogStatus;
319
+ slm.SiteFileUploadStatus = SiteFileUploadStatus;
320
+ slm.AlertLevel = AlertLevel;
321
+ slm.SiteLogFormat = SiteLogFormat;
322
+ slm.SLMFileType = SLMFileType;