refactor: ♻️ Refactor del codice

This commit is contained in:
Maicol Battistini 2023-05-05 01:17:47 +02:00
parent 37162d5e79
commit d8b5c64da7
No known key found for this signature in database
40 changed files with 265 additions and 399 deletions

View File

@ -58,6 +58,8 @@
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" /> <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" /> <option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="METHOD_CALL_CHAIN_WRAP" value="5" /> <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="1" /> <option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" /> <option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" /> <option name="WHILE_BRACE_FORCE" value="1" />

View File

@ -1,6 +1,7 @@
<component name="InspectionProjectProfileManager"> <component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false"> <profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="Annotator" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AssignmentResultUsedJS" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="AssignmentResultUsedJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="BadExceptionsProcessingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" /> <inspection_tool class="BadExceptionsProcessingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="BlockStatementJS" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="BlockStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
@ -137,7 +138,7 @@
<inspection_tool class="FunctionNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="FunctionNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_regex" value="[a-z][A-Za-z]*" /> <option name="m_regex" value="[a-z][A-Za-z]*" />
<option name="m_minLength" value="3" /> <option name="m_minLength" value="3" />
<option name="m_maxLength" value="32" /> <option name="m_maxLength" value="64" />
</inspection_tool> </inspection_tool>
<inspection_tool class="FunctionWithInconsistentReturnsJS" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="FunctionWithInconsistentReturnsJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="GrazieInspection" enabled="true" level="TYPO" enabled_by_default="true" /> <inspection_tool class="GrazieInspection" enabled="true" level="TYPO" enabled_by_default="true" />
@ -149,7 +150,7 @@
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues"> <option name="myValues">
<value> <value>
<list size="7"> <list size="8">
<item index="0" class="java.lang.String" itemvalue="slot" /> <item index="0" class="java.lang.String" itemvalue="slot" />
<item index="1" class="java.lang.String" itemvalue="class" /> <item index="1" class="java.lang.String" itemvalue="class" />
<item index="2" class="java.lang.String" itemvalue="tabindex" /> <item index="2" class="java.lang.String" itemvalue="tabindex" />
@ -157,13 +158,18 @@
<item index="4" class="java.lang.String" itemvalue="padded" /> <item index="4" class="java.lang.String" itemvalue="padded" />
<item index="5" class="java.lang.String" itemvalue="scope" /> <item index="5" class="java.lang.String" itemvalue="scope" />
<item index="6" class="java.lang.String" itemvalue="aria-label" /> <item index="6" class="java.lang.String" itemvalue="aria-label" />
<item index="7" class="java.lang.String" itemvalue="autoanimate" />
</list> </list>
</value> </value>
</option> </option>
<option name="myCustomValuesEnabled" value="false" /> <option name="myCustomValuesEnabled" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="HtmlUnknownBooleanAttribute" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="HtmlUnknownBooleanAttribute" enabled="false" level="WARNING" enabled_by_default="false">
<option name="myCustomValuesEnabled" value="false" /> <myValues>
<item value="required" />
<item value="populated" />
<item value="disabled" />
</myValues>
</inspection_tool> </inspection_tool>
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues"> <option name="myValues">
@ -203,7 +209,9 @@
<inspection_tool class="JSDeclarationsAtScopeStart" enabled="true" level="WEAK WARNING" enabled_by_default="true" /> <inspection_tool class="JSDeclarationsAtScopeStart" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="JSEqualityComparisonWithCoercion.TS" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="JSEqualityComparisonWithCoercion.TS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" /> <inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="JSMethodCanBeStatic" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="JSMethodCanBeStatic" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myOnlyPrivate" value="true" />
</inspection_tool>
<inspection_tool class="JSNonStrictModeUsed" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="JSNonStrictModeUsed" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JSUnfilteredForInLoop" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="JSUnfilteredForInLoop" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JSUnresolvedReactComponent" enabled="true" level="WEAK WARNING" enabled_by_default="true" /> <inspection_tool class="JSUnresolvedReactComponent" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
@ -213,7 +221,7 @@
<inspection_tool class="JSXSyntaxUsed" enabled="true" level="ERROR" enabled_by_default="true" /> <inspection_tool class="JSXSyntaxUsed" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="LabeledStatementJS" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="LabeledStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="LocalVariableNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="LocalVariableNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_regex" value="[a-z][A-Za-z]*" /> <option name="m_regex" value="[a-z][A-Za-z\d]*_?$" />
<option name="m_minLength" value="1" /> <option name="m_minLength" value="1" />
<option name="m_maxLength" value="32" /> <option name="m_maxLength" value="32" />
</inspection_tool> </inspection_tool>
@ -248,7 +256,7 @@
</inspection_tool> </inspection_tool>
<inspection_tool class="ParameterDefaultValueIsNotNullInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" /> <inspection_tool class="ParameterDefaultValueIsNotNullInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="ParameterNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="ParameterNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_regex" value="[a-z][A-Za-z]*" /> <option name="m_regex" value="[a-z][A-Za-z\d]*_?$" />
<option name="m_minLength" value="1" /> <option name="m_minLength" value="1" />
<option name="m_maxLength" value="32" /> <option name="m_maxLength" value="32" />
</inspection_tool> </inspection_tool>

View File

@ -1,7 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Default" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

View File

@ -1,3 +1,3 @@
<component name="DependencyValidationManager"> <component name="DependencyValidationManager">
<scope name="Frontend" pattern="file[osm3]:resources/js/*.ts||file[osm3]:resources/js/*.tsx" /> <scope name="Frontend" pattern="file[osm3]:resources/ts/*.ts||file[osm3]:resources/ts/*.tsx" />
</component> </component>

View File

