Browse Source

Ancora avanzamento, qualcosa su frontend.

master
Emiliano Vavassori 2 years ago
parent
commit
233fcebfcb
  1. 2
      orgmgmt/accounting/locale/it/LC_MESSAGES/django.po
  2. 6
      orgmgmt/accounting/urls.py
  3. 2
      orgmgmt/board/locale/it/LC_MESSAGES/django.po
  4. 6
      orgmgmt/board/urls.py
  5. BIN
      orgmgmt/db.sqlite3
  6. BIN
      orgmgmt/locale/it/LC_MESSAGES/django.mo
  7. 55
      orgmgmt/locale/it/LC_MESSAGES/django.po
  8. BIN
      orgmgmt/members/locale/it/LC_MESSAGES/django.mo
  9. 32
      orgmgmt/members/locale/it/LC_MESSAGES/django.po
  10. 17
      orgmgmt/members/migrations/0003_remove_interest_member_id.py
  11. 3
      orgmgmt/members/models.py
  12. 27
      orgmgmt/members/templates/members/member_list.html
  13. 9
      orgmgmt/members/urls.py
  14. 13
      orgmgmt/members/views.py
  15. 9
      orgmgmt/orgmgmt/settings.py
  16. 5
      orgmgmt/orgmgmt/urls.py
  17. 21
      orgmgmt/static/components/@types/c3/LICENSE
  18. 16
      orgmgmt/static/components/@types/c3/README.md
  19. 1172
      orgmgmt/static/components/@types/c3/index.d.ts
  20. 71
      orgmgmt/static/components/@types/c3/package.json
  21. 21
      orgmgmt/static/components/@types/d3-array/LICENSE
  22. 16
      orgmgmt/static/components/@types/d3-array/README.md
  23. 547
      orgmgmt/static/components/@types/d3-array/index.d.ts
  24. 69
      orgmgmt/static/components/@types/d3-array/package.json
  25. 21
      orgmgmt/static/components/@types/d3-axis/LICENSE
  26. 16
      orgmgmt/static/components/@types/d3-axis/README.md
  27. 334
      orgmgmt/static/components/@types/d3-axis/index.d.ts
  28. 66
      orgmgmt/static/components/@types/d3-axis/package.json
  29. 21
      orgmgmt/static/components/@types/d3-brush/LICENSE
  30. 16
      orgmgmt/static/components/@types/d3-brush/README.md
  31. 248
      orgmgmt/static/components/@types/d3-brush/index.d.ts
  32. 62
      orgmgmt/static/components/@types/d3-brush/package.json
  33. 21
      orgmgmt/static/components/@types/d3-chord/LICENSE
  34. 16
      orgmgmt/static/components/@types/d3-chord/README.md
  35. 405
      orgmgmt/static/components/@types/d3-chord/index.d.ts
  36. 60
      orgmgmt/static/components/@types/d3-chord/package.json
  37. 21
      orgmgmt/static/components/@types/d3-collection/LICENSE
  38. 16
      orgmgmt/static/components/@types/d3-collection/README.md
  39. 483
      orgmgmt/static/components/@types/d3-collection/index.d.ts
  40. 60
      orgmgmt/static/components/@types/d3-collection/package.json
  41. 21
      orgmgmt/static/components/@types/d3-color/LICENSE
  42. 16
      orgmgmt/static/components/@types/d3-color/README.md
  43. 577
      orgmgmt/static/components/@types/d3-color/index.d.ts
  44. 69
      orgmgmt/static/components/@types/d3-color/package.json
  45. 21
      orgmgmt/static/components/@types/d3-dispatch/LICENSE
  46. 16
      orgmgmt/static/components/@types/d3-dispatch/README.md
  47. 74
      orgmgmt/static/components/@types/d3-dispatch/index.d.ts
  48. 64
      orgmgmt/static/components/@types/d3-dispatch/package.json
  49. 21
      orgmgmt/static/components/@types/d3-drag/LICENSE
  50. 16
      orgmgmt/static/components/@types/d3-drag/README.md
  51. 403
      orgmgmt/static/components/@types/d3-drag/index.d.ts
  52. 62
      orgmgmt/static/components/@types/d3-drag/package.json
  53. 21
      orgmgmt/static/components/@types/d3-dsv/LICENSE
  54. 16
      orgmgmt/static/components/@types/d3-dsv/README.md
  55. 388
      orgmgmt/static/components/@types/d3-dsv/index.d.ts
  56. 65
      orgmgmt/static/components/@types/d3-dsv/package.json
  57. 21
      orgmgmt/static/components/@types/d3-ease/LICENSE
  58. 16
      orgmgmt/static/components/@types/d3-ease/README.md
  59. 321
      orgmgmt/static/components/@types/d3-ease/index.d.ts
  60. 60
      orgmgmt/static/components/@types/d3-ease/package.json
  61. 21
      orgmgmt/static/components/@types/d3-force/LICENSE
  62. 16
      orgmgmt/static/components/@types/d3-force/README.md
  63. 1248
      orgmgmt/static/components/@types/d3-force/index.d.ts
  64. 64
      orgmgmt/static/components/@types/d3-force/package.json
  65. 21
      orgmgmt/static/components/@types/d3-format/LICENSE
  66. 16
      orgmgmt/static/components/@types/d3-format/README.md
  67. 246
      orgmgmt/static/components/@types/d3-format/index.d.ts
  68. 64
      orgmgmt/static/components/@types/d3-format/package.json
  69. 21
      orgmgmt/static/components/@types/d3-geo/LICENSE
  70. 16
      orgmgmt/static/components/@types/d3-geo/README.md
  71. 1715
      orgmgmt/static/components/@types/d3-geo/index.d.ts
  72. 66
      orgmgmt/static/components/@types/d3-geo/package.json
  73. 21
      orgmgmt/static/components/@types/d3-hierarchy/LICENSE
  74. 16
      orgmgmt/static/components/@types/d3-hierarchy/README.md
  75. 857
      orgmgmt/static/components/@types/d3-hierarchy/index.d.ts
  76. 64
      orgmgmt/static/components/@types/d3-hierarchy/package.json
  77. 21
      orgmgmt/static/components/@types/d3-interpolate/LICENSE
  78. 16
      orgmgmt/static/components/@types/d3-interpolate/README.md
  79. 314
      orgmgmt/static/components/@types/d3-interpolate/index.d.ts
  80. 67
      orgmgmt/static/components/@types/d3-interpolate/package.json
  81. 21
      orgmgmt/static/components/@types/d3-path/LICENSE
  82. 16
      orgmgmt/static/components/@types/d3-path/README.md
  83. 106
      orgmgmt/static/components/@types/d3-path/index.d.ts
  84. 61
      orgmgmt/static/components/@types/d3-path/package.json
  85. 21
      orgmgmt/static/components/@types/d3-polygon/LICENSE
  86. 16
      orgmgmt/static/components/@types/d3-polygon/README.md
  87. 46
      orgmgmt/static/components/@types/d3-polygon/index.d.ts
  88. 60
      orgmgmt/static/components/@types/d3-polygon/package.json
  89. 21
      orgmgmt/static/components/@types/d3-quadtree/LICENSE
  90. 16
      orgmgmt/static/components/@types/d3-quadtree/README.md
  91. 208
      orgmgmt/static/components/@types/d3-quadtree/index.d.ts
  92. 64
      orgmgmt/static/components/@types/d3-quadtree/package.json
  93. 21
      orgmgmt/static/components/@types/d3-queue/LICENSE
  94. 16
      orgmgmt/static/components/@types/d3-queue/README.md
  95. 67
      orgmgmt/static/components/@types/d3-queue/index.d.ts
  96. 64
      orgmgmt/static/components/@types/d3-queue/package.json
  97. 21
      orgmgmt/static/components/@types/d3-random/LICENSE
  98. 16
      orgmgmt/static/components/@types/d3-random/README.md
  99. 112
      orgmgmt/static/components/@types/d3-random/index.d.ts
  100. 60
      orgmgmt/static/components/@types/d3-random/package.json

