aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/schemaView/CollectionSchemaCells.tsx (renamed from src/client/views/collections/CollectionSchemaCells.tsx)46
-rw-r--r--src/client/views/collections/schemaView/CollectionSchemaHeaders.tsx (renamed from src/client/views/collections/CollectionSchemaHeaders.tsx)18
-rw-r--r--src/client/views/collections/schemaView/CollectionSchemaMovableTableHOC.tsx (renamed from src/client/views/collections/CollectionSchemaMovableTableHOC.tsx)0
-rw-r--r--src/client/views/collections/schemaView/CollectionSchemaView.scss (renamed from src/client/views/collections/CollectionSchemaView.scss)97
-rw-r--r--src/client/views/collections/schemaView/CollectionSchemaView.tsx (renamed from src/client/views/collections/CollectionSchemaView.tsx)0
-rw-r--r--src/client/views/collections/schemaView/SchemaTable.tsx (renamed from src/client/views/collections/SchemaTable.tsx)42
-rw-r--r--src/client/views/nodes/DocumentContentsView.tsx2
7 files changed, 58 insertions, 147 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/schemaView/CollectionSchemaCells.tsx
index 3fb9910b5..2549beaae 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/schemaView/CollectionSchemaCells.tsx
@@ -6,31 +6,31 @@ import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { CellInfo } from "react-table";
import "react-table/react-table.css";
-import { DateField } from "../../../fields/DateField";
-import { Doc, DocListCast, Field, Opt } from "../../../fields/Doc";
-import { Id } from "../../../fields/FieldSymbols";
-import { List } from "../../../fields/List";
-import { SchemaHeaderField } from "../../../fields/SchemaHeaderField";
-import { ComputedField } from "../../../fields/ScriptField";
-import { BoolCast, Cast, DateCast, FieldValue, NumCast, StrCast } from "../../../fields/Types";
-import { ImageField } from "../../../fields/URLField";
-import { Utils, emptyFunction } from "../../../Utils";
-import { Docs } from "../../documents/Documents";
-import { DocumentType } from "../../documents/DocumentTypes";
-import { DocumentManager } from "../../util/DocumentManager";
-import { DragManager } from "../../util/DragManager";
-import { KeyCodes } from "../../util/KeyCodes";
-import { CompileScript } from "../../util/Scripting";
-import { SearchUtil } from "../../util/SearchUtil";
-import { SnappingManager } from "../../util/SnappingManager";
-import { undoBatch } from "../../util/UndoManager";
+import { DateField } from "../../../../fields/DateField";
+import { Doc, DocListCast, Field, Opt } from "../../../../fields/Doc";
+import { Id } from "../../../../fields/FieldSymbols";
+import { List } from "../../../../fields/List";
+import { SchemaHeaderField } from "../../../../fields/SchemaHeaderField";
+import { ComputedField } from "../../../../fields/ScriptField";
+import { BoolCast, Cast, DateCast, FieldValue, NumCast, StrCast } from "../../../../fields/Types";
+import { ImageField } from "../../../../fields/URLField";
+import { Utils, emptyFunction } from "../../../../Utils";
+import { Docs } from "../../../documents/Documents";
+import { DocumentType } from "../../../documents/DocumentTypes";
+import { DocumentManager } from "../../../util/DocumentManager";
+import { DragManager } from "../../../util/DragManager";
+import { KeyCodes } from "../../../util/KeyCodes";
+import { CompileScript } from "../../../util/Scripting";
+import { SearchUtil } from "../../../util/SearchUtil";
+import { SnappingManager } from "../../../util/SnappingManager";
+import { undoBatch } from "../../../util/UndoManager";
import '../DocumentDecorations.scss';
-import { EditableView } from "../EditableView";
-import { MAX_ROW_HEIGHT } from '../globalCssVariables.scss';
-import { DocumentIconContainer } from "../nodes/DocumentIcon";
-import { OverlayView } from "../OverlayView";
+import { EditableView } from "../../EditableView";
+import { MAX_ROW_HEIGHT } from '../../globalCssVariables.scss';
+import { DocumentIconContainer } from "../../nodes/DocumentIcon";
+import { OverlayView } from "../../OverlayView";
import "./CollectionSchemaView.scss";
-import { CollectionView } from "./CollectionView";
+import { CollectionView } from "../CollectionView";
const path = require('path');
export interface CellProps {
diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/schemaView/CollectionSchemaHeaders.tsx
index 3b52e6408..b825d6d96 100644
--- a/src/client/views/collections/CollectionSchemaHeaders.tsx
+++ b/src/client/views/collections/schemaView/CollectionSchemaHeaders.tsx
@@ -3,16 +3,16 @@ import { IconProp, library } from "@fortawesome/fontawesome-svg-core";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { action, computed, observable, runInAction } from "mobx";
import { observer } from "mobx-react";
-import { Doc, DocListCast, Opt } from "../../../fields/Doc";
-import { listSpec } from "../../../fields/Schema";
-import { PastelSchemaPalette, SchemaHeaderField } from "../../../fields/SchemaHeaderField";
-import { ScriptField } from "../../../fields/ScriptField";
-import { Cast, StrCast } from "../../../fields/Types";
-import { undoBatch } from "../../util/UndoManager";
-import { SearchBox } from "../search/SearchBox";
-import { ColumnType } from "./CollectionSchemaView";
+import { Doc, DocListCast, Opt } from "../../../../fields/Doc";
+import { listSpec } from "../../../../fields/Schema";
+import { PastelSchemaPalette, SchemaHeaderField } from "../../../../fields/SchemaHeaderField";
+import { ScriptField } from "../../../../fields/ScriptField";
+import { Cast, StrCast } from "../../../../fields/Types";
+import { undoBatch } from "../../../util/UndoManager";
+import { SearchBox } from "../../search/SearchBox";
+import { ColumnType } from "../CollectionSchemaView";
import "./CollectionSchemaView.scss";
-import { CollectionView } from "./CollectionView";
+import { CollectionView } from "../CollectionView";
const higflyout = require("@hig/flyout");
export const { anchorPoints } = higflyout;
diff --git a/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx b/src/client/views/collections/schemaView/CollectionSchemaMovableTableHOC.tsx
index 149677976..149677976 100644
--- a/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
+++ b/src/client/views/collections/schemaView/CollectionSchemaMovableTableHOC.tsx
diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/schemaView/CollectionSchemaView.scss
index 2bdd280ec..b57fee0e4 100644
--- a/src/client/views/collections/CollectionSchemaView.scss
+++ b/src/client/views/collections/schemaView/CollectionSchemaView.scss
@@ -1,5 +1,4 @@
-@import "../globalCssVariables";
-
+@import "../../globalCssVariables";
.collectionSchemaView-container {
border-width: $COLLECTION_BORDER_WIDTH;
border-color: $intermediate-color;
@@ -16,17 +15,13 @@
justify-content: space-between;
flex-wrap: nowrap;
touch-action: none;
-
div {
touch-action: none;
}
-
-
.collectionSchemaView-tableContainer {
width: 100%;
height: 100%;
}
-
.collectionSchemaView-dividerDragger {
position: relative;
height: 100%;
@@ -37,7 +32,6 @@
background: gray;
cursor: col-resize;
}
-
// .documentView-node:first-child {
// background: $light-color;
// }
@@ -60,17 +54,13 @@
flex-wrap: nowrap;
touch-action: none;
padding: 2px;
-
div {
touch-action: none;
}
-
-
.collectionSchemaView-tableContainer {
width: 100%;
height: 100%;
}
-
.collectionSchemaView-dividerDragger {
position: relative;
height: 100%;
@@ -81,7 +71,6 @@
background: gray;
cursor: col-resize;
}
-
// .documentView-node:first-child {
// background: $light-color;
// }
@@ -93,7 +82,6 @@
box-sizing: border-box;
border: none !important;
float: none !important;
-
.rt-table {
height: 100%;
display: -webkit-inline-box;
@@ -103,12 +91,10 @@
.rt-noData {
display: none;
}
-
.rt-thead {
width: 100%;
z-index: 100;
overflow-y: visible;
-
&.-header {
font-size: 12px;
height: 30px;
@@ -116,12 +102,10 @@
z-index: 100;
overflow-y: visible;
}
-
.rt-resizable-header-content {
height: 100%;
overflow: visible;
}
-
.rt-th {
padding: 0;
border: solid lightgray;
@@ -129,38 +113,31 @@
border-bottom: 2px solid lightgray;
}
}
-
.rt-th {
font-size: 13px;
text-align: center;
-
&:last-child {
overflow: visible;
}
}
-
.rt-tbody {
width: 100%;
direction: rtl;
overflow: visible;
-
.rt-td {
border-right: 1px solid rgba(0, 0, 0, 0.2);
}
}
-
.rt-tr-group {
direction: ltr;
flex: 0 1 auto;
min-height: 30px;
border: 0 !important;
}
-
.rt-tr {
width: 100%;
min-height: 30px;
}
-
.rt-td {
padding: 0;
font-size: 13px;
@@ -168,18 +145,15 @@
white-space: nowrap;
display: flex;
align-items: center;
-
.imageBox-cont {
position: relative;
max-height: 100%;
}
-
.imageBox-cont img {
object-fit: contain;
max-width: 100%;
height: 100%;
}
-
.videoBox-cont {
object-fit: contain;
width: auto;
@@ -191,20 +165,16 @@
align-items: center;
height: inherit;
}
-
.rt-resizer {
width: 8px;
right: -4px;
}
-
.rt-resizable-header {
padding: 0;
height: 30px;
}
-
.rt-resizable-header:last-child {
overflow: visible;
-
.rt-resizer {
width: 5px !important;
}
@@ -221,7 +191,6 @@
height: 100%;
}
-
.collectionSchema-header-menu {
height: auto;
z-index: 100;
@@ -231,7 +200,6 @@
position: fixed;
background: white;
border: black 1px solid;
-
.collectionSchema-header-toggler {
z-index: 100;
width: 100%;
@@ -239,7 +207,6 @@
padding: 4px;
letter-spacing: 2px;
text-transform: uppercase;
-
svg {
margin-right: 4px;
}
@@ -264,62 +231,51 @@ button.add-column {
color: black;
width: 180px;
text-align: left;
-
.collectionSchema-headerMenu-group {
padding: 7px 0;
border-bottom: 1px solid lightgray;
cursor: pointer;
-
&:first-child {
padding-top: 0;
}
-
&:last-child {
border: none;
text-align: center;
padding: 12px 0 0 0;
}
}
-
label {
color: $main-accent;
font-weight: normal;
letter-spacing: 2px;
text-transform: uppercase;
}
-
input {
color: black;
width: 100%;
}
-
.columnMenu-option {
cursor: pointer;
padding: 3px;
background-color: white;
transition: background-color 0.2s;
-
&:hover {
background-color: $light-color-secondary;
}
-
&.active {
font-weight: bold;
border: 2px solid $light-color-secondary;
}
-
svg {
color: gray;
margin-right: 5px;
width: 10px;
}
}
-
.keys-dropdown {
position: relative;
//width: 100%;
background-color: white;
-
input {
border: 2px solid $light-color-secondary;
padding: 3px;
@@ -327,12 +283,10 @@ button.add-column {
font-weight: bold;
letter-spacing: "2px";
text-transform: "uppercase";
-
&:focus {
font-weight: normal;
}
}
-
.keys-options-wrapper {
width: 100%;
max-height: 150px;
@@ -341,34 +295,28 @@ button.add-column {
top: 28px;
box-shadow: 0 10px 16px rgba(0, 0, 0, 0.1);
background-color: white;
-
.key-option {
background-color: white;
border: 1px solid lightgray;
padding: 2px 3px;
-
&:not(:first-child) {
border-top: 0;
}
-
&:hover {
background-color: $light-color-secondary;
}
}
}
}
-
.columnMenu-colors {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
-
.columnMenu-colorPicker {
cursor: pointer;
width: 20px;
height: 20px;
border-radius: 10px;
-
&.active {
border: 2px solid white;
box-shadow: 0 0 0 2px lightgray;
@@ -380,17 +328,14 @@ button.add-column {
.collectionSchema-row {
height: 100%;
background-color: white;
-
&.row-focused .rt-td {
background-color: #bfffc0; //$light-color-secondary;
}
-
&.row-wrapped {
.rt-td {
white-space: normal;
}
}
-
.row-dragger {
display: flex;
justify-content: space-around;
@@ -403,7 +348,6 @@ button.add-column {
color: lightgray;
background-color: white;
transition: color 0.1s ease;
-
.row-option {
// padding: 5px;
cursor: pointer;
@@ -413,27 +357,21 @@ button.add-column {
flex-direction: column;
justify-content: center;
z-index: 2;
-
&:hover {
color: gray;
}
}
}
-
.collectionSchema-row-wrapper {
-
&.row-above {
border-top: 1px solid red;
}
-
&.row-below {
border-bottom: 1px solid red;
}
-
&.row-inside {
border: 1px solid red;
}
-
.row-dragging {
background-color: blue;
}
@@ -450,16 +388,12 @@ button.add-column {
padding: 4px;
text-align: left;
padding-left: 19px;
-
position: relative;
-
&:focus {
outline: none;
}
-
&.editing {
padding: 0;
-
input {
outline: 0;
border: none;
@@ -470,50 +404,36 @@ button.add-column {
min-height: 26px;
}
}
-
&.focused {
-
&.inactive {
border: none;
}
}
-
p {
width: 100%;
height: 100%;
}
-
&:hover .collectionSchemaView-cellContents-docExpander {
display: block;
}
-
-
.collectionSchemaView-cellContents-document {
display: inline-block;
}
-
.collectionSchemaView-cellContents-docButton {
float: right;
width: "15px";
height: "15px";
}
-
.collectionSchemaView-dropdownWrapper {
-
border: grey;
border-style: solid;
border-width: 1px;
height: 30px;
-
.collectionSchemaView-dropdownButton {
-
//display: inline-block;
float: left;
height: 100%;
-
-
}
-
.collectionSchemaView-dropdownText {
display: inline-block;
//float: right;
@@ -523,14 +443,11 @@ button.add-column {
justify-content: "center";
align-items: "center";
}
-
}
-
.collectionSchemaView-dropdownContainer {
position: absolute;
border: 1px solid rgba(0, 0, 0, 0.04);
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14);
-
.collectionSchemaView-dropdownOption:hover {
background-color: rgba(0, 0, 0, 0.14);
cursor: pointer;
@@ -546,7 +463,6 @@ button.add-column {
top: 0;
right: 0;
background-color: lightgray;
-
}
.doc-drag-over {
@@ -563,7 +479,6 @@ button.add-column {
justify-content: flex-end;
padding: 0 10px;
border-bottom: 2px solid gray;
-
.collectionSchemaView-toolbar-item {
display: flex;
flex-direction: column;
@@ -586,27 +501,24 @@ button.add-column {
.rt-td.rt-expandable {
overflow: visible;
position: relative;
- height:100%;
+ height: 100%;
z-index: 1;
}
+
.reactTable-sub {
background-color: rgb(252, 252, 252);
width: 100%;
-
.rt-thead {
display: none;
}
-
.row-dragger {
background-color: rgb(252, 252, 252);
}
-
.rt-table {
background-color: rgb(252, 252, 252);
}
-
.collectionSchemaView-table {
- width: 100%;
+ width: 100%;
border: solid 1px;
overflow: visible;
padding: 0px;
@@ -621,7 +533,6 @@ button.add-column {
width: 20;
height: auto;
left: 55;
-
svg {
position: absolute;
top: 50%;
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/schemaView/CollectionSchemaView.tsx
index b33c437a9..b33c437a9 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/schemaView/CollectionSchemaView.tsx
diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/schemaView/SchemaTable.tsx
index 0c69ee030..c305f6806 100644
--- a/src/client/views/collections/SchemaTable.tsx
+++ b/src/client/views/collections/schemaView/SchemaTable.tsx
@@ -5,32 +5,32 @@ import { action, computed, observable } from "mobx";
import { observer } from "mobx-react";
import ReactTable, { CellInfo, Column, ComponentPropsGetterR, Resize, SortingRule } from "react-table";
import "react-table/react-table.css";
-import { DateField } from "../../../fields/DateField";
-import { AclPrivate, AclReadonly, DataSym, Doc, DocListCast, Field, Opt } from "../../../fields/Doc";
-import { Id } from "../../../fields/FieldSymbols";
-import { List } from "../../../fields/List";
-import { listSpec } from "../../../fields/Schema";
-import { SchemaHeaderField } from "../../../fields/SchemaHeaderField";
-import { ComputedField } from "../../../fields/ScriptField";
-import { Cast, FieldValue, NumCast, StrCast } from "../../../fields/Types";
-import { ImageField } from "../../../fields/URLField";
-import { GetEffectiveAcl } from "../../../fields/util";
-import { emptyFunction, emptyPath, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnTrue } from "../../../Utils";
-import { Docs, DocumentOptions, DocUtils } from "../../documents/Documents";
-import { DocumentType } from "../../documents/DocumentTypes";
-import { CompileScript, Transformer, ts } from "../../util/Scripting";
-import { Transform } from "../../util/Transform";
-import { undoBatch } from "../../util/UndoManager";
-import { COLLECTION_BORDER_WIDTH, SCHEMA_DIVIDER_WIDTH } from '../../views/globalCssVariables.scss';
-import { ContextMenu } from "../ContextMenu";
+import { DateField } from "../../../../fields/DateField";
+import { AclPrivate, AclReadonly, DataSym, Doc, DocListCast, Field, Opt } from "../../../../fields/Doc";
+import { Id } from "../../../../fields/FieldSymbols";
+import { List } from "../../../../fields/List";
+import { listSpec } from "../../../../fields/Schema";
+import { SchemaHeaderField } from "../../../../fields/SchemaHeaderField";
+import { ComputedField } from "../../../../fields/ScriptField";
+import { Cast, FieldValue, NumCast, StrCast } from "../../../../fields/Types";
+import { ImageField } from "../../../../fields/URLField";
+import { GetEffectiveAcl } from "../../../../fields/util";
+import { emptyFunction, emptyPath, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnTrue } from "../../../../Utils";
+import { Docs, DocumentOptions, DocUtils } from "../../../documents/Documents";
+import { DocumentType } from "../../../documents/DocumentTypes";
+import { CompileScript, Transformer, ts } from "../../../util/Scripting";
+import { Transform } from "../../../util/Transform";
+import { undoBatch } from "../../../util/UndoManager";
+import { COLLECTION_BORDER_WIDTH, SCHEMA_DIVIDER_WIDTH } from '../../globalCssVariables.scss';
+import { ContextMenu } from "../../ContextMenu";
import '../DocumentDecorations.scss';
-import { DocumentView } from "../nodes/DocumentView";
-import { DefaultStyleProvider } from "../StyleProvider";
+import { DocumentView } from "../../nodes/DocumentView";
+import { DefaultStyleProvider } from "../../StyleProvider";
import { CellProps, CollectionSchemaButtons, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDateCell, CollectionSchemaDocCell, CollectionSchemaImageCell, CollectionSchemaListCell, CollectionSchemaNumberCell, CollectionSchemaStringCell } from "./CollectionSchemaCells";
import { CollectionSchemaAddColumnHeader, KeysDropdown } from "./CollectionSchemaHeaders";
import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC";
import "./CollectionSchemaView.scss";
-import { CollectionView } from "./CollectionView";
+import { CollectionView } from "../CollectionView";
enum ColumnType {
diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx
index f0a54e4ac..ecf4c0901 100644
--- a/src/client/views/nodes/DocumentContentsView.tsx
+++ b/src/client/views/nodes/DocumentContentsView.tsx
@@ -8,7 +8,7 @@ import { emptyPath, OmitKeys, Without } from "../../../Utils";
import { DirectoryImportBox } from "../../util/Import & Export/DirectoryImportBox";
import { CollectionDockingView } from "../collections/CollectionDockingView";
import { CollectionFreeFormView } from "../collections/collectionFreeForm/CollectionFreeFormView";
-import { CollectionSchemaView } from "../collections/CollectionSchemaView";
+import { CollectionSchemaView } from "../collections/schemaView/CollectionSchemaView";
import { CollectionView } from "../collections/CollectionView";
import { InkingStroke } from "../InkingStroke";
import { PresElementBox } from "../presentationview/PresElementBox";