@ -42,7 +42,7 @@
"typescript-cookie": "^1.0.6" "typescript-cookie": "^1.0.6"
}, },
"devDependencies": { "devDependencies": {
"@maicol07/eslint-config": "^2.2.4", "@maicol07/eslint-config": "^2.3.0",
"@openstamanager/vite-config": "github:devcode-it/openstamanager-vite-config", "@openstamanager/vite-config": "github:devcode-it/openstamanager-vite-config",
"@types/lodash-es": "^4.17.7", "@types/lodash-es": "^4.17.7",
"@types/mithril": "^2.0.12", "@types/mithril": "^2.0.12",

View File

@ -76,8 +76,8 @@ dependencies:
devDependencies: devDependencies:
'@maicol07/eslint-config': '@maicol07/eslint-config':
specifier: ^2.2.4 specifier: ^2.3.0
version: 2.2.4 version: 2.3.0
'@openstamanager/vite-config': '@openstamanager/vite-config':
specifier: github:devcode-it/openstamanager-vite-config specifier: github:devcode-it/openstamanager-vite-config
version: github.com/devcode-it/openstamanager-vite-config/819ac61e3ad6ef6e22d5b09b411c6f935fa3b1a1(@types/node@18.16.3)(sass@1.62.1) version: github.com/devcode-it/openstamanager-vite-config/819ac61e3ad6ef6e22d5b09b411c6f935fa3b1a1(@types/node@18.16.3)(sass@1.62.1)
@ -1566,28 +1566,28 @@ packages:
dev: true dev: true
optional: true optional: true
/@eslint-community/eslint-utils@4.4.0(eslint@8.36.0): /@eslint-community/eslint-utils@4.4.0(eslint@8.39.0):
resolution: { integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== } resolution: { integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
peerDependencies: peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
dependencies: dependencies:
eslint: 8.36.0 eslint: 8.39.0
eslint-visitor-keys: 3.3.0 eslint-visitor-keys: 3.4.0
dev: true dev: true
/@eslint-community/regexpp@4.4.1: /@eslint-community/regexpp@4.5.1:
resolution: { integrity: sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw== } resolution: { integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ== }
engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 } engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 }
dev: true dev: true
/@eslint/eslintrc@2.0.1: /@eslint/eslintrc@2.0.2:
resolution: { integrity: sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw== } resolution: { integrity: sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dependencies: dependencies:
ajv: 6.12.6 ajv: 6.12.6
debug: 4.3.4 debug: 4.3.4
espree: 9.5.0 espree: 9.5.1
globals: 13.20.0 globals: 13.20.0
ignore: 5.2.4 ignore: 5.2.4
import-fresh: 3.3.0 import-fresh: 3.3.0
@ -1598,8 +1598,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@eslint/js@8.36.0: /@eslint/js@8.39.0:
resolution: { integrity: sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg== } resolution: { integrity: sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dev: true dev: true
@ -1696,24 +1696,24 @@ packages:
php-date-formatter: 1.3.6 php-date-formatter: 1.3.6
dev: false dev: false
/@maicol07/eslint-config@2.2.4: /@maicol07/eslint-config@2.3.0:
resolution: { integrity: sha512-iKGXO/QCZB1WjuMGZuFkQfS8KBUrebLimYr9kcrLxiX7aTBNV0qIcNeUsfWYUcJLpfyd7w0jvmiIlbLWmRduvQ== } resolution: { integrity: sha512-/T7jWUXEmkmWqZn96BnWPFwutbPglYXgPsmLU77KXnT7p0DOqGTlgF85zndOAvZXi0ptGOn88DrYIfbTm0KOsw== }
dependencies: dependencies:
'@typescript-eslint/eslint-plugin': 5.56.0(@typescript-eslint/parser@5.56.0)(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/eslint-plugin': 5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.39.0)(typescript@5.0.4)
'@typescript-eslint/parser': 5.56.0(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/parser': 5.59.2(eslint@8.39.0)(typescript@5.0.4)
eslint: 8.36.0 eslint: 8.39.0
eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.36.0) eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.39.0)
eslint-config-airbnb-typescript: 17.0.0(@typescript-eslint/eslint-plugin@5.56.0)(@typescript-eslint/parser@5.56.0)(eslint-plugin-import@2.27.5)(eslint@8.36.0) eslint-config-airbnb-typescript: 17.0.0(@typescript-eslint/eslint-plugin@5.59.2)(@typescript-eslint/parser@5.59.2)(eslint-plugin-import@2.27.5)(eslint@8.39.0)
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.56.0)(eslint@8.36.0) eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint@8.39.0)
eslint-plugin-lit: 1.8.2(eslint@8.36.0) eslint-plugin-lit: 1.8.3(eslint@8.39.0)
eslint-plugin-mithril: 0.2.0 eslint-plugin-mithril: 0.2.0
eslint-plugin-new-with-error: 3.1.0(eslint@8.36.0) eslint-plugin-new-with-error: 4.0.0(eslint@8.39.0)
eslint-plugin-only-warn: 1.1.0 eslint-plugin-only-warn: 1.1.0
eslint-plugin-regexp: 1.13.0(eslint@8.36.0) eslint-plugin-regexp: 1.14.0(eslint@8.39.0)
eslint-plugin-simple-import-sort: 10.0.0(eslint@8.36.0) eslint-plugin-simple-import-sort: 10.0.0(eslint@8.39.0)
eslint-plugin-sonarjs: 0.19.0(eslint@8.36.0) eslint-plugin-sonarjs: 0.19.0(eslint@8.39.0)
eslint-plugin-unicorn: 46.0.0(eslint@8.36.0) eslint-plugin-unicorn: 46.0.0(eslint@8.39.0)
eslint-plugin-wc: 1.4.0(eslint@8.36.0) eslint-plugin-wc: 1.5.0(eslint@8.39.0)
eslint-plugin-you-dont-need-lodash-underscore: 6.12.0 eslint-plugin-you-dont-need-lodash-underscore: 6.12.0
typescript: 5.0.4 typescript: 5.0.4
transitivePeerDependencies: transitivePeerDependencies:
@ -2501,8 +2501,8 @@ packages:
'@types/history': 4.7.11 '@types/history': 4.7.11
dev: true dev: true
/@typescript-eslint/eslint-plugin@5.56.0(@typescript-eslint/parser@5.56.0)(eslint@8.36.0)(typescript@5.0.4): /@typescript-eslint/eslint-plugin@5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.39.0)(typescript@5.0.4):
resolution: { integrity: sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg== } resolution: { integrity: sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
peerDependencies: peerDependencies:
'@typescript-eslint/parser': ^5.0.0 '@typescript-eslint/parser': ^5.0.0
@ -2512,25 +2512,25 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@eslint-community/regexpp': 4.4.1 '@eslint-community/regexpp': 4.5.1
'@typescript-eslint/parser': 5.56.0(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/parser': 5.59.2(eslint@8.39.0)(typescript@5.0.4)
'@typescript-eslint/scope-manager': 5.56.0 '@typescript-eslint/scope-manager': 5.59.2
'@typescript-eslint/type-utils': 5.56.0(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/type-utils': 5.59.2(eslint@8.39.0)(typescript@5.0.4)
'@typescript-eslint/utils': 5.56.0(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/utils': 5.59.2(eslint@8.39.0)(typescript@5.0.4)
debug: 4.3.4 debug: 4.3.4
eslint: 8.36.0 eslint: 8.39.0
grapheme-splitter: 1.0.4 grapheme-splitter: 1.0.4
ignore: 5.2.4 ignore: 5.2.4
natural-compare-lite: 1.4.0 natural-compare-lite: 1.4.0
semver: 7.3.8 semver: 7.5.0
tsutils: 3.21.0(typescript@5.0.4) tsutils: 3.21.0(typescript@5.0.4)
typescript: 5.0.4 typescript: 5.0.4
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/parser@5.56.0(eslint@8.36.0)(typescript@5.0.4): /@typescript-eslint/parser@5.59.2(eslint@8.39.0)(typescript@5.0.4):
resolution: { integrity: sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg== } resolution: { integrity: sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
peerDependencies: peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -2539,26 +2539,26 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/scope-manager': 5.56.0 '@typescript-eslint/scope-manager': 5.59.2
'@typescript-eslint/types': 5.56.0 '@typescript-eslint/types': 5.59.2
'@typescript-eslint/typescript-estree': 5.56.0(typescript@5.0.4) '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.0.4)
debug: 4.3.4 debug: 4.3.4
eslint: 8.36.0 eslint: 8.39.0
typescript: 5.0.4 typescript: 5.0.4
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/scope-manager@5.56.0: /@typescript-eslint/scope-manager@5.59.2:
resolution: { integrity: sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw== } resolution: { integrity: sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dependencies: dependencies:
'@typescript-eslint/types': 5.56.0 '@typescript-eslint/types': 5.59.2
'@typescript-eslint/visitor-keys': 5.56.0 '@typescript-eslint/visitor-keys': 5.59.2
dev: true dev: true
/@typescript-eslint/type-utils@5.56.0(eslint@8.36.0)(typescript@5.0.4): /@typescript-eslint/type-utils@5.59.2(eslint@8.39.0)(typescript@5.0.4):
resolution: { integrity: sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A== } resolution: { integrity: sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
peerDependencies: peerDependencies:
eslint: '*' eslint: '*'
@ -2567,23 +2567,23 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 5.56.0(typescript@5.0.4) '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.0.4)
'@typescript-eslint/utils': 5.56.0(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/utils': 5.59.2(eslint@8.39.0)(typescript@5.0.4)
debug: 4.3.4 debug: 4.3.4
eslint: 8.36.0 eslint: 8.39.0
tsutils: 3.21.0(typescript@5.0.4) tsutils: 3.21.0(typescript@5.0.4)
typescript: 5.0.4 typescript: 5.0.4
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/types@5.56.0: /@typescript-eslint/types@5.59.2:
resolution: { integrity: sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w== } resolution: { integrity: sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dev: true dev: true
/@typescript-eslint/typescript-estree@5.56.0(typescript@5.0.4): /@typescript-eslint/typescript-estree@5.59.2(typescript@5.0.4):
resolution: { integrity: sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg== } resolution: { integrity: sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
peerDependencies: peerDependencies:
typescript: '*' typescript: '*'
@ -2591,44 +2591,44 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/types': 5.56.0 '@typescript-eslint/types': 5.59.2
'@typescript-eslint/visitor-keys': 5.56.0 '@typescript-eslint/visitor-keys': 5.59.2
debug: 4.3.4 debug: 4.3.4
globby: 11.1.0 globby: 11.1.0
is-glob: 4.0.3 is-glob: 4.0.3
semver: 7.3.8 semver: 7.5.0
tsutils: 3.21.0(typescript@5.0.4) tsutils: 3.21.0(typescript@5.0.4)
typescript: 5.0.4 typescript: 5.0.4
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/utils@5.56.0(eslint@8.36.0)(typescript@5.0.4): /@typescript-eslint/utils@5.59.2(eslint@8.39.0)(typescript@5.0.4):
resolution: { integrity: sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA== } resolution: { integrity: sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
peerDependencies: peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies: dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.36.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.39.0)
'@types/json-schema': 7.0.11 '@types/json-schema': 7.0.11
'@types/semver': 7.3.13 '@types/semver': 7.3.13
'@typescript-eslint/scope-manager': 5.56.0 '@typescript-eslint/scope-manager': 5.59.2
'@typescript-eslint/types': 5.56.0 '@typescript-eslint/types': 5.59.2
'@typescript-eslint/typescript-estree': 5.56.0(typescript@5.0.4) '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.0.4)
eslint: 8.36.0 eslint: 8.39.0
eslint-scope: 5.1.1 eslint-scope: 5.1.1
semver: 7.3.8 semver: 7.5.0
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
- typescript - typescript
dev: true dev: true
/@typescript-eslint/visitor-keys@5.56.0: /@typescript-eslint/visitor-keys@5.59.2:
resolution: { integrity: sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q== } resolution: { integrity: sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dependencies: dependencies:
'@typescript-eslint/types': 5.56.0 '@typescript-eslint/types': 5.59.2
eslint-visitor-keys: 3.3.0 eslint-visitor-keys: 3.4.0
dev: true dev: true
/acorn-jsx@5.3.2(acorn@8.8.2): /acorn-jsx@5.3.2(acorn@8.8.2):
@ -3654,7 +3654,7 @@ packages:
engines: { node: '>=10' } engines: { node: '>=10' }
dev: true dev: true
/eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.27.5)(eslint@8.36.0): /eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.27.5)(eslint@8.39.0):
resolution: { integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig== } resolution: { integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig== }
engines: { node: ^10.12.0 || >=12.0.0 } engines: { node: ^10.12.0 || >=12.0.0 }
peerDependencies: peerDependencies:
@ -3662,14 +3662,14 @@ packages:
eslint-plugin-import: ^2.25.2 eslint-plugin-import: ^2.25.2
dependencies: dependencies:
confusing-browser-globals: 1.0.11 confusing-browser-globals: 1.0.11
eslint: 8.36.0 eslint: 8.39.0
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.56.0)(eslint@8.36.0) eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint@8.39.0)
object.assign: 4.1.4 object.assign: 4.1.4
object.entries: 1.1.6 object.entries: 1.1.6
semver: 6.3.0 semver: 6.3.0
dev: true dev: true
/eslint-config-airbnb-typescript@17.0.0(@typescript-eslint/eslint-plugin@5.56.0)(@typescript-eslint/parser@5.56.0)(eslint-plugin-import@2.27.5)(eslint@8.36.0): /eslint-config-airbnb-typescript@17.0.0(@typescript-eslint/eslint-plugin@5.59.2)(@typescript-eslint/parser@5.59.2)(eslint-plugin-import@2.27.5)(eslint@8.39.0):
resolution: { integrity: sha512-elNiuzD0kPAPTXjFWg+lE24nMdHMtuxgYoD30OyMD6yrW1AhFZPAg27VX7d3tzOErw+dgJTNWfRSDqEcXb4V0g== } resolution: { integrity: sha512-elNiuzD0kPAPTXjFWg+lE24nMdHMtuxgYoD30OyMD6yrW1AhFZPAg27VX7d3tzOErw+dgJTNWfRSDqEcXb4V0g== }
peerDependencies: peerDependencies:
'@typescript-eslint/eslint-plugin': ^5.13.0 '@typescript-eslint/eslint-plugin': ^5.13.0
@ -3677,25 +3677,25 @@ packages:
eslint: ^7.32.0 || ^8.2.0 eslint: ^7.32.0 || ^8.2.0
eslint-plugin-import: ^2.25.3 eslint-plugin-import: ^2.25.3
dependencies: dependencies:
'@typescript-eslint/eslint-plugin': 5.56.0(@typescript-eslint/parser@5.56.0)(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/eslint-plugin': 5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.39.0)(typescript@5.0.4)
'@typescript-eslint/parser': 5.56.0(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/parser': 5.59.2(eslint@8.39.0)(typescript@5.0.4)
eslint: 8.36.0 eslint: 8.39.0
eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.36.0) eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.39.0)
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.56.0)(eslint@8.36.0) eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint@8.39.0)
dev: true dev: true
/eslint-import-resolver-node@0.3.7: /eslint-import-resolver-node@0.3.7:
resolution: { integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== } resolution: { integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== }
dependencies: dependencies:
debug: 3.2.7 debug: 3.2.7
is-core-module: 2.11.0 is-core-module: 2.12.0
resolve: 1.22.1 resolve: 1.22.2
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/eslint-module-utils@2.7.4(@typescript-eslint/parser@5.56.0)(eslint-import-resolver-node@0.3.7)(eslint@8.36.0): /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint@8.39.0):
resolution: { integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== } resolution: { integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== }
engines: { node: '>=4' } engines: { node: '>=4' }
peerDependencies: peerDependencies:
'@typescript-eslint/parser': '*' '@typescript-eslint/parser': '*'
@ -3715,15 +3715,15 @@ packages:
eslint-import-resolver-webpack: eslint-import-resolver-webpack:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 5.56.0(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/parser': 5.59.2(eslint@8.39.0)(typescript@5.0.4)
debug: 3.2.7 debug: 3.2.7
eslint: 8.36.0 eslint: 8.39.0
eslint-import-resolver-node: 0.3.7 eslint-import-resolver-node: 0.3.7
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.56.0)(eslint@8.36.0): /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.2)(eslint@8.39.0):
resolution: { integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== } resolution: { integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== }
engines: { node: '>=4' } engines: { node: '>=4' }
peerDependencies: peerDependencies:
@ -3733,21 +3733,21 @@ packages:
'@typescript-eslint/parser': '@typescript-eslint/parser':
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 5.56.0(eslint@8.36.0)(typescript@5.0.4) '@typescript-eslint/parser': 5.59.2(eslint@8.39.0)(typescript@5.0.4)
array-includes: 3.1.6 array-includes: 3.1.6
array.prototype.flat: 1.3.1 array.prototype.flat: 1.3.1
array.prototype.flatmap: 1.3.1 array.prototype.flatmap: 1.3.1
debug: 3.2.7 debug: 3.2.7
doctrine: 2.1.0 doctrine: 2.1.0
eslint: 8.36.0 eslint: 8.39.0
eslint-import-resolver-node: 0.3.7 eslint-import-resolver-node: 0.3.7
eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.56.0)(eslint-import-resolver-node@0.3.7)(eslint@8.36.0) eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint@8.39.0)
has: 1.0.3 has: 1.0.3
is-core-module: 2.11.0 is-core-module: 2.12.0
is-glob: 4.0.3 is-glob: 4.0.3
minimatch: 3.1.2 minimatch: 3.1.2
object.values: 1.1.6 object.values: 1.1.6
resolve: 1.22.1 resolve: 1.22.2
semver: 6.3.0 semver: 6.3.0
tsconfig-paths: 3.14.2 tsconfig-paths: 3.14.2
transitivePeerDependencies: transitivePeerDependencies:
@ -3756,13 +3756,13 @@ packages:
- supports-color - supports-color
dev: true dev: true
/eslint-plugin-lit@1.8.2(eslint@8.36.0): /eslint-plugin-lit@1.8.3(eslint@8.39.0):
resolution: { integrity: sha512-4mOGcSRNEPMh7AN2F7Iy6no36nuFgyYOsnTRhFw1k8xyy1Zm6QOp788ywDvJqy+eelFbLPBhq20Qr55a887Dmw== } resolution: { integrity: sha512-wmeYfBnWPUChbdZagOhG519gaWz9Q7OGT/nCx3YVHuCCrW9q9u0p/IQueQeoaMojUqOSgM/22oSDOaBruYGqag== }
engines: { node: '>= 12' } engines: { node: '>= 12' }
peerDependencies: peerDependencies:
eslint: '>= 5' eslint: '>= 5'
dependencies: dependencies:
eslint: 8.36.0 eslint: 8.39.0
parse5: 6.0.1 parse5: 6.0.1
parse5-htmlparser2-tree-adapter: 6.0.1 parse5-htmlparser2-tree-adapter: 6.0.1
requireindex: 1.2.0 requireindex: 1.2.0
@ -3777,12 +3777,12 @@ packages:
requireindex: 1.2.0 requireindex: 1.2.0
dev: true dev: true
/eslint-plugin-new-with-error@3.1.0(eslint@8.36.0): /eslint-plugin-new-with-error@4.0.0(eslint@8.39.0):
resolution: { integrity: sha512-YULTdYUCxK2MM7pB564a7SzANDCuttpYELG3HTmg/PdfN+hLm5kC6NNc6lYjymtDCLDszW9wCKKG3ApyZGbSUg== } resolution: { integrity: sha512-bblMghf2v3h9uheOyRQCFXhmDqzdrO0uZLXmieTSFoBqKlPHfIM5fXDOp/r+gzAzQmHmZ7m2NB5svdbL6tX5lA== }
peerDependencies: peerDependencies:
eslint: '>=2.13.1' eslint: '>=2.13.1'
dependencies: dependencies:
eslint: 8.36.0 eslint: 8.39.0
dev: true dev: true
/eslint-plugin-only-warn@1.1.0: /eslint-plugin-only-warn@1.1.0:
@ -3790,51 +3790,51 @@ packages:
engines: { node: '>=6' } engines: { node: '>=6' }
dev: true dev: true
/eslint-plugin-regexp@1.13.0(eslint@8.36.0): /eslint-plugin-regexp@1.14.0(eslint@8.39.0):
resolution: { integrity: sha512-MAyx+n+gmkuK2kWPHoSITi+r8eEK9oCYEx4yrKwpePSzklsdEm5afDHVAjl7VEY0OZ/2iEi9jsxJwPpcgFbt+A== } resolution: { integrity: sha512-5+bBSsRTTtkSf8+/iNSjiOW6qbjAdGyqv88HxPaBNFKxROK+UAdOGDl5Jr+csV5wW2BuOOvaG82zsvTriQBRFA== }
engines: { node: ^12 || >=14 } engines: { node: ^12 || >=14 }
peerDependencies: peerDependencies:
eslint: '>=6.0.0' eslint: '>=6.0.0'
dependencies: dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.36.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.39.0)
'@eslint-community/regexpp': 4.4.1 '@eslint-community/regexpp': 4.5.1
comment-parser: 1.3.1 comment-parser: 1.3.1
eslint: 8.36.0 eslint: 8.39.0
grapheme-splitter: 1.0.4 grapheme-splitter: 1.0.4
jsdoctypeparser: 9.0.0 jsdoctypeparser: 9.0.0
refa: 0.9.1 refa: 0.11.0
regexp-ast-analysis: 0.5.1 regexp-ast-analysis: 0.6.0
scslre: 0.1.6 scslre: 0.2.0
dev: true dev: true
/eslint-plugin-simple-import-sort@10.0.0(eslint@8.36.0): /eslint-plugin-simple-import-sort@10.0.0(eslint@8.39.0):
resolution: { integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw== } resolution: { integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw== }
peerDependencies: peerDependencies:
eslint: '>=5.0.0' eslint: '>=5.0.0'
dependencies: dependencies:
eslint: 8.36.0 eslint: 8.39.0
dev: true dev: true
/eslint-plugin-sonarjs@0.19.0(eslint@8.36.0): /eslint-plugin-sonarjs@0.19.0(eslint@8.39.0):
resolution: { integrity: sha512-6+s5oNk5TFtVlbRxqZN7FIGmjdPCYQKaTzFPmqieCmsU1kBYDzndTeQav0xtQNwZJWu5awWfTGe8Srq9xFOGnw== } resolution: { integrity: sha512-6+s5oNk5TFtVlbRxqZN7FIGmjdPCYQKaTzFPmqieCmsU1kBYDzndTeQav0xtQNwZJWu5awWfTGe8Srq9xFOGnw== }
engines: { node: '>=14' } engines: { node: '>=14' }
peerDependencies: peerDependencies:
eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies: dependencies:
eslint: 8.36.0 eslint: 8.39.0
dev: true dev: true
/eslint-plugin-unicorn@46.0.0(eslint@8.36.0): /eslint-plugin-unicorn@46.0.0(eslint@8.39.0):
resolution: { integrity: sha512-j07WkC+PFZwk8J33LYp6JMoHa1lXc1u6R45pbSAipjpfpb7KIGr17VE2D685zCxR5VL4cjrl65kTJflziQWMDA== } resolution: { integrity: sha512-j07WkC+PFZwk8J33LYp6JMoHa1lXc1u6R45pbSAipjpfpb7KIGr17VE2D685zCxR5VL4cjrl65kTJflziQWMDA== }
engines: { node: '>=14.18' } engines: { node: '>=14.18' }
peerDependencies: peerDependencies:
eslint: '>=8.28.0' eslint: '>=8.28.0'
dependencies: dependencies:
'@babel/helper-validator-identifier': 7.19.1 '@babel/helper-validator-identifier': 7.19.1
'@eslint-community/eslint-utils': 4.4.0(eslint@8.36.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.39.0)
ci-info: 3.8.0 ci-info: 3.8.0
clean-regexp: 1.0.0 clean-regexp: 1.0.0
eslint: 8.36.0 eslint: 8.39.0
esquery: 1.5.0 esquery: 1.5.0
indent-string: 4.0.0 indent-string: 4.0.0
is-builtin-module: 3.2.1 is-builtin-module: 3.2.1
@ -3842,19 +3842,19 @@ packages:
lodash: 4.17.21 lodash: 4.17.21
pluralize: 8.0.0 pluralize: 8.0.0
read-pkg-up: 7.0.1 read-pkg-up: 7.0.1
regexp-tree: 0.1.24 regexp-tree: 0.1.27
regjsparser: 0.9.1 regjsparser: 0.9.1
safe-regex: 2.1.1 safe-regex: 2.1.1
semver: 7.3.8 semver: 7.5.0
strip-indent: 3.0.0 strip-indent: 3.0.0
dev: true dev: true
/eslint-plugin-wc@1.4.0(eslint@8.36.0): /eslint-plugin-wc@1.5.0(eslint@8.39.0):
resolution: { integrity: sha512-AmoKhJyBNcS3I+dbS/JTmRSq4REUvQ/JJCeWJezlK8gqTsdr5JD+EAvHldH/tVvU+l6qR2Tykga5hTINP9zS8A== } resolution: { integrity: sha512-KFSfiHDol/LeV7U6IX8GdgpGf/s3wG8FTG120Rml/hGNB/DkCuGYQhlf0VgdBdf7gweem8Nlsh5o64HNdj+qPA== }
peerDependencies: peerDependencies:
eslint: '>=5' eslint: '>=5'
dependencies: dependencies:
eslint: 8.36.0 eslint: 8.39.0
is-valid-element-name: 1.0.0 is-valid-element-name: 1.0.0
js-levenshtein-esm: 1.2.0 js-levenshtein-esm: 1.2.0
dev: true dev: true
@ -3874,28 +3874,28 @@ packages:
estraverse: 4.3.0 estraverse: 4.3.0
dev: true dev: true
/eslint-scope@7.1.1: /eslint-scope@7.2.0:
resolution: { integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== } resolution: { integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dependencies: dependencies:
esrecurse: 4.3.0 esrecurse: 4.3.0
estraverse: 5.3.0 estraverse: 5.3.0
dev: true dev: true
/eslint-visitor-keys@3.3.0: /eslint-visitor-keys@3.4.0:
resolution: { integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== } resolution: { integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dev: true dev: true
/eslint@8.36.0: /eslint@8.39.0:
resolution: { integrity: sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw== } resolution: { integrity: sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
hasBin: true hasBin: true
dependencies: dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.36.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.39.0)
'@eslint-community/regexpp': 4.4.1 '@eslint-community/regexpp': 4.5.1
'@eslint/eslintrc': 2.0.1 '@eslint/eslintrc': 2.0.2
'@eslint/js': 8.36.0 '@eslint/js': 8.39.0
'@humanwhocodes/config-array': 0.11.8 '@humanwhocodes/config-array': 0.11.8
'@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8 '@nodelib/fs.walk': 1.2.8
@ -3905,9 +3905,9 @@ packages:
debug: 4.3.4 debug: 4.3.4
doctrine: 3.0.0 doctrine: 3.0.0
escape-string-regexp: 4.0.0 escape-string-regexp: 4.0.0
eslint-scope: 7.1.1 eslint-scope: 7.2.0
eslint-visitor-keys: 3.3.0 eslint-visitor-keys: 3.4.0
espree: 9.5.0 espree: 9.5.1
esquery: 1.5.0 esquery: 1.5.0
esutils: 2.0.3 esutils: 2.0.3
fast-deep-equal: 3.1.3 fast-deep-equal: 3.1.3
@ -3936,13 +3936,13 @@ packages:
- supports-color - supports-color
dev: true dev: true
/espree@9.5.0: /espree@9.5.1:
resolution: { integrity: sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw== } resolution: { integrity: sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg== }
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dependencies: dependencies:
acorn: 8.8.2 acorn: 8.8.2
acorn-jsx: 5.3.2(acorn@8.8.2) acorn-jsx: 5.3.2(acorn@8.8.2)
eslint-visitor-keys: 3.3.0 eslint-visitor-keys: 3.4.0
dev: true dev: true
/esquery@1.5.0: /esquery@1.5.0:
@ -4486,12 +4486,6 @@ packages:
engines: { node: '>= 0.4' } engines: { node: '>= 0.4' }
dev: true dev: true
/is-core-module@2.11.0:
resolution: { integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== }
dependencies:
has: 1.0.3
dev: true
/is-core-module@2.12.0: /is-core-module@2.12.0:
resolution: { integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== } resolution: { integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== }
dependencies: dependencies:
@ -5500,10 +5494,11 @@ packages:
strip-indent: 3.0.0 strip-indent: 3.0.0
dev: true dev: true
/refa@0.9.1: /refa@0.11.0:
resolution: { integrity: sha512-egU8LgFq2VXlAfUi8Jcbr5X38wEOadMFf8tCbshgcpVCYlE7k84pJOSlnvXF+muDB4igkdVMq7Z/kiNPqDT9TA== } resolution: { integrity: sha512-486O8/pQXwj9jV0mVvUnTsxq0uknpBnNJ0eCUhkZqJRQ8KutrT1PhzmumdCeM1hSBF2eMlFPmwECRER4IbKXlQ== }
engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 }
dependencies: dependencies:
regexpp: 3.2.0 '@eslint-community/regexpp': 4.5.1
dev: true dev: true
/regenerate-unicode-properties@10.1.0: /regenerate-unicode-properties@10.1.0:
@ -5527,22 +5522,16 @@ packages:
'@babel/runtime': 7.21.0 '@babel/runtime': 7.21.0
dev: true dev: true
/regexp-ast-analysis@0.2.4: /regexp-ast-analysis@0.6.0:
resolution: { integrity: sha512-8L7kOZQaKPxKKAwGuUZxTQtlO3WZ+tiXy4s6G6PKL6trbOXcZoumwC3AOHHFtI/xoSbNxt7jgLvCnP1UADLWqg== } resolution: { integrity: sha512-OLxjyjPkVH+rQlBLb1I/P/VTmamSjGkvN5PTV5BXP432k3uVz727J7H29GA5IFiY0m7e1xBN7049Wn59FY3DEQ== }
engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 }
dependencies: dependencies:
refa: 0.9.1 '@eslint-community/regexpp': 4.5.1
regexpp: 3.2.0 refa: 0.11.0
dev: true dev: true
/regexp-ast-analysis@0.5.1: /regexp-tree@0.1.27:
resolution: { integrity: sha512-Ca/g9gaTNuMewLuu+mBIq4vCrGRSO8AE9bP32NMQjJ/wBTdWq0g96qLkBb0NbGwEbp7S/q+NQF3o7veeuRfg0g== } resolution: { integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA== }
dependencies:
refa: 0.9.1
regexpp: 3.2.0
dev: true
/regexp-tree@0.1.24:
resolution: { integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw== }
hasBin: true hasBin: true
dev: true dev: true
@ -5564,11 +5553,6 @@ packages:
functions-have-names: 1.2.3 functions-have-names: 1.2.3
dev: true dev: true
/regexpp@3.2.0:
resolution: { integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== }
engines: { node: '>=8' }
dev: true
/regexpu-core@5.3.2: /regexpu-core@5.3.2:
resolution: { integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== } resolution: { integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== }
engines: { node: '>=4' } engines: { node: '>=4' }
@ -5617,15 +5601,6 @@ packages:
engines: { node: '>=8' } engines: { node: '>=8' }
dev: true dev: true
/resolve@1.22.1:
resolution: { integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== }
hasBin: true
dependencies:
is-core-module: 2.11.0
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
dev: true
/resolve@1.22.2: /resolve@1.22.2:
resolution: { integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== } resolution: { integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== }
hasBin: true hasBin: true
@ -5705,7 +5680,7 @@ packages:
/safe-regex@2.1.1: /safe-regex@2.1.1:
resolution: { integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A== } resolution: { integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A== }
dependencies: dependencies:
regexp-tree: 0.1.24 regexp-tree: 0.1.27
dev: true dev: true
/safevalues@0.4.3: /safevalues@0.4.3:
@ -5722,12 +5697,12 @@ packages:
source-map-js: 1.0.2 source-map-js: 1.0.2
dev: true dev: true
/scslre@0.1.6: /scslre@0.2.0:
resolution: { integrity: sha512-JORxVRlQTfjvlOAaiQKebgFElyAm5/W8b50lgaZ0OkEnKnagJW2ufDh3xRfU75UD9z3FGIu1gL1IyR3Poa6Qmw== } resolution: { integrity: sha512-4hc49fUMmX3jM0XdFUAPBrs1xwEcdHa0KyjEsjFs+Zfc66mpFpq5YmRgDtl+Ffo6AtJIilfei+yKw8fUn3N88w== }
dependencies: dependencies:
refa: 0.9.1 '@eslint-community/regexpp': 4.5.1
regexp-ast-analysis: 0.2.4 refa: 0.11.0
regexpp: 3.2.0 regexp-ast-analysis: 0.6.0
dev: true dev: true
/semver@5.7.1: /semver@5.7.1:
@ -5740,14 +5715,6 @@ packages:
hasBin: true hasBin: true
dev: true dev: true
/semver@7.3.8:
resolution: { integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== }
engines: { node: '>=10' }
hasBin: true
dependencies:
lru-cache: 6.0.0
dev: true
/semver@7.5.0: /semver@7.5.0:
resolution: { integrity: sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== } resolution: { integrity: sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== }
engines: { node: '>=10' } engines: { node: '>=10' }