2
orgmgmt/accounting/locale/it/LC_MESSAGES/django.po

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-02 23:21+0200\n"
"POT-Creation-Date: 2019-10-04 00:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

6
orgmgmt/accounting/urls.py

@ -0,0 +1,6 @@
from django.urls import path
from . import views
app_name = 'accounting'
urlpatterns = [
]

2
orgmgmt/board/locale/it/LC_MESSAGES/django.po

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-02 23:21+0200\n"
"POT-Creation-Date: 2019-10-04 00:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

6
orgmgmt/board/urls.py

@ -0,0 +1,6 @@
from django.urls import path
from . import views
app_name = 'board'
urlpatterns = [
]

BIN
orgmgmt/db.sqlite3

Binary file not shown.

BIN
orgmgmt/locale/it/LC_MESSAGES/django.mo

Binary file not shown.

55
orgmgmt/locale/it/LC_MESSAGES/django.po

@ -0,0 +1,55 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-04 00:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: templates/basepage.html:7
msgid "Organization Management"
msgstr "Gestione dell'associazione"
#: templates/basepage.html:9
msgid "Organization management site"
msgstr "Sito per la gestione dell'associazione"
#: templates/basepage.html:84
msgid "Members"
msgstr "Soci"
#: templates/basepage.html:93
msgid "Registration page"
msgstr "Registrazione"
#: templates/basepage.html:98
msgid "Add event"
msgstr "Aggiungi evento"
#: templates/basepage.html:103
msgid "Change status"
msgstr "Cambia stato"
#: templates/basepage.html:108
msgid "Renewals"
msgstr "Rinnovi"
#: templates/basepage.html:116
msgid "Board"
msgstr "Consiglio Direttivo"
#: templates/basepage.html:141
msgid "Accounting"
msgstr "Contabilità"

BIN
orgmgmt/members/locale/it/LC_MESSAGES/django.mo

Binary file not shown.

32
orgmgmt/members/locale/it/LC_MESSAGES/django.po

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-02 23:21+0200\n"
"POT-Creation-Date: 2019-10-04 00:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -194,7 +194,7 @@ msgstr "motivazione"
msgid "Please explain why you are trying to become member."
msgstr "Per favore spiega in qualche parola perché vuoi diventare socio"
#: members/models.py:37 members/models.py:67
#: members/models.py:37 members/models.py:66
msgid "interests"
msgstr "interessi"
@ -210,7 +210,7 @@ msgstr "riunione del Consiglio"
msgid "Select the board meeting that approved the member as effective"
msgstr "Seleziona la riunione del Consiglio che ha approvato il socio"
#: members/models.py:41 members/models.py:63 members/models.py:74
#: members/models.py:41 members/models.py:73
msgid "member"
msgstr "Socio"
@ -222,38 +222,46 @@ msgstr "nome"
msgid "Name of the interest"
msgstr "Nome dell'interesse"
#: members/models.py:66
#: members/models.py:65
msgid "interest"
msgstr "interesse"
#: members/models.py:74
#: members/models.py:73
msgid "Name of the member to which the event is related"
msgstr "Nome del membro a cui l'evento è relativo"
#: members/models.py:75
#: members/models.py:74
msgid "event date and time"
msgstr "data e ora evento"
#: members/models.py:75
#: members/models.py:74
msgid "Date and time when event happened"
msgstr "Data e ora dell'evento"
#: members/models.py:76
#: members/models.py:75
msgid "description"
msgstr "descrizione"
#: members/models.py:76
#: members/models.py:75
msgid "Brief description of the event"
msgstr "Una breve descrizione dell'evento"
#: members/models.py:77
#: members/models.py:76
msgid "created by"
msgstr "creato da"
#: members/models.py:80
#: members/models.py:79
msgid "event"
msgstr "evento"
#: members/models.py:81
#: members/models.py:80
msgid "events"
msgstr "eventi"
#: members/templates/members/member_list.html:7
msgid "Members"
msgstr "Soci"
#: members/templates/members/member_list.html:12
msgid "List of the members"
msgstr "Lista dei soci"

