repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
Emeshka/graphytica
src/app/vertices-category/vertices-category.component.ts
import { Component, OnInit, Input, OnDestroy, SimpleChanges } from '@angular/core'; import { KeyValue } from '@angular/common'; import { DbServiceService } from '../db-service.service'; @Component({ selector: 'edit-category', templateUrl: './vertices-category.component.html', styleUrls: ['./vertices-category.component.css'] }) export class VerticesCategoryComponent implements OnInit, OnDestroy { constructor( private conn: DbServiceService ) { } @Input() selection: any; @Input() toolById; @Input() activeToolId: string; editSelected = null; entities = null; areEdges = false; classDefinedProps = null; commonClass = ''; freeProps = null; propsOfNew = null; selectionListener = null; settingsOrderComparator = (a: KeyValue<string,any>, b: KeyValue<string,any>): number => { return a.value.order - b.value.order; } switchEditSelected(toolId) { if (toolId == 'new_vertex' || toolId == 'new_edge') { this.commonClass = this.toolById[toolId].settings['selectClass'].value; this.classDefinedProps = this.conn.getAllProps(this.commonClass); this.editSelected = false; this.propsOfNew = this.toolById[toolId].settings['newProps'].value if (!this.propsOfNew) { this.propsOfNew = {}; for (let p in this.classDefinedProps) { this.propsOfNew[p] = ''; } this.toolById[toolId].settings['newProps'].value = this.propsOfNew; } this.freeProps = {}; } else { this.editSelected = true; } //console.log('switchEditSelected():', this.propsOfNew) } setSettingsValue(key, value) { if ((this.activeToolId == 'new_vertex' || this.activeToolId == 'new_edge') && key == 'selectClass') { this.commonClass = value; this.classDefinedProps = this.conn.getAllProps(value); this.propsOfNew = {}; for (let p in this.classDefinedProps) { this.propsOfNew[p] = ''; } this.toolById[this.activeToolId].settings['newProps'].value = this.propsOfNew; } this.toolById[this.activeToolId].settings[key].value = value } setPropOfNew(key, value, checkType) { //console.log(key, value, checkType) if (value === '' || value === null) { this.propsOfNew[key] = ''; } else { if (checkType == 'number') { let v = value*1 if (!isNaN(v)) this.propsOfNew[key] = v; } else if (checkType == 'boolean') { if (typeof value == 'boolean') this.propsOfNew[key] = value; } else if (checkType == 'string') { this.propsOfNew[key] = value; } else if (checkType == 'date' || checkType == 'time' || checkType == 'datetime') { this.propsOfNew[key] = value; //console.log(this.propsOfNew[key]) } } } panToElement(id) { this.conn.cy.center(this.conn.getById(id)) } ngOnChanges(changes: SimpleChanges) { if (changes.activeToolId) { this.switchEditSelected(changes.activeToolId.currentValue); } } ngOnInit(): void { this.switchEditSelected(this.activeToolId) } ngOnDestroy(): void { } }
Emeshka/graphytica
src/app/sq-predicate/sq-predicate.component.ts
import { Component, Input, OnInit } from '@angular/core'; @Component({ selector: 'sq-predicate', templateUrl: './sq-predicate.component.html', styleUrls: ['./sq-predicate.component.css'] }) export class SqPredicateComponent implements OnInit { constructor() { } @Input() tree: any = {}; block = false; isLogical = false; ngOnInit(): void { console.log(this.tree); if (this.tree.type == 'condition') { let firstCond = this.tree.args[0].type == 'condition' if (this.tree.args.length > 1) { let secondCond = this.tree.args[1].type == 'condition' this.block = (firstCond || secondCond) } else { this.block = firstCond } this.isLogical = ['OR', 'AND', 'NOT', 'XOR'].includes(this.tree.name) } } }
Emeshka/graphytica
src/app/app.component.ts
import { Component, NgZone, ViewChild, OnInit } from '@angular/core'; //import { FormsModule, NgForm } from '@angular/forms'; import { ElectronService } from 'ngx-electron'; //import { LastDirectoryService } from './last-directory.service' import { DbServiceService } from './db-service.service' import { UpdateRecentService } from './update-recent.service' @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit { /* ------------------------------------- Импорт, драйверы ------------------------------------------ */ constructor( private _electronService: ElectronService, private _updateRecentService: UpdateRecentService, private conn: DbServiceService, private nz: NgZone ) { } private fs = this._electronService.remote.require('fs'); private path = this._electronService.remote.require('path'); private separator = this.path.sep; /* ------------------------------------- Приватные методы ------------------------------------------ */ /* -------------------------------------- Публичные параметры компонента, инициализация ----------------------------------------- */ title = 'Graphytica'; appView = 'start_view'; newProjectParentDirectory = ''; openProjectPath = ''; touchedFilepath = false; @ViewChild('openGraphTypeTag') openGraphTypeTag; @ViewChild('waitingMessageTag') waitingMessageTag; @ViewChild('waitingVoileTag') waitingVoileTag; ready = true; waiting = false; recent = []; setWaiting(message) { if (message) { this.waitingVoileTag.nativeElement.className = 'loading_voile_full_screen'; this.waitingMessageTag.nativeElement.innerText = message; } else { this.waitingVoileTag.nativeElement.className = 'loading_voile_hidden'; this.waitingMessageTag.nativeElement.innerText = ''; } this.waiting = !!message; console.log(message); } successListener = (src, obj) => { if (this.appView != 'main_view') { this.setWaiting('Почти готово...'); //console.log('app received import or export success =', src); if (!src || !obj) { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: 'Произошла ошибка. Попробуйте еще раз.' }); //console.log('event.ports:', event.ports); this.setWaiting(''); return; } this.nz.run(() => { this.newProjectParentDirectory = ''; this.openProjectPath = ''; this._updateRecentService.updateRecentProjects(src); let extIndex = src.lastIndexOf('.gph'); if (extIndex < 0) { extIndex = src.length; } let dbName = src.substring(src.lastIndexOf(this.separator)+1, extIndex); this.getParams = () => { return { dbName: dbName, dbLastSavedPath: src, data: obj.data, style: obj.style, zoom: obj.zoom, pan: obj.pan } } this.switchAppView('main_view'); this.setWaiting(''); }) } }; ngOnInit() { this._updateRecentService.change.subscribe( value => { this.recent = [].concat(this._updateRecentService.recentPathArray) }); } ngAfterViewInit(){ var ipcRenderer = this._electronService.ipcRenderer; //отвечаем на запросы выхода, только если main_view не построен //console.log('Adding ipcRenderer listeners on app component') ipcRenderer.on('has-unsaved-changes', (event,request) => { //console.log('renderer app component received h-u-s') if (this.appView != 'main_view') { //console.log('renderer app component sends h-u-s') ipcRenderer.send('has-unsaved-changes', this.ready ? false : 'not_ready'); } }); ipcRenderer.on('quit-request', (event,request) => { //console.log('renderer app component received q-r') if (this.appView != 'main_view') { //console.log('renderer app component sends q-r') ipcRenderer.send('quit-request', true); } }); this.setWaiting(''); } /* -------------------------------------- Коллбеки и слушатели ------------------------------------------ */ switchAppView = (value) => { if (this.appView == 'main_view') { this._electronService.ipcRenderer.send('fixed-size', ''); this._electronService.remote.getCurrentWindow().setTitle('Graphytica'); } if (this.appView != value) { if (value == 'main_view') { this._electronService.ipcRenderer.send('full-size', ''); //console.log('Sent full-size'); } if (value == 'start_view') { this.touchedFilepath = false; } this.appView = value; } } getParams = () => {}; newProjectPathUpdateCallback = (paths) => { this.newProjectParentDirectory = paths[0]; this.touchedFilepath = true; //console.log(`newProjectPathUpdateCallback: selectedPath = ${this.newProjectParentDirectory}`) } projectFolderExists = (prName) => { if (!prName) return false; //console.log(this.newProjectParentDirectory, prName); return this.fs.existsSync(this.path.join(this.newProjectParentDirectory, prName+'.gph')); } isValidFilename(p) { if (!p) return true; switch (process.platform) { case 'win32': { //console.log('check space or dot at end') if (p.endsWith(' ') || p.endsWith('\t') || p.endsWith('\n') || p.endsWith('\r') || p.endsWith('.')) return false; //console.log('check forbidden keyword') let windowsForbidden = ["CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"]; for (let i = 0; i<windowsForbidden.length; i++) { let forb = windowsForbidden[i]; if (p.toLowerCase() === forb.toLowerCase()) return false; let forbidWithExtensionRegexp = new RegExp(`^(${forb})\\..*$`, 'i');// example: CON.txt is forbidden let isForbWithExt = forbidWithExtensionRegexp.test(p); if (isForbWithExt) return false; } //console.log('check bad symbols') let good = /^[^"\\\/\?><\|:\*\000-\031]+$/.test(p);// exclude forbidden chars //console.log('is good:', good) return good; } default: { let regexp = /^[^\/\000-\031]+$/.test(p); return regexp; } } } createProject = (form) => { this.setWaiting('Создание родительского каталога...'); let prName = form.value.new_project_name; let prExportPath = this.path.join(this.newProjectParentDirectory, prName)+'.gph'; this.fs.mkdir(this.newProjectParentDirectory, {recursive: true}, (err) => { if (err) { return console.error(err); } else { // первый экспорт пустой базы данных this.setWaiting('Сохранение проекта...'); this.conn.initializeNew(); this.conn.export(prExportPath, null, this.successListener, (err) => { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `Не удалось сохранить проект по указанному пути:\n${prExportPath}\n${err.message}` }); }); } }); } openProjectPathUpdateCallback = (paths) => { this.openProjectPath = paths[0]; this.touchedFilepath = true; //console.log(`newProjectPathUpdateCallback: selectedPath = ${this.newProjectParentDirectory}`) } openProjectExists = () => { return this.fs.existsSync(this.openProjectPath) && this.fs.lstatSync(this.openProjectPath).isFile(); } openRecent = (path) => { if (!this.waiting) { this.openProjectPath = path; this.openProject(); } } removeFromRecent = (path) => { this._updateRecentService.removeFromList(path);//, this.readRecentProjects.bind(this) } deleteProject = (path) => { if (!this.waiting) { const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['No', 'Yes'], title: 'Удаление нельзя будет отменить!', message: `Вы уверены, что хотите безвозвратно удалить с диска проект\n${path}?\nЭто действие нельзя будет отменить!` }); if (choice === 1) { if (this.fs.existsSync(path)) { this.fs.unlink(path, (e) => { if (e) { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `Не удалось удалить проект по указанному пути:\n${path}\n${e.message}` }); } else { this.removeFromRecent(path); } }) } else { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Проекта не существует', message: `Проекта нет по указанному пути:\n${path}\nВозможно он был перемещен или удален ранее.` }); this.removeFromRecent(path); } } } } openProject = () => { this.setWaiting('Открытие проекта...'); this.conn.import(this.openProjectPath, false, this.successListener, (err) => { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `При открытии проекта по пути ${this.openProjectPath} возникла ошибка. \n${err.message} Возможно вы пытаетесь открыть не проект Graphytica или файл поврежден.` }) }) } reopenProject = (projectPath) => { this.switchAppView('start_view'); this.openProjectPath = projectPath; this.openProject(); } quitClickListener() { this._electronService.remote.getCurrentWindow().close(); } }
Emeshka/graphytica
src/app/action-button/action-button.component.ts
import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'action-button', templateUrl: './action-button.component.html', styleUrls: ['./action-button.component.css'] }) export class ActionButtonComponent implements OnInit { constructor() { } ngOnInit(): void { } @Input() text: string; @Input() active: any = true; @Input() type: any = "button"; @Input() callback: () => {}; @Input() iconSrc: string; get isActive() { if (typeof this.active == 'function') return this.active(); else return !!this.active; } onclick() { if (typeof this.callback == 'function' && this.isActive) this.callback(); } }
Emeshka/graphytica
src/app/view-category/view-category.component.ts
<filename>src/app/view-category/view-category.component.ts<gh_stars>1-10 import { Component, OnInit, Input } from '@angular/core'; import { DbServiceService } from '../db-service.service'; import { SelectQuery } from '../selection-category/SelectQuery'; @Component({ selector: 'view-category', templateUrl: './view-category.component.html', styleUrls: ['./view-category.component.css'] }) export class ViewCategoryComponent implements OnInit { constructor( private conn: DbServiceService ) { } @Input() cy = null; private static storedNewSettings = { fakeNewField: false, condition: new SelectQuery('SELECT nodes WHERE isSelected'), name: null, tempStrQuery: 'SELECT nodes WHERE isSelected', manualTyping: false, then: [ { what: 'background-color', calculator: 'equals', value: null } ] }; newSettings; rules = []; supportedStyles = ['background-color', 'width', 'height', 'line-color']; colorStyles = ['background-color', 'line-color']; isAddRuleButtonActive = false; autolayout() { let options = { name: 'cola', animate: true, refresh: 1, maxSimulationTime: 4000, ungrabifyWhileSimulating: false, fit: true, padding: 30, nodeDimensionsIncludeLabels: false, ready: function(){}, stop: function(){}, randomize: false, avoidOverlap: true, handleDisconnected: true, convergenceThreshold: 0.01, nodeSpacing: function( node ){ return 10; } } this.cy.layout(options).run(); this.cy.layout({name: 'preset'}).run(); } addFakeField = () => { this.newSettings.fakeNewField = true; } hideFakeField = () => { this.newSettings = { fakeNewField: false, condition: new SelectQuery('SELECT nodes WHERE isSelected'), tempStrQuery: 'SELECT nodes WHERE isSelected', manualTyping: false, name: null, then: [ { what: 'background-color', calculator: 'equals', value: null } ] }; ViewCategoryComponent.storedNewSettings = this.newSettings this.newSettings.fakeNewField = false; } createRule() { this.conn.addStyleRule({ condition: this.newSettings.condition, name: this.newSettings.name, then: this.newSettings.then }) this.hideFakeField(); } isCytoscapeClassNameInvalid(name) { if (!name) return true; let isValid = /^[a-z][a-z0-9_-]*$/.test(name) return !isValid } isInvalidCSSProperty(name, value){ var s = document.createElement('div').style; s[name] = value; return s[name] != value; } trim(string) { return string.trim().replace(/\s\s+/g, ' ') } cutForbidden(string) { string = string.replace(/[\n\r\t\0]/g, ' ') return string } checkInvalid(event, isInvalid) { var element = event.target || event.srcElement || event.currentTarget; if (element.value.includes('\n') || element.value.includes('\r')) { element.value = this.trim(this.cutForbidden(element.value)) //element.dispatchEvent(new Event('change', { 'bubbles': true })) element.blur() //console.log('dispatched event') return; } element.value = this.cutForbidden(element.value) //console.log(oldValue, element.value, oldValue != element.value) let value = this.trim(element.value) if (isInvalid(value) && element.className.indexOf('invalid_input') < 0) { element.className += ' invalid_input'; } else { element.className = element.className.replace(/\s*invalid_input/g, ''); } //console.log('parent css class =', parent.className, typeof parent.className, parent) } setNewStyleRuleName(event) { //console.log(`setNewClassName `, event) if (!this.isCytoscapeClassNameInvalid(event.target.value)) { this.newSettings.name = event.target.value var element = event.target || event.srcElement || event.currentTarget; let parent = element.parentElement.parentElement; parent.className = parent.className.replace(/\s*invalid_input/g, ''); } this.updateIsAddRuleButtonActive() } addThenStyle() { this.newSettings.then.push( { what: 'background-color', calculator: 'equals', value: null } ) this.updateIsAddRuleButtonActive() } removeThenStyle() { // } setThenStyleName(index, name) { this.newSettings.then[index].what = name this.updateIsAddRuleButtonActive() } setThenStyleCalculator(index, calculator) { let oldCalculator = this.newSettings.then[index].calculator this.newSettings.then[index].calculator = calculator if ((oldCalculator == 'equals' || oldCalculator == 'data') && calculator == 'mapData') { this.newSettings.then[index].value = [this.newSettings.then[index].value, null, null, null, null] } else if ((calculator == 'equals' || calculator == 'data') && oldCalculator == 'mapData') { this.newSettings.then[index].value = this.newSettings.then[index].value[0] } this.updateIsAddRuleButtonActive() } setThenStyleValue(index, event) { let style = this.newSettings.then[index] console.log(index, this.newSettings) if (!this.isInvalidCSSProperty(style.what, event.target.value)) { style.value = event.target.value var element = event.target || event.srcElement || event.currentTarget; let parent = element.parentElement.parentElement; parent.className = parent.className.replace(/\s*invalid_input/g, ''); if (this.colorStyles.includes(style.what)) { let testColorBlock = element.parentElement.previousSibling testColorBlock.style.background = event.target.value } } this.updateIsAddRuleButtonActive() } setThenStyleValueData(index, event) { let style = this.newSettings.then[index] style.value = event.target.value var element = event.target || event.srcElement || event.currentTarget; if (this.colorStyles.includes(style.what)) { let testColorBlock = element.parentElement.previousSibling testColorBlock.style.background = event.target.value } this.updateIsAddRuleButtonActive() } setThenStyleValueMapData(index, partIndex, event, isInvalid) { let style = this.newSettings.then[index] if (isInvalid == 'isNaN') isInvalid = isNaN.bind(this, event.target.value) if (partIndex == 0 || isInvalid && !isInvalid()) { style.value[partIndex] = event.target.value if (partIndex > 0) { var element = event.target || event.srcElement || event.currentTarget; let parent = element.parentElement.parentElement; parent.className = parent.className.replace(/\s*invalid_input/g, ''); if (partIndex == 3 || partIndex == 4) { if (this.colorStyles.includes(style.what)) { let testColorBlock = element.parentElement.previousSibling testColorBlock.style.background = event.target.value } } } } this.updateIsAddRuleButtonActive() } removeStyleRule(rule) { this.conn.removeStyleRule(rule) } editQuery() { this.newSettings.manualTyping = !this.newSettings.manualTyping } setTempQuery(value) { this.newSettings.tempStrQuery = value } setQuery() { this.newSettings.condition = new SelectQuery(this.newSettings.tempStrQuery) this.newSettings.manualTyping = false this.updateIsAddRuleButtonActive() } updateIsAddRuleButtonActive() { let isSelectQuery = this.newSettings.condition instanceof SelectQuery let isSelector = this.newSettings.condition.tree.type == 'selector' let isNameValid = !this.isCytoscapeClassNameInvalid(this.newSettings.name) let isThenNotEmpty = this.newSettings.then.length > 0 && this.newSettings.then.every( style => { let what = style.what let calc = style.calculator let value = style.value let isString = typeof style.value == 'string' let isArray = style.value instanceof Array let notNull = isArray && style.value.every(v => !!v || v === 0) console.log('check then:', what, calc, value, isString, isArray, notNull) return what && calc && value && (isString || isArray && notNull) } ) let result = isSelectQuery && isSelector && isNameValid && isThenNotEmpty console.log('update:', isSelectQuery, isSelector, isNameValid, isThenNotEmpty) this.isAddRuleButtonActive = result } ngOnInit(): void { this.rules = this.conn.styleRules this.newSettings = ViewCategoryComponent.storedNewSettings } }
Emeshka/graphytica
src/app/sq-operator/sq-operator.component.ts
import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'sq-operator', templateUrl: './sq-operator.component.html', styleUrls: ['./sq-operator.component.css'] }) export class SqOperatorComponent implements OnInit { constructor() { } @Input() tree: any = {}; single = false; isFirstSelector = false; isSecondSelector = false; ngOnInit(): void { console.log(this.tree); this.single = this.tree.args.length == 1 this.isFirstSelector = this.tree.args[0].type == 'selector' if (!this.single) this.isSecondSelector = this.tree.args[1].type == 'selector' } }
Emeshka/graphytica
src/app/main-view/main-view.component.ts
<filename>src/app/main-view/main-view.component.ts import { Component, Input, ViewChild, NgZone, OnInit, ErrorHandler } from '@angular/core'; import { ElectronService } from 'ngx-electron'; import { DbServiceService } from '../db-service.service'; import { UpdateRecentService } from '../update-recent.service'; import { LastDirectoryService } from '../last-directory.service'; import { OSelection } from './Selection'; import cytoscape from 'cytoscape'; import cola from 'cytoscape-cola'; import gridGuide from 'cytoscape-grid-guide'; import { SandboxFunction } from './SandboxFunction'; cytoscape.use( cola ); gridGuide( cytoscape ); @Component({ selector: 'app-main-view', templateUrl: './main-view.component.html', styleUrls: ['./main-view.component.css'] }) export class MainViewComponent implements OnInit { /* ---------------------------------------------------- private --------------------------------------------------- */ constructor( private _electronService: ElectronService, private _updateRecentService: UpdateRecentService, private conn: DbServiceService, private _lastDirectoryService: LastDirectoryService, private _nz: NgZone ) { } private fs = this._electronService.remote.require('fs'); private path = this._electronService.remote.require('path'); private parseCSV = this._electronService.remote.require('csv-parse'); private streamTransform = this._electronService.remote.require('stream-transform'); private ipcRenderer = this._electronService.ipcRenderer; private cy; private _dbLastSavedPath : string; public set dbLastSavedPath(val: any) { this._dbLastSavedPath = val; this.setWindowTitle(); } public get dbLastSavedPath(): any { return this._dbLastSavedPath; } private _dbName : string; public set dbName(val: any) { this._dbName = val; this.setWindowTitle(); } public get dbName(): any { return this._dbName; } private _unsavedChanges : boolean = false; public set unsavedChanges(val: any) { this._unsavedChanges = val; this.setWindowTitle(); } public get unsavedChanges(): any { return this._unsavedChanges; } private setWindowTitle = () => { this._electronService.remote.getCurrentWindow() .setTitle(`Graphytica - ${this.dbName} [${this.unsavedChanges ? '*' : 'сохранено'}] (${this.dbLastSavedPath})`); } private hasUnsavedChangesListener = (event,request) => { this.ipcRenderer.send('has-unsaved-changes', this.unsavedChanges); }; private quitRequestListener = (event,request) => { this.onClose(() => { this.ipcRenderer.send('quit-request', true); }); }; private successListener = (exportedPath) => { this._updateRecentService.updateRecentProjects(exportedPath); if (exportedPath) { this.unsavedChanges = false; this.dbLastSavedPath = exportedPath; let extIndex = exportedPath.lastIndexOf('.gph'); if (extIndex < 0) { extIndex = exportedPath.length; } this.dbName = exportedPath.substring(exportedPath.lastIndexOf(this.path.sep)+1, extIndex); this.setWaiting(''); } } /* ---------------------------------------------------- Input, ViewChild --------------------------------------------------- */ @Input() getParams: any; @Input() backToStartView: () => {}; @Input() reopenProject: (src) => {}; @Input() setWaiting: (text) => {}; @ViewChild('graph_field') graphField; /* ---------------------------------------------------- public --------------------------------------------------- */ // диалоги и вуаль во время загрузки mainDialog : string = ''; importSettings : any = { supportedTypes: this.conn.supportedTypes, path: '', format: '', params: [], demoSource: '', result: [], demoLineFrom: 1, demoLineTo: 3, className: '', isTipOpened: false, errorMessage: '', info: {}, includeHeaders: [], headersType: [], headersNames: [], noHeaders: false, fileExists: false, validColumnNames: false } saveAsPath : string = ''; public selection: OSelection = new OSelection([]); // инструменты, выделение openedCategory : string = 'selection'; isRendering : boolean = false; edgeCurveEditingListeners : any = { id: null, tapstart: {}, tapend: [] }; zoomStep = 0.4; readonly toolById = { select_move_any: { icon: 'assets/img/select.png', title: 'Выделение и перемещение элементов', appliableTo: 'node, edge', oninit: () => { this.cy.autoungrabify(false); this.cy.autounselectify(false); this.cy.userPanningEnabled(false); } }, pan_view: { icon: 'assets/img/grab.png', title: 'Перемещение поля зрения', oninit: () => { this.cy.autoungrabify(true); this.cy.autounselectify(true); this.cy.userPanningEnabled(true); } }, zoom_in: { icon: 'assets/img/zoom_in.png', title: 'Увеличить масштаб', oninit: () => { this.cy.autoungrabify(true); this.cy.autounselectify(true); this.cy.userPanningEnabled(true); }, onclick: (evt) => { this.cy.zoom({ level: this.cy.zoom() + this.zoomStep, renderedPosition: evt.renderedPosition }); } }, zoom_out: { icon: 'assets/img/zoom_out.png', title: 'Уменьшить масштаб', oninit: () => { this.cy.autoungrabify(true); this.cy.autounselectify(true); this.cy.userPanningEnabled(true); }, onclick: (evt) => { this.cy.zoom({ level: this.cy.zoom() - this.zoomStep, renderedPosition: evt.renderedPosition }); } }, zoom_auto: { icon: 'assets/img/zoom_auto.png', title: 'Масштаб по умолчанию', oninit: () => { this.cy.autoungrabify(true); this.cy.autounselectify(true); this.cy.userPanningEnabled(true); }, onclick: (evt) => { this.cy.zoom({ level: 1, renderedPosition: evt.renderedPosition }); } }, new_vertex: { icon: 'assets/img/new_vertex.png', title: 'Создать вершину', settings: { selectClass: { name: 'Класс новой вершины', order: 1, type: 'select', options: [], optionsConstructor: () => { return this.conn.getClassWithDescendants('V').map(c => { return {text: c.name, value: c.name} }); }, value: 'V' }, newProps: { type: 'hidden', value: {} } }, oninit: () => { this.cy.autoungrabify(true); this.cy.autounselectify(true); this.cy.userPanningEnabled(true); }, onclick: (evt) => { let cl = this.toolById.new_vertex.settings['selectClass'].value let data = { id: this.conn.nextId(), class: cl }; let propsOfNew: any = this.toolById.new_vertex.settings['newProps'].value for (let p in propsOfNew) { data[p] = propsOfNew[p] } this.cy.add([ { group: 'nodes', data: data, position: evt.position } ]); } }, new_edge: { icon: 'assets/img/new_edge.png', title: 'Создать ребро', appliableTo: 'node', settings: { selectClass: { name: 'Класс нового ребра', order: 1, type: 'select', options: [], optionsConstructor: () => { return this.conn.getClassWithDescendants('E').map(c => { return {text: c.name, value: c.name} }); }, value: 'E' }, newProps: { type: 'hidden', value: {} }, moved: { type: 'hidden', value: false }, source: { type: 'hidden', value: null } }, oninit: () => { this.cy.autoungrabify(true); this.cy.autounselectify(true); this.cy.userPanningEnabled(true); }, onmousedown: (evt) => { //console.log('new edge mousedown', evt.target) if (evt.target && evt.target != this.cy && evt.target.isNode()) { this.toolById.new_edge.settings['source'].value = evt.target; } }, onmousemove: (evt) => { if (this.toolById.new_edge.settings['source'].value) { //console.log('new edge mousemove') this.toolById.new_edge.settings['moved'].value = true; } }, onmouseup: (evt) => { //console.log('new edge mouseup', evt.target) let moved = this.toolById.new_edge.settings['moved'].value; let source = this.toolById.new_edge.settings['source'].value; if (evt.target && evt.target != this.cy && evt.target.isNode() && source && moved) { //console.log('create edge') let cl = this.toolById.new_edge.settings['selectClass'].value let data = { id: this.conn.nextId(), class: cl, source: source.data('id'), target: evt.target.data('id') }; let propsOfNew: any = this.toolById.new_edge.settings['newProps'].value for (let p in propsOfNew) { data[p] = propsOfNew[p] } this.cy.add([ { group: 'edges', data: data } ]); } this.toolById.new_edge.settings['moved'].value = false; this.toolById.new_edge.settings['source'].value = null; } } }; readonly controlsToolList = Object.keys(this.toolById); /*['zoom_out', 'zoom_in', 'zoom_auto', 'select_move_any', 'pan_view'];*/ activeToolId = ''; /* ---------------------------------------------------- public functions --------------------------------------------------- */ //сейчас можно только один слушатель события одновременно, неважно на какой селектор setTool = (toolId) => { //console.log(`setTool(): new = ${toolId}, old = ${this.activeToolId}`) if (this.activeToolId) { this.cy.removeListener('tap'); this.cy.removeListener('tapdrag'); this.cy.removeListener('tapstart'); this.cy.removeListener('tapend'); this.cy.removeListener('mouseover'); this.cy.removeListener('mouseout'); this.cy.autoungrabify(true); this.cy.userPanningEnabled(true); } if (!this.toolById[toolId]) { console.log(`Warning: tried to set unknown tool '${toolId}'`); return; } let different = this.activeToolId != toolId this.activeToolId = toolId; let tool = this.toolById[toolId]; let cursorPath = tool.icon.substring(0, tool.icon.length - 4) + '_cur_30x30.png'; if (tool.oninit) tool.oninit(); let funByEvent = { tap: tool.onclick, tapdrag: tool.onmousemove, tapstart: tool.onmousedown, tapend: tool.onmouseup, mouseover: (evt) => { this._nz.run(() => { if (!tool.appliableTo && evt.target != this.cy) return; this.graphField.nativeElement.style.cursor = `url('${cursorPath}'), pointer`; }) }, mouseout: (evt) => { this._nz.run(() => { if (!tool.appliableTo && evt.target != this.cy) return; this.graphField.nativeElement.style.cursor = `default`; }) } } for (let event in funByEvent) { if (funByEvent[event]) { this.cy.on(event, tool.appliableTo ? tool.appliableTo : funByEvent[event], tool.appliableTo ? funByEvent[event] : undefined ) } } if (tool.settings) { for (let s in tool.settings) { let obj = tool.settings[s] if (obj.optionsConstructor) obj.options = obj.optionsConstructor(); } } if (different && (toolId == 'new_vertex' || toolId == 'new_edge')) { this.openedCategory = 'edit' } this.checkEdgeCurveEdit() } isActiveTool = (id) => { return this.activeToolId == id; } checkEdgeCurveEdit = () => { let sel = this.selection.getArray() let listeners = this.edgeCurveEditingListeners; if (sel.length != 1 || !sel[0].isEdge() || sel[0].data('id') != listeners.id || this.activeToolId != 'select_move_any') { this.cy.remove('.edge_bend_point') for (let selector in listeners.tapstart) { //console.log('remove tapstart', selector, listeners['tapstart'][selector], 'element id:', listeners.id) this.cy.removeListener('tapstart', selector, listeners['tapstart'][selector]) } for (let listener of listeners.tapend) { //console.log('remove tapend', listener, 'element id:', listeners.id) this.cy.removeListener('tapend', listener) } listeners.id = null listeners.tapstart = {} listeners.tapend = [] } if (sel.length == 1 && sel[0].isEdge() && sel[0].data('id') != listeners.id && this.activeToolId == 'select_move_any') { let e = sel[0] listeners.id = e.data('id') function findDistance(A, B) { return Math.sqrt(Math.pow(B.x-A.x,2)+ Math.pow(B.y-A.y,2)) } function findAngle(A,B,C) { let atanA = Math.atan2(A.x - B.x, A.y - B.y); let atanC = Math.atan2(C.x - B.x, C.y - B.y); let diff = atanC - atanA; if (diff > Math.PI) diff -= 2*Math.PI; else if (diff < -Math.PI) diff += 2*Math.PI; return diff } let bendCoordinates = e.controlPoints() let bendDistances = e.style('control-point-distances') if (!bendDistances) bendDistances = []; else bendDistances = bendDistances.split(' '); let bendWeights = e.style('control-point-weights') if (!bendWeights) bendWeights = []; else bendWeights = bendWeights.split(' '); for (let i = 0; i < bendCoordinates.length; i++) { let moveBendPoint = false let tapStart = (evt) => { moveBendPoint = true } let tapEnd = (evt) => { //console.log('tapEnd:', evt, 'element id:', e.data('id')) if (moveBendPoint) { let angle = findAngle(evt.target.position(), e.sourceEndpoint(), e.targetEndpoint()) let AC = findDistance(evt.target.position(), e.sourceEndpoint()) /*console.log('positions: control:', evt.target.position(), ', edge source:', e.sourceEndpoint(), ', edge target:', e.targetEndpoint(), '; angle=', angle, ', AC=', AC )*/ let d = Math.floor(Math.sin(angle) * AC) let w = Math.cos(angle) * AC / findDistance(e.sourceEndpoint(), e.targetEndpoint()) //console.log('new d:', d, '; new w:', w) bendDistances[i] = d bendWeights[i] = w this.cy.style().selector(`[id = '${e.data('id')}']`).style({ 'control-point-distances': bendDistances.join(' '), 'control-point-weights': bendWeights.join(' ') }).update() /*console.log('control bend point: id:', e.data('id'), '; d:', e.style('control-point-distances'), '; w:', e.style('control-point-weights'))*/ } moveBendPoint = false } let id = 'move-bend-'+i let selector = `[id = '${id}']` this.cy.on('tapstart', selector, tapStart) listeners['tapstart'][selector] = tapStart this.cy.on('tapend', tapEnd) listeners['tapend'].push(tapEnd) this.cy.add([ { group: 'nodes', data: { id: id }, classes: ['edge_bend_point'], position: bendCoordinates[i] } ]).unselectify(); } let moveSourcePoint = false let sourceTapStart = (evt) => { moveSourcePoint = true } let sourceTapEnd = (evt) => { if (moveSourcePoint) { moveSourcePoint = false if (evt.target && evt.target != this.cy && evt.target.isNode() && !evt.target.data('id').startsWith('move-')) { //console.log(evt.target) e.move({ source: evt.target.data('id') }); e.unselect() e.select() } else { let el = this.conn.getById('move-source') if (el) el.position(e.sourceEndpoint()) } } } let sourceId = 'move-source' let sourceSelector = `[id = '${sourceId}']` this.cy.on('tapstart', sourceSelector, sourceTapStart) listeners['tapstart'][sourceSelector] = sourceTapStart this.cy.on('tapend', sourceTapEnd) listeners['tapend'].push(sourceTapEnd) this.cy.add([ { group: 'nodes', data: { id: sourceId }, classes: ['edge_bend_point'], position: e.sourceEndpoint() } ]).unselectify(); let moveTargetPoint = false let targetTapStart = (evt) => { moveTargetPoint = true } let targetTapEnd = (evt) => { if (moveTargetPoint) { moveTargetPoint = false if (evt.target && evt.target != this.cy && evt.target.isNode() && !evt.target.data('id').startsWith('move-')) { //console.log(evt.target) e.move({ target: evt.target.data('id') }); e.unselect() e.select() } else { let el = this.conn.getById('move-target') if (el) el.position(e.targetEndpoint()) } } } let targetId = 'move-target' let targetSelector = `[id = '${targetId}']` this.cy.on('tapstart', targetSelector, targetTapStart) listeners['tapstart'][targetSelector] = targetTapStart this.cy.on('tapend', targetTapEnd) listeners['tapend'].push(targetTapEnd) this.cy.add([ { group: 'nodes', data: { id: targetId }, classes: ['edge_bend_point'], position: e.targetEndpoint() } ]).unselectify(); this.conn.getById('move-source').lock() this.conn.getById('move-target').lock() } } // полный ререндер. вызывать только в случае импорта, sql запроса или другого изменения графа не через cytoscape render = (data, style, zoom, pan) => { this.isRendering = true; if (!style) { style = [ { selector: 'core', style: { 'active-bg-size': 0 } }, { selector: 'node', style: { 'background-color': '#ffaa33', 'label': 'data(id)' } }, { selector: 'edge', style: { 'width': 3, 'label': 'data(id)', 'line-color': '#000000', 'target-arrow-color': '#000000', 'target-arrow-shape': 'triangle', 'curve-style': 'unbundled-bezier', 'control-point-distances': '50 -50', 'control-point-weights': '0.2 0.8' } }, { selector: '.edge_bend_point', style: { 'label': '', 'shape': 'square', 'width': 10, 'height': 10, 'background-color': '#ddddff', 'border-width': 1, 'border-style': 'solid', 'border-color': 'grey' } }, { selector: ':selected', style: { 'background-color': '#228c15', 'line-color': '#0000aa', 'target-arrow-color': '#0000aa', 'source-arrow-color': '#0000aa' } }, { selector: '.hidden', style: { 'opacity': '0.1' } } ] } //console.log('style:', style) this.cy = cytoscape({ container: this.graphField.nativeElement, elements: data, layout: { name: 'preset', fit: true }, style: style, userZoomingEnabled: false, userPanningEnabled: true, autoungrabify: true, autounselectify: true }) this.cy.gridGuide({ snapToGridOnRelease: false, snapToGridDuringDrag: false, snapToAlignmentLocationOnRelease: false, snapToAlignmentLocationDuringDrag: false, panGrid: true }) // импорт не вызывает рендер, вызывает только инит и восстановление, поэтому очищаем this.selection.splice(0, this.selection.length); this.selection.pushAll(this.cy.$(':selected')); let selectionUpdate = (event) => { if (event.type == 'select') { this.selection.push(event.target); } else if (event.type == 'unselect' || event.type == 'remove') { this.selection.remove(event.target); } this.checkEdgeCurveEdit() //console.log('this.selection: ', this.selection); } this.cy.on('select', selectionUpdate) this.cy.on('unselect', selectionUpdate) this.cy.on('remove', selectionUpdate) this.cy.viewport({ zoom: zoom, pan: pan }); let checkClassesOnEvents = ['add', 'remove', 'select', 'unselect', 'tapselect', 'tapunselect', 'boxselect', 'box', 'lock', 'data'] let catchChanges = (event) => { let elem = event.target if (elem) { if (!elem.hasClass('edge_bend_point')) { this.unsavedChanges = true } let classChange = checkClassesOnEvents.includes(event.type) if (classChange && (elem.isNode() || elem.isEdge())) { for (let rule of this.conn.styleRules) { let classTurnOn = rule.condition.checkElement(elem) elem.toggleClass(rule.name, classTurnOn) } } } } this.cy.on('add remove move select unselect tapselect tapunselect boxselect box lock', catchChanges) this.cy.on('data', 'node, edge', catchChanges) this.checkEdgeCurveEdit(); this.conn.cy = this.cy; this.conn.export(this.dbLastSavedPath, null, (src, obj)=>{ //console.log('Exported with initial style.') }, (e)=>{ //console.log('Failed to save after initial style commit.') }) this.setTool(this.activeToolId); this.isRendering = false; } // переключатель категорий на панели инструментов switchCategory = (newCategory) => { this.openedCategory = newCategory; } /* ----------------------------------- Категория: файл ---------------------------------- */ // переключение диалогов switchDialog = (value) => { this.mainDialog = value; this.importResetSettings() this.importSettings.path = '' // формат остается this.importSettings.fileExists = false this.importSettings.validColumnNames = false this.saveAsPath = ''; } // восстановить с диска restoreProjectFromDisk = () => { const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['No', 'Yes'], title: 'Восстановить проект', message: 'Вы уверены, что хотите восстановить проект из сохраненной копии?\nВсе несохраненные изменения будут потеряны!' }); if (choice === 1) { this.setWaiting('Восстановление проекта...'); this.onClose(() => { this.reopenProject(this.dbLastSavedPath) }) } } // сохранить saveProjectListener = () => { this.conn.export(this.dbLastSavedPath, null, this.successListener, (err) => { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `Не удалось сохранить проект по указанному пути:\n${this.dbLastSavedPath}\n${err.message}` }) }) } saveDisabled = () => { return !this.unsavedChanges; } saveAsProjectListener() { const remote = this._electronService.remote; remote.dialog.showSaveDialog(remote.getCurrentWindow(), { title: 'Сохранить как', filters: [ { name: 'Graphytica projects (.gph)', extensions: ['gph'] }, { name: 'All files', extensions: ['*'] } ], defaultPath: this._lastDirectoryService.value || remote.app.getPath('documents') || remote.app.getPath('home') || ".", }) .then((result) => { if (result && result.filePath) { let path = result.filePath; this._lastDirectoryService.value = path.substring(0, path.lastIndexOf(this.path.sep)); this.saveAs(result.filePath); } }); } // сохранить как saveAs = (fp) => { this.setWaiting('Сохранение проекта...'); let pathWasAlreadyWithExtension = false; if (fp.endsWith('.gph')) { pathWasAlreadyWithExtension = true; } else { fp = fp + '.gph'; } if (this.fs.existsSync(fp)) { if (this.fs.lstatSync(fp).isFile()) { if (pathWasAlreadyWithExtension) { // for Windows 10 at least: asks replace confirmation automatically, no need for second confirmation this.fs.unlink(fp, () => { this.conn.export(fp, null, this.successListener, (err) => { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `Не удалось сохранить проект по указанному пути:\n${fp}\n${err.message}` }) }) }) } else { const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['No', 'Yes'], title: 'Файл существует!', message: 'Вы уверены, что хотите заменить существующий файл?' }); if (choice === 1) { this.fs.unlink(fp, () => { this.conn.export(fp, null, this.successListener, (err) => { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `Не удалось сохранить проект по указанному пути:\n${fp}\n${err.message}` }) }) }) } } } else { const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['No', 'Yes'], title: 'Папка существует!', message: 'Одноименная папка уже существует по этому пути. Вы уверены, что хотите удалить ее и сохранить файл вместо нее?' }); if (choice === 1) { this.fs.rmdir(fp, { recursive: true }, () => { this.conn.export(fp, null, this.successListener, (err) => { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `Не удалось сохранить проект по указанному пути:\n${fp}\n${err.message}` }) }) }); } } } else { this.conn.export(fp, null, this.successListener, (err) => { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `Не удалось сохранить проект по указанному пути:\n${fp}\n${err.message}` }) }) } } /* ---------------------------------------------- Импорт --------------------------------------------------- */ importResetSettings = () => { this.importSettings.demoSource = '' this.importSettings.result = [] this.importSettings.demoLineFrom = 1 this.importSettings.demoLineTo = 3 this.importSettings.className = '' this.importSettings.errorMessage = '' this.importSettings.info = {} this.importSettings.includeHeaders = [] this.importSettings.headersType = [] this.importSettings.headersNames = [] this.importSettings.noHeaders = false } importProjectPathUpdateCallback = (filepaths) => { this.importSettings.path = filepaths[0]; this.importSettings.fileExists = this.fs.existsSync(this.importSettings.path) && this.fs.lstatSync(this.importSettings.path).isFile(); if (this.importSettings.format == 'csv' && this.importSettings.path && this.importFileExists()) { this.importResetSettings() this.importUpdateParsedCSV(true) } } importFileExists = () => { return this.fs.existsSync(this.importSettings.path) && this.fs.lstatSync(this.importSettings.path).isFile(); } importOpenExternalDocs(name) { this.ipcRenderer.send('external-docs', name); } importSwitchValueTip() { this.importSettings.isTipOpened = !this.importSettings.isTipOpened } setImportActiveParamType(name, type) { let settingsEntry = this.importSettings.params.find(s => s.name == name) //console.log(type) settingsEntry.activeType = type } setImportDemoLine(mode, lineNumber) { if (mode == 'from') { this.importSettings.demoLineFrom = parseInt(lineNumber) || 1; } else if (mode == 'to') { this.importSettings.demoLineTo = parseInt(lineNumber) || 1; } } setImportIncludeHeader(header) { this.importSettings.includeHeaders[header] = !this.importSettings.includeHeaders[header] } setImportHeaderType(header, value) { this.importSettings.headersType[header] = value } setImportHeaderName(header, event) { var element = event.target || event.srcElement || event.currentTarget; if (element.value.includes('\n') || element.value.includes('\r')) { element.value = this.trim(this.cutForbidden(element.value)) element.blur() return; } element.value = this.cutForbidden(element.value) let value = this.trim(element.value) if (this.isFieldNameInvalid(header, value)) { if (element.className.indexOf('invalid_input') < 0) { element.className += ' invalid_input'; this.importSettings.validColumnNames = false; } } else { element.className = element.className.replace(/\s*invalid_input/g, ''); this.importSettings.headersNames[header] = value const included = this.importSettings.headersNames.filter((h, i) => { return this.importSettings.includeHeaders[i]; }) this.importSettings.validColumnNames = included.length > 0 && !included.some((h, index) => this.isFieldNameInvalid(index, h)) } } setImportNoHeaders(value) { this.importSettings.noHeaders = !!value if (this.importSettings.result && this.importSettings.result[0].length > 0) { let headersRow = value ? Array.from(Array(this.importSettings.result[0].length).keys()) : this.importSettings.result[0] for (let i = 0; i < headersRow.length; i++) { this.importSettings.headersNames[i] = ''+headersRow[i] } } } hasForbidden(propOrClassName) { return propOrClassName.search(/[\n\t\r\0]/g) >= 0 } isFieldNameInvalid(j, propName) { propName = this.cutForbidden(this.trim(propName)) let hasForbidden = this.hasForbidden(propName) let commonForbidden = propName == 'id' || propName == 'class' || propName == 'parent' if (!propName || hasForbidden || commonForbidden) return true; let colliding = this.importSettings.headersNames.filter((v, index) => j != index).indexOf(propName) >= 0 return colliding; } isClassNameInvalid(newClass) { newClass = this.trim(newClass) return (newClass == '' || this.conn.classesMap[newClass]) } trim(string) { return string.trim().replace(/\s\s+/g, ' ') } cutForbidden(string) { string = string.replace(/[\n\r\t\0]/g, ' ') return string } setImportNewClassName(event) { var element = event.target || event.srcElement || event.currentTarget; if (element.value.includes('\n') || element.value.includes('\r')) { element.value = this.trim(this.cutForbidden(element.value)) element.blur() return; } element.value = this.cutForbidden(element.value) let value = this.trim(element.value) if (this.isClassNameInvalid(value)) { if (element.className.indexOf('invalid_input') < 0) { element.className += ' invalid_input'; } } else { element.className = element.className.replace(/\s*invalid_input/g, ''); this.importSettings.className = value } } setImportSettings(name, received) { let settingsEntry = this.importSettings.params.find(s => s.name == name) let type = settingsEntry.activeType || settingsEntry.type let value = received.value let element = received if (type == 'boolean') { value = element.checked } else if (type.startsWith('function')) { value = received } console.log('setImportSettings:', element, value) function replaceSpecial(string) { string = string.replace('\\\\', '\\') string = string.replace('\\n', '\n') string = string.replace('\\r', '\r') string = string.replace('\\t', '\t') string = string.replace('\\0', '\0') string = string.replace('\\s', ' ') //\u0000 to \u10FFFF let regex = /\\u([a-fA-F\d]{4,6})/g string = string.replace(regex, (match, code) => { return String.fromCharCode(parseInt(code, 16)) }) return string } if (type == 'string') { value = replaceSpecial(value) settingsEntry.value = value } else if (type == 'string[]') { value = replaceSpecial(value) settingsEntry.value = value.split(' ') } else if (type == 'integer') { settingsEntry.value = parseInt(value) } else if (type == 'boolean') { settingsEntry.value = !!value } else if (type == 'select') { if (settingsEntry.enum.includes(value)) settingsEntry.value = value } else if (type == 'char') { value = replaceSpecial(value) if (value.length > 1 && element.className.indexOf('invalid_input') < 0) { element.className += ' invalid_input'; } else { element.className = element.className.replace(/\s*invalid_input/g, ''); settingsEntry.value = value } } else if (type == 'char[]') { value = replaceSpecial(value) let valid = value.split(' ').every(e => e.length <= 1) if (!valid && element.className.indexOf('invalid_input') < 0) { element.className += ' invalid_input'; } else { element.className = element.className.replace(/\s*invalid_input/g, ''); settingsEntry.value = value } } else if (type.startsWith('function')) { let argStart = type.indexOf('(') let argEnd = type.indexOf(')') let argList = type.substring(argStart + 1, argEnd).split(',').map(a => a.trim()) let onCreateError = (e) => { this.importSettings.errorMessage = `Неверный синтаксис пользовательской функции ${name} с сигнатурой ${type}: \n${e.name}: ${e.message}` for (let p in e) { if (p != 'stack') { this.importSettings.errorMessage += `\n${p}: ${e[p]}` } } let stack = e.stack.split('\n') this.importSettings.errorMessage += `\n${stack[0]}\n${stack[1]}` } let onRuntimeError = (e) => { this.importSettings.errorMessage = `Ошибка в пользовательской функции ${name} с сигнатурой ${type}: \n${e.name}: ${e.message}` for (let p in e) { if (p != 'stack') { this.importSettings.errorMessage += `\n${p}: ${e[p]}` } } let stack = e.stack.split('\n') this.importSettings.errorMessage += `\n${stack[0]}\n${stack[1]}` } settingsEntry.value = new SandboxFunction(argList, value, onCreateError, onRuntimeError) } console.log(name, type, settingsEntry.value.toString()) } setImportFormat = (format) => { this.importSettings.format = format; if (format == 'csv') { this.importSettings.params = [ { name: 'bom', type: 'boolean', title: 'Если true, найти и исключить метку порядка байтов (BOM) из входного файла CSV, если она есть.', value: false },{ name: 'cast', type: ['boolean', 'function(stringValue,context)'], title: `Если true, парсер будет пытаться конвертировать значения в нативные типы данных.\ Если задано функцией, то она принимает (1)строку-значение столбца (stringValue) и (2)контекст (context)\ в качестве аргументов и должна возвращать сконвертированное значение.\nДля значения-функции \ Graphytica использует полифилл, имитирующий поведение параметра cast пакета "node-csv-parse". \ Поэтому свойство контекста quoting не поддерживается.`, value: false, activeType: 'boolean' },{ name: 'cast_date', type: 'boolean', title: 'Если true, парсер будет пытаться конвертировать строки в даты (стандартным методом Date.parse). Работает только при включенном cast.\nЗначения-функции не поддерживаются Graphytica. Для достижения этого функционала используйте параметр cast.', value: false },{ name: 'comment', type: 'string', title: 'Считать символы после указанной строки за комментарий. Оставить пустым для отключения. По умолчанию отключено.', value: undefined },{ name: 'delimiter', type: 'string[]', title: 'Одна или несколько строк через пробел, распознающихся как разделители столбцов (для разделителей, содержащих пробелы, заменить их на \\s). По умолчанию , (запятая).', value: ',' },{ name: 'encoding', type: 'select', enum: ['utf8', 'ucs2', 'utf16le', 'latin1', 'ascii', 'base64', 'hex'], title: 'Кодировка. По умолчанию utf8.', value: 'utf8' },{ name: 'escape', type: 'char', title: 'Экранирующий символ. Применяется только к символам кавычек и экранирующим символам внутри значений, заключенных в кавычки. По умолчанию " (двойная кавычка).', value: '"' },{ name: 'from', type: 'integer', title: 'Начать обработку записей с определенного количества записей (первая запись идет под номером 1).', value: undefined },{ name: 'from_line', type: 'integer', title: 'Начать обработку записей с определенного номера строки.', value: undefined },{ name: 'ltrim', type: 'boolean', title: 'Если true, игнорировать пробелы сразу после разделителя (т.е. удалить пробелы в начале значений столбцов). По умолчанию false. Не действует на пробелы в кавычках.', value: false },{ name: 'max_record_size', type: 'integer', title: 'Максимально допустимое количество символов в буфере при чтении записи, иначе выдать ошибку. Задать на случай неверных delimiter или record_delimiter. Также предотвращает переполнение памяти при попытке чтения CSV с нарушенной структурой.', value: undefined },{ name: 'quote', type: 'char', title: 'Символ, который распознается как кавычки вокруг значения поля. Оставить пустым для отключения распознавания кавычек. По умолчанию символ " (двойная кавычка).', value: '"' },{ name: 'record_delimiter', type: 'char[]', title: 'Один или несколько символов через пробел, которые распознаются как разделители записей (для разделителя-пробела ввести \\s). По умолчанию - определить автоматически (для Linux - "\\n", Apple - "\\r", Windows - "\\r\\n")', value: undefined },{ name: 'relax', type: 'boolean', title: 'Сохранять символ кавычки внутри значений, не заключенных в кавычки.', value: false },{ name: 'relax_column_count', type: 'boolean', title: 'Не выдавать ошибку, если две строки имеют разное количество столбцов. По умолчанию false.', value: false },{ name: 'relax_column_count_less', type: 'boolean', title: 'Аналогично relax_column_count, но применяется только к строкам, содержащим столбцов меньше, чем ожидалось.', value: false },{ name: 'relax_column_count_more', type: 'boolean', title: 'Аналогично relax_column_count, но применяется только к строкам, содержащим столбцов больше, чем ожидалось.', value: false },{ name: 'rtrim', type: 'boolean', title: 'Если true, игнорировать пробелы сразу перед разделителем (т.е. удалить пробелы в конце значений столбцов). По умочанию false. Не действует на пробелы в кавычках.', value: false },{ name: 'skip_empty_lines', type: 'boolean', title: 'Пропускать пустые строки (соответствует рег.выражению /^$/). По умолчанию false.', value: false },{ name: 'skip_lines_with_empty_values', type: 'boolean', title: 'Пропускать строки, в которых есть пустые значения столбцов (соответствует рег.выражению /\s*/), пустой Buffer или равно null и undefined, если использовалась опция cast. По умолчанию false.', value: false },{ name: 'skip_lines_with_error', type: 'boolean', title: 'Пропускать строки, при обработке которых возникла ошибка. Когда отключено, ошибка прерывает чтение записей. По умолчанию false', value: false },{ name: 'to', type: 'integer', title: 'Закончить обработку записей после определенного количества записей.', value: undefined },{ name: 'to_line', type: 'integer', title: 'Закончить обработку записей на определенном номере строки.', value: undefined },{ name: 'trim', type: 'boolean', title: 'Если true, игнорировать пробелы сразу перед и после разделителя. По умолчанию false. Не действует на пробелы в кавычках.', value: false } ] if (this.importSettings.path && this.importFileExists()) { this.importUpdateParsedCSV(true) } } else if (!format) { this.importSettings.params = [] } this.importResetSettings() } import = (isDemo) => { //create property Person.name string if (!isDemo) this.setWaiting('Подготовка...'); try { if (this.importSettings.format == '') { this.conn.import(this.importSettings.path, true, this.merge, (err) => { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: `При импорте возникла ошибка. \n${err.message} Возможно вы пытаетесь импортировать неподдерживаемый тип файла, неправильно указали тип файла или файл поврежден.` }) this.setWaiting(''); }); } else if (this.importSettings.format == 'csv') { this.importUpdateParsedCSV(isDemo) } } catch (err) { this.importSettings.errorMessage = `При импорте возникла ошибка. \n${err.message} Возможно вы пытаетесь импортировать неподдерживаемый тип файла, неправильно указали тип файла или файл поврежден.` this.setWaiting(''); } } importUpdateParsedCSV(isDemo) { const importSettings = this.importSettings const conn = this.conn const cy = this.cy const setWaiting = this.setWaiting const switchDialog = this.switchDialog const isFieldNameInvalid = this.isFieldNameInvalid.bind(this) let params: any = {}; let cast = { execute: (stringValue, context) => { return stringValue } } for (let param of importSettings.params) { let isFunction = param.value instanceof SandboxFunction if (param.name != 'cast' || !isFunction) { params[param.name] = param.value } else if (param.name == 'cast') { cast = param.value } } //console.log('params.cast:', params.cast) //console.log('params.cast():', params.cast('test', {})) if (isDemo) { params.from = importSettings.demoLineFrom params.to = importSettings.demoLineTo params.raw = true } importSettings.errorMessage = '' importSettings.demoSource = '' importSettings.result = [] //console.log('importUpdateParsedCSV() params', params) //const output = [] //const parser = this.parseCSV(params) /*const collector = this.streamTransform(function(record, callback){ //console.log(record[0]) console.log(record) if (isDemo) { importSettings.demoSource += record.raw + '\n' importSettings.result.push(record.record) } else { importSettings.result.push(record) } callback(null, record); }, { parallel: 40 })*/ const handleError = function(where, error) { console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!', where, error) importSettings.errorMessage = `Error in ${where}:\n\n${error.name}: ${error.message}` for (let p in error) { if (p != 'stack') { importSettings.errorMessage += `\n${p}: ${error[p]}` } } } let parser:any = {} this.fs.createReadStream(importSettings.path) .on('error', function(err){ //console.error(err.message) handleError('reader', err) parser.end() }) .on('end', function(){ //console.log('reader.end()') parser.end() }) .setEncoding(importSettings.params.encoding) .pipe( parser = this.parseCSV(params) .on('data', function(csvrow) { //console.log(csvrow); if (csvrow) { let record = csvrow if (isDemo) { importSettings.demoSource += csvrow.raw + '\n' record = csvrow.record } record = record.map((stringValue, index) => { let context = { column: index, empty_lines: parser.info.empty_lines, invalid_field_length: parser.info.invalid_field_length, header: importSettings.noHeaders ? false : (importSettings.result.length == 0), index: index, lines: parser.info.lines, records: parser.info.records } if (context && context.header) return stringValue; return cast.execute(stringValue, context) }); importSettings.result.push(record) } importSettings.info = parser.info }) .on('error', function(error) { //console.log('parser error', error); handleError('parser', error) parser.end() }) .on('end', function() { console.log('parser end', importSettings.result); importSettings.info = parser.info // handle end of CSV //console.log('parser end, parser =', parser) //console.log('parser info', importSettings.info) /*importSettings.includeHeaders = [] importSettings.headersType = [] importSettings.headersNames = []*/ let headersRow = importSettings.noHeaders ? importSettings.result[0].map((e, index) => index) : importSettings.result[0] let sameHeaders = importSettings.headersNames.every((e, index) => e == headersRow[index]) && importSettings.headersNames.length == headersRow.length //console.log('sameHeaders:', sameHeaders) if (importSettings.headersNames.length == 0 || !sameHeaders) { for (let i = 0; i < headersRow.length; i++) { importSettings.includeHeaders[i] = true let columnType = 'string' if (importSettings.result[1]) { let v = importSettings.result[1][i] if (typeof v == 'number' || typeof v == 'boolean') columnType = typeof v; else if (v instanceof Date) columnType = 'date' } importSettings.headersType[i] = columnType importSettings.headersNames[i] = ''+headersRow[i] } const included = importSettings.headersNames.filter((h, i) => { return importSettings.includeHeaders[i]; }) importSettings.validColumnNames = included.length > 0 && !included.some((h, index) => isFieldNameInvalid(index, h)) } if (!isDemo && importSettings.className) { let properties = {} for (let i = 0; i<headersRow.length; i++) { if (importSettings.includeHeaders[i]) { let propName = importSettings.headersNames[i] properties[propName] = { type: importSettings.headersType[i] } } } conn.createClass(importSettings.className, 'V', properties) let data = [] let {x, y} = cy.pan() let side = Math.floor(Math.sqrt(importSettings.result.length)); for (let i = importSettings.noHeaders ? 0 : 1; i < importSettings.result.length; i++) { let row = importSettings.result[i] let plainElement = { group: 'nodes', data: { id: conn.nextId(), class: importSettings.className }, position: { x: x + (i % side) * 40, y: y + ((i - i % side) / side) * 40 } } for (let j = 0; j<row.length; j++) { let include = importSettings.includeHeaders[j] let name = importSettings.headersNames[j] //console.log('data', include, name) if (include) { plainElement.data[name] = row[j] } } console.log('plainElement:', plainElement) data.push(plainElement) } cy.add(data) setWaiting(''); switchDialog(''); } }) ); } merge = (src, obj) => { if (!src || !obj) { this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'warning', buttons: ['OK'], title: 'Ошибка', message: 'Произошла ошибка. Попробуйте еще раз.' }); //console.log('event.ports:', event.ports); this.setWaiting(''); return; } let newIdMap = {}; let newData = obj.data; newData.forEach((item) => newIdMap[item.data.id] = this.conn.nextId()) //console.log('import', newIdMap) newData.forEach((item) => { if (item.data.target && item.data.source) { item.data.target = newIdMap[item.data.target] item.data.source = newIdMap[item.data.source] } item.data.id = newIdMap[item.data.id] item.selected = false //console.log(item) }) this.cy.add(newData) if (obj.style) { let currentStyle = this.cy.style().json() for (let entry of obj.style) { //`[id = '${id}']` //console.log(entry.selector) entry.selector = entry.selector.replace(/\[id = ['"]?([a-z\d]+)['"]?\]/g, (match, id) => { console.log(id, newIdMap[id]) return `[id = '${newIdMap[id]}']` }) currentStyle.push(entry) } //console.log('import', currentStyle) this.cy.style().fromJson(currentStyle).update() } this.setWaiting(''); this.switchDialog(''); } /* ---------------------------------- Закрыть проект ------------------------------ */ closeProjectListener = () => { const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['No', 'Yes'], title: this.unsavedChanges ? 'Есть несохраненные изменения!' : 'Закрыть проект', message: 'Вы уверены, что хотите закрыть проект?' + (this.unsavedChanges ? '\nЕсть несохраненные изменения!' : '') }); if (choice === 1) { this.setWaiting('Закрытие проекта...'); this.onClose(() => { this.backToStartView(); this.setWaiting(''); }); } } /* ---------------------------------- Инициализация, финализация ------------------------------ */ // закрытие всех соединений и удаление слушателей IPC private onClose = (callback) => { this.ipcRenderer.removeListener('has-unsaved-changes', this.hasUnsavedChangesListener); this.ipcRenderer.removeListener('quit-request', this.quitRequestListener); if (this.cy) { this.cy.destroy(); this.conn.cy = null; this.cy = null; } if (callback) callback(); } ngOnInit(): void { let params = this.getParams(); let renderParams = ['data', 'zoom', 'pan']; for (let p in params) { if (!renderParams.includes(p)) this[p] = params[p] } this.activeToolId = 'pan_view';//prevent expression changed after checked in icon-button this.setWindowTitle(); this.conn.change.subscribe( value => { this.unsavedChanges = value }); this.ipcRenderer.on('has-unsaved-changes', this.hasUnsavedChangesListener); this.ipcRenderer.on('quit-request', this.quitRequestListener); } ngAfterViewInit(): void { let params = this.getParams(); this.render(params.data, params.style, params.zoom, params.pan); } }
Emeshka/graphytica
src/app/sq-selector/sq-selector.component.spec.ts
<gh_stars>1-10 import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SqSelectorComponent } from './sq-selector.component'; describe('SqSelectorComponent', () => { let component: SqSelectorComponent; let fixture: ComponentFixture<SqSelectorComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [ SqSelectorComponent ] }) .compileComponents(); }); beforeEach(() => { fixture = TestBed.createComponent(SqSelectorComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
Emeshka/graphytica
src/app/app-open-file-button-big/app-open-file-button-big.component.ts
import { Component, OnInit, Input } from '@angular/core'; import { ElectronService } from 'ngx-electron'; import { LastDirectoryService } from '../last-directory.service'; @Component({ selector: 'app-save-file-tile-button', styleUrls: ['./app-open-file-button-big.component.css', '../tile-button-styles.css'], templateUrl: './app-open-file-button-big.component.html' }) export class AppOpenFileButtonBigComponent implements OnInit { constructor( private _electronService: ElectronService, private _lastDirectoryService: LastDirectoryService ) { } ngOnInit(): void { } @Input() text: string; @Input() iconSrc: string; @Input() callback: (result) => {}; private separator = this._electronService.remote.require('path').sep; openClickListener() { const remote = this._electronService.remote; //console.log('lastdir:', this._lastDirectoryService.value); remote.dialog.showSaveDialog(remote.getCurrentWindow(), { title: 'Сохранить как', filters: [ { name: 'Graphytica projects (.gph)', extensions: ['gph'] }, { name: 'All files', extensions: ['*'] } ], defaultPath: this._lastDirectoryService.value || remote.app.getPath('documents') || remote.app.getPath('home') || ".", }) .then((result) => { if (result && result.filePath) { let path = result.filePath; this._lastDirectoryService.value = path.substring(0, path.lastIndexOf(this.separator)); this.callback(result.filePath); } }); } }
Emeshka/graphytica
src/app/app.module.ts
<reponame>Emeshka/graphytica<filename>src/app/app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule, NgForm } from '@angular/forms'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { NgxElectronModule } from 'ngx-electron'; import { AutosizeModule } from 'ngx-autosize'; import { CodemirrorModule } from '@ctrl/ngx-codemirror'; import { AppOpenFileButtonBigComponent } from './app-open-file-button-big/app-open-file-button-big.component'; import { TileButtonComponent } from './tile-button/tile-button.component'; import { LastDirectoryService } from './last-directory.service'; import { FilepathSelectorComponent } from './filepath-selector/filepath-selector.component'; import { MainViewComponent } from './main-view/main-view.component'; import { LoadingComponent } from './loading/loading.component'; import { VerticesCategoryComponent } from './vertices-category/vertices-category.component'; import { IconButtonComponent } from './icon-button/icon-button.component'; import { PrettyButtonComponent } from './pretty-button/pretty-button.component'; import { ClassesCategoryComponent } from './classes-category/classes-category.component'; import { TreeBranchComponent } from './tree-branch/tree-branch.component'; import { SelectionCategoryComponent } from './selection-category/selection-category.component'; import { TinyButtonComponent } from './tiny-button/tiny-button.component'; import { ViewCategoryComponent } from './view-category/view-category.component'; import { SwitchTrueFalseComponent } from './switch-true-false/switch-true-false.component'; import { AutosizedTextareaComponent } from './autosized-textarea/autosized-textarea.component'; import { DatePickerComponent } from './date-picker/date-picker.component'; import { CodeMirrorComponent } from './code-mirror/code-mirror.component'; import { SqPredicateComponent } from './sq-predicate/sq-predicate.component'; import { SqOperatorComponent } from './sq-operator/sq-operator.component'; import { SqSelectorComponent } from './sq-selector/sq-selector.component'; import { ActionButtonComponent } from './action-button/action-button.component'; @NgModule({ declarations: [ AppComponent, AppOpenFileButtonBigComponent, TileButtonComponent, FilepathSelectorComponent, MainViewComponent, LoadingComponent, VerticesCategoryComponent, IconButtonComponent, PrettyButtonComponent, ClassesCategoryComponent, TreeBranchComponent, SelectionCategoryComponent, TinyButtonComponent, ViewCategoryComponent, SwitchTrueFalseComponent, AutosizedTextareaComponent, DatePickerComponent, CodeMirrorComponent, SqPredicateComponent, SqOperatorComponent, SqSelectorComponent, ActionButtonComponent ], imports: [ BrowserModule, CodemirrorModule, BrowserModule, AppRoutingModule, NgxElectronModule, AutosizeModule, FormsModule ], providers: [LastDirectoryService], bootstrap: [AppComponent] }) export class AppModule { }
Emeshka/graphytica
src/app/tree-branch/tree-branch.component.ts
import { Component, Input, OnInit } from '@angular/core'; import { DbServiceService } from '../db-service.service'; import { ElectronService } from 'ngx-electron'; @Component({ selector: 'tree-branch', templateUrl: './tree-branch.component.html', styleUrls: ['./tree-branch.component.css'] }) export class TreeBranchComponent implements OnInit { constructor( private conn: DbServiceService, private _electronService: ElectronService ) { } @Input() tree: any = null; @Input() level: number = 0; @Input() selectElement = (className) => {}; @Input() getSelectedClass = () => {}; newSubclassSuper = ''; fakeEditableChild = false; newSubclass(superClass) { //console.log(`TreeBranch newSubclass('${superClass}')`); this.newSubclassSuper = superClass; this.fakeEditableChild = true; } removeClass(name) { //console.log(`TreeBranch removeClass('${name}')`) let superClass = this.conn.classesMap[name].superClass; const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['No', 'Yes'], title: 'Удалить класс', message: `Вы уверены, что хотите безвозвратно удалить класс ${name}? Все подклассы ${name} будут также удалены, а все экземпляры ${name} и его подклассов будут переведены в класс ${superClass}.` }); if (choice === 1) { let willBeRemoved = this.conn.getClassWithDescendants(name).map(c => c.name) let selectedClass = this.getSelectedClass() if (willBeRemoved.includes(selectedClass)) this.selectElement(this.conn.classesMap[name].superClass) this.conn.removeClass(name); } } hideFakeField() { this.fakeEditableChild = false; this.newSubclassSuper = ''; } isClassNameInvalid(newClass) { newClass = this.trim(newClass) return (newClass == '' || this.conn.classesMap[newClass]) } trim(string) { return string.trim().replace(/\s\s+/g, ' ') } cutForbidden(string) { string = string.replace(/[\n\r\t\0]/g, ' ') return string } checkClassName(event) { var element = event.target || event.srcElement || event.currentTarget; if (element.value.includes('\n') || element.value.includes('\r')) { element.value = this.trim(this.cutForbidden(element.value)) //element.dispatchEvent(new Event('change', { 'bubbles': true })) element.blur() //console.log('dispatched event') return; } element.value = this.cutForbidden(element.value) //console.log(oldValue, element.value, oldValue != element.value) let value = this.trim(element.value) if (this.isClassNameInvalid(value) && element.className.indexOf('invalid_input') < 0) { element.className += ' invalid_input'; } else { element.className = element.className.replace(/\s*invalid_input/g, ''); } //console.log('parent css class =', parent.className, typeof parent.className, parent) } setNewClassName(event) { //console.log(`setNewClassName `, event) if (!this.isClassNameInvalid(event.target.value)) { this.conn.createClass(event.target.value, this.newSubclassSuper, {}) this.fakeEditableChild = false; this.newSubclassSuper = ''; this.selectElement(event.target.value) var element = event.target || event.srcElement || event.currentTarget; let parent = element.parentElement.parentElement; parent.className = parent.className.replace(/\s*invalid_input/g, ''); } } ngOnInit(): void { this.level = this.level*1 //console.log('tree margin:' + ((this.level + 1) * 20) + 'px') } }
Emeshka/graphytica
src/app/tiny-button/tiny-button.component.ts
import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'tiny-button', templateUrl: './tiny-button.component.html', styleUrls: ['./tiny-button.component.css'] }) export class TinyButtonComponent { constructor() { } @Input() title: string; @Input() iconSrc: string; @Input() callback: () => {}; @Input() disabled: boolean; onclick() { if (typeof this.callback == 'function' && !this.disabled) this.callback(); } }
Emeshka/graphytica
src/app/main-view/Selection.ts
<reponame>Emeshka/graphytica /* Коллекция без дубликатов с сохранением порядка элементов и доступом по индексу с событиями на добавление, удаление и замену элемента */ export class OSelection { _array = []; _handlers = { itemadded: [], itemremoved: [], itemset: [] }; raiseEvent(event) { this._handlers[event.type].forEach(function(h) { h.call(this, event); }); } defineIndexProperty(index) { if (!(index in this)) { Object.defineProperty(this, index, { configurable: true, enumerable: true, get: function() { return this._array[index]; }, set: function(v) { this._array[index] = v; this.raiseEvent({ type: "itemset", index: index, item: v }); } }); } } addEventListener(eventName, handler): void { eventName = ("" + eventName).toLowerCase(); if (!(eventName in this._handlers)) throw new Error("Invalid event name."); if (typeof handler !== "function") throw new Error("Invalid handler."); this._handlers[eventName].push(handler); } removeEventListener(eventName, handler): void { eventName = ("" + eventName).toLowerCase(); if (!(eventName in this._handlers)) throw new Error("Invalid event name."); if (typeof handler !== "function") throw new Error("Invalid handler."); var h = this._handlers[eventName]; var ln = h.length; while (--ln >= 0) { if (h[ln] === handler) { h.splice(ln, 1); } } } push(...args): number { var index; for (var i = 0, ln = args.length; i < ln; i++) { if (!this._array.includes(args[i])) { index = this._array.length; this._array.push(args[i]); this.defineIndexProperty(index); this.raiseEvent({ type: "itemadded", index: index, item: args[i] }); } } return this._array.length; } pop(): any { if (this._array.length > -1) { var index = this._array.length - 1, item = this._array.pop(); delete this[index]; this.raiseEvent({ type: "itemremoved", index: index, item: item }); return item; } } unshift(...args): number { for (var i = 0, ln = args.length; i < ln; i++) { if (!this._array.includes(args[i])) { this._array.splice(i, 0, args[i]); this.defineIndexProperty(this._array.length - 1); this.raiseEvent({ type: "itemadded", index: i, item: args[i] }); } } for (; i < this._array.length; i++) { this.raiseEvent({ type: "itemset", index: i, item: this._array[i] }); } return this._array.length; } shift(): any { if (this._array.length > -1) { var item = this._array.shift(); delete this[this._array.length]; this.raiseEvent({ type: "itemremoved", index: 0, item: item }); return item; } } splice(index, howMany, ...args /*, element1, element2, ... */ ): any[] { var removed = [], item, pos; index = index == null ? 0 : index < 0 ? this._array.length + index : index; howMany = howMany == null ? this._array.length - index : howMany > 0 ? howMany : 0; while (howMany--) { item = this._array.splice(index, 1)[0]; removed.push(item); delete this[this._array.length]; this.raiseEvent({ type: "itemremoved", index: index + removed.length - 1, item: item }); } for (var i = 0, ln = args.length; i < ln; i++) { if (!this._array.includes(args[i])) { this._array.splice(index, 0, args[i]); this.defineIndexProperty(this._array.length - 1); this.raiseEvent({ type: "itemadded", index: index, item: args[i] }); index++; } } return removed; } get length() { return this._array.length; } set length(value) { var n = Number(value); var length = this._array.length; if (n % 1 === 0 && n >= 0) { if (n < length) { this.splice(n, null); } else if (n > length) { this.push.apply(this, new Array(n - length)); } } else { throw new RangeError("Invalid array length"); } this._array.length = n; } toString() { let str = this._array.toString(); //console.log('OSelection.toString():', str) return str } /* Новые методы */ private isIterable(collection) { if (collection == null || typeof(collection) == 'string') { return false } return typeof collection[Symbol.iterator] === 'function'; } pushAll(collection) { if (this.isIterable(collection)) { this.push.apply(this, collection); } else { throw new Error("Invalid argument for pushAll(): not iterable."); } } getArray() { return this._array.map((x) => x); } remove(item) { let index = this._array.indexOf(item) if (index >= 0) this.splice(index, 1) } constructor(items) { /*Object.getOwnPropertyNames(Array.prototype).forEach(function(name) { if (!(name in this)) { Object.defineProperty(this, name, { configurable: false, enumerable: false, writable: false, value: Array.prototype[name] }); } });*/ if (this.isIterable(items)) { this.push.apply(this, items); } else { throw new Error("Invalid argument for OSelection constructor: not iterable."); } } }
Emeshka/graphytica
src/app/date-picker/date-picker.component.ts
import { Component, OnInit, Input, Output, EventEmitter, ViewChild, SimpleChanges } from '@angular/core'; @Component({ selector: 'date-picker', templateUrl: './date-picker.component.html', styleUrls: ['./date-picker.component.css'] }) export class DatePickerComponent implements OnInit { constructor() { } @Input() firstValue: any = ''; @Input() title: any = ''; @Input() isMasked: boolean = true; @Output() value = new EventEmitter<any>(); @ViewChild('day_field') dayField; @ViewChild('month_field') monthField; @ViewChild('year_field') yearField; currentValue = null; day = null; month = null; year = null; daysInMonth() { if (this.month !== null && this.year !== null) { return new Date(this.year, this.month+1, 0).getDate(); } else { return 31 } } onInput(part, element) { let invalid = element.value < element.dataset.min*1 || element.value > element.dataset.max*1 || Math.floor(element.value*1) != element.value*1; //console.log('input invalid =', invalid) let next = (''+element.value).length >= (''+element.dataset.max).length if (part == 'day') { if (!invalid) {/*element.value = this.day ? this.day : '';*/ this.day = element.value*1; if (next) { } } } else if (part == 'month') { if (!invalid) {/*element.value = this.month != null ? this.month + 1 : '';*/ this.month = element.value*1 - 1; if (next) { } } } else if (part == 'year') { if (!invalid) {/*element.value = this.year ? this.year : '';*/ this.year = element.value*1; } } if (this.day !== null && this.month !== null && this.year !== null) { this.currentValue = new Date(this.year, this.month, this.day) this.emitValue(this.currentValue) } if (next) { if (part == 'day') { this.monthField.nativeElement.focus(); } else if (part == 'month') { this.yearField.nativeElement.focus(); } } } onKeyDown(part, event) { //console.log(event.code, event.target.value) if (event.code == 'ArrowLeft' && event.target.selectionStart == 0) { event.target.value == '' if (part == 'month') { this.onChange() this.dayField.nativeElement.focus(); } else if (part == 'year') { this.onChange() this.monthField.nativeElement.focus(); } event.preventDefault(); } if (event.code == 'ArrowRight' && event.target.selectionStart == event.target.value.length) { if (part == 'day') { this.onChange() this.monthField.nativeElement.focus(); this.monthField.nativeElement.selectionStart = 0; this.monthField.nativeElement.selectionEnd = 0; } else if (part == 'month') { this.onChange() this.yearField.nativeElement.focus(); this.yearField.nativeElement.selectionStart = 0; this.yearField.nativeElement.selectionEnd = 0; } event.preventDefault(); } let canIncrease = true let canDecrease = true if (part == 'day') { canIncrease = (this.day == null || this.day < this.daysInMonth()) canDecrease = this.day > 1 } else if (part == 'month') { canIncrease = (this.month == null || this.month < 11) canDecrease = this.month > 0 } else if (part == 'year') { canIncrease = (this.year == null || this.year < 2200) canDecrease = this.year > 1901 } //console.log('keyDown canIncrease', canIncrease, 'canDecrease', canDecrease) //console.log('keyDown', this.day, this.month, this.year) if (event.code == 'ArrowUp' && canIncrease) { this.onInputClick(null, part, 'increase') } else if (event.code == 'ArrowDown' && canDecrease) { this.onInputClick(null, part, 'decrease') } } onInputClick(event, part, mode) { //console.log('onInputClick', part, mode) if (event) event.preventDefault(); let field = null let previous = null if (part == 'day') { field = this.dayField.nativeElement previous = this.day ? this.day : 0 field.value = (mode == 'increase') ? previous + 1 : previous - 1 } else if (part == 'month') { field = this.monthField.nativeElement previous = this.month ? this.month : 0 field.value = (mode == 'increase') ? previous + 2 : previous } else if (part == 'year') { field = this.yearField.nativeElement previous = this.year ? this.year : 1900 field.value = (mode == 'increase') ? previous + 1 : previous - 1 } //console.log('onInputClick calling onInput', field) this.onInput(part, field) field.focus(); } emitValue(value) { //console.log('date-picker emit', value) this.currentValue = value if (value) { this.day = this.currentValue.getDate(); this.month = this.currentValue.getMonth(); this.year = this.currentValue.getFullYear(); } else { this.day = null; this.month = null; this.year = null; this.onChange() } //console.log('emit', this.day, this.month, this.year) this.value.emit(value); } onChange() { /*if (part == 'day') { this.dayField.nativeElement.value = this.day; } else if (part == 'month') { this.monthField.nativeElement.value = this.month; } else if (part == 'year') { this.yearField.nativeElement.value = this.year; } else if (part == 'all') { }*/ //console.log('change', this.day, this.month, this.year) /*if (this.day !== null && this.month !== null && this.year !== null) { this.dayField.nativeElement.value = this.currentValue.getDate(); this.monthField.nativeElement.value = this.currentValue.getMonth() + 1; this.yearField.nativeElement.value = this.currentValue.getFullYear(); } else {*/ //} this.dayField.nativeElement.value = this.day ? this.day : ''; this.monthField.nativeElement.value = this.month != null ? this.month + 1 : ''; this.yearField.nativeElement.value = this.year ? this.year : ''; } setValueFromFirst(value) { this.firstValue = new Date(value); this.currentValue = this.firstValue; //console.log(this.firstValue) this.day = this.firstValue.getDate(); this.month = this.firstValue.getMonth(); this.year = this.firstValue.getFullYear(); } ngOnChanges(changes: SimpleChanges) { if (changes.firstValue && this.dayField && this.monthField && this.yearField) { //console.log('date-picker ngOnChanges firstValue', changes.firstValue.currentValue) if (changes.firstValue.currentValue) { this.setValueFromFirst(changes.firstValue.currentValue) } else { this.day = null; this.month = null; this.year = null; } this.onChange() } } ngOnInit(): void { if (this.firstValue) { this.setValueFromFirst(this.firstValue) } } ngAfterViewInit(): void { if (this.firstValue) { this.onChange() } } }
Emeshka/graphytica
src/app/pretty-button/pretty-button.component.ts
import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'app-pretty-button', templateUrl: './pretty-button.component.html', styleUrls: ['./pretty-button.component.css'] }) export class PrettyButtonComponent implements OnInit { constructor() { } ngOnInit(): void { } @Input() text: string; @Input() active: any = true; @Input() type: any = "button"; @Input() callback: () => {}; get isActive() { if (typeof this.active == 'function') return this.active(); else return !!this.active; } onclick() { if (typeof this.callback == 'function' && this.isActive) this.callback(); } }
Emeshka/graphytica
src/app/sq-selector/sq-selector.component.ts
<filename>src/app/sq-selector/sq-selector.component.ts import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'sq-selector', templateUrl: './sq-selector.component.html', styleUrls: ['./sq-selector.component.css'] }) export class SqSelectorComponent implements OnInit { constructor() { } @Input() tree: any = {}; ngOnInit(): void { } }
Emeshka/graphytica
src/app/sq-predicate/sq-predicate.component.spec.ts
<reponame>Emeshka/graphytica<gh_stars>1-10 import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SqPredicateComponent } from './sq-predicate.component'; describe('SqPredicateComponent', () => { let component: SqPredicateComponent; let fixture: ComponentFixture<SqPredicateComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [ SqPredicateComponent ] }) .compileComponents(); }); beforeEach(() => { fixture = TestBed.createComponent(SqPredicateComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
Emeshka/graphytica
src/app/main-view/SandboxFunction.ts
/* Коллекция без дубликатов с сохранением порядка элементов и доступом по индексу с событиями на добавление, удаление и замену элемента */ export class SandboxFunction { private static readonly blackList = [ 'Worker', 'WebSocket', 'XMLHttpRequest', 'WorkerGlobalScope', 'DOMRequest', 'DOMCursor', 'WorkerLocation', 'WorkerNavigator', 'Crypto', 'Fetch', 'Headers', 'FetchEvent', 'BroadcastChannel', 'Request', 'Response', 'Notification', 'Performance', 'PerformanceEntry', 'PerformanceMeasure', 'PerformanceMark', 'PerformanceObserver', 'PerformanceResourceTiming', 'FormData', 'ImageData', 'IndexedDB', 'NotificationEvent', 'ServiceWorkerGlobalScope', 'ServiceWorkerRegistration', 'FileReader', 'File', 'Blob', 'NetworkInformation', 'MessageChannel', 'MessagePort', 'PortCollection', 'SharedWorker', 'DataTransfer', 'HTMLCanvasElement', 'FileSystemHandle', 'FileSystemFileHandle', 'FileSystemDirectoryHandle', 'DataTransferItem', 'FileSystemWritableFileStream', 'Stream', 'WriteableStream', 'ReadableStream', 'FileSystemFileEntry', 'FileSystemDirectoryEntry', 'FileReaderSync', 'FileList', 'URL', 'ReadableStreamDefaultController', 'ReadableStreamDefaultReader', 'WritableStreamDefaultWriter', 'WritableStreamDefaultController', 'Body', 'ReadableStreamBYOBReader', 'ReadableByteStreamController', 'ReadableStreamBYOBRequest', 'EventSource', 'WebGLRenderingContext', 'WebGL2RenderingContext', 'WebGLActiveInfo', 'WebGLBuffer', 'WebGLContextEvent', 'WebGLFramebuffer', 'WebGLProgram', 'WebGLQuery', 'WebGLRenderbuffer', 'WebGLSampler', 'WebGLShader', 'WebGLShaderPrecisionFormat', 'WebGLSync', 'WebGLTexture', 'WebGLTransformFeedback', 'WebGLUniformLocation', 'WebGLVertexArrayObject', 'OffscreenCanvas', 'DedicatedWorkerGlobalScope', 'SharedWorkerGlobalScope', 'Window', 'WindowOrWorkerGlobalScope', 'AnalyserNode', 'Animation', 'AnimationEvent', 'AnimationTimeline', 'ApplicationCache', 'Cache', 'CacheStorage', 'CanvasRenderingContext2D', 'CaretPosition', 'ChannelMergerNode', 'CharacterData', 'ClientRect', 'ClientRectList', 'Clipboard', 'ClipboardEvent', 'CloseEvent', 'Comment', 'CompositionEvent', 'ConstantSourceNode', 'ConvolverNode', 'CountQueuingStrategy', 'Credential', 'CredentialsContainer', 'CryptoKey', 'CryptoKeyPair', 'CustomElementRegistry', 'Audio', 'AudioBuffer', 'AudioBufferSourceNode', 'AudioContext', 'AudioDestinationNode', 'AudioListener', 'AudioNode', 'AudioParam', 'AudioParamMap', 'AudioProcessingEvent', 'AuthenticatorAssertionResponse', 'AuthenticatorAttestationResponse', 'DataCue', 'DataView', 'External', 'IDBDatabase', 'MediaDevices', 'MediaDeviceInfo', 'MessageEvent', 'MessagePort', 'MessageChannel', 'Location', 'Gamepad', 'GamepadEvent', 'Reflect', 'ShadowRoot', 'SourceBuffer', 'SourceBufferList', 'Storage', 'StorageEvent', 'StorageManager', 'StyleSheet', 'StyleSheetList', 'SubtleCrypto', 'SyncManager', 'SyntaxError', 'PageTransitionEvent', 'PaymentRequest', 'PaymentResponse', 'Permissions', 'Plugin', 'PointerEvent', 'PromiseRejectionEvent', 'PushSubscription', 'XMLDocument', 'XMLHttpRequestUpload', 'XMLSerializer', 'XPathEvaluator', 'XPathExpression', 'XPathResult', 'export', 'class', 'navigator', 'Event', 'MouseEvent', 'KeyboardEvent', 'CustomEvent', 'importScripts', 'Promise', 'clearInterval', 'clearTimeout', 'dump', 'implements', 'constructor', 'set', 'get', 'async', 'await', 'Function', 'function', 'require', 'import', 'call', 'apply', 'bind', 'prototype', '__proto__', 'callee', 'process', 'global', 'Agent', 'read', 'write', 'http', 'FileSystem', 'NavigationPreloadManager', 'Navigator', 'void', 'private', 'public', 'crypto', 'customElements', 'debugger', 'default', 'dispatchEvent', 'departFocus', 'devicePixelRatio', '__dirname', '__filename', 'addEventListener', 'alert', 'applicationCache', 'blur', 'caches', 'cancelAnimationFrame', 'captureEvents', 'clearImmediate', 'clientInformation', 'defaultStatus', 'doNotTrack', 'document', 'console', 'confirm', 'prompt', 'eval', 'exports', 'extends', 'external', 'createElement', 'getElementById', 'getElementsByClassName', 'querySelector', 'this', 'Proxy', 'proxy', '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'setPrototypeOf', 'caller', 'innerHeight', 'innerWidth', 'innerSubscribe', 'InnerSubscriber', 'interface', 'isSecureContext', 'kill', 'exception', 'event', 'Exception', 'throw', 'throws', 'invoke', 'invokeMethod', 'invokeMethodAsync', 'ajax', 'globalThis', 'visualViewport', 'fetch', 'focus', 'frameElement', 'frames', 'top', 'screenLeft', 'screenTop', 'screenX', 'screenY', 'Screen', 'ScreenOrientation', 'outerHeight', 'outerWidth', 'history', 'History', 'localStorage', 'location', 'locationbar', 'log', 'VisualViewport', 'Element', 'Error', 'ErrorEvent', 'ErrorHandler', 'ExtensionScriptApis', 'webkitURL', 'window', 'document', 'dump', 'yield', 'queueMicrotask', 'scroll', 'scrollBy', 'scrollTo', 'scrollX', 'scrollY', 'scrollbars', 'self', 'package', 'pageXOffset', 'pageYOffset', 'parent', 'performance', 'personalbar', 'postMessage', 'print', 'exec', 'run', 'execSync', 'dialog', 'electron', 'quit', 'sessionStorage', 'super', 'spawn', 'spawnSync', 'moveBy', 'moveTo', 'webContents', 'loadURL', '_baseURL', '_htc', 'BrowserWindow', 'ipcRenderer', 'ipcMain', 'MainViewComponent', 'SandboxFunction', 'Electron', 'Node', 'NodeFilter', 'NodeIterator', 'NodeJS', 'NodeList', 'Component', 'Input', 'ViewChild', 'NgZone', 'OnInit', 'ElectronService', 'DbServiceService', 'UpdateRecentService', 'LastDirectoryService', 'OSelection', 'cytoscape', 'cola', 'gridGuide' ] private static readonly whiteList = [ 'Math', 'JSON', 'parseInt', 'parseFloat', 'Date', 'Integer', 'String', 'Number', 'Array', 'Boolean', 'atob', 'btoa', 'RegExp', 'Object', 'Error', 'Set' ] /* ----------------------------------------------------------------------------------------------- */ private f = function(...args) { console.warn('SandboxFunction is empty.') return undefined }; public functionBody:string = 'return undefined'; public static tryCreate(functionBody): Error { let notSecure = false; for (let str of SandboxFunction.blackList) { const regex = new RegExp(`\\b${str}\\b`, 'g'); let found = functionBody.search(regex) >= 0 notSecure = notSecure || found //console.log('forbidden check: found =', found, ', regex =', regex, ', str =', str, //', match =', functionBody.match(regex)) } if (notSecure) { return new Error('Используются запрещенные классы, интерфейсы, свойства, переменные или операторы.') } const lambda = /=>/g notSecure = notSecure || (functionBody.search(lambda) >= 0) if (notSecure) { return new Error('Использование лямбда-выражений запрещено') } let fn:any = function(){return undefined} try { fn = new Function(functionBody) } catch (e) { //console.log('(!) Syntax error in user function with argNames ', argNamesArray, '.', e) return e } return null; } execute(...args) { return this.f(...args) } toString() { return '[SandboxFunction] ' + this.functionBody } constructor(argNamesArray, functionBody, onCreateError, onRuntimeError) { //console.log('new Sandbox') if (!functionBody) { console.warn('(!) SandboxFunction constructor: empty function body') return } let error = SandboxFunction.tryCreate(functionBody) if (error) { if (onCreateError) onCreateError(error) return } let fn:any = function(){return undefined} try { fn = new Function(...argNamesArray, functionBody) this.functionBody = functionBody; } catch (e) { //console.log('(!) Syntax error in user function with argNames ', argNamesArray, '.', e) if (onCreateError) onCreateError(e) } let wrapper = (...args) => { let globallyAvailable = {}; for (let p in window) { if (!SandboxFunction.whiteList.includes(p)) { globallyAvailable[p] = null } } for (var p in this) { globallyAvailable['' + p] = null; } console.log('wrapper args', args) //console.log(globallyAvailable) let result = undefined try { result = fn.call(globallyAvailable, ...args) } catch (e) { let argsAtError = {} for (let i = 0; i<argNamesArray.length; i++) { let name = argNamesArray[i] argsAtError[name] = args[i] } //console.log('(!) User function with args ', argsAtError, ' thrown an error.', e) if (onRuntimeError) onRuntimeError(e) return undefined } //console.log('wrapper:', result, fn.toString(), globallyAvailable); return result; } this.f = wrapper } }
Emeshka/graphytica
src/app/selection-category/selection-category.component.ts
<reponame>Emeshka/graphytica import { Component, OnInit, Input, OnDestroy } from '@angular/core'; import { KeyValue } from '@angular/common'; import { ElectronService } from 'ngx-electron'; import { DbServiceService } from '../db-service.service'; import { SelectQuery } from './SelectQuery'; @Component({ selector: 'selection-category', templateUrl: './selection-category.component.html', styleUrls: ['./selection-category.component.css'] }) export class SelectionCategoryComponent implements OnInit, OnDestroy { constructor( private conn: DbServiceService, private _electronService: ElectronService ) { } @Input() selection: any; @Input() toolById; @Input() activeToolId: string; infoMessage: string = ''; showTable: string = 'selection'; expandTable: boolean = false; selectionListener = null; showCreateFreeField: boolean = false; replaceAllPropName: string = null; replaceAllValue: any = ''; entities = null; areEdges = null; commonClass = ''; classDefinedProps = null; freeProps = null; classDefinedPropsColspanOwnerByOrder = null; private static storedSelectSettings = { mode: 'reset', manualTyping: false, tempStrQuery: 'SELECT any', showHelp: false, runtimeError: null, query: new SelectQuery('SELECT any') } selectSettings: any = {} static hideColumnsList = []; get hideColumns() { return SelectionCategoryComponent.hideColumnsList; } set hideColumns(newHideColumnsList) { SelectionCategoryComponent.hideColumnsList = newHideColumnsList; } classPropsOrderComparator = (a: KeyValue<string,any>, b: KeyValue<string,any>): number => { let owners = a.value.owner.localeCompare(b.value.owner) if (owners != 0) return owners; return a.key.localeCompare(b.key) } updateTable() { if (this.selectionListener) this.selectionListener(); this.showTable = 'selection'; } panToElement(id) { this.conn.cy.center(this.conn.getById(id)) } // Выключать столбцы toggleColumn(propName) { let list = this.hideColumns let index = list.indexOf(propName) if (index >= 0) { list.splice(index, 1) } else { list.push(propName) } this.hideColumns = list } resetHideColumn() { this.hideColumns = [] } toggleExpand() { this.expandTable = !this.expandTable } deleteFree(propName) { const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['No', 'Yes'], title: 'Удалить свободное свойство', message: `Вы уверены, что хотите безвозвратно удалить свободное свойство ${propName} у выделенных элементов?` }); if (choice === 1) { this.selection.getArray().forEach((e) => e.removeData(propName)) let index = this.freeProps.indexOf(propName) if (index >= 0) { this.freeProps.splice(index, 1) } } } replaceAll(propName) { this.replaceAllPropName = propName } setReplaceAllValue(value, type) { if (value === '' || value === null) { this.replaceAllValue = '' } else { if (type == 'number') { let v = value*1 if (!isNaN(v)) this.replaceAllValue = v } else if (type == 'boolean') { if (typeof value == 'boolean') this.replaceAllValue = value; } else if (type == 'string') { this.replaceAllValue = value } else if (type == 'date' || type == 'time' || type == 'datetime') { this.replaceAllValue = value } } } applyReplaceAllValue() { this.selection.getArray().forEach((e) => e.data(this.replaceAllPropName, this.replaceAllValue)) this.replaceAllPropName = null this.replaceAllValue = '' } setPropOfExisting(elementId, propName, value, type) { if (value === '' || value === null) { this.conn.cy.$(`[id = '${elementId}']`).data(propName, ''); } else { if (type == 'number') { let v = value*1 if (!isNaN(v)) this.conn.cy.$(`[id = '${elementId}']`).data(propName, v); } else if (type == 'boolean') { if (typeof value == 'boolean') this.conn.cy.$(`[id = '${elementId}']`).data(propName, value); } else if (type == 'string') { this.conn.cy.$(`[id = '${elementId}']`).data(propName, value); } else if (type == 'date' || type == 'time' || type == 'datetime') { this.conn.cy.$(`[id = '${elementId}']`).data(propName, value); //console.log(this.propsOfNew[key]) } } } /* --------------------------------------- Создание свободного свойства -------------------------- */ toggleFakeField() { this.showCreateFreeField = !this.showCreateFreeField } hasForbidden(propOrClassName) { let forbidden = ['\n', '\t', '\r', '\0'] let hasForbidden = forbidden.reduce((accum, current) => { return accum && propOrClassName.indexOf(current) >= 0 }, true) return hasForbidden } isFieldNameColliding(propName, className) { let allProps = this.conn.getAllProps(className) if (propName in allProps) return true; let descendantsProps = this.conn.getClassWithDescendants(className).map(c => c.properties); descendantsProps = [].concat.apply([], descendantsProps); return propName in descendantsProps; } trim(string) { return string.trim().replace(/\s\s+/g, ' ') } cutForbidden(string) { string = string.replace(/[\n\r\t\0]/g, ' ') return string } isFieldNameInvalid(propName) { propName = this.cutForbidden(this.trim(propName)) let hasForbidden = this.hasForbidden(propName) let commonForbidden = propName == 'id' || propName == 'class' || propName == 'parent' let edgesForbidden = this.areEdges && (propName == 'source' || propName == 'target') if (!propName || hasForbidden || commonForbidden || edgesForbidden) return true; let colliding = this.isFieldNameColliding(propName, this.commonClass) if (colliding) return true; return false;//this.unifyFreeProps.has(propName); } checkNewFreePropName(event) { var element = event.target || event.srcElement || event.currentTarget; if (element.value.includes('\n') || element.value.includes('\r')) { element.value = this.trim(this.cutForbidden(element.value)) console.log('checkNewFreePropName dispatch change element', element) //element.dispatchEvent(new Event('change', { 'bubbles': true })) element.blur() return; } element.value = this.cutForbidden(element.value) let value = this.trim(element.value) if (this.isFieldNameInvalid(value) && element.className.indexOf('invalid_input') < 0) { element.className += ' invalid_input'; } else { element.className = element.className.replace(/\s*invalid_input/g, ''); } } setNewFreePropName(event) { console.log('setNewFreePropName', event) let propName = event.target.value if (!this.isFieldNameInvalid(propName)) { console.log('setNewFreePropName: name valid') this.selection.getArray().forEach((e) => { if (!e.data(propName)) e.data(propName, ''); }) this.freeProps.push(propName) this.showCreateFreeField = false; var element = event.target || event.srcElement || event.currentTarget; let parent = element.parentElement.parentElement; parent.className = parent.className.replace(/\s*invalid_input/g, ''); } } /* ---------------------------------------- Действия ------------------------------------------ */ duplicate() { let newIdMap = {}; let oldSelected = this.conn.cy.$(':selected') let oldValue = this.conn.cy.autounselectify(); this.conn.cy.autounselectify(false); oldSelected.unselect() this.conn.cy.autounselectify(oldValue); let newData = oldSelected.jsons(); newData.forEach((item) => newIdMap[item.data.id] = this.conn.nextId()) newData.forEach((item) => { if (item.data.target && item.data.source) { item.data.target = newIdMap[item.data.target] item.data.source = newIdMap[item.data.source] } item.data.id = newIdMap[item.data.id] item.selected = true }) this.conn.cy.add(newData) let duplicateStyle = this.conn.cy.style().json() let regexp = /\[id = ['"]?([a-z\d]+)['"]?\]/g for (let entry of duplicateStyle) { //`[id = '${id}']` if (regexp.test(entry.selector)) { entry = JSON.parse(JSON.stringify(entry)) entry.selector = entry.selector.replace(regexp, (match, id) => { return `[id = '${newIdMap[id]}']` }) duplicateStyle.push(entry) } } this.conn.cy.style().fromJson(duplicateStyle).update() } delete() { const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['No', 'Yes'], title: 'Удалить элементы', message: `Вы уверены, что хотите безвозвратно удалить все выделенные элементы?` }); if (choice === 1) { this.conn.cy.$(':selected').remove(); } } panToSelection() { this.conn.cy.center(this.conn.cy.$(':selected')) } resetSelection() { let oldValue = this.conn.cy.autounselectify(); this.conn.cy.autounselectify(false); this.conn.cy.$(':selected').unselect() this.conn.cy.autounselectify(oldValue); } pinUnpin() { let sel = this.conn.cy.$(':selected').filter(e => e.isNode()); let allLocked = sel.reduce((accum, current) => accum && current.locked(), true) if (allLocked) sel.unlock(); else sel.lock(); } //////// setShowTable(value) { this.showTable = value } showMessage(str) { this.infoMessage = str //may be problem with ng zone setTimeout(() => { this.infoMessage = '' }, 3000) } /* ----------------------------------------- Анализ ------------------------------------------- */ /* ------------------------------------ Изменить выделение ------------------------------------ */ editQuery() { this.selectSettings.manualTyping = !this.selectSettings.manualTyping } setTempQuery(value) { this.selectSettings.tempStrQuery = value } setQuery() { this.selectSettings.query = new SelectQuery(this.selectSettings.tempStrQuery) this.selectSettings.manualTyping = false this.selectSettings.runtimeError = null } runQuery() { try { let result = this.selectSettings.query.execute(this.conn.cy) if (result) { let oldValue = this.conn.cy.autounselectify(); this.conn.cy.autounselectify(false); if (this.selectSettings.mode == 'reset') { this.conn.cy.elements().unselect(); result.select(); } else if (this.selectSettings.mode == 'add') { result.select(); } else if (this.selectSettings.mode == 'subtract') { result.unselect(); } else if (this.selectSettings.mode == 'intersect') { this.conn.cy.elements().difference(result).unselect(); } this.conn.cy.autounselectify(oldValue); } else { this.showMessage('Ничего не найдено') if (this.selectSettings.mode == 'intersect' || this.selectSettings.mode == 'reset') { let oldValue = this.conn.cy.autounselectify(); this.conn.cy.autounselectify(false); this.conn.cy.elements().unselect(); this.conn.cy.autounselectify(oldValue); } } } catch (err) { this.selectSettings.runtimeError = err.message } } resetSelectSettings() { this.selectSettings = { mode: 'reset', manualTyping: false, tempStrQuery: 'SELECT any', showHelp: false, runtimeError: null, query: new SelectQuery('SELECT any') } SelectionCategoryComponent.storedSelectSettings = this.selectSettings } setSelectionMode(value) { this.selectSettings.mode = value } switchSelectQueryHelp() { this.selectSettings.showHelp = !this.selectSettings.showHelp } /* -------------------------------------- Инициализация ------------------------------------ */ ngOnInit(): void { setTimeout(() => { let f = () => { let arr = this.selection.getArray(); console.log('this.selectionListener: this.selection.getArray():', arr) let commonClass = null; let freeCommonProps = null; let areEdges = true; let areVertices = true; //this.unifyFreeProps = new Set([]); for (let e of arr) { //console.log('this.selectionListener: of this.selection.getArray():', e.data('id'), e.isNode(), e.isEdge()) areEdges = areEdges && e.isEdge(); areVertices = areVertices && e.isNode(); let className = e.data('class'); if (commonClass === null) commonClass = className; else if (commonClass != '') { let common = this.conn.getClosestCommonAncestor(commonClass, className) if (common) { commonClass = common } else { commonClass = ''; } } let meta = ['class', 'id', 'parent'] if (e.isEdge()) { meta.push('target', 'source'); } let eClassDefined = Object.keys(this.conn.getAllProps(className)) let data = Object.keys(e.data()) let eFreeProps = [] for (let d of data) { if (!meta.includes(d) && !eClassDefined.includes(d)) { if (e.data(d) !== null && e.data(d) !== undefined) { eFreeProps.push(d) //this.unifyFreeProps.add(d) } } } if (freeCommonProps) { let i = 0 while (i < freeCommonProps.length) { let f = freeCommonProps[i] if (!eFreeProps.includes(f)) { freeCommonProps.splice(i, 1) } else i++; } } else { freeCommonProps = eFreeProps } } this.classDefinedProps = commonClass ? this.conn.getAllProps(commonClass) : {}; let ownerByOrder = [] for (let p in this.classDefinedProps) { let owner = this.classDefinedProps[p].owner let obj = ownerByOrder.find(o => o.owner == owner) let index = ownerByOrder.indexOf(obj) if (index >= 0) { ownerByOrder[index].colspan++ } else { ownerByOrder.push({ owner: owner, colspan: 1 }) } } ownerByOrder.sort((a, b) => { return a.owner.localeCompare(b.owner) }) this.classDefinedPropsColspanOwnerByOrder = ownerByOrder this.commonClass = (commonClass === null) ? '' : commonClass; this.freeProps = (freeCommonProps && freeCommonProps.length > 0) ? freeCommonProps.sort((a,b) => { return a.localeCompare(b) }) : []; this.entities = arr.length > 0 ? arr.map(e => { let data = e.data() if (e.isEdge()) { data.source = e.source().data('id') data.target = e.target().data('id') } return data }).sort((a, b) => { return a.id.localeCompare(b.id) }) : []; if (this.entities.length == 0) { this.areEdges = null } else { this.areEdges = areEdges ? true : (areVertices ? false : null); } //console.log(areEdges, areVertices, this.areEdges) console.log('selection-category.selectionListener():', this.entities) } this.selectionListener = f.bind(this) console.log('selection-category bind selection listeners') this.selection.addEventListener('itemadded', this.selectionListener) this.selection.addEventListener('itemset', this.selectionListener) this.selection.addEventListener('itemremoved', this.selectionListener) this.updateTable() }) this.selectSettings = SelectionCategoryComponent.storedSelectSettings } ngOnDestroy(): void { console.log('selection-category unbind selection listeners') this.selection.removeEventListener('itemadded', this.selectionListener) this.selection.removeEventListener('itemset', this.selectionListener) this.selection.removeEventListener('itemremoved', this.selectionListener) this.selectionListener = null } }
Emeshka/graphytica
src/app/db-service.service.ts
import { Injectable } from '@angular/core'; import { ElectronService } from 'ngx-electron'; import { BehaviorSubject } from 'rxjs'; import { SelectQuery } from './selection-category/SelectQuery'; @Injectable({ providedIn: 'root' }) export class DbServiceService { constructor( private _electronService: ElectronService) { } ////////////////////////////////////////// private fs = this._electronService.remote.require('fs'); cy = null; change: BehaviorSubject<boolean> = new BehaviorSubject(false); readonly supportedAttributes = ['type']; readonly supportedTypes = ['string', 'number', 'boolean', 'date'/*, 'time', 'datetime'*/]; private lastId = -1; classes = []; classesMap = {}; classesTree = {}; styleRules = []; export(path, data, callback, onerror): void { try { if (!data) { if (this.cy) { data = this.cy.elements().not(this.cy.$('.edge_bend_point')).jsons(); } else { data = []; } } let zoom = this.cy ? this.cy.zoom() : 1; let pan = this.cy ? this.cy.pan() : {x: 100, y: 100}; let cloneClasses = this.classes.map(c => { return { name: c.name, superClass: c.superClass, properties: c.properties } }) let styleObj = this.cy ? this.cy.style().json() : [] styleObj = styleObj.filter((entry) => entry.selector != '._gridParentPadding') console.log(cloneClasses) let fullData = { data: data, style: styleObj, lastId: this.lastId, classes: cloneClasses, styleRules: this.styleRules, zoom: zoom, pan: pan } this.fs.writeFile(path, JSON.stringify(fullData, (key, value) => { if (value !== null) return value; }), function(error) { if (error) { console.log(error); if (typeof callback == 'function') callback(null, null) } else { if (typeof callback == 'function') callback(path, { data: data, zoom: zoom, style: styleObj, styleRules: this.styleRules, pan: pan }) } }); } catch (err) { console.log(err); if (typeof callback == 'function') callback(null, null) if (onerror) onerror(err) } } import(path, merge, callback, onerror): void { try { this.fs.readFile(path, 'utf8', (e, fileContent) => { if (e) { console.log(e); if (typeof callback == 'function') callback(null, null) if (onerror) onerror(e) return; } try { let fullData = JSON.parse(fileContent); if (!fullData || !(fullData.data instanceof Array) || !(typeof fullData.lastId == 'number')) { if (typeof callback == 'function') callback(null, null) } else { if (merge) { let toRefactor = {} for (let c of fullData.classes) { if (c.name != 'V' && c.name != 'E') { if (this.classesMap[c.name]) { let newClassName = c.name while (newClassName in this.classesMap) { newClassName = c.name + '_' + (Math.floor(Math.random() * 100000)) } toRefactor[c.name] = { renameInNew: newClassName } c.name = newClassName } this.classes.push(c); } else { let oldProps = this.classesMap[c.name].properties; let newProps = c.properties; for (let p in newProps) { let newPropName = p while (newPropName in oldProps) { newPropName = p + '_' + (Math.floor(Math.random() * 100000)) } if (!toRefactor[c.name]) toRefactor[c.name] = {} if (newPropName == p) { if (!toRefactor[c.name].addPropertiesToOld) { toRefactor[c.name].addPropertiesToOld = {} } toRefactor[c.name].addPropertiesToOld[p] = '' } else { if (!toRefactor[c.name].renameProperties) { toRefactor[c.name].renameProperties = {} } toRefactor[c.name].renameProperties[p] = newPropName } oldProps[newPropName] = newProps[p] } for (let p in oldProps) { if (!(p in newProps)) { if (!toRefactor[c.name].addPropertiesToNew) { toRefactor[c.name].addPropertiesToNew = [] } toRefactor[c.name].addPropertiesToNew.push(p) } } } } //refactor new for (let e of fullData.data) { for (let cName in toRefactor) { if (e.data['class'] == cName) { let r = toRefactor[cName] if (r.renameInNew) { e.data['class'] = toRefactor[cName].renameInNew } if (r.renameProperties) { for (let p in r.renameProperties) { if (e.data[p]) { let newPropName = r.renameProperties[p] e.data[newPropName] = e.data[p] delete e.data[p]; } } } if (r.addPropertiesToNew) { for (let p of r.addPropertiesToNew) { e.data[p] = '' } } } } } //refactor old if (toRefactor['V'] && toRefactor['V'].addPropertiesToOld) { this.getDirectInstances('V').data(toRefactor['V'].addPropertiesToOld) } if (toRefactor['E'] && toRefactor['E'].addPropertiesToOld) { this.getDirectInstances('E').data(toRefactor['E'].addPropertiesToOld) } if (fullData.styleRules) this.styleRules.push(...fullData.styleRules) } else { this.lastId = fullData.lastId this.classes = fullData.classes if (fullData.styleRules) this.styleRules = fullData.styleRules } this.update(); let dateTypes = ['date', 'time', 'datetime'] for (let e of fullData.data) { for (let p in e.data) { let standard = p == 'id' || p == 'class' || p == 'parent' let standardEdges = e.group == 'edges' && (p == 'target' || p == 'source') if (standard || standardEdges || !e.data[p]) continue; //let c = this.classesMap[e.data['class']] let props = this.getAllProps(e.data['class']); //console.log(e.data.id, p, props[p]) if (props[p] && dateTypes.includes(props[p].type)) { e.data[p] = new Date(e.data[p]) } } } if (fullData.styleRules) { for (let r of fullData.styleRules) { r.condition = new SelectQuery(r.condition) this.applyStyleRule(r) } } if (typeof callback == 'function') callback(path, { data: fullData.data, style: fullData.style, zoom: fullData.zoom, pan: fullData.pan }) } } catch (err) { console.log(err); if (typeof callback == 'function') callback(null, null) if (onerror) onerror(err) } }); } catch (err) { console.log(err); if (typeof callback == 'function') callback(null, null) if (onerror) onerror(err) } } initializeNew() { this.classes = [ { name: 'V', superClass: "", properties: {} }, { name: 'E', superClass: "", properties: {} } ]; this.styleRules = [] this.update(); } private update() { function getClassMap(arr) { let map = {}, arrElem; for(let i = 0, len = arr.length; i < len; i++) { arrElem = arr[i]; map[arrElem.name] = arrElem; map[arrElem.name]['children'] = []; } return map; } function unflatten(map) { let tree = [], mappedElem; for (let id in map) { if (map.hasOwnProperty(id)) { mappedElem = map[id]; if (mappedElem.superClass) { map[mappedElem['superClass']]['children'].push(mappedElem); } else { tree.push(mappedElem); } } } return tree; } this.classesMap = getClassMap(this.classes); this.classesTree = unflatten(this.classesMap); } nextId(): string { this.lastId++; return this.lastId.toString(36); } createClass(name, superClass, properties) { if (typeof name != 'string' || typeof superClass != 'string' || !(typeof properties == 'object')) { throw `Invalid arguments for class creation: name=${name}, superClass=${superClass}, properties=${properties}` } else { if (this.classesMap[name]) { throw `Failed class creation: class ${name} exists` } if (!this.classesMap[superClass]) { throw `Failed class creation: superclass ${superClass} doesn't exist` } for (const key in properties) { properties[key].owner = name } this.classes.push({ name: name, superClass: superClass, properties: properties }) this.update(); this.change.next(true); } } getAllInstances(className) { let accum = this.getClassWithDescendants(className).map(c => c.name); let descendantsSelector = '[class = "'+accum.join('"], [class = "')+'"]'; return this.cy.$(descendantsSelector); } getDirectInstances(className) { return this.cy.$(`[class = '${className}']`) } getById(id) { return this.cy.$(`[id = '${id}']`) } getClassWithDescendants(className) { let map = this.classesMap; function step(className, accumArray) { let arr = map[className].children if (arr) { for (let c of arr) { accumArray.push(c); step(c.name, accumArray); } } } let accum = [this.classesMap[className]]; step(className, accum); return accum; } getClosestCommonAncestor(className1, className2) { let c1 = this.classesMap[className1]; let c2 = this.classesMap[className2]; if (!c1) { console.warn(`Invalid getClosestCommonAncestor() call: first class ${className1} doesn't exist`) return } if (!c2) { console.warn(`Invalid getClosestCommonAncestor() call: second class ${className2} doesn't exist`) return } let classAncestors1 = [className1].concat(this.getSuperStack(className1).map(c => c.name)) let superName2 = className2; while (superName2) { for (let i = 0; i < classAncestors1.length; i++) { if (superName2 == classAncestors1[i]) { return superName2 } } superName2 = this.classesMap[superName2].superClass; } return ''; } getAllProps(className) { let c = this.classesMap[className] if (!c) throw `Invalid getAllProps() call: class ${className} doesn't exist` let arr = [c].concat(this.getSuperStack(className)) let props = {}; for (let c of arr) { for (let p in c.properties) { props[p] = c.properties[p] } } return props; } getSuperStack(className) { let c = this.classesMap[className] if (!c) throw `Invalid getSuperStack() call: class ${className} doesn't exist` let superName = c.superClass let stack = [] while (superName) { let s = this.classesMap[superName] stack.push(s) superName = s.superClass; } return stack; } alterClass(className, params) { if (!className || !params) throw `Invalid alterClass() call: className=${className}, params=${params}` else { let c = this.classesMap[className] for (let t in params) { let changeName = (t == 'name' && params.name != className) let changeSuper = (t == 'superClass' && params.superClass != c.superClass) if ((changeName || changeSuper) && typeof params[t] == 'string') { if (className == 'V' || className == 'E') { throw `Failed class alteration: class ${className} must stay root and cannot be renamed` } if (t == 'name' && this.cy) { // done refactor /*let elements = this.cy.elements(); for (let e of elements) { if (e.data('class') == className) { e.data('class', params.name) } }*/ let elements = this.getDirectInstances(className) elements.data('class', params.name) } c[t] = params[t]; this.update(); } else if (t == 'addProperties') { let elements = this.getAllInstances(className) for (let propName in params[t]) { c.properties[propName] = params[t][propName] c.properties[propName].owner = className //elements.data(propName, '') for (let e of elements) { let oldValue = e.data(propName) if (!oldValue) { e.data('') } else { let type = c.properties[propName].type let newValue switch (type) { case 'number': newValue = oldValue*1; break; case 'string': newValue = ''+oldValue; break; case 'boolean': newValue = !!(oldValue && oldValue != 'false'); break; case 'date': newValue = new Date(oldValue); break; } if (isNaN(newValue)) { e.data('') } else { e.data(newValue) } } } } } else if (t == 'removeProperties') { for (let propName of params[t]) delete c.properties[propName] } } this.change.next(true); } } alterProperty(className, propName, params) { if (!className || !propName || !params) throw `Invalid alterProperty() call: className=${className}, propName=${propName}, params=${params}` else { let c = this.classesMap[className] let p = c.properties[propName] for (let attr in params) { if (this.supportedAttributes.includes(attr)) { p[attr] = params[attr] } else if (attr == 'name' && params.name != propName) { c.properties[params.name] = p; delete c.properties[propName]; // done refactor /*let elements = this.cy.elements(); for (let e of elements) { if (e.data('class') == className && e.data(propName)) { e.data(params.name, e.data(propName)) e.removeData(propName) } }*/ let elements = this.getAllInstances(className) for (let el of elements) { let value = el.data(propName) if (value) { el.data(params.name, value) el.removeData(propName) } } } } this.change.next(true); } } removeClass(name) { if (name == 'V' || name == 'E') { throw `Failed class removal: class ${name} cannot be removed` } let cl = this.classes.find(c => c.name == name) let index = this.classes.indexOf(cl) if (index >= 0) { let names = this.getClassWithDescendants(name).map(c => c.name); this.getAllInstances(name).data('class', cl.superClass); for (let name of names) { this.classes.splice(index, 1) cl = this.classes.find(c => c.name == name) index = this.classes.indexOf(cl) } this.update(); this.change.next(true); } else throw `Failed class removal: class ${name} doesn't exist` } applyStyleRule(settings) { const query = settings.condition const name = settings.name const then = settings.then let classStylesObj = {} for (let entry of then) { if (entry.calculator == 'equals') { classStylesObj[entry.what] = entry.value } else if (entry.calculator == 'data') { classStylesObj[entry.what] = 'data(' + entry.value + ')' } else if (entry.calculator == 'mapData') { classStylesObj[entry.what] = 'mapData(' + entry.value.join(', ') + ')' } } console.log(classStylesObj) this.cy.style().selector('.' + name).style(classStylesObj).update() let elems = query.execute(this.cy) for (let ele of elems) { ele.toggleClass(name, true) console.log(ele.classes()) } } addStyleRule(settings) { console.log(settings) if (settings.condition instanceof SelectQuery && settings.condition.tree.type == 'selector' && settings.name && settings.then instanceof Array) { this.styleRules.push(settings) this.applyStyleRule(settings) } } removeStyleRule(rule) { let index = this.styleRules.indexOf(rule) if (index >= 0) { let elems = rule.condition.execute(this.cy) for (let ele of elems) { ele.toggleClass(name, false) } this.styleRules.splice(index, 1) let currentStyle = this.cy.style().json() currentStyle.splice(currentStyle.findIndex(s => s.selector == '.'+rule.name), 1) this.cy.style().fromJson(currentStyle).update() } } }
Emeshka/graphytica
src/app/classes-category/classes-category.component.ts
<filename>src/app/classes-category/classes-category.component.ts import { Component, OnInit, Input, ViewChildren } from '@angular/core'; import { DbServiceService } from '../db-service.service'; import { ElectronService } from 'ngx-electron'; @Component({ selector: 'app-classes-category', templateUrl: './classes-category.component.html', styleUrls: ['./classes-category.component.css'] }) export class ClassesCategoryComponent implements OnInit { constructor( public conn: DbServiceService, private _electronService: ElectronService ) { } @Input() selection: any = []; public selectedClass = ''; public isEdge = false; countEntities = -1; countDirectEntities = -1; selectedDirectChildren = []; selectedFieldList = {}; fakeNewField = false; newFieldType = ''; newFieldName = ''; selectClass = (value) => { //console.log('selectClass()', value); if (value) { this.selectedFieldList = this.conn.classesMap[value].properties; this.selectedDirectChildren = this.conn.classesMap[value].children.map(cl => cl.name); this.countDirectEntities = this.conn.getDirectInstances(value).length; this.countEntities = this.conn.getAllInstances(value).length; let superStack = this.conn.getSuperStack(value).map(c => c.name); this.isEdge = superStack.includes('E') } this.selectedClass = value || ''; } addFakeField = () => { this.fakeNewField = true; } hideFakeField = () => { this.newFieldType = ''; this.newFieldName = ''; this.fakeNewField = false; } createField() { let propObj = {} propObj[this.newFieldName] = { type: this.newFieldType } this.conn.alterClass(this.selectedClass, { addProperties: propObj }) this.hideFakeField(); } setNewFieldType(t) { this.newFieldType = t; if (this.newFieldName) this.createField(); } setNewFieldName(event) { let n = event.target.value n = this.cutForbidden(this.trim(n)) if (this.isFieldNameInvalid(n)) { event.target.value = this.newFieldName } else { this.newFieldName = n if (this.newFieldType) this.createField(); } } getSelectedClass() { return this.selectedClass; } /////////////////////////////////////////////////////////////////// alterField(propName, attr, newValue) { let params = {} params[attr] = newValue; this.conn.alterProperty(this.selectedClass, propName, params); //console.log(this.conn.classesMap[this.selectedClass].properties); } alterFieldName(oldPropName, event) { //console.log('alterFieldName', oldPropName, newPropName) let newPropName = event.target.value newPropName = newPropName.trim() var element = event.target || event.srcElement || event.currentTarget; if (this.isFieldNameInvalid(newPropName)) { element.value = oldPropName } else { this.conn.alterProperty(this.selectedClass, oldPropName, {name: newPropName}) element.value = newPropName } this.clearModifiedInvalid(event) //console.log('alterFieldName', this.conn.classesMap) } alterSuperClass(event) { let newSuperClass = event.target.value newSuperClass = newSuperClass.trim() var element = event.target || event.srcElement || event.currentTarget; if (this.isNewSuperClassInvalid(newSuperClass)) { element.value = this.conn.classesMap[this.selectedClass].superClass } else { this.conn.alterClass(this.selectedClass, {superClass: newSuperClass}) element.value = newSuperClass } this.clearModifiedInvalid(event) } removeField(propName) { const choice = this._electronService.remote.dialog.showMessageBoxSync(this._electronService.remote.getCurrentWindow(), { type: 'question', buttons: ['Cancel', 'Удалить также и данные (необратимо)', 'Только убрать из модели'], title: 'Удалить поле', message: `Экземпляры класса "${this.selectedClass}" могут иметь установленные значения в поле "${propName}". Вы хотите только убрать поле "${propName}" из модели класса (данные останутся и станут свободными свойствами) или также безвозвратно стереть значения поля?` }); //console.log(choice); if (choice === 1 || choice === 2) { this.conn.alterClass(this.selectedClass, {removeProperties: [propName]}) if (choice === 1) { let classInstances = this.conn.getAllInstances(this.selectedClass); classInstances.removeData(propName); } } } //////////////////////////////////////////////////////////////////// isFieldNameColliding(propName, className) { let allProps = this.conn.getAllProps(className) if (propName in allProps) return true; let descendantsProps = this.conn.getClassWithDescendants(className).map(c => c.properties); descendantsProps = [].concat.apply([], descendantsProps); return propName in descendantsProps; } hasForbidden(propOrClassName) { /*let forbidden = ['\n', '\t', '\r', '\0'] let hasForbidden = forbidden.reduce((accum, current) => { return accum && propOrClassName.indexOf(current) >= 0 }, true) return hasForbidden*/ return propOrClassName.search(/[\n\t\r\0]/g) >= 0 } isFieldNameInvalid(propName) { //console.log(propName) propName = this.cutForbidden(this.trim(propName)) let hasForbidden = this.hasForbidden(propName) let commonForbidden = propName == 'id' || propName == 'class' || propName == 'parent' let edgesForbidden = this.isEdge && (propName == 'source' || propName == 'target') if (!propName || hasForbidden || commonForbidden || edgesForbidden) return true; let colliding = this.isFieldNameColliding(propName, this.selectedClass) return colliding; } isNewSuperClassInvalid(newSuperClass) { //console.log(newSuperClass, newSuperClass == '' || !this.conn.classesMap[newSuperClass]) newSuperClass = this.trim(newSuperClass) if (newSuperClass == '' || !this.conn.classesMap[newSuperClass]) return true; let namesArray = this.conn.getClassWithDescendants(this.selectedClass).map(c => c.name); if (namesArray.includes(newSuperClass)) return true; let thisProps = this.conn.classesMap[this.selectedClass].properties let colliding = false for (let p in thisProps) { colliding = colliding || this.isFieldNameColliding(p, newSuperClass) } return colliding } clearModifiedInvalid(event) { var element = event.target || event.srcElement || event.currentTarget; let parent = element.parentElement.parentElement; parent.className = parent.className.replace(/\s*invalid_input/g, ''); parent.className = parent.className.replace(/\s*modified_input/g, ''); } trim(string) { return string.trim().replace(/\s\s+/g, ' ') } cutForbidden(string) { string = string.replace(/[\n\r\t\0]/g, ' ') return string } checkInvalid(event, oldValue, trim, isInvalid) { var element = event.target || event.srcElement || event.currentTarget; let parent = element.parentElement.parentElement; if (element.value.includes('\n') || element.value.includes('\r')) { element.value = this.cutForbidden(element.value) if (trim) element.value = this.trim(element.value) //element.dispatchEvent(new Event('change', { 'bubbles': true })) element.blur() return; } element.value = this.cutForbidden(element.value) //console.log(oldValue, element.value, oldValue != element.value) if (trim) oldValue = this.trim(oldValue) let value = element.value if (trim) value = this.trim(value) if (oldValue != value) { if (isInvalid(value)) { //console.log('invalid') if (parent.className.indexOf('invalid_input') < 0) { if (parent.className.indexOf('modified_input') < 0) { parent.className += ' invalid_input'; } else { parent.className = parent.className.replace(/\s*modified_input/g, ' invalid_input'); } } } else { //console.log('modif') if (parent.className.indexOf('modified_input') < 0) { if (parent.className.indexOf('invalid_input') < 0) { parent.className += ' modified_input'; } else { parent.className = parent.className.replace(/\s*invalid_input/g, ' modified_input'); } } } } else { //console.log('remove') parent.className = parent.className.replace(/\s*invalid_input/g, ''); parent.className = parent.className.replace(/\s*modified_input/g, ''); } //console.log('parent css class =', parent.className, typeof parent.className, parent) } ngOnInit(): void { } }
Emeshka/graphytica
src/app/code-mirror/code-mirror.component.ts
<filename>src/app/code-mirror/code-mirror.component.ts import { Component, Input, OnInit, ViewChild, SimpleChanges, Output, EventEmitter } from '@angular/core'; import 'codemirror/mode/javascript/javascript'; import 'codemirror/mode/sql/sql'; import 'codemirror/addon/hint/show-hint'; import { SandboxFunction } from '../main-view/SandboxFunction'; @Component({ selector: 'code-mirror', templateUrl: './code-mirror.component.html', styleUrls: ['./code-mirror.component.css'] }) export class CodeMirrorComponent implements OnInit { constructor() { } @Input() value = ''; @Input() mode = 'full'; @ViewChild('ngxCodeMirror') ngxCodeMirror; @ViewChild('root') root; @Output() input = new EventEmitter<any>(); @Output() change = new EventEmitter<any>(); editor = null options = {} checkValid() { if (this.mode == 'sql') { return true; } let error = SandboxFunction.tryCreate(this.value) if (error) { this.root.nativeElement.className = 'root invalid_input' let title = `${error.name}: ${error.message}` for (let p in error) { if (p != 'stack') { title += `\n${p}: ${error[p]}` } } this.root.nativeElement.title = title return false } else { this.root.nativeElement.className = 'root' this.root.nativeElement.title = '' return true } } onInput(event) { event.stopPropagation(); if (this.mode == 'sql') { this.editor.showHint(); } if (this.checkValid()) { this.input.emit(this.value); } //let editor = this.ngxCodeMirror.codeMirror; //console.log(editor, this.value); } onChange(event) { event.stopPropagation(); if (this.checkValid()) { this.change.emit(this.value); } } ngOnChanges(changes: SimpleChanges) { if (changes.mode && changes.mode.currentValue) { if (this.mode != changes.mode.currentValue) { if (changes.mode.currentValue == 'sql') { this.editor.setOption('theme', 'default') //editor.setOption('theme', 'mdn-like') } else if (changes.mode.currentValue == 'full') { this.editor.setOption('theme', 'yonce') } } this.mode = changes.mode.currentValue } } ngOnInit(): void { if (this.mode == 'full') { this.options = { value: this.value || '', lineNumbers: true, theme: 'yonce', mode: 'javascript', matchBrackets: true } } else if (this.mode == 'sql') { let keywords = ['SELECT', 'XOR', 'OR', 'AND', 'NOT', 'WHERE', 'isSimple', 'isLoop', 'isHidden', 'degree', 'indegree', 'outDegree', 'any', 'nodes', 'edges', '.unify(', '.intersect(', '.diff(', '.openNeighborhood', '.closedNeighborhood', '.edgesWith(', '.edgesTo(', '.connectedNodes', '.connectedEdges', '.sources', '.targets', '.outgoers', '.incomers', '.successors', '.predecessors' ] this.options = { value: this.value || '', lineWrapping: true, mode: 'sql', matchBrackets: true, autofocus: true, extraKeys: {'Ctrl-Space': 'autocomplete'}, hintOptions: { completeSingle: false, completeOnSingleClick: false, hint: function(editor, options) { var cursor = editor.getCursor(), line = editor.getLine(cursor.line) var start = cursor.ch, end = cursor.ch while (start && /[\w\.]/.test(line.charAt(start - 1))) --start while (end < line.length && /[\w\.]/.test(line.charAt(end))) ++end var word = line.slice(start, end)//.toLowerCase() //console.log(`hint(): word = '${word}'`) if (word.length > 0) { let list = [] for (let keyword of keywords) { //console.log(`hint(): keyword = '${keyword}', starts: ${keyword.startsWith(word)}`) if (keyword == keyword.toUpperCase()) { if (keyword.toLowerCase().startsWith(word)) { list.push(keyword) } } else { if (keyword.startsWith(word)) { list.push(keyword) } } } //console.log(`hint(): list = '${list.join(', ')}'`) if (list.length > 0) { return { list: list, from: { ch: start, line: cursor.line },//editor.getCursor(), to: { ch: end, line: cursor.line }//editor.getCursor() } } } return null //from: CodeMirror.Pos(cursor.line, start), //to: CodeMirror.Pos(cursor.line, end)}) } } //theme: 'mdn-like' } //parserfile: '../../assets/sql_highlighting/parsesql.js', //stylesheet: '../../assets/sql_highlighting/sqlcolors.css', //path: '../../assets/sql_highlighting/js/' // } } ngAfterViewInit(){ this.editor = this.ngxCodeMirror.codeMirror; } }
Emeshka/graphytica
src/app/autosized-textarea/autosized-textarea.component.ts
import {Component, NgZone, ViewChild, Input, Output, EventEmitter} from '@angular/core'; import {take} from 'rxjs/operators'; @Component({ selector: 'autosized-textarea', templateUrl: './autosized-textarea.component.html', styleUrls: ['./autosized-textarea.component.css'] }) export class AutosizedTextareaComponent { constructor(private _ngZone: NgZone) {} @Input() value: string = ''; @Input() placeholder: string = ''; @Input() title: string = ''; @Input() autofocus: boolean = false; @Input() isMasked: boolean = true; @Input() min: number = 1; @Input() max: number = 6; }
Emeshka/graphytica
src/app/update-recent.service.ts
import { Injectable } from '@angular/core'; import { ElectronService } from 'ngx-electron'; import { BehaviorSubject } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class UpdateRecentService { constructor( private _electronService: ElectronService ) { this.readRecentProjects() } private fs = this._electronService.remote.require('fs'); private path = this._electronService.remote.require('path'); recentPathArray = []; recentPath = this.path.join(__dirname, "assets", "recent.txt"); maxRecords = 10; change: BehaviorSubject<boolean> = new BehaviorSubject(false); readRecentProjects = function() { let fileContent = '' let listOfExistingDatabases = [] try { fileContent = this.fs.readFileSync(this.recentPath, "utf8"); } catch (err) { console.log(err) this.fs.writeFile(this.recentPath, "", function(error) { if (error) console.log(error); }); } if (fileContent) { let listOfProjects = fileContent.split('\n') let n = Math.min(listOfProjects.length, 5) for (let i = 0; i<n; i++) { let projectPath = listOfProjects[i] if (projectPath) { if (!this.fs.existsSync(projectPath)) { console.log(projectPath + ' does not exist. Removing from list') continue } let index = listOfExistingDatabases.indexOf(projectPath) if (index >= 0) listOfExistingDatabases.splice(index, 1) listOfExistingDatabases.push(projectPath) } } } this.recentPathArray = listOfExistingDatabases; this.change.next(true); } updateRecentProjects = function(path) { let index = this.recentPathArray.indexOf(path) if (index >= 0) { this.recentPathArray.splice(index, 1); } else if (index < 0 && this.recentPathArray.length >= this.maxRecords) { //удалить элементы начиная с индекса maxRecent-1, в кол-ве length - maxRecent + 1 this.recentPathArray.splice(this.maxRecords - 1, this.recentPathArray.length - this.maxRecords + 1); } this.recentPathArray.unshift(path); this.change.next(true); this.fs.writeFile(this.recentPath, this.recentPathArray.join('\n') + '\n', function(error) { if (error) console.log(error); }); } removeFromList = function(path) { let index = this.recentPathArray.indexOf(path) if (index >= 0) { this.recentPathArray.splice(index, 1); this.change.next(true); this.fs.writeFile(this.recentPath, this.recentPathArray.join('\n') + '\n', function(error) { if (error) console.log(error); }); } } }
Emeshka/graphytica
src/app/filepath-selector/filepath-selector.component.ts
<filename>src/app/filepath-selector/filepath-selector.component.ts import { Component, OnInit, Input } from '@angular/core'; import { ElectronService } from 'ngx-electron'; import { LastDirectoryService } from '../last-directory.service'; @Component({ selector: 'app-filepath-selector', templateUrl: './filepath-selector.component.html', styleUrls: ['./filepath-selector.component.css'] }) export class FilepathSelectorComponent implements OnInit { constructor( private _electronService: ElectronService, private _lastDirectoryService: LastDirectoryService) {} ngOnInit(): void { } @Input() callback: (result) => {}; @Input() selectFolders: boolean; @Input() multiselection: boolean; paths = []; notValidatingPaths = []; errorMessage = ''; touched = false; private separator = this._electronService.remote.require('path').sep; openClickListener() { this.touched = true; const remote = this._electronService.remote; //console.log('lastdir:', this._lastDirectoryService.value); let options = []; options.push(this.selectFolders ? 'openDirectory' : 'openFile'); if (this.multiselection) options.push('multiSelections'); remote.dialog .showOpenDialog(remote.getCurrentWindow(), { title: 'Выберите '+(this.selectFolders ? (this.multiselection ? 'папки' : 'папку') : (this.multiselection ? 'файлы' : 'файл')), properties: options, defaultPath: this._lastDirectoryService.value || remote.app.getPath('documents') || remote.app.getPath('home') || ".", }) .then((result) => { if (result && result.filePaths && result.filePaths[0]) { //console.log('result.filePaths:', result.filePaths) let path = result.filePaths[0]; this._lastDirectoryService.value = path.substring(0, path.lastIndexOf(this.separator)); this.callback(result.filePaths); this.paths = result.filePaths; this.errorMessage = ''; this.notValidatingPaths = result.filePaths; } }); } openEnterListener(event) { if (event.key == 'Enter') this.openClickListener(); } inputValue() { if (this.multiselection) return this.notValidatingPaths.map((e) => '"'+e+'"').join(', '); else if (this.notValidatingPaths[0]) return this.notValidatingPaths[0]; else return ''; } private isValidFSPath(p) { if (!p) return true; let regexp; switch (process.platform) { //case 'darwin': - не знаю насчет того буду ли я собирать под мак case 'win32': regexp = /^[A-Z]\:[^"\?><\|:\*\000-\031]*$/; break; default: regexp = /^\/[^\000]*$/; break; } return regexp.test(p); } private isASCII(p) { if (!p) return true; let regexp; switch (process.platform) { //case 'darwin': - не знаю насчет того буду ли я собирать под мак case 'win32': regexp = /^[A-Z]\:[^"\?><\|:\*\000-\031]*$/; break; default: regexp = /^\/[^\000]*$/; break; } return regexp.test(p); } updatePaths(value) { this.touched = true; //https://stackoverflow.com/questions/18893390/splitting-on-comma-outside-quotes let p = value.split(',(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)'); //console.log(`updatePaths: splitted = ${p}, instanceof Array: ${p instanceof Array}`, p); //if (!(p instanceof Array)) p = [p]; //если надо выбрать один файл, то кавычки необязательны, и из this.paths их удаляем если они есть //if (!this.multiselection && p[0].startsWith('"') && p[0].endsWith('"')) p[0] = p[0].substring(1, p[0].length-1); for (let i = 0; i<p.length; i++) { //let pathNoQuotes = p[i]; //console.log('updatePaths:', p[i]) //if (p[i].startsWith('"') && p[i].endsWith('"')) p[i] = p[i].substring(1, p[i].length-1); if (!this.isValidFSPath(p[i])) { this.errorMessage = 'Путь ' + p[i] + ' недопустим в вашей операционной системе.'; this.callback(['']); this.paths = []; return; } else if (!this.isValidFSPath(p[i])) { this.errorMessage = 'Путь к файлу должен.'; this.callback(['']); this.paths = []; return; } else this.errorMessage = ''; } this.callback(p); this.paths = p; this.notValidatingPaths = p; //console.log(`updatePaths: this.paths = ${this.paths}`) } }
Emeshka/graphytica
src/app/selection-category/SelectQuery.ts
<reponame>Emeshka/graphytica /* Коллекция без дубликатов с сохранением порядка элементов и доступом по индексу с событиями на добавление, удаление и замену элемента */ export class SelectQuery { public static readonly operators = [ { name: '.unify', //regex: /(\d+)\.unify\((\d+)\)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.unify' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, accepts: 'any', returns: 'any', tip: 'a1.unify(a2)\nОбъединить коллекцию элементов a1 и коллекцию элементов a2', call: (args) => { return args[0].value.union(args[1].value) } }, { name: '.diff', //regex: /(\d+)\.diff\((\d+)\)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.diff' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, accepts: 'any', returns: 'any', tip: 'a1.diff(a2)\nВычесть коллекцию элементов a2 из коллекции элементов a1', call: (args) => { return args[0].value.difference(args[1]) } }, { name: '.intersect', //regex: /(\d+)\.intersect\((\d+)\)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.intersect' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, accepts: 'any', returns: 'any', tip: 'a1.intersect(a2)\nПересечь коллекцию элементов a1 с коллекцией элементов a2', call: (args) => { return args[0].value.intersection(args[1].value) } }, { name: '.openNeighborhood', //regex: /(\d+)\.openNeighborhood/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.openNeighborhood') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'any', returns: 'any', tip: 'a1.openNeighborhood\nПолучить для коллекции a1 соседние элементы (вершины и ребра, соединяющие a1 с ними)', call: (args) => { return args[0].value.openNeighborhood() } }, { name: '.closedNeighborhood', //regex: /(\d+)\.closedNeighborhood/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.closedNeighborhood') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'any', returns: 'any', tip: 'a1.closedNeighborhood\nПолучить для коллекции a1 соседние элементы (вершины и ребра, соединяющие a1 с ними), включая саму коллекцию a1', call: (args) => { return args[0].value.closedNeighborhood() } }, { name: '.edgesWith', //regex: /(\d+)\.edgesWith\((\d+)\)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.edgesWith' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, accepts: 'nodes', returns: 'edges', tip: 'n1.edgesWith(n2)\nПолучить ребра, связывающие коллекции вершин n1 и n2 (направление неважно)', call: (args) => { return args[0].value.edgesWith(args[1].value) } }, { name: '.edgesTo', //regex: /(\d+)\.edgesTo\((\d+)\)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.edgesTo' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, accepts: 'nodes', returns: 'edges', tip: 'n1.edgesTo(n2)\nПолучить ребра, непосредственно выходящие из вершин коллекции n1 и входящие в ребра коллекции n2', call: (args) => { return args[0].value.edgesTo(args[1].value) } }, { name: '.connectedNodes', //regex: /(\d+)\.connectedNodes/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.connectedNodes') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'edges', returns: 'nodes', tip: 'e1.connectedNodes\nПолучить вершины, являющиеся началами и концами ребер коллекции e1', call: (args) => { return args[0].value.connectedNodes() } }, { name: '.connectedEdges', //regex: /(\d+)\.connectedEdges/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.connectedEdges') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'nodes', returns: 'edges', tip: 'n1.connectedEdges\nПолучить ребра непосредственно входящие и выходящие из вершин коллекции n1', call: (args) => { return args[0].value.connectedEdges() } }, { name: '.sources', //regex: /(\d+)\.sources/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.sources') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'edges', returns: 'nodes', tip: 'e1.sources\nПолучить начала ребер колекции e1', call: (args) => { return args[0].value.sources() } }, { name: '.targets', //regex: /(\d+)\.targets/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.targets') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'edges', returns: 'nodes', tip: 'e1.targets\nПолучить концы ребер коллекции e1', call: (args) => { return args[0].value.targets() } }, { name: '.outgoers', //regex: /(\d+)\.outgoers/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.outgoers') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'nodes', returns: 'edges', tip: 'n1.outgoers\nПолучить ребра, непосредственно выходящие из вершин коллекции n1', call: (args) => { return args[0].value.outgoers() } }, { name: '.successors', //regex: /(\d+)\.successors/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.successors') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'nodes', returns: 'edges', tip: 'n1.successors\nПолучить все ребра, выходящие из вершин коллекции n1 (как рекурсивный вызов outgoers)', call: (args) => { return args[0].value.successors() } }, { name: '.incomers', //regex: /(\d+)\.incomers/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.incomers') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'nodes', returns: 'edges', tip: 'n1.incomers\nПолучить ребра, непосредственно входящие в вершины коллекции n1', call: (args) => { return args[0].value.incomers() } }, { name: '.predecessors', //regex: /(\d+)\.predecessors/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.predecessors') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'nodes', returns: 'edges', tip: 'n1.predecessors\nПолучить все ребра, входящие в вершины коллекции n1 (как рекурсивный вызов incomers)', call: (args) => { return args[0].value.predecessors() } }, { name: '.roots', //regex: /(\d+)\.roots/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.roots') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'nodes', returns: 'nodes', tip: 'n1.roots\nИз коллекции вершин n1 оставить лишь корни (вершины без входящих ребер)', call: (args) => { return args[0].value.roots() } }, { name: '.leaves', //regex: /(\d+)\.leaves/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '.leaves') { return { str: o1 + ' ' + o2, args: [Number(o1)] } } else return null; }, accepts: 'nodes', returns: 'nodes', tip: 'n1.leaves\nИз коллекции вершин n1 оставить лишь листья (вершины без выходящих ребер)', call: (args) => { return args[0].value.leaves() } } ] // infix, prefix, postfix private static readonly primitiveOperators = [ { name: '*', style: 'infix', //regex: /([a-z]+) = ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '*' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a * b\nУмножение a и b', call: (args) => { return args[0].value * args[1].value } }, { name: '/', style: 'infix', //regex: /([a-z]+) = ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '/' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a / b\nДеление a на b', call: (args) => { return args[0].value / args[1].value } }, { name: '+', style: 'infix', //regex: /([a-z]+) = ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '+' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a + b\nСложение a и b, если она оба - числа. Конкатенация строк, если первый операнд - строка', call: (args) => { return args[0].value + args[1].value } }, { name: '-', style: 'infix', //regex: /([a-z]+) = ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '-' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a - b\nВычитание b из a', call: (args) => { return args[0].value - args[1].value } }, { name: '=', style: 'infix', //regex: /([a-z]+) = ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '=' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a = b\nТочное равенство a и b (Javascript: a === b) (см. стандарт ECMAScript 2015)', call: (args) => { return args[0].value === args[1].value } }, { name: '<', style: 'infix', //regex: /([a-z]+) < ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '<' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a < b\na меньше b', call: (args) => { return args[0].value < args[1].value } }, { name: '>', style: 'infix', //regex: /([a-z]+) > ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == '>' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a > b\na больше b', call: (args) => { return args[0].value > args[1].value } }, { name: 'NOT', style: 'prefix', //regex: /NOT ([a-z]+)/g, check: (o1, o2, o3) => { if (o1 == 'NOT' && !isNaN(Number(o2))) { return { str: o1 + ' ' + o2, args: [Number(o2)] } } else return null; }, tip: 'NOT a\nОтрицание условия a', call: (args) => { return !args[0].value } }, { name: 'AND', style: 'infix', //regex: /([a-z]+) AND ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == 'AND' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a AND b\na и b истина одновременно', call: (args) => { return !!(args[0].value && args[1].value) } }, { name: 'XOR', style: 'infix', //regex: /([a-z]+) XOR ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == 'XOR' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a XOR b\nИстина либо a, либо b, но не одновременно', call: (args) => { return !!(!args[0].value && args[1].value || args[0].value && !args[1].value) } }, { name: 'OR', style: 'infix', //regex: /([a-z]+) OR ([a-z]+)/g, check: (o1, o2, o3) => { if (!isNaN(Number(o1)) && o2 == 'OR' && !isNaN(Number(o3))) { return { str: o1 + ' ' + o2 + ' ' + o3, args: [Number(o1), Number(o3)] } } else return null; }, tip: 'a OR b\nИстина a или b или оба одновременно', call: (args) => { return !!(args[0].value || args[1].value) } } ] private static readonly dataExtractors = { isSimple: { accepts: 'edges', tip: 'Проверяет, является ли ребро простым (начальная и конечная вершины разные)', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.isSimple() } }, isLoop: { accepts: 'edges', tip: 'Проверяет, является ли ребро петлей (начальная и конечная вершины одинаковы)', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.isLoop() } }, isHidden: { accepts: 'any', tip: 'Проверяет, является ли элемент скрытым (позволяет исключить из поиска элементы, которые вы сделали невидимыми)', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.hasClass('hidden') } }, isLocked: { accepts: 'nodes', tip: 'Проверяет, является ли вершина заблокированной от перемещения', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.locked() } }, isSelected: { accepts: 'any', tip: 'Проверяет, входит ли элемент в выделение на момент перед началом запроса (позволяет задать стиль выделенным элементам)', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.selected() } }, degree: { accepts: 'nodes', tip: 'Возвращает степень вершины (количество входящих и выходящих ребер)', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.degree() } }, inDegree: { accepts: 'nodes', tip: 'Возвращает количество входящих ребер', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.inDegree() } }, outDegree: { accepts: 'nodes', tip: 'Возвращает количество выходящих ребер', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.outDegree() } } } private static readonly elementTypeTitles = { any: 'any\nВыбирать любые элементы, вершины или ребра', nodes: 'nodes\nВыбирать вершины', edges: 'edges\nВыбирать ребра' } /* ----------------------------------------------------------------------------------------------- */ selectors = [] operations = [] strQuery = '' tree:any = {} errors = [] /* this.operations[operationIndex] = { type: 'selector', str: lexems[start] + ' ' + lexems[start + 1] + ' ' + lexems[start + 2] + ' ' + lexems[start + 3], returns: lexems[start + 1], condition: b,//lexems[start + 3], title: 'sdsdsd', value: null } this.selectors[b][variableNextIndex] = { type: 'condition', str: found.str, args: found.args, name: po.name, style: po.style, title: po.tip, calc: po.call.bind(this, this.selectors[b], args), value: null } this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: `'${buffer}'`, variableType: '', title: 'dddd', get: (cytoscapeSingleElement) => { return stringConstantCopy }, value: null } this.operations[operationIndex] = { type: 'collectionOperation', str: found.str, args: found.args, name: o.name, title: o.tip, calc: o.call.bind(this, this.operations, args), value: null } */ checkElement(cytoscapeSingleElement) { // if tree is selector, check if argument satisfies the conditions if (this.tree.type != 'selector') return false; let result = true if (this.tree.returns == 'nodes') result = result && cytoscapeSingleElement.isNode(); else if (this.tree.returns == 'edges') result = result && cytoscapeSingleElement.isEdge(); if (this.tree.condition === null || !result) return result; let conditions = this.tree.condition for (let condition of conditions) { if (condition.type == 'variable') { condition.value = condition.get(cytoscapeSingleElement) } else if (condition.type == 'condition') { condition.value = condition.calc() } } let finalCondition = conditions[conditions.length - 1] return finalCondition.value } execute(cytoscape) { //by design of parsing operations and conditions in each of selectors go in order of possibility to calculate for (let o of this.operations) { if (o.type == 'selector') { if (o.returns == 'nodes') { o.value = cytoscape.nodes() } else if (o.returns == 'edges') { o.value = cytoscape.edges() } else if (o.returns == 'any') { o.value = cytoscape.elements() } if (o.condition !== null) { let conditions = o.condition o.value = o.value.filter(function(ele, i, eles) { for (let condition of conditions) { if (condition.type == 'variable') { condition.value = condition.get(ele) } else if (condition.type == 'condition') { condition.value = condition.calc() } } let finalCondition = conditions[conditions.length - 1] return finalCondition.value }) } } else if (o.type == 'collectionOperation') { o.value = o.calc() } } return this.tree.value } toJSON() { return this.strQuery } constructor(query: string) { this.strQuery = query if (!query) { console.warn(`SelectQuery constructor: provided empty query: ${query}`) //this.errors.push(`Provided empty query.`) this.errors.push(`Запрос пуст.`) return } const collectionOperators = SelectQuery.operators.map(o => o.name) const primitiveOperators = SelectQuery.primitiveOperators.map(o => o.name) const extractors = SelectQuery.dataExtractors let lexems = [] let buffer = '', ch = '' let parenthesisCount = 0 let isFieldNameOpened = false, isStringOpened = false let rootSelectParenthesisCount = -1 let waitingForSelectType = false, waitingForWhere = false, waitingForCondition = false let currentSelectType = '' let selectBoundaries = [] let variableIndex = 0, selectorIndex = -1 for (let k = 0; k < query.length; k++) { ch = query[k] if (!isFieldNameOpened && !isStringOpened) { //we are outside if (ch.search(/[\s\(\)\'\`]/) >= 0 || k == query.length-1) { //got space, quote or parenthesis, check buffer if (k == query.length-1 && ch.search(/[\s\(\)\'\`]/) < 0) { buffer = buffer + ch } if (buffer.length > 0) { console.log('buffer:', buffer) let isKeyword = false if (waitingForCondition) { isKeyword = primitiveOperators.includes(buffer.toUpperCase()) } else if (!waitingForSelectType && !waitingForWhere && !waitingForCondition) { isKeyword = collectionOperators.includes(buffer) } if (isKeyword) { lexems.push(buffer) } else { //not listed in keywords, maybe SELECT, WHERE, nodes, edges, any, isSimple, isLoop or isHidden? console.log('not keyword') if (buffer.toUpperCase() == 'SELECT') { console.log('recognized SELECT') if (waitingForSelectType || waitingForWhere || waitingForCondition) { //this.errors.push(`Unexpected SELECT keyword at ${k - 6}. Nested SELECT queries aren't supported.`) this.errors.push(`Непредвиденное ключевое слово SELECT на позиции ${k - 6}. Вложенные SELECT-запросы не поддерживаются.`) } else if (k == query.length-1) { //this.errors.push(`Unexpected end of query after SELECT keyword at ${k}.`) this.errors.push(`Неожиданный конец запроса после ключевого слова SELECT на позиции ${k}.`) } else { if (ch.search(/\(\)\'\`/) >= 0) { //this.errors.push(`Unexpected ${ch} at ${k} after SELECT keyword. An element type (nodes/edges/any) was expected.`) this.errors.push(`Неожиданный символ ${ch} на позиции ${k} после ключевого слова SELECT. Ожидался тип элементов (nodes/edges/any).`) } else { lexems.push(buffer.toUpperCase()) rootSelectParenthesisCount = parenthesisCount waitingForSelectType = true selectBoundaries.push({}) selectBoundaries[selectBoundaries.length - 1].start = lexems.length - 1 this.selectors.push([]) selectorIndex++ variableIndex = 0 } } } else if (buffer.toUpperCase() == 'WHERE') { console.log('recognized WHERE') if (waitingForWhere) { if (ch == ')') { //this.errors.push(`Unexpected closing parenthesis ) at ${k} after WHERE keyword. A condition was expected.`) this.errors.push(`Неожиданная закрывающая скобка ) на позиции ${k} после ключевого слова WHERE. Ожидалось условие.`) } else if (k == query.length-1) { ///this.errors.push(`Unexpected end of query after WHERE keyword at ${k}.`) this.errors.push(`Неожиданный конец запроса после ключевого слова WHERE на позиции ${k}.`) } else { lexems.push(buffer.toUpperCase()) waitingForWhere = false waitingForCondition = true } } else { if (waitingForCondition) { //this.errors.push(`Unexpected WHERE keyword at ${k - 5}. It was already used in this SELECT query.`) this.errors.push(`Непредвиденное ключевое слово WHERE на позиции ${k - 5}. Оно было уже использовано в этом SELECT-запросе.`) } else if (waitingForSelectType) { //this.errors.push(`Unexpected WHERE keyword at ${k - 5}. An element type (nodes/edges/any) was expected.`) this.errors.push(`Непредвиденное ключевое слово WHERE на позиции ${k - 5}. Ожидался тип элементов (nodes/edges/any).`) } else { //this.errors.push(`Unexpected WHERE keyword at ${k - 5}. SELECT query wasn't opened.`) this.errors.push(`Непредвиденное ключевое слово WHERE на позиции ${k - 5} вне SELECT-запроса.`) } } } else if (buffer == 'nodes' || buffer == 'edges' || buffer == 'any') { console.log('recognized type of elements') if (waitingForSelectType) { if (ch.search(/\'\`\(/) >= 0) { //this.errors.push(`Unexpected ${ch} at ${k} after element type ${buffer}. Either an end of SELECT query (with closing parenthesis ) ) or a WHERE keyword was expected.`) this.errors.push(`Неожиданный символ ${ch} на позиции ${k} после типа элементов ${buffer}. Ожидался либо конец SELECT-запроса (с помощью закрывающей скобки ) ) или ключевое слово WHERE.`) } else { lexems.push(buffer) currentSelectType = buffer waitingForSelectType = false waitingForWhere = true } } else { if (waitingForWhere || waitingForCondition) { //this.errors.push(`Unexpected ${buffer} keyword at ${k - buffer.length}. SELECT query already got an elements' type.`) this.errors.push(`Непредвиденное ключевое слово ${buffer} на позиции ${k - buffer.length}. В этом SELECT-запросе уже задан тип элементов.`) } else { //this.errors.push(`Unexpected ${buffer} keyword at ${k - buffer.length}. SELECT query wasn't opened.`) this.errors.push(`Непредвиденное ключевое слово ${buffer} на позиции ${k - buffer.length} вне SELECT-запроса.`) } } } else if (buffer in extractors) { console.log('recognized extractor') if (waitingForCondition) { let extractor = extractors[buffer] if (currentSelectType != extractor.accepts && extractor.accepts != 'any') { //this.errors.push(`Invalid ${buffer} metadata property check at ${k - buffer.length}. You select elements of type ${currentSelectType}, while ${buffer} is only valid for type ${extractor.accepts}.`) this.errors.push(`Неверная проверка метаданных ${buffer} на позиции ${k - buffer.length}. Этот SELECT-запрос выбирает элементы типа ${currentSelectType}, но ${buffer} проверяет только элементы типа ${extractor.accepts}.`) } this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: buffer, variableType: 'extractor', get: extractor.get, title: `${buffer}\n${extractor.tip}`, value: null } lexems.push(variableIndex) variableIndex++ } else { if (waitingForSelectType || waitingForWhere) { //this.errors.push(`Unexpected ${buffer} metadata property check at ${k - buffer.length}. It's only allowed in conditions after WHERE keyword.`) this.errors.push(`Неверная проверка метаданных ${buffer} на позиции ${k - buffer.length}. Они разрешены только после ключевого слова WHERE.`) } else { //this.errors.push(`Unexpected ${buffer} metadata property check at ${k - buffer.length}. SELECT query wasn't opened.`) this.errors.push(`Неверная проверка метаданных ${buffer} на позиции ${k - buffer.length} вне SELECT-запроса.`) } } } else if (!isNaN(Number(buffer))) { console.log('recognized number constant') let numberConstantCopy = Number(buffer) this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: buffer, variableType: 'number', get: (cytoscapeSingleElement) => { return numberConstantCopy }, title: `${buffer}\nЧисловая константа.${ (buffer == '0' || buffer == '1') ? ' NB: 0 и 1 не эквивалентны логическим FALSE и TRUE' : '' }`, value: null } lexems.push(variableIndex) variableIndex++ } else if (buffer.toUpperCase() == 'TRUE') { console.log('recognized TRUE') this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: 'TRUE', variableType: 'boolean', get: (cytoscapeSingleElement) => { return true }, title: 'TRUE\nЛогическая константа TRUE (истина). NB: числовая константа 1 не эквивалентна TRUE', value: null } lexems.push(variableIndex) variableIndex++ } else if (buffer.toUpperCase() == 'FALSE') { console.log('recognized FALSE') this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: 'FALSE', variableType: 'boolean', get: (cytoscapeSingleElement) => { return false }, title: 'FALSE\nЛогическая константа FALSE (истина). NB: числовая константа 0 не эквивалентна FALSE', value: null } lexems.push(variableIndex) variableIndex++ /*} else if (buffer.toUpperCase() == 'NULL') { console.log('recognized NULL') this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: 'NULL', get: (cytoscapeSingleElement) => { return null }, title: `NULL\nКонстанта null. Обратите внимание, что null не равно пустому полю. Пустое поле (Javascript: null) (см. стандарт ECMAScript 2015)`, value: null } lexems.push(variableIndex) variableIndex++*/ } else { //this.errors.push(`Unknown keyword ${buffer} at ${k - buffer.length}`) this.errors.push(`Неизвестное ключевое слово ${buffer} на позиции ${k - buffer.length}`) } } buffer = '' } if (ch.search(/[\(\)\'\`]/) >= 0 || k == query.length-1) { //not a space if (ch == '(') { lexems.push(ch) parenthesisCount++ } else if (ch == ')' || k == query.length-1) { if (ch == ')') { lexems.push(ch) parenthesisCount-- if (parenthesisCount < 0) { //this.errors.push(`Unmatched closing parenthesis at ${k}`) this.errors.push(`Непарная закрывающая скобка на позиции ${k}`) } } if (parenthesisCount < rootSelectParenthesisCount || k == query.length-1) { //with this ) we finished a SELECT query console.log('end of lexem with char = ', ch, ', query end =', k == query.length-1) if (k == query.length-1 && ch.search(/[\(\)\'\`]/) < 0) { selectBoundaries[selectBoundaries.length - 1].end = lexems.length } else { selectBoundaries[selectBoundaries.length - 1].end = lexems.length - 1 } rootSelectParenthesisCount = -1 currentSelectType = '' waitingForCondition = false waitingForWhere = false } } else if (ch == '\'') { //with this ' string constant is opened isStringOpened = true } else if (ch == '\`') { //with this ` string constant is opened isFieldNameOpened = true } } } else { //not a special character buffer += ch } } else if (isFieldNameOpened) { //we are inside field name if (ch == '`') { if (query[k+1] == '`') { k = k + 1 buffer += '`' } else { let fieldNameCopy = buffer this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: `\`${buffer}\``, variableType: 'property', get: (cytoscapeSingleElement) => { return cytoscapeSingleElement.data(fieldNameCopy) }, title: `\`${buffer}\`\nИмя поля класса или свободного свойства выбираемых элементов`, value: null } lexems.push(variableIndex) variableIndex++ isFieldNameOpened = false buffer = '' } } else { buffer += ch } if (k == query.length-1) { //with this ) we finished a SELECT query console.log('end of lexem with char = ', ch, ', query end =', k == query.length-1) selectBoundaries[selectBoundaries.length - 1].end = lexems.length rootSelectParenthesisCount = -1 currentSelectType = '' waitingForCondition = false waitingForWhere = false } } else if (isStringOpened) { //we are inside string constant if (ch == '\'') { if (query[k+1] == '\'') { k = k + 1 buffer += '\'' } else { if (!isNaN(new Date(buffer).getTime())) { //create constant date variable let date = new Date(buffer) this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: `'${buffer}'`, variableType: 'date', get: (cytoscapeSingleElement) => { return date }, title: `'${buffer}'\nКонстанта типа дата-время`, value: null } lexems.push(variableIndex) variableIndex++ isStringOpened = false buffer = '' } else { //create constant string variable let stringConstantCopy = buffer this.selectors[selectorIndex][variableIndex] = { type: 'variable', str: `'${buffer}'`, variableType: 'string', get: (cytoscapeSingleElement) => { return stringConstantCopy }, title: `'${buffer}'\nСтроковая константа`, value: null } lexems.push(variableIndex) variableIndex++ isStringOpened = false buffer = '' } } } else { buffer += ch } if (k == query.length-1) { //with this ) we finished a SELECT query console.log('end of lexem with char = ', ch, ', query end =', k == query.length-1) selectBoundaries[selectBoundaries.length - 1].end = lexems.length rootSelectParenthesisCount = -1 currentSelectType = '' waitingForCondition = false waitingForWhere = false } } } if (parenthesisCount > 0) { //this.errors.push(`Totally ${parenthesisCount} unmatched opening parenthesis.`) this.errors.push(`Всего ${parenthesisCount} непарных открывающих скобок.`) } else if (parenthesisCount < 0) { //this.errors.push(`Totally ${-parenthesisCount} unmatched closing parenthesis.`) this.errors.push(`Всего ${-parenthesisCount} непарных закрывающих скобок.`) } if (isStringOpened) { //this.errors.push(`Missing closing quote \' for a string or date constant.`) this.errors.push(`Пропущена закрывающая кавычка \' для строковой константы или даты.`) } if (isFieldNameOpened) { //this.errors.push(`Missing closing backquote \` for a field or free property name.`) this.errors.push(`Пропущен закрывающий обратный апостроф \` для имени поля или свободного свойства.`) } /* ---------------------------------------- Build relational queries trees ---------------------------------------- */ console.log(`strQuery: ${query}, selectors: `, this.selectors, '; lexems:', lexems); let operationIndex = 0 let shift = 0 for (let b = 0; b < selectBoundaries.length; b++) { let bounds = selectBoundaries[b] let previousSelectLength = 0 let start = bounds.start - shift let end = bounds.end - shift console.log(`Start simplifying SELECT at ${b}, start = ${start}, end = ${end}`) while ((end - start > 0) && (previousSelectLength != end - start)) { console.log(`not simplified yet. start = ${start}, end = ${end}, previousSelectLength = ${previousSelectLength} lexems = `, lexems) previousSelectLength = end - start if (previousSelectLength == 2) { console.log(`pushing short select at ${operationIndex}`) //let variableNextIndex = this.selectors[b].length operationIndex = b this.operations[operationIndex] = { type: 'selector', str: lexems[start] + ' ' + lexems[end - 1], returns: lexems[end - 1], condition: null, title: SelectQuery.elementTypeTitles[lexems[end - 1]], value: true } lexems.splice(start, 2, operationIndex) shift += 1 } else if (previousSelectLength == 4) { console.log(`pushing select with condition at ${operationIndex}`) //let variableNextIndex = this.selectors[b].length operationIndex = b this.operations[operationIndex] = { type: 'selector', str: lexems[start] + ' ' + lexems[start + 1] + ' ' + lexems[start + 2] + ' ' + lexems[start + 3], returns: lexems[start + 1], //condition: b,//lexems[start + 3], title: SelectQuery.elementTypeTitles[lexems[start + 1]], condition: this.selectors[b], value: null } lexems.splice(start, 4, operationIndex) shift += 3 } else { //simplify condition for (let po of SelectQuery.primitiveOperators) { for (let i = start + 1; i < end; i++) { console.log(`simplify condition. i = ${i}`, '; lexems: ', lexems) // (.) (*) (.); (.) (*) _ console.log(`check ${lexems[i]} for ${po.name}`) let found = null if (i == end - 1) { // operators like isNaN a, NOT a at the end of query found = po.check(lexems[i-1], lexems[i], null) } else { found = po.check(lexems[i-1], lexems[i], lexems[i+1]) } if (found) { let variableNextIndex = this.selectors[b].length let args = found.args.map(index => this.selectors[b][index]) this.selectors[b][variableNextIndex] = { type: 'condition', str: found.str, args: args, name: po.name, style: po.style, title: po.tip, calc: po.call.bind(this, args), value: null } lexems.splice(i-1, found.args.length+1, variableNextIndex) shift += found.args.length end = end - found.args.length i = i - found.args.length } if (lexems[i-1] == '(' && !isNaN(Number(lexems[i])) && lexems[i+1] == ')') { let id = lexems[i] lexems.splice(i-1, 3, id) shift += 2 end = end - 2 i = i - 2 } } } } } } console.log('\n---------------------\nFinished tree of SELECTs. lexems:', lexems, ' ; operations:', this.operations, '; selectors:', this.selectors); /* ----------------------------------- Build collection operations tree ------------------------------------- */ operationIndex++; let previousLexemsLength = 0 while (lexems.length != previousLexemsLength) { previousLexemsLength = lexems.length //simplify operation for (let i = 1; i < lexems.length; i++) { // (.) (*) (.); (.) (*) _ for (let o of SelectQuery.operators) { let found = null if (i == lexems.length - 1) { // operators like isNaN a, NOT a at the end of query found = o.check(lexems[i-1], lexems[i], null) } else { found = o.check(lexems[i-1], lexems[i], lexems[i+1]) } if (found) { let args = found.args.map(index => this.operations[index]) if (o.accepts != 'any') { if (!args.every(a => a.returns == o.accepts)) { //this.errors.push(`Type mismatch in ${found.str}. Operator ${o.name} accepts elements type ${o.accepts}, while arguments are of type ${args.map(a => a.returns)}`) this.errors.push(`Несовпадение типов в ${found.str}. Оператор ${o.name} принимает тип элементов ${o.accepts}, но аргументы имеют типы ${args.map(a => a.returns)}`) } } this.operations[operationIndex] = { type: 'collectionOperation', str: found.str, args: args, name: o.name, title: o.tip, calc: o.call.bind(this, args), value: null } lexems.splice(i-1, found.args.length + 1, operationIndex) i = i - found.args.length operationIndex++ } } if (lexems[i-1] == '(' && !isNaN(Number(lexems[i])) && lexems[i+1] == ')') { let id = lexems[i] lexems.splice(i-1, 3, id) i = i - 2 } } } if (this.operations.length >= 1) { this.tree = this.operations[this.operations.length - 1] } else { console.warn('SelectQuery: no operations in query') //this.errors.push(`No operations found in query`) this.errors.push(`В запросе не найдено ни одной операции.`) } console.log('Finished. lexems:', lexems, '; operations:', this.operations, '; tree:', this.tree, '; selectors:', this.selectors, '; errors:', this.errors); } }
Emeshka/graphytica
src/app/filepath-selector/filepath-selector.component.spec.ts
<filename>src/app/filepath-selector/filepath-selector.component.spec.ts import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FilepathSelectorComponent } from './filepath-selector.component'; describe('FilepathSelectorComponent', () => { let component: FilepathSelectorComponent; let fixture: ComponentFixture<FilepathSelectorComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [ FilepathSelectorComponent ] }) .compileComponents(); }); beforeEach(() => { fixture = TestBed.createComponent(FilepathSelectorComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
Emeshka/graphytica
src/app/tile-button/tile-button.component.ts
import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'app-tile-button', templateUrl: './tile-button.component.html', styleUrls: ['./tile-button.component.css', '../tile-button-styles.css'] }) export class TileButtonComponent implements OnInit { constructor() { } ngOnInit(): void { } @Input() text: string = ''; @Input() iconSrc: string = ''; @Input() disabled : any = false; @Input() callback: () => {}; get isDisabled() { if (typeof this.disabled == 'function') return this.disabled(); else return !!this.disabled; } action = () => { if (!this.isDisabled) this.callback(); } }
guoshuangyang/images-editor
src/imagesEditor.ts
/** * @description 入口文件 * @author yyy <<EMAIL>> */ import imagesEditor from './editor' // 非浏览器不可用 try { document } catch (ex) { throw new Error('请在浏览器环境下运行') } export default imagesEditor
guoshuangyang/images-editor
src/types/index.d.ts
<reponame>guoshuangyang/images-editor /** * @param image 必要的参数,图片 * @param x 绘制的x坐标位置 * @param y 绘制的y坐标的开始 * @param w 绘制的宽度 * @param h 绘制图片的高度 */ interface Options { image: CanvasImageSource; x?: number; y?: number; w?: number; h?: number; shape?: string; eventStatus?: number; } /** * borderColor 边框的颜色 * borderStyle 边框的类型 * fillColor 绘制的填充色 * textColor 文字颜色 */ interface CtxOption { borderColor?: string; textColor?: string; fillColor?: string; borderStyle?: string; } /** * 图层数据,渲染的数据 */ interface Data { graph: { leftTop: number[]; rightBottom: number[]; center: number[]; w: number, h: number, }[]; } /** * @interface canvasStatus * @description eventStatus 鼠标事件出发后事件的类型 * @description drawShape 鼠标事件的触发绘制之后的形状 */ interface canvasStatus { eventStatus: number; // 绘制的形状 drawShape: string }
guoshuangyang/images-editor
src/editor/index.ts
import { version } from '../../package.json' import { drawCircle, drawEllipse, drawImage, drawLine, drawRect, getCtx } from './draw' import { GetElement, getCanvasPosition, getEventPos } from './getInfo' import { update, destroy } from '../config' import { throttle } from '../tools' import * as datas from './data' /** * 返回一个canvas编辑器对象 * @param {*} ele dom元素或者id * @param {*} option 相关的配置 * @returns */ let { data, option, ctx, canvasImage } = datas export default class ImagesEditor { private height: number; private width: number; public version: string; // 更新配置,比如更新颜色,粗细 updateConfig: Function; destroy: Function; /** * 实例化编辑器对象 * @param ele 元素id或者dom元素 * @param option */ constructor(ele: string | HTMLElement, options: Options) { option = options const canvasStatus: canvasStatus = { eventStatus: 0, drawShape: 'Rect' } // init const canvasBox = GetElement(ele) canvasBox.style.position = 'relative' const canvasDom: HTMLCanvasElement = document.createElement('canvas') // 背景图片层 canvasImage = document.createElement('canvas') data = { graph: [] } this.height = canvasBox.offsetHeight this.width = canvasBox.offsetWidth canvasDom.style.position = 'absolute' canvasDom.style.zIndex='1' canvasDom.style.left = '0px' canvasDom.style.top = '0px' canvasDom.height = this.height canvasDom.width = this.width // 绘制背景图片层 // imageBox.style.width = this.width + 'px' // imageBox.style.height = this.height + 'px' canvasImage.height = this.height canvasImage.width = this.width canvasImage.style.position = 'absolute' canvasImage.style.left = '0px' canvasImage.style.top = '0px' canvasImage.style.zIndex = '0' canvasBox.appendChild(canvasImage) drawImage(getCtx(canvasImage), option.image, option.x ? option.x : 0, option.y ? option.y : 0, option.w ? option.w : this.width, option.y ? option.y : this.height) // 圈选层 canvasBox.appendChild(canvasDom) ctx = getCtx(canvasDom) // 获取图片画笔 // 画笔配置的设置 this.updateConfig = function (option: CtxOption) { update(ctx, option) } const reDraw = (): void => { ctx.clearRect(0, 0, this.width, this.height) // 绘制数据内容,内容一般存在内存中 data.graph.forEach(item => { // @ts-ignore // drawRect(ctx, item.leftTop[0], item.leftTop[1], item.w, item.h) // drawEllipse(ctx,item.center[0],item.center[1], item.w/2,item.h/2) // drawCircle(ctx,item.center[0],item.center[1],item.h/2) drawLine(ctx,item) }) } const init = () => { reDraw() interface TemplateDate{ initX: number; initY: number; status: number; pos: {x: number,y: number}[]; } let eventData:TemplateDate = { initX: 0, initY: 0, // 1 'down', 2 'moving' 0 null status: 0, pos: [] } // 合并一次绘制的形状 canvasStatus.drawShape = option.shape ? option.shape : 'Rect'; canvasStatus.eventStatus = option.eventStatus ? option.eventStatus : 1; this.updateConfig({}) // 鼠标事件 canvasDom.addEventListener('mousedown', event => { const mousePos = getCanvasPosition(event) eventData.initX = mousePos.x eventData.initY = mousePos.y eventData.status = 1 }) canvasDom.addEventListener('mousemove', throttle(function (event: MouseEvent) { const mousePos = getCanvasPosition(event) console.log(mousePos); if (eventData.status !== 0) { // 根据形状进行绘制 switch (canvasStatus.eventStatus) { case 1: // 首先绘制其余的数据 reDraw() if (canvasStatus.drawShape === 'Rect') { // 判断位置,直接渲染 // let obj = getEventPos([eventData.initX, eventData.initY], [mousePos.x, mousePos.y]) // drawRect(ctx, obj.leftTop[0], obj.leftTop[1], obj.w, obj.h) // drawEllipse(ctx,obj.center[0],obj.center[1], obj.w/2, obj.h/2) // console.log(obj.center[0],obj.center[1],obj.h) // drawCircle(ctx,obj.center[0],obj.center[1],obj.h/2) eventData.pos.push({x: mousePos.x, y: mousePos.y}) drawLine(ctx,eventData) } break; } }; }, 10, 30)) // 抬起事件 canvasDom.addEventListener('mouseup', function (event: MouseEvent) { const mousePos = getCanvasPosition(event) if (eventData.status !== 0) { // 处理数据,处理成左上角和右下角,形状以及一些别的配置样式一并写入对象中 let obj1 = getEventPos([eventData.initX, eventData.initY], [mousePos.x, mousePos.y]) // 绘制完毕将数据推入操作数据栈中 data.graph.push(Object.assign(obj1, { drawShape: canvasStatus.drawShape },{pos: eventData.pos})) eventData.status = 0 eventData.pos = [] }; }) } init() this.version = version // destory this.destroy = function () { destroy(ctx, canvasBox) } } exportImg(){ // 先把所有数据在new出来的canvas上边进行渲染,然后进行一个静默导出 let canvasTemp = document.createElement('canvas') canvasTemp.width = this.width canvasTemp.height = this.height // 绘制数据 const ctx = getCtx(canvasTemp) // ctx.drawImage(this.canvasImage, this.option.x ? this.option.x : 0, this.option.y ? this.option.y : 0, this.option.w ? this.option.w : this.width, this.option.y ? this.option.y : this.height); drawImage(ctx, option.image, option.x ? option.x : 0, option.y ? option.y : 0, option.w ? option.w : this.width, option.y ? option.y : this.height) data.graph.forEach(item => { // @ts-ignore // drawRect(ctx, item.leftTop[0], item.leftTop[1], item.w, item.h) // drawEllipse(ctx,item.center[0],item.center[1], item.w/2,item.h/2) // drawCircle(ctx,item.center[0],item.center[1],item.h/2) drawLine(ctx,item) console.log(drawLine) }) return{ img: canvasTemp.toDataURL("image/jpeg", 1.0), canvas: canvasTemp } // let image = new Image(); // image.src = canvasTemp.toDataURL("image/png"); // return canvasTemp.toDataURL("image/png") } }
guoshuangyang/images-editor
src/editor/draw/index.ts
<filename>src/editor/draw/index.ts import { isString } from '../../tools' /** * 创建一个图片的背景 * @param context * @param image * @param dx x轴坐标 * @param dy y轴坐标 * @param dw canvas的宽度 * @param dh canvas的高度 */ export function drawImage(context: CanvasRenderingContext2D, image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number) { let image1: any; function draw(): void { try { context.globalCompositeOperation="destination-over" context.drawImage(image1, dx, dy, dw, dh) } catch (err) { console.error("drawImage is failed") } } console.log(image) // check image if (isString(image)) { image1 = new Image(dw, dy); // Using optional size for image image1.crossOrigin = "Anonymous"; image1.onload = draw image1.src = image } else { image1 = image draw() } } // 获取画笔 export const getCtx = function (canvas: HTMLCanvasElement) { const context = canvas.getContext('2d') if (!context) { throw new Error("canvas is nonsupport !"); } return context } /** * 绘制圆形 * @param ctx * @param cx * @param cy * @param r * @param fillColor */ export const drawCircle = function (context: CanvasRenderingContext2D, cx: number, cy: number, r: number, fillColor = 'red') { // 将canvas状态放入栈中 context.save() context.strokeStyle = fillColor // 开始绘制路径 context.beginPath() // 绘制圆形 -- context.arc(cx, cy, r, 0, 2 * Math.PI, true) // 绘制填充 // context.fill() // 绘制边框 context.stroke() // 关闭绘制 context.closePath() // 恢复默认的状态 context.restore() } /** * 绘制矩形 --- 绘制正圆形的时候会出现宽大于高,依旧出来圆形,但是不是常规意义的圆形 * @param context 画笔 * @param rx * @param ry * @param rw * @param rh * @param fillColor */ export const drawRect = function (context: CanvasRenderingContext2D, rx: number, ry: number, rw: number, rh: number, fillColor = 'red') { // 将canvas状态放入栈中 context.save() context.strokeStyle = fillColor // 开始绘制路径 context.beginPath() // 绘制矩形 -- context.strokeRect(rx, ry, rw, rh) // 绘制填充 // context.fill() // 绘制边框 context.stroke() // 关闭绘制 context.closePath() // 恢复默认的状态 context.restore() } /** * 绘制椭圆 * @param ctx 画笔 * @param x 坐标 * @param y 坐标 * @param a x轴半径宽度 * @param b y轴半径高度 */ export const drawEllipse = function (context: CanvasRenderingContext2D, x: number, y: number, a: number, b: number) { var ox = 0.5 * a, oy = 0.6 * b; context.save(); context.strokeStyle = 'red' context.translate(x, y); context.beginPath(); context.moveTo(0, b); context.bezierCurveTo(ox, b, a, oy, a, 0); context.bezierCurveTo(a, -oy, ox, -b, 0, -b); context.bezierCurveTo(-ox, -b, -a, -oy, -a, 0); context.bezierCurveTo(-a, oy, -ox, b, 0, b); context.stroke(); context.closePath(); // context.fill(); context.restore(); } /** * 绘制曲线或者线段什么的 */ export const drawLine = function (context: CanvasRenderingContext2D, option: any) { context.save(); context.strokeStyle = 'red' context.beginPath(); context.moveTo(option.pos[0].x, option.pos[0].y); for (let i = 1; i < option.pos.length; i++) { context.lineTo(option.pos[i].x, option.pos[i].y) } context.stroke(); context.restore(); } /** * 根据传值进行不同的渲染样式 * @param option */ export const drawByMouse = function (option: any) { }
guoshuangyang/images-editor
src/editor/data/index.ts
<filename>src/editor/data/index.ts<gh_stars>0 export let data: Data; // 请求参数 可通过updateConfig方法修改 export let option: Options; // canvast图 export let canvasImage: HTMLCanvasElement; // 画笔工具 export let ctx: CanvasRenderingContext2D;
guoshuangyang/images-editor
src/editor/export/exportImg.ts
/** * 将svg导出成图片 * @param node svg节点 => document.querySelector('svg') * @param name 生成的图片名称 * @param width 生成的图片宽度 * @param height 生成的图片高度 * @param type 生成的图片类型 */ // export const covertSVG2Image = (node, name, width, height, type = 'png') => { // let serializer = new XMLSerializer() // let source = '<?xml version="1.0" standalone="no"?>\r\n' + serializer.serializeToString(node) // let image = new Image() // image.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(source) // let canvas = document.createElement('canvas') // canvas.width = width // canvas.height = height // let context = canvas.getContext('2d') // context.fillStyle = '#fff' // context.fillRect(0, 0, 10000, 10000) // image.onload = function () { // context.drawImage(image, 0, 0) // let a = document.createElement('a') // a.download = `${name}.${type}` // a.href = canvas.toDataURL(`image/${type}`) // a.click() // } // }
guoshuangyang/images-editor
src/tools/judeg.ts
<filename>src/tools/judeg.ts /*** * @description 判断是不是某个值的内容,统一返回Boolean * @author yyy */ /** * 是不是dom元素 * @param element */ export const isDom = (element: string | HTMLElement ) => { return typeof HTMLElement === 'object' ? element instanceof HTMLElement : element && typeof element === 'object' && element.nodeType === 1 && typeof element.nodeName === 'string'; } /** * 返回是不是字符串 * @param str */ export const isString = function(str: any){ if(Object.prototype.toString.call(str) === "[object String]") return true; return false; }
guoshuangyang/images-editor
src/editor/getInfo/index.ts
<reponame>guoshuangyang/images-editor /** * @description 获取各个dom 或者事件的信息 */ export * from './getInfo'
guoshuangyang/images-editor
src/tools/index.ts
/** * @description 常用的工具描述 * @function throttle 节流 */ export * from './judeg' /** * 简单的节流函数 * @param func * @param wait * @param mustRun * @returns */ export function throttle(func: Function, wait: number, mustRun: number) { let timeout: any; let startTime = new Date(); return function () { // @ts-ignore let context = this, args = arguments, curTime = new Date(); clearTimeout(timeout); // @ts-ignore if (curTime - startTime >= mustRun) { func.apply(context, args); startTime = curTime; } else { timeout = setTimeout(function () { func.apply(context, args); }, wait); } }; }; /** * 防抖 * @param fn 函数 * @param delay 间隔时间,毫秒 */ export function debounce<C, T extends unknown[]>( fn: (this: C, ...args: T) => void, delay: number = 200 ): (this: C, ...args: T) => void { let lastFn = 0 return function (...args: T) { if (lastFn) { window.clearTimeout(lastFn) } lastFn = window.setTimeout(() => { lastFn = 0 fn.call(this, ...args) // this 报语法错误,先用 null }, delay) } } /** * isFunction 是否是函数 * @param fn 函数 */ export function isFunction(fn: any): fn is Function { return typeof fn === 'function' }
guoshuangyang/images-editor
src/config/index.ts
<reponame>guoshuangyang/images-editor // 配置相关文件 export const update = function (ctx: CanvasRenderingContext2D,colorOption: object):void{ const options = { borderColor: 'red', textColor: 'black', fillColor: 'red', borderStyle: 'rect' } let option = Object.assign(options,colorOption) ctx.strokeStyle = option.borderColor ctx.fillStyle = option.fillColor } export const destroy = function (ctx:CanvasRenderingContext2D,parentElement:HTMLElement) { // 清除画布的内容 ctx.restore() // 移除所有子元素 parentElement.innerHTML = "" }
guoshuangyang/images-editor
src/editor/getInfo/getInfo.ts
/** * 根据无论是元素还是id都拿到对应元素 * @param id 元素或者id * @returns */ export const GetElement = function (id: string | HTMLElement): HTMLElement { let ele; if (typeof id === 'string') { console.log('string',id) ele = document.getElementById(id) } else { ele = id } console.log('ele',ele); if (!ele) throw new Error("is not a HtmlElement"); return ele } /** * 返回鼠标事件的位置地方 * @param e 返回常规事件的鼠标相对元素的位置 * @returns */ export function getCanvasPosition(e: MouseEvent) { return { x: e.offsetX, y: e.offsetY, } } /** * 计算事件的左上角右上角和中心 * @param start 【x,y】 * @param end 【x,y】 * @returns */ export function getEventPos(start: [x: number, y: number], end: [x: number, y: number]) { const obj = { rightBottom: [0, 0], leftTop: [0, 0], center: [0,0], w: 0, h: 0 } obj.w = Math.abs(start[0]-end[0]) obj.h = Math.abs(start[1]-end[1]) // 计算开始和结束的位置 if (end[0] > start[0]) { if (end[1] > start[1]) { // 右下角是结束位置 obj.rightBottom = [end[0], end[1]] obj.leftTop = [start[0], start[1]] obj.center = [end[0] - obj.w/2,end[1] - obj.h/2] } else { obj.rightBottom = [end[0], start[1]] obj.leftTop = [start[0], end[1]] obj.center = [end[0] - obj.w/2,start[1] - obj.h/2] } } else { if (end[1] > start[1]) { obj.leftTop = [end[0], start[1]] obj.rightBottom = [start[0], end[1]] obj.center = [start[0] - obj.w/2,end[1] - obj.h/2] } else { obj.leftTop = [end[0], end[1]] obj.rightBottom = [start[0], start[1]] obj.center = [start[0] - obj.w/2,start[1] - obj.h/2] } } return obj }
javaadpatel/tech-pays-eu-graphs
my-app/src/DataSourceMessage.tsx
<reponame>javaadpatel/tech-pays-eu-graphs import { Button, Message } from "semantic-ui-react" const DataSourceMessage: React.FC = () => { return( <Message info> <Message.Header>What is the data source for this?</Message.Header> <Message.Content> The data comes from techpays.eu which is a site collecting salary information from people in Europe with the goal of changing the information asymmetry for compensation. </Message.Content> <Message.Content> <Button primary as='a' href='https://techpays.eu'> Go to TechPays.eu </Button> </Message.Content> </Message> ) } export default DataSourceMessage;
javaadpatel/tech-pays-eu-graphs
my-app/src/CompensationDataVisualization.tsx
<gh_stars>0 import { useState } from "react"; import { Checkbox, CheckboxProps, Dropdown, DropdownProps } from "semantic-ui-react"; import { DataService } from "./data-service"; import { SeniorityLevels } from "./enums/seniority-levels-enum"; import Graph from "./Graph"; import { CompanySalaryData } from "./interfaces/company-salary-data"; interface CompensationDataVisualizationProps { } const CompensationDataVisualization: React.FC<CompensationDataVisualizationProps> = ({ }) => { const dataService = new DataService(); const [seniorityFilterOption, setSeniorityFilterOption] = useState<SeniorityLevels>(SeniorityLevels.SENIOR); const [showTotalCompensation, setShowTotalCompensation] = useState<boolean>(false); const renderTotalCompensationToggle = () => { return ( <Checkbox toggle label="Include bonuses/equity/perks" defaultChecked={showTotalCompensation} onChange={(event: React.FormEvent<HTMLInputElement>, data: CheckboxProps) => setShowTotalCompensation(data.checked as boolean)} /> ) } const renderSeniorityDropdown = () => { const seniorityOptions = [ { key: 'Junior', text: 'Junior', value: SeniorityLevels.JUNIOR, }, { key: 'Mid', text: 'Mid', value: SeniorityLevels.MIDLEVEL, }, { key: 'Senior', text: 'Senior', value: SeniorityLevels.SENIOR, }, { key: 'Above Senior', text: 'Above Senior', value: SeniorityLevels.ABOVESENIOR, }, ]; return ( <Dropdown placeholder='Select Seniority' icon='filter' className='icon' labeled button floating onChange={(event: React.SyntheticEvent<HTMLElement, Event>, data: DropdownProps) => setSeniorityFilterOption(data.value as SeniorityLevels)} defaultValue={seniorityFilterOption} options={seniorityOptions} /> ) } const loadData = (): CompanySalaryData => { return dataService.loadData(seniorityFilterOption); } return ( <> {renderTotalCompensationToggle()} {renderSeniorityDropdown()} <Graph companySalaryData={loadData()} useTotalCompensation={showTotalCompensation} /> </> ) } export default CompensationDataVisualization;
javaadpatel/tech-pays-eu-graphs
my-app/src/DataDisclaimerMessage.tsx
import { Message } from "semantic-ui-react"; const DataDisclaimerMessage: React.FC = () => { return( <Message warning icon='warning sign' content=' This data is currently filtering out any data points relating to product owners/managers, engineering managers and management positions. This data was last updated on 8 February 2022. ' /> ) } export default DataDisclaimerMessage;
javaadpatel/tech-pays-eu-graphs
my-app/src/enums/seniority-levels-enum.ts
export enum SeniorityLevels { JUNIOR, MIDLEVEL, SENIOR, ABOVESENIOR }
javaadpatel/tech-pays-eu-graphs
my-app/src/data/tier-3-companies.ts
export const data = [ { title: 'Principal Developer', guid: 'oakvkx94htkgyhboaamzh', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€206,000', totalCompensationNumber: 206000, totalCompensationDetails: '€132K salary, €34K bonus, €40K equity/year', baseSalary: '€10,961/month', baseSalaryNumber: 131532, oldYearForData: '2020', otherContext: '' }, { title: 'Graduate Software Engineer', guid: 'nskww8lizlfzmg7lip3lg', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Optiver', totalCompensation: '€125,000', totalCompensationNumber: 125000, totalCompensationDetails: '€75K salary, €0K bonus, €50K sign-on, €5K benefits, €8K relocation', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'efkwj5nw7fi8t1dhixlbg', specialization: '', city: 'Flexible days', companyName: 'Booking.com', totalCompensation: '€155,000', totalCompensationNumber: 155000, totalCompensationDetails: '€120K salary, €24K bonus, €11K equity/year', baseSalary: '€10,000/month', baseSalaryNumber: 120000, oldYearForData: '', otherContext: '' }, { title: 'Senior Machine Learning Engineer', guid: 'ozkwnry796j3pqtxvf3zr', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€156,000', totalCompensationNumber: 156000, totalCompensationDetails: '€119K salary, €24K bonus, €13K equity/year, €2K benefits', baseSalary: '€9,875/month', baseSalaryNumber: 118500, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '8hkwkg3hibnc51q4psxs', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€143,000', totalCompensationNumber: 143000, totalCompensationDetails: '€110K salary, €22K bonus, €11K equity/year', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: '6okvtkkg3llv69xq8w9dp', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€151,000', totalCompensationNumber: 151000, totalCompensationDetails: '€97K salary, €14K bonus, €41K equity/year', baseSalary: '€8,113/month', baseSalaryNumber: 97350, oldYearForData: '', otherContext: '' }, { title: 'Senior Data Scientist ', guid: 'ltksoiuzlzpsvwkeec4mt', specialization: '', city: '', companyName: 'Booking.com ', totalCompensation: '€136,000', totalCompensationNumber: 136000, totalCompensationDetails: '€104K salary, €21K bonus, €11K equity/year', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, { title: 'Senior Solutions Architect', guid: 'x5kutkg756de5jm9a4tsd', specialization: '', city: 'Remote from anywhere', companyName: '🔒 Data company pre-ipo', totalCompensation: '€217,000', totalCompensationNumber: 217000, totalCompensationDetails: '€152K salary, €25K bonus, €40K equity/year, €5K benefits', baseSalary: '€12,667/month', baseSalaryNumber: 152000, oldYearForData: '', otherContext: 'Freelance' }, { title: 'Staff Software Engineer', guid: '0lkwx78bygwx2ifsixdvf', specialization: '', city: 'Remote within country', companyName: '🔒 FinTech company', totalCompensation: '€434,000', totalCompensationNumber: 434000, totalCompensationDetails: '€153K salary, €31K bonus, €50K sign-on, €200K equity/year', baseSalary: '€12,750/month', baseSalaryNumber: 153000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Lead', guid: 'y7kwx7oaleigs8aj06y2i', specialization: '', city: 'Amsterdam', companyName: '🔒 Travel industry', totalCompensation: '€455,000', totalCompensationNumber: 455000, totalCompensationDetails: '€130K salary, €325K equity/year, €6K benefits', baseSalary: '€10,833/month', baseSalaryNumber: 130000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer Intern ', guid: 'g3kwyx9zfg9wx1haq88ra', specialization: '', city: 'Amsterdam Zuid', companyName: 'Optiver ', totalCompensation: '€120,000', totalCompensationNumber: 120000, totalCompensationDetails: '', baseSalary: '€10,000/month', baseSalaryNumber: 120000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer Intern', guid: 'p5kwgfplmq2wnjrfm5o0m', specialization: '', city: 'Amsterdam', companyName: 'Optiver ', totalCompensation: '€130,000', totalCompensationNumber: 130000, totalCompensationDetails: '', baseSalary: '€10,800/month', baseSalaryNumber: 129600, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '60kvkuo9syftry7je3yjh', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Elastic', totalCompensation: '€139,000', totalCompensationNumber: 139000, totalCompensationDetails: '€108K salary, €8K sign-on, €23K equity/year, €15K benefits', baseSalary: '€9,000/month', baseSalaryNumber: 108000, oldYearForData: '', otherContext: '' }, { title: 'Graduate Software Engineer', guid: 'klkw6mxytweziba873mbm', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€165,000', totalCompensationNumber: 165000, totalCompensationDetails: '€100K salary, €35K bonus, €30K sign-on, €3K relocation', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Senior Data Engineer', guid: 'fqkwxy2aeyi5880qs2qc', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Spotify', totalCompensation: '€137,000', totalCompensationNumber: 137000, totalCompensationDetails: '€107K salary, €30K equity/year', baseSalary: '€8,917/month', baseSalaryNumber: 107000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'fkkt8ccunr24zei6hlcs8', specialization: '', city: 'Amsterdam (remote within country)', companyName: 'Microsoft ', totalCompensation: '€154,000', totalCompensationNumber: 154000, totalCompensationDetails: '€119K salary, €30K bonus, €5K equity/year, €30K benefits', baseSalary: '€9,950/month', baseSalaryNumber: 119394, oldYearForData: '', otherContext: '' }, { title: 'Solution Architect', guid: 'kwkwwa4i2zhqo23784tr', specialization: '', city: 'Flexible days', companyName: 'Stripe', totalCompensation: '€200,000', totalCompensationNumber: 200000, totalCompensationDetails: '€114K salary, €29K bonus, €0K sign-on, €58K equity/year, €10K benefits', baseSalary: '€9,531/month', baseSalaryNumber: 114372, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'zckwatp59wpcvxjowlen', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Amazon', totalCompensation: '€165,000', totalCompensationNumber: 165000, totalCompensationDetails: '€117K salary, €48K equity/year', baseSalary: '€9,720/month', baseSalaryNumber: 116640, oldYearForData: '', otherContext: '' }, { title: 'Principal Software Engineer I', guid: '4xkw21uqw0wfh0fyevov', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Elastic', totalCompensation: '€159,000', totalCompensationNumber: 159000, totalCompensationDetails: '€125K salary, $20K sign-on, €17K equity/year', baseSalary: '€10,417/month', baseSalaryNumber: 125000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'l5kvku4r7hv2zbz4ct9rm', specialization: '', city: 'Amsterdam', companyName: 'Optiver', totalCompensation: '€240,000', totalCompensationNumber: 240000, totalCompensationDetails: '€75K salary, €165K bonus', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'mpkvku1fwhp22tvov3hg', specialization: '', city: 'Amsterdam', companyName: 'Optiver', totalCompensation: '€180,000', totalCompensationNumber: 180000, totalCompensationDetails: '€75K salary, €105K bonus', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'New Grad Software Engineer', guid: 'qukvktzaw0sfey8aictt', specialization: '', city: 'Amsterdam', companyName: 'Optiver', totalCompensation: '€100,000', totalCompensationNumber: 100000, totalCompensationDetails: '€60K salary, €40K bonus', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'cvksujld8jf68usaqshz', specialization: '', city: '', companyName: 'GitLab', totalCompensation: '€181,000', totalCompensationNumber: 181000, totalCompensationDetails: '€95K salary, €2K bonus, €84K equity/year', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kshlu9coqcpyw6ullq', specialization: '', city: 'Remote (remote from anywhere)', companyName: 'GitLab', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '€80K salary, €30K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'xuktw0w156mvuzufh53s8', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€132,000', totalCompensationNumber: 132000, totalCompensationDetails: '€101K salary, €20K bonus, €11K equity/year', baseSalary: '€8,417/month', baseSalaryNumber: 101000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'yikuwuolxjfh5zsfgn17s', specialization: '', city: 'Flexible days', companyName: '🔒 Proprietary trading firm', totalCompensation: '€125,000', totalCompensationNumber: 125000, totalCompensationDetails: '€75K salary, €0K bonus, €50K sign-on, €5K benefits, €8K relocation', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'emkunw70f6v9w4ylqfsd8', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Optiver', totalCompensation: '€196,000', totalCompensationNumber: 196000, totalCompensationDetails: '€81K salary, €65K bonus, €50K sign-on, €5K benefits, €8K relocation', baseSalary: '€6,750/month', baseSalaryNumber: 81000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager ', guid: '2gkvdjuze1rssmb3ydzcp', specialization: '', city: 'Hybrid option', companyName: 'Booking.com ', totalCompensation: '€150,000', totalCompensationNumber: 150000, totalCompensationDetails: '€110K salary, €22K bonus, €5K sign-on, €13K equity/year, €1K benefits, €5K relocation', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Solutions Architect', guid: '71kvfh13x8yplhvjol8r', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Amazon', totalCompensation: '€150,000', totalCompensationNumber: 150000, totalCompensationDetails: '€97K salary, €40K sign-on, €13K equity/year', baseSalary: '€8,100/month', baseSalaryNumber: 97200, oldYearForData: '', otherContext: '' }, { title: 'Senior Engineering Manager', guid: 'fdktebn3s6fz115cmwr4', specialization: '', city: '', companyName: 'Booking.com', totalCompensation: '€159,000', totalCompensationNumber: 159000, totalCompensationDetails: '€114K salary, €29K bonus, €17K equity/year', baseSalary: '€9,500/month', baseSalaryNumber: 114000, oldYearForData: '', otherContext: '' }, { title: 'Machine Learning Scientist', guid: 'kshcsp0y0umkfcmst9y9', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Booking.com', totalCompensation: '€125,000', totalCompensationNumber: 125000, totalCompensationDetails: '€95K salary, €10K bonus, €20K equity/year, €1K benefits, €8K relocation', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Senior Product Manager', guid: 'n6ksqkjcj0kipktb9oxaq', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Booking.com', totalCompensation: '€130,000', totalCompensationNumber: 130000, totalCompensationDetails: '€100K salary, €17K bonus, €13K equity/year', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Staff Engineer', guid: 'svkv0okrqlzr8h48kl2gq', specialization: 'Full Stack', city: 'Amsterdam (remote from anywhere)', companyName: 'GitLab', totalCompensation: '€210,000', totalCompensationNumber: 210000, totalCompensationDetails: '€135K salary, €75K equity/year', baseSalary: '€11,250/month', baseSalaryNumber: 135000, oldYearForData: '', otherContext: '' }, { title: 'Principal Engineer', guid: 'zqkureve0xbryayq9nbjt', specialization: '', city: '', companyName: 'Booking.com', totalCompensation: '€254,000', totalCompensationNumber: 254000, totalCompensationDetails: '€155K salary, €39K bonus, €60K equity/year, €3K benefits', baseSalary: '€12,917/month', baseSalaryNumber: 155000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'xxktekp5dafh0pdcv1ka', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€142,000', totalCompensationNumber: 142000, totalCompensationDetails: '€107K salary, €21K bonus, €2K sign-on, €11K equity/year, €5K relocation', baseSalary: '€8,917/month', baseSalaryNumber: 107000, oldYearForData: '', otherContext: '' }, { title: 'Lead Software Developer', guid: 'ouksr8josgqp04w45rpn', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€141,000', totalCompensationNumber: 141000, totalCompensationDetails: '€108K salary, €22K bonus, €11K equity/year', baseSalary: '€9,000/month', baseSalaryNumber: 108000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer in Test', guid: 'igksneqn8bfrpe9gz54j6', specialization: '', city: 'Amsterdam', companyName: 'ServiceNow', totalCompensation: '€145,000', totalCompensationNumber: 145000, totalCompensationDetails: '€70K salary, €5K bonus, €70K equity/year', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Product Development Manager', guid: 'xyksukcnzz4aanhut5ryq', specialization: '', city: 'Amsterdam', companyName: '🔒 US Company', totalCompensation: '€173,000', totalCompensationNumber: 173000, totalCompensationDetails: '', baseSalary: '€14,400/month', baseSalaryNumber: 172800, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'slkt480w1tx050webuf6c', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Netflix', totalCompensation: '€147,000', totalCompensationNumber: 147000, totalCompensationDetails: '€140K salary, €7K equity/year, €10K benefits', baseSalary: '€11,700/month', baseSalaryNumber: 140400, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'mhksq9x5zwqnrilh3h89', specialization: '', city: 'Amsterdam (remote within country)', companyName: '🔒 US Company, Entertainment Industry', totalCompensation: '€151,000', totalCompensationNumber: 151000, totalCompensationDetails: '', baseSalary: '€12,600/month', baseSalaryNumber: 151200, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksaaj0jsxqn52jihra', specialization: '', city: 'Amsterdam (remote within country)', companyName: '🔒 FinTech Startup', totalCompensation: '€159,000', totalCompensationNumber: 159000, totalCompensationDetails: '€119K salary, €40K equity/year, €5K benefits', baseSalary: '€9,917/month', baseSalaryNumber: 119000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'kslkgquwy3o52qjt6xq', specialization: '', city: 'Amsterdam', companyName: 'Databricks', totalCompensation: '€161,000', totalCompensationNumber: 161000, totalCompensationDetails: '€92K salary, €9K bonus, €60K equity/year', baseSalary: '€7,650/month', baseSalaryNumber: 91800, oldYearForData: '', otherContext: '' }, { title: 'Principal Engineer', guid: '8iksuid2np5axbrvhdeov', specialization: '', city: 'Remote from anywhere', companyName: '🔒 Healthcare Company', totalCompensation: '€166,000', totalCompensationNumber: 166000, totalCompensationDetails: '€138K salary, €28K bonus, €13K benefits', baseSalary: '€11,500/month', baseSalaryNumber: 138000, oldYearForData: '', otherContext: '' }, { title: 'Principal Solutions Engineer', guid: 'mmku8dq4prqtjsdcyrqkl', specialization: '', city: 'Amsterdam (remote from anywhere)', companyName: '🔒 FinTech industry', totalCompensation: '€221,000', totalCompensationNumber: 221000, totalCompensationDetails: '€162K salary, €49K bonus, €10K sign-on, €9K benefits', baseSalary: '€13,500/month', baseSalaryNumber: 162000, oldYearForData: '', otherContext: '' }, { title: 'Design Manager', guid: '3jktckyzw5896ghfchpoy', specialization: '', city: 'Amsterdam', companyName: '🔒 Travel sector company', totalCompensation: '€174,000', totalCompensationNumber: 174000, totalCompensationDetails: '€112K salary, €22K bonus, €40K equity/year', baseSalary: '€9,333/month', baseSalaryNumber: 112000, oldYearForData: '', otherContext: '' }, { title: 'Principal Engineer', guid: 'mlksuhyouxmpk1nkwzpt', specialization: '', city: 'Remote from anywhere', companyName: '🔒 Enterprise Software Company', totalCompensation: '€222,000', totalCompensationNumber: 222000, totalCompensationDetails: '€145K salary, €29K bonus, €48K equity/year, €18K benefits', baseSalary: '€12,083/month', baseSalaryNumber: 145000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'ksbgvty6bu1lp0ccsd4', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€176,000', totalCompensationNumber: 176000, totalCompensationDetails: '€110K salary, €28K bonus, €25K sign-on, €13K equity/year, €5K benefits, €10K relocation', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Senior Engineering Manager', guid: 'nnktwxj7g4smace3nz24f', specialization: '', city: '', companyName: '🔒 Travel sector company', totalCompensation: '€202,000', totalCompensationNumber: 202000, totalCompensationDetails: '€121K salary, €30K bonus, €51K equity/year', baseSalary: '€10,083/month', baseSalaryNumber: 121000, oldYearForData: '', otherContext: '' }, { title: 'Group Product Manager', guid: 'ksg92vvoemfp08oaujk', specialization: '', city: 'Amsterdam', companyName: '🔒 Travel sector company', totalCompensation: '€279,000', totalCompensationNumber: 279000, totalCompensationDetails: '€150K salary, €38K bonus, €75K sign-on, €17K equity/year', baseSalary: '€12,500/month', baseSalaryNumber: 150000, oldYearForData: '', otherContext: '' }, { title: 'Principal Product Manager', guid: 'e1ktdzbeohfj056yxzspv', specialization: '', city: 'Hybrid option', companyName: 'Microsoft', totalCompensation: '€190,000', totalCompensationNumber: 190000, totalCompensationDetails: '€135K salary, €30K bonus, €25K equity/year, €10K benefits', baseSalary: '€11,250/month', baseSalaryNumber: 135000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksh6i1po6fq4km1p3vo', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Miro', totalCompensation: '€135,000', totalCompensationNumber: 135000, totalCompensationDetails: '€95K salary, €40K equity/year, €20K benefits', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer ', guid: 'ksitdz95ixwx8j9962m', specialization: '', city: '', companyName: 'Booking.com', totalCompensation: '€142,000', totalCompensationNumber: 142000, totalCompensationDetails: '€101K salary, €20K bonus, €10K sign-on, €11K equity/year, €2K benefits', baseSalary: '€8,417/month', baseSalaryNumber: 101000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksix2vtcmwkmgpebu9l', specialization: 'Android', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€145,000', totalCompensationNumber: 145000, totalCompensationDetails: '€102K salary, €20K bonus, €12K sign-on, €11K equity/year, €1K benefits, €10K relocation', baseSalary: '€8,458/month', baseSalaryNumber: 101500, oldYearForData: '', otherContext: '' }, { title: 'Data Science Manager', guid: '8dktog1klowgdbwrj6me', specialization: '', city: 'Amsterdam (flexible days)', companyName: '<NAME>', totalCompensation: '€151,000', totalCompensationNumber: 151000, totalCompensationDetails: '€120K salary, €16K bonus, €15K equity/year', baseSalary: '€10,000/month', baseSalaryNumber: 120000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '4zkt7javko3d3m4w40lae', specialization: '', city: 'Amsterdam', companyName: 'GitLab', totalCompensation: '€161,000', totalCompensationNumber: 161000, totalCompensationDetails: '€96K salary, €2K bonus, €63K equity/year', baseSalary: '€8,000/month', baseSalaryNumber: 96000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: '3lksr3cm25ecyt186xfj4', specialization: '', city: 'Amsterdam', companyName: '🔒 Cloud data platform', totalCompensation: '€158,000', totalCompensationNumber: 158000, totalCompensationDetails: '€85K salary, €10K bonus, €63K equity/year, $7K relocation', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '1vksunlds5jpj2r0h51c8', specialization: '', city: '', companyName: 'Uber', totalCompensation: '€167,000', totalCompensationNumber: 167000, totalCompensationDetails: '€110K salary, €17K bonus, €40K equity/year', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '2018', otherContext: '' }, { title: '🔒 Senior-level position within product management', guid: 'qhksqlm0rjp4k1czci8zf', specialization: '', city: 'Amsterdam', companyName: 'Uber ', totalCompensation: '€200,000', totalCompensationNumber: 200000, totalCompensationDetails: '€115K salary, €23K bonus, €15K sign-on, €47K equity/year, €6K benefits, $13K relocation', baseSalary: '€9,583/month', baseSalaryNumber: 115000, oldYearForData: '2019', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksham0xo2obdffvd8no', specialization: 'Fullstack', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€165,000', totalCompensationNumber: 165000, totalCompensationDetails: '€111K salary, €37K bonus, €17K equity/year', baseSalary: '€9,250/month', baseSalaryNumber: 111000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager I', guid: 'ksbiwlyn8zdcmadmgti', specialization: '', city: 'Amsterdam', companyName: '🔒 Ride sharing company', totalCompensation: '€170,000', totalCompensationNumber: 170000, totalCompensationDetails: '€105K salary, €23K bonus, €43K equity/year, €10K relocation', baseSalary: '€8,750/month', baseSalaryNumber: 105000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'pfksr9yflk570wolsvo23', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€171,000', totalCompensationNumber: 171000, totalCompensationDetails: '€102K salary, €23K bonus, €46K equity/year', baseSalary: '€8,500/month', baseSalaryNumber: 102000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '13ktbvh9a926yppfn6dtp', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Uber', totalCompensation: '€192,000', totalCompensationNumber: 192000, totalCompensationDetails: '€110K salary, €25K bonus, €15K sign-on, €42K equity/year', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within data science', guid: 'lwktvztwpibchso53fui', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€115,000', totalCompensationNumber: 115000, totalCompensationDetails: '€94K salary, €14K bonus, €7K equity/year', baseSalary: '€7,833/month', baseSalaryNumber: 94000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'v8ktzxhbaqnkcar5tzzgj', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€160,000', totalCompensationNumber: 160000, totalCompensationDetails: '€100K salary, €20K bonus, €40K equity/year', baseSalary: '€8,325/month', baseSalaryNumber: 99900, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within design', guid: 'ozkty58oh2d46a3djmx0u', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€132,000', totalCompensationNumber: 132000, totalCompensationDetails: '€99K salary, €20K bonus, €13K equity/year', baseSalary: '€8,250/month', baseSalaryNumber: 99000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: '1wku34rc5jcwpxfzf89xj', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Booking.com', totalCompensation: '€142,000', totalCompensationNumber: 142000, totalCompensationDetails: '€109K salary, €22K bonus, €11K equity/year, €5K relocation', baseSalary: '€9,083/month', baseSalaryNumber: 109000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'ksa6arz1hb3j7zja1zr', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€143,000', totalCompensationNumber: 143000, totalCompensationDetails: '€110K salary, €22K bonus, €11K equity/year', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'SDE II', guid: '5ykuci1xmjyi3r3lgieij', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Amazon', totalCompensation: '€124,000', totalCompensationNumber: 124000, totalCompensationDetails: '€97K salary, €22K sign-on, €5K equity/year', baseSalary: '€8,100/month', baseSalaryNumber: 97200, oldYearForData: '', otherContext: '' }, { title: 'Graduate Software Engineer', guid: '0lkuhgj8hc6tma8axo9vw', specialization: '', city: 'Amsterdam', companyName: 'IMC Trading', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '€70K salary, €25K bonus, €15K sign-on, €4K relocation', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Engineer', guid: '0ykt0hxn3yk0s2nbubfvk', specialization: '', city: 'Amsterdam', companyName: 'GitHub', totalCompensation: '€225,000', totalCompensationNumber: 225000, totalCompensationDetails: '€120K salary, €30K bonus, €75K equity/year', baseSalary: '€10,000/month', baseSalaryNumber: 120000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'lekt17krfzms0bn4p808', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€107,000', totalCompensationNumber: 107000, totalCompensationDetails: '€90K salary, €7K bonus, €10K equity/year, €4K benefits, €20K relocation', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'pekt4nldkwtlzzk4jjjs', specialization: '', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€150,000', totalCompensationNumber: 150000, totalCompensationDetails: '€104K salary, €40K sign-on, €6K equity/year', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, { title: 'Data Engineer', guid: 'qukt6srag8any9jaqsfjm', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '€90K salary, €14K bonus, €7K equity/year, €6K relocation', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Principal Solutions Engineer', guid: '84ksyhssp14duoh8yo1o9', specialization: 'L7', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€198,000', totalCompensationNumber: 198000, totalCompensationDetails: '€130K salary, €60K bonus, €8K equity/year', baseSalary: '€10,833/month', baseSalaryNumber: 130000, oldYearForData: '', otherContext: '' }, { title: 'SDE2', guid: 'kgksye3foqi7mp0sg8h1q', specialization: 'L5', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€97,000', totalCompensationNumber: 97000, totalCompensationDetails: '€75K salary, €17K sign-on, €5K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Solutions Architect', guid: 'ksk8uleq6cx7bdrrrtl', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 US e-commerce company', totalCompensation: '€143,000', totalCompensationNumber: 143000, totalCompensationDetails: '€115K salary, €22K sign-on, €6K equity/year', baseSalary: '€9,583/month', baseSalaryNumber: 115000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Development Engineer', guid: '0vksvr1ktnv3jdwiqa55n', specialization: 'L4', city: 'Amsterdam (hybrid option)', companyName: 'Amazon', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '€80K salary, €30K equity/year, €5K benefits', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'gpksuu1poanxrbe8l5u9', specialization: 'L6', city: 'Amsterdam (flexible days)', companyName: 'Amazon', totalCompensation: '€225,000', totalCompensationNumber: 225000, totalCompensationDetails: '€90K salary, €135K equity/year, €3K benefits', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'w7ksobvybo753y2vso6ch', specialization: '', city: '', companyName: 'Booking.com', totalCompensation: '€101,000', totalCompensationNumber: 101000, totalCompensationDetails: '€85K salary, €10K bonus, €6K equity/year', baseSalary: '€7,110/month', baseSalaryNumber: 85320, oldYearForData: '', otherContext: '' }, { title: '🔒 Intern-level position within software engineering', guid: 'csksmtrxmwhmioh8r8y4q', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Trading company', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within product management', guid: 't3ksoe1z07nah2jfrg39n', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€105,000', totalCompensationNumber: 105000, totalCompensationDetails: '€84K salary, €13K bonus, €5K sign-on, €4K equity/year, €10K relocation', baseSalary: '€7,000/month', baseSalaryNumber: 84000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer Intern', guid: 'ksccpkfvsxtvsdjw0ug', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'IMC Trading', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksiuibn96oi79nyhpvk', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€97,500', totalCompensationNumber: 97500, totalCompensationDetails: '€80K salary, €12K bonus, €6K equity/year, €5K relocation', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksa62vfdc59z8ou9swh', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€101,000', totalCompensationNumber: 101000, totalCompensationDetails: '€83K salary, €13K bonus, €6K equity/year', baseSalary: '€6,917/month', baseSalaryNumber: 83000, oldYearForData: '', otherContext: '' }, { title: 'Senior Data Scientist', guid: 'ksivuxg5qk0mah1v3f9', specialization: 'Insights', city: 'Amsterdam (flexible days)', companyName: 'Booking.com', totalCompensation: '€138,000', totalCompensationNumber: 138000, totalCompensationDetails: '€106K salary, €21K bonus, €11K equity/year, €5K relocation', baseSalary: '€8,833/month', baseSalaryNumber: 106000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksg3etvbixm8e8pgur9', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Uber', totalCompensation: '€169,000', totalCompensationNumber: 169000, totalCompensationDetails: '€107K salary, €23K bonus, €13K sign-on, €26K equity/year, €5K benefits', baseSalary: '€8,946/month', baseSalaryNumber: 107350, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '00ksorjhegev2rv6qpr8e', specialization: '', city: 'Amsterdam', companyName: 'ServiceNow', totalCompensation: '€149,000', totalCompensationNumber: 149000, totalCompensationDetails: '€90K salary, €9K bonus, €50K equity/year, €1K benefits', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '2019', otherContext: '' }, { title: 'Lead Developer', guid: '86ksoqmth7mttop40dle', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€159,000', totalCompensationNumber: 159000, totalCompensationDetails: '€121K salary, €24K bonus, €13K equity/year, €4K benefits', baseSalary: '€10,083/month', baseSalaryNumber: 121000, oldYearForData: '2020', otherContext: '' }, { title: '🔒 Above senior-level position within software engineering', guid: 'y0ksoqxjjlo4reqxuizb', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€181,000', totalCompensationNumber: 181000, totalCompensationDetails: '€131K salary, €33K bonus, €17K equity/year, €1K benefits', baseSalary: '€10,917/month', baseSalaryNumber: 131000, oldYearForData: '', otherContext: '' }, { title: 'Quantitative Technologist', guid: 'ksayohozw2fdmi4vh8', specialization: '', city: 'Amsterdam', companyName: '🔒 Proprietary Trading Firm ', totalCompensation: '€190,000', totalCompensationNumber: 190000, totalCompensationDetails: '€150K salary, €40K bonus', baseSalary: '€12,500/month', baseSalaryNumber: 150000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: '9vkspeprmhw1wf6ehqfba', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€172,000', totalCompensationNumber: 172000, totalCompensationDetails: '€116K salary, €23K bonus, €33K equity/year, €1K benefits, €3K relocation', baseSalary: '€9,667/month', baseSalaryNumber: 116000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksixqgam492tzyib3mg', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Databricks', totalCompensation: '€227,000', totalCompensationNumber: 227000, totalCompensationDetails: '€124K salary, €19K bonus, €84K equity/year', baseSalary: '€10,333/month', baseSalaryNumber: 124000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kshgkiw94gx4n4jxem6', specialization: 'L4', city: 'Amsterdam', companyName: 'Databricks', totalCompensation: '€158,000', totalCompensationNumber: 158000, totalCompensationDetails: '€82K salary, €10K bonus, €5K sign-on, €60K equity/year, €3K relocation', baseSalary: '€6,858/month', baseSalaryNumber: 82296, oldYearForData: '', otherContext: '' }, { title: 'Solutions Architect', guid: 'ksj6mihnfawpcxkjnp4', specialization: 'L5', city: 'Amsterdam', companyName: 'Databricks', totalCompensation: '€181,000', totalCompensationNumber: 181000, totalCompensationDetails: '€104K salary, €18K bonus, €59K equity/year', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, { title: 'Product Designer I', guid: 'ksdjpaxellwnj5a6g3', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Uber', totalCompensation: '€76,000', totalCompensationNumber: 76000, totalCompensationDetails: '€60K salary, €6K bonus, €10K equity/year', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Product Manager II', guid: 'ksd2ovtbvpvntdu827', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Uber', totalCompensation: '€112,000', totalCompensationNumber: 112000, totalCompensationDetails: '€89K salary, €16K bonus, €8K equity/year, €9K benefits', baseSalary: '€7,375/month', baseSalaryNumber: 88500, oldYearForData: '', otherContext: '' }, { title: 'Principal Solution Engineer', guid: 'ksemu0wodgp3ysm6lf', specialization: '', city: 'Hybrid option', companyName: 'Salesforce', totalCompensation: '€166,000', totalCompensationNumber: 166000, totalCompensationDetails: '€118K salary, €39K bonus, €10K equity/year, €25K benefits', baseSalary: '€9,792/month', baseSalaryNumber: 117500, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksc1xxsyd0di8afxcqu', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€149,000', totalCompensationNumber: 149000, totalCompensationDetails: '€102K salary, €20K bonus, €10K sign-on, €17K equity/year', baseSalary: '€8,500/month', baseSalaryNumber: 102000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksek31mr7wzw0qs73z', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'GitHub', totalCompensation: '€141,000', totalCompensationNumber: 141000, totalCompensationDetails: '€116K salary, €17K bonus, €7K equity/year, €4K benefits', baseSalary: '€9,667/month', baseSalaryNumber: 116000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksekol5b04tkvu3ddaaa', specialization: '', city: 'Rotterdam (remote from anywhere)', companyName: 'Shopify', totalCompensation: '€134,000', totalCompensationNumber: 134000, totalCompensationDetails: '€108K salary, €26K equity/year, €5K benefits', baseSalary: '€9,000/month', baseSalaryNumber: 108000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksdpv09wv7jy93y1k9', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€131,000', totalCompensationNumber: 131000, totalCompensationDetails: '€100K salary, €20K bonus, €11K equity/year', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Software engineer', guid: 'ksdde6t6ab2svj50urn', specialization: 'Data Engineer', city: 'Remote within country', companyName: 'Twilio', totalCompensation: '€210,000', totalCompensationNumber: 210000, totalCompensationDetails: '€85K salary, €125K equity/year, €12K benefits', baseSalary: '€7,056/month', baseSalaryNumber: 84672, oldYearForData: '', otherContext: '' }, { title: 'Solutions Architect', guid: 'ksd7ley4ve3ew0bvvio', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Databricks', totalCompensation: '€214,000', totalCompensationNumber: 214000, totalCompensationDetails: '€120K salary, €24K bonus, €70K equity/year', baseSalary: '€10,000/month', baseSalaryNumber: 120000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineering Manager', guid: 'ksa4pjb3aw70vai1ej9', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€149,000', totalCompensationNumber: 149000, totalCompensationDetails: '€111K salary, €25K bonus, €13K equity/year', baseSalary: '€9,225/month', baseSalaryNumber: 110700, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb33ufgjuoqlrhr648', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€105,000', totalCompensationNumber: 105000, totalCompensationDetails: '€86K salary, €13K bonus, €6K equity/year', baseSalary: '€7,200/month', baseSalaryNumber: 86400, oldYearForData: '', otherContext: '' }, { title: 'Software Engineering Intern', guid: 'ksb30luba5knh4obcub', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€57,500', totalCompensationNumber: 57500, totalCompensationDetails: '', baseSalary: '€4,800/month', baseSalaryNumber: 57600, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ksb6excewpdpbij0ypq', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€145,000', totalCompensationNumber: 145000, totalCompensationDetails: '€102K salary, €14K bonus, €29K equity/year', baseSalary: '€8,500/month', baseSalaryNumber: 102000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb6g0yvv7wkgo0j7q', specialization: 'L3', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€82,500', totalCompensationNumber: 82500, totalCompensationDetails: '€69K salary, €8K bonus, €6K equity/year', baseSalary: '€5,750/month', baseSalaryNumber: 69000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb5hxfpnmoflz4kkq', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€129,000', totalCompensationNumber: 129000, totalCompensationDetails: '€90K salary, €15K bonus, €24K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Network engineer', guid: 'ksb4rio2rfbu00uglkl', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€96,500', totalCompensationNumber: 96500, totalCompensationDetails: '€78K salary, €12K bonus, €7K equity/year', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksafyuioh3v78e4cbb5', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Travel company with Dutch HQ', totalCompensation: '€131,000', totalCompensationNumber: 131000, totalCompensationDetails: '€100K salary, €20K bonus, €11K equity/year', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ksakk6j7hqiont14ng4', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€162,000', totalCompensationNumber: 162000, totalCompensationDetails: '€110K salary, €17K bonus, €35K equity/year', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Principal Developer', guid: 'ksa6c78kvndmzlv2iu', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€192,000', totalCompensationNumber: 192000, totalCompensationDetails: '€135K salary, €35K bonus, €22K equity/year', baseSalary: '€11,250/month', baseSalaryNumber: 135000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager ', guid: 'ksa82ckwe2d6s4b0ymf', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€161,000', totalCompensationNumber: 161000, totalCompensationDetails: '€125K salary, €25K bonus, €11K equity/year', baseSalary: '€10,417/month', baseSalaryNumber: 125000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'ksa5up9v2g684bbm0nr', specialization: '', city: 'Amsterdam', companyName: 'GitLab', totalCompensation: '€179,000', totalCompensationNumber: 179000, totalCompensationDetails: '€104K salary, €75K equity/year', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ksa6riidvtv74otghec', specialization: 'iOS', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€144,000', totalCompensationNumber: 144000, totalCompensationDetails: '€104K salary, €23K bonus, €17K equity/year', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksaa7lj1uvsgxx9eryi', specialization: '', city: 'Amsterdam (remote within country)', companyName: 'Booking.com', totalCompensation: '€150,000', totalCompensationNumber: 150000, totalCompensationDetails: '€107K salary, €21K bonus, €10K sign-on, €11K equity/year, €3K benefits', baseSalary: '€8,917/month', baseSalaryNumber: 107000, oldYearForData: '', otherContext: '' }, { title: 'Staff Software Engineer', guid: 'ksa5wky5jzjonqam3l', specialization: '', city: 'Remote', companyName: 'GitLab', totalCompensation: '€140,000', totalCompensationNumber: 140000, totalCompensationDetails: '€110K salary, €30K equity/year', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Senior Backend Developer', guid: 'ksayv3pv23q9ibn92pt', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€150,000', totalCompensationNumber: 150000, totalCompensationDetails: '€105K salary, €20K bonus, €25K equity/year', baseSalary: '€8,750/month', baseSalaryNumber: 105000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksahy5nd0zwdifs59i7', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€200,000', totalCompensationNumber: 200000, totalCompensationDetails: '€80K salary, €120K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksb4skl2x0txpnmzn6m', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€170,000', totalCompensationNumber: 170000, totalCompensationDetails: '€110K salary, €20K bonus, €40K equity/year', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer ', guid: 'ksaw2vsuzx3d9e3iyx', specialization: '', city: 'Amsterdam', companyName: '🔒 Trading company', totalCompensation: '€130,000', totalCompensationNumber: 130000, totalCompensationDetails: '€110K salary, €20K bonus', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksa810a2eozo9wcbqlg', specialization: '', city: 'Amsterdam', companyName: 'IMC Trading', totalCompensation: '€162,000', totalCompensationNumber: 162000, totalCompensationDetails: '€112K salary, €50K bonus', baseSalary: '€9,333/month', baseSalaryNumber: 112000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksakovde4eb9ikqcr5e', specialization: '', city: 'Amsterdam', companyName: 'IMC Trading', totalCompensation: '€187,000', totalCompensationNumber: 187000, totalCompensationDetails: '€107K salary, €80K bonus', baseSalary: '€8,917/month', baseSalaryNumber: 107000, oldYearForData: '', otherContext: '' }, { title: 'FPGA Engineer ', guid: 'ksb34nthl2sot2pp6x', specialization: '', city: 'Amsterdam', companyName: 'IMC Trading', totalCompensation: '€135,000', totalCompensationNumber: 135000, totalCompensationDetails: '€85K salary, €50K bonus', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '2020', otherContext: '' }, { title: 'Quantitative Technologist', guid: 'ksaymu8stf59jmif6ci', specialization: '', city: 'Amsterdam', companyName: '🔒 Proprietary Trading Firm ', totalCompensation: '€195,000', totalCompensationNumber: 195000, totalCompensationDetails: '€140K salary, €55K bonus', baseSalary: '€11,667/month', baseSalaryNumber: 140000, oldYearForData: '', otherContext: '' }, { title: 'Lead Software Engineer', guid: 'ksai2ss3xojhmnponld', specialization: '', city: 'Amsterdam', companyName: 'Salesforce', totalCompensation: '€149,000', totalCompensationNumber: 149000, totalCompensationDetails: '€104K salary, €16K bonus, €29K equity/year', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'ksay8lad1x9f44votrti', specialization: '', city: 'Amsterdam', companyName: 'Booking.<EMAIL>', totalCompensation: '€120,000', totalCompensationNumber: 120000, totalCompensationDetails: '€90K salary, €14K bonus, €17K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksayzmhrsenomhza0g', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€100,000', totalCompensationNumber: 100000, totalCompensationDetails: '€65K salary, €35K bonus', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksayshn88y07tpbf45g', specialization: '', city: 'Remote (remote within country)', companyName: 'GoDaddy', totalCompensation: '€153,000', totalCompensationNumber: 153000, totalCompensationDetails: '€118K salary, €11K bonus, €24K equity/year', baseSalary: '€9,833/month', baseSalaryNumber: 118000, oldYearForData: '', otherContext: '' }, { title: 'Software Development Engineer 2', guid: 'ksaz1og0a8uds2aojl', specialization: 'L5', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€143,000', totalCompensationNumber: 143000, totalCompensationDetails: '€71K salary, €72K equity/year', baseSalary: '€5,917/month', baseSalaryNumber: 71000, oldYearForData: '', otherContext: '' }, { title: 'Site Reliability Engineer', guid: 'ks74zrn52pdyg22dw75', specialization: '', city: 'Amsterdam', companyName: '🔒 Travel company with Dutch HQ', totalCompensation: '€131,000', totalCompensationNumber: 131000, totalCompensationDetails: '€92K salary, €14K bonus, €20K sign-on, €6K equity/year, €2K benefits, €8K relocation', baseSalary: '€7,667/month', baseSalaryNumber: 92000, oldYearForData: '', otherContext: '' }, { title: 'Senior Front End Developer', guid: 'ks7imlaxfnwa4v3z37', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Booking.com', totalCompensation: '€134,000', totalCompensationNumber: 134000, totalCompensationDetails: '€101K salary, €20K bonus, €13K equity/year, €5K relocation', baseSalary: '€8,375/month', baseSalaryNumber: 100500, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ks7dvtm6xg266e16qn', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Booking.com', totalCompensation: '€106,000', totalCompensationNumber: 106000, totalCompensationDetails: '€82K salary, €12K bonus, €6K sign-on, €6K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer ', guid: 'ks79sp1dc5hyex1wna8', specialization: '', city: 'Hybrid option', companyName: 'Elastic', totalCompensation: '€208,000', totalCompensationNumber: 208000, totalCompensationDetails: '€108K salary, €100K equity/year', baseSalary: '€9,000/month', baseSalaryNumber: 108000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'ks7o417032czjfqyp41', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Booking.com', totalCompensation: '€156,000', totalCompensationNumber: 156000, totalCompensationDetails: '€112K salary, €22K bonus, €10K sign-on, €11K equity/year, €3K benefits', baseSalary: '€9,333/month', baseSalaryNumber: 112000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer 2', guid: 'ks8u0qnlazumd11eh7v', specialization: 'L5', city: 'null (flexible days)', companyName: 'Amazon', totalCompensation: '€116,000', totalCompensationNumber: 116000, totalCompensationDetails: '€101K salary, €15K sign-on, €2K benefits, €5K relocation', baseSalary: '€8,417/month', baseSalaryNumber: 101000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ks8i9epfmtf1buvfpq8', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€127,000', totalCompensationNumber: 127000, totalCompensationDetails: '€102K salary, €12K bonus, €13K equity/year', baseSalary: '€8,458/month', baseSalaryNumber: 101500, oldYearForData: '', otherContext: '' }, { title: 'Lead Software Engineer', guid: 'kqkn0srvycr22cdf7p8', specialization: '', city: 'Amsterdam (remote within country)', companyName: '🔒 US cryptocurrency startup, Series C stage', totalCompensation: '€260,000', totalCompensationNumber: 260000, totalCompensationDetails: '€115K salary, €15K bonus, €15K sign-on, €115K equity/year', baseSalary: '€9,583/month', baseSalaryNumber: 115000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkmrzv652m0gk534df', specialization: '', city: 'Amsterdam', companyName: '🔒 Cryptocurrency company', totalCompensation: '€120,000', totalCompensationNumber: 120000, totalCompensationDetails: '€70K salary, €50K bonus', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer ', guid: 'kqjquzvsx3w71a1q19', specialization: '', city: 'Amsterdam', companyName: 'GitHub', totalCompensation: '€156,000', totalCompensationNumber: 156000, totalCompensationDetails: '€93K salary, €12K bonus, €51K equity/year, €6K benefits', baseSalary: '€7,750/month', baseSalaryNumber: 93000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'kqkxyi20ywukdor8le', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€156,000', totalCompensationNumber: 156000, totalCompensationDetails: '€102K salary, €20K bonus, €34K equity/year', baseSalary: '€8,500/month', baseSalaryNumber: 102000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjsnzdd4qk67ufpvhp', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€134,000', totalCompensationNumber: 134000, totalCompensationDetails: '€93K salary, €19K bonus, €22K equity/year', baseSalary: '€7,750/month', baseSalaryNumber: 93000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer 2', guid: 'kqjr2hr5rh1f2eeaxzn', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€135,000', totalCompensationNumber: 135000, totalCompensationDetails: '€90K salary, €11K bonus, €34K equity/year, €7K benefits', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjjayw9t2kkyzc9ta', specialization: '', city: 'Amsterdam', companyName: '🔒 FinTech company with Dutch HQ', totalCompensation: '€117,000', totalCompensationNumber: 117000, totalCompensationDetails: '€71K salary, €46K equity/year', baseSalary: '€5,917/month', baseSalaryNumber: 71000, oldYearForData: '', otherContext: '' }, { title: 'Software Development Engineer 2', guid: 'kqjivq4dt3xf2x1ayae', specialization: 'L5', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€123,000', totalCompensationNumber: 123000, totalCompensationDetails: '€95K salary, €8K bonus, €20K equity/year', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'kqjj4ps522147l840xe', specialization: '', city: 'Amsterdam', companyName: '🔒 FinTech company with Dutch HQ', totalCompensation: '€140,000', totalCompensationNumber: 140000, totalCompensationDetails: '€92K salary, €48K equity/year', baseSalary: '€7,667/month', baseSalaryNumber: 92000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjny37bmsgzptrgli', specialization: 'Level 6', city: 'Amsterdam', companyName: 'Elastic', totalCompensation: '€136,000', totalCompensationNumber: 136000, totalCompensationDetails: '€98K salary, €38K equity/year', baseSalary: '€8,167/month', baseSalaryNumber: 98000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer 2', guid: 'kqjregz4xj4k76nsdmc', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '€82K salary, €12K bonus, €16K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Principal Developer', guid: 'kqif6d6933qm3628e0g', specialization: '', city: 'Amsterdam', companyName: '🔒 Travel company with Dutch HQ', totalCompensation: '€238,000', totalCompensationNumber: 238000, totalCompensationDetails: '€126K salary, €45K bonus, €67K equity/year', baseSalary: '€10,500/month', baseSalaryNumber: 126000, oldYearForData: '', otherContext: '' }, { title: 'Staff Software Engineer', guid: 'kqi6tgv66r2vi3rgfit', specialization: '', city: 'Amsterdam', companyName: '🔒 Dutch FinTech company', totalCompensation: '€145,000', totalCompensationNumber: 145000, totalCompensationDetails: '€105K salary, €40K equity/year', baseSalary: '€8,750/month', baseSalaryNumber: 105000, oldYearForData: '', otherContext: '' }, { title: 'Senior Machine Learning Engineer ', guid: 'kqjqt7bopema6s09swj', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€159,000', totalCompensationNumber: 159000, totalCompensationDetails: '€105K salary, €20K bonus, €34K equity/year', baseSalary: '€8,750/month', baseSalaryNumber: 105000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqifxmzapw7qdwjip4', specialization: '', city: 'Amsterdam', companyName: '🔒 Ride sharing company', totalCompensation: '€170,000', totalCompensationNumber: 170000, totalCompensationDetails: '€115K salary, €20K bonus, €35K equity/year', baseSalary: '€9,583/month', baseSalaryNumber: 115000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqifb6g03gep7w36r0t', specialization: '', city: 'Amsterdam', companyName: 'Elastic', totalCompensation: '€149,000', totalCompensationNumber: 149000, totalCompensationDetails: '€115K salary, €34K equity/year', baseSalary: '€9,583/month', baseSalaryNumber: 115000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqif7hepa6s0kuo587w', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€178,000', totalCompensationNumber: 178000, totalCompensationDetails: '€120K salary, €20K bonus, €38K equity/year, €10K benefits', baseSalary: '€10,000/month', baseSalaryNumber: 120000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'kqievo5oqw8jau41of', specialization: '', city: 'Amsterdam', companyName: 'Booking.<EMAIL>', totalCompensation: '€130,000', totalCompensationNumber: 130000, totalCompensationDetails: '€100K salary, €20K bonus, €10K equity/year, €1K benefits', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Site Reliability Engineer', guid: 'kqi6xthvl3njn0m3hi', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€120,000', totalCompensationNumber: 120000, totalCompensationDetails: '€90K salary, €14K bonus, €17K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kqkxxtt942amec1gmrq', specialization: 'Core', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€121,000', totalCompensationNumber: 121000, totalCompensationDetails: '€88K salary, €13K bonus, €20K equity/year', baseSalary: '€7,333/month', baseSalaryNumber: 88000, oldYearForData: '', otherContext: '' }, { title: 'Product Manager', guid: 'kqhzfuwgeym8xq0q29', specialization: '', city: 'Amsterdam', companyName: '🔒 Travel company with Dutch HQ', totalCompensation: '€99,000', totalCompensationNumber: 99000, totalCompensationDetails: '€82K salary, €12K bonus, €5K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Principal Engineer', guid: 'kqjila51hb3wq4txhlv', specialization: 'L7', city: 'Amsterdam', companyName: 'Amazon ', totalCompensation: '€190,000', totalCompensationNumber: 190000, totalCompensationDetails: '€135K salary, €55K equity/year', baseSalary: '€11,250/month', baseSalaryNumber: 135000, oldYearForData: '', otherContext: '' }, { title: 'Principal Software Engineer', guid: 'kqjab9n6mr1gno550q', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€219,000', totalCompensationNumber: 219000, totalCompensationDetails: '€128K salary, €40K bonus, €51K equity/year', baseSalary: '€10,667/month', baseSalaryNumber: 128000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqj9s12908lfa2tvgwp9', specialization: '', city: 'Flexible days', companyName: 'Uber', totalCompensation: '€155,000', totalCompensationNumber: 155000, totalCompensationDetails: '€113K salary, €20K bonus, €22K equity/year', baseSalary: '€9,417/month', baseSalaryNumber: 113000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjr1nltk8g65auv53k', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€125,000', totalCompensationNumber: 125000, totalCompensationDetails: '€83K salary, €22K bonus, €20K equity/year', baseSalary: '€6,917/month', baseSalaryNumber: 83000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'krnxbmjq76o7tuto4w', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€132,000', totalCompensationNumber: 132000, totalCompensationDetails: '€103K salary, €19K bonus, €11K equity/year', baseSalary: '€8,542/month', baseSalaryNumber: 102500, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkwrt4jwelo24h1k08', specialization: 'Intern', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€45,900', totalCompensationNumber: 45900, totalCompensationDetails: '€46K salary, €10K benefits', baseSalary: '€3,825/month', baseSalaryNumber: 45900, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer 1', guid: 'krnx80tjlbpex2lf2np', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€103,000', totalCompensationNumber: 103000, totalCompensationDetails: '€78K salary, €9K bonus, €17K equity/year', baseSalary: '€6,483/month', baseSalaryNumber: 77800, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Analyst', guid: 'krnxirp28aghsssd3o5', specialization: '', city: 'Amsterdam', companyName: 'Uber', totalCompensation: '€143,000', totalCompensationNumber: 143000, totalCompensationDetails: '€80K salary, €13K bonus, €50K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'SDE 1', guid: 'krpdbmknypxnaoqolm', specialization: 'L4', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '€66K salary, €16K sign-on, €4K equity/year', baseSalary: '€5,535/month', baseSalaryNumber: 66420, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'kqku9gaxwmc67zs4uqm', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€141,000', totalCompensationNumber: 141000, totalCompensationDetails: '€104K salary, €16K bonus, €21K equity/year', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, ]
javaadpatel/tech-pays-eu-graphs
my-app/src/data/tier-1-companies.ts
export const data = [ { title: '🔒 Senior-level position within project management', guid: '8hkvhy34wc5c8h3vz06im', specialization: '', city: 'Veldhoven', companyName: 'ASML', totalCompensation: '€81,000', totalCompensationNumber: 81000, totalCompensationDetails: '€81K salary, €0K bonus', baseSalary: '€6,750/month', baseSalaryNumber: 81000, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'cckw0epq6c222kesqvhm1', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'DAZN', totalCompensation: '€98,000', totalCompensationNumber: 98000, totalCompensationDetails: '€85K salary, €13K bonus, €6K benefits', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Data Engineer', guid: '3skuy1kmepbg9zcdmctda', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'ING', totalCompensation: '€73,000', totalCompensationNumber: 73000, totalCompensationDetails: '€61K salary, €12K bonus', baseSalary: '€5,075/month', baseSalaryNumber: 60900, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'vdktu7j6vziqupvi3co4', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'ING ', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '€70K salary, €6K relocation', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within engineering management', guid: 'tckvpayali5ua97r82akn', specialization: '', city: 'Hybrid option', companyName: 'ING', totalCompensation: '€106,000', totalCompensationNumber: 106000, totalCompensationDetails: '', baseSalary: '€8,833/month', baseSalaryNumber: 106000, oldYearForData: '', otherContext: '' }, { title: '🔒 Above senior-level position within software engineering', guid: '45kww4m5m90fsop3v0vorb', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'ING', totalCompensation: '€109,000', totalCompensationNumber: 109000, totalCompensationDetails: '', baseSalary: '€9,083/month', baseSalaryNumber: 109000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'blkwvc66ar05lh4qfu5cid', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€63,500', totalCompensationNumber: 63500, totalCompensationDetails: '', baseSalary: '€5,300/month', baseSalaryNumber: 63600, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'rtkwv38a1ddodotac42zs', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€65,500', totalCompensationNumber: 65500, totalCompensationDetails: '', baseSalary: '€5,458/month', baseSalaryNumber: 65500, oldYearForData: '', otherContext: '' }, { title: 'IT engineer', guid: '4okwvsu1bhhs5qznves08', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '<NAME> ', totalCompensation: '€62,000', totalCompensationNumber: 62000, totalCompensationDetails: '', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: 'Application Development Analyst', guid: 'zzkwwkycd9wxbfvvnl43', specialization: '', city: 'Heerlen', companyName: 'Accenture', totalCompensation: '€35,400', totalCompensationNumber: 35400, totalCompensationDetails: '€34K salary, €1K bonus', baseSalary: '€2,833/month', baseSalaryNumber: 34000, oldYearForData: '', otherContext: '' }, { title: 'IT Development Engineer', guid: 'aokwwn5ca2iu5idxcc52', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '<NAME>', totalCompensation: '€63,000', totalCompensationNumber: 63000, totalCompensationDetails: '€63K salary, €12K benefits', baseSalary: '€5,250/month', baseSalaryNumber: 63000, oldYearForData: '', otherContext: '' }, { title: '🔒 Above senior-level position within software engineering', guid: 'xxkwx01p8jx2at0bwrbv', specialization: '', city: 'Veghel', companyName: '🔒 Dutch supermarket', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€73K salary, €4K bonus, €20K relocation', baseSalary: '€6,111/month', baseSalaryNumber: 73332, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'u5kwyraj2zbypewe8psli', specialization: '', city: 'Veghel', companyName: 'Jumbo', totalCompensation: '€56,500', totalCompensationNumber: 56500, totalCompensationDetails: '€53K salary, €4K bonus, €15K relocation', baseSalary: '€4,417/month', baseSalaryNumber: 53000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '26kwquy4118vk0lk4qist', specialization: 'Frontend', city: 'Amsterdam (hybrid option)', companyName: 'IKEA', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '€80K salary, €0K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Manager Platform Operations', guid: 'ksdhmmgqofyxju9tuu', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 PVH', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '€82K salary, €8K bonus, €3K benefits', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Lead Software Engineer', guid: 'ksj6urjqhbcjqgn506l', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'PVH', totalCompensation: '€80,500', totalCompensationNumber: 80500, totalCompensationDetails: '€73K salary, €7K bonus, €4K benefits', baseSalary: '€6,083/month', baseSalaryNumber: 73000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ujkv0qzd7xojpmqy4owoe', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'PVH', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€70K salary, €7K bonus, €0K benefits', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Software developer', guid: '6rkvo0s4fs0hafr45ik7b', specialization: '', city: 'Almere (flexible days)', companyName: '🔒 Local company', totalCompensation: '€62,000', totalCompensationNumber: 62000, totalCompensationDetails: '€56K salary, €6K bonus, €1K benefits', baseSalary: '€4,700/month', baseSalaryNumber: 56400, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer IV', guid: 's9kvv07whwtacbtwexu0r', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Leaseweb', totalCompensation: '€75,500', totalCompensationNumber: 75500, totalCompensationDetails: '€71K salary, €4K bonus, €1K equity/year, €8K benefits, €5K relocation', baseSalary: '€5,940/month', baseSalaryNumber: 71280, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'ksahuov1fjsc2i50osu', specialization: '', city: 'Amsterdam', companyName: 'Picnic', totalCompensation: '€73,000', totalCompensationNumber: 73000, totalCompensationDetails: '', baseSalary: '€6,083/month', baseSalaryNumber: 73000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'uoktsisl3ncvx38arj6jh', specialization: '', city: 'AMSTERDAM', companyName: 'Picnic', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager ', guid: 'j4ksxze95q0q2gg4pc3pdi', specialization: '', city: 'Amsterdam', companyName: 'Travix', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '€62K salary, €6K bonus', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: '2aktnka2n0exrldmcy5pn', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Travix', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: '24ku3zndbjv4868zjj43i', specialization: '', city: 'Utrecht (hybrid option)', companyName: 'Cargoguide', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '', baseSalary: '€4,752/month', baseSalaryNumber: 57024, oldYearForData: '', otherContext: '' }, { title: 'Software engineer', guid: 'wxkub11zoetr2jk25x0tk', specialization: '', city: 'Etten-Leur (hybrid option)', companyName: 'ABB', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'h0kupl133d1p1dgm332jk', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Fourthline', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Eigineer', guid: 'yykuzsm9gcxjqnd56t2dl', specialization: '', city: 'Amsterdam (flexible days)', companyName: '<NAME>', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Intern', guid: 'z5kvgusvkm509dl5jbq9k', specialization: '', city: 'Hybrid option', companyName: 'Microsoft', totalCompensation: '€10,400', totalCompensationNumber: 10400, totalCompensationDetails: '', baseSalary: '€864/month', baseSalaryNumber: 10368, oldYearForData: '', otherContext: '' }, { title: 'Backend Engineer', guid: '2gkvm2piwwqmv93s86kxb', specialization: '', city: 'Amsterdam', companyName: 'Backbase', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '€65K salary, €3K bonus, €34K benefits', baseSalary: '€5,400/month', baseSalaryNumber: 64800, oldYearForData: '', otherContext: '' }, { title: '🔒 Entry-level position within software engineering', guid: '84kvvhskd7akct5ds4l4', specialization: '', city: 'Hybrid option', companyName: 'Dutch Government', totalCompensation: '€45,200', totalCompensationNumber: 45200, totalCompensationDetails: '', baseSalary: '€3,770/month', baseSalaryNumber: 45240, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'azkw680p9dhgb59was5ur', specialization: 'Backend', city: 'Amsterdam (hybrid option)', companyName: 'Picnic', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '', baseSalary: '€4,750/month', baseSalaryNumber: 57000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: '1rkw67whfbmuyuy7z0lam', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Picnic', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '', baseSalary: '€4,750/month', baseSalaryNumber: 57000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'hqkwsaorfw7uz4su0voeb', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 Local startup', totalCompensation: '€61,000', totalCompensationNumber: 61000, totalCompensationDetails: '€61K salary, €1K benefits', baseSalary: '€5,083/month', baseSalaryNumber: 61000, oldYearForData: '', otherContext: '' }, { title: 'Junior Developer', guid: '0kkwv5dgl7576k0ykxuye', specialization: 'Backend', city: 'Amsterdam', companyName: 'azerion', totalCompensation: '€33,700', totalCompensationNumber: 33700, totalCompensationDetails: '', baseSalary: '€2,808/month', baseSalaryNumber: 33696, oldYearForData: '2020', otherContext: '' }, { title: 'Principal QA Engineer', guid: 'oyktbt9c6dn5vnx8if9o', specialization: '', city: 'Amsterdam', companyName: 'Backbase', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '€80K salary, €5K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Frontend Lead', guid: 'vmkvijpi1zd7xy65j7f4u', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Bunq', totalCompensation: '€58,500', totalCompensationNumber: 58500, totalCompensationDetails: '', baseSalary: '€4,860/month', baseSalaryNumber: 58320, oldYearForData: '', otherContext: '' }, { title: 'Senior frontend developer', guid: 't4kuwgu2biz4hvdauyey', specialization: '', city: 'Eindhoven (hybrid option)', companyName: 'Bankai', totalCompensation: '€43,200', totalCompensationNumber: 43200, totalCompensationDetails: '', baseSalary: '€3,600/month', baseSalaryNumber: 43200, oldYearForData: '', otherContext: '' }, { title: 'Design Engineer ', guid: 'dpkv41ethnwq3z0n50fzm', specialization: '', city: 'Eindhoven (flexible days)', companyName: 'ASML', totalCompensation: '€71,500', totalCompensationNumber: 71500, totalCompensationDetails: '€60K salary, €11K bonus, €1K benefits, €5K relocation', baseSalary: '€5,040/month', baseSalaryNumber: 60480, oldYearForData: '', otherContext: '' }, { title: 'Senior system engineer', guid: '3jkvmpred78qn60ctt4ul', specialization: '', city: 'Amsterdam', companyName: 'Bestseller', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'IT Analyst', guid: 'onkwvz7owh9u51rrg6yg4', specialization: '', city: 'Hybrid option', companyName: '🔒 Dutch University', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '€65K salary, €5K bonus, €6K benefits', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Frontend Developer', guid: '07ktk1ywn0r0lcktaqtlq', specialization: '', city: 'Utrecht (remote within country)', companyName: 'Rabobank', totalCompensation: '€71,500', totalCompensationNumber: 71500, totalCompensationDetails: '€72K salary, €2K benefits', baseSalary: '€5,958/month', baseSalaryNumber: 71500, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksfy7jhkfdxqlaa912', specialization: '', city: '', companyName: 'Adyen', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '€75K salary, €5K relocation', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Mission Critical Engineer', guid: 'b3kww4aczlf34jyoubtd4', specialization: '', city: 'Amsterdam (flexible days)', companyName: '<NAME>', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '€74K salary, €11K bonus, €8K benefits', baseSalary: '€6,167/month', baseSalaryNumber: 74000, oldYearForData: '', otherContext: '' }, { title: 'Principal System Engineer', guid: 'e4ktq0b8cj19v0yzwlj8f', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Backbase', totalCompensation: '€96,000', totalCompensationNumber: 96000, totalCompensationDetails: '€89K salary, €5K bonus, €2K sign-on', baseSalary: '€7,417/month', baseSalaryNumber: 89000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'ksk0idrwlpjim60cbl', specialization: '', city: 'Amsterdam', companyName: 'Mobiquity', totalCompensation: '€67,000', totalCompensationNumber: 67000, totalCompensationDetails: '€67K salary, €2K relocation', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '', otherContext: '' }, { title: '🔒 Above senior-level position within software engineering', guid: 'ksa6wvs52ozpamrap6j', specialization: '', city: 'Amsterdam', companyName: 'Mobiquity', totalCompensation: '€72,000', totalCompensationNumber: 72000, totalCompensationDetails: '', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksa6zqq8xvcmdvrq56b', specialization: '', city: 'Amsterdam', companyName: 'Mobiquity', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa6yi32r2o3h4hbvn', specialization: '', city: 'Amsterdam', companyName: 'Mobiquity', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior DevOps Engineer', guid: 'ksa6z9yfpf8peh7xhw', specialization: '', city: 'Amsterdam', companyName: 'Mobiquity', totalCompensation: '€67,000', totalCompensationNumber: 67000, totalCompensationDetails: '', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '', otherContext: '' }, { title: 'Principal Engineer', guid: 'ksa6xy0uhz1d4rj0lsv', specialization: '', city: 'Amsterdam', companyName: 'Mobiquity', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'ksaiclps63iir3uz3td', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€92,000', totalCompensationNumber: 92000, totalCompensationDetails: '€76K salary, €11K bonus, €5K equity/year', baseSalary: '€6,333/month', baseSalaryNumber: 76000, oldYearForData: '2017', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'u3kspwh6drzucaaa7ptg', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€42,000', totalCompensationNumber: 42000, totalCompensationDetails: '', baseSalary: '€3,500/month', baseSalaryNumber: 42000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksj95qva62t7klb1l9p', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€78,000', totalCompensationNumber: 78000, totalCompensationDetails: '', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'l6kst2twu2vlo49plyc4s', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€76K salary, €1K bonus', baseSalary: '€6,333/month', baseSalaryNumber: 76000, oldYearForData: '2020', otherContext: '' }, { title: 'Tech Lead', guid: '0jku83ff83prbnu8n9rc', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '', baseSalary: '€6,842/month', baseSalaryNumber: 82100, oldYearForData: '', otherContext: '' }, { title: 'Tech Lead', guid: 'g8ktoasvp4e777f05w06t', specialization: '', city: 'Rotterdam (flexible days)', companyName: 'Mendix', totalCompensation: '€71,000', totalCompensationNumber: 71000, totalCompensationDetails: '€64K salary, €8K bonus', baseSalary: '€5,292/month', baseSalaryNumber: 63500, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '23kt2pr9oz34bcc6okasi', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€68,500', totalCompensationNumber: 68500, totalCompensationDetails: '€62K salary, €7K equity/year', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ifkt9owe375h44dgibank', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€62,500', totalCompensationNumber: 62500, totalCompensationDetails: '€62K salary, €2K benefits, €3K relocation', baseSalary: '€5,200/month', baseSalaryNumber: 62400, oldYearForData: '', otherContext: '' }, { title: 'Medior Software Engineer', guid: '1zkuzfuj0vmmuxfz3d7ui', specialization: '', city: 'Rotterdam (remote from anywhere)', companyName: 'Mendix', totalCompensation: '€42,000', totalCompensationNumber: 42000, totalCompensationDetails: '', baseSalary: '€3,500/month', baseSalaryNumber: 42000, oldYearForData: '', otherContext: '' }, { title: 'Analyst', guid: 'k4ksr77bjjnndlckt99bp', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Deloitte', totalCompensation: '€36,300', totalCompensationNumber: 36300, totalCompensationDetails: '€36K salary, €6K benefits, €3K relocation', baseSalary: '€3,024/month', baseSalaryNumber: 36288, oldYearForData: '', otherContext: '' }, { title: 'Consultant, Risk Advisory, Cyber Risk Services, doing mostly engineering (junior)', guid: 'ksayckkl2kean942yg7', specialization: '', city: 'Amsterdam', companyName: 'Deloitte', totalCompensation: '€36,000', totalCompensationNumber: 36000, totalCompensationDetails: '', baseSalary: '€3,000/month', baseSalaryNumber: 36000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'nrksm9yie4ams8bl8thfp', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'BUX', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer ', guid: 'cmksr60t9aa68tf9maw4h', specialization: '', city: '', companyName: 'BUX', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '', baseSalary: '€4,769/month', baseSalaryNumber: 57222.12, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'b5ktlqb34lho6judbnm9b', specialization: 'Backend', city: 'Amsterdam', companyName: 'BUX', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kkktwqmpukbwi3m0cmd8g', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Tiqets', totalCompensation: '€78,000', totalCompensationNumber: 78000, totalCompensationDetails: '', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Machine Learning Engineer', guid: 'ksiu9oeu57bo2skwovp', specialization: '', city: 'Amsterdam', companyName: 'Tiqets', totalCompensation: '€52,000', totalCompensationNumber: 52000, totalCompensationDetails: '€52K salary, €2K benefits', baseSalary: '€4,333/month', baseSalaryNumber: 52000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'prkupky90sqlja718xlll', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Accenture', totalCompensation: '€45,000', totalCompensationNumber: 45000, totalCompensationDetails: '€45K salary, €3K relocation', baseSalary: '€3,750/month', baseSalaryNumber: 45000, oldYearForData: '2020', otherContext: '' }, { title: 'Medior Cloud Operations Engineer ', guid: 'ksixxkg65gjvk8y084y', specialization: '', city: 'Rotterdam', companyName: 'Mendix ', totalCompensation: '€49,800', totalCompensationNumber: 49800, totalCompensationDetails: '', baseSalary: '€4,150/month', baseSalaryNumber: 49800, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kuktjsxxcil8hzxkpifs', specialization: 'Frontend', city: 'Rotterdam (hybrid option)', companyName: 'Bynder', totalCompensation: '€41,400', totalCompensationNumber: 41400, totalCompensationDetails: '', baseSalary: '€3,450/month', baseSalaryNumber: 41400, oldYearForData: '', otherContext: '' }, { title: 'Medior software developer', guid: 'ohkt7li20404lmkwv1hul5', specialization: '', city: 'Utrecht', companyName: 'B<EMAIL>', totalCompensation: '€65,500', totalCompensationNumber: 65500, totalCompensationDetails: '€62K salary, €4K bonus', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: 'Backend Developer', guid: 'u2ktcpa759pue9y5wi5g', specialization: '', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€46,400', totalCompensationNumber: 46400, totalCompensationDetails: '€43K salary, €3K bonus', baseSalary: '€3,584/month', baseSalaryNumber: 43008, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'x8ktzi1nl4jeykqxslk0m', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Bunq', totalCompensation: '€37,200', totalCompensationNumber: 37200, totalCompensationDetails: '€37K salary, €1K benefits', baseSalary: '€3,100/month', baseSalaryNumber: 37200, oldYearForData: '', otherContext: '' }, { title: 'Junior Software Developer ', guid: 'rnksq5i68c610bfw110cv', specialization: '', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€33,700', totalCompensationNumber: 33700, totalCompensationDetails: '', baseSalary: '€2,808/month', baseSalaryNumber: 33696, oldYearForData: '', otherContext: '' }, { title: 'Senior Support Engineer ', guid: 'a4kuoa4jt2xz6xehzhz8s', specialization: '', city: '', companyName: 'Mendix', totalCompensation: '€53,000', totalCompensationNumber: 53000, totalCompensationDetails: '', baseSalary: '€4,417/month', baseSalaryNumber: 53000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'pwkvb24bqkojcurzsxpak', specialization: '', city: 'Hoofddorp', companyName: 'Irdeto', totalCompensation: '€69,000', totalCompensationNumber: 69000, totalCompensationDetails: '', baseSalary: '€5,760/month', baseSalaryNumber: 69120, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksixtjb7sgi2b4ab9e', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'IKEA', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'qmkud590djxsbqgi81dd9', specialization: '', city: 'Amsterdam', companyName: 'IKEA', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '', otherContext: '' }, { title: 'Senior software engineer ', guid: 'f2ksrz9hhng9d0dvt0o4p', specialization: '', city: 'Amsterdam', companyName: 'KPN', totalCompensation: '€82,500', totalCompensationNumber: 82500, totalCompensationDetails: '€78K salary, €5K bonus', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksaw7a7pames5no1vzo', specialization: '', city: 'Amsterdam', companyName: 'KPN', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '€78K salary, €7K bonus', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer Trainee', guid: 'rdkta50y7rg0xygsunen', specialization: '', city: 'Rotterdam', companyName: 'KPN', totalCompensation: '€50,000', totalCompensationNumber: 50000, totalCompensationDetails: '€45K salary, €5K bonus', baseSalary: '€3,750/month', baseSalaryNumber: 45000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '4pktftiijo5yqttcm7m3m', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'KPN', totalCompensation: '€67,500', totalCompensationNumber: 67500, totalCompensationDetails: '€62K salary, €6K bonus, €12K benefits, €1K relocation', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksbmgeu956opx4bn0dr', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'TomTom', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '2020', otherContext: '' }, { title: 'Data Scientist ', guid: 'ncksvmmd7uw26sw8csd9', specialization: '', city: '', companyName: 'TomTom', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'UX Designer', guid: 'cnktrk2e43nfjnibx03b', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'TomTom', totalCompensation: '€74,000', totalCompensationNumber: 74000, totalCompensationDetails: '€70K salary, €4K sign-on', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksk6vpzpobh8tf1611', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'TomTom', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: '🔒 Above senior-level position within software engineering', guid: 'jkkto243tsuuxmoxs4rrb', specialization: '', city: 'Amsterdam', companyName: 'TomTom', totalCompensation: '€97,000', totalCompensationNumber: 97000, totalCompensationDetails: '€90K salary, €7K bonus', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'yskv7xjn2onjmjfpt60b', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'TomTom', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Data Engineer', guid: 'uzkvf4i5szn86kbamki1', specialization: '', city: 'Hoofddorp', companyName: 'FedEx', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '€74K salary, €1K bonus', baseSalary: '€6,167/month', baseSalaryNumber: 74000, oldYearForData: '2019', otherContext: '' }, { title: 'IT Director', guid: '1kktcsw5ug7hi69avuprk', specialization: '', city: 'Flexible days', companyName: '🔒 Information services provider', totalCompensation: '€139,000', totalCompensationNumber: 139000, totalCompensationDetails: '€107K salary, €32K bonus', baseSalary: '€8,917/month', baseSalaryNumber: 107000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ncksqkwgcw51cgjklnkhm', specialization: '', city: 'Utrecht (flexible days)', companyName: 'Bol.com', totalCompensation: '€73,000', totalCompensationNumber: 73000, totalCompensationDetails: '€67K salary, €5K bonus, €19K benefits', baseSalary: '€5,616/month', baseSalaryNumber: 67392, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'v4ksui0v65mxnpmccmyw', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€77,500', totalCompensationNumber: 77500, totalCompensationDetails: '€67K salary, €10K bonus, €1K equity/year', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'ksiuodxadxj1m5cp0lj', specialization: '', city: 'Amsterdam', companyName: 'Werkspot', totalCompensation: '€78,000', totalCompensationNumber: 78000, totalCompensationDetails: '€78K salary, €2K relocation', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ksepo1r47hphkv7dvqu', specialization: 'SAP', city: 'Den Haag', companyName: 'Dutch Government', totalCompensation: '€79,500', totalCompensationNumber: 79500, totalCompensationDetails: '€80K salary, €12K benefits', baseSalary: '€6,646/month', baseSalaryNumber: 79748, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'ksg1r6y9xfc3zaj9pfo', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€56,000', totalCompensationNumber: 56000, totalCompensationDetails: '', baseSalary: '€4,667/month', baseSalaryNumber: 56000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksh6arx1c0rzxmx63ht', specialization: '', city: 'Amsterdam', companyName: 'Q42', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '€54K salary, €3K bonus, €5K benefits', baseSalary: '€4,536/month', baseSalaryNumber: 54432, oldYearForData: '', otherContext: '' }, { title: 'Cyber Security Consultant', guid: 'k7kudwlp69ad6gmihhpeh', specialization: '', city: 'Utrecht (flexible days)', companyName: '🔒 Telecommunications Provider', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '€60K salary, €5K bonus, €14K benefits', baseSalary: '€4,968/month', baseSalaryNumber: 59616, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'j8kueyuphi7w37bnnfsoi', specialization: '', city: 'Utrecht (hybrid option)', companyName: '🔒 CAD Software ', totalCompensation: '€49,900', totalCompensationNumber: 49900, totalCompensationDetails: '€45K salary, €5K bonus, €8K benefits', baseSalary: '€3,780/month', baseSalaryNumber: 45360, oldYearForData: '', otherContext: '' }, { title: 'Network Engineer', guid: 'yqkufpqsn62kja538zwyu', specialization: '', city: 'Diemen', companyName: 'Routz', totalCompensation: '€71,000', totalCompensationNumber: 71000, totalCompensationDetails: '€67K salary, €3K bonus', baseSalary: '€5,616/month', baseSalaryNumber: 67392, oldYearForData: '', otherContext: '' }, { title: 'SD-WAN Network Engineer', guid: 'jekufpw5ohj2gwjcx9mfd', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Expereo', totalCompensation: '€62,500', totalCompensationNumber: 62500, totalCompensationDetails: '€57K salary, €6K bonus', baseSalary: '€4,752/month', baseSalaryNumber: 57024, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'ykkufvu7cgg2nedff1qsu', specialization: '', city: 'Amsterdam', companyName: 'Chipsoft', totalCompensation: '€72,500', totalCompensationNumber: 72500, totalCompensationDetails: '€67K salary, €5K bonus', baseSalary: '€5,600/month', baseSalaryNumber: 67200, oldYearForData: '', otherContext: '' }, { title: 'Development Engineer', guid: 'u3kuh4qhii1ys2wowo9br', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€45,500', totalCompensationNumber: 45500, totalCompensationDetails: '', baseSalary: '€3,792/month', baseSalaryNumber: 45500, oldYearForData: '', otherContext: '' }, { title: 'Product Owner', guid: 'vakuh6bao505q6p0m8z2uh', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '<NAME>', totalCompensation: '€55,000', totalCompensationNumber: 55000, totalCompensationDetails: '', baseSalary: '€4,600/month', baseSalaryNumber: 55200, oldYearForData: '', otherContext: '' }, { title: 'Senior Product Manager', guid: 'xcksvqxu46qosrfxln8x', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'DAZN', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€77K salary, €0K benefits', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa75bedp500huxsmrj', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '€75K salary, €5K bonus', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa6nevyv2pc1ux98v', specialization: '', city: 'Hilversum', companyName: 'Nike', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '€70K salary, €10K bonus', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Product Manager', guid: 'ksa5qtx73qsc2we2tlz', specialization: '', city: 'Amsterdam', companyName: 'NewMotion', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksa5oepv70kpc2g67c', specialization: '', city: 'Amsterdam', companyName: 'NewMotion', totalCompensation: '€54,000', totalCompensationNumber: 54000, totalCompensationDetails: '', baseSalary: '€4,500/month', baseSalaryNumber: 54000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksa5izg6c9puu9k9qn7', specialization: '', city: 'Amsterdam', companyName: 'NewMotion', totalCompensation: '€80,500', totalCompensationNumber: 80500, totalCompensationDetails: '€75K salary, €6K bonus', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksa5do05nwstjils197', specialization: 'Mobile', city: 'iOS', companyName: 'Qardio', totalCompensation: '€50,000', totalCompensationNumber: 50000, totalCompensationDetails: '', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ksa5cmawup4gfus7aof', specialization: '', city: 'Amsterdam', companyName: '🔒 Health tech', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ksa5argk4wjhv90silm', specialization: 'Mobile', city: 'Amsterdam', companyName: 'Qardio', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa57db0tnfcwxdh3c9', specialization: '', city: 'Amsterdam', companyName: 'albelli', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksa56vv9eh0grhb9367', specialization: '', city: 'Amsterdam', companyName: 'albelli', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'eskuigkf1vbkr9ssu0899', specialization: '', city: 'Amsterdam (flexible days)', companyName: '<NAME>', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '', baseSalary: '€5,500/month', baseSalaryNumber: 66000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior software engineer', guid: 'oakuiunwguh2m933ficl', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€78,000', totalCompensationNumber: 78000, totalCompensationDetails: '€78K salary, €2K benefits', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'sdkuiggavnllmzwbyvc8', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'DAZN', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '€68K salary, €2K relocation', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '2019', otherContext: '' }, { title: 'Junior data scientist', guid: '7gkuip5jqwxnra9sbiel9', specialization: '', city: 'Amsterdam', companyName: '🔒 Local Dutch startup', totalCompensation: '€38,000', totalCompensationNumber: 38000, totalCompensationDetails: '€38K salary, €2K relocation', baseSalary: '€3,167/month', baseSalaryNumber: 38000, oldYearForData: '', otherContext: '' }, { title: 'Backend Developer', guid: '49kuionlvln9swsxdq1x9', specialization: '', city: 'Amsterdam', companyName: 'Appical', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'DevOps Engineer', guid: '0pkudogqfz6ass45th0gk', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'KPN', totalCompensation: '€58,500', totalCompensationNumber: 58500, totalCompensationDetails: '€54K salary, €4K bonus, €7K benefits', baseSalary: '€4,500/month', baseSalaryNumber: 54000, oldYearForData: '', otherContext: '' }, { title: 'Senior Support Engineer ', guid: '9gkuie9qol31qvo78d8w3', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€58,000', totalCompensationNumber: 58000, totalCompensationDetails: '€52K salary, €6K bonus', baseSalary: '€4,333/month', baseSalaryNumber: 52000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'azkswzr71uwtevufsqc0l', specialization: 'Backend', city: 'Amsterdam', companyName: 'Secfi', totalCompensation: '€52,000', totalCompensationNumber: 52000, totalCompensationDetails: '€50K salary, €2K bonus, €4K benefits', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '', otherContext: '' }, { title: 'Senior Product Manager', guid: 'arksyv3c9egi11h8frkmv', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Chinese telecommunications &amp; consumer electronics company', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer ', guid: 'oukt326xe3tovx9dqdejd', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'DEGIRO', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '€78K salary, €8K bonus', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '2020', otherContext: '' }, { title: 'Data Scientist', guid: 'cikt61682cv357p1f04mj', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '€65K salary, €1K benefits, €3K relocation', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Systems Engineer', guid: '1wksu5kke1oyw157fk7i', specialization: '', city: 'Utrecht', companyName: 'Bol.com', totalCompensation: '€66,500', totalCompensationNumber: 66500, totalCompensationDetails: '€63K salary, €4K bonus, €4K relocation', baseSalary: '€5,238/month', baseSalaryNumber: 62856, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'l2ksu5s9woj182e2bnv2c', specialization: '', city: 'Amsterdam', companyName: '🔒 Local Dutch Startup', totalCompensation: '€48,600', totalCompensationNumber: 48600, totalCompensationDetails: '', baseSalary: '€4,050/month', baseSalaryNumber: 48600, oldYearForData: '', otherContext: '' }, { title: 'DevOps Engineer', guid: 'edkssuuh5t4b0k2cpnjyp', specialization: '', city: 'Lijnden', companyName: 'Wortell', totalCompensation: '€40,200', totalCompensationNumber: 40200, totalCompensationDetails: '', baseSalary: '€3,348/month', baseSalaryNumber: 40176, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'tjksu616av6gexy82iu0f', specialization: '', city: 'amsterdam (hybrid option)', companyName: '<NAME>', totalCompensation: '€53,000', totalCompensationNumber: 53000, totalCompensationDetails: '€48K salary, €5K bonus', baseSalary: '€4,000/month', baseSalaryNumber: 48000, oldYearForData: '', otherContext: '' }, { title: 'Data Engineer', guid: 'x8ksu6ohyjgtp8m0ujf0f', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Local Dutch Startup', totalCompensation: '€38,400', totalCompensationNumber: 38400, totalCompensationDetails: '', baseSalary: '€3,200/month', baseSalaryNumber: 38400, oldYearForData: '', otherContext: '' }, { title: 'DevOps Engineer', guid: 'taksrhxbdzyew4g3h9vx', specialization: '', city: 'Eindhoven', companyName: '🔒 Developer consultancy', totalCompensation: '€44,100', totalCompensationNumber: 44100, totalCompensationDetails: '€41K salary, €3K bonus, €7K benefits', baseSalary: '€3,400/month', baseSalaryNumber: 40800, oldYearForData: '', otherContext: '' }, { title: '🔒 Engineering leadership executive', guid: 'wpksrw29fwsxxr3rrfuy8', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Backbase', totalCompensation: '€119,000', totalCompensationNumber: 119000, totalCompensationDetails: '€108K salary, €11K bonus, €17K benefits', baseSalary: '€9,000/month', baseSalaryNumber: 108000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kslin99cm2o3fllnlok', specialization: '', city: 'Almere (flexible days)', companyName: '<NAME>', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: '43ksmdgzhgtb5vepi8xag', specialization: '', city: 'Hoofddorp', companyName: 'Ingenico', totalCompensation: '€86,500', totalCompensationNumber: 86500, totalCompensationDetails: '€79K salary, €8K bonus', baseSalary: '€6,588/month', baseSalaryNumber: 79056, oldYearForData: '', otherContext: '' }, { title: '<NAME>', guid: '1gksni2d85ts41g58gvxm', specialization: '', city: 'Breda', companyName: '🔒 Communications sector', totalCompensation: '€63,500', totalCompensationNumber: 63500, totalCompensationDetails: '', baseSalary: '€5,292/month', baseSalaryNumber: 63504, oldYearForData: '', otherContext: '' }, { title: 'Security Specialist', guid: 'u7kspn7gjlky67sp8mzmf', specialization: '', city: 'Utrecht (hybrid option)', companyName: '🔒 Security Consultancy', totalCompensation: '€52,500', totalCompensationNumber: 52500, totalCompensationDetails: '€53K salary, €9K benefits', baseSalary: '€4,380/month', baseSalaryNumber: 52560, oldYearForData: '', otherContext: '' }, { title: 'Software engineer', guid: 'nrksqjownt60zf08u6128', specialization: '', city: 'Deventer (flexible days)', companyName: '🔒 IT service provider company', totalCompensation: '€51,500', totalCompensationNumber: 51500, totalCompensationDetails: '€45K salary, €6K bonus, €2K benefits', baseSalary: '€3,780/month', baseSalaryNumber: 45360, oldYearForData: '2020', otherContext: '' }, { title: 'Mission Critical Engineer', guid: '5yksrfiqg9dozsh5dj938', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€84,000', totalCompensationNumber: 84000, totalCompensationDetails: '€73K salary, €11K bonus, €9K benefits', baseSalary: '€6,083/month', baseSalaryNumber: 73000, oldYearForData: '', otherContext: '' }, { title: 'Mission Critical Engineer', guid: '0uksrhiakjpr9iiizk24o', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '<NAME>', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '€65K salary, €10K bonus, €5K relocation', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'wzksra5p9uajwhww9ikhc', specialization: '', city: 'Eindhoven (flexible days)', companyName: '🔒 Infrastructure and networking', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'kshalvwoy5d2r2j203c', specialization: '', city: 'Rotterdam', companyName: 'Coolblue', totalCompensation: '€63,000', totalCompensationNumber: 63000, totalCompensationDetails: '€63K salary, €2K relocation', baseSalary: '€5,250/month', baseSalaryNumber: 63000, oldYearForData: '2018', otherContext: '' }, { title: 'Team Lead', guid: '3gksmwsv6luc10jwco5ri', specialization: 'Tech', city: 'Rotterdam (hybrid option)', companyName: 'Coolblue', totalCompensation: '€67,000', totalCompensationNumber: 67000, totalCompensationDetails: '', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'kvksollygbnwntmji7lu', specialization: 'Tech', city: 'Rotterdam', companyName: 'Coolblue', totalCompensation: '€72,500', totalCompensationNumber: 72500, totalCompensationDetails: '', baseSalary: '€6,048/month', baseSalaryNumber: 72576, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kskmt4itd9ters20eui', specialization: '', city: 'Hybrid option', companyName: '🔒 Dutch e-commerce company', totalCompensation: '€71,500', totalCompensationNumber: 71500, totalCompensationDetails: '€67K salary, €4K bonus, €3K benefits', baseSalary: '€5,616/month', baseSalaryNumber: 67392, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'b5ksn59xz6z5fp7hiqwlo', specialization: '', city: 'Amsterdam', companyName: '🔒 Fitness software', totalCompensation: '€71,000', totalCompensationNumber: 71000, totalCompensationDetails: '€71K salary, €3K relocation', baseSalary: '€5,910/month', baseSalaryNumber: 70917, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa6124u50ptfw2bfqb', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€74,000', totalCompensationNumber: 74000, totalCompensationDetails: '€74K salary, €4K benefits', baseSalary: '€6,167/month', baseSalaryNumber: 74000, oldYearForData: '', otherContext: '' }, { title: 'Mission Critical Engineer', guid: 'ksit290bpi2rmr4l1gs', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€72,500', totalCompensationNumber: 72500, totalCompensationDetails: '€63K salary, €9K bonus, €6K benefits', baseSalary: '€5,250/month', baseSalaryNumber: 63000, oldYearForData: '2020', otherContext: '' }, { title: 'Data Scientist II', guid: '05kspufbp6sb6qd9zuw6', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kslghtyq30zb65jiq9e', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Catawiki', totalCompensation: '€71,000', totalCompensationNumber: 71000, totalCompensationDetails: '€71K salary, €4K relocation', baseSalary: '€5,917/month', baseSalaryNumber: 71000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksj0es54zvw6e2zqrzc', specialization: '', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€41,500', totalCompensationNumber: 41500, totalCompensationDetails: '', baseSalary: '€3,456/month', baseSalaryNumber: 41472, oldYearForData: '', otherContext: '' }, { title: 'Machine Learning Engineer', guid: 'ksiuglkgfkspom59e7a', specialization: '', city: 'Amsterdam', companyName: 'Tiqets', totalCompensation: '€36,400', totalCompensationNumber: 36400, totalCompensationDetails: '', baseSalary: '€3,033/month', baseSalaryNumber: 36400, oldYearForData: '2019', otherContext: '' }, { title: 'Software Engineer', guid: 'ksivofhwtiq10syaj1', specialization: '', city: 'Delft (remote from anywhere)', companyName: 'Startup with a full-remote team', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '€54K salary, €3K bonus', baseSalary: '€4,500/month', baseSalaryNumber: 54000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksit1exm94sk7a72x5w', specialization: '', city: 'Eindhoven', companyName: 'TomTom', totalCompensation: '€61,000', totalCompensationNumber: 61000, totalCompensationDetails: '', baseSalary: '€5,083/month', baseSalaryNumber: 61000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kseinoqvn1yebvbjnbm', specialization: '', city: 'Amsterdam', companyName: 'TomTom', totalCompensation: '€78,000', totalCompensationNumber: 78000, totalCompensationDetails: '', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksho4361f5yxkno2mbw', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€77,500', totalCompensationNumber: 77500, totalCompensationDetails: '€78K salary, €6K benefits', baseSalary: '€6,458/month', baseSalaryNumber: 77500, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kshh1nwvft1vr4v48s', specialization: '', city: 'Amsterdam', companyName: 'BUX', totalCompensation: '€72,500', totalCompensationNumber: 72500, totalCompensationDetails: '€73K salary, €1K benefits', baseSalary: '€6,042/month', baseSalaryNumber: 72500, oldYearForData: '', otherContext: '' }, { title: 'Data Science', guid: 'kshjkwclffqwgqqjohk', specialization: '', city: '', companyName: 'Bunq', totalCompensation: '€43,000', totalCompensationNumber: 43000, totalCompensationDetails: '', baseSalary: '€3,583/month', baseSalaryNumber: 43000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within product management', guid: 'kshiduqh5lv6wp019jx', specialization: '', city: 'Amsterdam', companyName: 'TomTom', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '€70K salary, €2K relocation', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ksitpgmwnmvlmmxww0n', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Weborama Nederland', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '€64K salary, €1K benefits, €2K relocation', baseSalary: '€5,333/month', baseSalaryNumber: 64000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksj9ssn3lsb9f3bhigl', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'DAZN', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kshugb6n6g7vt3vq1zd', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Elsevier', totalCompensation: '€79,000', totalCompensationNumber: 79000, totalCompensationDetails: '€75K salary, €4K bonus', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Data Engineer', guid: 'kshxqztc8b6nqeykzjk', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'TomTom', totalCompensation: '€55,000', totalCompensationNumber: 55000, totalCompensationDetails: '€55K salary, €5K benefits', baseSalary: '€4,583/month', baseSalaryNumber: 55000, oldYearForData: '', otherContext: '' }, { title: 'Senior Data Engineer', guid: 'ksj6ocjas36csjpr3sg', specialization: '', city: 'Amsterdam', companyName: 'TomTom', totalCompensation: '€76,000', totalCompensationNumber: 76000, totalCompensationDetails: '€72K salary, €4K bonus', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kseodc632d11fq9e56s', specialization: '', city: 'Rotterdam', companyName: 'Youwe', totalCompensation: '€38,400', totalCompensationNumber: 38400, totalCompensationDetails: '', baseSalary: '€3,200/month', baseSalaryNumber: 38400, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksepqrjx8a5mfc9r5fo', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineering Manager', guid: 'ksb637tmal6a4b3usra', specialization: '', city: 'Amsterdam', companyName: 'Bynder', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '€63K salary, €5K bonus', baseSalary: '€5,250/month', baseSalaryNumber: 63000, oldYearForData: '2019', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksekhw3gosm3f1arpqg', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€73,000', totalCompensationNumber: 73000, totalCompensationDetails: '€73K salary, €4K benefits', baseSalary: '€6,083/month', baseSalaryNumber: 73000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kshmorrtkq52v3wcltg', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€48,500', totalCompensationNumber: 48500, totalCompensationDetails: '€48K salary, €1K bonus, €3K benefits', baseSalary: '€3,958/month', baseSalaryNumber: 47500, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'kshgoud9qzzj348eqes', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€68,500', totalCompensationNumber: 68500, totalCompensationDetails: '', baseSalary: '€5,692/month', baseSalaryNumber: 68300, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within engineering management', guid: 'ksihqhpxi3i8k96zp7m', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '€73K salary, €3K bonus', baseSalary: '€6,042/month', baseSalaryNumber: 72500, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'kshtmc4kuzargkrfk5o', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€76,000', totalCompensationNumber: 76000, totalCompensationDetails: '', baseSalary: '€6,333/month', baseSalaryNumber: 76000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksiotgq1gwq7r1yt24w', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Mendix', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksi0tjonnccvpvh89br', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€56,000', totalCompensationNumber: 56000, totalCompensationDetails: '€56K salary, €3K benefits', baseSalary: '€4,650/month', baseSalaryNumber: 55800, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'ksinr3kw5g6d4gpo9so', specialization: 'Full Stack', city: 'Remote (remote from anywhere)', companyName: 'Relive', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '€70K salary, €1K benefits', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Data Engineer', guid: 'kshhshlf2nlbw7k6rj2', specialization: '', city: 'Ijmuiden', companyName: '<NAME>', totalCompensation: '€55,000', totalCompensationNumber: 55000, totalCompensationDetails: '', baseSalary: '€4,583/month', baseSalaryNumber: 55000, oldYearForData: '', otherContext: '' }, { title: 'Senior Product Owner', guid: 'ksikypgio9gubxtws6', specialization: '', city: 'Amsterdam (flexible days)', companyName: '<NAME> <EMAIL>', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '€82K salary, €1K benefits', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb32enzja8vgp8dlb', specialization: '', city: 'Eindhoven', companyName: 'Vanderlande', totalCompensation: '€52,000', totalCompensationNumber: 52000, totalCompensationDetails: '', baseSalary: '€4,333/month', baseSalaryNumber: 52000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer intern', guid: 'ksd7ypbs6swodk2x5zu', specialization: '', city: 'Heerlen, Limburg (remote within country)', companyName: 'HiThere', totalCompensation: '€4,200', totalCompensationNumber: 4200, totalCompensationDetails: '', baseSalary: '€350/month', baseSalaryNumber: 4200, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksaw62sddodtgfquxf5', specialization: '', city: 'Amsterdam', companyName: 'Anchormen', totalCompensation: '€62,000', totalCompensationNumber: 62000, totalCompensationDetails: '', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksbe3n3d5dfiwf31nvr', specialization: '', city: 'Amsterdam', companyName: '🔒 Travel agency', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '', baseSalary: '€5,508/month', baseSalaryNumber: 66096, oldYearForData: '2020', otherContext: '' }, { title: 'Lead Software Engineer', guid: 'ksa590si0ncidpjdkok', specialization: '', city: 'Amsterdam', companyName: 'VanMoof', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '', otherContext: '' }, { title: 'Frontend Engineer', guid: 'ksayp30fw659hs93mk', specialization: '', city: 'Amsterdam', companyName: 'MessageBird', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '', baseSalary: '€5,500/month', baseSalaryNumber: 66000, oldYearForData: '', otherContext: '' }, { title: 'IT Engineer (Mid-level)', guid: 'ksa5g68kici193x6jqg', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksaz40p8v96f4mbnvxm', specialization: 'Research and Development', city: 'Amsterdam', companyName: 'TomTom', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksayk6bxm78ktjzlwjb', specialization: '', city: 'Amsterdam', companyName: 'Elsevier', totalCompensation: '€67,000', totalCompensationNumber: 67000, totalCompensationDetails: '€64K salary, €3K bonus', baseSalary: '€5,333/month', baseSalaryNumber: 64000, oldYearForData: '2019', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa7mnk0ahesbexnr4b', specialization: '', city: 'Amsterdam', companyName: 'Bol.com', totalCompensation: '€67,000', totalCompensationNumber: 67000, totalCompensationDetails: '€64K salary, €3K bonus', baseSalary: '€5,333/month', baseSalaryNumber: 64000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksax75sn09792ccas25', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Backbase', totalCompensation: '€62,000', totalCompensationNumber: 62000, totalCompensationDetails: '€60K salary, €3K bonus', baseSalary: '€4,959/month', baseSalaryNumber: 59508, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksa4stbirw6ghftqdfr', specialization: 'Backend', city: 'Amsterdam', companyName: 'Startup (seed stage)', totalCompensation: '€65,500', totalCompensationNumber: 65500, totalCompensationDetails: '€65K salary, €1K equity/year', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa66u2psa0n2umk3qj', specialization: '', city: 'Amsterdam', companyName: 'PostNL', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksakv1wiqq4ifbiorr', specialization: '', city: 'Amsterdam', companyName: 'PostNL', totalCompensation: '€73,500', totalCompensationNumber: 73500, totalCompensationDetails: '€72K salary, €1K bonus', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa65z3b06ygcszvl8m', specialization: '', city: 'Amsterdam', companyName: 'PostNL', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'ksa65jo1zahe5a3n4o', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€62,000', totalCompensationNumber: 62000, totalCompensationDetails: '', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Developer', guid: 'ksayr884kv6q33dmix', specialization: 'C#', city: 'Rotterdam', companyName: 'Coolblue', totalCompensation: '€50,000', totalCompensationNumber: 50000, totalCompensationDetails: '', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist ', guid: 'ksal1d6zqm8ahpaa2uk', specialization: '', city: 'Utrecht', companyName: 'Bol.com', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '€50K salary, €7K bonus', baseSalary: '€4,160/month', baseSalaryNumber: 49920, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb66acd8s3nck55xec', specialization: '', city: 'Rotterdam', companyName: 'Bol.com', totalCompensation: '€49,000', totalCompensationNumber: 49000, totalCompensationDetails: '€45K salary, €4K bonus', baseSalary: '€3,708/month', baseSalaryNumber: 44500, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'ksa608dmfafw5f487vo', specialization: 'Backend', city: 'Amsterdam', companyName: 'Backbase', totalCompensation: '€61,000', totalCompensationNumber: 61000, totalCompensationDetails: '€59K salary, €2K bonus', baseSalary: '€4,917/month', baseSalaryNumber: 59000, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'ksatln2oirlcn6ixf6', specialization: '', city: 'Utrecht', companyName: 'Bol.com', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '€50K salary, €7K bonus', baseSalary: '€4,160/month', baseSalaryNumber: 49920, oldYearForData: '2020', otherContext: '' }, { title: 'Data Scientist', guid: 'ksayum08ipwhfqab7b', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksaw3l6apkhba4xhya', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€55,000', totalCompensationNumber: 55000, totalCompensationDetails: '€51K salary, €4K bonus', baseSalary: '€4,250/month', baseSalaryNumber: 51000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksa5i6s7l16iepmgtb9', specialization: 'Frontend', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€53,000', totalCompensationNumber: 53000, totalCompensationDetails: '', baseSalary: '€4,417/month', baseSalaryNumber: 53000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksakf6gogxotfgmmxm5', specialization: '', city: 'Eindhoven', companyName: '<NAME>', totalCompensation: '€32,000', totalCompensationNumber: 32000, totalCompensationDetails: '', baseSalary: '€2,667/month', baseSalaryNumber: 32000, oldYearForData: '2020', otherContext: '' }, { title: 'Tech Lead', guid: 'ksadkcqxk12usoh637q', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Coolblue', totalCompensation: '€63,500', totalCompensationNumber: 63500, totalCompensationDetails: '', baseSalary: '€5,292/month', baseSalaryNumber: 63504, oldYearForData: '', otherContext: '' }, { title: 'Engineering Team Lead', guid: 'ksa7j3h9f2mrnzjmwit', specialization: '', city: 'Amsterdam', companyName: 'Relay42', totalCompensation: '€76,000', totalCompensationNumber: 76000, totalCompensationDetails: '', baseSalary: '€6,333/month', baseSalaryNumber: 76000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksb61knvf32h10r1qo', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€76,500', totalCompensationNumber: 76500, totalCompensationDetails: '€67K salary, €10K bonus', baseSalary: '€5,555/month', baseSalaryNumber: 66660, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer 3', guid: 'ksakln2krq056lm353p', specialization: '', city: 'The Hague', companyName: 'Ordina', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '€62K salary, €2K bonus, €2K benefits', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa6m1kvym23qmdma1m', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€73,500', totalCompensationNumber: 73500, totalCompensationDetails: '€67K salary, €7K bonus', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '2019', otherContext: '' }, { title: 'Software Developer', guid: 'ksb388qaas6bage6qd6', specialization: 'Frontend', city: 'Amsterdam', companyName: 'ANWB', totalCompensation: '€50,000', totalCompensationNumber: 50000, totalCompensationDetails: '€47K salary, €3K bonus', baseSalary: '€3,917/month', baseSalaryNumber: 47000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior C++ Software Engineer', guid: 'ksb64i38afnxkmcrrd7', specialization: '', city: 'Amsterdam', companyName: 'TomTom', totalCompensation: '€72,000', totalCompensationNumber: 72000, totalCompensationDetails: '', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '', otherContext: '' }, { title: 'Tech Lead', guid: 'ksaddh7yg8u1s4vpxgn', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Lead', guid: 'ksahzoz0wcppdj125dq', specialization: '', city: 'Amsterdam', companyName: 'Mollie', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer ', guid: 'ksax955s47r9ly39ocb', specialization: '', city: 'Hoofddorp', companyName: 'Ingenico', totalCompensation: '€63,500', totalCompensationNumber: 63500, totalCompensationDetails: '€59K salary, €5K bonus', baseSalary: '€4,917/month', baseSalaryNumber: 59000, oldYearForData: '', otherContext: '' }, { title: 'Software Architect', guid: 'ksb5umjmj72mgyzc85', specialization: '', city: 'Enschede', companyName: '🔒 3D printing company', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb5rkskcivvyro04uw', specialization: '', city: 'Amsterdam', companyName: 'Textkernel', totalCompensation: '€55,000', totalCompensationNumber: 55000, totalCompensationDetails: '€51K salary, €4K bonus', baseSalary: '€4,250/month', baseSalaryNumber: 51000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksb5luy6xjsf36lrykg', specialization: '', city: 'Amsterdam', companyName: 'Insignal', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€70K salary, €7K bonus', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Data Science Consultant ', guid: 'ksb5kn46ovvq9dhccfe', specialization: '', city: 'Amsterdam', companyName: 'Atos', totalCompensation: '€58,000', totalCompensationNumber: 58000, totalCompensationDetails: '€56K salary, €2K bonus, €6K benefits', baseSalary: '€4,667/month', baseSalaryNumber: 56000, oldYearForData: '', otherContext: '' }, { title: 'Principal Full-Stack Engineer', guid: 'ksaya9a9w1jsbahrfli', specialization: '', city: 'Amsterdam', companyName: 'Backbase', totalCompensation: '€85,500', totalCompensationNumber: 85500, totalCompensationDetails: '€79K salary, €6K bonus', baseSalary: '€6,583/month', baseSalaryNumber: 79000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb4tv2spijswpfekus', specialization: '', city: 'Amsterdam', companyName: 'Bol.com', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '€60K salary, €6K bonus', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Principal mobile engineer', guid: 'ksalndo9id4nif9tqyg', specialization: '', city: 'Amsterdam', companyName: 'Backbase', totalCompensation: '€75,500', totalCompensationNumber: 75500, totalCompensationDetails: '€73K salary, €3K bonus, €5K benefits', baseSalary: '€6,042/month', baseSalaryNumber: 72500, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksaw55urz8gxhei83a', specialization: '', city: 'Amsterdam', companyName: 'TomTom', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksb4v78vc63h8d1hptr', specialization: '', city: 'Haarlem', companyName: 'Gopublic', totalCompensation: '€38,400', totalCompensationNumber: 38400, totalCompensationDetails: '', baseSalary: '€3,200/month', baseSalaryNumber: 38400, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb35dyrlcess4dzrl', specialization: '', city: 'Almere', companyName: 'Mijndomein', totalCompensation: '€51,000', totalCompensationNumber: 51000, totalCompensationDetails: '', baseSalary: '€4,250/month', baseSalaryNumber: 51000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb4mp2uwd20hxv4zz9', specialization: 'Frontend', city: 'Amsterdam', companyName: 'EclecticIQ', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,400/month', baseSalaryNumber: 64800, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb4k0bjvoc9oabblmr', specialization: '', city: 'Amsterdam', companyName: 'EclecticIQ', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '', baseSalary: '€5,500/month', baseSalaryNumber: 66000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior DevOps Engineer', guid: 'ksb4nqkzgh0aivcpywt', specialization: '', city: 'Amsterdam', companyName: 'EclecticIQ', totalCompensation: '€74,000', totalCompensationNumber: 74000, totalCompensationDetails: '', baseSalary: '€6,167/month', baseSalaryNumber: 74000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb3k9lfhmk4j3hur6j', specialization: '', city: 'Rotterdam', companyName: 'Hoppinger', totalCompensation: '€41,000', totalCompensationNumber: 41000, totalCompensationDetails: '€38K salary, €3K bonus', baseSalary: '€3,167/month', baseSalaryNumber: 38000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb3mejhhwsa30sdhz', specialization: '', city: 'Amsterdam', companyName: 'Secfi', totalCompensation: '€50,000', totalCompensationNumber: 50000, totalCompensationDetails: '', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb42vpjc0lw9lewvs', specialization: '', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€42,000', totalCompensationNumber: 42000, totalCompensationDetails: '', baseSalary: '€3,500/month', baseSalaryNumber: 42000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksb40en0v6aw58ht4n', specialization: '', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€27,600', totalCompensationNumber: 27600, totalCompensationDetails: '', baseSalary: '€2,300/month', baseSalaryNumber: 27600, oldYearForData: '2020', otherContext: '' }, { title: 'Software Developer', guid: 'ksb41ytd0f9brp1sfap', specialization: 'Backend', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€38,000', totalCompensationNumber: 38000, totalCompensationDetails: '', baseSalary: '€3,167/month', baseSalaryNumber: 38000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'ksb3z6thjokoqmy5had', specialization: '', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '', baseSalary: '€4,750/month', baseSalaryNumber: 57000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Developer', guid: 'ksb3wxsyzful4xczm5g', specialization: 'Backend', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€34,000', totalCompensationNumber: 34000, totalCompensationDetails: '', baseSalary: '€2,833/month', baseSalaryNumber: 34000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Developer', guid: 'ksb3ylheapy4x4k6e8e', specialization: '', city: 'Amsterdam', companyName: 'Bunq', totalCompensation: '€55,000', totalCompensationNumber: 55000, totalCompensationDetails: '', baseSalary: '€4,583/month', baseSalaryNumber: 55000, oldYearForData: '2015', otherContext: '' }, { title: 'Software Engineer', guid: 'ksb443vqky2dxkf8k6', specialization: '', city: 'Amsterdam', companyName: 'LUMICKS', totalCompensation: '€58,000', totalCompensationNumber: 58000, totalCompensationDetails: '', baseSalary: '€4,833/month', baseSalaryNumber: 58000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksb3tgachhrf1gs6bok', specialization: '', city: 'Amsterdam', companyName: '🔒 Mobile development agency', totalCompensation: '€50,000', totalCompensationNumber: 50000, totalCompensationDetails: '', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksb3dayskwzmacfmyq', specialization: 'Frontend', city: 'Rotterdam', companyName: 'Hoppinger', totalCompensation: '€41,000', totalCompensationNumber: 41000, totalCompensationDetails: '€39K salary, €2K bonus', baseSalary: '€3,250/month', baseSalaryNumber: 39000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Engineer', guid: 'ksb3bwjlsar3ne6yyph', specialization: '', city: 'Rotterdam', companyName: 'Hoppinger', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '€59K salary, €5K bonus', baseSalary: '€4,917/month', baseSalaryNumber: 59000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'kqkv8yw4f3x1j842a79', specialization: '', city: 'Amsterdam', companyName: '🔒 Recruitment technology company', totalCompensation: '€76,500', totalCompensationNumber: 76500, totalCompensationDetails: '', baseSalary: '€6,375/month', baseSalaryNumber: 76500, oldYearForData: '', otherContext: '' }, { title: 'Lead Developer', guid: 'kqkvpo4gs1ijl9r5qc', specialization: '', city: 'Amsterdam', companyName: 'Startup', totalCompensation: '€49,000', totalCompensationNumber: 49000, totalCompensationDetails: '', baseSalary: '€4,080/month', baseSalaryNumber: 48960, oldYearForData: '', otherContext: '' }, { title: 'Cloud Operations Engineer', guid: 'kqnqtnzn03kaxp1xh8ip', specialization: '', city: 'Rotterdam', companyName: '🔒 Global software company with Dutch HQ', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '', baseSalary: '€5,500/month', baseSalaryNumber: 66000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqnqe1n2s9w2ka8m7s', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,400/month', baseSalaryNumber: 64800, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkyi1yvojm16wy6i3q', specialization: '', city: 'Amsterdam', companyName: '🔒 Online grocery delivery company', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Consultant', guid: 'ks7dp9yle76ssnlswb', specialization: '', city: 'Utrecht (flexible days)', companyName: '🔒 Global consulting company', totalCompensation: '€63,000', totalCompensationNumber: 63000, totalCompensationDetails: '€60K salary, €3K bonus, €10K benefits, €5K relocation', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ks75vyv4k2akt00r36n', specialization: '', city: 'The Hague (remote within country)', companyName: 'Software Development Agency', totalCompensation: '€36,000', totalCompensationNumber: 36000, totalCompensationDetails: '€36K salary, €1K benefits', baseSalary: '€3,000/month', baseSalaryNumber: 36000, oldYearForData: '', otherContext: '' }, { title: 'Senior QA Engineer', guid: 'kqkyg2dxn1xee1uhzn', specialization: '', city: 'Amsterdam', companyName: '🔒 Fintech banking platform company with Dutch HQ', totalCompensation: '€73,500', totalCompensationNumber: 73500, totalCompensationDetails: '€70K salary, €4K bonus', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ks74be5upw0jbba2cz', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 Secure communications company', totalCompensation: '€72,000', totalCompensationNumber: 72000, totalCompensationDetails: '€72K salary, €5K benefits', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer Intern', guid: 'kqkwth7oatezcs4u3pb', specialization: '', city: 'Eindhoven', companyName: '🔒 Dutch multinational company', totalCompensation: '€10,800', totalCompensationNumber: 10800, totalCompensationDetails: '€11K salary, €3K benefits', baseSalary: '€900/month', baseSalaryNumber: 10800, oldYearForData: '2019', otherContext: '' }, { title: 'Software Engineer', guid: 'ks724vu2hng5daphivv', specialization: '', city: 'Enschede (flexible days)', companyName: '🔒 Food delivery company', totalCompensation: '€62,000', totalCompensationNumber: 62000, totalCompensationDetails: '€62K salary, €2K benefits, €3K relocation', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: 'Lead developer', guid: 'ks7hob20vndyp9qv2s', specialization: '', city: 'Veenendaal', companyName: '<NAME>', totalCompensation: '€49,500', totalCompensationNumber: 49500, totalCompensationDetails: '€46K salary, €4K bonus, €1K relocation', baseSalary: '€3,817/month', baseSalaryNumber: 45801, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ks7czqcihp0ag468f59', specialization: 'PHP / Drupal', city: 'Rotterdam', companyName: 'SIMgroep', totalCompensation: '€54,000', totalCompensationNumber: 54000, totalCompensationDetails: '', baseSalary: '€4,500/month', baseSalaryNumber: 54000, oldYearForData: '', otherContext: '' }, { title: 'Lead Software architect', guid: 'ks7gog6skns1a6kmcv', specialization: '', city: 'Veldhoven', companyName: '🔒 Semiconductor industry company', totalCompensation: '€89,000', totalCompensationNumber: 89000, totalCompensationDetails: '€79K salary, €10K bonus', baseSalary: '€6,583/month', baseSalaryNumber: 79000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kqkvu30m7nx8vkvhuyd', specialization: '', city: 'Eindhoven', companyName: '🔒 Ecommerce platform company', totalCompensation: '€32,400', totalCompensationNumber: 32400, totalCompensationDetails: '', baseSalary: '€2,700/month', baseSalaryNumber: 32400, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ks73sgpaawvqdou96le', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 On-demand manufacturing and prototyping', totalCompensation: '€68,500', totalCompensationNumber: 68500, totalCompensationDetails: '€66K salary, €3K equity/year', baseSalary: '€5,500/month', baseSalaryNumber: 66000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Architect', guid: 'ks75sl9pjckp5ouzqr', specialization: '', city: 'Hybrid option', companyName: 'AFAS Software ', totalCompensation: '€74,000', totalCompensationNumber: 74000, totalCompensationDetails: '€55K salary, €19K bonus, €0K benefits', baseSalary: '€4,590/month', baseSalaryNumber: 55080, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ks7htub4sw0prs4lnwl', specialization: '', city: 'Groningen (hybrid option)', companyName: '🔒 Cybersecurity startup', totalCompensation: '€52,500', totalCompensationNumber: 52500, totalCompensationDetails: '€53K salary, €3K benefits', baseSalary: '€4,375/month', baseSalaryNumber: 52500, oldYearForData: '', otherContext: '' }, { title: 'IT Engineer I', guid: 'ks7agmxoed8xk7v12p5', specialization: '', city: '', companyName: 'AB<NAME>', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ks75tpp6eqdbh32u52u', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Educational software and installations', totalCompensation: '€49,200', totalCompensationNumber: 49200, totalCompensationDetails: '', baseSalary: '€4,104/month', baseSalaryNumber: 49248, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkwq3fcuwboanalzp', specialization: '', city: 'Amsterdam', companyName: 'Leaseweb', totalCompensation: '€52,000', totalCompensationNumber: 52000, totalCompensationDetails: '', baseSalary: '€4,333/month', baseSalaryNumber: 52000, oldYearForData: '2018', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ks75rl502syup6ppimi', specialization: '', city: 'Utrecht (flexible days)', companyName: 'B<EMAIL>', totalCompensation: '€76,500', totalCompensationNumber: 76500, totalCompensationDetails: '€70K salary, €6K bonus', baseSalary: '€5,832/month', baseSalaryNumber: 69984, oldYearForData: '', otherContext: '' }, { title: 'Principal Software Engineer', guid: 'ks7cby94relz6xspvg', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Electric vehicle supply company', totalCompensation: '€78,000', totalCompensationNumber: 78000, totalCompensationDetails: '€78K salary, €3K relocation', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'ks7au9640i7gykr4v3da', specialization: '', city: 'The Hague (hybrid option)', companyName: 'VCSW', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '€61K salary, €5K bonus', baseSalary: '€5,076/month', baseSalaryNumber: 60912, oldYearForData: '', otherContext: '' }, { title: 'Tech Lead', guid: 'ks775ri7rpi80hugpn', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 E-bike company', totalCompensation: '€79,000', totalCompensationNumber: 79000, totalCompensationDetails: '€75K salary, €4K bonus, €0K equity/year, €1K benefits', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '2020', otherContext: '' }, { title: 'Lead Android Engineer', guid: 'kqku867eqye18gc29h', specialization: '', city: 'Amsterdam', companyName: 'Startup', totalCompensation: '€58,500', totalCompensationNumber: 58500, totalCompensationDetails: '', baseSalary: '€4,860/month', baseSalaryNumber: 58320, oldYearForData: '', otherContext: '' }, { title: 'Lead Engineer', guid: 'kqkwj6dn1meln4b9tfr', specialization: '', city: 'Utrecht', companyName: '🔒 Bootstrapped fashion company', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'UI Architect', guid: 'ks7826pw2qjo44adkvh', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 Threat intelligence company', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'CTO', guid: 'ks7eel9w4jeujeuqvbl', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 Energy management company', totalCompensation: '€104,000', totalCompensationNumber: 104000, totalCompensationDetails: '€104K salary, €3K benefits', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer ', guid: 'ks72fowop48lft91i9', specialization: '', city: 'Hybrid option', companyName: '🔒 Top 3 Dutch Bank', totalCompensation: '€58,000', totalCompensationNumber: 58000, totalCompensationDetails: '', baseSalary: '€4,833/month', baseSalaryNumber: 58000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ks7z119e92gvnvhfxft', specialization: 'Embedded', city: 'Amsterdam', companyName: 'Evbox', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ks73ny7gkxvkpd1s5io', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Sports video streaming company', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '€68K salary, €2K relocation', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '2019', otherContext: '' }, { title: 'Tech lead', guid: 'ks7fhdhn5nplcc4xhzw', specialization: '', city: 'Amsterdam', companyName: 'CarNext.com', totalCompensation: '€91,000', totalCompensationNumber: 91000, totalCompensationDetails: '€84K salary, €7K bonus, €9K benefits', baseSalary: '€7,000/month', baseSalaryNumber: 84000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkwkvxbz1qgxw37csj', specialization: '', city: 'Utrecht', companyName: '<NAME>', totalCompensation: '€48,900', totalCompensationNumber: 48900, totalCompensationDetails: '€45K salary, €4K bonus', baseSalary: '€3,780/month', baseSalaryNumber: 45360, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkwursqa78b0k8ebc8', specialization: '', city: 'Eindhoven', companyName: '🔒 Lighting company', totalCompensation: '€56,000', totalCompensationNumber: 56000, totalCompensationDetails: '', baseSalary: '€4,650/month', baseSalaryNumber: 55800, oldYearForData: '', otherContext: '' }, { title: 'Tech Lead', guid: 'kqkxtra4bfql3gamsi', specialization: '', city: 'Amsterdam', companyName: 'CarNext.com', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '€80K salary, €10K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqky79oitn5laq4ckr8', specialization: '', city: 'Zandaam', companyName: '<NAME>', totalCompensation: '€42,400', totalCompensationNumber: 42400, totalCompensationDetails: '€38K salary, €4K bonus', baseSalary: '€3,200/month', baseSalaryNumber: 38400, oldYearForData: '', otherContext: '' }, { title: 'Head of Software Development', guid: 'kqkyasnq6mb1ts0gefq', specialization: '', city: 'Delft', companyName: '🔒 Benefits solutions company', totalCompensation: '€61,000', totalCompensationNumber: 61000, totalCompensationDetails: '€61K salary, €1K benefits', baseSalary: '€5,076/month', baseSalaryNumber: 60912, oldYearForData: '', otherContext: '' }, { title: 'Senior Associate', guid: 'kqkydou5p945m7q5ag', specialization: '', city: 'Amsterdam', companyName: 'Cognizant', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'kqkvqw0ztcytureb8np', specialization: '', city: 'Amsterdam', companyName: 'Effectory', totalCompensation: '€58,000', totalCompensationNumber: 58000, totalCompensationDetails: '€53K salary, €5K bonus', baseSalary: '€4,417/month', baseSalaryNumber: 53000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'kqjsphck8wv4jwahfs', specialization: 'Java', city: 'Amsterdam', companyName: 'Luminis', totalCompensation: '€78,000', totalCompensationNumber: 78000, totalCompensationDetails: '€72K salary, €6K bonus', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '', otherContext: '' }, { title: 'Product Manager', guid: 'kqjr02twu6hioxbpy2g', specialization: '', city: 'Amsterdam', companyName: 'Hiber', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkxwfs9puxygad94he', specialization: '', city: 'Amsterdam', companyName: '🔒 Payments platform startup', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '€65K salary, €10K equity/year', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'kqjt2tx4pz7mjq9pmc', specialization: '', city: 'Amsterdam', companyName: 'Travix', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjsxkjf64odiu1fdrs', specialization: '', city: 'Amsterdam', companyName: 'Travix', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,400/month', baseSalaryNumber: 64800, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjsrt3d2aqzcxhij8p', specialization: '', city: 'Deventer', companyName: 'Drukwerkdeal', totalCompensation: '€53,000', totalCompensationNumber: 53000, totalCompensationDetails: '€53K salary, €1K benefits', baseSalary: '€4,428/month', baseSalaryNumber: 53136, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjsqbg540jmnwo9qeb', specialization: '', city: 'Amsterdam', companyName: 'TomTom', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '', baseSalary: '€5,333/month', baseSalaryNumber: 64000, oldYearForData: '', otherContext: '' }, { title: 'Architect', guid: 'kqjsaipgg2i4a7mdyi', specialization: '', city: 'Amsterdam', companyName: 'KPN', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '€63K salary, €5K bonus', baseSalary: '€5,265/month', baseSalaryNumber: 63180, oldYearForData: '2019', otherContext: '' }, { title: 'Team Lead', guid: 'kqjs1bv2gvijqkn7q0b', specialization: 'Tech', city: 'Rotterdam', companyName: 'Coolblue', totalCompensation: '€74,500', totalCompensationNumber: 74500, totalCompensationDetails: '', baseSalary: '€6,200/month', baseSalaryNumber: 74400, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjrzgh7oqm7d8la2rd', specialization: 'Full-stack', city: 'Amsterdam', companyName: 'Framer', totalCompensation: '€71,500', totalCompensationNumber: 71500, totalCompensationDetails: '€65K salary, €7K bonus', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '2020', otherContext: '' }, { title: 'Director of Technology', guid: 'kqjs9yjzitjbazv50m', specialization: '', city: 'Amsterdam', companyName: 'Backbase', totalCompensation: '€122,000', totalCompensationNumber: 122000, totalCompensationDetails: '', baseSalary: '€10,200/month', baseSalaryNumber: 122400, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjo0bgu1f40vjyyer7', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '', otherContext: '' }, { title: 'New Grad Software Engineer', guid: 'kqjl47eaua6n07jlh8', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€42,000', totalCompensationNumber: 42000, totalCompensationDetails: '', baseSalary: '€3,500/month', baseSalaryNumber: 42000, oldYearForData: '', otherContext: '' }, { title: 'Principal Software Engineer', guid: 'kqjrbl9id2q0tbbn5qj', specialization: '', city: 'Amsterdam', companyName: '🔒 Customer community platform', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjitg2srwt0xv4c61m', specialization: '', city: 'Amsterdam', companyName: 'KPN', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '', baseSalary: '€5,333/month', baseSalaryNumber: 64000, oldYearForData: '', otherContext: '' }, { title: 'Lead Software Engineer', guid: 'kqjihsm6ccvqbq36nwt', specialization: '', city: 'Amsterdam', companyName: 'KPN', totalCompensation: '€88,000', totalCompensationNumber: 88000, totalCompensationDetails: '€80K salary, €8K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjaeovfjvuodn2l61d', specialization: '', city: 'Amsterdam', companyName: 'dan.<EMAIL>', totalCompensation: '€72,000', totalCompensationNumber: 72000, totalCompensationDetails: '', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjq85xmhlpzdoyqyjb', specialization: '', city: 'Amsterdam', companyName: 'Knab', totalCompensation: '€75,500', totalCompensationNumber: 75500, totalCompensationDetails: '', baseSalary: '€6,300/month', baseSalaryNumber: 75600, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjo33l48n8u9ptpou6', specialization: '', city: 'Utrecht', companyName: 'B<EMAIL>', totalCompensation: '€76,500', totalCompensationNumber: 76500, totalCompensationDetails: '€70K salary, €7K bonus', baseSalary: '€5,850/month', baseSalaryNumber: 70200, oldYearForData: '', otherContext: '' }, { title: 'Product Manager', guid: 'kqjlodb7jfuaaatn7vf', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '€55K salary, €2K equity/year', baseSalary: '€4,583/month', baseSalaryNumber: 55000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqj9x2vthmxxg8jwwbp', specialization: '.NET', city: 'Amsterdam', companyName: 'Rabobank', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '€65K salary, €5K bonus, €2K benefits', baseSalary: '€5,400/month', baseSalaryNumber: 64800, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjqxxu4xmn2oidnhkl', specialization: '', city: 'Amsterdam', companyName: 'Hiber', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Frontend Developer', guid: 'kqigheftnfqnnys5sc', specialization: '', city: 'Amsterdam', companyName: '🔒 Digital learning company', totalCompensation: '€50,000', totalCompensationNumber: 50000, totalCompensationDetails: '', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '', otherContext: '' }, { title: 'iOS Software Developer', guid: 'kqies66di40h0w9id9', specialization: '', city: 'Amsterdam', companyName: '🔒 Agency with Dutch and Ukrainian offices', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Backend Developer', guid: 'kqi5t6m1ixa5orzmnqs', specialization: '', city: 'Eindhoven', companyName: '🔒 Ecommerce platform company', totalCompensation: '€31,200', totalCompensationNumber: 31200, totalCompensationDetails: '', baseSalary: '€2,600/month', baseSalaryNumber: 31200, oldYearForData: '', otherContext: '' }, { title: 'Frontend Developer', guid: 'kqi5ex3rk710w8f1aks', specialization: '', city: 'Eindhoven', companyName: 'DEITY', totalCompensation: '€28,800', totalCompensationNumber: 28800, totalCompensationDetails: '', baseSalary: '€2,400/month', baseSalaryNumber: 28800, oldYearForData: '', otherContext: '' }, { title: 'Software Architect', guid: 'kqhxfnh0e7tvibjzpo9', specialization: '', city: 'Utrecht', companyName: '🔒 Belgian ERP software company', totalCompensation: '€67,000', totalCompensationNumber: 67000, totalCompensationDetails: '€52K salary, €15K bonus', baseSalary: '€4,350/month', baseSalaryNumber: 52200, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'kqhxrwzrw0oblfosjgd', specialization: '', city: '', companyName: '🔒 Utilities sector', totalCompensation: '€73,000', totalCompensationNumber: 73000, totalCompensationDetails: '€70K salary, €3K bonus', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Lead Developer', guid: 'kqi1jj6j66krhkmfrta', specialization: '', city: 'Amsterdam', companyName: 'Werkspot', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'kqjqs7nm5lfyt37ng5q', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Rabobank', totalCompensation: '€74,000', totalCompensationNumber: 74000, totalCompensationDetails: '', baseSalary: '€6,167/month', baseSalaryNumber: 74000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqi5cneqaer8jfh6uu8', specialization: '', city: 'Amsterdam', companyName: '🔒 Top 3 Dutch Bank', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjqqy1ktkpwimtq85', specialization: '', city: 'Amsterdam', companyName: 'Mollie', totalCompensation: '€62,000', totalCompensationNumber: 62000, totalCompensationDetails: '€62K salary, €2K benefits', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: 'Designer', guid: 'kqknojxhxrt38b3ks6', specialization: '', city: 'Utrecht', companyName: 'Blendle', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '€60K salary, €5K equity/year', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqknnljiuangemtiiop', specialization: '', city: 'Utrecht', companyName: 'Blendle', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '€60K salary, €6K equity/year', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'kqknjliwoca2jeoqvv', specialization: '', city: 'Utrecht', companyName: 'Blendle', totalCompensation: '€71,000', totalCompensationNumber: 71000, totalCompensationDetails: '€65K salary, €6K equity/year', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqknisx6d7v73zzyq2t', specialization: '', city: 'Utrecht', companyName: 'Blendle', totalCompensation: '€45,600', totalCompensationNumber: 45600, totalCompensationDetails: '', baseSalary: '€3,800/month', baseSalaryNumber: 45600, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqknfl5cybpk42bhupn', specialization: '', city: 'Utrecht', companyName: 'Blendle', totalCompensation: '€55,000', totalCompensationNumber: 55000, totalCompensationDetails: '€50K salary, €5K equity/year', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'kqig6lq7rhv9x7xtf5s', specialization: '', city: 's-Hertogenbosch, North Brabant', companyName: 'Essent', totalCompensation: '€50,000', totalCompensationNumber: 50000, totalCompensationDetails: '', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '', otherContext: '' }, { title: 'Medior Developer', guid: 'kqjj01x4h7724qvxk7', specialization: '', city: 'Rotterdam', companyName: 'Coolblue', totalCompensation: '€44,100', totalCompensationNumber: 44100, totalCompensationDetails: '', baseSalary: '€3,672/month', baseSalaryNumber: 44064, oldYearForData: '', otherContext: '' }, { title: 'Junior developer', guid: 'kqjixhq1sf1ec3eegf', specialization: '', city: 'Rotterdam', companyName: 'Coolblue', totalCompensation: '€36,300', totalCompensationNumber: 36300, totalCompensationDetails: '', baseSalary: '€3,024/month', baseSalaryNumber: 36288, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kqigur64ixzhhbz6xu', specialization: '', city: 'Amsterdam', companyName: '🔒 Food delivery company', totalCompensation: '€59,500', totalCompensationNumber: 59500, totalCompensationDetails: '', baseSalary: '€4,968/month', baseSalaryNumber: 59616, oldYearForData: '', otherContext: '' }, { title: 'Senior Engineering Manager', guid: 'kqih0dj45r53e8073o7', specialization: '', city: 'Amsterdam', companyName: 'Just Eat Take<EMAIL>', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'kqih1qmasd8ahglm58d', specialization: '', city: 'Amsterdam', companyName: '<NAME> Takeaway.com', totalCompensation: '€63,500', totalCompensationNumber: 63500, totalCompensationDetails: '', baseSalary: '€5,292/month', baseSalaryNumber: 63504, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqih2hpjfh5d46ah9j6', specialization: '', city: 'Amsterdam', companyName: '<NAME>.<EMAIL>', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Data Analyst', guid: 'kqih3gafzl3sbi9uf6l', specialization: '', city: 'Amsterdam', companyName: '<NAME>.<EMAIL>', totalCompensation: '€52,000', totalCompensationNumber: 52000, totalCompensationDetails: '', baseSalary: '€4,333/month', baseSalaryNumber: 52000, oldYearForData: '', otherContext: '' }, { title: 'Site Reliability Engineer', guid: 'kqih497xtqty7i4qo2', specialization: '', city: 'Amsterdam', companyName: '<NAME>.<EMAIL>', totalCompensation: '€52,000', totalCompensationNumber: 52000, totalCompensationDetails: '', baseSalary: '€4,320/month', baseSalaryNumber: 51840, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqih4zn69qvhnpy06wc', specialization: 'iOS', city: 'Amsterdam', companyName: '<NAME>.<EMAIL>', totalCompensation: '€63,500', totalCompensationNumber: 63500, totalCompensationDetails: '', baseSalary: '€5,292/month', baseSalaryNumber: 63504, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'kqigavkemn494q54j4', specialization: '', city: 's-Hertogenbosch, North Brabant', companyName: 'Essent', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'UI Designer', guid: 'kqigf06tk52g48k8ov', specialization: '', city: 's-Hertogenbosch, North Brabant', companyName: '🔒 Dutch energy company', totalCompensation: '€58,000', totalCompensationNumber: 58000, totalCompensationDetails: '', baseSalary: '€4,833/month', baseSalaryNumber: 58000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'kqigdndn0oua6wagwnal', specialization: '', city: 's-Hertogenbosch, North Brabant', companyName: 'Essent', totalCompensation: '€84,000', totalCompensationNumber: 84000, totalCompensationDetails: '', baseSalary: '€7,000/month', baseSalaryNumber: 84000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqiga0cqggbpjw3x9pn', specialization: '', city: 's-Hertogenbosch, North Brabant', companyName: 'Essent', totalCompensation: '€48,000', totalCompensationNumber: 48000, totalCompensationDetails: '', baseSalary: '€4,000/month', baseSalaryNumber: 48000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqi6npd37q8kjirrxne', specialization: '', city: 'Almere', companyName: '🔒 Unified communications company', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Intern (Software Engineer)', guid: 'kqigc2ha33hamt84lqz', specialization: '', city: 's-Hertogenbosch, North Brabant', companyName: 'Essent', totalCompensation: '€4,800', totalCompensationNumber: 4800, totalCompensationDetails: '', baseSalary: '€400/month', baseSalaryNumber: 4800, oldYearForData: '', otherContext: '' }, { title: 'Technical Support Engineer', guid: 'kqi6roun7nucwpfa49a', specialization: '', city: 'Almere', companyName: 'Enreach', totalCompensation: '€35,000', totalCompensationNumber: 35000, totalCompensationDetails: '', baseSalary: '€2,916/month', baseSalaryNumber: 34992, oldYearForData: '', otherContext: '' }, { title: 'Project Manager', guid: 'kqi6q6lmxmmzceykn5n', specialization: '', city: 'Almere', companyName: 'Enreach', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,400/month', baseSalaryNumber: 64800, oldYearForData: '', otherContext: '' }, { title: 'Lead Developer', guid: 'kqi1gmialwmllzly5e', specialization: '', city: 'Amsterdam', companyName: 'Werkspot', totalCompensation: '€77,500', totalCompensationNumber: 77500, totalCompensationDetails: '', baseSalary: '€6,458/month', baseSalaryNumber: 77500, oldYearForData: '', otherContext: '' }, { title: 'Technical Lead', guid: 'kqi6dnfi3xbez8r5jll', specialization: '', city: 'Utrecht', companyName: 'DTN', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '€65K salary, €5K bonus', baseSalary: '€5,400/month', baseSalaryNumber: 64800, oldYearForData: '', otherContext: '' }, { title: 'Lead Software Engineer', guid: 'kqi6bznfwa8zak9ih9o', specialization: '', city: 'Utrecht', companyName: 'DTN', totalCompensation: '€81,000', totalCompensationNumber: 81000, totalCompensationDetails: '€76K salary, €5K bonus', baseSalary: '€6,333/month', baseSalaryNumber: 76000, oldYearForData: '2020', otherContext: '' }, { title: 'Site Reliability Engineer', guid: 'kqi6gx4qqgh06pn3lfc', specialization: '', city: 'Utrecht', companyName: 'DTN', totalCompensation: '€78,000', totalCompensationNumber: 78000, totalCompensationDetails: '', baseSalary: '€6,480/month', baseSalaryNumber: 77760, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'kqi6fptv8apcac2naq', specialization: '', city: 'Utrecht', companyName: 'DTN', totalCompensation: '€62,500', totalCompensationNumber: 62500, totalCompensationDetails: '', baseSalary: '€5,220/month', baseSalaryNumber: 62640, oldYearForData: '', otherContext: '' }, { title: 'Tech Lead', guid: 'kqi4zez5daavx5j34cv', specialization: '', city: 'Amsterdam', companyName: 'VanMoof', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjrain9yyi2n0axpx', specialization: '', city: 'Amsterdam', companyName: 'BUX', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqi61qld7i9ous36epv', specialization: '', city: 'Amsterdam', companyName: '🔒 FinTech company with Dutch HQ', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€75K salary, €2K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'kqi4sesu64fys7kjtzy', specialization: '', city: 'Utrecht', companyName: '🔒 Dutch e-commerce company', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '€61K salary, €3K bonus', baseSalary: '€5,076/month', baseSalaryNumber: 60912, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kqhxplwx7kiyehhlc96', specialization: '', city: 'Amsterdam', companyName: '🔒 Series C ecommerce company', totalCompensation: '€67,500', totalCompensationNumber: 67500, totalCompensationDetails: '€65K salary, €3K equity/year', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '2019', otherContext: '' }, { title: 'Data Scientist', guid: 'kqkwwnqlwv31iijyz2', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€48,300', totalCompensationNumber: 48300, totalCompensationDetails: '€43K salary, €5K bonus', baseSalary: '€3,600/month', baseSalaryNumber: 43200, oldYearForData: '', otherContext: '' }, { title: ' Solutions Engineer', guid: 'kqi6gewnva51tji8ga', specialization: '', city: 'Utrecht', companyName: 'DTN', totalCompensation: '€52,000', totalCompensationNumber: 52000, totalCompensationDetails: '', baseSalary: '€4,320/month', baseSalaryNumber: 51840, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqi6917p0p8bdrp9c1cg', specialization: '', city: 'Utrecht', companyName: 'DTN', totalCompensation: '€61,500', totalCompensationNumber: 61500, totalCompensationDetails: '€60K salary, €2K bonus', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Delivery Manager', guid: 'kqi6mfeva957j59rupw', specialization: '', city: 'Utrecht', companyName: 'DTN', totalCompensation: '€67,000', totalCompensationNumber: 67000, totalCompensationDetails: '€62K salary, €5K bonus', baseSalary: '€5,184/month', baseSalaryNumber: 62208, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjacx4lqqhqyvme57n', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '', baseSalary: '€5,333/month', baseSalaryNumber: 64000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqja7gmpglgllgwbxam', specialization: 'Full Stack', city: 'Rotterdam', companyName: 'Relive', totalCompensation: '€50,500', totalCompensationNumber: 50500, totalCompensationDetails: '', baseSalary: '€4,212/month', baseSalaryNumber: 50544, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'kqjs0gbhkxegf8zb8z', specialization: '', city: 'Rotterdam', companyName: 'Coolblue', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqj9ud7wzhd6g8s1v2', specialization: 'Tech Lead', city: 'Amsterdam', companyName: 'Tiqets', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjkzb3soyib6ip31ac', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€57,000', totalCompensationNumber: 57000, totalCompensationDetails: '€55K salary, €2K equity/year', baseSalary: '€4,583/month', baseSalaryNumber: 55000, oldYearForData: '2019', otherContext: '' }, { title: 'Software Engineer', guid: 'kqky9ngsv8iahzj0d2b', specialization: 'Intern', city: 'Amsterdam', companyName: 'TicketSwap', totalCompensation: '€6,000', totalCompensationNumber: 6000, totalCompensationDetails: '', baseSalary: '€500/month', baseSalaryNumber: 6000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkwon0967ry0okiwcm', specialization: 'iOS', city: 'Amsterdam', companyName: 'BUX', totalCompensation: '€73,000', totalCompensationNumber: 73000, totalCompensationDetails: '€70K salary, €3K equity/year', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkwnehc8z94lifqbpm', specialization: 'Backend', city: 'Amsterdam', companyName: 'BUX', totalCompensation: '€71,000', totalCompensationNumber: 71000, totalCompensationDetails: '€67K salary, €4K equity/year', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'krnxg2vk8s4s7rl3ufq', specialization: '', city: 'Amsterdam', companyName: 'HackerOne', totalCompensation: '€68,500', totalCompensationNumber: 68500, totalCompensationDetails: '', baseSalary: '€5,708/month', baseSalaryNumber: 68500, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'krnxf986q3693nd70jj', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer ', guid: 'krnx2784192pzg4ns67', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'krnxkwh6f2aexa95sj', specialization: '', city: 'Amsterdam', companyName: '🔒 Fashion startup', totalCompensation: '€67,000', totalCompensationNumber: 67000, totalCompensationDetails: '€62K salary, €5K bonus', baseSalary: '€5,175/month', baseSalaryNumber: 62100, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'krpd04l6yaoepskwvyp', specialization: '', city: 'The Hague', companyName: 'Siemens', totalCompensation: '€52,000', totalCompensationNumber: 52000, totalCompensationDetails: '', baseSalary: '€4,333/month', baseSalaryNumber: 52000, oldYearForData: '2020', otherContext: '' }, { title: 'Development Lead', guid: 'krpdfc7ujh7yuxchpia', specialization: '', city: 'Amsterdam', companyName: '🔒 Airport operator in the Netherlands', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '€78K salary, €5K bonus', baseSalary: '€6,458/month', baseSalaryNumber: 77500, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'krpd2gv23idzcwgvhf6', specialization: '', city: 'Amsterdam', companyName: 'Elsevier', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '€75K salary, €5K bonus', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'krpyvg7l537ixjrciwu', specialization: '', city: 'Rotterdam', companyName: '🔒 Swiss telecommunications company', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'krpyrhpnjqpu8lyod0f', specialization: '', city: 'Rotterdam', companyName: '🔒 Swiss telecommunications company', totalCompensation: '€65,000', totalCompensationNumber: 65000, totalCompensationDetails: '', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'krpyw6cyxcenx1e1w3', specialization: '', city: 'Rotterdam', companyName: '🔒 Swiss telecommunications company', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ks26ge0kp6gaipcv6f', specialization: '', city: 'Amsterdam', companyName: 'ParkMobile', totalCompensation: '€71,000', totalCompensationNumber: 71000, totalCompensationDetails: '', baseSalary: '€5,917/month', baseSalaryNumber: 71000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'kqkvse85ong2ax6a649', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Rabobank', totalCompensation: '€81,000', totalCompensationNumber: 81000, totalCompensationDetails: '€76K salary, €5K bonus', baseSalary: '€6,333/month', baseSalaryNumber: 76000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqnqk5jf5p1no5uh27', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer (Cloud)', guid: 'kqnpy4xvergdg73e6la', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€63,000', totalCompensationNumber: 63000, totalCompensationDetails: '', baseSalary: '€5,250/month', baseSalaryNumber: 63000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqnqaasu40drord8em8', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '', baseSalary: '€5,333/month', baseSalaryNumber: 64000, oldYearForData: '', otherContext: '' }, { title: 'Software Development Manager', guid: 'kqnqqisjdckare88gxc', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€85,500', totalCompensationNumber: 85500, totalCompensationDetails: '€81K salary, €5K bonus', baseSalary: '€6,717/month', baseSalaryNumber: 80600, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqnqcwjq0rdkyh3k7ini', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€64,000', totalCompensationNumber: 64000, totalCompensationDetails: '', baseSalary: '€5,350/month', baseSalaryNumber: 64200, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer ', guid: 'kqnqs2fr3kgball7b03', specialization: '', city: 'Rotterdam', companyName: '🔒 Global software company with Dutch HQ', totalCompensation: '€45,000', totalCompensationNumber: 45000, totalCompensationDetails: '', baseSalary: '€3,750/month', baseSalaryNumber: 45000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqnqsrh8mjte8l28gg', specialization: 'DevOps', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '', baseSalary: '€5,500/month', baseSalaryNumber: 66000, oldYearForData: '', otherContext: '' }, { title: 'Lead Engineer', guid: 'kqnqenyf6ysavh8jtvu', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqnqg6253m9znp5f0rk', specialization: 'Tech Lead', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '€85K salary, €1K bonus', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqnqr9ejwioccnihfak', specialization: 'DevOps', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€74,000', totalCompensationNumber: 74000, totalCompensationDetails: '', baseSalary: '€6,167/month', baseSalaryNumber: 74000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqnqh56nb9lj6vro4bf', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€69,000', totalCompensationNumber: 69000, totalCompensationDetails: '', baseSalary: '€5,750/month', baseSalaryNumber: 69000, oldYearForData: '', otherContext: '' }, { title: 'Junior Software Engineer', guid: 'kqnqhuo36fyi3h6yjc7', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€47,000', totalCompensationNumber: 47000, totalCompensationDetails: '€44K salary, €3K bonus', baseSalary: '€3,667/month', baseSalaryNumber: 44000, oldYearForData: '', otherContext: '' }, ]
javaadpatel/tech-pays-eu-graphs
my-app/src/data-service.ts
import { data as tierOneDataSource } from './data/tier-1-companies'; import { data as tierTwoDataSource } from './data/tier-2-companies'; import { data as tierThreeDataSource } from './data/tier-3-companies'; import { SeniorityLevels } from './enums/seniority-levels-enum'; import { CompanySalaryData } from "./interfaces/company-salary-data" import { SalaryDataPoint } from './interfaces/salary-data-point'; interface KeywordFilter { keywords: string[], avoidWords: string[] } export class DataService { loadData = (seniorityLevel: SeniorityLevels): CompanySalaryData => { const tierOneData = this.filterData(tierOneDataSource as SalaryDataPoint[], seniorityLevel); const tierTwoData = this.filterData(tierTwoDataSource as SalaryDataPoint[], seniorityLevel); const tierThreeData = this.filterData(tierThreeDataSource as SalaryDataPoint[], seniorityLevel); return { tierOneData, tierTwoData, tierThreeData } } filterData = (salaryDataPoints: SalaryDataPoint[], seniorityLevel: SeniorityLevels): SalaryDataPoint[] => { const keywordFilter = this.seniorityLevelsToKeywordMap(seniorityLevel); console.log("unfilterd"); console.log(salaryDataPoints); const filteredData = salaryDataPoints.filter(salaryDataPoint => { return this.keywordMatch(salaryDataPoint.title, keywordFilter); }) console.log("filtered") console.log(filteredData); return filteredData; } keywordMatch = (searchString: string, keywordFilter: KeywordFilter): boolean => { return keywordFilter.keywords.map(keyword => searchString.toLocaleUpperCase().includes(keyword.toLocaleUpperCase())).includes(true) && keywordFilter.avoidWords.map(avoidWord => !searchString.toLocaleUpperCase().includes(avoidWord.toLocaleUpperCase())) .every(Boolean) } seniorityLevelsToKeywordMap = (seniorityLevel: SeniorityLevels): KeywordFilter => { switch (seniorityLevel) { case SeniorityLevels.JUNIOR: return { keywords: ["junior", "graduate", "entry-level", "trainee"], //intern, trainee avoidWords: [ "owner", //relates to product owners "manager", //related to engineering managers "management" //relates to management ] } case SeniorityLevels.MIDLEVEL: return { keywords: [""], avoidWords: [ "1", "new", "intern", "trainee", "entry-level", "graduate", "junior", "senior", "lead", "principal", "staff", "director", "architect", "head", "CTO", "VP", "owner", //relates to product owners "manager", //related to engineering managers "management" //relates to management ] } case SeniorityLevels.SENIOR: return { keywords: ["senior"], avoidWords: [ "owner", //relates to product owners "manager", //related to engineering managers "management" //relates to management ] } case SeniorityLevels.ABOVESENIOR: return { keywords: [ "lead", "principal", "staff", "director", "architect", "head", "CTO", "VP" ], avoidWords: [ "owner", //relates to product owners "manager", //related to engineering managers "management" //relates to management ] } default: throw Error(`Keyword filter not configured for ${seniorityLevel}`) } } }
javaadpatel/tech-pays-eu-graphs
my-app/src/data/tier-2-companies.ts
<reponame>javaadpatel/tech-pays-eu-graphs export const data = [ { title: 'Senior Software Engineer', guid: 'sukt1dp5xj1g5q3ci86lfh', specialization: '', city: 'Amsterdam (remote within country)', companyName: 'MessageBird ', totalCompensation: '€83,000', totalCompensationNumber: 83000, totalCompensationDetails: '', baseSalary: '€6,917/month', baseSalaryNumber: 83000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: '28kt5h3l07vmlk2st65d', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'IMC Trading', totalCompensation: '€120,000', totalCompensationNumber: 120000, totalCompensationDetails: '€100K salary, €20K bonus', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist 2', guid: 'mikv7egxaw53l8t0vad74', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '2018', otherContext: '' }, { title: 'Senior software engineer ', guid: 'zikwpl27oviflazwfe6bn', specialization: '', city: 'Amsterdam', companyName: 'Dott', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '€85K salary, €2K relocation', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksg58k81b1770lsdic', specialization: '', city: 'Amsterdam', companyName: 'Dott', totalCompensation: '€95,000', totalCompensationNumber: 95000, totalCompensationDetails: '€95K salary, €1K benefits', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer II', guid: 'zlkvhsrbuzbxm7o1p3enl', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Dott', totalCompensation: '€100,000', totalCompensationNumber: 100000, totalCompensationDetails: '€95K salary, €5K equity/year, €2K benefits', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'pnkx36h6fpx0ydzo1hu0k', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'IKEA', totalCompensation: '€117,000', totalCompensationNumber: 117000, totalCompensationDetails: '€100K salary, €17K bonus, €19K benefits', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'yfkvr89mmxede5tdngj1j', specialization: '', city: 'Amsterdam', companyName: '🔒 UK Health Tech Startup', totalCompensation: '€95,000', totalCompensationNumber: 95000, totalCompensationDetails: '€85K salary, €10K equity/year, €4K relocation', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '68kvmf30zl1ih65pnal1a', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€96,000', totalCompensationNumber: 96000, totalCompensationDetails: '€90K salary, €6K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'ksh6z0kuvobnr493rn', specialization: '', city: 'Amsterdam', companyName: 'Picnic', totalCompensation: '€81,500', totalCompensationNumber: 81500, totalCompensationDetails: '', baseSalary: '€6,800/month', baseSalaryNumber: 81600, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: '6wksyzf5ldasjxgk8h5k9', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Picnic', totalCompensation: '€81,500', totalCompensationNumber: 81500, totalCompensationDetails: '€82K salary, €1K benefits', baseSalary: '€6,800/month', baseSalaryNumber: 81600, oldYearForData: '', otherContext: '' }, { title: 'Product owner', guid: '8jkswrkqcb0lp4otx9rfxc', specialization: '', city: '', companyName: 'ASML', totalCompensation: '€99,500', totalCompensationNumber: 99500, totalCompensationDetails: '€83K salary, €17K bonus', baseSalary: '€6,896/month', baseSalaryNumber: 82750, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: '3pkwm14hbl33kpbm06a0m', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Picnic', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '', baseSalary: '€7,150/month', baseSalaryNumber: 85800, oldYearForData: '', otherContext: '' }, { title: 'Frontend Software Engineer', guid: 'ipkvyj60u0rtczlpqpirq', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Adyen', totalCompensation: '€78,500', totalCompensationNumber: 78500, totalCompensationDetails: '€65K salary, €14K equity/year, €5K benefits, €2K relocation', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Feature Engineer', guid: 'ksj0sleygpyepvhbfxm', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'ING', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Mission Critical Engineer', guid: 'nqkvw6huw0cpxo2dgdwb8', specialization: '', city: 'Schiphol-Rijk', companyName: '<NAME>', totalCompensation: '€89,500', totalCompensationNumber: 89500, totalCompensationDetails: '€78K salary, €12K bonus, €20K benefits', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Staff Engineer', guid: 'ksa79nlwaixadca3qus', specialization: '', city: 'Amsterdam', companyName: 'FindHotel', totalCompensation: '€98,000', totalCompensationNumber: 98000, totalCompensationDetails: '€88K salary, €10K equity/year', baseSalary: '€7,333/month', baseSalaryNumber: 88000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'fjkud67luimmh1sguy0rc', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Momentive', totalCompensation: '€100,000', totalCompensationNumber: 100000, totalCompensationDetails: '€75K salary, €5K bonus, €10K sign-on, €10K equity/year, €2K benefits, €5K relocation', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer, Full Stack', guid: 'ksa7316mtl7flz52th', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€103,000', totalCompensationNumber: 103000, totalCompensationDetails: '€80K salary, €12K bonus, €11K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer II', guid: 'j4kwm19ndj6exwz8we70a', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Datadog', totalCompensation: '€104,000', totalCompensationNumber: 104000, totalCompensationDetails: '€80K salary, €10K sign-on, €14K equity/year, €3K benefits', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior software engineer', guid: '9jkvnnjykqzx73z3b8af', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Adevinta', totalCompensation: '€109,000', totalCompensationNumber: 109000, totalCompensationDetails: '€93K salary, €9K bonus, €6K equity/year', baseSalary: '€7,750/month', baseSalaryNumber: 93000, oldYearForData: '', otherContext: '' }, { title: 'Tech Lead', guid: '3ykvo377j201k48w0x649p', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Adyen', totalCompensation: '€120,000', totalCompensationNumber: 120000, totalCompensationDetails: '€96K salary, €24K equity/year, €2K benefits', baseSalary: '€8,000/month', baseSalaryNumber: 96000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 's8ktv8xf54sz01p9fbv8l', specialization: '', city: 'AMSTERDAM', companyName: '<NAME>', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '€80K salary, €30K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineering Manager', guid: 'jyksoe19elrw2at584xlj', specialization: '', city: '', companyName: '🔒 FinTech company', totalCompensation: '€116,000', totalCompensationNumber: 116000, totalCompensationDetails: '€105K salary, €11K bonus, €10K benefits, €5K relocation', baseSalary: '€8,750/month', baseSalaryNumber: 105000, oldYearForData: '', otherContext: '' }, { title: 'Senior Engineer', guid: 'mckww7m3tkrym56hc1n5p', specialization: '', city: 'Amsterdam', companyName: 'FareHarbor', totalCompensation: '€130,000', totalCompensationNumber: 130000, totalCompensationDetails: '€100K salary, €20K bonus, €10K sign-on', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kslltj7cmfgzoq474dp', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€94,500', totalCompensationNumber: 94500, totalCompensationDetails: '€75K salary, €11K bonus, €8K equity/year, €5K relocation', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: '🔒 Above senior-level position within software engineering', guid: 'i8kul88ffbhcgyr2hf1em', specialization: '', city: 'Rotterdam', companyName: 'Mendix', totalCompensation: '€117,000', totalCompensationNumber: 117000, totalCompensationDetails: '€100K salary, €17K bonus', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksadxizvxn5ub6i4grk', specialization: 'Level 11', city: 'Amsterdam (hybrid option)', companyName: 'ING', totalCompensation: '€89,500', totalCompensationNumber: 89500, totalCompensationDetails: '€85K salary, €5K bonus', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'ksa84ien5f29j3kmwko', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€87,500', totalCompensationNumber: 87500, totalCompensationDetails: '€73K salary, €9K bonus, €6K equity/year', baseSalary: '€6,083/month', baseSalaryNumber: 73000, oldYearForData: '2019', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kseak5n5h9yn5qbjxoh', specialization: '', city: 'Utrecht', companyName: 'Bol.com', totalCompensation: '€84,000', totalCompensationNumber: 84000, totalCompensationDetails: '€76K salary, €8K bonus', baseSalary: '€6,367/month', baseSalaryNumber: 76400, oldYearForData: '', otherContext: '' }, { title: 'Senior Data Engineer', guid: 'wnkunxtvpsf3yzgejvjw', specialization: '', city: 'Amsterdam (remote from anywhere)', companyName: 'MessageBird', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '€80K salary, €5K relocation', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksdl7cw7sokscyldtm9', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'BUX', totalCompensation: '€87,500', totalCompensationNumber: 87500, totalCompensationDetails: '€70K salary, €18K equity/year', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within design', guid: 'agkvbe15r1qmq7pxeovy', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Booking.com', totalCompensation: '€80,500', totalCompensationNumber: 80500, totalCompensationDetails: '€70K salary, €11K bonus', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Sonftware Engineer ', guid: 'ksa6usyv83cbygxubyf', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€118,000', totalCompensationNumber: 118000, totalCompensationDetails: '€90K salary, €14K bonus, €14K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'qnkv87610zejyqdqstgne', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Spotify', totalCompensation: '€101,000', totalCompensationNumber: 101000, totalCompensationDetails: '€81K salary, €5K sign-on, €15K equity/year, €5K relocation', baseSalary: '€6,750/month', baseSalaryNumber: 81000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksiuh27ltmif0f20ygd', specialization: '', city: 'Amsterdam', companyName: 'IKEA', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '€90K salary, €16K benefits', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 't0kte4hqdkm11ez72u7x', specialization: '', city: 'Netherlands', companyName: 'KPN', totalCompensation: '€92,500', totalCompensationNumber: 92500, totalCompensationDetails: '€85K salary, €8K bonus, €5K benefits', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Product manager', guid: 'n5ksq97q5be4g13ah8j5n', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€115,000', totalCompensationNumber: 115000, totalCompensationDetails: '€94K salary, €14K bonus, €7K equity/year, €8K relocation', baseSalary: '€7,833/month', baseSalaryNumber: 94000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: '99kteej58ebs0zhnbhwk6', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '€90K salary, €14K bonus, €6K sign-on, €1K benefits, €5K relocation', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: '6ekstcexc3be14lzfc9pt', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Catawiki', totalCompensation: '€108,000', totalCompensationNumber: 108000, totalCompensationDetails: '€78K salary, €30K equity/year, €3K benefits', baseSalary: '€6,465/month', baseSalaryNumber: 77585, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksaybp9zlq6shtejiq9', specialization: '', city: 'Remote', companyName: '🔒 Digital product consultancy', totalCompensation: '€125,000', totalCompensationNumber: 125000, totalCompensationDetails: '', baseSalary: '€10,400/month', baseSalaryNumber: 124800, oldYearForData: '', otherContext: '' }, { title: 'Senior Data Scientist', guid: 'yakvcgwefrtrcn8703dmd', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€137,000', totalCompensationNumber: 137000, totalCompensationDetails: '€107K salary, €21K bonus, €8K equity/year, €5K relocation', baseSalary: '€8,917/month', baseSalaryNumber: 107000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Lead', guid: 'kseh02bpy5gnvfvt18', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 Series C ecommerce company', totalCompensation: '€131,000', totalCompensationNumber: 131000, totalCompensationDetails: '€95K salary, €36K equity/year, €3K benefits', baseSalary: '€7,884/month', baseSalaryNumber: 94608, oldYearForData: '2015', otherContext: '' }, { title: 'Head of Data Engineering', guid: 'ksjfcxdhywxlcbro2ar', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Insurance industry', totalCompensation: '€168,000', totalCompensationNumber: 168000, totalCompensationDetails: '€140K salary, €28K bonus, €30K benefits', baseSalary: '€11,667/month', baseSalaryNumber: 140000, oldYearForData: '', otherContext: '' }, { title: 'Global Director of IT Security', guid: 'j4kt2wm4czpa1zic0r57', specialization: '', city: 'Amsterdam', companyName: '🔒 Audio &amp; Video Industry', totalCompensation: '€131,000', totalCompensationNumber: 131000, totalCompensationDetails: '€117K salary, €14K bonus', baseSalary: '€9,720/month', baseSalaryNumber: 116640, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer 2', guid: '5qkso635plvnz99yyh9nj', specialization: '', city: 'Remote within country', companyName: 'Spotify', totalCompensation: '€117,000', totalCompensationNumber: 117000, totalCompensationDetails: '€99K salary, €18K equity/year', baseSalary: '€8,280/month', baseSalaryNumber: 99360, oldYearForData: '', otherContext: '' }, { title: 'Security Analyst', guid: '0aksr882d6fi9g9d2inn', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€89,500', totalCompensationNumber: 89500, totalCompensationDetails: '€78K salary, €12K bonus', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'SDE II', guid: 'ksc19928iiqac6mwya', specialization: '', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€94,000', totalCompensationNumber: 94000, totalCompensationDetails: '€89K salary, €5K equity/year', baseSalary: '€7,417/month', baseSalaryNumber: 89000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksix4cdxjvqlzhwn3l', specialization: '', city: 'Amsterdam (remote from anywhere)', companyName: 'MessageBird', totalCompensation: '€102,000', totalCompensationNumber: 102000, totalCompensationDetails: '€77K salary, €25K equity/year', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'ksbmkfrkf0k4b61kt06', specialization: 'Mobile', city: '', companyName: 'Adyen ', totalCompensation: '€75,500', totalCompensationNumber: 75500, totalCompensationDetails: '€75K salary, €0K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'vzkty380xgwizsjnykm7', specialization: 'Full Stack', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€122,000', totalCompensationNumber: 122000, totalCompensationDetails: '€100K salary, €15K bonus, €7K equity/year, €5K relocation', baseSalary: '€8,367/month', baseSalaryNumber: 100400, oldYearForData: '', otherContext: '' }, { title: 'Site Reliability Engineer ', guid: '8bktw2qcr8mgvsg3vaeus', specialization: '', city: '', companyName: 'Booking.com', totalCompensation: '€111,000', totalCompensationNumber: 111000, totalCompensationDetails: '€92K salary, €9K bonus, €10K equity/year', baseSalary: '€7,667/month', baseSalaryNumber: 92000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kshgli0e4blfph5gi8z', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€97,000', totalCompensationNumber: 97000, totalCompensationDetails: '€94K salary, €3K equity/year', baseSalary: '€7,833/month', baseSalaryNumber: 94000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Engineering Manager', guid: 'kshogtgz987h9cqjaa8', specialization: '', city: 'Amsterdam (remote from anywhere)', companyName: '🔒 Series A Startup with EU HQ', totalCompensation: '€173,000', totalCompensationNumber: 173000, totalCompensationDetails: '€162K salary, €11K equity/year', baseSalary: '€13,500/month', baseSalaryNumber: 162000, oldYearForData: '', otherContext: 'Freelance' }, { title: 'Software Engineer', guid: 'kshu0amty04tc8bf34', specialization: '', city: '', companyName: 'Adyen', totalCompensation: '€83,000', totalCompensationNumber: 83000, totalCompensationDetails: '€80K salary, €3K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software engineer ', guid: 'ksit6jp113i3lligo909', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€88,000', totalCompensationNumber: 88000, totalCompensationDetails: '€83K salary, €5K equity/year, €5K relocation', baseSalary: '€6,917/month', baseSalaryNumber: 83000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ctkssploy4c0mx0yg2elf', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€96,000', totalCompensationNumber: 96000, totalCompensationDetails: '€86K salary, €10K equity/year, €2K benefits', baseSalary: '€7,167/month', baseSalaryNumber: 86000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'n7kt2j9exqehx5f22sb57', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '€78K salary, €2K equity/year, €5K relocation', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'etktwvwxy37mmc7n1vk4m', specialization: '', city: 'Flexible days', companyName: 'Adyen', totalCompensation: '€98,000', totalCompensationNumber: 98000, totalCompensationDetails: '€92K salary, €6K equity/year, €5K benefits', baseSalary: '€7,667/month', baseSalaryNumber: 92000, oldYearForData: '2020', otherContext: '' }, { title: 'Technical Support Engineer', guid: 'zhku0wz9xm5cf8ottwzbf', specialization: '', city: '', companyName: 'Adyen', totalCompensation: '€51,000', totalCompensationNumber: 51000, totalCompensationDetails: '€49K salary, €3K equity/year, €2K benefits', baseSalary: '€4,042/month', baseSalaryNumber: 48500, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'leku1uwnvgpux811eaep', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€95,000', totalCompensationNumber: 95000, totalCompensationDetails: '€95K salary, €12K benefits, €3K relocation', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'pfkuaxqh0ovvzxshafgb', specialization: 'Java', city: 'Amsterdam (flexible days)', companyName: 'Adyen', totalCompensation: '€57,500', totalCompensationNumber: 57500, totalCompensationDetails: '€55K salary, €3K equity/year', baseSalary: '€4,583/month', baseSalaryNumber: 55000, oldYearForData: '', otherContext: '' }, { title: 'Graduate Software Engineer', guid: 'c6kub826doeyiudn45uo', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Adyen', totalCompensation: '€60,000', totalCompensationNumber: 60000, totalCompensationDetails: '€50K salary, €10K equity/year, €2K benefits', baseSalary: '€4,167/month', baseSalaryNumber: 50000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'adkucjjcvvbcsouljvuug', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Adyen', totalCompensation: '€98,500', totalCompensationNumber: 98500, totalCompensationDetails: '€92K salary, €6K equity/year, €2K benefits', baseSalary: '€7,667/month', baseSalaryNumber: 92000, oldYearForData: '', otherContext: '' }, { title: 'Analytics Trainee', guid: 'z9kufl091ec43r0ftikve', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'ING', totalCompensation: '€48,700', totalCompensationNumber: 48700, totalCompensationDetails: '€45K salary, €4K bonus, €5K benefits', baseSalary: '€3,750/month', baseSalaryNumber: 45000, oldYearForData: '', otherContext: '' }, { title: 'Development Engineer', guid: 'jokugsbyahx0j4h4tzsh', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'ING', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: '5fktx9jt939hjlp7ues2', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€98,000', totalCompensationNumber: 98000, totalCompensationDetails: '€85K salary, €13K bonus', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'vpksw7wfrpt1k1qdn5bf', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'DAZN', totalCompensation: '€114,000', totalCompensationNumber: 114000, totalCompensationDetails: '€95K salary, €19K bonus, €5K relocation', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '2020', otherContext: '' }, { title: 'Principal Software Engineer', guid: 'kslb12ighlien339cy', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'DAZN', totalCompensation: '€104,000', totalCompensationNumber: 104000, totalCompensationDetails: '€90K salary, €14K bonus, €2K relocation', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksacv5s12y2bebvjzkb', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'DAZN', totalCompensation: '€93,500', totalCompensationNumber: 93500, totalCompensationDetails: '€85K salary, €9K bonus', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksaba7hjmgeaalfe8f', specialization: '', city: 'Amsterdam (remote within country)', companyName: 'DAZN', totalCompensation: '€89,500', totalCompensationNumber: 89500, totalCompensationDetails: '€78K salary, €12K bonus, €6K benefits', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'ksa6ol7r01av22btk2au', specialization: '', city: 'Amsterdam', companyName: 'SurveyMonkey', totalCompensation: '€88,500', totalCompensationNumber: 88500, totalCompensationDetails: '€70K salary, €5K bonus, €14K equity/year', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksa6knke3ucywxwv7j5', specialization: 'Medior', city: 'Amsterdam', companyName: 'IKEA', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '€75K salary, €5K benefits', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'ksa6k3u6crfodlkx80h', specialization: 'Medior', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€68,000', totalCompensationNumber: 68000, totalCompensationDetails: '', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '', otherContext: '' }, { title: 'Senior Backend Engineer', guid: 'ksa644i2h9hq1t01xz', specialization: '', city: 'Amsterdam', companyName: 'Beat', totalCompensation: '€84,500', totalCompensationNumber: 84500, totalCompensationDetails: '€80K salary, €5K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Backend Engineer', guid: 'ksa5yvfg32zz9xou76c', specialization: '', city: 'Remote (remote from anywhere)', companyName: 'GitLab', totalCompensation: '€137,000', totalCompensationNumber: 137000, totalCompensationDetails: '€80K salary, €57K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '2020', otherContext: '' }, { title: 'Solutions Architect', guid: 'ksa551p3d8dkdmkr226', specialization: '', city: 'Amsterdam', companyName: 'albelli', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Solutions Architect', guid: 'ksa53teo7czt5ebbj9v', specialization: '', city: 'Amsterdam', companyName: 'albelli', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Solutions Architech', guid: 'ksa52nhn723bea1ed89', specialization: '', city: 'Amsterdam', companyName: 'albelli', totalCompensation: '€95,000', totalCompensationNumber: 95000, totalCompensationDetails: '', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Tech Team Lead / Software Engineer ', guid: 'krnxvdmx0vv7vf26hg', specialization: '', city: 'Amsterdam', companyName: 'Picnic', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksj6qd14ndog8dtykv', specialization: '', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€94,000', totalCompensationNumber: 94000, totalCompensationDetails: '€77K salary, €17K equity/year', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '2019', otherContext: '' }, { title: 'Senior Software Developer', guid: '5dksu5y3yqrliagtt7ovr', specialization: 'Java', city: '', companyName: 'LeasePlan', totalCompensation: '€146,000', totalCompensationNumber: 146000, totalCompensationDetails: '', baseSalary: '€12,160/month (€80/hour)', baseSalaryNumber: 145920, oldYearForData: '', otherContext: 'Freelance' }, { title: 'Senior Software engineer', guid: 'ksixksj7v2j6gyhx2ta', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Real estate software company', totalCompensation: '€108,000', totalCompensationNumber: 108000, totalCompensationDetails: '€100K salary, €8K bonus', baseSalary: '€8,320/month', baseSalaryNumber: 99840, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'ksk5k5o4pvhtfsdkbr', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€84,000', totalCompensationNumber: 84000, totalCompensationDetails: '', baseSalary: '€7,000/month', baseSalaryNumber: 84000, oldYearForData: '', otherContext: '' }, { title: 'Software developer', guid: 'z2ksmto3xthebzijbi1q', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '€80K salary, €8K relocation', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior Java Developer ', guid: 'vvkspyo7hir4j596xji4', specialization: '', city: 'Amsterdam', companyName: '🔒 FinTech sector', totalCompensation: '€89,500', totalCompensationNumber: 89500, totalCompensationDetails: '€80K salary, €10K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Mission Critical Engineer', guid: '3oksrg0m9zcu2zmwcpijt', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '<NAME>', totalCompensation: '€92,000', totalCompensationNumber: 92000, totalCompensationDetails: '€80K salary, €12K bonus, €10K benefits', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksay9nl618r34mfw85e', specialization: '', city: 'Hilversum', companyName: 'Nike', totalCompensation: '€104,000', totalCompensationNumber: 104000, totalCompensationDetails: '€90K salary, €14K bonus', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Lead engineer', guid: 'pkksreihqk6z7v90303yv', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€115,000', totalCompensationNumber: 115000, totalCompensationDetails: '€100K salary, €15K bonus, €10K benefits', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within software engineering', guid: 'ksd9o1z8vndggr02y7', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Catawiki', totalCompensation: '€103,000', totalCompensationNumber: 103000, totalCompensationDetails: '€95K salary, €8K bonus', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer - Frontend', guid: 'ksh5094y3vyynlqy8i5', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'Catawiki', totalCompensation: '€72,500', totalCompensationNumber: 72500, totalCompensationDetails: '€73K salary, €2K relocation', baseSalary: '€6,042/month', baseSalaryNumber: 72500, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'nkksogtnlcr2c2u6rip1', specialization: '', city: 'Amsterdam', companyName: 'Catawiki', totalCompensation: '€66,000', totalCompensationNumber: 66000, totalCompensationDetails: '€66K salary, €4K relocation', baseSalary: '€5,500/month', baseSalaryNumber: 66000, oldYearForData: '2020', otherContext: '' }, { title: 'Engineering Manager ', guid: 'ksjwduc4wouni9dp64', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€92,000', totalCompensationNumber: 92000, totalCompensationDetails: '€90K salary, €2K equity/year, €2K benefits', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Senior Front-end Engineer', guid: 'ksk2zoz87g7yg0tm80u', specialization: '', city: 'Amsterdam (remote from anywhere)', companyName: 'MessageBird', totalCompensation: '€87,000', totalCompensationNumber: 87000, totalCompensationDetails: '€67K salary, €20K equity/year', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '', otherContext: '' }, { title: 'Lead Backend Engineer', guid: 'kskhrj6vc51x7d9md24', specialization: '', city: 'Amsterdam', companyName: 'Verifone', totalCompensation: '€131,000', totalCompensationNumber: 131000, totalCompensationDetails: '€103K salary, €3K bonus, €25K equity/year', baseSalary: '€8,583/month', baseSalaryNumber: 103000, oldYearForData: '2020', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'biksm9wfkfp2ssowgrjas', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€100,000', totalCompensationNumber: 100000, totalCompensationDetails: '€95K salary, €5K equity/year', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksiv4wdni6zlv216u3i', specialization: '', city: 'Amsterdam (flexible days)', companyName: 'Abcam', totalCompensation: '€95,000', totalCompensationNumber: 95000, totalCompensationDetails: '€90K salary, €5K equity/year, €7K benefits', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Technical Program Manager', guid: 'ksdly2xx1th334xqjk6', specialization: '', city: 'Amsterdam', companyName: 'MessageBird', totalCompensation: '€84,000', totalCompensationNumber: 84000, totalCompensationDetails: '', baseSalary: '€7,000/month', baseSalaryNumber: 84000, oldYearForData: '2020', otherContext: '' }, { title: '🔒 Entry-level position within software engineering', guid: 'ksd67u1bs5z1mwvoii', specialization: '', city: 'Flexible days', companyName: 'Amazon', totalCompensation: '€82,500', totalCompensationNumber: 82500, totalCompensationDetails: '€66K salary, €16K sign-on, €0K equity/year', baseSalary: '€5,535/month', baseSalaryNumber: 66420, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksf1qus74a03zkgpksv', specialization: '', city: 'Amsterdam', companyName: '🔒 Travel company', totalCompensation: '€118,000', totalCompensationNumber: 118000, totalCompensationDetails: '€90K salary, €14K bonus, €14K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: '🔒 Senior-level position within engineering management', guid: 'ksg5kuetdr87ao6tto8', specialization: '', city: '', companyName: 'IKEA', totalCompensation: '€146,000', totalCompensationNumber: 146000, totalCompensationDetails: '€125K salary, €21K bonus, €10K relocation', baseSalary: '€10,417/month', baseSalaryNumber: 125000, oldYearForData: '2020', otherContext: '' }, { title: '🔒 Senior-level position within data science', guid: 'ksfr97lpj17kskd39x', specialization: '', city: 'Hybrid option', companyName: 'Elsevier', totalCompensation: '€107,000', totalCompensationNumber: 107000, totalCompensationDetails: '€92K salary, €15K bonus', baseSalary: '€7,667/month', baseSalaryNumber: 92000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'kshnabqrsx2qekekcd', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€93,500', totalCompensationNumber: 93500, totalCompensationDetails: '€85K salary, €9K bonus, €3K relocation', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksh8zv8ohjzhjdurpvk', specialization: '', city: 'Rotterdam (hybrid option)', companyName: 'Bol.com', totalCompensation: '€80,500', totalCompensationNumber: 80500, totalCompensationDetails: '€71K salary, €9K bonus', baseSalary: '€5,940/month', baseSalaryNumber: 71280, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksixpa2uvic6rz3sgc9', specialization: '', city: 'Amsterdam (remote from anywhere)', companyName: 'MessageBird', totalCompensation: '€67,500', totalCompensationNumber: 67500, totalCompensationDetails: '€65K salary, €3K equity/year, €1K benefits, €1K relocation', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'AI Lead', guid: 'ksiyfk1kd6wopin83cv', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 Startup', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€37K salary, €40K equity/year', baseSalary: '€3,100/month', baseSalaryNumber: 37200, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kscudtclf67pgyu34t', specialization: 'L4', city: 'Amsterdam', companyName: 'Amazon', totalCompensation: '€79,500', totalCompensationNumber: 79500, totalCompensationDetails: '€62K salary, €10K sign-on, €8K equity/year', baseSalary: '€5,167/month', baseSalaryNumber: 62000, oldYearForData: '', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'ksb6coj34kg303on0wq', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€79,000', totalCompensationNumber: 79000, totalCompensationDetails: '€70K salary, €7K bonus, €2K equity/year', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksdn9nz4vyzqy0mt5s', specialization: '', city: 'Amsterdam', companyName: '<NAME> ', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Data Scientist', guid: 'ksdfqco1pvwlkbjm04i', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '<NAME>', totalCompensation: '€97,000', totalCompensationNumber: 97000, totalCompensationDetails: '€90K salary, €7K bonus', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksehr9pu3tiw4ymut76', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 Finance company with HQ in Canada', totalCompensation: '€104,000', totalCompensationNumber: 104000, totalCompensationDetails: '€104K salary, €1K benefits', baseSalary: '€8,667/month', baseSalaryNumber: 104000, oldYearForData: '', otherContext: '' }, { title: 'Senior Product Designer', guid: 'kshtcxlffcxghxqbytl', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€84,500', totalCompensationNumber: 84500, totalCompensationDetails: '€82K salary, €3K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kshwvycf9njvjai7ck9', specialization: 'Java', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€67K salary, €10K sign-on', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kshx3m0vr4d735rgy8h', specialization: '', city: 'Amsterdam', companyName: 'Adidas', totalCompensation: '€71,500', totalCompensationNumber: 71500, totalCompensationDetails: '€65K salary, €7K bonus', baseSalary: '€5,417/month', baseSalaryNumber: 65000, oldYearForData: '', otherContext: '' }, { title: 'Product Owner', guid: 'kscytt4erqu3l4ym9ir', specialization: '', city: 'Remote from anywhere', companyName: 'Scoutbee', totalCompensation: '€85,500', totalCompensationNumber: 85500, totalCompensationDetails: '€85K salary, €1K equity/year', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksai1xsnznr3hs5xx', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '€85K salary, €7K benefits', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'ksa4yyfjsle6da2p7b', specialization: '', city: 'Amsterdam', companyName: 'eBay', totalCompensation: '€130,000', totalCompensationNumber: 130000, totalCompensationDetails: '€100K salary, €15K bonus, €15K equity/year', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksacpg7w6s88907rfsd', specialization: '', city: 'Remote from anywhere', companyName: 'MessageBird', totalCompensation: '€97,000', totalCompensationNumber: 97000, totalCompensationDetails: '€77K salary, €20K equity/year', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '2019', otherContext: '' }, { title: 'Senior backend engineer', guid: 'ksakt31omtwxcg7d6d', specialization: '', city: 'Amsterdam', companyName: 'eBay', totalCompensation: '€119,000', totalCompensationNumber: 119000, totalCompensationDetails: '€90K salary, €9K bonus, €20K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineering Team Lead', guid: 'ksc627bz14bb7j50guuf', specialization: '', city: 'North Brabant (flexible days)', companyName: '<NAME>', totalCompensation: '€115,000', totalCompensationNumber: 115000, totalCompensationDetails: '€94K salary, €14K bonus, €7K sign-on, €7K benefits', baseSalary: '€7,833/month', baseSalaryNumber: 94000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksbh4gxoveimikbapg', specialization: 'Java', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€101,000', totalCompensationNumber: 101000, totalCompensationDetails: '€101K salary, €5K relocation', baseSalary: '€8,417/month', baseSalaryNumber: 101000, oldYearForData: '', otherContext: '' }, { title: 'Senior SRE', guid: 'ksb69smcflv9oke30pv', specialization: '', city: 'Amsterdam', companyName: 'Miro', totalCompensation: '€101,000', totalCompensationNumber: 101000, totalCompensationDetails: '€96K salary, €5K equity/year', baseSalary: '€8,000/month', baseSalaryNumber: 96000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksas3e2n8r8w71ww14c', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€105,000', totalCompensationNumber: 105000, totalCompensationDetails: '€90K salary, €15K equity/year, €5K benefits', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksav2kak2yuqs1v6fco', specialization: '', city: 'Amsterdam', companyName: '🔒 Global insurance company', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '€85K salary, €5K bonus', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Senior Data Scientist', guid: 'ksaibzy1b6dy9e3ink9', specialization: '', city: 'Amsterdam', companyName: 'Allianz', totalCompensation: '€94,000', totalCompensationNumber: 94000, totalCompensationDetails: '€84K salary, €10K bonus', baseSalary: '€7,000/month', baseSalaryNumber: 84000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ksa5ryqed6g2e7uhgzj', specialization: 'Backend', city: 'Amsterdam (remote within country)', companyName: 'GitLab', totalCompensation: '€181,000', totalCompensationNumber: 181000, totalCompensationDetails: '€93K salary, €88K equity/year', baseSalary: '€7,750/month', baseSalaryNumber: 93000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer (C++)', guid: 'ksavmz7f22igg2ms6vh', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€120,000', totalCompensationNumber: 120000, totalCompensationDetails: '€70K salary, €50K bonus', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '2020', otherContext: '' }, { title: 'Engineering Manager', guid: 'ksayerj00uggun1pcamk', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€120,000', totalCompensationNumber: 120000, totalCompensationDetails: '', baseSalary: '€10,000/month', baseSalaryNumber: 120000, oldYearForData: '', otherContext: '' }, { title: 'VP Engineering', guid: 'ksa67nme7gyb0pry1tt', specialization: '', city: 'Amsterdam', companyName: 'Dutch Scaleup (Series A)', totalCompensation: '€135,000', totalCompensationNumber: 135000, totalCompensationDetails: '€120K salary, €15K equity/year', baseSalary: '€10,000/month', baseSalaryNumber: 120000, oldYearForData: '', otherContext: '' }, { title: 'Senior Frontend Engineer', guid: 'ksb37ldat4mhqjnwjhs', specialization: '', city: 'Amsterdam', companyName: 'ABN AMRO', totalCompensation: '€108,000', totalCompensationNumber: 108000, totalCompensationDetails: '', baseSalary: '€9,000/month', baseSalaryNumber: 108000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'ksaz0dlmqie69egvau', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '€60K salary, €30K bonus', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '2020', otherContext: '' }, { title: 'Project Manager', guid: 'ksb3qjtzdpimnrqnfld', specialization: '', city: 'Delft', companyName: '🔒 Medical device company with US HQ', totalCompensation: '€92,000', totalCompensationNumber: 92000, totalCompensationDetails: '€80K salary, €12K bonus', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Integration Architect', guid: 'ks9c1b9neo72wah4fpq', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 Augmented intelligence platform', totalCompensation: '€123,000', totalCompensationNumber: 123000, totalCompensationDetails: '€108K salary, €15K bonus, €4K benefits', baseSalary: '€9,000/month', baseSalaryNumber: 108000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkwdctg1fip1l4lj4u', specialization: '', city: 'Amsterdam', companyName: 'FindHotel', totalCompensation: '€85,000', totalCompensationNumber: 85000, totalCompensationDetails: '€80K salary, €5K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'ks79vair4bk0pe0mkxf', specialization: '', city: 'Amsterdam (flexible days)', companyName: '🔒 International Startup', totalCompensation: '€116,000', totalCompensationNumber: 116000, totalCompensationDetails: '€98K salary, €18K equity/year, €8K benefits', baseSalary: '€8,167/month', baseSalaryNumber: 98000, oldYearForData: '2020', otherContext: '' }, { title: 'Staff Software Engineer', guid: 'ks6ugptwgnfep3cf94n', specialization: '', city: 'Amsterdam (hybrid option)', companyName: 'ServiceNOW', totalCompensation: '€113,000', totalCompensationNumber: 113000, totalCompensationDetails: '€84K salary, €13K bonus, €17K equity/year', baseSalary: '€7,000/month', baseSalaryNumber: 84000, oldYearForData: '', otherContext: '' }, { title: 'Team Lead', guid: 'ks7bn3dps78d2ri89jm', specialization: '', city: 'Amsterdam (hybrid option)', companyName: '🔒 SMS, Voice, Chat API company', totalCompensation: '€77,500', totalCompensationNumber: 77500, totalCompensationDetails: '€78K salary, €7K benefits', baseSalary: '€6,478/month', baseSalaryNumber: 77740, oldYearForData: '', otherContext: '' }, { title: 'Lead Engineer', guid: 'ks77fwcz5xp8a4v722o', specialization: '', city: 'Hilversum', companyName: 'Nike', totalCompensation: '€101,000', totalCompensationNumber: 101000, totalCompensationDetails: '€92K salary, €9K bonus, €20K relocation', baseSalary: '€7,667/month', baseSalaryNumber: 92000, oldYearForData: '2018', otherContext: '' }, { title: 'Software Engineer', guid: 'ks77yzb8t13jtgwx94', specialization: '', city: 'Amsterdam', companyName: '🔒 Media company with US HQ', totalCompensation: '€100,000', totalCompensationNumber: 100000, totalCompensationDetails: '', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkmzeplohkn6xu0po', specialization: '', city: 'Amsterdam', companyName: '🔒 Media company / video streaming', totalCompensation: '€70,500', totalCompensationNumber: 70500, totalCompensationDetails: '€64K salary, €6K bonus', baseSalary: '€5,333/month', baseSalaryNumber: 64000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'ks73sjknleea7pkg5bh', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€95,000', totalCompensationNumber: 95000, totalCompensationDetails: '€80K salary, €15K sign-on', baseSalary: '€6,655/month', baseSalaryNumber: 79860, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkndj0fh682h6a6o8h', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€102,000', totalCompensationNumber: 102000, totalCompensationDetails: '€82K salary, €8K bonus, €12K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Principal Software Engineer', guid: 'kqkxqge5w575uwk5jge', specialization: '', city: 'Remote (remote from anywhere)', companyName: '🔒 Cloud native company', totalCompensation: '€110,000', totalCompensationNumber: 110000, totalCompensationDetails: '', baseSalary: '€9,167/month', baseSalaryNumber: 110000, oldYearForData: '', otherContext: '' }, { title: 'Backend Engineer II', guid: 'ks701cxx43xxx3fqej9', specialization: '', city: 'Amsterdam (remote from anywhere)', companyName: '🔒 Music streaming company', totalCompensation: '€112,000', totalCompensationNumber: 112000, totalCompensationDetails: '€94K salary, €18K equity/year, €20K relocation', baseSalary: '€7,830/month', baseSalaryNumber: 93960, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkwy88lc6uqro2tohv', specialization: '', city: 'Amsterdam', companyName: '🔒 SMS, Voice, Chat API company', totalCompensation: '€75,000', totalCompensationNumber: 75000, totalCompensationDetails: '', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkxs127vcy79dr41ei', specialization: '', city: 'Amsterdam', companyName: 'CarNext.com', totalCompensation: '€83,000', totalCompensationNumber: 83000, totalCompensationDetails: '€75K salary, €8K bonus', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqky18t2tktj5ojw8n', specialization: '', city: 'The Hague', companyName: 'European Patent Office', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '€84K salary, €2K bonus', baseSalary: '€7,000/month', baseSalaryNumber: 84000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjt4erm63yeopqbrl7', specialization: '', city: 'Amsterdam', companyName: '🔒 Payments automation company', totalCompensation: '€82,500', totalCompensationNumber: 82500, totalCompensationDetails: '€75K salary, €8K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Engineer', guid: 'kqky4tt59zbhrdzeioo', specialization: 'Frontend', city: 'The Hague', companyName: 'European Patent Office', totalCompensation: '€87,500', totalCompensationNumber: 87500, totalCompensationDetails: '', baseSalary: '€7,300/month', baseSalaryNumber: 87600, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjlhxx0mcj97pgjyob', specialization: 'Java', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€79,000', totalCompensationNumber: 79000, totalCompensationDetails: '€75K salary, €4K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjsbshgnvhqtvaums', specialization: '', city: 'Amsterdam', companyName: 'LeasePlan', totalCompensation: '€84,000', totalCompensationNumber: 84000, totalCompensationDetails: '€79K salary, €5K bonus', baseSalary: '€6,583/month', baseSalaryNumber: 79000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkxuz3crwg7qgipt89', specialization: '', city: 'Amsterdam', companyName: '🔒 Payments platform startup', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '€75K salary, €15K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkwzdzo8wzqb7rp3e', specialization: 'Android', city: 'Amsterdam', companyName: 'Series B Startup', totalCompensation: '€113,000', totalCompensationNumber: 113000, totalCompensationDetails: '€98K salary, €15K equity/year', baseSalary: '€8,167/month', baseSalaryNumber: 98000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjsvzzlhcbb01oz1w9', specialization: '', city: 'Amsterdam', companyName: 'Qualcomm', totalCompensation: '€96,000', totalCompensationNumber: 96000, totalCompensationDetails: '€83K salary, €7K bonus, €7K equity/year', baseSalary: '€6,875/month', baseSalaryNumber: 82500, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjjqrzxq88noq3xbpi', specialization: '', city: 'Amsterdam', companyName: '🔒 FinTech company with Dutch HQ', totalCompensation: '€92,500', totalCompensationNumber: 92500, totalCompensationDetails: '€69K salary, €24K equity/year', baseSalary: '€5,750/month', baseSalaryNumber: 69000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjqlfb97nr2qso06cr', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€81,000', totalCompensationNumber: 81000, totalCompensationDetails: '€70K salary, €7K bonus, €4K equity/year', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Developer', guid: 'kqjku61vtgsvi2hq3kl', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€98,000', totalCompensationNumber: 98000, totalCompensationDetails: '€95K salary, €3K equity/year', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kqjj9ze16lig76xfmo7', specialization: '', city: 'Amsterdam', companyName: '🔒 FinTech company with Dutch HQ', totalCompensation: '€79,000', totalCompensationNumber: 79000, totalCompensationDetails: '€75K salary, €4K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjiukgqsqzh8nx174o', specialization: '', city: 'Amsterdam', companyName: '🔒 Swedish furniture company', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjipsshtr8wnejb41d', specialization: '', city: 'Amsterdam', companyName: 'Miro', totalCompensation: '€105,000', totalCompensationNumber: 105000, totalCompensationDetails: '€95K salary, €10K equity/year', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjimau9wpphcn08f1', specialization: '', city: 'Amsterdam', companyName: 'Atlassian', totalCompensation: '€123,000', totalCompensationNumber: 123000, totalCompensationDetails: '€77K salary, €6K bonus, €40K equity/year', baseSalary: '€6,417/month', baseSalaryNumber: 77000, oldYearForData: '', otherContext: '' }, { title: 'Senior Devops Engineer', guid: 'kqjijc6jpyqrgvgan6', specialization: '', city: 'Amsterdam', companyName: '🔒 Ridersharing company', totalCompensation: '€100,000', totalCompensationNumber: 100000, totalCompensationDetails: '', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kqjnut29y9yr37euu9', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€104,000', totalCompensationNumber: 104000, totalCompensationDetails: '€100K salary, €4K equity/year', baseSalary: '€8,333/month', baseSalaryNumber: 100000, oldYearForData: '', otherContext: '' }, { title: 'Tech Lead', guid: 'kqjaib726fbbsrjs7ou', specialization: 'Machine learning', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '€82K salary, €4K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Developer ', guid: 'kqjaj31m2t1eu3s2dzx', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€83,000', totalCompensationNumber: 83000, totalCompensationDetails: '€80K salary, €3K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjqi15u4mzevlgqyzs', specialization: '', city: 'Amsterdam', companyName: 'BUX', totalCompensation: '€74,500', totalCompensationNumber: 74500, totalCompensationDetails: '€70K salary, €5K equity/year', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjqh3pwbtfwkp5njn', specialization: '', city: 'Amsterdam', companyName: 'Bol.com', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjqg16rfnhpcpc7fvn', specialization: '', city: 'Amsterdam', companyName: 'Backbase', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjllv9lki6iuvskxjs', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '€82K salary, €4K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'kqjnrrquzerks1rdbec', specialization: 'Java', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€84,000', totalCompensationNumber: 84000, totalCompensationDetails: '€80K salary, €4K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Manager', guid: 'kqjadvb6sh3evkclp4b', specialization: '', city: 'Amsterdam', companyName: 'DAZN', totalCompensation: '€114,000', totalCompensationNumber: 114000, totalCompensationDetails: '€95K salary, €19K bonus', baseSalary: '€7,917/month', baseSalaryNumber: 95000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineering Team Lead', guid: 'kqja432koqndwmc5vv', specialization: '', city: 'Amsterdam', companyName: 'Communications Startup', totalCompensation: '€72,000', totalCompensationNumber: 72000, totalCompensationDetails: '', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjnvuitf0jyqy8oazu', specialization: 'Level 6', city: 'Amsterdam', companyName: 'Elastic', totalCompensation: '€114,000', totalCompensationNumber: 114000, totalCompensationDetails: '€97K salary, €17K equity/year', baseSalary: '€8,083/month', baseSalaryNumber: 97000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Lead', guid: 'kqjl0tg5fkyyeeek998', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€151,000', totalCompensationNumber: 151000, totalCompensationDetails: '€103K salary, €48K equity/year', baseSalary: '€8,583/month', baseSalaryNumber: 103000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqj9q7p0c80cvkjtidc', specialization: 'Chapter Lead', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€107,000', totalCompensationNumber: 107000, totalCompensationDetails: '€105K salary, €2K bonus', baseSalary: '€8,750/month', baseSalaryNumber: 105000, oldYearForData: '2020', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjqykn67sjyc9s749g', specialization: '', city: 'Amsterdam', companyName: 'Hiber', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Tech Lead', guid: 'kqjkxmlmccekkgsto7l', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€93,000', totalCompensationNumber: 93000, totalCompensationDetails: '€90K salary, €3K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer ', guid: 'kqjkuy07ym2xc3g93kp', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€77,000', totalCompensationNumber: 77000, totalCompensationDetails: '€75K salary, €2K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqiggcaqgfwlz1k5pdf', specialization: '', city: 'Amsterdam', companyName: '🔒 Secure communications company', totalCompensation: '€71,000', totalCompensationNumber: 71000, totalCompensationDetails: '', baseSalary: '€5,917/month', baseSalaryNumber: 71000, oldYearForData: '', otherContext: '' }, { title: 'Expert Engineer', guid: 'kqig20nhcbaycf1d1o4', specialization: '', city: 'Amsterdam', companyName: '🔒 Top 3 Dutch Bank', totalCompensation: '€115,000', totalCompensationNumber: 115000, totalCompensationDetails: '', baseSalary: '€9,583/month', baseSalaryNumber: 115000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqi72vahs3bedjgfej7', specialization: '', city: 'Amsterdam', companyName: '🔒 Video tooling company with US HQ', totalCompensation: '€113,000', totalCompensationNumber: 113000, totalCompensationDetails: '', baseSalary: '€9,417/month', baseSalaryNumber: 113000, oldYearForData: '', otherContext: '' }, { title: 'Staff Software Engineer', guid: 'ks7a7y7kxh4jiqpsua', specialization: '', city: 'Amsterdam', companyName: '🔒 Dutch FinTech company', totalCompensation: '€125,000', totalCompensationNumber: 125000, totalCompensationDetails: '€125K salary, €4K benefits', baseSalary: '€10,417/month', baseSalaryNumber: 125000, oldYearForData: '', otherContext: '' }, { title: 'Product Engineer', guid: 'kqi1oz9wa1fnh61yi15', specialization: '', city: 'Amsterdam', companyName: '🔒 Design tooling company', totalCompensation: '€118,000', totalCompensationNumber: 118000, totalCompensationDetails: '€80K salary, €8K bonus, €30K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Product Engineer', guid: 'kqi1lxt1a62wu6dyz1s', specialization: '', city: '', companyName: '🔒 Design tooling company', totalCompensation: '€81,500', totalCompensationNumber: 81500, totalCompensationDetails: '€74K salary, €7K bonus', baseSalary: '€6,175/month', baseSalaryNumber: 74100, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjrfhq4sepx6taiitn', specialization: 'Mobile', city: 'Amsterdam', companyName: 'eBay', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '€75K salary, €8K bonus, €8K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Developer', guid: 'kqjljfixmk08wp61fq', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€83,000', totalCompensationNumber: 83000, totalCompensationDetails: '€80K salary, €3K equity/year', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjl2bem7sxlbaojfru', specialization: 'Java', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€72,500', totalCompensationNumber: 72500, totalCompensationDetails: '€70K salary, €3K equity/year', baseSalary: '€5,833/month', baseSalaryNumber: 70000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqi66d4gq1587nhwewc', specialization: '', city: 'Amsterdam', companyName: 'IKEA', totalCompensation: '€90,000', totalCompensationNumber: 90000, totalCompensationDetails: '', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kqjjttlsaolv4fb9ifh', specialization: 'C', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€123,000', totalCompensationNumber: 123000, totalCompensationDetails: '€75K salary, €48K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjo0wef6mocy7dorju', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '€82K salary, €4K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkvv0a42sa2w0km8ss', specialization: 'Frontend', city: 'Amsterdam', companyName: 'MessageBird', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '€72K salary, €10K equity/year', baseSalary: '€6,000/month', baseSalaryNumber: 72000, oldYearForData: '', otherContext: '' }, { title: 'Lead Engineer', guid: 'kqgpkgiuxlqe4ks4c', specialization: '', city: 'Hilversum', companyName: 'Nike', totalCompensation: '€104,000', totalCompensationNumber: 104000, totalCompensationDetails: '€90K salary, €14K bonus, €2K benefits', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjqf0xuuoe8upzcyi', specialization: '', city: 'Amsterdam', companyName: '<NAME>', totalCompensation: '€100,000', totalCompensationNumber: 100000, totalCompensationDetails: '€85K salary, €15K sign-on', baseSalary: '€7,083/month', baseSalaryNumber: 85000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'kqi51sjbwesgxe9qgpr', specialization: 'Frontend', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€70,000', totalCompensationNumber: 70000, totalCompensationDetails: '€68K salary, €2K equity/year', baseSalary: '€5,667/month', baseSalaryNumber: 68000, oldYearForData: '2018', otherContext: '' }, { title: '🔒 Mid-level position within software engineering', guid: 'kqi4ydkings7ubfz54h', specialization: '', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€106,000', totalCompensationNumber: 106000, totalCompensationDetails: '€87K salary, €13K bonus, €6K equity/year', baseSalary: '€7,250/month', baseSalaryNumber: 87000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqjlmnnmaj1i5craqth', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€87,000', totalCompensationNumber: 87000, totalCompensationDetails: '€82K salary, €5K equity/year', baseSalary: '€6,833/month', baseSalaryNumber: 82000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjlkoxono070xkr5rl', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€82,000', totalCompensationNumber: 82000, totalCompensationDetails: '€79K salary, €3K equity/year', baseSalary: '€6,583/month', baseSalaryNumber: 79000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'kqkybvvsw6qj1voctsn', specialization: '', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjnszubqrfa1kpfek9', specialization: 'Java', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€79,000', totalCompensationNumber: 79000, totalCompensationDetails: '€75K salary, €4K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqjlh95zw8uinu7m269', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€62,000', totalCompensationNumber: 62000, totalCompensationDetails: '€60K salary, €2K equity/year', baseSalary: '€5,000/month', baseSalaryNumber: 60000, oldYearForData: '', otherContext: '' }, { title: 'Senior Frontend Development Consultant', guid: 'kqj9znsk6ahw9089vqq', specialization: '', city: 'Amsterdam', companyName: 'Passionate People', totalCompensation: '€80,000', totalCompensationNumber: 80000, totalCompensationDetails: '€80K salary, €6K benefits', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqj9v5vudtu1w9qmud', specialization: '', city: 'Amsterdam', companyName: 'Adyen ', totalCompensation: '€69,000', totalCompensationNumber: 69000, totalCompensationDetails: '€67K salary, €2K equity/year', baseSalary: '€5,583/month', baseSalaryNumber: 67000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'kqkyixdsxujucn3cxmp', specialization: '', city: 'Amsterdam', companyName: 'Fareharbor', totalCompensation: '€82,500', totalCompensationNumber: 82500, totalCompensationDetails: '€75K salary, €4K bonus, €4K equity/year', baseSalary: '€6,250/month', baseSalaryNumber: 75000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'krnx3dqqsfmf8x0r4d', specialization: '', city: 'Amsterdam', companyName: 'Adyen', totalCompensation: '€95,000', totalCompensationNumber: 95000, totalCompensationDetails: '€93K salary, €2K equity/year', baseSalary: '€7,750/month', baseSalaryNumber: 93000, oldYearForData: '', otherContext: '' }, { title: 'Software Engineer', guid: 'krp8y8gpu7srkd0yaoq', specialization: 'Tech Lead', city: 'Amsterdam', companyName: 'eBay', totalCompensation: '€89,000', totalCompensationNumber: 89000, totalCompensationDetails: '€78K salary, €6K bonus, €5K equity/year', baseSalary: '€6,500/month', baseSalaryNumber: 78000, oldYearForData: '', otherContext: '' }, { title: 'Software Developer', guid: 'krpypzc6ilyijeobiul', specialization: 'Team Lead', city: 'Amsterdam', companyName: 'Booking.com', totalCompensation: '€106,000', totalCompensationNumber: 106000, totalCompensationDetails: '€86K salary, €12K bonus, €8K equity/year', baseSalary: '€7,167/month', baseSalaryNumber: 86000, oldYearForData: '', otherContext: '' }, { title: 'Senior Software Engineer', guid: 'krpynp80uk6jlmryqgg', specialization: 'Level 11', city: 'Amsterdam', companyName: 'ING', totalCompensation: '€86,000', totalCompensationNumber: 86000, totalCompensationDetails: '€80K salary, €6K bonus, €4K benefits', baseSalary: '€6,667/month', baseSalaryNumber: 80000, oldYearForData: '', otherContext: '' }, { title: 'Engineering Lead', guid: 'ks26lyzgxwzn5p0mbd', specialization: '', city: 'Amsterdam', companyName: '🔒 Series C ecommerce company', totalCompensation: '€89,000', totalCompensationNumber: 89000, totalCompensationDetails: '', baseSalary: '€7,433/month', baseSalaryNumber: 89200, oldYearForData: '', otherContext: '' }, { title: 'Staff Engineer', guid: 'kqkuc9pnxtks4yboas', specialization: '', city: 'Amsterdam', companyName: 'eBay', totalCompensation: '€119,000', totalCompensationNumber: 119000, totalCompensationDetails: '€90K salary, €9K bonus, €20K equity/year', baseSalary: '€7,500/month', baseSalaryNumber: 90000, oldYearForData: '', otherContext: '' }, ]
javaadpatel/tech-pays-eu-graphs
my-app/src/interfaces/salary-data-point.ts
<filename>my-app/src/interfaces/salary-data-point.ts export interface SalaryDataPoint { title: string, companyName: string, baseSalaryNumber: number, totalCompensationNumber: number }
javaadpatel/tech-pays-eu-graphs
my-app/src/interfaces/company-salary-data.ts
import { SalaryDataPoint } from "./salary-data-point"; export interface CompanySalaryData { tierOneData: SalaryDataPoint[], tierTwoData: SalaryDataPoint[], tierThreeData: SalaryDataPoint[] }
javaadpatel/tech-pays-eu-graphs
my-app/src/App.tsx
<reponame>javaadpatel/tech-pays-eu-graphs import { Container, Divider, Header, Image, Icon, Button } from 'semantic-ui-react'; import './App.css'; import CompensationDataVisualization from './CompensationDataVisualization'; import DataDisclaimerMessage from './DataDisclaimerMessage'; import DataSourceMessage from './DataSourceMessage'; const src = '/images/company_tiers.png'; function App() { return ( <div style={{ display: "flex", minHeight: "100vh", flexDirection: "column" }} > <Container textAlign='center' style={{ paddingTop: "30px" }}> <Header as='h2' color='black'> Netherlands Engineering Salaries <Header sub textAlign='right'> <Button color='instagram' as='a' href="https://github.com/javaadpatel/tech-pays-eu-graphs/"> <Icon name='github' /> View source code on GitHub </Button> </Header> </Header> <Divider clearing /> <DataSourceMessage /> <CompensationDataVisualization /> <Header as='h2' icon textAlign='center'> <Icon name='building outline' circular /> <Header.Content>What is the difference between company tiers?</Header.Content> </Header> <Image src={require('./images/company_tiers.png')} size='huge' centered bordered /> <DataDisclaimerMessage /> </Container> </div> ); } export default App;
javaadpatel/tech-pays-eu-graphs
my-app/src/Graph.tsx
import percentile from 'percentile'; import { LineChart, Line, CartesianGrid, YAxis, XAxis, Tooltip, Legend, Text, ResponsiveContainer } from 'recharts'; import { CompanySalaryData } from './interfaces/company-salary-data'; interface GraphProps { companySalaryData: CompanySalaryData, useTotalCompensation: boolean } const Graph: React.FC<GraphProps> = ({ companySalaryData, useTotalCompensation }) => { const strokeWidth = 2; const computePercentiles = (companySalaryData: CompanySalaryData) => { const percentilesToCalculate = [50, 70, 80, 90]; const tierOnePercentiles = percentile( percentilesToCalculate, useTotalCompensation ? companySalaryData.tierOneData.map(x => x.totalCompensationNumber) : companySalaryData.tierOneData.map(x => x.baseSalaryNumber) ) as number[]; const tierTwoPercentiles = percentile( percentilesToCalculate, useTotalCompensation ? companySalaryData.tierTwoData.map(x => x.totalCompensationNumber) : companySalaryData.tierTwoData.map(x => x.baseSalaryNumber) ) as number[]; const tierThreePercentiles = percentile( percentilesToCalculate, useTotalCompensation ? companySalaryData.tierThreeData.map(x => x.totalCompensationNumber) : companySalaryData.tierThreeData.map(x => x.baseSalaryNumber) ) as number[]; return [ { "tier": "tier one", "50": tierOnePercentiles[0], "70": tierOnePercentiles[1], "80": tierOnePercentiles[2], "90": tierOnePercentiles[3], }, { "tier": "tier two", "50": tierTwoPercentiles[0], "70": tierTwoPercentiles[1], "80": tierTwoPercentiles[2], "90": tierTwoPercentiles[3], }, { "tier": "tier three", "50": tierThreePercentiles[0], "70": tierThreePercentiles[1], "80": tierThreePercentiles[2], "90": tierThreePercentiles[3], }, ] } return ( <> <ResponsiveContainer width="100%" height={450}> <LineChart width={1000} height={250} data={computePercentiles(companySalaryData)} margin={{ top: 5, right: 40, left: 40, bottom: 5 }}> <CartesianGrid strokeDasharray="3 3" /> <XAxis dataKey="tier" angle={-45} textAnchor="end" height={100} /> <YAxis label={{ content: ( <Text x={0} y={0} dx={20} dy={225} angle={-90}> Salary (Euro) </Text> ), }} type="number" domain={['dataMin - 10000', 'dataMax + 10000']} /> <Tooltip /> <Legend /> <Line type="monotone" dataKey="90" stroke="#EE2677" strokeWidth={strokeWidth}/> <Line type="monotone" dataKey="80" stroke="#82ca9d" strokeWidth={strokeWidth}/> <Line type="monotone" dataKey="70" stroke="#8884d8" strokeWidth={strokeWidth}/> <Line type="monotone" dataKey="50" stroke="#E86252" strokeWidth={strokeWidth}/> </LineChart> </ResponsiveContainer> </> ) } export default Graph;
Gekkeiju/dev-test-nodejs
src/api/model/country.ts
module.exports = { name: 'string', code: 'string', population: 'number' }
Gekkeiju/dev-test-nodejs
src/api/route/index.ts
import number2 from '../controller/country' import generic from '../controller/generic' import { Server } from 'restify' export default (server: Server) => { server.get('/src/api/country', number2) server.get('/:route', generic.readAll) server.get('/:route/:id', generic.read) server.post('/:route', generic.create) server.put('/:route/:id', generic.update) server.del('/:route/:id', generic.delete) }
Gekkeiju/dev-test-nodejs
src/api/controller/generic.ts
import Model from '../model/index' import {Request, Response, Next} from 'restify' class GenericController { async create(req: Request, res: Response, next: Next) { const { route, token } = req.params const params = req.body console.log(params) const element = await Model[route].create(params) res.send(200, { element }) return next() } async readAll(req: Request, res: Response, next: Next) { const { route, sort = 'created_at', direction = 'asc' } = req.params let elements = await Model[route].find() elements = elements.sort((a: any, b: any) => { let sort_value if(typeof a[sort] === 'string') sort_value = (direction === 'asc') ? a[sort].localeCompare(b[sort]) : b[sort].localeCompare(a[sort]) else sort_value = (direction === 'asc') ? a[sort] - b[sort] : b[sort] - a[sort] return sort_value }) res.send(elements) return next() } async read(req: Request, res: Response, next: Next) { const { route, _id } = req.params const element = await Model[route].findOne({ _id }) res.send(200, element) return next() } async update(req: Request, res: Response, next: Next) { const { route, _id } = req.params const params = req.body const element = await Model[route].findOneAndUpdate( { _id }, params, { new: true } ) res.send(200, element) return next() } async delete(req: Request, res: Response, next: Next) { const { route, _id } = req.params const { ok } = await Model[route].deleteOne({ _id }) res.send(200, { deleted: !!ok }) return next() } } export default new GenericController()
Gekkeiju/dev-test-nodejs
src/api/controller/country.ts
import {Request, Response, Next} from 'restify' import country from '../country' export default (req: Request, res: Response, next: Next) => country() .then(countries => { res.send(countries) next() }) .catch(err => { next(new Error('Something went wrong.')) })
Gekkeiju/dev-test-nodejs
src/api/model/index.ts
import fs from 'fs' import mongoose from 'mongoose' const { Schema } = mongoose export default (() => { //get files with schema values let files = fs.readdirSync(__dirname) //remove self from array files = files.filter(f => f !== 'index.ts') const Models = {} //create models files.map(f => { const model = f.replace('.ts', '') const data = require(`./${model}`) const schema = new Schema( data, { timestamps: { createdAt: 'created_at', updatedAt: 'updated_at' } } ) Models[model] = mongoose.model(model, schema) }) return Models })()
Gekkeiju/dev-test-nodejs
src/index.ts
require('dotenv').config() import restify from 'restify' import corsMiddleware from 'restify-cors-middleware' import routes from './api/route/index' import countries from "./configs/country"; import mongoose from 'mongoose' const { PORT, DB, DB_NAME } = process.env const DB_OPTIONS = { dbName: DB_NAME, useNewUrlParser: true, useFindAndModify: false, useUnifiedTopology: true } const server = restify.createServer() const DB_CALLBACK = async (err: Error) => { const c_count = await mongoose.connection.db.collection('countries').countDocuments() if(c_count === 0) await mongoose.connection.db.collection('countries').insertMany(countries) console.log('DB SUCCESS!!!') } /* * Database Connection */ mongoose.connect(DB!, DB_OPTIONS, DB_CALLBACK) mongoose.connection.on('error', console.error.bind(console, 'MongoDB connection error: ')) //cors const cors = corsMiddleware({ origins: ['*'], allowHeaders: ['*'], exposeHeaders: ['*'] }) server.pre(cors.preflight) server.use(cors.actual) //parsers server.use(restify.plugins.bodyParser({ mapParams: true })) server.use(restify.plugins.queryParser({ mapParams: true })) //custom server.use((req, res, next) => { let { params } = req const { id } = params if(id) params._id = id req.params = params return next() }) routes(server) server.listen(PORT, () => { console.log('%s listening at %s', server.name, server.url); }) /* * Graceful termination */ process.on('SIGTERM', () => { server.close(() => { console.log('Process terminated.') process.exit(0) }) })
nuduja/msclub-backend
src/app.ts
import express, { Express, Request, Response, NextFunction } from 'express'; import dotenv from 'dotenv'; import logger from './util/logger'; import responseHandler from './util/response.handler'; import routes from './api/routes'; import { configuration } from './config'; import connect from './util/database.connection'; dotenv.config(); const app: Express = express(); const PORT: string = configuration.port; const ENVIRONMENT = configuration.environment; const MONGO_URI = configuration.mongodb.uri; // Register Middleware Chain app.use(express.json()); app.use(express.urlencoded({ extended: true })); // Inject Response Handler app.use((req: Request, res: Response, next: NextFunction) => { req.handleResponse = responseHandler; next(); }); // Root API Call app.get("/", (req: Request, res: Response, next: NextFunction) => { res.send("<h2>MS CLUB SLIIT Web API</h2>"); }); // Start the Server app.listen(PORT, () => { logger.info(`Starting on ${ENVIRONMENT} Environment`); logger.info(MONGO_URI); // Connect to Database connect(); // Inject Routes routes(app); logger.info(`API Server up and running on PORT ${PORT}`); });
nuduja/msclub-backend
src/api/models/User.model.ts
import mongoose, { Schema } from "mongoose"; import jwt from "jsonwebtoken"; import bcrypt from "bcryptjs"; import { IUser } from "../interfaces"; import validator from 'validator'; const UserSchema = new Schema<IUser>({ firstName: { type: String, required: true }, middleName: { type: String, required: false }, lastName: { type: String, required: true }, addressLine01: { type: String, required: true }, addressLine02: { type: String, required: true }, city: { type: String, required: true }, province: { type: String, required: true }, phoneNumber01: { type: String, required: [true, 'Phone number 1 is required'], trim: true, max: [10, 'Phone number should have 10 numbers'], validate(value: string) { if (!validator.isMobilePhone(value)) { throw new Error('Phone number 1 is not valid'); } } }, phoneNumber02: { type: String, required: false, trim: true, max: [10, 'Phone number should have 10 numbers'], validate(value: string) { if (!validator.isMobilePhone(value) && value.length > 0) { throw new Error('Phone number 2 is not valid'); } } }, email: { type: String, required: [true, 'Email is required'], trim: true, unique: true, validate(value: string) { if (!validator.isEmail(value)) { throw new Error('Email address is not valid'); } } }, userName: { type: String, required: false, default: null, unique: true }, password: { type: String, required: false }, profileImageUrl: { type: String, required: false, default: null }, description: { type: String, required: false }, socialMedia: [ { name: { type: String, required: true }, publicURL: { type: String, required: true }, }, ], tags: [{ type: String, required: false }], authToken: { type: String, required: false }, deletedAt: { type: Date, required: false, default: null }, deletedBy: { type: Schema.Types.ObjectId, required: false, default: null }, }, { timestamps: true, }); // Hash the user password UserSchema.pre("save", async function (next) { let user = this as IUser; let password: any = user.password; if (!user.isModified("password")) { return next(); } // Number of rounds hash function will execute const salt = await bcrypt.genSalt(10); const hash = await bcrypt.hashSync(password, salt); user.password = hash; return next(); }); UserSchema.methods.generateAuthToken = async function () { let user = this as IUser; const secret = process.env.JWT_SECRET as string; const authToken = jwt.sign({ _id: user._id }, secret); user.authToken = authToken; await user.save(); return authToken; }; const UserModel = mongoose.model<IUser>("users", UserSchema); export default UserModel;
nuduja/msclub-backend
src/api/routes/index.ts
<gh_stars>1-10 import { Express } from "express"; import controller from "../controllers"; import middleware from "../middleware"; import multer from "multer"; const upload = multer(); export default function (app: Express) { // User endpoints app.post("/user/", upload.single('profileImage'), controller.createUser); // Contact Us endpoints app.post('/contact/', controller.createContact); app.get('/contact/', controller.getAllContacts); app.delete('/contact/:contactId', controller.removeContact); // Event endpoints app.post("/event/", controller.insertEvent); app.get("/event/", controller.getEvents); app.get("/event/:eventId/", controller.getEvent); app.get("/pastevent/", controller.getPastEvents); app.get("/upcomingevent/", controller.getUpcomingEvent); app.put("/event/:eventId", controller.updateEvent); app.put("/event/delete/:eventId", controller.deleteEvent); // Webinar endpoints app.post("/webinar/", controller.insertWebinar); app.get("/webinar/", controller.getWebinars); app.get("/webinar/:webinarId/", controller.getWebinarById); app.get("/pastwebinar/", controller.getPastWebinars); app.get("/upcomingwebinar/", controller.getUpcomingWebinar); app.put("/webinar/:webinarId", controller.updateWebinar); app.put("/webinar/delete/:webinarId", controller.deleteWebinar); // Top Speaker endpoints app.post("/topspeaker/", controller.insertTopSpeaker); app.get("/topspeaker/:topSpeakerId/", controller.getTopSpeaker); app.get("/topspeaker/", controller.getTopSpeakers); app.put("/topspeaker/:topSpeakerId", controller.updateTopSpeaker); app.put("/topspeaker/delete/:topSpeakerId", controller.deleteTopSpeaker); // BoardMember endpoints app.get("/boardmember/:boardMemberId/", controller.getBoardMemberbyID); app.get("/boardmember/", controller.getAllBoardMembers); app.put("/boardmember/:boardMemberId", controller.updateBoardMemberDetails); app.put( "/boardmember/delete/:boardMemberId", controller.deleteBoardMemberDetails ); // ExecutiveBoard endpoints app.post("/executive/", controller.insertExecutiveBoard); app.get("/executive/:executiveBoardId/", controller.getExecutiveBoardbyID); app.get("/executive/", controller.getExecutiveBoard); app.put("/boardmember/:executiveBoardId", controller.addBoardMember); app.put( "/executive/:executiveBoardId", controller.updateExecutiveBoardDetails ); app.put( "/executive/delete/:executiveBoardId/", controller.deleteExecutiveBoardDetails ); /** * @todo implement the @routes for TopSpeakerController */ /** * @todo implement the @routes for ApplicationController */ }
nuduja/msclub-backend
src/util/email.handler.ts
<reponame>nuduja/msclub-backend import nodemailer from 'nodemailer'; import handlebars from 'handlebars'; import fs from 'fs'; import logger from './logger'; import { configuration } from '../config'; import path from 'path'; import moment from 'moment'; // HTML Configuration require.extensions['.html'] = (module: any, fileName: string) => { module.exports = fs.readFileSync(fileName, 'utf8'); } const transport = nodemailer.createTransport({ host: configuration.email.host, port: configuration.email.port, secure: configuration.email.secure, auth: { user: configuration.email.auth.user, pass: configuration.email.auth.pass } }); let template: HandlebarsTemplateDelegate; let htmlToSend: string; class EmailService { static sendEmailWithTemplate(fileName: string, to: string, subject: string, emailBodyData: any) { return new Promise((resolve, reject) => { let templatePath = this.getEmailTemplatePath(fileName); if (templatePath) { this.readTemplate( templatePath, (error: any, html: any) => { if (error) { logger.error(error.message); return reject(error.message); } template = handlebars.compile(html); htmlToSend = template(emailBodyData); this.retry( 5, function () { return EmailService.sendEmail(to, subject, htmlToSend) .then((responseData) => { return resolve(responseData); }) .catch((error) => { return reject(error.message); }); }, 'sendEmailWithTemplate->sendEmail' ); } ); } else { return reject('Email template not found'); } }); } static getEmailTemplatePath = (fileName: string) => { let emailTemplatePath = path.join(__dirname, '../', 'templates', fileName); if (!emailTemplatePath) { return null; } return emailTemplatePath; } static readTemplate = (templatePath: string, callback: any) => { fs.readFile( templatePath, { encoding: 'utf-8', }, (error, html) => { if (error) { logger.error('Read template error: ' + error.message); } callback(null, html); } ); } static sendEmail = (to: string, subject: string, htmlTemplate: any) => { return new Promise((resolve, reject) => { transport.sendMail({ from: configuration.email.auth.user, to: to, subject: subject, html: htmlTemplate }) .then((responseData) => { logger.info(`Email sent from ${responseData.envelope.from} to ${responseData.envelope.to}`); return resolve(responseData); }) .catch((error) => { logger.error('Send Email Error: ' + error.message); return reject(error.message); }) }) } static retry = (maxRetries: number, retryFunction: any, retryFunctionName: string) => { logger.info('## RETRY COUNT: ' + maxRetries); return retryFunction() .catch((error: any) => { if (maxRetries <= 0) { const RetryFailedDateAndTime = moment().utcOffset('+05.30').format('MMMM Do YYYY, h:mm:ss a'); logger.error(RetryFailedDateAndTime); /** * @todo - to send Email to the system admin about the failure */ } return this.retry(maxRetries - 1, retryFunction, retryFunctionName); }); } } export default EmailService;
nuduja/msclub-backend
src/api/services/User.service.ts
import { DocumentDefinition } from 'mongoose'; import { IUser } from '../interfaces'; import UserModel from '../models/User.model'; import bcrypt from 'bcrypt'; /** * @param {IUser} userData * @returns {Document} User document */ export const insertUser = async (userData: DocumentDefinition<IUser>) => { return await UserModel.create(userData) .then(async (user) => { await user.generateAuthToken(); return user; }) .catch((error) => { throw new Error(error.message); }); } /** * @todo create @function getUsers to fetch all the users in the system */ /** * @todo create @function updateUser to update a user in the system * @param userId @type string * @param updateData @type DocumentDefinition<IUser> */ /** * @todo create @function deleteUser to delete the user * @param userId @type string */
nuduja/msclub-backend
src/api/interfaces/IConfig.ts
<filename>src/api/interfaces/IConfig.ts interface IConfig { ip: string; port: string; environment: string; mongodb: { uri: string; }, auth: { secret: string; }, email: { host: string; port: number; secure: boolean; pool: boolean; secureConnection: boolean; auth: { user: string; pass: string; } tls: { rejectUnauthorized: boolean; } }, firebase: { apiKey: string; authDomain: string; projectId: string; storageBucket: string; messagingSenderId: string; appId: string; measurementId: string; serviceAccount: string; } } export type { IConfig };
nuduja/msclub-backend
src/api/controllers/ExecutiveBoard.controller.ts
<reponame>nuduja/msclub-backend<filename>src/api/controllers/ExecutiveBoard.controller.ts import { Express, Request, Response, NextFunction } from "express"; import ExecutiveBoardService from "../services"; import logger from "../../util/logger"; /** * @param request * @param response * @param next * @returns void */ export const insertExecutiveBoard = async ( request: Request, response: Response, next: NextFunction ) => { await ExecutiveBoardService.insertExecutiveBoard(request.body) .then((data) => { request.handleResponse.successRespond(response)(data); next(); }) .catch((error: any) => { request.handleResponse.errorRespond(response)(error.message); next(); }); }; /** * @param request * @param response * @param next * @returns DocumentDefinition<IExecutiveBoard> */ export const getExecutiveBoardbyID = async ( request: Request, response: Response, next: NextFunction ) => { await ExecutiveBoardService.getExecutiveBoardbyID( request.params.executiveBoardId ) .then((data) => { request.handleResponse.successRespond(response)(data); next(); }) .catch((error: any) => { request.handleResponse.errorRespond(response)(error.message); next(); }); }; /** * @param request * @param response * @param next * @returns [DocumentDefinition<IExecutiveBoard>] */ export const getExecutiveBoard = async ( request: Request, response: Response, next: NextFunction ) => { await ExecutiveBoardService.getExecutiveBoard() .then((data) => { request.handleResponse.successRespond(response)(data); next(); }) .catch((error: any) => { request.handleResponse.errorRespond(response)(error.message); next(); }); }; /** * @param request * @param response * @param next * @returns new Board member */ export const addBoardMember = async ( request: Request, response: Response, next: NextFunction ) => { await ExecutiveBoardService.addBoardMember( request.params.executiveBoardId, request.body ) .then((data) => { request.handleResponse.successRespond(response)(data); next(); }) .catch((error: any) => { request.handleResponse.errorRespond(response)(error.message); next(); }); }; /** * @param request * @param response * @param next * @returns updated ExecutiveBoard member */ export const updateExecutiveBoardDetails = async ( request: Request, response: Response, next: NextFunction ) => { await ExecutiveBoardService.updateExecutiveBoardDetails( request.params.executiveBoardId, request.body ) .then((data) => { request.handleResponse.successRespond(response)(data); next(); }) .catch((error: any) => { request.handleResponse.errorRespond(response)(error.message); next(); }); }; /** * @param request * @param response * @param next * @returns deleted ExecutiveBoard member */ export const deleteExecutiveBoardDetails = async ( request: Request, response: Response, next: NextFunction ) => { await ExecutiveBoardService.deleteExecutiveBoardDetails( request.params.executiveBoardId ) .then((data) => { request.handleResponse.successRespond(response)(data); next(); }) .catch((error: any) => { request.handleResponse.errorRespond(response)(error.message); next(); }); };
nuduja/msclub-backend
src/api/interfaces/IUser.ts
<gh_stars>1-10 import { Document, Schema } from 'mongoose'; interface IUser extends Document { firstName: string; middleName?: string; lastName: string; email: string; phoneNumber01: string; phoneNumber02: string; addressLine01: string; addressLine02: string; city: string; province: string; userName?: string; password?: string; profileImage?: any; profileImageUrl?: string; description?: string; socialMedia: ISocialMedia[]; tags?: string[]; authToken?: string; deletedAt?: Date; deletedBy?: Schema.Types.ObjectId; generateAuthToken(): string; } interface ISocialMedia { name: string; publicURL: string; } export type { IUser };
nuduja/msclub-backend
src/api/controllers/index.ts
<reponame>nuduja/msclub-backend import { createUser } from "./User.controller"; import { createContact, getAllContacts, removeContact } from "./Contact.controller"; import { insertEvent, getEvent, getEvents, getPastEvents, getUpcomingEvent, updateEvent, deleteEvent, } from "./Event.controller"; import { insertWebinar, getWebinarById, getWebinars, getPastWebinars, getUpcomingWebinar, updateWebinar, deleteWebinar, } from "./Webinar.controller"; /** *import the @methods from TopSpeakerController */ import { insertTopSpeaker, getTopSpeaker, getTopSpeakers, updateTopSpeaker, deleteTopSpeaker, } from "./TopSpeaker.controller"; /** *import the @methods from ApplicationController */ /** *import the @methods from BoardMemberController */ import { getBoardMemberbyID, getAllBoardMembers, updateBoardMemberDetails, deleteBoardMemberDetails, } from "./BoardMember.controller"; /** *import the @methods from ExecutiveBoardMemberController */ import { insertExecutiveBoard, getExecutiveBoardbyID, getExecutiveBoard, addBoardMember, updateExecutiveBoardDetails, deleteExecutiveBoardDetails, } from "./ExecutiveBoard.controller"; export default { createUser, createContact, getAllContacts, removeContact, insertEvent, getEvent, getEvents, getPastEvents, getUpcomingEvent, updateEvent, deleteEvent, insertWebinar, getWebinarById, getWebinars, getPastWebinars, getUpcomingWebinar, updateWebinar, deleteWebinar, insertExecutiveBoard, getExecutiveBoardbyID, getExecutiveBoard, addBoardMember, updateExecutiveBoardDetails, deleteExecutiveBoardDetails, insertTopSpeaker, getTopSpeaker, getTopSpeakers, updateTopSpeaker, deleteTopSpeaker, getBoardMemberbyID, getAllBoardMembers, updateBoardMemberDetails, deleteBoardMemberDetails, };
nuduja/msclub-backend
src/api/controllers/Application.controller.ts
/** * @todo implement a @function addApplication that calls * @function addApplication in the ApplicationService * * @param {Request} request - Request from the frontend * @param {Response} response - Response that need to send to the client * @param {NextFunction} next - Next function * @returns {IApplication} - New application document */ /** * @todo implement a @function getApplicationById that calls * @function fetchApplicationById in the ApplicationService * * @param {Request} request - Request from the frontend * @param {Response} response - Response that need to send to the client * @param {NextFunction} next - Next function * @returns {IApplication} - Application document that relevent to the passed ID */ /** * @todo implement a @function getApplications that calls * @function fetchApplications in the ApplicationService * * @param {Request} request - Request from the frontend * @param {Response} response - Response that need to send to the client * @param {NextFunction} next - Next function * @returns {IApplication} - All application documents */ /** * @todo implement a @function setApplicationArchive that calls * @function archiveApplication in the ApplicationService * * @param {Request} request - Request from the frontend * @param {Response} response - Response that need to send to the client * @param {NextFunction} next - Next function * @returns {IApplication} - Updated application document */
nuduja/msclub-backend
src/api/controllers/User.controller.ts
import { Express, Request, Response, NextFunction } from 'express'; import UserService from '../services'; import logger from '../../util/logger'; /** * @param {Request} request - Request from the frontend * @param {Response} response - Response that need to send to the client * @param {NextFunction} next - Next function * @returns {IUser} User document */ export const createUser = async (request: Request, response: Response, next: NextFunction) => { await UserService.insertUser(request.body) .then((data) => { logger.info(`New user with ID ${data._id} created`); request.handleResponse.successRespond(response)(data); next(); }) .catch((error: any) => { logger.error(error.message); request.handleResponse.errorRespond(response)(error.message); next(); }); } /** * @todo implement a @function getAllUsers that calls * @function getUsers in the UserService * * @param {Request} request - Request from the frontend * @param {Response} response - Response that need to send to the client * @param {NextFunction} next - Next function * @returns {IUser[]} All user documents in the system */ /** * @todo implement a @function updateUser that calls * @function updateUser in the UserService * * @param {Request} request - Request from the frontend * @param {Response} response - Response that need to send to the client * @param {NextFunction} next - Next function * @returns {IUser} Updated user document */ /** * @todo implement a @function removeUser that calls * @function deleteUser in the UserService * * @param {Request} request - Request from the frontend * @param {Response} response - Response that need to send to the client * @param {NextFunction} next - Next function * @returns {IUser} Deleted user document */
nuduja/msclub-backend
src/util/image.handler.ts
<reponame>nuduja/msclub-backend<gh_stars>1-10 import firebase from "../config/firebase.config"; import imagemin from "imagemin"; import sharp from "sharp"; import { v4 as uuidv4 } from 'uuid'; import logger from "./logger"; /** * @param {Buffer | any} file File to upload to the bucket * @param {string} directory Storage bucket folder name * @returns {Promise<string>} Downloadable URL of the image * * Functions that are using * @function compressedImage * @function convertToJPG * @function generateImageCode */ export const getImageURL = async (file: any, directory: string): Promise<string> => { const bucket = firebase.storage().bucket(); const originalName = file.originalname as string; const imageCode = generateImageCode(originalName); const filePath = `${directory}/${imageCode}`; const bucketFile = bucket.file(filePath); // Compress the Image let image = await compressImage(file.buffer); await bucketFile.save(image, { contentType: file.mimetype, gzip: true }); const [url] = await bucketFile.getSignedUrl({ action: 'read', expires: '01-01-2025' }); logger.info(`${originalName} uploaded to the storage`); return url; } const compressImage = async (file: any) => { const compressQuality = 40; if (!file) { return 'empty'; } const compressedImage = await imagemin.buffer(file, { plugins: [ convertToJPG ] }); return compressedImage; } const convertToJPG = (imageBuffer: any) => { return sharp(imageBuffer).resize({ width: 500 }).png().toBuffer(); } const generateImageCode = (originalName: string) => { let uuid = uuidv4(); let imageCode: string = ''; for (let index = 0; index < uuid.length; index++) { uuid = uuid.replace('-', ''); } imageCode = uuid.substring(0, 6) + '-' + originalName; return imageCode; }
nuduja/msclub-backend
src/config/index.ts
<filename>src/config/index.ts import { IConfig } from "../api/interfaces"; const environment = process.env.ENVIRONMENT as string; let configuration: IConfig; if (environment === 'Development') { configuration = { ip: process.env.IP || 'localhost', port: process.env.PORT as string || '8087', environment: process.env.ENVIRONMENT as string, mongodb: { uri: process.env.MONGO_URI as string }, auth: { secret: 'msClubDevJwtSecret' }, email: { host: 'smtp.gmail.com', port: 465, secure: true, pool: true, secureConnection: true, auth: { user: '<EMAIL>', pass: '<PASSWORD>' }, tls: { rejectUnauthorized: false } }, firebase: { apiKey: process.env.FIREBASE_API_KEY as string, authDomain: process.env.FIREBASE_AUTH_DOMAIN as string, projectId: process.env.FIREBASE_PROJECT_ID as string, storageBucket: process.env.FIREBASE_STORAGE_BUCKET as string, messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID as string, appId: process.env.FIREBASE_APP_ID as string, measurementId: process.env.FIREBASE_MEASUREMENT_ID as string, serviceAccount: process.env.FIREBASE_SERVICE_ACCOUNT as string, } }; } else if (environment === 'Production') { configuration = { ip: process.env.IP || 'localhost', port: process.env.PORT as string || '8087', environment: process.env.ENVIRONMENT as string, mongodb: { uri: process.env.MONGO_URI as string }, auth: { secret: 'msClubProdJwtSecret' }, email: { host: 'smtp.gmail.com', port: 465, secure: true, pool: true, secureConnection: true, auth: { user: '<EMAIL>', pass: '<PASSWORD>' }, tls: { rejectUnauthorized: false } }, firebase: { apiKey: process.env.FIREBASE_API_KEY as string, authDomain: process.env.FIREBASE_AUTH_DOMAIN as string, projectId: process.env.FIREBASE_PROJECT_ID as string, storageBucket: process.env.FIREBASE_STORAGE_BUCKET as string, messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID as string, appId: process.env.FIREBASE_APP_ID as string, measurementId: process.env.FIREBASE_MEASUREMENT_ID as string, serviceAccount: process.env.FIREBASE_SERVICE_ACCOUNT as string, } }; } export { configuration };
nuduja/msclub-backend
src/api/services/Application.service.ts
<filename>src/api/services/Application.service.ts import { DocumentDefinition, FilterQuery } from "mongoose"; import { IApplication } from "../interfaces"; import ApplicationModel from "../models/Application.model"; /** * Application Service * @param {IApplication} application * @returns {Promise<IApplication>} */ export const addApplication = async ( applicationData: DocumentDefinition<IApplication> ) => { return await ApplicationModel.create(applicationData) .then((application) => { return application; }) .catch((error) => { throw new Error(error.message); }); }; /** Application Service * @param applicationId @type string * @returns {Promise<IApplication>} */ export const fetchApplicationById = async (applicationId: string) => { return await ApplicationModel.findById(applicationId) .then((application) => { return application; }) .catch((error) => { throw new Error(error.message); }); }; /** * Application Service * @param {FilterQuery<IApplication>} query * @returns {Promise<IApplication>} */ export const fetchApplications = async () => { return await ApplicationModel.aggregate([ { $match: { deletedAt: { $eq: null } } }, ]) .then((applications) => { return applications; }) .catch((error) => { throw new Error(error.message); }); }; /** delete an Application * @param applicationId @type string */ export const archiveApplication = async (applicationId: string) => { return await ApplicationModel.findById(applicationId) .then(async (application) => { if (application) { application.deletedAt = new Date(); return await application.save(); } else { return null; } }) .catch((error) => { throw new Error(error.message); }); };
nuduja/msclub-backend
src/api/interfaces/IApplication.ts
<filename>src/api/interfaces/IApplication.ts import { Document } from 'mongoose'; interface IApplication extends Document { studentId : string; name : string; email : string contactNumber : string; currentAcademicYear : number; selfIntroduction : string; reasonForJoin : string; linkedIn : string; gitHub : string; blog ?: string; experiences : string; challenges : string; goal : string; skillsAndTalents : string[]; pastWork ?: string; deletedAt : Date; status : string; }; export type { IApplication };
nuduja/msclub-backend
src/config/firebase.config.ts
<gh_stars>1-10 import firebase from 'firebase-admin'; import { configuration } from './index'; const serviceAccount = require('./service-account-file.json'); firebase.initializeApp({ credential: firebase.credential.cert(serviceAccount), storageBucket: process.env.FIREBASE_STORAGE_BUCKET, projectId: configuration.firebase.projectId, }); export default firebase;
sidorovpavel/writing-javascript-actions
.github/actions/joke-action/node_modules/uri-js/dist/esnext/schemes/ws.d.ts
<gh_stars>0 import { URISchemeHandler, URIComponents } from "uri-js/dist/esnext/uri"; export interface WSComponents extends URIComponents { resourceName?: string; secure?: boolean; } declare const handler: URISchemeHandler; export default handler;
sidorovpavel/writing-javascript-actions
.github/actions/issue-maker/node_modules/@octokit/types/dist-types/VERSION.d.ts
<reponame>sidorovpavel/writing-javascript-actions export declare const VERSION = "6.17.3";
sidorovpavel/writing-javascript-actions
.github/actions/joke-action/node_modules/uri-js/dist/esnext/regexps-iri.d.ts
import { URIRegExps } from "uri-js/dist/esnext/uri"; declare const _default: URIRegExps; export default _default;
sidorovpavel/writing-javascript-actions
.github/actions/joke-action/node_modules/uri-js/dist/esnext/schemes/http.d.ts
import { URISchemeHandler } from "uri-js/dist/esnext/uri"; declare const handler: URISchemeHandler; export default handler;
sidorovpavel/writing-javascript-actions
.github/actions/joke-action/node_modules/uri-js/dist/esnext/regexps-uri.d.ts
import { URIRegExps } from "uri-js/dist/esnext/uri"; export declare function buildExps(isIRI: boolean): URIRegExps; declare const _default: URIRegExps; export default _default;
sidorovpavel/writing-javascript-actions
.github/actions/joke-action/node_modules/uri-js/dist/esnext/index.d.ts
export * from "uri-js/dist/esnext/uri";
sidorovpavel/writing-javascript-actions
.github/actions/joke-action/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts
import { URISchemeHandler, URIOptions } from "uri-js/dist/esnext/uri"; import { URNComponents } from "uri-js/dist/esnext/schemes/urn"; export interface UUIDComponents extends URNComponents { uuid?: string; } declare const handler: URISchemeHandler<UUIDComponents, URIOptions, URNComponents>; export default handler;
sidorovpavel/writing-javascript-actions
.github/actions/issue-maker/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts
export declare const VERSION = "5.3.6";
ACM-VIT/uniauth-backend
src/auxiliary/validators/registrationNumber.validator.ts
<reponame>ACM-VIT/uniauth-backend<filename>src/auxiliary/validators/registrationNumber.validator.ts<gh_stars>10-100 import { ValidatorConstraint, ValidatorConstraintInterface } from 'class-validator'; import RegistrationValidator from '@vitspot/vit-registration-number'; /** * Validator for Registration Number as a decorator */ @ValidatorConstraint({ name: 'RegistrationNumber', async: false }) export class RegistrationNumber implements ValidatorConstraintInterface { validate(reg: string) { try { const instance = new RegistrationValidator(reg); return instance !== undefined; } catch (e) { return false; } } defaultMessage() { return 'Invalid Registration Nuber'; } }
ACM-VIT/uniauth-backend
src/dashboard/dashboard.controller.ts
<reponame>ACM-VIT/uniauth-backend import { Controller, Get, Logger, Res, UseGuards, Request, Inject } from '@nestjs/common'; import { DashboardService } from './dashboard.service'; import { Response } from 'express'; import { JwtAuthGuard } from 'src/auth/guards/jwt.guard'; import { UserService } from 'src/user/user.service'; import { AuthorizedUser } from 'src/user/interface/user.interface'; import { LoggedInUser } from 'src/auth/interface/loggedInUser.interface'; import { SCOPE } from 'src/account/minions/scopeMapper.minion'; import { ApplicationModule } from 'src/application/application.module'; import { ApplicationService } from 'src/application/application.service'; @Controller('dashboard') export class DashboardController { private readonly logger = new Logger('dashboard'); /** initialize dashboard module */ constructor( private readonly dashboardService: DashboardService, @Inject(UserService) private readonly userService: UserService, @Inject(ApplicationService) private readonly applicationService: ApplicationService, ) { this.logger.verbose('dashboard initialized'); } /** * Render Landing Page */ @Get() @UseGuards(JwtAuthGuard) async showDashboard(@Request() req, @Res() res: Response) { const loggedInUser: LoggedInUser = req.user; const user = await this.userService.findOneById(loggedInUser.id); return res.render('dashboard/dashboard.hbs', { user }); } /** * To load user dashboard */ @Get('/profile') @UseGuards(JwtAuthGuard) async showProfile(@Request() req, @Res() res: Response) { const loggedInUser: LoggedInUser = req.user; const user = await this.userService.findOneById(loggedInUser.id); return res.render('dashboard/profile.hbs', { user }); } /** * To load data tab */ @Get('/data') @UseGuards(JwtAuthGuard) async showData(@Request() req, @Res() res: Response) { const loggedInUser: LoggedInUser = req.user; const user = await this.userService.findOneById(loggedInUser.id); const applications = await this.applicationService.findAllByParticipant(user); return res.render('dashboard/data.hbs', { user, app: { scope: SCOPE, items: applications, }, }); } /** * To load dev tab */ @Get('/dev') @UseGuards(JwtAuthGuard) async showDev(@Request() req, @Res() res: Response) { const loggedInUser: LoggedInUser = req.user; const user = await this.userService.findOneById(loggedInUser.id); const applications = await this.applicationService.findAllByOwner(user); return res.render('dashboard/dev.hbs', { user, app: { scope: SCOPE, items: applications, }, }); } }
ACM-VIT/uniauth-backend
src/account/minions/scopeMapper.minion.ts
export const SCOPE = { name: { display: '<NAME>', id: 'name' }, registrationNumber: { display: 'Registration Number', id: 'registrationNumber' }, github: { display: 'Github Username', id: 'github' }, twitter: { display: '<NAME>', id: 'twitter' }, linkedIn: { display: 'LinkedIn ID', id: 'linkedIn' }, previousEvents: { display: 'Previous Events you have participated', id: 'previousEvents' }, }; export const scopeMapper = (givenScope: string): string => { for (const [, value] of Object.entries(SCOPE)) { if (value.id === givenScope) { return value.display; } } return 'contact admin'; };
ACM-VIT/uniauth-backend
src/auxiliary/validators/applicationScope.validator.ts
<gh_stars>10-100 import { ValidatorConstraint, ValidatorConstraintInterface } from 'class-validator'; /** * Validator for Strings containing scope strings */ @ValidatorConstraint({ name: 'ApplicationScopes', async: false }) export class ApplicationScopes implements ValidatorConstraintInterface { validate(scopes: string) { try { const validScopes = ['name', 'registrationNumber', 'github', 'twitter', 'linkedIn', 'previousEvents']; const decodedString = decodeURI(scopes); decodedString.split(' ').forEach((str) => { if (!validScopes.includes(str)) { throw new Error('invalid scope'); } }); return true; } catch (e) { return false; } } defaultMessage() { return 'Invalid application scopes'; } }
ACM-VIT/uniauth-backend
src/user/user.service.ts
<filename>src/user/user.service.ts import RegistrationNumberWorker from '@vitspot/vit-registration-number'; import { ConflictException, Injectable, Logger, NotFoundException, UnauthorizedException } from '@nestjs/common'; import { CreateUserDto } from './dto/create-user.dto'; import { UpdateUserDto } from './dto/update-user.dto'; import { User, UserDocument } from './user.schema'; import { UserRepository } from './user.repository'; import { InjectModel } from '@nestjs/mongoose'; import { Model } from 'mongoose'; import * as bcrypt from 'bcrypt'; import { LoginDto } from 'src/auth/dto/login.dto'; import { Application } from 'src/application/application.schema'; /** * **User Service** * * User Service contains all business logic related to users, and is designed to be * imported and re-used in other modules. Therefore it is to ensure that all methods of the service * are self-contained and fit to be used directly as per use-case. * * @category User */ @Injectable() export class UserService { private readonly logger = new Logger('user'); constructor( private readonly userRepository: UserRepository, @InjectModel(User.name) private userModel: Model<UserDocument>, ) {} /** funciton to facilitate user login */ async login(loginDto: LoginDto): Promise<any> { const { email, password } = loginDto; const user = await this.userModel .findOne({ collegeEmail: email }) .select('_id password name registrationNumber collegeEmail'); if (user === null) { throw new NotFoundException('user not found'); } const hashCheck = await bcrypt.compareSync(password, user.password); if (hashCheck === true) { return user; } throw new UnauthorizedException('invalid credentials'); } async create(createUserDto: CreateUserDto): Promise<User> { try { const { registrationNumber, name } = createUserDto; let { password, collegeEmail } = createUserDto; const regNumber = new RegistrationNumberWorker(registrationNumber); const branch = regNumber.getBranch(); const batch = regNumber.getYear(); password = await bcrypt.hashSync(password, 10); collegeEmail = collegeEmail.toLowerCase(); const user = new this.userModel({ name, collegeEmail, branch, batch, password, registrationNumber }); await user.save(); return user; } catch (e) { throw new ConflictException(e.message); } } async pushApplicationIntoUserParticipantList(application: Application, user: User) { try { const result = await this.userModel.findOneAndUpdate( { registrationNumber: user.registrationNumber }, { $addToSet: { authorizedApplications: application }, }, ); this.logger.verbose(`Added ${application.name} to ${user.name}`); } catch (e) { this.logger.verbose(`Error adding ${application.name} to ${user.name}`); } } findAll() { return this.userModel.find(); } findOneById(userId: string) { return this.userModel.findOne({ _id: userId }); } update(id: number, updateUserDto: UpdateUserDto) { return `This action updates a #${id} user`; } remove(id: number) { return `This action removes a #${id} user`; } }
ACM-VIT/uniauth-backend
src/main.ts
<reponame>ACM-VIT/uniauth-backend import * as config from 'config'; import * as cookieParser from 'cookie-parser'; import * as helmet from 'helmet'; import * as rateLimit from 'express-rate-limit'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { AppModule } from './app.module'; import { NestExpressApplication } from '@nestjs/platform-express'; import { NestFactory } from '@nestjs/core'; import { join } from 'path'; /** * Bootstrap application by attaching middleware and initializing auxillary services * @internal */ async function bootstrap() { /** set the logging levels */ const app = await NestFactory.create<NestExpressApplication>(AppModule, { logger: ['log', 'error', 'warn', 'verbose'], }); /** configuring public and views directory */ app.useStaticAssets(join(__dirname, '..', 'public')); app.setBaseViewsDir(join(__dirname, '..', 'views')); app.setViewEngine('hbs'); /** configuring swaggerUI */ const options = new DocumentBuilder() .setTitle(config.get('api.name')) .setDescription(config.get('api.description')) .setVersion(config.get('api.version')) .setContact('<NAME>', 'https://yashkumarverma.github.io/', '<EMAIL>') .setLicense('MIT', 'https://opensource.org/licenses/MIT') .addBearerAuth({ type: 'http', scheme: 'bearer', bearerFormat: 'JWT' }, 'access-token') .build(); const document = SwaggerModule.createDocument(app, options); SwaggerModule.setup(config.get('api.route'), app, document); /** attaching middleware */ app.enableCors(); // app.use(helmet()); /** * windowMs : time interval * max: number of requests * * this will allow max number of requests every windowMs seconds */ app.use( rateLimit({ windowMs: 1000 * 1, max: 10, }), ); /** attach cookie parser */ app.use(cookieParser()); /** binding port to service */ await app.listen(config.get('server.port')); } /** launch the application */ bootstrap();
ACM-VIT/uniauth-backend
src/account/dto/access-user-details.dto.ts
import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty } from 'class-validator'; export class AccessUserDetailsDto { @ApiProperty({ name: 'clientId', description: 'client id of application requesting access', example: '<KEY>', required: true, }) @IsNotEmpty() clientId: string; @ApiProperty({ name: 'clientSecret', description: 'client secret of application requesting access', example: 'eaf2aae4-d4ff-4be2-912e-9e312b917154', required: true, }) @IsNotEmpty() clientSecret: string; @IsNotEmpty() accessToken: string; }
ACM-VIT/uniauth-backend
src/account/account.module.ts
<gh_stars>0 import { AccountController } from './account.controller'; import { AccountService } from './account.service'; import { ApplicationModule } from 'src/application/application.module'; import { AuthModule } from 'src/auth/auth.module'; import { JwtModule } from '@nestjs/jwt'; import { Module } from '@nestjs/common'; import { UserModule } from 'src/user/user.module'; import { accessTokenJwtConstants } from './constants/access_token.constants'; @Module({ imports: [ JwtModule.register({ secret: accessTokenJwtConstants.secret, signOptions: { expiresIn: accessTokenJwtConstants.expiresIn }, }), ApplicationModule, UserModule, AuthModule, ], controllers: [AccountController], providers: [AccountService], }) export class AccountModule {}
ACM-VIT/uniauth-backend
src/auth/stratergy/jwt.stratergy.ts
import { ExtractJwt, Strategy } from 'passport-jwt'; import { Injectable } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { Request } from 'express'; import { newJWTConstants } from '../constants/auth.constants'; @Injectable() export class JwtStrategy extends PassportStrategy(Strategy) { constructor() { super({ jwtFromRequest: ExtractJwt.fromExtractors([ (request: Request) => { return request?.cookies?.vitAuth; }, ]), ignoreExpiration: false, secretOrKey: newJWTConstants.secret, }); } async validate(payload: any) { return { ...payload }; } }
ACM-VIT/uniauth-backend
src/dashboard/dashboard.module.ts
import { ApplicationModule } from 'src/application/application.module'; import { DashboardController } from './dashboard.controller'; import { DashboardService } from './dashboard.service'; import { Module } from '@nestjs/common'; import { UserModule } from 'src/user/user.module'; @Module({ imports: [UserModule, ApplicationModule], controllers: [DashboardController], providers: [DashboardService], }) export class DashboardModule {}
ACM-VIT/uniauth-backend
src/app.controller.ts
import { Controller, Get, Res } from '@nestjs/common'; import { Response } from 'express'; import { ApiTags } from '@nestjs/swagger'; @ApiTags('root') @Controller('') export class AppController { /** to show homepage */ @Get() showIndexPage(@Res() res: Response) { const templateData = { header: 'the next gen auth in vit', title: 'UniAuth', body: 'the only registration form you will ever fill', button: { title: 'Get Involved', href: 'account/login', }, }; return res.render('landing', templateData); } }
ACM-VIT/uniauth-backend
src/user/dto/create-user.dto.ts
import { IsEmail, IsNotEmpty, MaxLength, MinLength, Validate } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; import { RegistrationNumber } from 'src/auxiliary/validators/registrationNumber.validator'; /** * **Create User DTO** * * [[CreateUserDto]] is responsible for handling input and validating the same while * creating a new user for a problem * * @category User */ export class CreateUserDto { /** name of the user] */ @ApiProperty({ description: 'full name of user', example: '<NAME>' }) @IsNotEmpty() @MinLength(3) @MaxLength(255) name: string; /** college registration number of user */ @ApiProperty({ description: 'registration number of user', example: '19BCE2669' }) @IsNotEmpty() @Validate(RegistrationNumber) registrationNumber: string; /** college email of user */ @ApiProperty({ description: 'college email of user', example: '<EMAIL>' }) @IsNotEmpty() @IsEmail({ domain_specific_validation: true }) collegeEmail: string; /** password of user */ @ApiProperty({ description: 'password of user', example: '<PASSWORD>' }) @MinLength(8) @IsNotEmpty() password: string; } export class CreateUserDtoWithCaptcha extends CreateUserDto { @IsNotEmpty() token: string; }
ACM-VIT/uniauth-backend
src/account/dto/update-account.dto.ts
<gh_stars>10-100 import { PartialType } from '@nestjs/mapped-types'; import { CreateAccountDto } from './create-account.dto'; export class UpdateAccountDto extends PartialType(CreateAccountDto) {}
ACM-VIT/uniauth-backend
src/account/dto/incoming-auth.dto.ts
<filename>src/account/dto/incoming-auth.dto.ts<gh_stars>10-100 import { IsEmail, IsNotEmpty } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; export class IncomingAuthDto { /** client ID */ @ApiProperty({ description: 'client ID of application that has initiated the auth', example: '96cdb2d6-1f06-436c-a540-a39281630ff6', }) @IsNotEmpty() client_id: string; /** redirect URI */ @IsNotEmpty() redirect_uri: string; /** scope of application */ // @IsNotEmpty() // @Validate(ApplicationScopes) // scope: string; } export class IncomingAuthLoginDto extends IncomingAuthDto { @IsEmail() email: string; @IsNotEmpty() password: string; }
ACM-VIT/uniauth-backend
src/auth/stratergy/cookie.stratergy.ts
<filename>src/auth/stratergy/cookie.stratergy.ts import { ExtractJwt, Strategy } from 'passport-jwt'; import { Injectable } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { Request } from 'express'; import { UserService } from 'src/user/user.service'; import { newJWTConstants } from '../constants/auth.constants'; @Injectable() export class CookieStratergy extends PassportStrategy(Strategy) { constructor(private readonly userService: UserService) { super({ jwtFromRequest: ExtractJwt.fromExtractors([ (request: Request) => { return request?.cookies?.Authentication; }, ]), secretOrKey: newJWTConstants.secret, }); } async validate(payload: { id: any }) { return this.userService.findOneById(payload.id); } }
ACM-VIT/uniauth-backend
src/config/mongoose.config.ts
import {} from '@nestjs/mongoose'; import * as config from 'config'; /** * initialize database connection based on config file(s) */ export const mongooseConfig = { useNewUrlParser: true, useFindAndModify: false, useCreateIndex: true };
ACM-VIT/uniauth-backend
src/user/interface/user.interface.ts
<filename>src/user/interface/user.interface.ts export interface AuthorizedUser { id?: string; _id?: string; collegeEmail: string; }
ACM-VIT/uniauth-backend
src/auth/auth.controller.ts
<gh_stars>10-100 import { Controller, Post, UsePipes, ValidationPipe, Body, Get, UseGuards } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { AuthService } from './auth.service'; import { LoginDto } from './dto/login.dto'; import { JwtAuthGuard } from './guards/jwt.guard'; @ApiTags('auth') @Controller('auth') export class AuthController { constructor(private authService: AuthService) {} @Post('login') @UsePipes(ValidationPipe) async login(@Body() loginDto: LoginDto): Promise<any> { return this.authService.checkLogin(loginDto); } @Get('/test') @UseGuards(JwtAuthGuard) sayHello() { return { working: true }; } }
ACM-VIT/uniauth-backend
src/user/user.schema.ts
<gh_stars>0 // import * as mongoose from 'mongoose'; import * as mongoose from 'mongoose'; import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Application } from 'src/application/application.schema'; import { Document } from 'mongoose'; export type UserDocument = User & Document; @Schema() export class User { constructor(partial: Partial<User>) { Object.assign(this, partial); } /** * Personal Details */ @Prop({ required: true }) name: string; @Prop() image: string; @Prop({ required: true, select: false }) password: string; @Prop({ default: false }) verified: boolean; /** * Registration Details */ @Prop({ required: true }) registrationNumber: string; @Prop({ required: true }) batch: string; @Prop({ required: true }) branch: string; /** * Emails */ @Prop({ required: true, unique: true }) collegeEmail: string; @Prop() personalEmail: string; /** * Contact Numbers */ @Prop() contactPrimary: string; @Prop() contactSecondary: string; /** * Social Links */ @Prop([String]) profile: string[]; /** Applications created by User */ @Prop({ type: [mongoose.Schema.Types.ObjectId], ref: 'User', required: true, default: [] }) authorizedApplications: Array<Application>; } export const UserSchema = SchemaFactory.createForClass(User);