View File

@ -10,11 +10,11 @@ import {
Children, Children,
Vnode Vnode
} from 'mithril'; } from 'mithril';
import { import {
Attributes, Attributes,
Component Component
} from 'mithril-utilities'; } from 'mithril-utilities';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
export interface DataTableAttributes extends Attributes { export interface DataTableAttributes extends Attributes {

View File

@ -6,11 +6,11 @@ import {
mdiArrowUp mdiArrowUp
} from '@mdi/js'; } from '@mdi/js';
import {Vnode} from 'mithril'; import {Vnode} from 'mithril';
import { import {
Attributes, Attributes,
Component Component
} from 'mithril-utilities'; } from 'mithril-utilities';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
export interface DataTableColumnAttributes extends Attributes, Partial<JSX.IntrinsicElements['md-data-table-column']> { export interface DataTableColumnAttributes extends Attributes, Partial<JSX.IntrinsicElements['md-data-table-column']> {

View File

@ -97,7 +97,7 @@ export default class RecordsTable<M extends Model<any, any>, A extends RecordsTa
let attributes: DataTableColumnAttributes = {}; let attributes: DataTableColumnAttributes = {};
let children: Children | RecordsTableColumnAttributes = column; let children: Children | RecordsTableColumnAttributes = column;
if (this.isRecordTableColumnAttributes(column)) { if (RecordsTable.isRecordTableColumnAttributes(column)) {
children = column.label ?? attribute; children = column.label ?? attribute;
attributes = column; attributes = column;
} }
@ -261,7 +261,7 @@ export default class RecordsTable<M extends Model<any, any>, A extends RecordsTa
} }
} }
private isRecordTableColumnAttributes(column: Children | RecordsTableColumnAttributes): column is RecordsTableColumnAttributes { private static isRecordTableColumnAttributes(column: Children | RecordsTableColumnAttributes): column is RecordsTableColumnAttributes {
return typeof column === 'object' && 'label' in (column ?? {}); return typeof column === 'object' && 'label' in (column ?? {});
} }
} }