17
orgmgmt/members/migrations/0003_remove_interest_member_id.py

@ -0,0 +1,17 @@
# Generated by Django 2.2.5 on 2019-10-03 22:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('members', '0002_auto_20191002_2325'),
]
operations = [
migrations.RemoveField(
model_name='interest',
name='member_id',
),
]

3
orgmgmt/members/models.py

@ -55,12 +55,11 @@ class Member(models.Model):
return False
def __str__(self):
return f'%(self.first_name)s %(self.last_name)s'
return '%(first_name)s %(last_name)s' % { 'first_name': self.first_name, 'last_name': self.last_name }
class Interest(models.Model):
name = models.CharField(_('name'), max_length = 50, help_text = _('Name of the interest'))
member_id = models.ManyToManyField(Member, verbose_name = _('member'))
class Meta:
verbose_name = _('interest')

27
orgmgmt/members/templates/members/member_list.html

@ -0,0 +1,27 @@
{% extends 'basepage.html' %}
{% load static %}
{% load i18n %}
{% block breadcrumbs %}
<ol class="pf-c-breadcrumb__list">
<li class="pf-c-breadcrumb__item"><a href="{% url 'members:index' %}">{% trans 'Members' %}</a></li>
</ol>
{% endblock %}
{% block page_header %}
<h1>{% trans 'List of the members' %}</h1>
{% endblock %}
{% block content %}
<div class="pf-l-gallery pf-m-gutter">
{% for member in object_list %}
<div class="pf-l-gallery__item">
<div class="pf-c-card">
<div class="pf-c-card__body">
<a href="{% url 'members:index' %}">{{ member }}</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}

9
orgmgmt/members/urls.py

@ -0,0 +1,9 @@
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path
from . import views
app_name = 'members'
urlpatterns = [
path('', views.IndexView.as_view(), name='index'),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

13
orgmgmt/members/views.py

@ -1,3 +1,14 @@
from django.shortcuts import render
from django.views.generic import ListView
from .models import Member
import json
# Create your views here.
class IndexView(ListView):
model = Member
#template_name = 'members/index.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['members_list'] = json.dumps(list(map(str, Member.objects.all())))
return context

9
orgmgmt/orgmgmt/settings.py

@ -58,7 +58,9 @@ ROOT_URLCONF = 'orgmgmt.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
os.path.join(BASE_DIR, 'templates'),
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@ -122,3 +124,8 @@ USE_TZ = True
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
'/var/www/static',
]

5
orgmgmt/orgmgmt/urls.py

@ -14,8 +14,11 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('members/', include('members.urls')),
path('board/', include('board.urls')),
path('accounting/', include('accounting.urls')),
]

