Skip to content

Commit 9f64cc2

Browse files
authored
Merge pull request #11 from syncpoint/current
SIGNS
2 parents 1a4b8b5 + 22269ff commit 9f64cc2

32 files changed

+2459
-16175
lines changed

electron-builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ publish:
3131
- provider: github
3232
releaseType: release
3333

34-
electronVersion: 20.3.10
34+
electronVersion: 24.1.3

package-lock.json

Lines changed: 1387 additions & 11925 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "nido",
2+
"name": "odin",
33
"productName": "ODINv2",
4-
"version": "2.5.5",
4+
"version": "2.6.1",
55
"description": "Open Source Command and Control Information System (C2IS)",
66
"main": "dist/main.js",
77
"scripts": {
@@ -27,20 +27,19 @@
2727
},
2828
"license": "AGPLv3",
2929
"devDependencies": {
30-
"@babel/core": "^7.20.2",
30+
"@babel/core": "^7.21.4",
3131
"@babel/eslint-parser": "^7.18.2",
32-
"@babel/preset-env": "^7.20.2",
32+
"@babel/preset-env": "^7.21.4",
3333
"@babel/preset-react": "^7.17.12",
3434
"@babel/register": "^7.17.7",
35-
"@welldone-software/why-did-you-render": "^7.0.1",
3635
"babel-loader": "^9.1.0",
3736
"c8": "^7.11.3",
3837
"css-loader": "^6.7.2",
39-
"electron": "^20.3.7",
38+
"electron": "^24.1.3",
4039
"electron-builder": "^23.6.0",
4140
"electron-notarize": "^1.2.2",
4241
"electron-updater": "^5.3.0",
43-
"eslint": "^8.28.0",
42+
"eslint": "^8.37.0",
4443
"eslint-config-standard": "^17.0.0",
4544
"eslint-plugin-react": "^7.31.11",
4645
"eslint-plugin-react-hooks": "^4.6.0",
@@ -50,17 +49,18 @@
5049
"memdown": "^6.1.1",
5150
"mocha": "^10.1.0",
5251
"node-sass": "^8.0.0",
53-
"sass-loader": "^13.2.0",
52+
"sass-loader": "^13.2.2",
5453
"style-loader": "^3.3.1",
55-
"webpack": "^5.75.0",
54+
"webpack": "^5.77.0",
5655
"webpack-cli": "^5.0.0",
57-
"webpack-dev-server": "^4.10.1",
56+
"webpack-dev-server": "^4.13.2",
5857
"yaml": "^2.1.3"
5958
},
6059
"dependencies": {
6160
"@mdi/js": "^7.0.96",
6261
"@mdi/react": "^1.6.0",
6362
"@most/scheduler": "^1.3.0",
63+
"@syncpoint/signs": "^1.0.0",
6464
"@syncpoint/wkx": "^0.5.2",
6565
"abstract-leveldown": "^7.2.0",
6666
"color": "^4.2.3",
@@ -74,12 +74,11 @@
7474
"leveldown": "^6.1.1",
7575
"levelup": "^5.0.1",
7676
"luxon": "^3.1.0",
77-
"milsymbol": "github:syncpoint/milsymbol",
78-
"minisearch": "^5.1.0",
77+
"minisearch": "^6.0.1",
7978
"most-subject": "^6.0.0",
8079
"mousetrap": "^1.6.5",
8180
"mousetrap-global-bind": "^1.1.0",
82-
"ol": "^7.2.2",
81+
"ol": "^7.3.0",
8382
"path-to-regexp": "^6.2.1",
8483
"proj4": "^2.8.0",
8584
"ramda": "^0.28.0",

src/renderer/components/Project-services.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import EventEmitter from '../../shared/emitter'
55
import SessionStore from '../store/SessionStore'
66
import PreferencesStore from '../store/PreferencesStore'
77
import Store from '../store/Store'
8-
import MigrationTool from '../store/MigrationTool'
8+
import Schema from '../store/schema/Schema'
99
import ProjectStore from '../store/ProjectStore'
1010
import SearchIndex from '../store/SearchIndex'
1111
import DocumentStore from '../store/DocumentStore'
@@ -29,7 +29,6 @@ export default async projectUUID => {
2929
const locator = () => services
3030
services.locator = locator
3131

32-
3332
const selection = new Selection()
3433
const undo = new Undo()
3534

@@ -113,18 +112,20 @@ export default async projectUUID => {
113112

114113
services.commandRegistry = new CommandRegistry(services)
115114

116-
const migrationsOptions = {}
117-
migrationsOptions[MigrationTool.REDUNDANT_IDENTIFIERS] = false
118-
migrationsOptions[MigrationTool.INLINE_TAGS] = false
119-
migrationsOptions[MigrationTool.INLINE_FLAGS] = false
120-
migrationsOptions[MigrationTool.DEFAULT_TAG] = false
121-
migrationsOptions[MigrationTool.INLINE_STYLES] = false
122-
const migration = new MigrationTool(db, migrationsOptions)
115+
const schema = new Schema(db, {
116+
ids: 'KEY-ONLY',
117+
tags: 'SEPARATE',
118+
flags: 'SEPARATE',
119+
'default-tag': 'SEPARATE',
120+
styles: 'SEPARATE',
121+
ms2525c: 'LOADED', // NOTE: also deletes SKKM on UNLOADED.
122+
skkm: 'LOADED',
123+
'default-style': 'LOADED'
124+
})
123125

124126
// Orderly bootstrapping:
125127
//
126-
await migration.bootstrap()
127-
await store.bootstrap()
128+
await schema.bootstrap()
128129
await tileLayerStore.bootstrap()
129130
await searchIndex.bootstrap()
130131
await featureStore.bootstrap()

src/renderer/components/properties/Properties.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ import PointProperties from './PointProperties'
1414
import MarkerProperties from './MarkerProperties'
1515
import TileServiceProperties from './TileServiceProperties'
1616
import TilePresetProperties from './TilePresetProperties'
17+
import SKKMStandardProperties from './SKKMStandardProperties'
18+
import SKKMUnitProperties from './SKKMUnitProperties'
19+
import SKKMCommandProperties from './SKKMCommandProperties'
1720
import './Properties.css'
1821

1922
const propertiesPanels = {
@@ -26,15 +29,16 @@ const propertiesPanels = {
2629
'feature:POINT': props => <PointProperties {...props}/>,
2730
marker: props => <MarkerProperties {...props}/>,
2831
'tile-service': props => <TileServiceProperties {...props}/>,
29-
'tile-preset': props => <TilePresetProperties {...props}/>
32+
'tile-preset': props => <TilePresetProperties {...props}/>,
33+
'feature:SKKM/K': props => <SKKMStandardProperties {...props}/>,
34+
'feature:SKKM/KU': props => <SKKMUnitProperties {...props}/>,
35+
'feature:SKKM/KC': props => <SKKMCommandProperties {...props}/>
36+
3037
}
3138

3239
const singletons = ['tile-service', 'tile-layers']
3340

34-
const sidc = feature =>
35-
feature &&
36-
feature.properties &&
37-
feature.properties.sidc
41+
const sidc = feature => feature?.properties?.sidc
3842

3943
/**
4044
*
@@ -47,6 +51,7 @@ const propertiesClasses = features => Object
4751
? `feature:${MILSTD.className(sidc(value)) || ''}`
4852
: scope(key)
4953

54+
console.log('className', className)
5055
return push(className)
5156
}, [])
5257

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from 'react'
2+
import Name from './Name'
3+
import UniqueDesignationHigherFormation from './UniqueDesignationHigherFormation'
4+
import SpecialC2HQEchelon from './SpecialC2HQEchelon'
5+
import DateTimeGroup from './DateTimeGroup'
6+
import Speed from './Speed'
7+
import Direction from './Direction'
8+
import AdditionalInformation from './AdditionalInformation'
9+
import GridCols2 from './GridCols2'
10+
11+
const SKKMUnitProperties = props => {
12+
return (
13+
<GridCols2>
14+
<Name {...props}/>
15+
<UniqueDesignationHigherFormation {...props}/>
16+
<SpecialC2HQEchelon {...props}/>
17+
<DateTimeGroup {...props}/>
18+
<Speed {...props}/>
19+
<Direction {...props}/>
20+
<AdditionalInformation {...props}/>
21+
</GridCols2>
22+
)
23+
}
24+
25+
export default SKKMUnitProperties
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from 'react'
2+
import Name from './Name'
3+
import UniqueDesignation from './UniqueDesignation'
4+
import DateTimeGroup from './DateTimeGroup'
5+
import Speed from './Speed'
6+
import Direction from './Direction'
7+
import AdditionalInformation from './AdditionalInformation'
8+
import GridCols2 from './GridCols2'
9+
import ColSpan2 from './ColSpan2'
10+
11+
12+
const SKKMStandardProperties = props => {
13+
return (
14+
<GridCols2>
15+
<Name {...props}/>
16+
<ColSpan2><UniqueDesignation {...props}/></ColSpan2>
17+
<DateTimeGroup {...props}/>
18+
<Speed {...props}/>
19+
<Direction {...props}/>
20+
<AdditionalInformation {...props}/>
21+
</GridCols2>
22+
)
23+
}
24+
25+
export default SKKMStandardProperties
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React from 'react'
2+
import Name from './Name'
3+
import UniqueDesignationHigherFormation from './UniqueDesignationHigherFormation'
4+
import SpecialC2HQEchelon from './SpecialC2HQEchelon'
5+
import DateTimeGroup from './DateTimeGroup'
6+
import Speed from './Speed'
7+
import Direction from './Direction'
8+
import AdditionalInformation from './AdditionalInformation'
9+
import UnitModifiers from './UnitModifiers'
10+
import GridCols2 from './GridCols2'
11+
12+
const SKKMUnitProperties = props => {
13+
return (
14+
<GridCols2>
15+
<Name {...props}/>
16+
<UniqueDesignationHigherFormation {...props}/>
17+
<SpecialC2HQEchelon {...props}/>
18+
<DateTimeGroup {...props}/>
19+
<Speed {...props}/>
20+
<Direction {...props}/>
21+
<AdditionalInformation {...props}/>
22+
<UnitModifiers {...props}/>
23+
</GridCols2>
24+
)
25+
}
26+
27+
export default SKKMUnitProperties

src/renderer/ids.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('ids', function () {
118118
assert(ID.isUUID(uuid))
119119
})
120120

121-
it.only('measureId :: () -> MeasureId', function () {
121+
it('measureId :: () -> MeasureId', function () {
122122
console.log(ID.measureId())
123123
const [scope, uuid] = ID.measureId().split(ID.COLON)
124124
assert.equal(scope, ID.MEASURE)

src/renderer/model/actions/Type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const type = ([parameterized, descriptor]) => ({
1212
})
1313

1414
const TYPES = Object
15-
.entries(MILSTD.index)
15+
.entries(MILSTD.symbols)
1616
.map(type)
1717

1818

src/renderer/ol/style/styleFactory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as R from 'ramda'
22
import * as olStyle from 'ol/style'
33
import { PI_OVER_2, PI } from '../../../shared/Math'
4-
import ms from 'milsymbol'
4+
import { Symbol } from '@syncpoint/signs'
55
import * as patterns from './patterns'
66

77
const Styles = {
@@ -148,7 +148,7 @@ const makeSymbol = props => {
148148
...props['symbol-modifiers']
149149
})
150150

151-
const symbol = new ms.Symbol(props['symbol-code'], { ...options })
151+
const symbol = new Symbol(props['symbol-code'], { ...options, infoFields: true })
152152
const { width, height } = symbol.getSize()
153153

154154
return Styles.icon({

0 commit comments

Comments
 (0)