View File

@ -5,10 +5,10 @@ import {
Vnode, Vnode,
VnodeDOM VnodeDOM
} from 'mithril'; } from 'mithril';
import {Form} from 'mithril-utilities'; import {Form} from 'mithril-utilities';
import Stream from 'mithril/stream'; import Stream from 'mithril/stream';
import {Class} from 'type-fest'; import {Class} from 'type-fest';
import RecordDialog, {RecordDialogAttributes} from '~/Components/Dialogs/RecordDialog'; import RecordDialog, {RecordDialogAttributes} from '~/Components/Dialogs/RecordDialog';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
import Model from '~/Models/Model'; import Model from '~/Models/Model';

View File

@ -59,7 +59,7 @@ export default class DeleteRecordDialog<M extends Model<any, any>, A extends Del
this.close('deleted'); this.close('deleted');
m.redraw(); m.redraw();
} catch (error) { } catch (error) {
void showSnackbar(__('Errore durante l\'eliminazione del record! :error', {error: (error as RequestError).response.message}), false); void showSnackbar(__('Errore durante l\'eliminazione del record! :error', {error: (error as RequestError<{message: string}>).response.message}), false);
} }
} }
} }

View File

@ -1,3 +1,5 @@
// noinspection IncorrectFormatting
import '@material/web/dialog/dialog.js'; import '@material/web/dialog/dialog.js';
import {Dialog as MDDialog} from '@material/web/dialog/lib/dialog'; import {Dialog as MDDialog} from '@material/web/dialog/lib/dialog';
@ -6,7 +8,6 @@ import {
Vnode, Vnode,
VnodeDOM VnodeDOM
} from 'mithril'; } from 'mithril';
import { import {
Attributes, Attributes,
Component Component

View File

@ -1,11 +1,11 @@
import '@material/web/icon/icon.js'; import '@material/web/icon/icon.js';
import type MaterialIcons from '@mdi/js'; import type MaterialIcons from '@mdi/js';
import {Component} from 'mithril-utilities'; import {Component} from 'mithril-utilities';
export interface Attributes extends Partial<SVGElement> { export interface Attributes extends Omit<Partial<SVGElement>, 'className'> {
icon: typeof MaterialIcons | string; icon: typeof MaterialIcons | string;
className?: string;
} }
export default class MdIcon extends Component<Attributes> { export default class MdIcon extends Component<Attributes> {

View File

@ -11,7 +11,7 @@ import {
Component Component
} from 'mithril-utilities'; } from 'mithril-utilities';
import {Footer} from '~/Components/layout/Footer'; import Footer from '~/Components/layout/Footer';
import logoUrl from '../../images/logo_completo.png'; import logoUrl from '../../images/logo_completo.png';
import TopAppBar from './layout/TopAppBar'; import TopAppBar from './layout/TopAppBar';

View File

@ -1,5 +1,4 @@
import '@material/web/button/outlined-button.js'; import '@material/web/button/outlined-button.js';
import {router} from '@maicol07/inertia-mithril';
import {mdiChevronLeft} from '@mdi/js'; import {mdiChevronLeft} from '@mdi/js';
import { import {

View File

@ -41,7 +41,7 @@ export default abstract class RecordsPage<M extends Model<any, any>, D extends A
recordDialogType?: Class<D>; recordDialogType?: Class<D>;
deleteRecordDialogType?: Class<DRD>; deleteRecordDialogType?: Class<DRD>;
protected add_record_dialog_slug: string = '__add_record_dialog__'; protected addRecordDialogSlug: string = '__add_record_dialog__' as const;
protected records = new Map<string, M>(); protected records = new Map<string, M>();
protected isTableLoading = true; protected isTableLoading = true;
@ -165,6 +165,7 @@ export default abstract class RecordsPage<M extends Model<any, any>, D extends A
const collection = collect<RecordDialogVnode<M, D>>({}); const collection = collect<RecordDialogVnode<M, D>>({});
for (const [key, state] of this.recordDialogsStates) { for (const [key, state] of this.recordDialogsStates) {
// noinspection LocalVariableNamingConventionJS
const RD = this.recordDialogType!; const RD = this.recordDialogType!;
const record = key instanceof Model ? key : this.records.get(key); const record = key instanceof Model ? key : this.records.get(key);
const vnodeKey = record?.getId() ?? (key as string); const vnodeKey = record?.getId() ?? (key as string);
@ -178,6 +179,7 @@ export default abstract class RecordsPage<M extends Model<any, any>, D extends A
const collection = collect<DeleteRecordDialogVnode<M, DRD>>({}); const collection = collect<DeleteRecordDialogVnode<M, DRD>>({});
for (const [key, state] of this.deleteRecordsDialogStates) { for (const [key, state] of this.deleteRecordsDialogStates) {
// noinspection LocalVariableNamingConventionJS
const RD = this.deleteRecordDialogType ?? DeleteRecordDialog; const RD = this.deleteRecordDialogType ?? DeleteRecordDialog;
const keyArray = key.split(','); const keyArray = key.split(',');
const records = keyArray.map((recordId) => this.records.get(recordId)!); const records = keyArray.map((recordId) => this.records.get(recordId)!);
@ -253,7 +255,7 @@ export default abstract class RecordsPage<M extends Model<any, any>, D extends A
} }
openNewRecordDialog() { openNewRecordDialog() {
const state = this.getRecordDialogState(undefined, this.add_record_dialog_slug); const state = this.getRecordDialogState(undefined, this.addRecordDialogSlug);
state(true); state(true);
} }

View File

@ -1,13 +1,10 @@
import {Page} from '../Page'; import {Collection} from 'collect.js';
/** import {extend} from '~/Components/extend/extend';
* Add a new page namespace. import Drawer, {DrawerAttributes} from '~/Components/layout/Drawer';
*/ import {VnodeCollectionItem} from '~/typings/jsx';
export function addPageNamespace(namespace: string) {
window.InertiaPlugin.addNamespace(namespace, async (name) => { // eslint-disable-next-line import/prefer-default-export
const baseModulePath = `${window.location.origin}/modules/${namespace}/Views`; export function manageDrawerEntries(callback: (this: Drawer, value: Collection<VnodeCollectionItem>) => Collection<VnodeCollectionItem>): void {
const bundledPages = import.meta.glob(`${baseModulePath}/**/*.js`) as Record<string, () => Promise<{default: Page}>>; extend(Drawer.prototype as Drawer<DrawerAttributes>, 'entries', callback);
const page = bundledPages[`${baseModulePath}/${name}.tsx`];
return (await page()).default as Page;
});
} }

View File

@ -10,12 +10,12 @@ import {
Children, Children,
Vnode Vnode
} from 'mithril'; } from 'mithril';
import { import {
Attributes, Attributes,
Component Component
} from 'mithril-utilities'; } from 'mithril-utilities';
import Stream from 'mithril/stream'; import Stream from 'mithril/stream';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
import {VnodeCollectionItem} from '~/typings/jsx'; import {VnodeCollectionItem} from '~/typings/jsx';
import {isMobile} from '~/utils/misc'; import {isMobile} from '~/utils/misc';
@ -37,6 +37,7 @@ export default class Drawer<A extends DrawerAttributes = DrawerAttributes> exten
} }
view(vnode: Vnode<A>): Children { view(vnode: Vnode<A>): Children {
// noinspection LocalVariableNamingConventionJS
const DrawerTag = isMobile() ? 'md-navigation-drawer-modal' : 'md-navigation-drawer'; const DrawerTag = isMobile() ? 'md-navigation-drawer-modal' : 'md-navigation-drawer';
return ( return (
<DrawerTag opened={this.open()}> <DrawerTag opened={this.open()}>

View File

@ -4,12 +4,12 @@ import {ListItemLink} from '@material/web/list/lib/listitemlink/list-item-link';
import '@material/web/list/list-item-link.js'; import '@material/web/list/list-item-link.js';
import type * as MaterialIcons from '@mdi/js'; import type * as MaterialIcons from '@mdi/js';
import {Vnode} from 'mithril'; import {Vnode} from 'mithril';
import { import {
Attributes, Attributes,
Component Component
} from 'mithril-utilities'; } from 'mithril-utilities';
import {ValueOf} from 'type-fest'; import {ValueOf} from 'type-fest';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
type Icons = ValueOf<typeof MaterialIcons>; type Icons = ValueOf<typeof MaterialIcons>;

View File

@ -1,6 +1,7 @@
import {Component} from 'mithril-utilities'; import {Component} from 'mithril-utilities';
export class Footer extends Component { export default class Footer extends Component {
// noinspection JSMethodCanBeStatic
view() { view() {
return ( return (
<footer> <footer>

View File

@ -1,4 +1,5 @@
import '@material/web/iconbutton/standard-icon-button.js'; import '@material/web/iconbutton/standard-icon-button.js';
import { import {
mdiMenu, mdiMenu,
mdiMenuOpen mdiMenuOpen

View File

@ -9,14 +9,14 @@ export default class NotificationsAction extends TopAppBarAction {
callback(): void { callback(): void {
// <mwc-menu activatable corner="BOTTOM_RIGHT" id="notifications-list" // <mwc-menu activatable corner="BOTTOM_RIGHT" id="notifications-list"
// data-trigger="#navbar-notifications"> // Data-trigger="#navbar-notifications">
// <p> // <p>
// {__('{0} Non sono presenti notifiche|{1} C\'è una notifica|[2,*] Ci sono :num' // {__('{0} Non sono presenti notifiche|{1} C\'è una notifica|[2,*] Ci sono :num'
// + ' notifiche', {num: notifications.length})} // + ' notifiche', {num: notifications.length})}
// </p> // </p>
// {notifications.map((notification) => ( // {notifications.map((notification) => (
// <mwc-list-item id="notification_{{$notification->id}}" key={crypto.randomUUID()} // <mwc-list-item id="notification_{{$notification->id}}" key={crypto.randomUUID()}
// graphic="icon" value="{{$notification->id}}"> // Graphic="icon" value="{{$notification->id}}">
// <Mdi icon="bell-outline" slot="graphic"></Mdi> // <Mdi icon="bell-outline" slot="graphic"></Mdi>
// <span>{notification}</span> // <span>{notification}</span>
// </mwc-list-item> // </mwc-list-item>

View File

@ -1,6 +1,4 @@
import { import {mdiCalendarRangeOutline} from '@mdi/js';
mdiCalendarRangeOutline
} from '@mdi/js';
import TopAppBarAction from '~/Components/layout/topappbar_actions/TopAppBarAction'; import TopAppBarAction from '~/Components/layout/topappbar_actions/TopAppBarAction';
@ -9,6 +7,5 @@ export default class PeriodSwitcherAction extends TopAppBarAction {
icon = mdiCalendarRangeOutline; icon = mdiCalendarRangeOutline;
id = 'navbar-switch-period'; id = 'navbar-switch-period';
callback(): void { callback(): void {}
}
} }

View File

@ -2,8 +2,8 @@ import {
Children, Children,
Vnode Vnode
} from 'mithril'; } from 'mithril';
import {Component} from 'mithril-utilities'; import {Component} from 'mithril-utilities';
import MdIcon, {Attributes as MdIconAttributes} from '~/Components/MdIcon'; import MdIcon, {Attributes as MdIconAttributes} from '~/Components/MdIcon';
export default abstract class TopAppBarAction extends Component { export default abstract class TopAppBarAction extends Component {

View File

@ -1,13 +1,13 @@
import {RequestHttpClientResponse} from '~/Models/Http/RequestHttpClientResponse';
import type { import type {
HttpClientPromise, HttpClientPromise,
HttpClientResponse HttpClientResponse
} from 'coloquent'; } from 'coloquent';
import type {Thenable} from 'coloquent/dist/httpclient/Types'; import type {Thenable} from 'coloquent/dist/httpclient/Types';
import RequestHttpClientResponse from '~/Models/Http/RequestHttpClientResponse';
export default class RequestHttpClientPromise implements HttpClientPromise { export default class RequestHttpClientPromise implements HttpClientPromise {
constructor(private response: Promise<any>) { constructor(private response: Promise<any>) {}
}
catch<U>(onRejected?: (error: any) => (Thenable<U> | U)): Promise<U> { catch<U>(onRejected?: (error: any) => (Thenable<U> | U)): Promise<U> {
return this.response.catch(onRejected) as Promise<U>; return this.response.catch(onRejected) as Promise<U>;
@ -18,9 +18,9 @@ export default class RequestHttpClientPromise implements HttpClientPromise {
onFulfilled?: (value: HttpClientResponse) => (Thenable<U> | U), onFulfilled?: (value: HttpClientResponse) => (Thenable<U> | U),
onRejected?: (error: any) => void | (Thenable<U> | U) onRejected?: (error: any) => void | (Thenable<U> | U)
): Promise<U> { ): Promise<U> {
const wrappedOnFulfilled = onFulfilled !== undefined const wrappedOnFulfilled = onFulfilled === undefined
? ((responsePromise: any) => onFulfilled(new RequestHttpClientResponse(responsePromise))) ? undefined
: undefined; : ((responsePromise: any) => onFulfilled(new RequestHttpClientResponse(responsePromise)));
return this.response.then<U>( return this.response.then<U>(
wrappedOnFulfilled, wrappedOnFulfilled,
// @ts-ignore // @ts-ignore

View File

@ -1,8 +1,7 @@
import type {HttpClientResponse} from 'coloquent'; import type {HttpClientResponse} from 'coloquent';
export class RequestHttpClientResponse implements HttpClientResponse { export default class RequestHttpClientResponse implements HttpClientResponse {
constructor(private response: any) { constructor(private response: any) {}
}
getData(): any { getData(): any {
return this.response; return this.response;

View File

@ -68,8 +68,8 @@ export default abstract class Model<A extends ModelAttributes, R extends ModelRe
} }
setAttribute<AN extends keyof A = keyof A>(attributeName: AN, value: ValueOf<A, AN>) { setAttribute<AN extends keyof A = keyof A>(attributeName: AN, value: ValueOf<A, AN>) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call // @ts-expect-error — This is needed to parse the dates correctly.
// @ts-expect-error // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
this.attributes.set(attributeName as string, value); this.attributes.set(attributeName as string, value);
} }

View File

@ -9,8 +9,7 @@ export interface UserAttributes extends ModelAttributes {
} }
export interface UserRelations extends ModelRelations { export interface UserRelations extends ModelRelations {
// notifications: DatabaseNotifications // Notifications: DatabaseNotifications
} }
export default class User extends Model<UserAttributes, UserRelations> { export default class User extends Model<UserAttributes, UserRelations> {}
}

View File

@ -17,7 +17,6 @@ import type {
Vnode, Vnode,
VnodeDOM VnodeDOM
} from 'mithril'; } from 'mithril';
import { import {
Form, Form,
FormSubmitEvent, FormSubmitEvent,
@ -26,6 +25,7 @@ import {
} from 'mithril-utilities'; } from 'mithril-utilities';
import Stream from 'mithril/stream'; import Stream from 'mithril/stream';
import '~/Components/m3/FilledTextField'; import '~/Components/m3/FilledTextField';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
import Page, {PageAttributes} from '~/Components/Page'; import Page, {PageAttributes} from '~/Components/Page';
import {VnodeCollectionItem} from '~/typings/jsx'; import {VnodeCollectionItem} from '~/typings/jsx';
@ -124,8 +124,8 @@ export default class LoginPage extends Page {
await Request.get(route('sanctum.csrf-cookie')); await Request.get(route('sanctum.csrf-cookie'));
await Request.post('/login', event.data); await Request.post('/login', event.data);
} catch (error: any) { } catch (error: any) {
// this.loading.hide(); // This.loading.hide();
void showSnackbar((error as RequestError).response.message, false); void showSnackbar((error as RequestError<{message: string}>).response.message, false);
return; return;
} }
@ -144,7 +144,7 @@ export default class LoginPage extends Page {
try { try {
await Request.post(route('password.email'), event.data); await Request.post(route('password.email'), event.data);
} catch (error: any) { } catch (error: any) {
void showSnackbar((error as RequestError).response.message, false); void showSnackbar((error as RequestError<{message: string}>).response.message, false);
return; return;
} }

View File

@ -16,6 +16,7 @@ import {
} from 'mithril-utilities'; } from 'mithril-utilities';
import Stream from 'mithril/stream'; import Stream from 'mithril/stream';
import '~/Components/m3/FilledTextField'; import '~/Components/m3/FilledTextField';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
import Page, {PageAttributes} from '~/Components/Page'; import Page, {PageAttributes} from '~/Components/Page';
import {VnodeCollectionItem} from '~/typings/jsx'; import {VnodeCollectionItem} from '~/typings/jsx';
@ -26,6 +27,7 @@ export default class ResetPasswordPage extends Page {
password: Stream(''), password: Stream(''),
password_confirmation: Stream('') password_confirmation: Stream('')
}; };
parameters!: URLSearchParams; parameters!: URLSearchParams;
oninit(vnode: Vnode<PageAttributes, this>) { oninit(vnode: Vnode<PageAttributes, this>) {
@ -81,7 +83,7 @@ export default class ResetPasswordPage extends Page {
try { try {
await Request.post(route('password.update'), event.data); await Request.post(route('password.update'), event.data);
} catch (error: any) { } catch (error: any) {
void showSnackbar((error as RequestError).response.message, false); void showSnackbar((error as RequestError<{message: string}>).response.message, false);
return; return;
} }

View File

@ -1,4 +1,5 @@
import '@material/web/button/filled-button.js'; import '@material/web/button/filled-button.js';
import '@material/web/textfield/filled-text-field.js';
import { import {
mdiAccountOutline, mdiAccountOutline,
@ -9,12 +10,12 @@ import {
} from '@mdi/js'; } from '@mdi/js';
import collect from 'collect.js'; import collect from 'collect.js';
import {Vnode} from 'mithril'; import {Vnode} from 'mithril';
import { import {
Form, Form,
FormSubmitEvent FormSubmitEvent
} from 'mithril-utilities'; } from 'mithril-utilities';
import Stream from 'mithril/stream'; import Stream from 'mithril/stream';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
import {VnodeCollectionItem} from '~/typings/jsx'; import {VnodeCollectionItem} from '~/typings/jsx';
import { import {

View File

@ -13,11 +13,14 @@ import {
Children, Children,
Vnode Vnode
} from 'mithril'; } from 'mithril';
import {
import Form from 'mithril-utilities'; Form,
import Request, {RequestError} from 'mithril-utilities'; Request,
RequestError
} from 'mithril-utilities';
import Stream from 'mithril/stream'; import Stream from 'mithril/stream';
import '~/Components/m3/FilledTextField'; import '~/Components/m3/FilledTextField';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
import {VnodeCollectionItem} from '~/typings/jsx'; import {VnodeCollectionItem} from '~/typings/jsx';
import {showSnackbar} from '~/utils/misc'; import {showSnackbar} from '~/utils/misc';
@ -115,7 +118,7 @@ export default class DatabaseStep extends SetupStep {
} catch (error: any) { } catch (error: any) {
if (!silentError) { if (!silentError) {
void showSnackbar(__('Si è verificato un errore durante la connessione al database: :error', { void showSnackbar(__('Si è verificato un errore durante la connessione al database: :error', {
error: (error as RequestError).response.message error: (error as RequestError<{message: string}>).response.message
})); }));
} }

View File

@ -5,9 +5,9 @@ import {
} from '@mdi/js'; } from '@mdi/js';
import collect from 'collect.js'; import collect from 'collect.js';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import {Form} from 'mithril-utilities'; import {Form} from 'mithril-utilities';
import Stream from 'mithril/stream'; import Stream from 'mithril/stream';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
import {VnodeCollectionItem} from '~/typings/jsx'; import {VnodeCollectionItem} from '~/typings/jsx';

View File

@ -8,11 +8,11 @@ import {
Children, Children,
Vnode Vnode
} from 'mithril'; } from 'mithril';
import { import {
Attributes, Attributes,
Component Component
} from 'mithril-utilities'; } from 'mithril-utilities';
import MdIcon from '~/Components/MdIcon'; import MdIcon from '~/Components/MdIcon';
@ -64,8 +64,7 @@ export abstract class SetupStep<A extends SetupStepAttributes = SetupStepAttribu
} }
} }
middleButton(vnode: Vnode<A, this>): Children | void { middleButton(vnode: Vnode<A, this>): Children | void {}
}
nextButton(vnode: Vnode<A, this>): Children { nextButton(vnode: Vnode<A, this>): Children {
return ( return (

View File

@ -88,8 +88,8 @@ export default class WelcomeStep extends SetupStep<WelcomeStepAttributes> {
${WelcomeStep.languages(vnode).join('')} ${WelcomeStep.languages(vnode).join('')}
${getFlag(app.locale, 'leadingicon')} ${getFlag(app.locale, 'leadingicon')}
</md-filled-autocomplete>`; </md-filled-autocomplete>`;
// const languageSelect = this.element.querySelector<Autocomplete>('#language-select'); // Const languageSelect = this.element.querySelector<Autocomplete>('#language-select');
// languageSelect?.addEventListener('autocomplete-value-changed', (event: Event) => { // LanguageSelect?.addEventListener('autocomplete-value-changed', (event: Event) => {
// WelcomeStep.onLanguageSelected(event as CustomEvent<{value: string}>); // WelcomeStep.onLanguageSelected(event as CustomEvent<{value: string}>);
// }); // });
} }
@ -117,28 +117,28 @@ export default class WelcomeStep extends SetupStep<WelcomeStepAttributes> {
return listItems; return listItems;
} }
// static async onLanguageSelected(event: CustomEvent<{value: string}>) { // Static async onLanguageSelected(event: CustomEvent<{value: string}>) {
// const {detail: {value}, target: autocomplete} = event; // Const {detail: {value}, target: autocomplete} = event;
// const field = autocomplete as Autocomplete; // Const field = autocomplete as Autocomplete;
// console.log(value, field); // Console.log(value, field);
// //
// const selectedItem = field.querySelector<AutocompleteItem>(`md-autocomplete-item[headline="${value}"]`); // Const selectedItem = field.querySelector<AutocompleteItem>(`md-autocomplete-item[headline="${value}"]`);
// const selectedLangcode = selectedItem?.dataset.value; // Const selectedLangcode = selectedItem?.dataset.value;
// //
// if (selectedLangcode && selectedLangcode !== app.locale) { // If (selectedLangcode && selectedLangcode !== app.locale) {
// const selectedFlag = selectedItem?.querySelector('img'); // Const selectedFlag = selectedItem?.querySelector('img');
// const fieldFlag: HTMLImageElement | null = field.querySelector<HTMLImageElement>(':scope > img[slot="leadingicon"]'); // Const fieldFlag: HTMLImageElement | null = field.querySelector<HTMLImageElement>(':scope > img[slot="leadingicon"]');
// //
// if (selectedFlag && fieldFlag) { // If (selectedFlag && fieldFlag) {
// fieldFlag.src = selectedFlag.src; // FieldFlag.src = selectedFlag.src;
// fieldFlag.alt = selectedFlag.alt; // FieldFlag.alt = selectedFlag.alt;
// } // }
// //
// try { // Try {
// const response = await Request.patch<{locale: string}>(route('app.language'), {locale: selectedLangcode}); // Const response = await Request.patch<{locale: string}>(route('app.language'), {locale: selectedLangcode});
// app.locale = response.locale; // App.locale = response.locale;
// } catch (error: any) { // } catch (error: any) {
// await showSnackbar(__('Si è verificato un errore durante il salvataggio della lingua: :error', {error: (error as RequestError).message})); // Await showSnackbar(__('Si è verificato un errore durante il salvataggio della lingua: :error', {error: (error as RequestError).message}));
// } // }
// } // }
// } // }

View File

@ -1,5 +1,3 @@
import '~/Components/m3/FilledTextField';
import { import {
mdiAccountOutline, mdiAccountOutline,
mdiEmailOutline mdiEmailOutline
@ -8,8 +6,9 @@ import collect, {Collection} from 'collect.js';
import {Children} from 'mithril'; import {Children} from 'mithril';
import Stream from 'mithril/stream'; import Stream from 'mithril/stream';
import MdIcon from '~/Components/MdIcon';
import AddEditRecordDialog from '~/Components/Dialogs/AddEditRecordDialog'; import AddEditRecordDialog from '~/Components/Dialogs/AddEditRecordDialog';
import '~/Components/m3/FilledTextField';
import MdIcon from '~/Components/MdIcon';
import User, {UserAttributes} from '~/Models/User'; import User, {UserAttributes} from '~/Models/User';
import {JSONAPI} from '~/typings/request'; import {JSONAPI} from '~/typings/request';
import {showSnackbar} from '~/utils/misc'; import {showSnackbar} from '~/utils/misc';

View File

@ -1,100 +0,0 @@
// TODO: To be removed
// import {Select as MWCSelect} from '@material/mwc-select';
// import {waitUntil} from 'async-wait-until';
// import type {TemplateResult} from 'lit';
// import {css, html} from 'lit';
// import {customElement} from 'lit/decorators.js';
//
// @customElement('material-select')
// export class Select extends MWCSelect {
// static styles = [
// ...MWCSelect.styles,
// css`
// .mdc-select__anchor {
// width: var(--mdc-select-width, 200px) !important;
// height: var(--mdc-select-height, 56px) !important;
// }
// `
// ];
//
// private _initialValidationMessage: string | undefined;
//
// get nativeValidationMessage() {
// return this.formElement.validationMessage;
// }
//
// async connectedCallback() {
// super.connectedCallback();
// // Wait until slots are added to DOM
// await waitUntil(
// () => this.shadowRoot && this.shadowRoot.querySelectorAll('slot[name=icon]').length > 0
// );
//
// if (!this.shadowRoot) {
// return;
// }
//
// const slot = this.shadowRoot.querySelector('slot[name=icon]');
// if (!slot) {
// return;
// }
//
// const slotClass = 'mdc-select__icon';
// const rootClass = 'mdc-select--with-leading-icon';
//
// const slotParent = slot.parentElement;
// const rootElement = this.shadowRoot.firstElementChild;
//
// // Check if slot has content
// if ((slot as HTMLSlotElement).assignedNodes().length > 0) {
// slotParent?.classList.add(slotClass);
// rootElement?.classList.add(rootClass);
// }
//
// // Listen for changes in slot (added/removed)
// slot.addEventListener('slotchange', () => {
// if ((slot as HTMLSlotElement).assignedNodes().length > 0) {
// slotParent?.classList.add(slotClass);
// rootElement?.classList.add(rootClass);
// } else {
// slotParent?.classList.remove(slotClass);
// rootElement?.classList.remove(rootClass);
// }
// });
// }
//
// renderLeadingIcon(): TemplateResult<1> {
// return html`
// <span>
// <slot name="icon"></slot>
// </span>
// `;
// }
//
// /**
// * Fix mwc-select when handling validation message
// * It gets native input validation message when no default validationMessage is set.
// *
// * Related issue:
// * https://github.com/material-components/material-components-web-components/issues/971
// *
// */
// async firstUpdated() {
// if (this.validationMessage) {
// this._initialValidationMessage = this.validationMessage;
// }
//
// await super.firstUpdated();
// }
//
// reportValidity() {
// const isValid = super.reportValidity();
//
// // Note(cg): override validationMessage only if no initial message set.
// if (!this._initialValidationMessage && !isValid) {
// this.validationMessage = this.nativeValidationMessage;
// }
//
// return isValid;
// }
// }

View File

@ -15,11 +15,8 @@ declare global {
const route: typeof router; const route: typeof router;
let app: { let app: {
// components: Record<string, Manager>
events: Record<string, Event>,
locale: string, locale: string,
modules: OpenSTAManager.Modules, theme: 'high-contrast' | 'light', // TODO: Da implementare
theme: 'high-contrast' | 'light',
translations: Record<string, Record<string, string>>, translations: Record<string, Record<string, string>>,
user: OpenSTAManager.User | null, user: OpenSTAManager.User | null,
VERSION: string, VERSION: string,

View File

@ -3,7 +3,7 @@
import {Vnode} from 'mithril'; import {Vnode} from 'mithril';
export type ReplaceObject = Record<string, string | Vnode | number | boolean>; export type ReplaceObject = Record<string, string | Vnode | number | boolean>;
export type I18n<B> = (B extends true ? string : Vnode<any, any>); export type Localized<B> = (B extends true ? string : Vnode<any, any>);
/** /**
* @member {string} key String to translate. * @member {string} key String to translate.
@ -26,9 +26,9 @@ export interface TranslationParameters<B extends boolean | undefined> {
*/ */
// eslint-disable-next-line @typescript-eslint/naming-convention // eslint-disable-next-line @typescript-eslint/naming-convention
export function tr<B extends boolean | undefined>(key: string, { export function tr<B extends boolean | undefined>(key: string, {
replace, replace = {},
forceString forceString
}: TranslationParameters<B> = {replace: {}}): I18n<B> { }: TranslationParameters<B>): Localized<B> {
let translation = key; let translation = key;
const translations = app.translations[app.locale]; const translations = app.translations[app.locale];
@ -49,7 +49,7 @@ export function tr<B extends boolean | undefined>(key: string, {
translation = translation.replace(`:${parameter}`, replacement as string); translation = translation.replace(`:${parameter}`, replacement as string);
} }
return (forceString ? translation : m.trust(translation)) as I18n<B>; return (forceString ? translation : m.trust(translation)) as Localized<B>;
} }
// eslint-disable-next-line @typescript-eslint/naming-convention // eslint-disable-next-line @typescript-eslint/naming-convention
@ -68,12 +68,10 @@ export function _v(key: string, replace?: ReplaceObject): Vnode<any, any> {
* @param locale The locale code to get the display name of. If not provided, the current locale will be used. * @param locale The locale code to get the display name of. If not provided, the current locale will be used.
*/ */
export function getLocaleDisplayName(locale?: string) { export function getLocaleDisplayName(locale?: string) {
if (!locale) { const lang = locale ?? app.locale;
locale = app.locale;
}
const intl = new Intl.DisplayNames([app.locale], {type: 'language'}); const intl = new Intl.DisplayNames([lang], {type: 'language'});
return intl.of(locale); return intl.of(lang);
} }
export function getFlag(language: string, slot: string = 'start') { export function getFlag(language: string, slot: string = 'start') {

View File

@ -1,7 +1,7 @@
// noinspection JSUnusedGlobalSymbols // noinspection JSUnusedGlobalSymbols
import '@material/web/button/text-button.js';
import '@material/mwc-snackbar'; import '@material/mwc-snackbar';
import '@material/web/button/text-button.js';
import { import {
Vnode, Vnode,
@ -49,7 +49,7 @@ export function subclassOf(object_: GenericObject, parentObject: any): boolean {
* Check if a string contains HTML code/tags * Check if a string contains HTML code/tags
*/ */
export function containsHTML(string_: string): boolean { export function containsHTML(string_: string): boolean {
return /<[a-z][\S\s]*>/i.test(string_); return /<([A-Za-z][\dA-Za-z]*)\b[^>]*>(?:.|\n)*?<\/\1>/.test(string_);
} }
/** /**