21
orgmgmt/static/components/@types/c3/LICENSE

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
orgmgmt/static/components/@types/c3/README.md

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/c3`
# Summary
This package contains type definitions for C3js ( http://c3js.org/ ).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/c3
Additional Details
* Last updated: Wed, 03 Apr 2019 18:23:30 GMT
* Dependencies: @types/d3
* Global values: c3
# Credits
These definitions were written by Marc Climent <https://github.com/mcliment>, Gerin Jacob <https://github.com/gerinjacob>, Bernd Hacker <https://github.com/denyo>, Dzmitry Shyndzin <https://github.com/dmitryshindin>, Tim Niemueller <https://github.com/timn>.

1172
orgmgmt/static/components/@types/c3/index.d.ts

File diff suppressed because it is too large

71
orgmgmt/static/components/@types/c3/package.json

@ -0,0 +1,71 @@
{
"_from": "@types/c3@^0.6.0",
"_id": "@types/c3@0.6.4",
"_inBundle": false,
"_integrity": "sha512-W7i7oSmHsXYhseZJsIYexelv9HitGsWdQhx3mcy4NWso+GedpCYr02ghpkNvnZ4oTIjNeISdrOnM70s7HiuV+g==",
"_location": "/@types/c3",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/c3@^0.6.0",
"name": "@types/c3",
"escapedName": "@types%2fc3",
"scope": "@types",
"rawSpec": "^0.6.0",
"saveSpec": null,
"fetchSpec": "^0.6.0"
},
"_requiredBy": [
"/patternfly"
],
"_resolved": "https://registry.npmjs.org/@types/c3/-/c3-0.6.4.tgz",
"_shasum": "449830da0e1a2fc4feceb87f97de7ee5965e183b",
"_spec": "@types/c3@^0.6.0",
"_where": "/home/syntaxerrormmm/Documenti/tmp/node_modules/patternfly",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Marc Climent",
"url": "https://github.com/mcliment"
},
{
"name": "Gerin Jacob",
"url": "https://github.com/gerinjacob"
},
{
"name": "Bernd Hacker",
"url": "https://github.com/denyo"
},
{
"name": "Dzmitry Shyndzin",
"url": "https://github.com/dmitryshindin"
},
{
"name": "Tim Niemueller",
"url": "https://github.com/timn"
}
],
"dependencies": {
"@types/d3": "^4"
},
"deprecated": false,
"description": "TypeScript definitions for C3js",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/c3",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/c3"
},
"scripts": {},
"typeScriptVersion": "2.3",
"types": "index",
"typesPublisherContentHash": "fe3729442d39e79b6e8fff8ca24536b059b47c2dbcb085fd8a160c732c3dacac",
"version": "0.6.4"
}

21
orgmgmt/static/components/@types/d3-array/LICENSE

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
orgmgmt/static/components/@types/d3-array/README.md

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/d3-array`
# Summary
This package contains type definitions for D3JS d3-array module ( https://github.com/d3/d3-array ).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array/v1
Additional Details
* Last updated: Wed, 03 Apr 2019 18:23:30 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>, Tom Wanzek <https://github.com/tomwanzek>, denisname <https://github.com/denisname>, Hugues Stefanski <https://github.com/ledragon>.

547
orgmgmt/static/components/@types/d3-array/index.d.ts

@ -0,0 +1,547 @@
// Type definitions for D3JS d3-array module 1.2
// Project: https://github.com/d3/d3-array
// Definitions by: Alex Ford <https://github.com/gustavderdrache>
// Boris Yankov <https://github.com/borisyankov>
// Tom Wanzek <https://github.com/tomwanzek>
// denisname <https://github.com/denisname>,
// Hugues Stefanski <https://github.com/ledragon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// Last module patch version validated against: 1.2.1
// --------------------------------------------------------------------------
// Shared Types and Interfaces
// --------------------------------------------------------------------------
/**
* Administrivia: JavaScript primitive types and Date
*/
export type Primitive = number | string | boolean | Date;
/**
* Administrivia: anything with a valueOf(): number method is comparable, so we allow it in numeric operations
*/
export interface Numeric {
valueOf(): number;
}
// --------------------------------------------------------------------------------------
// Descriptive Statistics
// --------------------------------------------------------------------------------------
/**
* Return the maximum value in the array of strings using natural order.
*/
export function max(array: ArrayLike<string>): string | undefined;
/**
* Return the maximum value in the array of numbers using natural order.
*/
export function max<T extends Numeric>(array: ArrayLike<T>): T | undefined;
/**
* Return the maximum value in the array using natural order and a projection function to map values to strings.
*/
export function max<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => string | undefined | null): string | undefined;
/**
* Return the maximum value in the array using natural order and a projection function to map values to easily-sorted values.
*/
export function max<T, U extends Numeric>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => U | undefined | null): U | undefined;
/**
* Return the minimum value in the array using natural order.
*/
export function min(array: ArrayLike<string>): string | undefined;
/**
* Return the minimum value in the array using natural order.
*/
export function min<T extends Numeric>(array: ArrayLike<T>): T | undefined;
/**
* Return the minimum value in the array using natural order.
*/
export function min<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => string | undefined | null): string | undefined;
/**
* Return the minimum value in the array using natural order.
*/
export function min<T, U extends Numeric>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => U | undefined | null): U | undefined;
/**
* Return the min and max simultaneously.
*/
export function extent(array: ArrayLike<string>): [string, string] | [undefined, undefined];
/**
* Return the min and max simultaneously.
*/
export function extent<T extends Numeric>(array: ArrayLike<T>): [T, T] | [undefined, undefined];
/**
* Return the min and max simultaneously.
*/
export function extent<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => string | undefined | null): [string, string] | [undefined, undefined];
/**
* Return the min and max simultaneously.
*/
export function extent<T, U extends Numeric>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => U | undefined | null): [U, U] | [undefined, undefined];
/**
* Return the mean of an array of numbers
*/
export function mean<T extends Numeric>(array: ArrayLike<T | undefined | null>): number | undefined;
/**
* Return the mean of an array of numbers
*/
export function mean<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => number | undefined | null): number | undefined;
/**
* Return the median of an array of numbers
*/
export function median<T extends Numeric>(array: ArrayLike<T | undefined | null>): number | undefined;
/**
* Return the median of an array of numbers
*/
export function median<T>(array: ArrayLike<T>, accessor: (element: T, i: number, array: ArrayLike<T>) => number | undefined | null): number | undefined;
/**
* Returns the p-quantile of an array of numbers
*/
export function quantile<T extends Numeric>(array: ArrayLike<T | undefined | null>, p: number): number | undefined;
export function quantile<T>(array: ArrayLike<T>, p: number, accessor: (element: T, i: number, array: ArrayLike<T>) => number | undefined | null): number | undefined;
/**
* Compute the sum of an array of numbers.
*/
export function sum<T extends Numeric>(array: ArrayLike<T | undefined | null>): number;
/**
* Compute the sum of an array, using the given accessor to convert values to numbers.
*/
export function sum<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => number | undefined | null): number;
/**
* Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array of numbers.
*/
export function deviation<T extends Numeric>(array: ArrayLike<T | undefined | null>): number | undefined;
/**
* Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array,
* using the given accessor to convert values to numbers.
*/
export function deviation<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => number | undefined | null): number | undefined;
/**
* Compute an unbiased estimator of the population variance of the given array of numbers.
*/
export function variance<T extends Numeric>(array: ArrayLike<T | undefined | null>): number | undefined;
/**
* Compute an unbiased estimator of the population variance of the given array,
* using the given accessor to convert values to numbers.
*/
export function variance<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => number | undefined | null): number | undefined;
// --------------------------------------------------------------------------------------
// Searching Arrays
// --------------------------------------------------------------------------------------
export function scan(array: ArrayLike<number>, comparator?: (a: number, b: number) => number): number | undefined;
export function scan<T>(array: ArrayLike<T>, comparator: (a: T, b: T) => number): number | undefined;
export function bisectLeft(array: ArrayLike<number>, x: number, lo?: number, hi?: number): number;
export function bisectLeft(array: ArrayLike<string>, x: string, lo?: number, hi?: number): number;
export function bisectLeft(array: ArrayLike<Date>, x: Date, lo?: number, hi?: number): number;
export function bisectRight(array: ArrayLike<number>, x: number, lo?: number, hi?: number): number;
export function bisectRight(array: ArrayLike<string>, x: string, lo?: number, hi?: number): number;
export function bisectRight(array: ArrayLike<Date>, x: Date, lo?: number, hi?: number): number;
export const bisect: typeof bisectRight;
export interface Bisector<T, U> {
left(array: ArrayLike<T>, x: U, lo?: number, hi?: number): number;
right(array: ArrayLike<T>, x: U, lo?: number, hi?: number): number;
}
export function bisector<T, U>(comparator: (a: T, b: U) => number): Bisector<T, U>;
export function bisector<T, U>(accessor: (x: T) => U): Bisector<T, U>;
/**
* Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right].
*
* @param array The array to partially sort (in place).
* @param k The middle index for partial sorting.
*/
export function quickselect<T>(array: ArrayLike<T>, k: number): T[];
/**
* Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right].
*
* @param array The array to partially sort (in place).
* @param k The middle index for partial sorting.
* @param left The left index of the range to sort.
*/
export function quickselect<T>(array: ArrayLike<T>, k: number, left: number): T[];
/**
* Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right].
*
* @param array The array to partially sort (in place).
* @param k The middle index for partial sorting.
* @param left The left index of the range to sort.
* @param right The right index.
*/
export function quickselect<T>(array: ArrayLike<T>, k: number, left: number, right: number): T[];
/**
* Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right].
*
* @param array The array to partially sort (in place).
* @param k The middle index for partial sorting.
* @param left The left index of the range to sort.
* @param right The right index.
* @param compare The compare function.
*/
export function quickselect<T>(array: ArrayLike<T>, k: number, left: number, right: number, compare: (a: Primitive | undefined, b: Primitive | undefined) => number): T[];
// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances.
/**
* Compares two primitive values for sorting (in ascending order).
*/
export function ascending(a: Primitive | undefined, b: Primitive | undefined): number;
// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances.
/**
* Compares two primitive values for sorting (in ascending order).
*/
export function descending(a: Primitive | undefined, b: Primitive | undefined): number;
// --------------------------------------------------------------------------------------
// Transforming Arrays
// --------------------------------------------------------------------------------------
/**
* Groups the specified array of values into a Map from key to array of value.
* @param a The array to group.
* @param key The key function.
*/
export function group<TObject, TKey>(a: ArrayLike<TObject>, key: (value: TObject) => TKey): Map<TKey, TObject[]>;
/**
* Groups and reduces the specified array of values into a Map from key to value.
*
* @param a The array to group.
* @param reduce The reduce function.
* @param key The key function.
*/
export function rollup<TObject, TKey, TReduce>(a: ArrayLike<TObject>, reduce: (value: TObject[]) => TReduce, key: (value: TObject) => TKey): Map<TKey, TReduce>;
/**
* Returns the Cartesian product of the two arrays a and b.
* For each element i in the specified array a and each element j in the specified array b, in order,
* it creates a two-element array for each pair.
*
* @param a First input array.
* @param b Second input array.
*/
export function cross<S, T>(a: ArrayLike<S>, b: ArrayLike<T>): Array<[S, T]>;
/**
* Returns the Cartesian product of the two arrays a and b.
* For each element i in the specified array a and each element j in the specified array b, in order,
* invokes the specified reducer function passing the element i and element j.
*
* @param a First input array.
* @param b Second input array.
* @param reducer A reducer function taking as input an element from "a" and "b" and returning a reduced value.
*/
export function cross<S, T, U>(a: ArrayLike<S>, b: ArrayLike<T>, reducer: (a: S, b: T) => U): U[];
/**
* Merges the specified arrays into a single array.
*/
export function merge<T>(arrays: ArrayLike<ArrayLike<T>>): T[];
/**
* For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1.
* Returns the empty array if the input array has fewer than two elements.
*
* @param array Array of input elements
*/
export function pairs<T>(array: ArrayLike<T>): Array<[T, T]>;
/**
* For each adjacent pair of elements in the specified array, in order, invokes the specified reducer function passing the element i and element i - 1.
* Returns the resulting array of pair-wise reduced elements.
* Returns the empty array if the input array has fewer than two elements.
*
* @param array Array of input elements
* @param reducer A reducer function taking as input to adjacent elements of the input array and returning a reduced value.
*/
export function pairs<T, U>(array: ArrayLike<T>, reducer: (a: T, b: T) => U): U[];
/**
* Returns a permutation of the specified array using the specified array of indexes.
* The returned array contains the corresponding element in array for each index in indexes, in order.
* For example, `permute(["a", "b", "c"], [1, 2, 0]) // ["b", "c", "a"]`
*/
export function permute<T>(array: { [key: number]: T }, keys: ArrayLike<number>): T[];
/**
* Extract the values from an object into an array with a stable order. For example:
* `var object = {yield: 27, year: 1931, site: "University Farm"};`
* `d3.permute(object, ["site", "yield"]); // ["University Farm", 27]`
*/
export function permute<T, K extends keyof T>(object: T, keys: ArrayLike<K>): Array<T[K]>;
/**
* Generates a 0-based numeric sequence. The output range does not include 'stop'.
*/
export function range(stop: number): number[];
/**
* Generates a numeric sequence starting from the given start and stop values. 'step' defaults to 1. The output range does not include 'stop'.
*/
export function range(start: number, stop: number, step?: number): number[];
/**
* Randomizes the order of the specified array using the FisherYates shuffle.
*/
export function shuffle<T>(array: T[], lo?: number, hi?: number): T[];
export function shuffle(array: Int8Array, lo?: number, hi?: number): Int8Array;
export function shuffle(array: Uint8Array, lo?: number, hi?: number): Uint8Array;
export function shuffle(array: Uint8ClampedArray, lo?: number, hi?: number): Uint8ClampedArray;
export function shuffle(array: Int16Array, lo?: number, hi?: number): Int16Array;
export function shuffle(array: Uint16Array, lo?: number, hi?: number): Uint16Array;
export function shuffle(array: Int32Array, lo?: number, hi?: number): Int32Array;
export function shuffle(array: Uint32Array, lo?: number, hi?: number): Uint32Array;
export function shuffle(array: Float32Array, lo?: number, hi?: number): Float32Array;
export function shuffle(array: Float64Array, lo?: number, hi?: number): Float64Array;
/**
* Generate an array of approximately count + 1 uniformly-spaced, nicely-rounded values between start and stop (inclusive).
* Each value is a power of ten multiplied by 1, 2 or 5. See also d3.tickIncrement, d3.tickStep and linear.ticks.
*
* Ticks are inclusive in the sense that they may include the specified start and stop values if (and only if) they are exact,
* nicely-rounded values consistent with the inferred step. More formally, each returned tick t satisfies start t and t stop.
*
* @param start Start value for ticks
* @param stop Stop value for ticks
* @param count count + 1 is the approximate number of ticks to be returned by d3.ticks.
*/
export function ticks(start: number, stop: number, count: number): number[];
/**
* Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks:
* a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5.
*
* Like d3.tickStep, except requires that start is always less than or equal to step, and if the tick step for the given start,
* stop and count would be less than one, returns the negative inverse tick step instead.
*
* This method is always guaranteed to return an integer, and is used by d3.ticks to avoid guarantee that the returned tick values
* are represented as precisely as possible in IEEE 754 floating point.
*
* @param start Start value for ticks
* @param stop Stop value for ticks
* @param count count + 1 is the approximate number of ticks to be returned by d3.ticks.
*/
export function tickIncrement(start: number, stop: number, count: number): number;
/**
* Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks:
* a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5.
*
* Note that due to the limited precision of IEEE 754 floating point, the returned value may not be exact decimals;
* use d3-format to format numbers for human consumption.
*
* @param start Start value for ticks
* @param stop Stop value for ticks
* @param count count + 1 is the approximate number of ticks to be returned by d3.ticks.
*/
export function tickStep(start: number, stop: number, count: number): number;
/**
* Transpose a matrix provided in Array of Arrays format.
*/
export function transpose<T>(matrix: ArrayLike<ArrayLike<T>>): T[][];
/**
* Returns an array of arrays, where the ith array contains the ith element from each of the argument arrays.
* The returned array is truncated in length to the shortest array in arrays. If arrays contains only a single array, the returned array
* contains one-element arrays. With no arguments, the returned array is empty.
*/
export function zip<T>(...arrays: Array<ArrayLike<T>>): T[][];
// --------------------------------------------------------------------------------------
// Histogram
// --------------------------------------------------------------------------------------
export interface Bin<Datum, Value extends number | Date | undefined> extends Array<Datum> {
x0: Value | undefined;
x1: Value | undefined;
}
/**
* Type definition for threshold generator which returns the count of recommended thresholds
*/
export type ThresholdCountGenerator<Value extends number | undefined = number | undefined> =
(values: ArrayLike<Value>, min: number, max: number) => number;
/**
* Type definition for threshold generator which returns an array of recommended numbers thresholds
*/
export type ThresholdNumberArrayGenerator<Value extends number | undefined> =
(values: ArrayLike<Value>, min: number, max: number) => Value[];
/**
* Type definition for threshold generator which returns an array of recommended dates thresholds
*/
export type ThresholdDateArrayGenerator<Value extends Date | undefined> =
(values: ArrayLike<Value>, min: Date, max: Date) => Value[];
/**
* @deprecated Use ThresholdNumberArrayGenerator or ThresholdDateArrayGenerator.
*/
export type ThresholdArrayGenerator = ThresholdNumberArrayGenerator<number>;
/**
* @deprecated Use `HistogramGeneratorNumber<Datum, Value>` for `number` values and `HistogramGeneratorDate<Datum, Value> for `Date` values.
*/
export interface HistogramGenerator<Datum, Value extends number | Date | undefined> {
(data: ArrayLike<Datum>): Array<Bin<Datum, Value>>;
value(): (d: Datum, i: number, data: ArrayLike<Datum>) => Value;
value(valueAccessor: (d: Datum, i: number, data: ArrayLike<Datum>) => Value): this;
domain(): (values: ArrayLike<Value>) => [Value, Value] | [undefined, undefined];
domain(domain: [Value, Value]): this;
domain(domainAccessor: (values: ArrayLike<Value>) => [Value, Value] | [undefined, undefined]): this;
/**
* Set the array of values to be used as thresholds in determining the bins.
*
* Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param thresholds Array of threshold values used for binning. The elements must
* be of the same type as the materialized values of the histogram.
*/
thresholds(thresholds: ArrayLike<Value>): this;
}
export interface HistogramCommon<Datum, Value extends number | Date | undefined> {
(data: ArrayLike<Datum>): Array<Bin<Datum, Value>>;
value(): (d: Datum, i: number, data: ArrayLike<Datum>) => Value;
value(valueAccessor: (d: Datum, i: number, data: ArrayLike<Datum>) => Value): this;
}
export interface HistogramGeneratorDate<Datum, Value extends Date | undefined> extends HistogramCommon<Datum, Date> {
domain(): (values: ArrayLike<Value>) => [Date, Date];
domain(domain: [Date, Date]): this;
domain(domainAccessor: (values: ArrayLike<Value>) => [Date, Date]): this;
thresholds(): ThresholdDateArrayGenerator<Value>;
/**
* Set the array of values to be used as thresholds in determining the bins.
*
* Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param thresholds Array of threshold values used for binning. The elements must
* be of the same type as the materialized values of the histogram.
*/
thresholds(thresholds: ArrayLike<Value>): this;
/**
* Set a threshold accessor function, which returns the array of values to be used as
* thresholds in determining the bins.
*
* Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param thresholds A function which accepts as arguments the array of materialized values, and
* optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as
* thresholds in determining the bins.
*/
thresholds(thresholds: ThresholdDateArrayGenerator<Value>): this;
}
export interface HistogramGeneratorNumber<Datum, Value extends number | undefined> extends HistogramCommon<Datum, Value> {
domain(): (values: ArrayLike<Value>) => [number, number] | [undefined, undefined];
domain(domain: [number, number]): this;
domain(domainAccessor: (values: ArrayLike<Value>) => [number, number] | [undefined, undefined]): this;
thresholds(): ThresholdCountGenerator<Value> | ThresholdNumberArrayGenerator<Value>;
/**
* Divide the domain uniformly into approximately count bins. IMPORTANT: This threshold
* setting approach only works, when the materialized values are numbers!
*
* Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param count The desired number of uniform bins.
*/
thresholds(count: number): this;
/**
* Set a threshold accessor function, which returns the desired number of bins.
* Divides the domain uniformly into approximately count bins. IMPORTANT: This threshold
* setting approach only works, when the materialized values are numbers!
*
* Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param count A function which accepts as arguments the array of materialized values, and
* optionally the domain minimum and maximum. The function calculates and returns the suggested
* number of bins.
*/
thresholds(count: ThresholdCountGenerator<Value>): this;
/**
* Set the array of values to be used as thresholds in determining the bins.
*
* Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param thresholds Array of threshold values used for binning. The elements must
* be of the same type as the materialized values of the histogram.
*/
thresholds(thresholds: ArrayLike<Value>): this;
/**
* Set a threshold accessor function, which returns the array of values to be used as
* thresholds in determining the bins.
*
* Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param thresholds A function which accepts as arguments the array of materialized values, and
* optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as
* thresholds in determining the bins.
*/
thresholds(thresholds: ThresholdNumberArrayGenerator<Value>): this;
}
export function histogram(): HistogramGeneratorNumber<number, number>;
export function histogram<Datum, Value extends number | undefined>(): HistogramGeneratorNumber<Datum, Value>;
export function histogram<Datum, Value extends Date | undefined>(): HistogramGeneratorDate<Datum, Value>;
/**
* @deprecated Do not use Value generic which mixes number and Date types. Use either number or Date
* (in combination with undefined, as applicable) to obtain a type-specific histogram generator.
*/
export function histogram<Datum, Value extends number | Date | undefined>(): HistogramGenerator<Datum, Value>;
// --------------------------------------------------------------------------------------
// Histogram Thresholds
// --------------------------------------------------------------------------------------
export function thresholdFreedmanDiaconis(values: ArrayLike<number | undefined>, min: number, max: number): number; // of type ThresholdCountGenerator
export function thresholdScott(values: ArrayLike<number | undefined>, min: number, max: number): number; // of type ThresholdCountGenerator
export function thresholdSturges(values: ArrayLike<number | undefined>): number; // of type ThresholdCountGenerator

