restructure presentation layer

- Move most GUI related code to /presentation
- Move components to /components (separate from bootstrap and style)
- Move shared components helpers to /components/shared
- Rename Bootstrapping to bootstrapping to enforce same naming
  convention in /presentation
This commit is contained in:
undergroundwires
2021-03-07 19:33:05 +01:00
parent 646db90585
commit f3c7413f52
67 changed files with 100 additions and 71 deletions

View File

@@ -1,7 +1,7 @@
import 'mocha';
import { expect } from 'chai';
import { NonCollapsing } from '@/presentation/Scripts/Cards/NonCollapsingDirective';
import { hasDirective } from '@/presentation/Scripts/Cards/NonCollapsingDirective';
import { NonCollapsing } from '@/presentation/components/Scripts/Cards/NonCollapsingDirective';
import { hasDirective } from '@/presentation/components/Scripts/Cards/NonCollapsingDirective';
const expectedAttributeName = 'data-interaction-does-not-collapse';

View File

@@ -1,13 +1,14 @@
import 'mocha';
import { expect } from 'chai';
import { getScriptNodeId, getScriptId, getCategoryNodeId, getCategoryId } from '@/presentation/Scripts/ScriptsTree/ScriptNodeParser';
import { CategoryStub } from '../../../stubs/CategoryStub';
import { ScriptStub } from '../../../stubs/ScriptStub';
import { parseSingleCategory, parseAllCategories } from '@/presentation/Scripts/ScriptsTree/ScriptNodeParser';
import { CategoryCollectionStub } from '../../../stubs/CategoryCollectionStub';
import { INode, NodeType } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { getScriptNodeId, getScriptId, getCategoryNodeId, getCategoryId } from '@/presentation/components/Scripts/ScriptsTree/ScriptNodeParser';
import { parseSingleCategory,
parseAllCategories } from '@/presentation/components/Scripts/ScriptsTree/ScriptNodeParser';
import { INode, NodeType } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { IScript } from '@/domain/IScript';
import { ICategory } from '@/domain/ICategory';
import { CategoryStub } from '../../../../stubs/CategoryStub';
import { ScriptStub } from '../../../../stubs/ScriptStub';
import { CategoryCollectionStub } from '../../../../stubs/CategoryCollectionStub';
describe('ScriptNodeParser', () => {
it('can convert script id and back', () => {

View File

@@ -1,7 +1,7 @@
import 'mocha';
import { expect } from 'chai';
import { NodeType, INode } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { NodePredicateFilter } from '@/presentation/Scripts/ScriptsTree/SelectableTree/LiquorTree/NodeWrapper/NodePredicateFilter';
import { NodeType, INode } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { NodePredicateFilter } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/LiquorTree/NodeWrapper/NodePredicateFilter';
import { ILiquorTreeExistingNode } from 'liquor-tree';
describe('NodePredicateFilter', () => {

View File

@@ -1,8 +1,8 @@
import 'mocha';
import { expect } from 'chai';
import { ILiquorTreeNode } from 'liquor-tree';
import { NodeType } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { getNewState } from '@/presentation/Scripts/ScriptsTree/SelectableTree/LiquorTree/NodeWrapper/NodeStateUpdater';
import { NodeType } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { getNewState } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/LiquorTree/NodeWrapper/NodeStateUpdater';
describe('NodeStateUpdater', () => {
describe('getNewState', () => {

View File

@@ -1,8 +1,8 @@
import 'mocha';
import { expect } from 'chai';
import { NodeType, INode } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { NodeType, INode } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { ILiquorTreeExistingNode, ILiquorTreeNewNode, ILiquorTreeNodeData, ICustomLiquorTreeData } from 'liquor-tree';
import { convertExistingToNode, toNewLiquorTreeNode } from '@/presentation/Scripts/ScriptsTree/SelectableTree/LiquorTree/NodeWrapper/NodeTranslator';
import { convertExistingToNode, toNewLiquorTreeNode } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/LiquorTree/NodeWrapper/NodeTranslator';
describe('NodeTranslator', () => {
it('convertExistingToNode', () => {

View File

@@ -1,12 +1,12 @@
import 'mocha';
import { expect } from 'chai';
import { ScriptStub } from '../../../../../../stubs/ScriptStub';
import { CategoryReverter } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/Reverter/CategoryReverter';
import { getCategoryNodeId } from '@/presentation/Scripts/ScriptsTree/ScriptNodeParser';
import { CategoryStub } from '../../../../../../stubs/CategoryStub';
import { CategoryCollectionStub } from '../../../../../../stubs/CategoryCollectionStub';
import { CategoryReverter } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/Reverter/CategoryReverter';
import { getCategoryNodeId } from '@/presentation/components/Scripts/ScriptsTree/ScriptNodeParser';
import { SelectedScript } from '@/application/Context/State/Selection/SelectedScript';
import { UserSelection } from '@/application/Context/State/Selection/UserSelection';
import { CategoryStub } from '../../../../../../../stubs/CategoryStub';
import { CategoryCollectionStub } from '../../../../../../../stubs/CategoryCollectionStub';
import { ScriptStub } from '../../../../../../../stubs/ScriptStub';
describe('CategoryReverter', () => {
describe('getState', () => {

View File

@@ -1,13 +1,14 @@
import 'mocha';
import { expect } from 'chai';
import { INode, NodeType } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/INode';
import { getReverter } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/Reverter/ReverterFactory';
import { ScriptReverter } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/Reverter/ScriptReverter';
import { CategoryReverter } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/Reverter/CategoryReverter';
import { CategoryCollectionStub } from '../../../../../../stubs/CategoryCollectionStub';
import { CategoryStub } from '../../../../../../stubs/CategoryStub';
import { getScriptNodeId, getCategoryNodeId } from '@/presentation/Scripts/ScriptsTree/ScriptNodeParser';
import { ScriptStub } from '../../../../../../stubs/ScriptStub';
import { INode, NodeType } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/INode';
import {
getReverter } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/Reverter/ReverterFactory';
import { ScriptReverter } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/Reverter/ScriptReverter';
import { CategoryReverter } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/Reverter/CategoryReverter';
import { getScriptNodeId, getCategoryNodeId } from '@/presentation/components/Scripts/ScriptsTree/ScriptNodeParser';
import { CategoryCollectionStub } from '../../../../../../../stubs/CategoryCollectionStub';
import { CategoryStub } from '../../../../../../../stubs/CategoryStub';
import { ScriptStub } from '../../../../../../../stubs/ScriptStub';
describe('ReverterFactory', () => {
describe('getReverter', () => {

View File

@@ -1,13 +1,13 @@
import 'mocha';
import { expect } from 'chai';
import { ScriptReverter } from '@/presentation/Scripts/ScriptsTree/SelectableTree/Node/Reverter/ScriptReverter';
import { getScriptNodeId } from '@/presentation/Scripts/ScriptsTree/ScriptNodeParser';
import { ScriptReverter } from '@/presentation/components/Scripts/ScriptsTree/SelectableTree/Node/Reverter/ScriptReverter';
import { getScriptNodeId } from '@/presentation/components/Scripts/ScriptsTree/ScriptNodeParser';
import { UserSelection } from '@/application/Context/State/Selection/UserSelection';
import { SelectedScript } from '@/application/Context/State/Selection/SelectedScript';
import { CategoryCollectionStub } from '../../../../../../stubs/CategoryCollectionStub';
import { CategoryStub } from '../../../../../../stubs/CategoryStub';
import { ScriptStub } from '../../../../../../stubs/ScriptStub';
import { SelectedScriptStub } from '../../../../../../stubs/SelectedScriptStub';
import { CategoryCollectionStub } from '../../../../../../../stubs/CategoryCollectionStub';
import { CategoryStub } from '../../../../../../../stubs/CategoryStub';
import { ScriptStub } from '../../../../../../../stubs/ScriptStub';
import { SelectedScriptStub } from '../../../../../../../stubs/SelectedScriptStub';
describe('ScriptReverter', () => {
describe('getState', () => {

View File

@@ -1,6 +1,6 @@
import 'mocha';
import { expect } from 'chai';
import { throttle, ITimer } from '@/presentation/Throttle';
import { throttle, ITimer } from '@/presentation/components/Shared/Throttle';
import { EventSource } from '@/infrastructure/Events/EventSource';
import { IEventSubscription } from '@/infrastructure/Events/IEventSource';