69
orgmgmt/static/components/@types/d3-array/package.json

@ -0,0 +1,69 @@
{
"_from": "@types/d3-array@^1",
"_id": "@types/d3-array@1.2.7",
"_inBundle": false,
"_integrity": "sha512-51vHWuUyDOi+8XuwPrTw3cFqyh2Slg9y8COYkRfjCPG9TfYqY0hoNPzv/8BrcAy0FeQBzqEo/D/8Nk2caOQJnA==",
"_location": "/@types/d3-array",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/d3-array@^1",
"name": "@types/d3-array",
"escapedName": "@types%2fd3-array",
"scope": "@types",
"rawSpec": "^1",
"saveSpec": null,
"fetchSpec": "^1"
},
"_requiredBy": [
"/@types/d3"
],
"_resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-1.2.7.tgz",
"_shasum": "34dc654d34fc058c41c31dbca1ed68071a8fcc17",
"_spec": "@types/d3-array@^1",
"_where": "/home/syntaxerrormmm/Documenti/tmp/node_modules/@types/d3",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Alex Ford",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Tom Wanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Hugues Stefanski",
"url": "https://github.com/ledragon"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for D3JS d3-array module",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/d3-array",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-array"
},
"scripts": {},
"typeScriptVersion": "2.3",
"types": "index",
"typesPublisherContentHash": "bf8c0cc0ea5a9de5f0de214605178302ec01d009406d82494a382009879d8c3f",
"version": "1.2.7"
}

21
orgmgmt/static/components/@types/d3-axis/LICENSE

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
orgmgmt/static/components/@types/d3-axis/README.md

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/d3-axis`
# Summary
This package contains type definitions for D3JS d3-axis module ( https://github.com/d3/d3-axis/ ).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-axis
Additional Details
* Last updated: Wed, 13 Feb 2019 16:51:59 GMT
* Dependencies: @types/d3-selection
* Global values: none
# Credits
These definitions were written by Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>, denisname <https://github.com/denisname>.

334
orgmgmt/static/components/@types/d3-axis/index.d.ts

@ -0,0 +1,334 @@
// Type definitions for D3JS d3-axis module 1.0
// Project: https://github.com/d3/d3-axis/, https://d3js.org/d3-axis
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>
// Alex Ford <https://github.com/gustavderdrache>
// Boris Yankov <https://github.com/borisyankov>
// denisname <https://github.com/denisname>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// Last module patch version validated against: 1.0.8
import { Selection, TransitionLike } from 'd3-selection';
// --------------------------------------------------------------------------
// Shared Types and Interfaces
// --------------------------------------------------------------------------
/**
* A helper type to alias elements which can serve as a domain for an axis.
*/
export type AxisDomain = number | string | Date | { valueOf(): number};
/**
* A helper interface to describe the minimal contract to be met by a time interval
* which can be passed into the Axis.ticks(...) or Axis.tickArguments(...) methods when
* creating time series axes. Under normal circumstances the argument will be of type
* TimeInterval or CountableTimeInterval as defined in d3-time.
* NB: This helper interface has been created to avoid tight coupling of d3-axis to
* d3-time at the level of definition files. I.e. d3-time is not a
* dependency of d3-axis in the D3 Javascript implementation. This minimal contract
* is based on an analysis of how d3-axis passes a time interval argument into a time scale,
* if a time scale was set using Axis.scale(...). And in turn on how a time scale uses
* the time interval when creating ticks from it.
*/
export interface AxisTimeInterval {
range(start: Date, stop: Date, step?: number): Date[];
}
/**
* A helper interface to which a scale passed into axis must conform (at a minimum)
* for axis to use the scale without error.
*/
export interface AxisScale<Domain> {
(x: Domain): number | undefined;
domain(): Domain[];
range(): number[];
copy(): this;
bandwidth?(): number;
// TODO: Reconsider the below, note that the compiler does not differentiate the overloads w.r.t. optionality
// ticks?(count?: number): Domain[];
// ticks?(count?: AxisTimeInterval): Date[];
// tickFormat?(count?: number, specifier?: string): ((d: number) => string);
// tickFormat?(count?: number | AxisTimeInterval, specifier?: string): ((d: Date) => string);
}
/**
* A helper type to alias elements which can serve as a container for an axis.
*/
export type AxisContainerElement = SVGSVGElement | SVGGElement;
/**
* Interface defining an axis generator. The generic <Domain> is the type of the axis domain.
*/
export interface Axis<Domain> {
/**
* Render the axis to the given context.
*
* @param context A selection of SVG containers (either SVG or G elements).
*/
(context: Selection<SVGSVGElement, any, any, any> | Selection<SVGGElement, any, any, any>): void;
/**
* Render the axis to the given context.
*
* @param context A transition defined on SVG containers (either SVG or G elements).
*/
(context: TransitionLike<SVGSVGElement, any> | TransitionLike<SVGGElement, any>): void;
/**
* Gets the current scale underlying the axis.
*/
scale<A extends AxisScale<Domain>>(): A;
/**
* Sets the scale and returns the axis.
*
* @param scale The scale to be used for axis generation.
*/
scale(scale: AxisScale<Domain>): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
*
* This method has no effect if the scale does not implement scale.ticks, as with band and point scales.
*
* This method is also a convenience function for axis.tickArguments.
*
* @param count Number of ticks that should be rendered.
* @param specifier An optional format specifier to customize how the tick values are formatted.
*/
ticks(count: number, specifier?: string): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
* Use with a TIME SCALE ONLY.
*
* This method is also a convenience function for axis.tickArguments.
*
* @param interval A time interval used to generate date-based ticks. This is typically a TimeInterval/CountableTimeInterval as defined
* in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15).
* @param specifier An optional format specifier to customize how the tick values are formatted.
*/
ticks(interval: AxisTimeInterval, specifier?: string): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
*
* The meaning of the arguments depends on the axis scale type: most commonly, the arguments are a suggested count for the number of ticks
* (or a time interval for time scales), and an optional format specifier to customize how the tick values are formatted.
*
* This method has no effect if the scale does not implement scale.ticks, as with band and point scales.
*
* To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat.
*
* This method is also a convenience function for axis.tickArguments.
*/
ticks(arg0: any, ...args: any[]): this;
/**
* Get an array containing the currently set arguments to be passed into scale.ticks and scale.tickFormat, which defaults to the empty array.
*/
tickArguments(): any[];
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
*
* This method has no effect if the scale does not implement scale.ticks, as with band and point scales.
* To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat.
*
* See also axis.ticks.
*
* @param args An array containing a single element representing the count, i.e. number of ticks to be rendered.
*/
tickArguments(args: [number]): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
*
* This method has no effect if the scale does not implement scale.ticks, as with band and point scales.
* To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat.
*
* See also axis.ticks.
*
* @param args An array containing two elements. The first element represents the count, i.e. number of ticks to be rendered. The second
* element is a string representing the format specifier to customize how the tick values are formatted.
*/
tickArguments(args: [number, string]): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
* Use with a TIME SCALE ONLY.
*
* See also axis.ticks.
*
* @param args An array containing a single element representing a time interval used to generate date-based ticks.
* This is typically a TimeInterval/CountableTimeInterval as defined in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15).
*/
tickArguments(args: [AxisTimeInterval]): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
* Use with a TIME SCALE ONLY.
*
* See also axis.ticks.
*
* @param args An array containing two elements. The first element represents a time interval used to generate date-based ticks.
* This is typically a TimeInterval/CountableTimeInterval as defined in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15).
* The second element is a string representing the format specifier to customize how the tick values are formatted.
*/
tickArguments(args: [AxisTimeInterval, string]): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
*
* This method has no effect if the scale does not implement scale.ticks, as with band and point scales.
* To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat.
*
* See also axis.ticks.
*
* @param args An array with arguments suitable for the scale to be used for tick generation.
*/
tickArguments(args: any[]): this;
/**
* Returns the current tick values, which defaults to null.
*/
tickValues(): Domain[] | null;
/**
* Specified values to be used for ticks rather than using the scales automatic tick generator.
* The explicit tick values take precedent over the tick arguments set by axis.tickArguments.
* However, any tick arguments will still be passed to the scales tickFormat function if a
* tick format is not also set.
*
* @param values An array with values from the Domain of the scale underlying the axis.
*/
tickValues(values: Domain[]): this;
/**
* Clears any previously-set explicit tick values and reverts back to the scales tick generator.
*
* @param values null
*/
tickValues(values: null): this;
/**
* Returns the currently set tick format function, which defaults to null.
*/
tickFormat(): ((domainValue: Domain, index: number) => string) | null;
/**
* Sets the tick format function and returns the axis.
*
* @param format A function mapping a value from the axis Domain to a formatted string
* for display purposes. When invoked, the format function is also passed a second argument representing the zero-based index
* of the tick label in the array of generated tick labels.
*/
tickFormat(format: (domainValue: Domain, index: number) => string): this;
/**
* Reset the tick format function. A null format indicates that the scales
* default formatter should be used, which is generated by calling scale.tickFormat.
* In this case, the arguments specified by axis.tickArguments
* are likewise passed to scale.tickFormat.
*
* @param format null
*/
tickFormat(format: null): this;
/**
* Get the current inner tick size, which defaults to 6.
*/
tickSize(): number;
/**
* Set the inner and outer tick size to the specified value and return the axis.
*
* @param size Tick size in pixels (Default is 6).
*/