From d075dbb4b1d2289a47e929c1e7378f341c2a9c35 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 11 Jun 2020 15:12:24 -0500 Subject: initial commit --- src/client/documents/Documents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 8d867348f..37858bbd9 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -21,7 +21,7 @@ import { YoutubeBox } from "../apis/youtube/YoutubeBox"; import { CollectionDockingView } from "../views/collections/CollectionDockingView"; import { LinkManager } from "../util/LinkManager"; import { DocumentManager } from "../util/DocumentManager"; -import DirectoryImportBox from "../util/Import & Export/DirectoryImportBox"; +import { DirectoryImportBox } from "../util/Import & Export/DirectoryImportBox"; import { Scripting } from "../util/Scripting"; import { LabelBox } from "../views/nodes/LabelBox"; import { SliderBox } from "../views/nodes/SliderBox"; -- cgit v1.2.3-70-g09d2 From e21a97ff5b45a9dde6a42c16394475ad66937a87 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 14 Jun 2020 02:03:19 -0500 Subject: dropdown shows on first click --- src/client/views/collections/CollectionSchemaHeaders.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index dae0600b1..2ad8e5bfa 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -331,7 +331,9 @@ class KeysDropdown extends React.Component { renderOptions = (): JSX.Element[] | JSX.Element => { if (!this._isOpen) return <>; - const keyOptions = this._searchTerm === "" ? this.props.possibleKeys : this.props.possibleKeys.filter(key => key.toUpperCase().indexOf(this._searchTerm.toUpperCase()) > -1); + const searchTerm = this._searchTerm.trim() === "New field" ? "" : this._searchTerm; + + const keyOptions = searchTerm === "" ? this.props.possibleKeys : this.props.possibleKeys.filter(key => key.toUpperCase().indexOf(this._searchTerm.toUpperCase()) > -1); const exactFound = keyOptions.findIndex(key => key.toUpperCase() === this._searchTerm.toUpperCase()) > -1 || this.props.existingKeys.findIndex(key => key.toUpperCase() === this._searchTerm.toUpperCase()) > -1; -- cgit v1.2.3-70-g09d2 From c5c7fa9c0b17bbcee582d4fd788d378a2f7cd243 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 14 Jun 2020 12:54:38 -0500 Subject: adding list and image types --- .../views/collections/CollectionSchemaCells.tsx | 78 ++++++++++++++++++++++ .../views/collections/CollectionSchemaHeaders.tsx | 15 ++++- .../views/collections/CollectionSchemaView.tsx | 6 +- 3 files changed, 95 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index baf9d4156..4f2bfac08 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -24,6 +24,7 @@ import { SchemaHeaderField } from "../../../fields/SchemaHeaderField"; import { undoBatch } from "../../util/UndoManager"; import { SnappingManager } from "../../util/SnappingManager"; import { ComputedField } from "../../../fields/ScriptField"; +import { ImageField } from "../../../fields/URLField"; library.add(faExpand); @@ -205,6 +206,18 @@ export class CollectionSchemaCell extends React.Component { const doc = FieldValue(Cast(field, Doc)); contents = typeof field === "object" ? doc ? StrCast(doc.title) === "" ? "--" : StrCast(doc.title) : `--${typeof field}--` : `--${typeof field}--`; } + if (type === "image") { + // fix this + + const image = FieldValue(Cast(field, ImageField)); + const doc = FieldValue(Cast(field, Doc)); + contents = typeof field === "object" ? doc ? StrCast(doc.title) === "" ? "--" : StrCast(doc.title) : `--${typeof field}--` : `--${typeof field}--`; + } + if (type === "list") { + // fix this + contents = typeof field === "object" ? doc ? StrCast(field) === "" ? "--" : StrCast(field) : `--${typeof field}--` : `--${typeof field}--`; + } + let className = "collectionSchemaView-cellWrapper"; if (this._isEditing) className += " editing"; @@ -304,6 +317,71 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { } } +@observer +export class CollectionSchemaImageCell extends CollectionSchemaCell { + render() { + return this.renderCellWithType("image"); + } + // render() { + // const props: FieldViewProps = { + // Document: this.props.rowProps.original, + // DataDoc: this.props.rowProps.original, + // LibraryPath: [], + // dropAction: "alias", + // bringToFront: emptyFunction, + // rootSelected: returnFalse, + // fieldKey: this.props.rowProps.column.id as string, + // ContainingCollectionView: this.props.CollectionView, + // ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, + // isSelected: returnFalse, + // select: emptyFunction, + // renderDepth: this.props.renderDepth + 1, + // ScreenToLocalTransform: Transform.Identity, + // focus: emptyFunction, + // active: returnFalse, + // whenActiveChanged: emptyFunction, + // PanelHeight: returnZero, + // PanelWidth: returnZero, + // NativeHeight: returnZero, + // NativeWidth: returnZero, + // addDocTab: this.props.addDocTab, + // pinToPres: this.props.pinToPres, + // ContentScaling: returnOne + // }; + + // if (props.fieldKey === "data") { + // const reference = React.createRef(); + // return ( + //
+ //
+ // {props.DataDoc?.data} + //
+ //
+ // ); + // } else { + // return this.renderCellWithType("image"); + // } + // } +} + +@observer +export class CollectionSchemaListCell extends CollectionSchemaCell { + render() { + return this.renderCellWithType("list"); + } + + // render() { + // const reference = React.createRef(); + // return ( + //
+ //
+ // + //
+ //
+ // ); + // } +} + @observer export class CollectionSchemaCheckboxCell extends CollectionSchemaCell { @observable private _isChecked: boolean = typeof this.props.rowProps.original[this.props.rowProps.column.id as string] === "boolean" ? BoolCast(this.props.rowProps.original[this.props.rowProps.column.id as string]) : false; diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index 2ad8e5bfa..85908c0ca 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -2,7 +2,7 @@ import React = require("react"); import { action, observable } from "mobx"; import { observer } from "mobx-react"; import "./CollectionSchemaView.scss"; -import { faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faSortAmountDown, faSortAmountUp, faTimes } from '@fortawesome/free-solid-svg-icons'; +import { faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faSortAmountDown, faSortAmountUp, faTimes, faImage, faListUl } from '@fortawesome/free-solid-svg-icons'; import { library, IconProp } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ColumnType } from "./CollectionSchemaView"; @@ -13,7 +13,7 @@ const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; -library.add(faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faFile as any, faSortAmountDown, faSortAmountUp, faTimes); +library.add(faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faFile as any, faSortAmountDown, faSortAmountUp, faTimes, faImage, faListUl); export interface HeaderProps { keyValue: SchemaHeaderField; @@ -33,7 +33,8 @@ export interface HeaderProps { export class CollectionSchemaHeader extends React.Component { render() { const icon: IconProp = this.props.keyType === ColumnType.Number ? "hashtag" : this.props.keyType === ColumnType.String ? "font" : - this.props.keyType === ColumnType.Boolean ? "check-square" : this.props.keyType === ColumnType.Doc ? "file" : "align-justify"; + this.props.keyType === ColumnType.Boolean ? "check-square" : this.props.keyType === ColumnType.Doc ? "file" : + this.props.keyType === ColumnType.Image ? "image" : this.props.keyType === ColumnType.List ? "list-ul" : "align-justify"; return (
Checkbox
+
this.changeColumnType(ColumnType.List)}> + + List +
this.changeColumnType(ColumnType.Doc)}> Document
+
this.changeColumnType(ColumnType.Image)}> + + Image +
); diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 35f892d65..74f31b428 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -20,7 +20,7 @@ import { undoBatch } from "../../util/UndoManager"; import { COLLECTION_BORDER_WIDTH } from '../../views/globalCssVariables.scss'; import { ContextMenu } from "../ContextMenu"; import '../DocumentDecorations.scss'; -import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell } from "./CollectionSchemaCells"; +import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell, CollectionSchemaImageCell, CollectionSchemaListCell } from "./CollectionSchemaCells"; import { CollectionSchemaAddColumnHeader, CollectionSchemaHeader } from "./CollectionSchemaHeaders"; import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC"; import "./CollectionSchemaView.scss"; @@ -40,6 +40,8 @@ export enum ColumnType { String, Boolean, Doc, + Image, + List } // this map should be used for keys that should have a const type of value const columnTypes: Map = new Map([ @@ -349,6 +351,8 @@ export class SchemaTable extends React.Component { if (colType === ColumnType.String) return ; if (colType === ColumnType.Boolean) return ; if (colType === ColumnType.Doc) return ; + if (colType === ColumnType.Image) return ; + if (colType === ColumnType.List) return ; return ; }, minWidth: 200, -- cgit v1.2.3-70-g09d2 From 51a09fd7abdc44902587b2b610bf728908e288e7 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 14 Jun 2020 16:41:31 -0500 Subject: inline images (need resizing) --- src/client/documents/Documents.ts | 2 +- .../views/collections/CollectionSchemaCells.tsx | 91 ++++++++++++---------- 2 files changed, 51 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 37858bbd9..865fc296b 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -385,7 +385,7 @@ export namespace Docs { // synthesize the default options, the type and title from computed values and // whatever options pertain to this specific prototype const options = { title, type, baseProto: true, ...defaultOptions, ...(template.options || {}) }; - options.layout = layout.view.LayoutString(layout.dataField); + options.layout = layout.view?.LayoutString(layout.dataField); const doc = Doc.assign(new Doc(prototypeId, true), { layoutKey: "layout", ...options }); doc.layout_keyValue = KeyValueBox.LayoutString(""); return doc; diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 4f2bfac08..8164e37e3 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -319,49 +319,58 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { @observer export class CollectionSchemaImageCell extends CollectionSchemaCell { - render() { - return this.renderCellWithType("image"); - } // render() { - // const props: FieldViewProps = { - // Document: this.props.rowProps.original, - // DataDoc: this.props.rowProps.original, - // LibraryPath: [], - // dropAction: "alias", - // bringToFront: emptyFunction, - // rootSelected: returnFalse, - // fieldKey: this.props.rowProps.column.id as string, - // ContainingCollectionView: this.props.CollectionView, - // ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, - // isSelected: returnFalse, - // select: emptyFunction, - // renderDepth: this.props.renderDepth + 1, - // ScreenToLocalTransform: Transform.Identity, - // focus: emptyFunction, - // active: returnFalse, - // whenActiveChanged: emptyFunction, - // PanelHeight: returnZero, - // PanelWidth: returnZero, - // NativeHeight: returnZero, - // NativeWidth: returnZero, - // addDocTab: this.props.addDocTab, - // pinToPres: this.props.pinToPres, - // ContentScaling: returnOne - // }; - - // if (props.fieldKey === "data") { - // const reference = React.createRef(); - // return ( - //
- //
- // {props.DataDoc?.data} - //
- //
- // ); - // } else { - // return this.renderCellWithType("image"); - // } + // return this.renderCellWithType("image"); // } + render() { + const props: FieldViewProps = { + Document: this.props.rowProps.original, + DataDoc: this.props.rowProps.original, + LibraryPath: [], + dropAction: "alias", + bringToFront: emptyFunction, + rootSelected: returnFalse, + fieldKey: this.props.rowProps.column.id as string, + ContainingCollectionView: this.props.CollectionView, + ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, + isSelected: returnFalse, + select: emptyFunction, + renderDepth: this.props.renderDepth + 1, + ScreenToLocalTransform: Transform.Identity, + focus: emptyFunction, + active: returnFalse, + whenActiveChanged: emptyFunction, + PanelHeight: returnZero, + PanelWidth: returnZero, + NativeHeight: returnZero, + NativeWidth: returnZero, + addDocTab: this.props.addDocTab, + pinToPres: this.props.pinToPres, + ContentScaling: returnOne + }; + + const data = Cast(props.DataDoc?.data, ImageField); + const url = data ? data.url.href : undefined; + console.log(url); + + + if (props.fieldKey === "data") { + if (url) { + const reference = React.createRef(); + return ( +
+
+ +
+
+ ); + } else { + return this.renderCellWithType("image"); + } + } else { + return this.renderCellWithType("image"); + } + } } @observer -- cgit v1.2.3-70-g09d2 From 7132c4c8335fa3c7c5a5fa2386b710321a0c883d Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Mon, 15 Jun 2020 15:53:09 -0500 Subject: resizing images based on column width --- .../views/collections/CollectionSchemaCells.tsx | 118 ++++++++++++++++++--- .../views/collections/CollectionSchemaHeaders.tsx | 4 +- 2 files changed, 103 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 8164e37e3..e34a9e450 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -3,7 +3,7 @@ import { action, observable, trace } from "mobx"; import { observer } from "mobx-react"; import { CellInfo } from "react-table"; import "react-table/react-table.css"; -import { emptyFunction, returnFalse, returnZero, returnOne } from "../../../Utils"; +import { emptyFunction, returnFalse, returnZero, returnOne, Utils } from "../../../Utils"; import { Doc, DocListCast, Field, Opt } from "../../../fields/Doc"; import { Id } from "../../../fields/FieldSymbols"; import { KeyCodes } from "../../util/KeyCodes"; @@ -25,6 +25,8 @@ import { undoBatch } from "../../util/UndoManager"; import { SnappingManager } from "../../util/SnappingManager"; import { ComputedField } from "../../../fields/ScriptField"; import { ImageField } from "../../../fields/URLField"; +import { KeysDropdown } from "./CollectionSchemaHeaders"; +const path = require('path'); library.add(faExpand); @@ -322,6 +324,21 @@ export class CollectionSchemaImageCell extends CollectionSchemaCell { // render() { // return this.renderCellWithType("image"); // } + + choosePath(url: URL, dataDoc: any) { + const lower = url.href.toLowerCase(); + if (url.protocol === "data") { + return url.href; + } else if (url.href.indexOf(window.location.origin) === -1) { + return Utils.CorsProxy(url.href); + } else if (!/\.(png|jpg|jpeg|gif|webp)$/.test(lower)) { + return url.href;//Why is this here + } + const ext = path.extname(url.href); + const _curSuffix = "_o"; + return url.href.replace(ext, _curSuffix + ext); + } + render() { const props: FieldViewProps = { Document: this.props.rowProps.original, @@ -349,21 +366,40 @@ export class CollectionSchemaImageCell extends CollectionSchemaCell { ContentScaling: returnOne }; - const data = Cast(props.DataDoc?.data, ImageField); - const url = data ? data.url.href : undefined; - console.log(url); + let image = true; + let url = []; + if (props.DataDoc) { + const field = Cast(props.DataDoc[props.fieldKey], ImageField, null); // retrieve the primary image URL that is being rendered from the data doc + const alts = DocListCast(props.DataDoc[props.fieldKey + "-alternates"]); // retrieve alternate documents that may be rendered as alternate images + const altpaths = alts.map(doc => Cast(doc[Doc.LayoutFieldKey(doc)], ImageField, null)?.url).filter(url => url).map(url => this.choosePath(url, props.DataDoc)); // access the primary layout data of the alternate documents + const paths = field ? [this.choosePath(field.url, props.DataDoc), ...altpaths] : altpaths; + if (paths.length) { + url = paths; + } else { + url = [Utils.CorsProxy("http://www.cs.brown.edu/~bcz/noImage.png")]; + image = false; + } + //url = paths.length ? paths : [Utils.CorsProxy("http://www.cs.brown.edu/~bcz/noImage.png")]; + } else { + url = [Utils.CorsProxy("http://www.cs.brown.edu/~bcz/noImage.png")]; + image = false; + } + const heightToWidth = NumCast(props.DataDoc?._nativeHeight) / NumCast(props.DataDoc?._nativeWidth); + const height = this.props.rowProps.width * heightToWidth; if (props.fieldKey === "data") { - if (url) { + if (url !== []) { const reference = React.createRef(); return (
- +
); + } else { return this.renderCellWithType("image"); } @@ -375,20 +411,68 @@ export class CollectionSchemaImageCell extends CollectionSchemaCell { @observer export class CollectionSchemaListCell extends CollectionSchemaCell { - render() { - return this.renderCellWithType("list"); - } // render() { - // const reference = React.createRef(); - // return ( - //
- //
- // - //
- //
- // ); + // return this.renderCellWithType("list"); // } + + emptyFunc() { + + } + render() { + const props: FieldViewProps = { + Document: this.props.rowProps.original, + DataDoc: this.props.rowProps.original, + LibraryPath: [], + dropAction: "alias", + bringToFront: emptyFunction, + rootSelected: returnFalse, + fieldKey: this.props.rowProps.column.id as string, + ContainingCollectionView: this.props.CollectionView, + ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, + isSelected: returnFalse, + select: emptyFunction, + renderDepth: this.props.renderDepth + 1, + ScreenToLocalTransform: Transform.Identity, + focus: emptyFunction, + active: returnFalse, + whenActiveChanged: emptyFunction, + PanelHeight: returnZero, + PanelWidth: returnZero, + NativeHeight: returnZero, + NativeWidth: returnZero, + addDocTab: this.props.addDocTab, + pinToPres: this.props.pinToPres, + ContentScaling: returnOne + }; + + let value = ""; + const reference = React.createRef(); + const data = props.DataDoc?.fieldKey; + + if (Array.isArray(data)) { + + + + return ( +
+
+ +
+
+ ); + } else { + return this.renderCellWithType("list"); + } + } } @observer diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index 85908c0ca..0d6cf4474 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -267,7 +267,7 @@ export class CollectionSchemaColumnMenu extends React.Component } -interface KeysDropdownProps { +export interface KeysDropdownProps { keyValue: string; possibleKeys: string[]; existingKeys: string[]; @@ -277,7 +277,7 @@ interface KeysDropdownProps { setIsEditing: (isEditing: boolean) => void; } @observer -class KeysDropdown extends React.Component { +export class KeysDropdown extends React.Component { @observable private _key: string = this.props.keyValue; @observable private _searchTerm: string = this.props.keyValue; @observable private _isOpen: boolean = false; -- cgit v1.2.3-70-g09d2 From 3b4585dda8e8018ebec94c9065ca4c37b2c98599 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Mon, 15 Jun 2020 17:43:58 -0500 Subject: added parts of drop down --- .../views/collections/CollectionSchemaCells.tsx | 63 +++++++++++++++++----- .../views/collections/CollectionSchemaView.scss | 25 +++++++++ 2 files changed, 75 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index e34a9e450..92f6d1a02 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -15,7 +15,7 @@ import '../DocumentDecorations.scss'; import { EditableView } from "../EditableView"; import { FieldView, FieldViewProps } from "../nodes/FieldView"; import "./CollectionSchemaView.scss"; -import { CollectionView } from "./CollectionView"; +import { CollectionView, Flyout } from "./CollectionView"; import { NumCast, StrCast, BoolCast, FieldValue, Cast } from "../../../fields/Types"; import { Docs } from "../../documents/Documents"; import { library } from '@fortawesome/fontawesome-svg-core'; @@ -26,6 +26,9 @@ import { SnappingManager } from "../../util/SnappingManager"; import { ComputedField } from "../../../fields/ScriptField"; import { ImageField } from "../../../fields/URLField"; import { KeysDropdown } from "./CollectionSchemaHeaders"; +import { listSpec } from "../../../fields/Schema"; +import { ObjectField } from "../../../fields/ObjectField"; +import { List } from "../../../fields/List"; const path = require('path'); library.add(faExpand); @@ -416,9 +419,19 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { // return this.renderCellWithType("list"); // } - emptyFunc() { + @observable private _opened = false; + @observable private _text = ""; + @action + toggleOpened(open: boolean) { + this._opened = open; + } + + @action + onChange = (e: React.ChangeEvent) => { + this._text = e.target.value; } + render() { const props: FieldViewProps = { Document: this.props.rowProps.original, @@ -448,28 +461,52 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { let value = ""; const reference = React.createRef(); - const data = props.DataDoc?.fieldKey; - if (Array.isArray(data)) { + const field = props.Document[props.fieldKey]; + + if (typeof field === "object") { + + const optionsList = Cast(field, List); + + + + + // if (optionsList){ + // const options = optionsList.map(() =>{ + + // }) + // } return (
- + + {/* +
this.toggleOpened(!this._opened)}>☰
+ */} + + + + + {this._opened ?
+
+
Option 1
+
Option 2
+
Option 3
+
Option 4
+
+
: null}
); } else { + console.log("not an array!"); + return this.renderCellWithType("list"); } } diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index a24140b48..96e9aec5a 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -422,6 +422,31 @@ button.add-column { top: 0; right: 0; background-color: lightgray; + + .dropdown { + position: absolute; + top: 100%; + left: 0; + width: 300px; + z-index: 2; + border: 1px solid rgba(0, 0, 0, 0.04); + box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14); + } + + ul { + list-style: none; + padding: 0; + margin: 0; + } + + li { + padding: 8px 12px; + } + + li:hover { + background-color: rgba(0, 0, 0, 0.14); + cursor: pointer; + } } .doc-drag-over { -- cgit v1.2.3-70-g09d2 From e2c60eaad49da3d0485b6f5f236fb0aabb84bef0 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Tue, 16 Jun 2020 00:23:29 -0500 Subject: fixing parts of dropdown --- .../views/collections/CollectionSchemaCells.tsx | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 92f6d1a02..e27de4c96 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -29,6 +29,7 @@ import { KeysDropdown } from "./CollectionSchemaHeaders"; import { listSpec } from "../../../fields/Schema"; import { ObjectField } from "../../../fields/ObjectField"; import { List } from "../../../fields/List"; +import { Link } from "@react-pdf/renderer"; const path = require('path'); library.add(faExpand); @@ -466,16 +467,21 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { if (typeof field === "object") { - const optionsList = Cast(field, List); + const optionsList = field as List; - // if (optionsList){ - // const options = optionsList.map(() =>{ - - // }) - // } + const options = optionsList.map((element, index) => { + if (element instanceof Doc) { + const title = element.title; + return
{title}
; + } else if (element instanceof Link) { + return
link
; + } else { + return
{element}
; + } + }); @@ -495,10 +501,7 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { {this._opened ?
-
Option 1
-
Option 2
-
Option 3
-
Option 4
+ {options}
: null} -- cgit v1.2.3-70-g09d2 From 1e67383b930a5a7b5cb75caf95dd31fbde0ef160 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Tue, 16 Jun 2020 17:29:27 -0500 Subject: fix drop down UI --- .../views/collections/CollectionSchemaCells.tsx | 54 +++++++++++-------- .../views/collections/CollectionSchemaView.scss | 63 +++++++++++++--------- 2 files changed, 70 insertions(+), 47 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index e27de4c96..adce4dcef 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -29,7 +29,7 @@ import { KeysDropdown } from "./CollectionSchemaHeaders"; import { listSpec } from "../../../fields/Schema"; import { ObjectField } from "../../../fields/ObjectField"; import { List } from "../../../fields/List"; -import { Link } from "@react-pdf/renderer"; +import { LinkBox } from "../nodes/LinkBox"; const path = require('path'); library.add(faExpand); @@ -421,10 +421,11 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { // } @observable private _opened = false; - @observable private _text = ""; + @observable private _text = "select an item"; @action toggleOpened(open: boolean) { + console.log("open: " + open); this._opened = open; } @@ -433,6 +434,11 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { this._text = e.target.value; } + @action + onSelected = (element: string) => { + this._text = element; + } + render() { const props: FieldViewProps = { Document: this.props.rowProps.original, @@ -461,6 +467,7 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { }; let value = ""; + let link = false; const reference = React.createRef(); const field = props.Document[props.fieldKey]; @@ -469,41 +476,42 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { const optionsList = field as List; - - - - const options = optionsList.map((element, index) => { + const options = optionsList.map((element) => { if (element instanceof Doc) { + if (props.fieldKey.toLowerCase() === "links") { + link = true; + } const title = element.title; - return
{title}
; - } else if (element instanceof Link) { - return
link
; + return
{ this.onSelected(StrCast(element.title)); }} + style={{ padding: "6px" }}> + {title} +
; } else { return
{element}
; } }); + const plainText =
{this._text}
; + const textarea = ; + const dropdown =
+ {options} +
; return (
- - {/* -
this.toggleOpened(!this._opened)}>☰
- */} - - - +
{link ? plainText : textarea}
+
- {this._opened ?
-
- {options} -
-
: null} + {this._opened ? dropdown : null}
); diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index 96e9aec5a..5a4e1aa58 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -412,6 +412,45 @@ button.add-column { &:hover .collectionSchemaView-cellContents-docExpander { display: block; } + + .collectionSchemaView-dropdownWrapper { + + border: grey; + border-style: solid; + border-width: 1px; + height: 100%; + + .collectionSchemaView-dropdownButton { + + //display: inline-block; + float: left; + height: 100%; + + + } + + .collectionSchemaView-dropdownText { + display: inline-block; + //float: right; + height: 100%; + display: "flex"; + font-size: 13; + 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; + } + } } .collectionSchemaView-cellContents-docExpander { @@ -423,30 +462,6 @@ button.add-column { right: 0; background-color: lightgray; - .dropdown { - position: absolute; - top: 100%; - left: 0; - width: 300px; - z-index: 2; - border: 1px solid rgba(0, 0, 0, 0.04); - box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14); - } - - ul { - list-style: none; - padding: 0; - margin: 0; - } - - li { - padding: 8px 12px; - } - - li:hover { - background-color: rgba(0, 0, 0, 0.14); - cursor: pointer; - } } .doc-drag-over { -- cgit v1.2.3-70-g09d2 From 6345949e461dd0ef1a284527846462db7c7fb281 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Tue, 16 Jun 2020 17:51:49 -0500 Subject: bug fixes and doc overlays --- .../views/collections/CollectionSchemaCells.tsx | 93 ++++++++++++---------- 1 file changed, 53 insertions(+), 40 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index adce4dcef..b44c830e6 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -30,6 +30,8 @@ import { listSpec } from "../../../fields/Schema"; import { ObjectField } from "../../../fields/ObjectField"; import { List } from "../../../fields/List"; import { LinkBox } from "../nodes/LinkBox"; +import { OverlayView } from "../OverlayView"; +import { DocumentIconContainer } from "../nodes/DocumentIcon"; const path = require('path'); library.add(faExpand); @@ -416,12 +418,38 @@ export class CollectionSchemaImageCell extends CollectionSchemaCell { @observer export class CollectionSchemaListCell extends CollectionSchemaCell { - // render() { - // return this.renderCellWithType("list"); - // } - + _overlayDisposer?: () => void; + + private prop: FieldViewProps = { + Document: this.props.rowProps.original, + DataDoc: this.props.rowProps.original, + LibraryPath: [], + dropAction: "alias", + bringToFront: emptyFunction, + rootSelected: returnFalse, + fieldKey: this.props.rowProps.column.id as string, + ContainingCollectionView: this.props.CollectionView, + ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, + isSelected: returnFalse, + select: emptyFunction, + renderDepth: this.props.renderDepth + 1, + ScreenToLocalTransform: Transform.Identity, + focus: emptyFunction, + active: returnFalse, + whenActiveChanged: emptyFunction, + PanelHeight: returnZero, + PanelWidth: returnZero, + NativeHeight: returnZero, + NativeWidth: returnZero, + addDocTab: this.props.addDocTab, + pinToPres: this.props.pinToPres, + ContentScaling: returnOne + }; + @observable private _field = this.prop.Document[this.prop.fieldKey]; + @observable private _optionsList = this._field as List; @observable private _opened = false; @observable private _text = "select an item"; + @observable private _selectedNum = 0; @action toggleOpened(open: boolean) { @@ -432,59 +460,40 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { @action onChange = (e: React.ChangeEvent) => { this._text = e.target.value; + + // change if its a document + this._optionsList[this._selectedNum] = this._text; } @action - onSelected = (element: string) => { + onSelected = (element: string, index: number) => { this._text = element; + this._selectedNum = index; + } + + onFocus = () => { + this._overlayDisposer?.(); + this._overlayDisposer = OverlayView.Instance.addElement(, { x: 0, y: 0 }); } render() { - const props: FieldViewProps = { - Document: this.props.rowProps.original, - DataDoc: this.props.rowProps.original, - LibraryPath: [], - dropAction: "alias", - bringToFront: emptyFunction, - rootSelected: returnFalse, - fieldKey: this.props.rowProps.column.id as string, - ContainingCollectionView: this.props.CollectionView, - ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, - isSelected: returnFalse, - select: emptyFunction, - renderDepth: this.props.renderDepth + 1, - ScreenToLocalTransform: Transform.Identity, - focus: emptyFunction, - active: returnFalse, - whenActiveChanged: emptyFunction, - PanelHeight: returnZero, - PanelWidth: returnZero, - NativeHeight: returnZero, - NativeWidth: returnZero, - addDocTab: this.props.addDocTab, - pinToPres: this.props.pinToPres, - ContentScaling: returnOne - }; - let value = ""; let link = false; + let doc = false; const reference = React.createRef(); - const field = props.Document[props.fieldKey]; - - if (typeof field === "object") { - - const optionsList = field as List; + if (typeof this._field === "object" && this._optionsList[1]) { - const options = optionsList.map((element) => { + const options = this._optionsList.map((element, index) => { if (element instanceof Doc) { - if (props.fieldKey.toLowerCase() === "links") { + doc = true; + if (this.prop.fieldKey.toLowerCase() === "links") { link = true; } const title = element.title; return
{ this.onSelected(StrCast(element.title)); }} + onPointerDown={(e) => { this.onSelected(StrCast(element.title), index); }} style={{ padding: "6px" }}> {title}
; @@ -495,7 +504,11 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { const plainText =
{this._text}
; - const textarea = ; + const textarea = ; const dropdown =
{options}
; -- cgit v1.2.3-70-g09d2 From 580cddb57724014bba04f81b3bd184e045591bfb Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Wed, 17 Jun 2020 14:44:57 -0500 Subject: improving lists layout --- .../views/collections/CollectionSchemaCells.tsx | 99 +++++++++++++++++----- 1 file changed, 80 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index b44c830e6..33b6e7bec 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -25,9 +25,6 @@ import { undoBatch } from "../../util/UndoManager"; import { SnappingManager } from "../../util/SnappingManager"; import { ComputedField } from "../../../fields/ScriptField"; import { ImageField } from "../../../fields/URLField"; -import { KeysDropdown } from "./CollectionSchemaHeaders"; -import { listSpec } from "../../../fields/Schema"; -import { ObjectField } from "../../../fields/ObjectField"; import { List } from "../../../fields/List"; import { LinkBox } from "../nodes/LinkBox"; import { OverlayView } from "../OverlayView"; @@ -63,7 +60,7 @@ export class CollectionSchemaCell extends React.Component { @observable protected _isEditing: boolean = false; protected _focusRef = React.createRef(); protected _document = this.props.rowProps.original; - private _dropDisposer?: DragManager.DragDropDisposer; + protected _dropDisposer?: DragManager.DragDropDisposer; componentDidMount() { document.addEventListener("keydown", this.onKeyDown); @@ -138,7 +135,7 @@ export class CollectionSchemaCell extends React.Component { } } - private dropRef = (ele: HTMLElement | null) => { + protected dropRef = (ele: HTMLElement | null) => { this._dropDisposer && this._dropDisposer(); if (ele) { this._dropDisposer = DragManager.MakeDropTarget(ele, this.drop.bind(this)); @@ -215,14 +212,11 @@ export class CollectionSchemaCell extends React.Component { contents = typeof field === "object" ? doc ? StrCast(doc.title) === "" ? "--" : StrCast(doc.title) : `--${typeof field}--` : `--${typeof field}--`; } if (type === "image") { - // fix this - const image = FieldValue(Cast(field, ImageField)); const doc = FieldValue(Cast(field, Doc)); contents = typeof field === "object" ? doc ? StrCast(doc.title) === "" ? "--" : StrCast(doc.title) : `--${typeof field}--` : `--${typeof field}--`; } if (type === "list") { - // fix this contents = typeof field === "object" ? doc ? StrCast(field) === "" ? "--" : StrCast(field) : `--${typeof field}--` : `--${typeof field}--`; } @@ -415,6 +409,10 @@ export class CollectionSchemaImageCell extends CollectionSchemaCell { } } + + + + @observer export class CollectionSchemaListCell extends CollectionSchemaCell { @@ -457,9 +455,17 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { this._opened = open; } + // @action + // onChange = (e: React.ChangeEvent) => { + // this._text = e.target.value; + + // // change if its a document + // this._optionsList[this._selectedNum] = this._text; + // } + @action - onChange = (e: React.ChangeEvent) => { - this._text = e.target.value; + onSetValue = (value: string) => { + this._text = value; // change if its a document this._optionsList[this._selectedNum] = this._text; @@ -476,8 +482,30 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { this._overlayDisposer = OverlayView.Instance.addElement(, { x: 0, y: 0 }); } + render() { + const dragRef: React.RefObject = React.createRef(); + + let type = "list"; + + // const fieldIsDoc = (type === "document" && typeof this._field === "object") || (typeof this._field === "object" && document); + + // const onItemDown = (e: React.PointerEvent) => { + // fieldIsDoc && SetupDrag(this._focusRef, + // () => this._document[this.prop.fieldKey] instanceof Doc ? this._document[this.prop.fieldKey] : this._document, + // this._document[this.prop.fieldKey] instanceof Doc ? (doc: Doc | Doc[], target: Doc | undefined, addDoc: (newDoc: Doc | Doc[]) => any) => addDoc(doc) : this.props.moveDocument, + // this._document[this.prop.fieldKey] instanceof Doc ? "alias" : this.props.Document.schemaDoc ? "copy" : undefined)(e); + // }; + // const onPointerEnter = (e: React.PointerEvent): void => { + // if (e.buttons === 1 && SnappingManager.GetIsDragging() && (type === "document" || type === undefined)) { + // dragRef.current!.className = "collectionSchemaView-cellContainer doc-drag-over"; + // } + // }; + // const onPointerLeave = (e: React.PointerEvent): void => { + // dragRef.current!.className = "collectionSchemaView-cellContainer"; + // }; + let link = false; let doc = false; const reference = React.createRef(); @@ -485,11 +513,15 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { if (typeof this._field === "object" && this._optionsList[1]) { const options = this._optionsList.map((element, index) => { + if (element instanceof Doc) { doc = true; + type = "document"; if (this.prop.fieldKey.toLowerCase() === "links") { link = true; + type = "link"; } + const document = FieldValue(Cast(element, Doc)); const title = element.title; return
{title}
; + } else { - return
{element}
; + return
{ this.onSelected(StrCast(element), index); }} + style={{ padding: "6px" }}>{element}
; } }); - const plainText =
{this._text}
; - const textarea = ; + // const textarea = ; + + const textarea =
+ { + return this._text; + }} + SetValue={action((value: string) => { + + // add special for params + this.onSetValue(value); + return true; + })} + /> +
; + + const dropdown =
{options}
; @@ -529,13 +588,15 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { ); } else { - console.log("not an array!"); - return this.renderCellWithType("list"); } } } + + + + @observer export class CollectionSchemaCheckboxCell extends CollectionSchemaCell { @observable private _isChecked: boolean = typeof this.props.rowProps.original[this.props.rowProps.column.id as string] === "boolean" ? BoolCast(this.props.rowProps.original[this.props.rowProps.column.id as string]) : false; -- cgit v1.2.3-70-g09d2 From 3b8e60f743ccf4a8f2e2a68462a852664e922a1e Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 18 Jun 2020 00:09:27 -0500 Subject: slight restructure of doc type --- .../views/collections/CollectionSchemaCells.tsx | 124 +++++++++++++++++---- 1 file changed, 102 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 33b6e7bec..2d29f978c 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -29,6 +29,7 @@ import { List } from "../../../fields/List"; import { LinkBox } from "../nodes/LinkBox"; import { OverlayView } from "../OverlayView"; import { DocumentIconContainer } from "../nodes/DocumentIcon"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; const path = require('path'); library.add(faExpand); @@ -314,8 +315,102 @@ export class CollectionSchemaStringCell extends CollectionSchemaCell { @observer export class CollectionSchemaDocCell extends CollectionSchemaCell { + + _overlayDisposer?: () => void; + + private prop: FieldViewProps = { + Document: this.props.rowProps.original, + DataDoc: this.props.rowProps.original, + LibraryPath: [], + dropAction: "alias", + bringToFront: emptyFunction, + rootSelected: returnFalse, + fieldKey: this.props.rowProps.column.id as string, + ContainingCollectionView: this.props.CollectionView, + ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, + isSelected: returnFalse, + select: emptyFunction, + renderDepth: this.props.renderDepth + 1, + ScreenToLocalTransform: Transform.Identity, + focus: emptyFunction, + active: returnFalse, + whenActiveChanged: emptyFunction, + PanelHeight: returnZero, + PanelWidth: returnZero, + NativeHeight: returnZero, + NativeWidth: returnZero, + addDocTab: this.props.addDocTab, + pinToPres: this.props.pinToPres, + ContentScaling: returnOne + }; + @observable private _field = this.prop.Document[this.prop.fieldKey]; + @observable private _text = "this._field"; + + + @action + onSetValue = (value: string) => { + this._text = value; + //this.prop.Document[this.prop.fieldKey] = this._text; + + const script = CompileScript(value, { + addReturn: true, + typecheck: false, + transformer: DocumentIconContainer.getTransformer() + }); + const results = script.compiled && script.run(); + if (results && results.success) { + + this._text = results.result; + + return true; + } + return false; + } + + onFocus = () => { + + console.log(this._field); + this._overlayDisposer?.(); + this._overlayDisposer = OverlayView.Instance.addElement(, { x: 0, y: 0 }); + } + + render() { - return this.renderCellWithType("document"); + + const dragRef: React.RefObject = React.createRef(); + const reference = React.createRef(); + + if (typeof this._field === "object" && this._text) { + + + return ( +
+
this._overlayDisposer?.()} + ref={this.dropRef}> + { + const val = this._text ? this._text : ""; + return StrCast(val); + }} + SetValue={action((value: string) => { + this.onSetValue(value); + return true; + })} + /> +
+
+ ); + } else { + return this.renderCellWithType("document"); + } } } @@ -489,28 +584,11 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { let type = "list"; - // const fieldIsDoc = (type === "document" && typeof this._field === "object") || (typeof this._field === "object" && document); - - // const onItemDown = (e: React.PointerEvent) => { - // fieldIsDoc && SetupDrag(this._focusRef, - // () => this._document[this.prop.fieldKey] instanceof Doc ? this._document[this.prop.fieldKey] : this._document, - // this._document[this.prop.fieldKey] instanceof Doc ? (doc: Doc | Doc[], target: Doc | undefined, addDoc: (newDoc: Doc | Doc[]) => any) => addDoc(doc) : this.props.moveDocument, - // this._document[this.prop.fieldKey] instanceof Doc ? "alias" : this.props.Document.schemaDoc ? "copy" : undefined)(e); - // }; - // const onPointerEnter = (e: React.PointerEvent): void => { - // if (e.buttons === 1 && SnappingManager.GetIsDragging() && (type === "document" || type === undefined)) { - // dragRef.current!.className = "collectionSchemaView-cellContainer doc-drag-over"; - // } - // }; - // const onPointerLeave = (e: React.PointerEvent): void => { - // dragRef.current!.className = "collectionSchemaView-cellContainer"; - // }; - let link = false; let doc = false; const reference = React.createRef(); - if (typeof this._field === "object" && this._optionsList[1]) { + if (typeof this._field === "object" && this._optionsList[0]) { const options = this._optionsList.map((element, index) => { @@ -538,7 +616,7 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { } }); - const plainText =
{this._text}
; + const plainText =
{this._text}
; // const textarea = ; const textarea =
; + //☰ const dropdown =
{options} @@ -578,7 +657,8 @@ export class CollectionSchemaListCell extends CollectionSchemaCell {
{link ? plainText : textarea}
-- cgit v1.2.3-70-g09d2 From ff53019e6a801954b3798c09f01e893a1528c82f Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 18 Jun 2020 00:32:28 -0500 Subject: merge fixes and better doc type --- src/client/views/collections/CollectionSchemaCells.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 4b55cd2ed..df2a90366 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -3,7 +3,7 @@ import { action, observable, trace } from "mobx"; import { observer } from "mobx-react"; import { CellInfo } from "react-table"; import "react-table/react-table.css"; -import { emptyFunction, returnFalse, returnZero, returnOne, returnEmptyFilter } from "../../../Utils"; +import { emptyFunction, returnFalse, returnZero, returnOne, returnEmptyFilter, Utils } from "../../../Utils"; import { Doc, DocListCast, Field, Opt } from "../../../fields/Doc"; import { Id } from "../../../fields/FieldSymbols"; import { KeyCodes } from "../../util/KeyCodes"; @@ -345,12 +345,13 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { ContentScaling: returnOne }; @observable private _field = this.prop.Document[this.prop.fieldKey]; - @observable private _text = "this._field"; + @observable private _doc = FieldValue(Cast(this._field, Doc)); + @observable private _docTitle = this._doc?.title; @action onSetValue = (value: string) => { - this._text = value; + this._docTitle = value; //this.prop.Document[this.prop.fieldKey] = this._text; const script = CompileScript(value, { @@ -358,10 +359,12 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { typecheck: false, transformer: DocumentIconContainer.getTransformer() }); + const results = script.compiled && script.run(); if (results && results.success) { - this._text = results.result; + console.log(results.result); + // this._docTitle = results.result; return true; } @@ -381,7 +384,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { const dragRef: React.RefObject = React.createRef(); const reference = React.createRef(); - if (typeof this._field === "object" && this._text) { + if (typeof this._field === "object" && this._docTitle) { return ( @@ -394,12 +397,11 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { editing={this._isEditing} isEditingCallback={this.isEditingCallback} display={"inline"} - contents={this._text} + contents={this._docTitle} height={"auto"} maxHeight={Number(MAX_ROW_HEIGHT)} GetValue={() => { - const val = this._text ? this._text : ""; - return StrCast(val); + return StrCast(this._docTitle); }} SetValue={action((value: string) => { this.onSetValue(value); -- cgit v1.2.3-70-g09d2 From b0d3aa2fff87cdaeb4308c278b248f2d11cc043e Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 18 Jun 2020 15:27:01 -0500 Subject: doc opening button --- src/client/views/collections/CollectionSchemaCells.tsx | 18 +++++++++++++++--- src/client/views/collections/CollectionSchemaView.scss | 11 +++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index df2a90366..2aed880ec 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -364,7 +364,9 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { if (results && results.success) { console.log(results.result); - // this._docTitle = results.result; + this._doc = results.result; + this.prop.Document[this.prop.fieldKey] = results.result; + this._docTitle = this._doc?.title; return true; } @@ -378,18 +380,26 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { this._overlayDisposer = OverlayView.Instance.addElement(, { x: 0, y: 0 }); } + onOpenClick = () => { + if (this._doc) { + this.prop.addDocTab(this._doc, "onRight"); + return true; + } + return false; + } + render() { const dragRef: React.RefObject = React.createRef(); const reference = React.createRef(); - if (typeof this._field === "object" && this._docTitle) { + if (typeof this._field === "object" && this._doc && this._docTitle) { return (
-
this._overlayDisposer?.()} ref={this.dropRef}> @@ -409,6 +419,8 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { })} />
+
); } else { diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index 5a4e1aa58..50971420d 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -413,6 +413,17 @@ button.add-column { display: block; } + + .collectionSchemaView-cellContents-document { + display: inline-block; + } + + .collectionSchemaView-cellContents-docButton { + float: right; + width: "15px"; + height: "15px"; + } + .collectionSchemaView-dropdownWrapper { border: grey; -- cgit v1.2.3-70-g09d2 From 765fc1781c41bcced699ed3cf0bf07561d336187 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 18 Jun 2020 23:42:55 -0500 Subject: doc type preview and editing lists --- .../views/collections/CollectionSchemaCells.tsx | 64 ++++++++++++++++++++-- 1 file changed, 59 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 2aed880ec..cbee848e6 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -1,5 +1,5 @@ import React = require("react"); -import { action, observable, trace } from "mobx"; +import { action, observable, trace, computed } from "mobx"; import { observer } from "mobx-react"; import { CellInfo } from "react-table"; import "react-table/react-table.css"; @@ -10,7 +10,7 @@ import { KeyCodes } from "../../util/KeyCodes"; import { SetupDrag, DragManager } from "../../util/DragManager"; import { CompileScript } from "../../util/Scripting"; import { Transform } from "../../util/Transform"; -import { MAX_ROW_HEIGHT } from '../globalCssVariables.scss'; +import { MAX_ROW_HEIGHT, COLLECTION_BORDER_WIDTH } from '../globalCssVariables.scss'; import '../DocumentDecorations.scss'; import { EditableView } from "../EditableView"; import { FieldView, FieldViewProps } from "../nodes/FieldView"; @@ -30,6 +30,7 @@ import { LinkBox } from "../nodes/LinkBox"; import { OverlayView } from "../OverlayView"; import { DocumentIconContainer } from "../nodes/DocumentIcon"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; const path = require('path'); library.add(faExpand); @@ -342,12 +343,16 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { NativeWidth: returnZero, addDocTab: this.props.addDocTab, pinToPres: this.props.pinToPres, - ContentScaling: returnOne + ContentScaling: returnOne, + docFilters: [] }; @observable private _field = this.prop.Document[this.prop.fieldKey]; @observable private _doc = FieldValue(Cast(this._field, Doc)); @observable private _docTitle = this._doc?.title; - + @observable private _preview = false; + @computed get previewWidth() { return () => NumCast(this.props.Document.schemaPreviewWidth); } + @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } + @computed get tableWidth() { return this.prop.PanelWidth() - 2 * this.borderWidth - 4 - this.previewWidth(); } @action onSetValue = (value: string) => { @@ -366,6 +371,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { console.log(results.result); this._doc = results.result; this.prop.Document[this.prop.fieldKey] = results.result; + this.prop.Document[this.prop.fieldKey] = results.result; this._docTitle = this._doc?.title; return true; @@ -380,6 +386,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { this._overlayDisposer = OverlayView.Instance.addElement(, { x: 0, y: 0 }); } + @action onOpenClick = () => { if (this._doc) { this.prop.addDocTab(this._doc, "onRight"); @@ -388,6 +395,16 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { return false; } + @action + showPreview = (bool: boolean) => { + console.log("show preview"); + this._preview = bool; + } + + getPreviewTransform = (): Transform => { + return this.prop.ScreenToLocalTransform().translate(- this.borderWidth - 4 - this.tableWidth, - this.borderWidth); + } + render() { @@ -399,10 +416,42 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { return (
+ {this._preview ? { return false; }} + PanelWidth={() => { return 200 }} + PanelHeight={() => { return 200 }} + ScreenToLocalTransform={this.getPreviewTransform} + docFilters={this.docFilters} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + moveDocument={this.props.moveDocument} + //addDocument={this.props.addDocument} + //removeDocument={this.props.removeDocument} + parentActive={this.prop.active} + whenActiveChanged={this.prop.whenActiveChanged} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} + bringToFront={returnFalse} + ContentScaling={returnOne} + + > + : null} +
this._overlayDisposer?.()} - ref={this.dropRef}> + ref={this.dropRef} + onClick={() => { this.showPreview(!this._preview) }}> + { + + this._text = value; // change if its a document this._optionsList[this._selectedNum] = this._text; + + (this.prop.Document[this.prop.fieldKey] as List).splice(this._selectedNum, 1, value); + } @action -- cgit v1.2.3-70-g09d2 From 46fa52fa85102d30a3e13a93fb191f12e3e28aa1 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Fri, 19 Jun 2020 17:23:33 -0500 Subject: adding open button and slight change to preview in doc --- .../views/collections/CollectionSchemaCells.tsx | 79 ++++++++++++---------- .../CollectionSchemaMovableTableHOC.tsx | 2 + .../views/collections/CollectionSchemaView.tsx | 3 +- 3 files changed, 47 insertions(+), 37 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index cbee848e6..30278db32 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -3,7 +3,7 @@ import { action, observable, trace, computed } from "mobx"; import { observer } from "mobx-react"; import { CellInfo } from "react-table"; import "react-table/react-table.css"; -import { emptyFunction, returnFalse, returnZero, returnOne, returnEmptyFilter, Utils } from "../../../Utils"; +import { emptyFunction, returnFalse, returnZero, returnOne, returnEmptyFilter, Utils, emptyPath } from "../../../Utils"; import { Doc, DocListCast, Field, Opt } from "../../../fields/Doc"; import { Id } from "../../../fields/FieldSymbols"; import { KeyCodes } from "../../util/KeyCodes"; @@ -31,6 +31,7 @@ import { OverlayView } from "../OverlayView"; import { DocumentIconContainer } from "../nodes/DocumentIcon"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; +import ReactDOM from "react-dom"; const path = require('path'); library.add(faExpand); @@ -344,7 +345,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { addDocTab: this.props.addDocTab, pinToPres: this.props.pinToPres, ContentScaling: returnOne, - docFilters: [] + docFilters: returnEmptyFilter }; @observable private _field = this.prop.Document[this.prop.fieldKey]; @observable private _doc = FieldValue(Cast(this._field, Doc)); @@ -388,6 +389,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { @action onOpenClick = () => { + this._preview = false; if (this._doc) { this.prop.addDocTab(this._doc, "onRight"); return true; @@ -415,42 +417,45 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { return ( -
- {this._preview ? { return false; }} - PanelWidth={() => { return 200 }} - PanelHeight={() => { return 200 }} - ScreenToLocalTransform={this.getPreviewTransform} - docFilters={this.docFilters} - ContainingCollectionDoc={this.props.CollectionView?.props.Document} - ContainingCollectionView={this.props.CollectionView} - moveDocument={this.props.moveDocument} - //addDocument={this.props.addDocument} - //removeDocument={this.props.removeDocument} - parentActive={this.prop.active} - whenActiveChanged={this.prop.whenActiveChanged} - addDocTab={this.props.addDocTab} - pinToPres={this.props.pinToPres} - bringToFront={returnFalse} - ContentScaling={returnOne} +
{ this.showPreview(true); }} + onPointerLeave={() => { this.showPreview(false); }}> - > - : null} + {this._preview ?
false} + PanelWidth={() => 150} + PanelHeight={() => 150} + ScreenToLocalTransform={this.getPreviewTransform} + docFilters={returnEmptyFilter} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + moveDocument={this.props.moveDocument} + parentActive={this.prop.active} + whenActiveChanged={this.prop.whenActiveChanged} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} + bringToFront={returnFalse} + ContentScaling={returnOne}> +
: null}
this._overlayDisposer?.()} ref={this.dropRef} - onClick={() => { this.showPreview(!this._preview) }}> + >
- +
+
); } else { @@ -522,7 +527,8 @@ export class CollectionSchemaImageCell extends CollectionSchemaCell { NativeWidth: returnZero, addDocTab: this.props.addDocTab, pinToPres: this.props.pinToPres, - ContentScaling: returnOne + ContentScaling: returnOne, + docFilters: returnEmptyFilter }; let image = true; @@ -600,7 +606,8 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { NativeWidth: returnZero, addDocTab: this.props.addDocTab, pinToPres: this.props.pinToPres, - ContentScaling: returnOne + ContentScaling: returnOne, + docFilters: returnEmptyFilter }; @observable private _field = this.prop.Document[this.prop.fieldKey]; @observable private _optionsList = this._field as List; diff --git a/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx b/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx index b206765e8..b77173b25 100644 --- a/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx +++ b/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx @@ -137,6 +137,7 @@ export interface MovableRowProps { textWrapRow: (doc: Doc) => void; rowWrapped: boolean; dropAction: string; + addDocTab: any; } export class MovableRow extends React.Component { @@ -232,6 +233,7 @@ export class MovableRow extends React.Component {
this.props.removeDoc(this.props.rowInfo.original))}>
+
this.props.addDocTab(this.props.rowInfo.original, "onRight")}>
{children} diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 86034376d..81dfc9c62 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -407,7 +407,8 @@ export class SchemaTable extends React.Component { rowFocused: !this._headerIsEditing && rowInfo.index === this._focusedCell.row && this.props.isFocused(this.props.Document), textWrapRow: this.toggleTextWrapRow, rowWrapped: this.textWrappedRows.findIndex(id => rowInfo.original[Id] === id) > -1, - dropAction: StrCast(this.props.Document.childDropAction) + dropAction: StrCast(this.props.Document.childDropAction), + addDocTab: this.props.addDocTab }; } -- cgit v1.2.3-70-g09d2 From 884e1f73f6a3ff47d286b13ff58166b62026cc18 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 21 Jun 2020 19:46:01 -0500 Subject: changed to previews --- .../views/collections/CollectionSchemaCells.tsx | 54 +++++------------- .../views/collections/CollectionSchemaView.tsx | 66 +++++++++++++++++++++- 2 files changed, 79 insertions(+), 41 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 30278db32..4231a3941 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -56,6 +56,7 @@ export interface CellProps { setPreviewDoc: (doc: Doc) => void; setComputed: (script: string, doc: Doc, field: string, row: number, col: number) => boolean; getField: (row: number, col?: number) => void; + showDoc: (doc: Doc | undefined, dataDoc?: any, screenX?: number, screenY?: number) => void; } @observer @@ -398,16 +399,18 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { } @action - showPreview = (bool: boolean) => { - console.log("show preview"); - this._preview = bool; - } - - getPreviewTransform = (): Transform => { - return this.prop.ScreenToLocalTransform().translate(- this.borderWidth - 4 - this.tableWidth, - this.borderWidth); + showPreview = (bool: boolean, e: any) => { + if (this._isEditing) { + this._preview = false; + } else { + if (bool) { + this.props.showDoc(this._doc, this.prop.DataDoc, e.screenX, e.screenY); + } else { + this.props.showDoc(undefined); + } + } } - render() { const dragRef: React.RefObject = React.createRef(); @@ -418,38 +421,9 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { return (
{ this.showPreview(true); }} - onPointerLeave={() => { this.showPreview(false); }}> - - {this._preview ?
false} - PanelWidth={() => 150} - PanelHeight={() => 150} - ScreenToLocalTransform={this.getPreviewTransform} - docFilters={returnEmptyFilter} - ContainingCollectionDoc={this.props.CollectionView?.props.Document} - ContainingCollectionView={this.props.CollectionView} - moveDocument={this.props.moveDocument} - parentActive={this.prop.active} - whenActiveChanged={this.prop.whenActiveChanged} - addDocTab={this.props.addDocTab} - pinToPres={this.props.pinToPres} - bringToFront={returnFalse} - ContentScaling={returnOne}> -
: null} + onPointerEnter={(e) => { this.showPreview(true, e); }} + onPointerLeave={(e) => { this.showPreview(false, e); }} + >
void; } + + + + + + + + @observer export class SchemaTable extends React.Component { private DIVIDER_WIDTH = 4; @@ -237,6 +246,10 @@ export class SchemaTable extends React.Component { @observable _focusedCell: { row: number, col: number } = { row: 0, col: 0 }; @observable _openCollections: Array = []; + @observable _showDoc: Doc | undefined; + @observable _showDataDoc: any = ""; + @observable _showDocPos: number[] = []; + @computed get previewWidth() { return () => NumCast(this.props.Document.schemaPreviewWidth); } @computed get previewHeight() { return () => this.props.PanelHeight() - 2 * this.borderWidth; } @computed get tableWidth() { return this.props.PanelWidth() - 2 * this.borderWidth - this.DIVIDER_WIDTH - this.previewWidth(); } @@ -349,6 +362,7 @@ export class SchemaTable extends React.Component { setPreviewDoc: this.props.setPreviewDoc, setComputed: this.setComputed, getField: this.getField, + showDoc: this.showDoc, }; const colType = this.getColumnType(col); @@ -756,8 +770,58 @@ export class SchemaTable extends React.Component { return false; } + + showDoc(doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) { + this._showDoc = doc; + if (dataDoc && screenX && screenY) { + this._showDocPos = this.props.ScreenToLocalTransform().transformPoint(screenX, screenY); + } + } + + @action + onOpenClick = () => { + if (this._showDoc) { + this.props.addDocTab(this._showDoc, "onRight"); + } + } + + getPreviewTransform = (): Transform => { + return this.props.ScreenToLocalTransform().translate(- this.borderWidth - 4 - this.tableWidth, - this.borderWidth); + } + render() { + + const preview = ""; + return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > + {this._showDoc ?
{ this.onOpenClick(); }} style={{ + position: "absolute", transform: `translate(${this._showDocPos[0]}, ${this._showDocPos[1]})` + }} + ref="overlay"> false} + PanelWidth={() => 150} + PanelHeight={() => 150} + ScreenToLocalTransform={this.getPreviewTransform} + docFilters={returnEmptyFilter} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + moveDocument={this.props.moveDocument} + parentActive={this.props.active} + whenActiveChanged={emptyFunction} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} + bringToFront={returnFalse} + ContentScaling={returnOne}> +
: null} {this.reactTable}
this.createRow()}>+ new
; -- cgit v1.2.3-70-g09d2 From 2e41227b586e6ad7f9f9f83154011ea33b27b38c Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sun, 21 Jun 2020 22:07:01 -0400 Subject: fixed actions --- .../views/collections/CollectionSchemaView.tsx | 61 ++++++++++------------ 1 file changed, 29 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 334897028..a79b790f5 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -770,7 +770,7 @@ export class SchemaTable extends React.Component { return false; } - + @action showDoc(doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) { this._showDoc = doc; if (dataDoc && screenX && screenY) { @@ -778,7 +778,6 @@ export class SchemaTable extends React.Component { } } - @action onOpenClick = () => { if (this._showDoc) { this.props.addDocTab(this._showDoc, "onRight"); @@ -790,38 +789,36 @@ export class SchemaTable extends React.Component { } render() { - const preview = ""; - return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > - {this._showDoc ?
{ this.onOpenClick(); }} style={{ - position: "absolute", transform: `translate(${this._showDocPos[0]}, ${this._showDocPos[1]})` - }} - ref="overlay"> false} - PanelWidth={() => 150} - PanelHeight={() => 150} - ScreenToLocalTransform={this.getPreviewTransform} - docFilters={returnEmptyFilter} - ContainingCollectionDoc={this.props.CollectionView?.props.Document} - ContainingCollectionView={this.props.CollectionView} - moveDocument={this.props.moveDocument} - parentActive={this.props.active} - whenActiveChanged={emptyFunction} - addDocTab={this.props.addDocTab} - pinToPres={this.props.pinToPres} - bringToFront={returnFalse} - ContentScaling={returnOne}> -
: null} + {!this._showDoc ? (null) : +
{ this.onOpenClick(); }} style={{ position: "absolute", transform: `translate(${this._showDocPos[0]}, ${this._showDocPos[1]})` }} + ref="overlay"> false} + PanelWidth={() => 150} + PanelHeight={() => 150} + ScreenToLocalTransform={this.getPreviewTransform} + docFilters={returnEmptyFilter} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + moveDocument={this.props.moveDocument} + parentActive={this.props.active} + whenActiveChanged={emptyFunction} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} + bringToFront={returnFalse} + ContentScaling={returnOne}> + +
} {this.reactTable}
this.createRow()}>+ new
; -- cgit v1.2.3-70-g09d2 From e2621ee4e1e1094306f02a5f8db7a80c9c5b1d39 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sun, 21 Jun 2020 22:45:53 -0400 Subject: fixed schema preview doc bug. --- src/client/views/collections/CollectionSchemaView.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index a79b790f5..196ebbdc6 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -771,7 +771,7 @@ export class SchemaTable extends React.Component { } @action - showDoc(doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) { + showDoc = (doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) => { this._showDoc = doc; if (dataDoc && screenX && screenY) { this._showDocPos = this.props.ScreenToLocalTransform().transformPoint(screenX, screenY); @@ -792,7 +792,8 @@ export class SchemaTable extends React.Component { const preview = ""; return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > {!this._showDoc ? (null) : -
{ this.onOpenClick(); }} style={{ position: "absolute", transform: `translate(${this._showDocPos[0]}, ${this._showDocPos[1]})` }} +
{ this.onOpenClick(); }} + style={{ position: "absolute", width: 400, height: 300, transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1]}px)` }} ref="overlay"> Date: Mon, 22 Jun 2020 14:22:23 -0500 Subject: more with previews --- .../views/collections/CollectionSchemaCells.tsx | 35 +++++++++++++++++++--- .../views/collections/CollectionSchemaView.scss | 4 +++ .../views/collections/CollectionSchemaView.tsx | 11 ++++--- 3 files changed, 42 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 4231a3941..b9be3b64f 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -404,13 +404,37 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { this._preview = false; } else { if (bool) { - this.props.showDoc(this._doc, this.prop.DataDoc, e.screenX, e.screenY); + console.log("show doc"); + this.props.showDoc(this._doc, this.prop.DataDoc, e.screenX - 230, e.screenY - 570); } else { + console.log("no doc"); this.props.showDoc(undefined); } } } + onDown = (e: any) => { + this.props.changeFocusedCellByIndex(this.props.row, this.props.col); + this.props.setPreviewDoc(this.props.rowProps.original); + + let url: string; + if (url = StrCast(this.props.rowProps.row.href)) { + try { + new URL(url); + const temp = window.open(url)!; + temp.blur(); + window.focus(); + } catch { } + } + + const field = this.props.rowProps.original[this.props.rowProps.column.id!]; + const doc = FieldValue(Cast(field, Doc)); + if (typeof field === "object" && doc) this.props.setPreviewDoc(doc); + + this.showPreview(true, e); + + } + render() { const dragRef: React.RefObject = React.createRef(); @@ -420,9 +444,12 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { return ( -
{ this.showPreview(true, e); }} - onPointerLeave={(e) => { this.showPreview(false, e); }} +
{ this.onDown(e); }} + // onFocus={(e) => this.showPreview(true, e)} + onMouseEnter={(e) => { this.showPreview(true, e); }} + // onBlur={(e) => { console.log("Blur"); this.showPreview(false, e) }} + onMouseLeave={(e) => { this.showPreview(false, e); }} >
{ render() { const preview = ""; return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > + {this.reactTable} +
this.createRow()}>+ new
{!this._showDoc ? (null) : -
{ this.onOpenClick(); }} - style={{ position: "absolute", width: 400, height: 300, transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1]}px)` }} +
{ this.onOpenClick(); }} + style={{ + position: "absolute", width: 400, height: 300, + transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1]}px)` + }} ref="overlay"> { ContentScaling={returnOne}>
} - {this.reactTable} -
this.createRow()}>+ new
; } } \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 97090506ca22ce2f96b0c0cb44bf30b3c17f7b90 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Mon, 22 Jun 2020 17:14:33 -0400 Subject: fixed display of document preview for schema view --- src/client/views/collections/CollectionSchemaCells.tsx | 8 ++++---- src/client/views/collections/CollectionSchemaView.tsx | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index b9be3b64f..7b76a5c84 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -405,7 +405,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { } else { if (bool) { console.log("show doc"); - this.props.showDoc(this._doc, this.prop.DataDoc, e.screenX - 230, e.screenY - 570); + this.props.showDoc(this._doc, this.prop.DataDoc, e.clientX, e.clientY); } else { console.log("no doc"); this.props.showDoc(undefined); @@ -445,11 +445,11 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { return (
{ this.onDown(e); }} + onPointerDown={(e) => { this.onDown(e); }} // onFocus={(e) => this.showPreview(true, e)} - onMouseEnter={(e) => { this.showPreview(true, e); }} + onPointerEnter={(e) => { this.showPreview(true, e); }} // onBlur={(e) => { console.log("Blur"); this.showPreview(false, e) }} - onMouseLeave={(e) => { this.showPreview(false, e); }} + onPointerLeave={(e) => { this.showPreview(false, e); }} >
{ {!this._showDoc ? (null) :
{ this.onOpenClick(); }} style={{ - position: "absolute", width: 400, height: 300, - transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1]}px)` + position: "absolute", width: 150, height: 150, + background: "dimGray", display: "block", top: 0, left: 0, + transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1] - 180}px)` }} ref="overlay"> Date: Mon, 22 Jun 2020 16:58:31 -0500 Subject: tweaks to preview --- .../views/collections/CollectionSchemaCells.tsx | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 7b76a5c84..6f43a2097 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -382,8 +382,6 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { } onFocus = () => { - - console.log(this._field); this._overlayDisposer?.(); this._overlayDisposer = OverlayView.Instance.addElement(, { x: 0, y: 0 }); } @@ -413,6 +411,16 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { } } + @action + isEditingCalling = (isEditing: boolean): void => { + this.showPreview(false, ""); + document.removeEventListener("keydown", this.onKeyDown); + isEditing && document.addEventListener("keydown", this.onKeyDown); + this._isEditing = isEditing; + this.props.setIsEditing(isEditing); + this.props.changeFocusedCellByIndex(this.props.row, this.props.col); + } + onDown = (e: any) => { this.props.changeFocusedCellByIndex(this.props.row, this.props.col); this.props.setPreviewDoc(this.props.rowProps.original); @@ -436,31 +444,24 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { } render() { - - const dragRef: React.RefObject = React.createRef(); - const reference = React.createRef(); - if (typeof this._field === "object" && this._doc && this._docTitle) { - - return (
{ this.onDown(e); }} - // onFocus={(e) => this.showPreview(true, e)} onPointerEnter={(e) => { this.showPreview(true, e); }} - // onBlur={(e) => { console.log("Blur"); this.showPreview(false, e) }} onPointerLeave={(e) => { this.showPreview(false, e); }} >
this._overlayDisposer?.()} ref={this.dropRef} + onFocus={this.onFocus} + onBlur={() => this._overlayDisposer?.()} > { this.onSetValue(value); + this.showPreview(false, ""); return true; })} /> -- cgit v1.2.3-70-g09d2 From 45e3384b31ed2816e6846c2ff545fe55dc155339 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Tue, 23 Jun 2020 16:41:07 -0500 Subject: minor changes --- .../views/collections/CollectionSchemaCells.tsx | 33 +++++++++--- .../views/collections/CollectionSchemaHeaders.tsx | 10 ++++ .../views/collections/CollectionSchemaView.scss | 4 ++ .../views/collections/CollectionSchemaView.tsx | 63 +++++++++++++++------- 4 files changed, 85 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 6f43a2097..a79360a20 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -94,6 +94,7 @@ export class CollectionSchemaCell extends React.Component { @action onPointerDown = async (e: React.PointerEvent): Promise => { + this.props.changeFocusedCellByIndex(this.props.row, this.props.col); this.props.setPreviewDoc(this.props.rowProps.original); @@ -239,10 +240,14 @@ export class CollectionSchemaCell extends React.Component { // ); trace(); + + return (
+ + { height={"auto"} maxHeight={Number(MAX_ROW_HEIGHT)} GetValue={() => { - const cfield = ComputedField.WithoutComputed(() => FieldValue(props.Document[props.fieldKey])); - const cscript = cfield instanceof ComputedField ? cfield.script.originalScript : undefined; - const cfinalScript = cscript?.split("return")[cscript.split("return").length - 1]; - const val = cscript !== undefined ? `:=${cfinalScript?.substring(0, cfinalScript.length - 2)}` : - Field.IsField(cfield) ? Field.toScriptString(cfield) : ""; - return val; + if (type === "number" && (contents === 0 || contents === "0")) { + return "0"; + } else { + const cfield = ComputedField.WithoutComputed(() => FieldValue(props.Document[props.fieldKey])); + console.log(cfield); + if (type === "number") { + return StrCast(cfield); + } + const cscript = cfield instanceof ComputedField ? cfield.script.originalScript : undefined; + const cfinalScript = cscript?.split("return")[cscript.split("return").length - 1]; + const val = cscript !== undefined ? `:=${cfinalScript?.substring(0, cfinalScript.length - 2)}` : + Field.IsField(cfield) ? Field.toScriptString(cfield) : ""; + return val; + } + }} SetValue={action((value: string) => { let retVal = false; + if (value.startsWith(":=")) { retVal = this.props.setComputed(value.substring(2), props.Document, this.props.rowProps.column.id!, this.props.row, this.props.col); } else { const script = CompileScript(value, { requiredType: type, typecheck: false, editable: true, addReturn: true, params: { this: Doc.name, $r: "number", $c: "number", $: "any" } }); if (script.compiled) { retVal = this.applyToDoc(props.Document, this.props.row, this.props.col, script.run); + console.log("compiled"); } + } if (retVal) { this._isEditing = false; // need to set this here. otherwise, the assignment of the field will invalidate & cause render() to be called with the wrong value for 'editing' this.props.setIsEditing(false); } return retVal; + + //return true; })} OnFillDown={async (value: string) => { const script = CompileScript(value, { requiredType: type, typecheck: false, editable: true, addReturn: true, params: { this: Doc.name, $r: "number", $c: "number", $: "any" } }); @@ -284,6 +303,8 @@ export class CollectionSchemaCell extends React.Component { } }} /> + +
{/* {fieldIsDoc ? docExpander : null} */}
diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index 0d6cf4474..d9a27f355 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -73,6 +73,16 @@ export class CollectionSchemaAddColumnHeader extends React.Component { private DIVIDER_WIDTH = 4; @@ -320,19 +316,48 @@ export class SchemaTable extends React.Component { } const cols = this.columns.map(col => { - const header = c.heading)} - keyType={this.getColumnType(col)} - typeConst={columnTypes.get(col.heading) !== undefined} - onSelect={this.changeColumns} - setIsEditing={this.setHeaderIsEditing} - deleteColumn={this.deleteColumn} - setColumnType={this.setColumnType} - setColumnSort={this.setColumnSort} - setColumnColor={this.setColumnColor} - />; + + const icon: IconProp = this.getColumnType(col) === ColumnType.Number ? "hashtag" : this.getColumnType(col) === ColumnType.String ? "font" : + this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : + this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : "align-justify"; + + + + const header =
+ c.heading)} + // keyType={this.getColumnType(col)} + typeConst={columnTypes.get(col.heading) !== undefined} + menuButtonContent={
{col.heading}
} + addNew={false} + onSelect={this.changeColumns} + setIsEditing={this.setHeaderIsEditing} + deleteColumn={this.deleteColumn} + onlyShowOptions={false} + setColumnType={this.setColumnType} + setColumnSort={this.setColumnSort} + setColumnColor={this.setColumnColor} + /> +
; + + + // c.heading)} + // keyType={this.getColumnType(col)} + // typeConst={columnTypes.get(col.heading) !== undefined} + // onSelect={this.changeColumns} + // setIsEditing={this.setHeaderIsEditing} + // deleteColumn={this.deleteColumn} + // setColumnType={this.setColumnType} + // setColumnSort={this.setColumnSort} + // setColumnColor={this.setColumnColor} + // />; + return { Header: , -- cgit v1.2.3-70-g09d2 From d58958cbfe763cf5b56eda36c608cb6059445391 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Tue, 23 Jun 2020 17:06:34 -0500 Subject: fixing 0 bug in number cells --- src/client/views/EditableView.tsx | 4 ++-- src/client/views/collections/CollectionSchemaCells.tsx | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index ee3ce1cf3..afe9321f4 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -172,7 +172,8 @@ export class EditableView extends React.Component { onChange: this.props.autosuggestProps.onChange }} /> - : { ref={this._ref} style={{ display: this.props.display, minHeight: "20px", height: `${this.props.height ? this.props.height : "auto"}`, maxHeight: `${this.props.maxHeight}` }} onClick={this.onClick} placeholder={this.props.placeholder}> - {this.props.contents ? this.props.contents?.valueOf() : this.props.placeholder?.valueOf()}
); diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index a79360a20..593962e73 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -252,9 +252,11 @@ export class CollectionSchemaCell extends React.Component { editing={this._isEditing} isEditingCallback={this.isEditingCallback} display={"inline"} - contents={contents} + contents={contents ? contents : type === "number" ? "0" : "undefined"} + //contents={StrCast(contents)} height={"auto"} maxHeight={Number(MAX_ROW_HEIGHT)} + placeholder={"enter value"} GetValue={() => { if (type === "number" && (contents === 0 || contents === "0")) { return "0"; -- cgit v1.2.3-70-g09d2 From 161d71258b636178f3e160dc66143d5df1ebb5ed Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Wed, 24 Jun 2020 19:48:09 -0500 Subject: restructure of schema view class and menus --- .../views/collections/CollectionSchemaView.scss | 5 + .../views/collections/CollectionSchemaView.tsx | 943 +++++++++++++++++++-- 2 files changed, 898 insertions(+), 50 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index 1463cdb3c..a0bbae88f 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -63,6 +63,7 @@ margin-left: 50px; z-index: 10000; + overflow-y: visible; &.-header { font-size: 12px; @@ -179,11 +180,15 @@ .collectionSchemaView-header { height: 100%; color: gray; + z-index: 10000; + overflow-y: visible; .collectionSchema-header-menu { height: 100%; + z-index: 10000; .collectionSchema-header-toggler { + z-index: 10000; width: 100%; height: 100%; padding: 4px; diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 9c4ec7021..18a53541d 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -10,7 +10,7 @@ import { 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 { SchemaHeaderField, PastelSchemaPalette } from "../../../fields/SchemaHeaderField"; import { ComputedField } from "../../../fields/ScriptField"; import { Cast, FieldValue, NumCast, StrCast, BoolCast } from "../../../fields/Types"; import { Docs, DocumentOptions } from "../../documents/Documents"; @@ -21,7 +21,7 @@ import { COLLECTION_BORDER_WIDTH } from '../../views/globalCssVariables.scss'; import { ContextMenu } from "../ContextMenu"; import '../DocumentDecorations.scss'; import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell, CollectionSchemaImageCell, CollectionSchemaListCell } from "./CollectionSchemaCells"; -import { CollectionSchemaAddColumnHeader, CollectionSchemaHeader, CollectionSchemaColumnMenu } from "./CollectionSchemaHeaders"; +import { CollectionSchemaAddColumnHeader, CollectionSchemaHeader, CollectionSchemaColumnMenu, KeysDropdown } from "./CollectionSchemaHeaders"; import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC"; import "./CollectionSchemaView.scss"; import { CollectionSubView } from "./CollectionSubView"; @@ -29,7 +29,6 @@ import { CollectionView } from "./CollectionView"; import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse, returnEmptyFilter, emptyPath } from "../../../Utils"; import { SnappingManager } from "../../util/SnappingManager"; -import ReactDOM from "react-dom"; library.add(faCog, faPlus, faSortUp, faSortDown); library.add(faTable); @@ -65,6 +64,781 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @computed get tableWidth() { return this.props.PanelWidth() - 2 * this.borderWidth - this.DIVIDER_WIDTH - this.previewWidth(); } @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } + @observable pointerX: number = 0; + @observable pointerY: number = 0; + @computed get menuCoordinates() { return this.props.ScreenToLocalTransform().transformPoint(this.pointerX, this.pointerY); } + + @observable col: any = ""; + @computed get possibleKeys() { return this.documentKeys.filter(key => this.columns.findIndex(existingKey => existingKey.heading.toUpperCase() === key.toUpperCase()) === -1); } + + @observable menuContent: any = ""; + @observable headerOpen: boolean = false; + + @observable private _isOpen: boolean = false; + @observable private _node: HTMLDivElement | null = null; + + componentDidMount() { + document.addEventListener("pointerdown", this.detectClick); + document.addEventListener("keydown", this.onKeyDown); + } + + componentWillUnmount() { + document.removeEventListener("pointerdown", this.detectClick); + document.removeEventListener("keydown", this.onKeyDown); + } + + detectClick = (e: PointerEvent): void => { + if (this._node && this._node.contains(e.target as Node)) { + } else { + this._isOpen = false; + this.setHeaderIsEditing(false); + } + } + + @action + toggleIsOpen = (): void => { + this._isOpen = !this._isOpen; + this.setHeaderIsEditing(this._isOpen); + } + + changeColumnType = (type: ColumnType, col: any): void => { + this.setColumnType(col, type); + } + + changeColumnSort = (desc: boolean | undefined, col: any): void => { + this.setColumnSort(col, desc); + } + + changeColumnColor = (color: string, col: any): void => { + this.setColumnColor(col, color); + } + + @action + setNode = (node: HTMLDivElement): void => { + if (node) { + this._node = node; + } + } + + renderTypes = (col: any) => { + if (columnTypes.get(col.heading)) return <>; + + const type = col.type; + return ( +
+ +
+
this.changeColumnType(ColumnType.Any, col)}> + + Any +
+
this.changeColumnType(ColumnType.Number, col)}> + + Number +
+
this.changeColumnType(ColumnType.String, col)}> + + Text +
+
this.changeColumnType(ColumnType.Boolean, col)}> + + Checkbox +
+
this.changeColumnType(ColumnType.List, col)}> + + List +
+
this.changeColumnType(ColumnType.Doc, col)}> + + Document +
+
this.changeColumnType(ColumnType.Image, col)}> + + Image +
+
+
+ ); + } + + renderSorting = (col: any) => { + const sort = col.desc; + return ( +
+ +
+
this.changeColumnSort(true, col)}> + + Sort descending +
+
this.changeColumnSort(false, col)}> + + Sort ascending +
+
this.changeColumnSort(undefined, col)}> + + Clear sorting +
+
+
+ ); + } + + renderColors = (col: any) => { + const selected = col.color; + + const pink = PastelSchemaPalette.get("pink2"); + const purple = PastelSchemaPalette.get("purple2"); + const blue = PastelSchemaPalette.get("bluegreen1"); + const yellow = PastelSchemaPalette.get("yellow4"); + const red = PastelSchemaPalette.get("red2"); + const gray = "#f1efeb"; + + return ( +
+ +
+
this.changeColumnColor(pink!, col)}>
+
this.changeColumnColor(purple!, col)}>
+
this.changeColumnColor(blue!, col)}>
+
this.changeColumnColor(yellow!, col)}>
+
this.changeColumnColor(red!, col)}>
+
this.changeColumnColor(gray, col)}>
+
+
+ ); + } + + renderContent = (col: any) => { + return ( +
+
+ + c.heading)} + canAddNew={true} + addNew={false} + onSelect={this.changeColumns} + setIsEditing={this.setHeaderIsEditing} + /> +
+ {false ? <> : + <> + {this.renderTypes(col)} + {this.renderSorting(col)} + {this.renderColors(col)} +
+ +
+ + } +
+ ); + } + + + //anchorPoints.TOP_CENTER + + @computed get renderMenu() { + return ( +
+ {/* +
this.toggleIsOpen()}>{this.menuContent}
+ */} + {this.renderContent(this.col)} +
+ ); + } + + + + + + + + + + + + + + // ADDED START HEREE + // + // + // + + @observable _headerIsEditing: boolean = false; + @observable _cellIsEditing: boolean = false; + @observable _focusedCell: { row: number, col: number } = { row: 0, col: 0 }; + @observable _openCollections: Array = []; + + @observable _showDoc: Doc | undefined; + @observable _showDataDoc: any = ""; + @observable _showDocPos: number[] = []; + + @computed get columns() { + return Cast(this.props.Document.schemaColumns, listSpec(SchemaHeaderField), []); + } + set columns(columns: SchemaHeaderField[]) { + this.props.Document.schemaColumns = new List(columns); + } + + // @computed get childDocs() { + // if (this.childDocs) return this.childDocs; + + // const doc = this.props.DataDoc ? this.props.DataDoc : this.props.Document; + // return DocListCast(doc[this.props.fieldKey]); + // } + + set childDocs(docs: Doc[]) { + const doc = this.props.DataDoc ? this.props.DataDoc : this.props.Document; + doc[this.props.fieldKey] = new List(docs); + } + + @computed get textWrappedRows() { + return Cast(this.props.Document.textwrappedSchemaRows, listSpec("string"), []); + } + set textWrappedRows(textWrappedRows: string[]) { + this.props.Document.textwrappedSchemaRows = new List(textWrappedRows); + } + + @computed get resized(): { id: string, value: number }[] { + return this.columns.reduce((resized, shf) => { + (shf.width > -1) && resized.push({ id: shf.heading, value: shf.width }); + return resized; + }, [] as { id: string, value: number }[]); + } + @computed get sorted(): SortingRule[] { + return this.columns.reduce((sorted, shf) => { + shf.desc && sorted.push({ id: shf.heading, desc: shf.desc }); + return sorted; + }, [] as SortingRule[]); + } + + @action + openHeader = (col: any, menu: any) => { + this.menuContent = menu; + this.col = col; + this.headerOpen = !this.headerOpen; + } + + @computed get tableColumns(): Column[] { + const columns: Column[] = []; + const tableIsFocused = this.isFocused(this.props.Document); + const focusedRow = this._focusedCell.row; + const focusedCol = this._focusedCell.col; + const isEditable = !this._headerIsEditing; + + if (this.childDocs.reduce((found, doc) => found || doc.type === "collection", false)) { + columns.push( + { + expander: true, + Header: "", + width: 30, + Expander: (rowInfo) => { + if (rowInfo.original.type === "collection") { + if (rowInfo.isExpanded) return
this.onCloseCollection(rowInfo.original)}>
; + if (!rowInfo.isExpanded) return
this.onExpandCollection(rowInfo.original)}>
; + } else { + return null; + } + } + } + ); + } + + const cols = this.columns.map(col => { + + const icon: IconProp = this.getColumnType(col) === ColumnType.Number ? "hashtag" : this.getColumnType(col) === ColumnType.String ? "font" : + this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : + this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : "align-justify"; + + // this.menuContent =
{col.heading}
; + + const menuContent =
{col.heading}
; + + // this.col = col; + + const header = +
{ this.openHeader(col, menuContent); }} + style={{ background: col.color }}> + {menuContent} +
; + + + // c.heading)} + // keyType={this.getColumnType(col)} + // typeConst={columnTypes.get(col.heading) !== undefined} + // onSelect={this.changeColumns} + // setIsEditing={this.setHeaderIsEditing} + // deleteColumn={this.deleteColumn} + // setColumnType={this.setColumnType} + // setColumnSort={this.setColumnSort} + // setColumnColor={this.setColumnColor} + // />; + + + return { + Header: , + accessor: (doc: Doc) => doc ? doc[col.heading] : 0, + id: col.heading, + Cell: (rowProps: CellInfo) => { + const rowIndex = rowProps.index; + const columnIndex = this.columns.map(c => c.heading).indexOf(rowProps.column.id!); + const isFocused = focusedRow === rowIndex && focusedCol === columnIndex && tableIsFocused; + + const props: CellProps = { + row: rowIndex, + col: columnIndex, + rowProps: rowProps, + isFocused: isFocused, + changeFocusedCellByIndex: this.changeFocusedCellByIndex, + CollectionView: this.props.CollectionView, + ContainingCollection: this.props.ContainingCollectionView, + Document: this.props.Document, + fieldKey: this.props.fieldKey, + renderDepth: this.props.renderDepth, + addDocTab: this.props.addDocTab, + pinToPres: this.props.pinToPres, + moveDocument: this.props.moveDocument, + setIsEditing: this.setCellIsEditing, + isEditable: isEditable, + setPreviewDoc: this.setPreviewDoc, + setComputed: this.setComputed, + getField: this.getField, + showDoc: this.showDoc, + }; + + const colType = this.getColumnType(col); + if (colType === ColumnType.Number) return ; + if (colType === ColumnType.String) return ; + if (colType === ColumnType.Boolean) return ; + if (colType === ColumnType.Doc) return ; + if (colType === ColumnType.Image) return ; + if (colType === ColumnType.List) return ; + return ; + }, + minWidth: 200, + }; + }); + columns.push(...cols); + + columns.push({ + Header: , + accessor: (doc: Doc) => 0, + id: "add", + Cell: (rowProps: CellInfo) => <>, + width: 28, + resizable: false + }); + return columns; + } + + tableAddDoc = (doc: Doc, relativeTo?: Doc, before?: boolean) => { + return Doc.AddDocToList(this.props.Document, this.props.fieldKey, doc, relativeTo, before); + } + + private getTrProps: ComponentPropsGetterR = (state, rowInfo) => { + return !rowInfo ? {} : { + ScreenToLocalTransform: this.props.ScreenToLocalTransform, + addDoc: this.tableAddDoc, + removeDoc: this.props.removeDocument, + rowInfo, + rowFocused: !this._headerIsEditing && rowInfo.index === this._focusedCell.row && this.isFocused(this.props.Document), + textWrapRow: this.toggleTextWrapRow, + rowWrapped: this.textWrappedRows.findIndex(id => rowInfo.original[Id] === id) > -1, + dropAction: StrCast(this.props.Document.childDropAction), + addDocTab: this.props.addDocTab + }; + } + + private getTdProps: ComponentPropsGetterR = (state, rowInfo, column, instance) => { + if (!rowInfo || column) return {}; + + const row = rowInfo.index; + //@ts-ignore + const col = this.columns.map(c => c.heading).indexOf(column!.id); + const isFocused = this._focusedCell.row === row && this._focusedCell.col === col && this.isFocused(this.props.Document); + // TODO: editing border doesn't work :( + return { + style: { + border: !this._headerIsEditing && isFocused ? "2px solid rgb(255, 160, 160)" : "1px solid #f1efeb" + } + }; + } + + @action + onCloseCollection = (collection: Doc): void => { + const index = this._openCollections.findIndex(col => col === collection[Id]); + if (index > -1) this._openCollections.splice(index, 1); + } + + @action onExpandCollection = (collection: Doc) => this._openCollections.push(collection[Id]); + @action setCellIsEditing = (isEditing: boolean) => this._cellIsEditing = isEditing; + @action setHeaderIsEditing = (isEditing: boolean) => this._headerIsEditing = isEditing; + + @action + onPointDown = (e: React.PointerEvent): void => { + this.setFocused(this.props.Document); + if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey && this.props.isSelected(true)) { + e.stopPropagation(); + } + this.pointerY = e.screenY; + this.pointerX = e.screenX; + this.headerOpen = false; + } + + @action + onKeyDown = (e: KeyboardEvent): void => { + if (!this._cellIsEditing && !this._headerIsEditing && this.isFocused(this.props.Document)) {// && this.props.isSelected(true)) { + const direction = e.key === "Tab" ? "tab" : e.which === 39 ? "right" : e.which === 37 ? "left" : e.which === 38 ? "up" : e.which === 40 ? "down" : ""; + this._focusedCell = this.changeFocusedCellByDirection(direction, this._focusedCell.row, this._focusedCell.col); + + const pdoc = FieldValue(this.childDocs[this._focusedCell.row]); + pdoc && this.setPreviewDoc(pdoc); + } + } + + changeFocusedCellByDirection = (direction: string, curRow: number, curCol: number) => { + switch (direction) { + case "tab": return { row: (curRow + 1 === this.childDocs.length ? 0 : curRow + 1), col: curCol + 1 === this.columns.length ? 0 : curCol + 1 }; + case "right": return { row: curRow, col: curCol + 1 === this.columns.length ? curCol : curCol + 1 }; + case "left": return { row: curRow, col: curCol === 0 ? curCol : curCol - 1 }; + case "up": return { row: curRow === 0 ? curRow : curRow - 1, col: curCol }; + case "down": return { row: curRow + 1 === this.childDocs.length ? curRow : curRow + 1, col: curCol }; + } + return this._focusedCell; + } + + @action + changeFocusedCellByIndex = (row: number, col: number): void => { + if (this._focusedCell.row !== row || this._focusedCell.col !== col) { + this._focusedCell = { row: row, col: col }; + } + this.setFocused(this.props.Document); + } + + @undoBatch + createRow = () => { + this.props.addDocument(Docs.Create.TextDocument("", { title: "", _width: 100, _height: 30 })); + } + + @undoBatch + @action + createColumn = () => { + let index = 0; + let found = this.columns.findIndex(col => col.heading.toUpperCase() === "New field".toUpperCase()) > -1; + while (found) { + index++; + found = this.columns.findIndex(col => col.heading.toUpperCase() === ("New field (" + index + ")").toUpperCase()) > -1; + } + this.columns.push(new SchemaHeaderField(`New field ${index ? "(" + index + ")" : ""}`, "#f1efeb")); + } + + @undoBatch + @action + deleteColumn = (key: string) => { + const columns = this.columns; + if (columns === undefined) { + this.columns = new List([]); + } else { + const index = columns.map(c => c.heading).indexOf(key); + if (index > -1) { + columns.splice(index, 1); + this.columns = columns; + } + } + } + + @undoBatch + @action + changeColumns = (oldKey: string, newKey: string, addNew: boolean) => { + const columns = this.columns; + if (columns === undefined) { + this.columns = new List([new SchemaHeaderField(newKey, "f1efeb")]); + } else { + if (addNew) { + columns.push(new SchemaHeaderField(newKey, "f1efeb")); + this.columns = columns; + } else { + const index = columns.map(c => c.heading).indexOf(oldKey); + if (index > -1) { + const column = columns[index]; + column.setHeading(newKey); + columns[index] = column; + this.columns = columns; + } + } + } + } + + getColumnType = (column: SchemaHeaderField): ColumnType => { + // added functionality to convert old column type stuff to new column type stuff -syip + if (column.type && column.type !== 0) { + return column.type; + } + if (columnTypes.get(column.heading)) { + column.type = columnTypes.get(column.heading)!; + return columnTypes.get(column.heading)!; + } + const typesDoc = FieldValue(Cast(this.props.Document.schemaColumnTypes, Doc)); + if (!typesDoc) { + column.type = ColumnType.Any; + return ColumnType.Any; + } + column.type = NumCast(typesDoc[column.heading]); + return NumCast(typesDoc[column.heading]); + } + + @undoBatch + setColumnType = (columnField: SchemaHeaderField, type: ColumnType): void => { + if (columnTypes.get(columnField.heading)) return; + + const columns = this.columns; + const index = columns.indexOf(columnField); + if (index > -1) { + columnField.setType(NumCast(type)); + columns[index] = columnField; + this.columns = columns; + } + } + + @undoBatch + setColumnColor = (columnField: SchemaHeaderField, color: string): void => { + const columns = this.columns; + const index = columns.indexOf(columnField); + if (index > -1) { + columnField.setColor(color); + columns[index] = columnField; + this.columns = columns; // need to set the columns to trigger rerender + } + } + + @action + setColumns = (columns: SchemaHeaderField[]) => this.columns = columns + + @undoBatch + reorderColumns = (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => { + const columns = [...columnsValues]; + const oldIndex = columns.indexOf(toMove); + const relIndex = columns.indexOf(relativeTo); + const newIndex = (oldIndex > relIndex && !before) ? relIndex + 1 : (oldIndex < relIndex && before) ? relIndex - 1 : relIndex; + + if (oldIndex === newIndex) return; + + columns.splice(newIndex, 0, columns.splice(oldIndex, 1)[0]); + this.columns = columns; + } + + @undoBatch + @action + setColumnSort = (columnField: SchemaHeaderField, descending: boolean | undefined) => { + const columns = this.columns; + const index = columns.findIndex(c => c.heading === columnField.heading); + const column = columns[index]; + column.setDesc(descending); + columns[index] = column; + this.columns = columns; + } + + get documentKeys() { + const docs = this.childDocs; + const keys: { [key: string]: boolean } = {}; + // bcz: ugh. this is untracked since otherwise a large collection of documents will blast the server for all their fields. + // then as each document's fields come back, we update the documents _proxies. Each time we do this, the whole schema will be + // invalidated and re-rendered. This workaround will inquire all of the document fields before the options button is clicked. + // then by the time the options button is clicked, all of the fields should be in place. If a new field is added while this menu + // is displayed (unlikely) it won't show up until something else changes. + //TODO Types + untracked(() => docs.map(doc => Doc.GetAllPrototypes(doc).map(proto => Object.keys(proto).forEach(key => keys[key] = false)))); + + this.columns.forEach(key => keys[key.heading] = true); + return Array.from(Object.keys(keys)); + } + + @undoBatch + @action + toggleTextwrap = async () => { + const textwrappedRows = Cast(this.props.Document.textwrappedSchemaRows, listSpec("string"), []); + if (textwrappedRows.length) { + this.props.Document.textwrappedSchemaRows = new List([]); + } else { + const docs = DocListCast(this.props.Document[this.props.fieldKey]); + const allRows = docs instanceof Doc ? [docs[Id]] : docs.map(doc => doc[Id]); + this.props.Document.textwrappedSchemaRows = new List(allRows); + } + } + + @action + toggleTextWrapRow = (doc: Doc): void => { + const textWrapped = this.textWrappedRows; + const index = textWrapped.findIndex(id => doc[Id] === id); + + index > -1 ? textWrapped.splice(index, 1) : textWrapped.push(doc[Id]); + + this.textWrappedRows = textWrapped; + } + + @computed + get reactTable() { + const children = this.childDocs; + const hasCollectionChild = children.reduce((found, doc) => found || doc.type === "collection", false); + const expandedRowsList = this._openCollections.map(col => children.findIndex(doc => doc[Id] === col).toString()); + const expanded = {}; + //@ts-ignore + expandedRowsList.forEach(row => expanded[row] = true); + const rerender = [...this.textWrappedRows]; // TODO: get component to rerender on text wrap change without needign to console.log :(((( + + return (row.original.type !== "collection") ? (null) : +
{this.renderSchemaTable(row.original, undefined, undefined)}
} + //
} + + />; + } + + onResizedChange = (newResized: Resize[], event: any) => { + const columns = this.columns; + newResized.forEach(resized => { + const index = columns.findIndex(c => c.heading === resized.id); + const column = columns[index]; + column.setWidth(resized.value); + columns[index] = column; + }); + this.columns = columns; + } + + onContextMenu = (e: React.MouseEvent): void => { + if (!e.isPropagationStopped() && this.props.Document[Id] !== "mainDoc") { // need to test this because GoldenLayout causes a parallel hierarchy in the React DOM for its children and the main document view7 + // ContextMenu.Instance.addItem({ description: "Make DB", event: this.makeDB, icon: "table" }); + ContextMenu.Instance.addItem({ description: "Toggle text wrapping", event: this.toggleTextwrap, icon: "table" }); + } + } + + getField = (row: number, col?: number) => { + const docs = this.childDocs; + + row = row % docs.length; + while (row < 0) row += docs.length; + const columns = this.columns; + const doc = docs[row]; + if (col === undefined) { + return doc; + } + if (col >= 0 && col < columns.length) { + const column = this.columns[col].heading; + return doc[column]; + } + return undefined; + } + + createTransformer = (row: number, col: number): Transformer => { + const self = this; + const captures: { [name: string]: Field } = {}; + + const transformer: ts.TransformerFactory = context => { + return root => { + function visit(node: ts.Node) { + node = ts.visitEachChild(node, visit, context); + if (ts.isIdentifier(node)) { + const isntPropAccess = !ts.isPropertyAccessExpression(node.parent) || node.parent.expression === node; + const isntPropAssign = !ts.isPropertyAssignment(node.parent) || node.parent.name !== node; + if (isntPropAccess && isntPropAssign) { + if (node.text === "$r") { + return ts.createNumericLiteral(row.toString()); + } else if (node.text === "$c") { + return ts.createNumericLiteral(col.toString()); + } else if (node.text === "$") { + if (ts.isCallExpression(node.parent)) { + // captures.doc = self.props.Document; + // captures.key = self.props.fieldKey; + } + } + } + } + + return node; + } + return ts.visitNode(root, visit); + }; + }; + + // const getVars = () => { + // return { capturedVariables: captures }; + // }; + + return { transformer, /*getVars*/ }; + } + + setComputed = (script: string, doc: Doc, field: string, row: number, col: number): boolean => { + script = + `const $ = (row:number, col?:number) => { + if(col === undefined) { + return (doc as any)[key][row + ${row}]; + } + return (doc as any)[key][row + ${row}][(doc as any).schemaColumns[col + ${col}].heading]; + } + return ${script}`; + const compiled = CompileScript(script, { params: { this: Doc.name }, capturedVariables: { doc: this.props.Document, key: this.props.fieldKey }, typecheck: false, transformer: this.createTransformer(row, col) }); + if (compiled.compiled) { + doc[field] = new ComputedField(compiled); + return true; + } + return false; + } + + @action + showDoc = (doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) => { + this._showDoc = doc; + if (dataDoc && screenX && screenY) { + this._showDocPos = this.props.ScreenToLocalTransform().transformPoint(screenX, screenY); + } + } + + onOpenClick = () => { + if (this._showDoc) { + this.props.addDocTab(this._showDoc, "onRight"); + } + } + + getPreviewTransform = (): Transform => { + return this.props.ScreenToLocalTransform().translate(- this.borderWidth - this.DIVIDER_WIDTH - this.tableWidth, - this.borderWidth); + } + + + + // ADDED ENDS HERE + // + // + + + + + private createTarget = (ele: HTMLDivElement) => { this._previewCont = ele; super.CreateDropTarget(ele); @@ -103,15 +877,12 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.props.select(false); } } + this.headerOpen = false; } @computed get previewDocument(): Doc | undefined { return this.previewDoc; } - getPreviewTransform = (): Transform => { - return this.props.ScreenToLocalTransform().translate(- this.borderWidth - this.DIVIDER_WIDTH - this.tableWidth, - this.borderWidth); - } - @computed get dividerDragger() { return this.previewWidth() === 0 ? (null) : @@ -152,32 +923,90 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
; } + + // this is added too + renderSchemaTable = (Document: any, dataDoc: any, childDocs: any) => { + return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.onExternalDrop(e, {})} onContextMenu={this.onContextMenu} > + {this.reactTable} +
this.createRow()}>+ new
+ {!this._showDoc ? (null) : +
{ this.onOpenClick(); }} + style={{ + position: "absolute", width: 150, height: 150, + background: "dimGray", display: "block", top: 0, left: 0, + transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1] - 180}px)` + }} + ref="overlay"> false} + PanelWidth={() => 150} + PanelHeight={() => 150} + ScreenToLocalTransform={this.getPreviewTransform} + docFilters={returnEmptyFilter} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + moveDocument={this.props.moveDocument} + parentActive={this.props.active} + whenActiveChanged={emptyFunction} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} + bringToFront={returnFalse} + ContentScaling={returnOne}> + +
} +
; + } + + + // changed to render schema table @computed get schemaTable() { - return ; + const preview = ""; + return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.onExternalDrop(e, {})} onContextMenu={this.onContextMenu} > + {this.reactTable} +
this.createRow()}>+ new
+ {!this._showDoc ? (null) : +
{ this.onOpenClick(); }} + style={{ + position: "absolute", width: 150, height: 150, + background: "dimGray", display: "block", top: 0, left: 0, + transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1] - 180}px)` + }} + ref="overlay"> false} + PanelWidth={() => 150} + PanelHeight={() => 150} + ScreenToLocalTransform={this.getPreviewTransform} + docFilters={returnEmptyFilter} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + moveDocument={this.props.moveDocument} + parentActive={this.props.active} + whenActiveChanged={emptyFunction} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} + bringToFront={returnFalse} + ContentScaling={returnOne}> + +
} +
; } @computed @@ -200,10 +1029,21 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
{this.dividerDragger} {!this.previewWidth() ? (null) : this.previewPanel} + {this.headerOpen ? this.renderMenu : null}
; } } + + + + + + + + + + export interface SchemaTableProps { Document: Doc; // child doc dataDoc?: Doc; @@ -290,6 +1130,7 @@ export class SchemaTable extends React.Component { @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } @computed get tableColumns(): Column[] { + const possibleKeys = this.documentKeys.filter(key => this.columns.findIndex(existingKey => existingKey.heading.toUpperCase() === key.toUpperCase()) === -1); const columns: Column[] = []; const tableIsFocused = this.props.isFocused(this.props.Document); @@ -323,25 +1164,27 @@ export class SchemaTable extends React.Component { - const header =
- c.heading)} - // keyType={this.getColumnType(col)} - typeConst={columnTypes.get(col.heading) !== undefined} - menuButtonContent={
{col.heading}
} - addNew={false} - onSelect={this.changeColumns} - setIsEditing={this.setHeaderIsEditing} - deleteColumn={this.deleteColumn} - onlyShowOptions={false} - setColumnType={this.setColumnType} - setColumnSort={this.setColumnSort} - setColumnColor={this.setColumnColor} - /> -
; + const header =
{col.heading}
; + + //
+ // c.heading)} + // // keyType={this.getColumnType(col)} + // typeConst={columnTypes.get(col.heading) !== undefined} + // menuButtonContent={
{col.heading}
} + // addNew={false} + // onSelect={this.changeColumns} + // setIsEditing={this.setHeaderIsEditing} + // deleteColumn={this.deleteColumn} + // onlyShowOptions={false} + // setColumnType={this.setColumnType} + // setColumnSort={this.setColumnSort} + // setColumnColor={this.setColumnColor} + // /> + //
; // Date: Wed, 24 Jun 2020 21:04:42 -0500 Subject: moving things around to schema table --- .../views/collections/CollectionSchemaView.tsx | 1209 +++++--------------- 1 file changed, 281 insertions(+), 928 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 18a53541d..4f87420d2 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -68,6 +68,28 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @observable pointerY: number = 0; @computed get menuCoordinates() { return this.props.ScreenToLocalTransform().transformPoint(this.pointerX, this.pointerY); } + @computed get columns() { + return Cast(this.props.Document.schemaColumns, listSpec(SchemaHeaderField), []); + } + set columns(columns: SchemaHeaderField[]) { + this.props.Document.schemaColumns = new List(columns); + } + + get documentKeys() { + const docs = this.childDocs; + const keys: { [key: string]: boolean } = {}; + // bcz: ugh. this is untracked since otherwise a large collection of documents will blast the server for all their fields. + // then as each document's fields come back, we update the documents _proxies. Each time we do this, the whole schema will be + // invalidated and re-rendered. This workaround will inquire all of the document fields before the options button is clicked. + // then by the time the options button is clicked, all of the fields should be in place. If a new field is added while this menu + // is displayed (unlikely) it won't show up until something else changes. + //TODO Types + untracked(() => docs.map(doc => Doc.GetAllPrototypes(doc).map(proto => Object.keys(proto).forEach(key => keys[key] = false)))); + + this.columns.forEach(key => keys[key.heading] = true); + return Array.from(Object.keys(keys)); + } + @observable col: any = ""; @computed get possibleKeys() { return this.documentKeys.filter(key => this.columns.findIndex(existingKey => existingKey.heading.toUpperCase() === key.toUpperCase()) === -1); } @@ -77,16 +99,18 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @observable private _isOpen: boolean = false; @observable private _node: HTMLDivElement | null = null; + @observable _headerIsEditing: boolean = false; + componentDidMount() { document.addEventListener("pointerdown", this.detectClick); - document.addEventListener("keydown", this.onKeyDown); } componentWillUnmount() { document.removeEventListener("pointerdown", this.detectClick); - document.removeEventListener("keydown", this.onKeyDown); } + @action setHeaderIsEditing = (isEditing: boolean) => this._headerIsEditing = isEditing; + detectClick = (e: PointerEvent): void => { if (this._node && this._node.contains(e.target as Node)) { } else { @@ -101,6 +125,9 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.setHeaderIsEditing(this._isOpen); } + + + changeColumnType = (type: ColumnType, col: any): void => { this.setColumnType(col, type); } @@ -113,6 +140,43 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.setColumnColor(col, color); } + @undoBatch + setColumnType = (columnField: SchemaHeaderField, type: ColumnType): void => { + if (columnTypes.get(columnField.heading)) return; + + const columns = this.columns; + const index = columns.indexOf(columnField); + if (index > -1) { + columnField.setType(NumCast(type)); + columns[index] = columnField; + this.columns = columns; + } + } + + @undoBatch + setColumnColor = (columnField: SchemaHeaderField, color: string): void => { + const columns = this.columns; + const index = columns.indexOf(columnField); + if (index > -1) { + columnField.setColor(color); + columns[index] = columnField; + this.columns = columns; // need to set the columns to trigger rerender + } + } + + @undoBatch + @action + setColumnSort = (columnField: SchemaHeaderField, descending: boolean | undefined) => { + const columns = this.columns; + const index = columns.findIndex(c => c.heading === columnField.heading); + const column = columns[index]; + column.setDesc(descending); + columns[index] = column; + this.columns = columns; + } + + + @action setNode = (node: HTMLDivElement): void => { if (node) { @@ -209,6 +273,35 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { ); } + @undoBatch + @action + changeColumns = (oldKey: string, newKey: string, addNew: boolean) => { + const columns = this.columns; + if (columns === undefined) { + this.columns = new List([new SchemaHeaderField(newKey, "f1efeb")]); + } else { + if (addNew) { + columns.push(new SchemaHeaderField(newKey, "f1efeb")); + this.columns = columns; + } else { + const index = columns.map(c => c.heading).indexOf(oldKey); + if (index > -1) { + const column = columns[index]; + column.setHeading(newKey); + columns[index] = column; + this.columns = columns; + } + } + } + } + + @action + openHeader = (col: any, menu: any) => { + this.menuContent = menu; + this.col = col; + this.headerOpen = !this.headerOpen; + } + renderContent = (col: any) => { return (
@@ -238,6 +331,24 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { ); } + @undoBatch + @action + deleteColumn = (key: string) => { + const columns = this.columns; + if (columns === undefined) { + this.columns = new List([]); + } else { + const index = columns.map(c => c.heading).indexOf(key); + if (index > -1) { + columns.splice(index, 1); + this.columns = columns; + } + } + } + + getPreviewTransform = (): Transform => { + return this.props.ScreenToLocalTransform().translate(- this.borderWidth - 4 - this.tableWidth, - this.borderWidth); + } //anchorPoints.TOP_CENTER @@ -256,757 +367,125 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { ); } - - - - - - - - - - - - - // ADDED START HEREE - // - // - // - - @observable _headerIsEditing: boolean = false; - @observable _cellIsEditing: boolean = false; - @observable _focusedCell: { row: number, col: number } = { row: 0, col: 0 }; - @observable _openCollections: Array = []; - - @observable _showDoc: Doc | undefined; - @observable _showDataDoc: any = ""; - @observable _showDocPos: number[] = []; - - @computed get columns() { - return Cast(this.props.Document.schemaColumns, listSpec(SchemaHeaderField), []); - } - set columns(columns: SchemaHeaderField[]) { - this.props.Document.schemaColumns = new List(columns); + private createTarget = (ele: HTMLDivElement) => { + this._previewCont = ele; + super.CreateDropTarget(ele); } - // @computed get childDocs() { - // if (this.childDocs) return this.childDocs; + isFocused = (doc: Doc): boolean => this.props.isSelected() && doc === this._focusedTable; - // const doc = this.props.DataDoc ? this.props.DataDoc : this.props.Document; - // return DocListCast(doc[this.props.fieldKey]); - // } + @action setFocused = (doc: Doc) => this._focusedTable = doc; - set childDocs(docs: Doc[]) { - const doc = this.props.DataDoc ? this.props.DataDoc : this.props.Document; - doc[this.props.fieldKey] = new List(docs); - } + @action setPreviewDoc = (doc: Doc) => this.previewDoc = doc; - @computed get textWrappedRows() { - return Cast(this.props.Document.textwrappedSchemaRows, listSpec("string"), []); - } - set textWrappedRows(textWrappedRows: string[]) { - this.props.Document.textwrappedSchemaRows = new List(textWrappedRows); + //toggles preview side-panel of schema + @action + toggleExpander = () => { + this.props.Document.schemaPreviewWidth = this.previewWidth() === 0 ? Math.min(this.tableWidth / 3, 200) : 0; } - @computed get resized(): { id: string, value: number }[] { - return this.columns.reduce((resized, shf) => { - (shf.width > -1) && resized.push({ id: shf.heading, value: shf.width }); - return resized; - }, [] as { id: string, value: number }[]); - } - @computed get sorted(): SortingRule[] { - return this.columns.reduce((sorted, shf) => { - shf.desc && sorted.push({ id: shf.heading, desc: shf.desc }); - return sorted; - }, [] as SortingRule[]); + onDividerDown = (e: React.PointerEvent) => { + setupMoveUpEvents(this, e, this.onDividerMove, emptyFunction, action(() => this.toggleExpander())); } - @action - openHeader = (col: any, menu: any) => { - this.menuContent = menu; - this.col = col; - this.headerOpen = !this.headerOpen; + onDividerMove = (e: PointerEvent, down: number[], delta: number[]) => { + const nativeWidth = this._previewCont!.getBoundingClientRect(); + const minWidth = 40; + const maxWidth = 1000; + const movedWidth = this.props.ScreenToLocalTransform().transformDirection(nativeWidth.right - e.clientX, 0)[0]; + const width = movedWidth < minWidth ? minWidth : movedWidth > maxWidth ? maxWidth : movedWidth; + this.props.Document.schemaPreviewWidth = width; + return false; } - @computed get tableColumns(): Column[] { - const columns: Column[] = []; - const tableIsFocused = this.isFocused(this.props.Document); - const focusedRow = this._focusedCell.row; - const focusedCol = this._focusedCell.col; - const isEditable = !this._headerIsEditing; - - if (this.childDocs.reduce((found, doc) => found || doc.type === "collection", false)) { - columns.push( - { - expander: true, - Header: "", - width: 30, - Expander: (rowInfo) => { - if (rowInfo.original.type === "collection") { - if (rowInfo.isExpanded) return
this.onCloseCollection(rowInfo.original)}>
; - if (!rowInfo.isExpanded) return
this.onExpandCollection(rowInfo.original)}>
; - } else { - return null; - } - } - } - ); + onPointerDown = (e: React.PointerEvent): void => { + if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey) { + if (this.props.isSelected(true)) e.stopPropagation(); + else { + this.props.select(false); + } } + this.headerOpen = false; + } - const cols = this.columns.map(col => { - - const icon: IconProp = this.getColumnType(col) === ColumnType.Number ? "hashtag" : this.getColumnType(col) === ColumnType.String ? "font" : - this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : - this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : "align-justify"; - - // this.menuContent =
{col.heading}
; - - const menuContent =
{col.heading}
; - - // this.col = col; - - const header = -
{ this.openHeader(col, menuContent); }} - style={{ background: col.color }}> - {menuContent} -
; - - - // c.heading)} - // keyType={this.getColumnType(col)} - // typeConst={columnTypes.get(col.heading) !== undefined} - // onSelect={this.changeColumns} - // setIsEditing={this.setHeaderIsEditing} - // deleteColumn={this.deleteColumn} - // setColumnType={this.setColumnType} - // setColumnSort={this.setColumnSort} - // setColumnColor={this.setColumnColor} - // />; - + @computed + get previewDocument(): Doc | undefined { return this.previewDoc; } - return { - Header: , - accessor: (doc: Doc) => doc ? doc[col.heading] : 0, - id: col.heading, - Cell: (rowProps: CellInfo) => { - const rowIndex = rowProps.index; - const columnIndex = this.columns.map(c => c.heading).indexOf(rowProps.column.id!); - const isFocused = focusedRow === rowIndex && focusedCol === columnIndex && tableIsFocused; - - const props: CellProps = { - row: rowIndex, - col: columnIndex, - rowProps: rowProps, - isFocused: isFocused, - changeFocusedCellByIndex: this.changeFocusedCellByIndex, - CollectionView: this.props.CollectionView, - ContainingCollection: this.props.ContainingCollectionView, - Document: this.props.Document, - fieldKey: this.props.fieldKey, - renderDepth: this.props.renderDepth, - addDocTab: this.props.addDocTab, - pinToPres: this.props.pinToPres, - moveDocument: this.props.moveDocument, - setIsEditing: this.setCellIsEditing, - isEditable: isEditable, - setPreviewDoc: this.setPreviewDoc, - setComputed: this.setComputed, - getField: this.getField, - showDoc: this.showDoc, - }; - - const colType = this.getColumnType(col); - if (colType === ColumnType.Number) return ; - if (colType === ColumnType.String) return ; - if (colType === ColumnType.Boolean) return ; - if (colType === ColumnType.Doc) return ; - if (colType === ColumnType.Image) return ; - if (colType === ColumnType.List) return ; - return ; - }, - minWidth: 200, - }; - }); - columns.push(...cols); - - columns.push({ - Header: , - accessor: (doc: Doc) => 0, - id: "add", - Cell: (rowProps: CellInfo) => <>, - width: 28, - resizable: false - }); - return columns; - } - - tableAddDoc = (doc: Doc, relativeTo?: Doc, before?: boolean) => { - return Doc.AddDocToList(this.props.Document, this.props.fieldKey, doc, relativeTo, before); - } - - private getTrProps: ComponentPropsGetterR = (state, rowInfo) => { - return !rowInfo ? {} : { - ScreenToLocalTransform: this.props.ScreenToLocalTransform, - addDoc: this.tableAddDoc, - removeDoc: this.props.removeDocument, - rowInfo, - rowFocused: !this._headerIsEditing && rowInfo.index === this._focusedCell.row && this.isFocused(this.props.Document), - textWrapRow: this.toggleTextWrapRow, - rowWrapped: this.textWrappedRows.findIndex(id => rowInfo.original[Id] === id) > -1, - dropAction: StrCast(this.props.Document.childDropAction), - addDocTab: this.props.addDocTab - }; - } - - private getTdProps: ComponentPropsGetterR = (state, rowInfo, column, instance) => { - if (!rowInfo || column) return {}; - - const row = rowInfo.index; - //@ts-ignore - const col = this.columns.map(c => c.heading).indexOf(column!.id); - const isFocused = this._focusedCell.row === row && this._focusedCell.col === col && this.isFocused(this.props.Document); - // TODO: editing border doesn't work :( - return { - style: { - border: !this._headerIsEditing && isFocused ? "2px solid rgb(255, 160, 160)" : "1px solid #f1efeb" - } - }; - } - - @action - onCloseCollection = (collection: Doc): void => { - const index = this._openCollections.findIndex(col => col === collection[Id]); - if (index > -1) this._openCollections.splice(index, 1); - } - - @action onExpandCollection = (collection: Doc) => this._openCollections.push(collection[Id]); - @action setCellIsEditing = (isEditing: boolean) => this._cellIsEditing = isEditing; - @action setHeaderIsEditing = (isEditing: boolean) => this._headerIsEditing = isEditing; - - @action - onPointDown = (e: React.PointerEvent): void => { - this.setFocused(this.props.Document); - if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey && this.props.isSelected(true)) { - e.stopPropagation(); - } - this.pointerY = e.screenY; - this.pointerX = e.screenX; - this.headerOpen = false; - } - - @action - onKeyDown = (e: KeyboardEvent): void => { - if (!this._cellIsEditing && !this._headerIsEditing && this.isFocused(this.props.Document)) {// && this.props.isSelected(true)) { - const direction = e.key === "Tab" ? "tab" : e.which === 39 ? "right" : e.which === 37 ? "left" : e.which === 38 ? "up" : e.which === 40 ? "down" : ""; - this._focusedCell = this.changeFocusedCellByDirection(direction, this._focusedCell.row, this._focusedCell.col); - - const pdoc = FieldValue(this.childDocs[this._focusedCell.row]); - pdoc && this.setPreviewDoc(pdoc); - } - } - - changeFocusedCellByDirection = (direction: string, curRow: number, curCol: number) => { - switch (direction) { - case "tab": return { row: (curRow + 1 === this.childDocs.length ? 0 : curRow + 1), col: curCol + 1 === this.columns.length ? 0 : curCol + 1 }; - case "right": return { row: curRow, col: curCol + 1 === this.columns.length ? curCol : curCol + 1 }; - case "left": return { row: curRow, col: curCol === 0 ? curCol : curCol - 1 }; - case "up": return { row: curRow === 0 ? curRow : curRow - 1, col: curCol }; - case "down": return { row: curRow + 1 === this.childDocs.length ? curRow : curRow + 1, col: curCol }; - } - return this._focusedCell; - } - - @action - changeFocusedCellByIndex = (row: number, col: number): void => { - if (this._focusedCell.row !== row || this._focusedCell.col !== col) { - this._focusedCell = { row: row, col: col }; - } - this.setFocused(this.props.Document); - } - - @undoBatch - createRow = () => { - this.props.addDocument(Docs.Create.TextDocument("", { title: "", _width: 100, _height: 30 })); - } - - @undoBatch - @action - createColumn = () => { - let index = 0; - let found = this.columns.findIndex(col => col.heading.toUpperCase() === "New field".toUpperCase()) > -1; - while (found) { - index++; - found = this.columns.findIndex(col => col.heading.toUpperCase() === ("New field (" + index + ")").toUpperCase()) > -1; - } - this.columns.push(new SchemaHeaderField(`New field ${index ? "(" + index + ")" : ""}`, "#f1efeb")); - } - - @undoBatch - @action - deleteColumn = (key: string) => { - const columns = this.columns; - if (columns === undefined) { - this.columns = new List([]); - } else { - const index = columns.map(c => c.heading).indexOf(key); - if (index > -1) { - columns.splice(index, 1); - this.columns = columns; - } - } - } - - @undoBatch - @action - changeColumns = (oldKey: string, newKey: string, addNew: boolean) => { - const columns = this.columns; - if (columns === undefined) { - this.columns = new List([new SchemaHeaderField(newKey, "f1efeb")]); - } else { - if (addNew) { - columns.push(new SchemaHeaderField(newKey, "f1efeb")); - this.columns = columns; - } else { - const index = columns.map(c => c.heading).indexOf(oldKey); - if (index > -1) { - const column = columns[index]; - column.setHeading(newKey); - columns[index] = column; - this.columns = columns; - } - } - } - } - - getColumnType = (column: SchemaHeaderField): ColumnType => { - // added functionality to convert old column type stuff to new column type stuff -syip - if (column.type && column.type !== 0) { - return column.type; - } - if (columnTypes.get(column.heading)) { - column.type = columnTypes.get(column.heading)!; - return columnTypes.get(column.heading)!; - } - const typesDoc = FieldValue(Cast(this.props.Document.schemaColumnTypes, Doc)); - if (!typesDoc) { - column.type = ColumnType.Any; - return ColumnType.Any; - } - column.type = NumCast(typesDoc[column.heading]); - return NumCast(typesDoc[column.heading]); - } - - @undoBatch - setColumnType = (columnField: SchemaHeaderField, type: ColumnType): void => { - if (columnTypes.get(columnField.heading)) return; - - const columns = this.columns; - const index = columns.indexOf(columnField); - if (index > -1) { - columnField.setType(NumCast(type)); - columns[index] = columnField; - this.columns = columns; - } - } - - @undoBatch - setColumnColor = (columnField: SchemaHeaderField, color: string): void => { - const columns = this.columns; - const index = columns.indexOf(columnField); - if (index > -1) { - columnField.setColor(color); - columns[index] = columnField; - this.columns = columns; // need to set the columns to trigger rerender - } - } - - @action - setColumns = (columns: SchemaHeaderField[]) => this.columns = columns - - @undoBatch - reorderColumns = (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => { - const columns = [...columnsValues]; - const oldIndex = columns.indexOf(toMove); - const relIndex = columns.indexOf(relativeTo); - const newIndex = (oldIndex > relIndex && !before) ? relIndex + 1 : (oldIndex < relIndex && before) ? relIndex - 1 : relIndex; - - if (oldIndex === newIndex) return; - - columns.splice(newIndex, 0, columns.splice(oldIndex, 1)[0]); - this.columns = columns; - } - - @undoBatch - @action - setColumnSort = (columnField: SchemaHeaderField, descending: boolean | undefined) => { - const columns = this.columns; - const index = columns.findIndex(c => c.heading === columnField.heading); - const column = columns[index]; - column.setDesc(descending); - columns[index] = column; - this.columns = columns; - } - - get documentKeys() { - const docs = this.childDocs; - const keys: { [key: string]: boolean } = {}; - // bcz: ugh. this is untracked since otherwise a large collection of documents will blast the server for all their fields. - // then as each document's fields come back, we update the documents _proxies. Each time we do this, the whole schema will be - // invalidated and re-rendered. This workaround will inquire all of the document fields before the options button is clicked. - // then by the time the options button is clicked, all of the fields should be in place. If a new field is added while this menu - // is displayed (unlikely) it won't show up until something else changes. - //TODO Types - untracked(() => docs.map(doc => Doc.GetAllPrototypes(doc).map(proto => Object.keys(proto).forEach(key => keys[key] = false)))); - - this.columns.forEach(key => keys[key.heading] = true); - return Array.from(Object.keys(keys)); - } - - @undoBatch - @action - toggleTextwrap = async () => { - const textwrappedRows = Cast(this.props.Document.textwrappedSchemaRows, listSpec("string"), []); - if (textwrappedRows.length) { - this.props.Document.textwrappedSchemaRows = new List([]); - } else { - const docs = DocListCast(this.props.Document[this.props.fieldKey]); - const allRows = docs instanceof Doc ? [docs[Id]] : docs.map(doc => doc[Id]); - this.props.Document.textwrappedSchemaRows = new List(allRows); - } - } - - @action - toggleTextWrapRow = (doc: Doc): void => { - const textWrapped = this.textWrappedRows; - const index = textWrapped.findIndex(id => doc[Id] === id); - - index > -1 ? textWrapped.splice(index, 1) : textWrapped.push(doc[Id]); - - this.textWrappedRows = textWrapped; - } - - @computed - get reactTable() { - const children = this.childDocs; - const hasCollectionChild = children.reduce((found, doc) => found || doc.type === "collection", false); - const expandedRowsList = this._openCollections.map(col => children.findIndex(doc => doc[Id] === col).toString()); - const expanded = {}; - //@ts-ignore - expandedRowsList.forEach(row => expanded[row] = true); - const rerender = [...this.textWrappedRows]; // TODO: get component to rerender on text wrap change without needign to console.log :(((( - - return (row.original.type !== "collection") ? (null) : -
{this.renderSchemaTable(row.original, undefined, undefined)}
} - //
} - - />; - } - - onResizedChange = (newResized: Resize[], event: any) => { - const columns = this.columns; - newResized.forEach(resized => { - const index = columns.findIndex(c => c.heading === resized.id); - const column = columns[index]; - column.setWidth(resized.value); - columns[index] = column; - }); - this.columns = columns; - } - - onContextMenu = (e: React.MouseEvent): void => { - if (!e.isPropagationStopped() && this.props.Document[Id] !== "mainDoc") { // need to test this because GoldenLayout causes a parallel hierarchy in the React DOM for its children and the main document view7 - // ContextMenu.Instance.addItem({ description: "Make DB", event: this.makeDB, icon: "table" }); - ContextMenu.Instance.addItem({ description: "Toggle text wrapping", event: this.toggleTextwrap, icon: "table" }); - } - } - - getField = (row: number, col?: number) => { - const docs = this.childDocs; - - row = row % docs.length; - while (row < 0) row += docs.length; - const columns = this.columns; - const doc = docs[row]; - if (col === undefined) { - return doc; - } - if (col >= 0 && col < columns.length) { - const column = this.columns[col].heading; - return doc[column]; - } - return undefined; - } - - createTransformer = (row: number, col: number): Transformer => { - const self = this; - const captures: { [name: string]: Field } = {}; - - const transformer: ts.TransformerFactory = context => { - return root => { - function visit(node: ts.Node) { - node = ts.visitEachChild(node, visit, context); - if (ts.isIdentifier(node)) { - const isntPropAccess = !ts.isPropertyAccessExpression(node.parent) || node.parent.expression === node; - const isntPropAssign = !ts.isPropertyAssignment(node.parent) || node.parent.name !== node; - if (isntPropAccess && isntPropAssign) { - if (node.text === "$r") { - return ts.createNumericLiteral(row.toString()); - } else if (node.text === "$c") { - return ts.createNumericLiteral(col.toString()); - } else if (node.text === "$") { - if (ts.isCallExpression(node.parent)) { - // captures.doc = self.props.Document; - // captures.key = self.props.fieldKey; - } - } - } - } - - return node; - } - return ts.visitNode(root, visit); - }; - }; - - // const getVars = () => { - // return { capturedVariables: captures }; - // }; - - return { transformer, /*getVars*/ }; - } - - setComputed = (script: string, doc: Doc, field: string, row: number, col: number): boolean => { - script = - `const $ = (row:number, col?:number) => { - if(col === undefined) { - return (doc as any)[key][row + ${row}]; - } - return (doc as any)[key][row + ${row}][(doc as any).schemaColumns[col + ${col}].heading]; - } - return ${script}`; - const compiled = CompileScript(script, { params: { this: Doc.name }, capturedVariables: { doc: this.props.Document, key: this.props.fieldKey }, typecheck: false, transformer: this.createTransformer(row, col) }); - if (compiled.compiled) { - doc[field] = new ComputedField(compiled); - return true; - } - return false; - } - - @action - showDoc = (doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) => { - this._showDoc = doc; - if (dataDoc && screenX && screenY) { - this._showDocPos = this.props.ScreenToLocalTransform().transformPoint(screenX, screenY); - } - } - - onOpenClick = () => { - if (this._showDoc) { - this.props.addDocTab(this._showDoc, "onRight"); - } - } - - getPreviewTransform = (): Transform => { - return this.props.ScreenToLocalTransform().translate(- this.borderWidth - this.DIVIDER_WIDTH - this.tableWidth, - this.borderWidth); - } - - - - // ADDED ENDS HERE - // - // - - - - - - private createTarget = (ele: HTMLDivElement) => { - this._previewCont = ele; - super.CreateDropTarget(ele); - } - - isFocused = (doc: Doc): boolean => this.props.isSelected() && doc === this._focusedTable; - - @action setFocused = (doc: Doc) => this._focusedTable = doc; - - @action setPreviewDoc = (doc: Doc) => this.previewDoc = doc; - - //toggles preview side-panel of schema - @action - toggleExpander = () => { - this.props.Document.schemaPreviewWidth = this.previewWidth() === 0 ? Math.min(this.tableWidth / 3, 200) : 0; - } - - onDividerDown = (e: React.PointerEvent) => { - setupMoveUpEvents(this, e, this.onDividerMove, emptyFunction, action(() => this.toggleExpander())); - } - @action - onDividerMove = (e: PointerEvent, down: number[], delta: number[]) => { - const nativeWidth = this._previewCont!.getBoundingClientRect(); - const minWidth = 40; - const maxWidth = 1000; - const movedWidth = this.props.ScreenToLocalTransform().transformDirection(nativeWidth.right - e.clientX, 0)[0]; - const width = movedWidth < minWidth ? minWidth : movedWidth > maxWidth ? maxWidth : movedWidth; - this.props.Document.schemaPreviewWidth = width; - return false; - } - - onPointerDown = (e: React.PointerEvent): void => { - if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey) { - if (this.props.isSelected(true)) e.stopPropagation(); - else { - this.props.select(false); - } - } - this.headerOpen = false; - } - - @computed - get previewDocument(): Doc | undefined { return this.previewDoc; } - - @computed - get dividerDragger() { - return this.previewWidth() === 0 ? (null) : -
; - } + @computed + get dividerDragger() { + return this.previewWidth() === 0 ? (null) : +
; + } @computed get previewPanel() { - return
- {!this.previewDocument ? (null) : - } -
; - } - - - // this is added too - renderSchemaTable = (Document: any, dataDoc: any, childDocs: any) => { - return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.onExternalDrop(e, {})} onContextMenu={this.onContextMenu} > - {this.reactTable} -
this.createRow()}>+ new
- {!this._showDoc ? (null) : -
{ this.onOpenClick(); }} - style={{ - position: "absolute", width: 150, height: 150, - background: "dimGray", display: "block", top: 0, left: 0, - transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1] - 180}px)` - }} - ref="overlay"> false} - PanelWidth={() => 150} - PanelHeight={() => 150} - ScreenToLocalTransform={this.getPreviewTransform} - docFilters={returnEmptyFilter} - ContainingCollectionDoc={this.props.CollectionView?.props.Document} - ContainingCollectionView={this.props.CollectionView} - moveDocument={this.props.moveDocument} - parentActive={this.props.active} - whenActiveChanged={emptyFunction} - addDocTab={this.props.addDocTab} - pinToPres={this.props.pinToPres} - bringToFront={returnFalse} - ContentScaling={returnOne}> - -
} + return
+ {!this.previewDocument ? (null) : + }
; } - - // changed to render schema table @computed get schemaTable() { const preview = ""; - return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.onExternalDrop(e, {})} onContextMenu={this.onContextMenu} > - {this.reactTable} -
this.createRow()}>+ new
- {!this._showDoc ? (null) : -
{ this.onOpenClick(); }} - style={{ - position: "absolute", width: 150, height: 150, - background: "dimGray", display: "block", top: 0, left: 0, - transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1] - 180}px)` - }} - ref="overlay"> false} - PanelWidth={() => 150} - PanelHeight={() => 150} - ScreenToLocalTransform={this.getPreviewTransform} - docFilters={returnEmptyFilter} - ContainingCollectionDoc={this.props.CollectionView?.props.Document} - ContainingCollectionView={this.props.CollectionView} - moveDocument={this.props.moveDocument} - parentActive={this.props.active} - whenActiveChanged={emptyFunction} - addDocTab={this.props.addDocTab} - pinToPres={this.props.pinToPres} - bringToFront={returnFalse} - ContentScaling={returnOne}> - -
} -
; + return ; } @computed @@ -1018,6 +497,44 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
; } + @action + onTablePointerDown = (e: React.PointerEvent): void => { + this.setFocused(this.props.Document); + if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey && this.props.isSelected(true)) { + e.stopPropagation(); + } + this.pointerY = e.screenY; + this.pointerX = e.screenX; + this.headerOpen = false; + } + + onResizedChange = (newResized: Resize[], event: any) => { + const columns = this.columns; + newResized.forEach(resized => { + const index = columns.findIndex(c => c.heading === resized.id); + const column = columns[index]; + column.setWidth(resized.value); + columns[index] = column; + }); + this.columns = columns; + } + + @action + setColumns = (columns: SchemaHeaderField[]) => this.columns = columns + + @undoBatch + reorderColumns = (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => { + const columns = [...columnsValues]; + const oldIndex = columns.indexOf(toMove); + const relIndex = columns.indexOf(relativeTo); + const newIndex = (oldIndex > relIndex && !before) ? relIndex + 1 : (oldIndex < relIndex && before) ? relIndex - 1 : relIndex; + + if (oldIndex === newIndex) return; + + columns.splice(newIndex, 0, columns.splice(oldIndex, 1)[0]); + this.columns = columns; + } + render() { return
doc) { - - - - - - - - export interface SchemaTableProps { Document: Doc; // child doc dataDoc?: Doc; @@ -1067,17 +576,20 @@ export interface SchemaTableProps { isFocused: (document: Doc) => boolean; setFocused: (document: Doc) => void; setPreviewDoc: (document: Doc) => void; + columns: SchemaHeaderField[]; + documentKeys: any[]; + headerIsEditing: boolean; + openHeader: (column: any, menu: any) => void; + onPointerDown: (e: React.PointerEvent) => void; + onResizedChange: (newResized: Resize[], event: any) => void; + setColumns: (columns: SchemaHeaderField[]) => void; + reorderColumns: (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => void; } - - - - @observer export class SchemaTable extends React.Component { private DIVIDER_WIDTH = 4; - @observable _headerIsEditing: boolean = false; @observable _cellIsEditing: boolean = false; @observable _focusedCell: { row: number, col: number } = { row: 0, col: 0 }; @observable _openCollections: Array = []; @@ -1090,13 +602,6 @@ export class SchemaTable extends React.Component { @computed get previewHeight() { return () => this.props.PanelHeight() - 2 * this.borderWidth; } @computed get tableWidth() { return this.props.PanelWidth() - 2 * this.borderWidth - this.DIVIDER_WIDTH - this.previewWidth(); } - @computed get columns() { - return Cast(this.props.Document.schemaColumns, listSpec(SchemaHeaderField), []); - } - set columns(columns: SchemaHeaderField[]) { - this.props.Document.schemaColumns = new List(columns); - } - @computed get childDocs() { if (this.props.childDocs) return this.props.childDocs; @@ -1116,13 +621,13 @@ export class SchemaTable extends React.Component { } @computed get resized(): { id: string, value: number }[] { - return this.columns.reduce((resized, shf) => { + return this.props.columns.reduce((resized, shf) => { (shf.width > -1) && resized.push({ id: shf.heading, value: shf.width }); return resized; }, [] as { id: string, value: number }[]); } @computed get sorted(): SortingRule[] { - return this.columns.reduce((sorted, shf) => { + return this.props.columns.reduce((sorted, shf) => { shf.desc && sorted.push({ id: shf.heading, desc: shf.desc }); return sorted; }, [] as SortingRule[]); @@ -1131,12 +636,12 @@ export class SchemaTable extends React.Component { @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } @computed get tableColumns(): Column[] { - const possibleKeys = this.documentKeys.filter(key => this.columns.findIndex(existingKey => existingKey.heading.toUpperCase() === key.toUpperCase()) === -1); + const possibleKeys = this.props.documentKeys.filter(key => this.props.columns.findIndex(existingKey => existingKey.heading.toUpperCase() === key.toUpperCase()) === -1); const columns: Column[] = []; const tableIsFocused = this.props.isFocused(this.props.Document); const focusedRow = this._focusedCell.row; const focusedCol = this._focusedCell.col; - const isEditable = !this._headerIsEditing; + const isEditable = !this.props.headerIsEditing; if (this.childDocs.reduce((found, doc) => found || doc.type === "collection", false)) { columns.push( @@ -1156,7 +661,7 @@ export class SchemaTable extends React.Component { ); } - const cols = this.columns.map(col => { + const cols = this.props.columns.map(col => { const icon: IconProp = this.getColumnType(col) === ColumnType.Number ? "hashtag" : this.getColumnType(col) === ColumnType.String ? "font" : this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : @@ -1164,51 +669,21 @@ export class SchemaTable extends React.Component { - const header =
{col.heading}
; - - //
- // c.heading)} - // // keyType={this.getColumnType(col)} - // typeConst={columnTypes.get(col.heading) !== undefined} - // menuButtonContent={
{col.heading}
} - // addNew={false} - // onSelect={this.changeColumns} - // setIsEditing={this.setHeaderIsEditing} - // deleteColumn={this.deleteColumn} - // onlyShowOptions={false} - // setColumnType={this.setColumnType} - // setColumnSort={this.setColumnSort} - // setColumnColor={this.setColumnColor} - // /> - //
; - - - // c.heading)} - // keyType={this.getColumnType(col)} - // typeConst={columnTypes.get(col.heading) !== undefined} - // onSelect={this.changeColumns} - // setIsEditing={this.setHeaderIsEditing} - // deleteColumn={this.deleteColumn} - // setColumnType={this.setColumnType} - // setColumnSort={this.setColumnSort} - // setColumnColor={this.setColumnColor} - // />; - + const menuContent =
{col.heading}
; + const header = +
{ this.props.openHeader(col, menuContent); }} + style={{ background: col.color }}> + {menuContent} +
; return { - Header: , + Header: , accessor: (doc: Doc) => doc ? doc[col.heading] : 0, id: col.heading, Cell: (rowProps: CellInfo) => { const rowIndex = rowProps.index; - const columnIndex = this.columns.map(c => c.heading).indexOf(rowProps.column.id!); + const columnIndex = this.props.columns.map(c => c.heading).indexOf(rowProps.column.id!); const isFocused = focusedRow === rowIndex && focusedCol === columnIndex && tableIsFocused; const props: CellProps = { @@ -1286,7 +761,7 @@ export class SchemaTable extends React.Component { addDoc: this.tableAddDoc, removeDoc: this.props.deleteDocument, rowInfo, - rowFocused: !this._headerIsEditing && rowInfo.index === this._focusedCell.row && this.props.isFocused(this.props.Document), + rowFocused: !this.props.headerIsEditing && rowInfo.index === this._focusedCell.row && this.props.isFocused(this.props.Document), textWrapRow: this.toggleTextWrapRow, rowWrapped: this.textWrappedRows.findIndex(id => rowInfo.original[Id] === id) > -1, dropAction: StrCast(this.props.Document.childDropAction), @@ -1304,7 +779,7 @@ export class SchemaTable extends React.Component { // TODO: editing border doesn't work :( return { style: { - border: !this._headerIsEditing && isFocused ? "2px solid rgb(255, 160, 160)" : "1px solid #f1efeb" + border: !this.props.headerIsEditing && isFocused ? "2px solid rgb(255, 160, 160)" : "1px solid #f1efeb" } }; } @@ -1317,18 +792,10 @@ export class SchemaTable extends React.Component { @action onExpandCollection = (collection: Doc) => this._openCollections.push(collection[Id]); @action setCellIsEditing = (isEditing: boolean) => this._cellIsEditing = isEditing; - @action setHeaderIsEditing = (isEditing: boolean) => this._headerIsEditing = isEditing; - - onPointerDown = (e: React.PointerEvent): void => { - this.props.setFocused(this.props.Document); - if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey && this.props.isSelected(true)) { - e.stopPropagation(); - } - } @action onKeyDown = (e: KeyboardEvent): void => { - if (!this._cellIsEditing && !this._headerIsEditing && this.props.isFocused(this.props.Document)) {// && this.props.isSelected(true)) { + if (!this._cellIsEditing && !this.props.headerIsEditing && this.props.isFocused(this.props.Document)) {// && this.props.isSelected(true)) { const direction = e.key === "Tab" ? "tab" : e.which === 39 ? "right" : e.which === 37 ? "left" : e.which === 38 ? "up" : e.which === 40 ? "down" : ""; this._focusedCell = this.changeFocusedCellByDirection(direction, this._focusedCell.row, this._focusedCell.col); @@ -1339,8 +806,8 @@ export class SchemaTable extends React.Component { changeFocusedCellByDirection = (direction: string, curRow: number, curCol: number) => { switch (direction) { - case "tab": return { row: (curRow + 1 === this.childDocs.length ? 0 : curRow + 1), col: curCol + 1 === this.columns.length ? 0 : curCol + 1 }; - case "right": return { row: curRow, col: curCol + 1 === this.columns.length ? curCol : curCol + 1 }; + case "tab": return { row: (curRow + 1 === this.childDocs.length ? 0 : curRow + 1), col: curCol + 1 === this.props.columns.length ? 0 : curCol + 1 }; + case "right": return { row: curRow, col: curCol + 1 === this.props.columns.length ? curCol : curCol + 1 }; case "left": return { row: curRow, col: curCol === 0 ? curCol : curCol - 1 }; case "up": return { row: curRow === 0 ? curRow : curRow - 1, col: curCol }; case "down": return { row: curRow + 1 === this.childDocs.length ? curRow : curRow + 1, col: curCol }; @@ -1365,49 +832,12 @@ export class SchemaTable extends React.Component { @action createColumn = () => { let index = 0; - let found = this.columns.findIndex(col => col.heading.toUpperCase() === "New field".toUpperCase()) > -1; + let found = this.props.columns.findIndex(col => col.heading.toUpperCase() === "New field".toUpperCase()) > -1; while (found) { index++; - found = this.columns.findIndex(col => col.heading.toUpperCase() === ("New field (" + index + ")").toUpperCase()) > -1; - } - this.columns.push(new SchemaHeaderField(`New field ${index ? "(" + index + ")" : ""}`, "#f1efeb")); - } - - @undoBatch - @action - deleteColumn = (key: string) => { - const columns = this.columns; - if (columns === undefined) { - this.columns = new List([]); - } else { - const index = columns.map(c => c.heading).indexOf(key); - if (index > -1) { - columns.splice(index, 1); - this.columns = columns; - } - } - } - - @undoBatch - @action - changeColumns = (oldKey: string, newKey: string, addNew: boolean) => { - const columns = this.columns; - if (columns === undefined) { - this.columns = new List([new SchemaHeaderField(newKey, "f1efeb")]); - } else { - if (addNew) { - columns.push(new SchemaHeaderField(newKey, "f1efeb")); - this.columns = columns; - } else { - const index = columns.map(c => c.heading).indexOf(oldKey); - if (index > -1) { - const column = columns[index]; - column.setHeading(newKey); - columns[index] = column; - this.columns = columns; - } - } + found = this.props.columns.findIndex(col => col.heading.toUpperCase() === ("New field (" + index + ")").toUpperCase()) > -1; } + this.props.columns.push(new SchemaHeaderField(`New field ${index ? "(" + index + ")" : ""}`, "#f1efeb")); } getColumnType = (column: SchemaHeaderField): ColumnType => { @@ -1428,72 +858,6 @@ export class SchemaTable extends React.Component { return NumCast(typesDoc[column.heading]); } - @undoBatch - setColumnType = (columnField: SchemaHeaderField, type: ColumnType): void => { - if (columnTypes.get(columnField.heading)) return; - - const columns = this.columns; - const index = columns.indexOf(columnField); - if (index > -1) { - columnField.setType(NumCast(type)); - columns[index] = columnField; - this.columns = columns; - } - } - - @undoBatch - setColumnColor = (columnField: SchemaHeaderField, color: string): void => { - const columns = this.columns; - const index = columns.indexOf(columnField); - if (index > -1) { - columnField.setColor(color); - columns[index] = columnField; - this.columns = columns; // need to set the columns to trigger rerender - } - } - - @action - setColumns = (columns: SchemaHeaderField[]) => this.columns = columns - - @undoBatch - reorderColumns = (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => { - const columns = [...columnsValues]; - const oldIndex = columns.indexOf(toMove); - const relIndex = columns.indexOf(relativeTo); - const newIndex = (oldIndex > relIndex && !before) ? relIndex + 1 : (oldIndex < relIndex && before) ? relIndex - 1 : relIndex; - - if (oldIndex === newIndex) return; - - columns.splice(newIndex, 0, columns.splice(oldIndex, 1)[0]); - this.columns = columns; - } - - @undoBatch - @action - setColumnSort = (columnField: SchemaHeaderField, descending: boolean | undefined) => { - const columns = this.columns; - const index = columns.findIndex(c => c.heading === columnField.heading); - const column = columns[index]; - column.setDesc(descending); - columns[index] = column; - this.columns = columns; - } - - get documentKeys() { - const docs = this.childDocs; - const keys: { [key: string]: boolean } = {}; - // bcz: ugh. this is untracked since otherwise a large collection of documents will blast the server for all their fields. - // then as each document's fields come back, we update the documents _proxies. Each time we do this, the whole schema will be - // invalidated and re-rendered. This workaround will inquire all of the document fields before the options button is clicked. - // then by the time the options button is clicked, all of the fields should be in place. If a new field is added while this menu - // is displayed (unlikely) it won't show up until something else changes. - //TODO Types - untracked(() => docs.map(doc => Doc.GetAllPrototypes(doc).map(proto => Object.keys(proto).forEach(key => keys[key] = false)))); - - this.columns.forEach(key => keys[key.heading] = true); - return Array.from(Object.keys(keys)); - } - @undoBatch @action toggleTextwrap = async () => { @@ -1541,24 +905,13 @@ export class SchemaTable extends React.Component { sorted={this.sorted} expanded={expanded} resized={this.resized} - onResizedChange={this.onResizedChange} + onResizedChange={this.props.onResizedChange} SubComponent={!hasCollectionChild ? undefined : row => (row.original.type !== "collection") ? (null) :
} />; } - onResizedChange = (newResized: Resize[], event: any) => { - const columns = this.columns; - newResized.forEach(resized => { - const index = columns.findIndex(c => c.heading === resized.id); - const column = columns[index]; - column.setWidth(resized.value); - columns[index] = column; - }); - this.columns = columns; - } - onContextMenu = (e: React.MouseEvent): void => { if (!e.isPropagationStopped() && this.props.Document[Id] !== "mainDoc") { // need to test this because GoldenLayout causes a parallel hierarchy in the React DOM for its children and the main document view7 // ContextMenu.Instance.addItem({ description: "Make DB", event: this.makeDB, icon: "table" }); @@ -1571,13 +924,13 @@ export class SchemaTable extends React.Component { row = row % docs.length; while (row < 0) row += docs.length; - const columns = this.columns; + const columns = this.props.columns; const doc = docs[row]; if (col === undefined) { return doc; } if (col >= 0 && col < columns.length) { - const column = this.columns[col].heading; + const column = this.props.columns[col].heading; return doc[column]; } return undefined; @@ -1658,7 +1011,7 @@ export class SchemaTable extends React.Component { render() { const preview = ""; - return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > + return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > {this.reactTable}
this.createRow()}>+ new
{!this._showDoc ? (null) : -- cgit v1.2.3-70-g09d2 From a0a73c1aeb5f786aa9505103f761e41a293828c7 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Wed, 24 Jun 2020 22:57:48 -0500 Subject: minor UI tweaks --- .../views/collections/CollectionSchemaView.tsx | 35 +++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 4f87420d2..fae55b775 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -6,7 +6,7 @@ import { action, computed, observable, untracked } from "mobx"; import { observer } from "mobx-react"; import ReactTable, { CellInfo, Column, ComponentPropsGetterR, Resize, SortingRule } from "react-table"; import "react-table/react-table.css"; -import { Doc, DocListCast, Field, Opt } from "../../../fields/Doc"; +import { Doc, DocListCast, Field, Opt, LayoutSym } from "../../../fields/Doc"; import { Id } from "../../../fields/FieldSymbols"; import { List } from "../../../fields/List"; import { listSpec } from "../../../fields/Schema"; @@ -302,6 +302,9 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.headerOpen = !this.headerOpen; } + @action + closeHeader = () => { this.headerOpen = false; } + renderContent = (col: any) => { return (
@@ -323,7 +326,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { {this.renderSorting(col)} {this.renderColors(col)}
- +
} @@ -344,6 +348,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.columns = columns; } } + this.closeHeader(); } getPreviewTransform = (): Transform => { @@ -359,9 +364,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { position: "absolute", background: "white", transform: `translate(${this.menuCoordinates[0]}px, ${this.menuCoordinates[1] - 150}px)` }}> - {/* -
this.toggleIsOpen()}>{this.menuContent}
- */} {this.renderContent(this.col)}
); @@ -414,7 +416,9 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @computed get dividerDragger() { return this.previewWidth() === 0 ? (null) : -
; +
; } @computed @@ -492,7 +496,9 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { public get schemaToolbar() { return
-
Show Preview
+
Show Preview
; } @@ -541,7 +547,12 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { pointerEvents: !this.props.active() && !SnappingManager.GetIsDragging() ? "none" : undefined, width: this.props.PanelWidth() || "100%", height: this.props.PanelHeight() || "100%" }} > -
this.props.active(true) && e.stopPropagation()} onDrop={e => this.onExternalDrop(e, {})} ref={this.createTarget}> +
this.props.active(true) && e.stopPropagation()} + onDrop={e => this.onExternalDrop(e, {})} + ref={this.createTarget}> {this.schemaTable}
{this.dividerDragger} @@ -669,11 +680,15 @@ export class SchemaTable extends React.Component { - const menuContent =
{col.heading}
; + const menuContent =
{col.heading}
; const header =
{ this.props.openHeader(col, menuContent); }} - style={{ background: col.color }}> + style={{ + background: col.color, padding: "4px", + letterSpacing: "2px", + textTransform: "uppercase" + }}> {menuContent}
; -- cgit v1.2.3-70-g09d2 From 5151b725c0959aeec7168125c3205c1e1962b37c Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 25 Jun 2020 00:15:32 -0500 Subject: fixed translating with menu --- src/client/views/collections/CollectionSchemaView.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index fae55b775..d7038eaa9 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -116,6 +116,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } else { this._isOpen = false; this.setHeaderIsEditing(false); + this.closeHeader(); } } @@ -358,11 +359,14 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { //anchorPoints.TOP_CENTER @computed get renderMenu() { + const scale = this.props.ScreenToLocalTransform().Scale; return (
this.props.active(true) && e.stopPropagation()} style={{ - position: "absolute", background: "white", - transform: `translate(${this.menuCoordinates[0]}px, ${this.menuCoordinates[1] - 150}px)` + position: "absolute", + background: "white", + transform: `translate(${this.menuCoordinates[0]}px, ${this.menuCoordinates[1] - 160 * scale}px)` }}> {this.renderContent(this.col)}
@@ -1026,7 +1030,8 @@ export class SchemaTable extends React.Component { render() { const preview = ""; - return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > + return
this.props.active(true) && e.stopPropagation()} + onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > {this.reactTable}
this.createRow()}>+ new
{!this._showDoc ? (null) : -- cgit v1.2.3-70-g09d2 From 92ea47bc7c42966f68ccfed4f1da57eb9b352d40 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Thu, 25 Jun 2020 01:50:26 -0400 Subject: fixed placement of menus and interaction with input boxes. --- .../views/collections/CollectionSchemaHeaders.tsx | 6 +++- .../views/collections/CollectionSchemaView.tsx | 36 +++++++++++++++------- src/client/views/linking/LinkMenu.tsx | 2 +- 3 files changed, 31 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index d9a27f355..aaa2e6096 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -374,7 +374,11 @@ export class KeysDropdown extends React.Component { return (
this.onChange(e.target.value)} onFocus={this.onFocus} onBlur={this.onBlur}> + onChange={e => this.onChange(e.target.value)} + onClick={(e) => { + this._inputRef.current!.select(); + e.stopPropagation(); + }} onFocus={this.onFocus} onBlur={this.onBlur}>
{this.renderOptions()}
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index fae55b775..feef4fec5 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -29,6 +29,7 @@ import { CollectionView } from "./CollectionView"; import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse, returnEmptyFilter, emptyPath } from "../../../Utils"; import { SnappingManager } from "../../util/SnappingManager"; +import Measure from "react-measure"; library.add(faCog, faPlus, faSortUp, faSortDown); library.add(faTable); @@ -66,7 +67,11 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @observable pointerX: number = 0; @observable pointerY: number = 0; - @computed get menuCoordinates() { return this.props.ScreenToLocalTransform().transformPoint(this.pointerX, this.pointerY); } + @computed get menuCoordinates() { + const x = Math.max(0, Math.min(document.body.clientWidth - this._menuWidth, this.pointerX)); + const y = Math.max(0, Math.min(document.body.clientHeight - this._menuHeight, this.pointerY)); + return this.props.ScreenToLocalTransform().transformPoint(x, y); + } @computed get columns() { return Cast(this.props.Document.schemaColumns, listSpec(SchemaHeaderField), []); @@ -116,6 +121,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } else { this._isOpen = false; this.setHeaderIsEditing(false); + this.closeHeader(); } } @@ -296,10 +302,12 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } @action - openHeader = (col: any, menu: any) => { + openHeader = (col: any, menu: any, screenx: number, screeny: number) => { this.menuContent = menu; this.col = col; this.headerOpen = !this.headerOpen; + this.pointerX = screenx; + this.pointerY = screeny; } @action @@ -357,14 +365,21 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { //anchorPoints.TOP_CENTER + @observable _menuWidth = 0 + @observable _menuHeight = 0; @computed get renderMenu() { return (
- {this.renderContent(this.col)} + { + const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); + this._menuWidth = dim[0]; this._menuHeight = dim[1]; + })}> + {({ measureRef }) =>
{this.renderContent(this.col)}
} +
); } @@ -407,7 +422,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.props.select(false); } } - this.headerOpen = false; } @computed @@ -496,9 +510,10 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { public get schemaToolbar() { return
-
Show Preview
+
+ Show Preview
; } @@ -511,7 +526,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } this.pointerY = e.screenY; this.pointerX = e.screenX; - this.headerOpen = false; } onResizedChange = (newResized: Resize[], event: any) => { @@ -590,7 +604,7 @@ export interface SchemaTableProps { columns: SchemaHeaderField[]; documentKeys: any[]; headerIsEditing: boolean; - openHeader: (column: any, menu: any) => void; + openHeader: (column: any, menu: any, screenx: number, screeny: number) => void; onPointerDown: (e: React.PointerEvent) => void; onResizedChange: (newResized: Resize[], event: any) => void; setColumns: (columns: SchemaHeaderField[]) => void; @@ -683,7 +697,7 @@ export class SchemaTable extends React.Component { const menuContent =
{col.heading}
; const header =
{ this.props.openHeader(col, menuContent); }} + onClick={e => this.props.openHeader(col, menuContent, e.clientX, e.clientY)} style={{ background: col.color, padding: "4px", letterSpacing: "2px", diff --git a/src/client/views/linking/LinkMenu.tsx b/src/client/views/linking/LinkMenu.tsx index 0fcc0f0b9..de1d60a09 100644 --- a/src/client/views/linking/LinkMenu.tsx +++ b/src/client/views/linking/LinkMenu.tsx @@ -28,7 +28,7 @@ export class LinkMenu extends React.Component { @action onClick = (e: PointerEvent) => { - if (!Array.from(this._linkMenuRef?.getElementsByTagName((e.target as HTMLElement).tagName) || []).includes(e.target as any)) { + if (this._linkMenuRef?.contains(e.target as any)) { DocumentLinksButton.EditLink = undefined; } } -- cgit v1.2.3-70-g09d2 From 880c818b35b6a40e724d210f4b6134809d5bea4a Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Thu, 25 Jun 2020 02:02:43 -0400 Subject: cleaned up some variables in schemaView --- .../views/collections/CollectionSchemaView.tsx | 61 +++++++++------------- 1 file changed, 24 insertions(+), 37 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 9b2d05b6a..05c62e288 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -65,11 +65,19 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @computed get tableWidth() { return this.props.PanelWidth() - 2 * this.borderWidth - this.DIVIDER_WIDTH - this.previewWidth(); } @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } - @observable pointerX: number = 0; - @observable pointerY: number = 0; + @observable _menuWidth = 0 + @observable _menuContent: any = ""; + @observable _headerOpen = false; + @observable _isOpen = false; + @observable _node: HTMLDivElement | null = null; + @observable _headerIsEditing = false; + @observable _col: any = ""; + @observable _menuHeight = 0; + @observable _pointerX = 0; + @observable _pointerY = 0; @computed get menuCoordinates() { - const x = Math.max(0, Math.min(document.body.clientWidth - this._menuWidth, this.pointerX)); - const y = Math.max(0, Math.min(document.body.clientHeight - this._menuHeight, this.pointerY)); + const x = Math.max(0, Math.min(document.body.clientWidth - this._menuWidth, this._pointerX)); + const y = Math.max(0, Math.min(document.body.clientHeight - this._menuHeight, this._pointerY)); return this.props.ScreenToLocalTransform().transformPoint(x, y); } @@ -94,17 +102,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.columns.forEach(key => keys[key.heading] = true); return Array.from(Object.keys(keys)); } - - @observable col: any = ""; @computed get possibleKeys() { return this.documentKeys.filter(key => this.columns.findIndex(existingKey => existingKey.heading.toUpperCase() === key.toUpperCase()) === -1); } - @observable menuContent: any = ""; - @observable headerOpen: boolean = false; - - @observable private _isOpen: boolean = false; - @observable private _node: HTMLDivElement | null = null; - - @observable _headerIsEditing: boolean = false; componentDidMount() { document.addEventListener("pointerdown", this.detectClick); @@ -131,9 +130,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.setHeaderIsEditing(this._isOpen); } - - - changeColumnType = (type: ColumnType, col: any): void => { this.setColumnType(col, type); } @@ -181,17 +177,13 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.columns = columns; } - - @action setNode = (node: HTMLDivElement): void => { - if (node) { - this._node = node; - } + node && (this._node = node); } renderTypes = (col: any) => { - if (columnTypes.get(col.heading)) return <>; + if (columnTypes.get(col.heading)) return (null); const type = col.type; return ( @@ -303,15 +295,15 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @action openHeader = (col: any, menu: any, screenx: number, screeny: number) => { - this.menuContent = menu; - this.col = col; - this.headerOpen = !this.headerOpen; - this.pointerX = screenx; - this.pointerY = screeny; + this._menuContent = menu; + this._col = col; + this._headerOpen = !this._headerOpen; + this._pointerX = screenx; + this._pointerY = screeny; } @action - closeHeader = () => { this.headerOpen = false; } + closeHeader = () => { this._headerOpen = false; } renderContent = (col: any) => { return ( @@ -363,12 +355,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { return this.props.ScreenToLocalTransform().translate(- this.borderWidth - 4 - this.tableWidth, - this.borderWidth); } - //anchorPoints.TOP_CENTER - - @observable _menuWidth = 0 - @observable _menuHeight = 0; @computed get renderMenu() { - const scale = this.props.ScreenToLocalTransform().Scale; return (
this.props.active(true) && e.stopPropagation()} @@ -380,7 +367,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); this._menuWidth = dim[0]; this._menuHeight = dim[1]; })}> - {({ measureRef }) =>
{this.renderContent(this.col)}
} + {({ measureRef }) =>
{this.renderContent(this._col)}
}
); @@ -526,8 +513,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey && this.props.isSelected(true)) { e.stopPropagation(); } - this.pointerY = e.screenY; - this.pointerX = e.screenX; + this._pointerY = e.screenY; + this._pointerX = e.screenX; } onResizedChange = (newResized: Resize[], event: any) => { @@ -573,7 +560,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
{this.dividerDragger} {!this.previewWidth() ? (null) : this.previewPanel} - {this.headerOpen ? this.renderMenu : null} + {this._headerOpen ? this.renderMenu : null}
; } } -- cgit v1.2.3-70-g09d2 From f36c093f7052f755d1c3aba32b8efd29c2d76f6f Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 25 Jun 2020 09:31:19 -0500 Subject: schema table into own class --- .../views/collections/CollectionSchemaView.tsx | 511 +------------------ src/client/views/collections/SchemaTable.tsx | 550 +++++++++++++++++++++ 2 files changed, 554 insertions(+), 507 deletions(-) create mode 100644 src/client/views/collections/SchemaTable.tsx (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 05c62e288..332849526 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -22,7 +22,6 @@ import { ContextMenu } from "../ContextMenu"; import '../DocumentDecorations.scss'; import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell, CollectionSchemaImageCell, CollectionSchemaListCell } from "./CollectionSchemaCells"; import { CollectionSchemaAddColumnHeader, CollectionSchemaHeader, CollectionSchemaColumnMenu, KeysDropdown } from "./CollectionSchemaHeaders"; -import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC"; import "./CollectionSchemaView.scss"; import { CollectionSubView } from "./CollectionSubView"; import { CollectionView } from "./CollectionView"; @@ -30,6 +29,9 @@ import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView" import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse, returnEmptyFilter, emptyPath } from "../../../Utils"; import { SnappingManager } from "../../util/SnappingManager"; import Measure from "react-measure"; +import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC"; +import { SchemaTable } from "./SchemaTable"; +//import { SchemaTable } from "./SchemaTable"; library.add(faCog, faPlus, faSortUp, faSortDown); library.add(faTable); @@ -65,7 +67,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @computed get tableWidth() { return this.props.PanelWidth() - 2 * this.borderWidth - this.DIVIDER_WIDTH - this.previewWidth(); } @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } - @observable _menuWidth = 0 + @observable _menuWidth = 0; @observable _menuContent: any = ""; @observable _headerOpen = false; @observable _isOpen = false; @@ -563,509 +565,4 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { {this._headerOpen ? this.renderMenu : null}
; } -} - - - -export interface SchemaTableProps { - Document: Doc; // child doc - dataDoc?: Doc; - PanelHeight: () => number; - PanelWidth: () => number; - childDocs?: Doc[]; - CollectionView: Opt; - ContainingCollectionView: Opt; - ContainingCollectionDoc: Opt; - fieldKey: string; - renderDepth: number; - deleteDocument: (document: Doc | Doc[]) => boolean; - addDocument: (document: Doc | Doc[]) => boolean; - moveDocument: (document: Doc | Doc[], targetCollection: Doc | undefined, addDocument: (document: Doc | Doc[]) => boolean) => boolean; - ScreenToLocalTransform: () => Transform; - active: (outsideReaction: boolean) => boolean; - onDrop: (e: React.DragEvent, options: DocumentOptions, completed?: (() => void) | undefined) => void; - addDocTab: (document: Doc, where: string) => boolean; - pinToPres: (document: Doc) => void; - isSelected: (outsideReaction?: boolean) => boolean; - isFocused: (document: Doc) => boolean; - setFocused: (document: Doc) => void; - setPreviewDoc: (document: Doc) => void; - columns: SchemaHeaderField[]; - documentKeys: any[]; - headerIsEditing: boolean; - openHeader: (column: any, menu: any, screenx: number, screeny: number) => void; - onPointerDown: (e: React.PointerEvent) => void; - onResizedChange: (newResized: Resize[], event: any) => void; - setColumns: (columns: SchemaHeaderField[]) => void; - reorderColumns: (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => void; -} - -@observer -export class SchemaTable extends React.Component { - private DIVIDER_WIDTH = 4; - - @observable _cellIsEditing: boolean = false; - @observable _focusedCell: { row: number, col: number } = { row: 0, col: 0 }; - @observable _openCollections: Array = []; - - @observable _showDoc: Doc | undefined; - @observable _showDataDoc: any = ""; - @observable _showDocPos: number[] = []; - - @computed get previewWidth() { return () => NumCast(this.props.Document.schemaPreviewWidth); } - @computed get previewHeight() { return () => this.props.PanelHeight() - 2 * this.borderWidth; } - @computed get tableWidth() { return this.props.PanelWidth() - 2 * this.borderWidth - this.DIVIDER_WIDTH - this.previewWidth(); } - - @computed get childDocs() { - if (this.props.childDocs) return this.props.childDocs; - - const doc = this.props.dataDoc ? this.props.dataDoc : this.props.Document; - return DocListCast(doc[this.props.fieldKey]); - } - set childDocs(docs: Doc[]) { - const doc = this.props.dataDoc ? this.props.dataDoc : this.props.Document; - doc[this.props.fieldKey] = new List(docs); - } - - @computed get textWrappedRows() { - return Cast(this.props.Document.textwrappedSchemaRows, listSpec("string"), []); - } - set textWrappedRows(textWrappedRows: string[]) { - this.props.Document.textwrappedSchemaRows = new List(textWrappedRows); - } - - @computed get resized(): { id: string, value: number }[] { - return this.props.columns.reduce((resized, shf) => { - (shf.width > -1) && resized.push({ id: shf.heading, value: shf.width }); - return resized; - }, [] as { id: string, value: number }[]); - } - @computed get sorted(): SortingRule[] { - return this.props.columns.reduce((sorted, shf) => { - shf.desc && sorted.push({ id: shf.heading, desc: shf.desc }); - return sorted; - }, [] as SortingRule[]); - } - - @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } - @computed get tableColumns(): Column[] { - - const possibleKeys = this.props.documentKeys.filter(key => this.props.columns.findIndex(existingKey => existingKey.heading.toUpperCase() === key.toUpperCase()) === -1); - const columns: Column[] = []; - const tableIsFocused = this.props.isFocused(this.props.Document); - const focusedRow = this._focusedCell.row; - const focusedCol = this._focusedCell.col; - const isEditable = !this.props.headerIsEditing; - - if (this.childDocs.reduce((found, doc) => found || doc.type === "collection", false)) { - columns.push( - { - expander: true, - Header: "", - width: 30, - Expander: (rowInfo) => { - if (rowInfo.original.type === "collection") { - if (rowInfo.isExpanded) return
this.onCloseCollection(rowInfo.original)}>
; - if (!rowInfo.isExpanded) return
this.onExpandCollection(rowInfo.original)}>
; - } else { - return null; - } - } - } - ); - } - - const cols = this.props.columns.map(col => { - - const icon: IconProp = this.getColumnType(col) === ColumnType.Number ? "hashtag" : this.getColumnType(col) === ColumnType.String ? "font" : - this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : - this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : "align-justify"; - - - - const menuContent =
{col.heading}
; - const header = -
this.props.openHeader(col, menuContent, e.clientX, e.clientY)} - style={{ - background: col.color, padding: "4px", - letterSpacing: "2px", - textTransform: "uppercase" - }}> - {menuContent} -
; - - return { - Header: , - accessor: (doc: Doc) => doc ? doc[col.heading] : 0, - id: col.heading, - Cell: (rowProps: CellInfo) => { - const rowIndex = rowProps.index; - const columnIndex = this.props.columns.map(c => c.heading).indexOf(rowProps.column.id!); - const isFocused = focusedRow === rowIndex && focusedCol === columnIndex && tableIsFocused; - - const props: CellProps = { - row: rowIndex, - col: columnIndex, - rowProps: rowProps, - isFocused: isFocused, - changeFocusedCellByIndex: this.changeFocusedCellByIndex, - CollectionView: this.props.CollectionView, - ContainingCollection: this.props.ContainingCollectionView, - Document: this.props.Document, - fieldKey: this.props.fieldKey, - renderDepth: this.props.renderDepth, - addDocTab: this.props.addDocTab, - pinToPres: this.props.pinToPres, - moveDocument: this.props.moveDocument, - setIsEditing: this.setCellIsEditing, - isEditable: isEditable, - setPreviewDoc: this.props.setPreviewDoc, - setComputed: this.setComputed, - getField: this.getField, - showDoc: this.showDoc, - }; - - const colType = this.getColumnType(col); - if (colType === ColumnType.Number) return ; - if (colType === ColumnType.String) return ; - if (colType === ColumnType.Boolean) return ; - if (colType === ColumnType.Doc) return ; - if (colType === ColumnType.Image) return ; - if (colType === ColumnType.List) return ; - return ; - }, - minWidth: 200, - }; - }); - columns.push(...cols); - - columns.push({ - Header: , - accessor: (doc: Doc) => 0, - id: "add", - Cell: (rowProps: CellInfo) => <>, - width: 28, - resizable: false - }); - return columns; - } - - constructor(props: SchemaTableProps) { - super(props); - // convert old schema columns (list of strings) into new schema columns (list of schema header fields) - const oldSchemaColumns = Cast(this.props.Document.schemaColumns, listSpec("string"), []); - if (oldSchemaColumns && oldSchemaColumns.length && typeof oldSchemaColumns[0] !== "object") { - const newSchemaColumns = oldSchemaColumns.map(i => typeof i === "string" ? new SchemaHeaderField(i, "#f1efeb") : i); - this.props.Document.schemaColumns = new List(newSchemaColumns); - } - } - - componentDidMount() { - document.addEventListener("keydown", this.onKeyDown); - } - - componentWillUnmount() { - document.removeEventListener("keydown", this.onKeyDown); - } - - tableAddDoc = (doc: Doc, relativeTo?: Doc, before?: boolean) => { - return Doc.AddDocToList(this.props.Document, this.props.fieldKey, doc, relativeTo, before); - } - - private getTrProps: ComponentPropsGetterR = (state, rowInfo) => { - return !rowInfo ? {} : { - ScreenToLocalTransform: this.props.ScreenToLocalTransform, - addDoc: this.tableAddDoc, - removeDoc: this.props.deleteDocument, - rowInfo, - rowFocused: !this.props.headerIsEditing && rowInfo.index === this._focusedCell.row && this.props.isFocused(this.props.Document), - textWrapRow: this.toggleTextWrapRow, - rowWrapped: this.textWrappedRows.findIndex(id => rowInfo.original[Id] === id) > -1, - dropAction: StrCast(this.props.Document.childDropAction), - addDocTab: this.props.addDocTab - }; - } - - private getTdProps: ComponentPropsGetterR = (state, rowInfo, column, instance) => { - if (!rowInfo || column) return {}; - - const row = rowInfo.index; - //@ts-ignore - const col = this.columns.map(c => c.heading).indexOf(column!.id); - const isFocused = this._focusedCell.row === row && this._focusedCell.col === col && this.props.isFocused(this.props.Document); - // TODO: editing border doesn't work :( - return { - style: { - border: !this.props.headerIsEditing && isFocused ? "2px solid rgb(255, 160, 160)" : "1px solid #f1efeb" - } - }; - } - - @action - onCloseCollection = (collection: Doc): void => { - const index = this._openCollections.findIndex(col => col === collection[Id]); - if (index > -1) this._openCollections.splice(index, 1); - } - - @action onExpandCollection = (collection: Doc) => this._openCollections.push(collection[Id]); - @action setCellIsEditing = (isEditing: boolean) => this._cellIsEditing = isEditing; - - @action - onKeyDown = (e: KeyboardEvent): void => { - if (!this._cellIsEditing && !this.props.headerIsEditing && this.props.isFocused(this.props.Document)) {// && this.props.isSelected(true)) { - const direction = e.key === "Tab" ? "tab" : e.which === 39 ? "right" : e.which === 37 ? "left" : e.which === 38 ? "up" : e.which === 40 ? "down" : ""; - this._focusedCell = this.changeFocusedCellByDirection(direction, this._focusedCell.row, this._focusedCell.col); - - const pdoc = FieldValue(this.childDocs[this._focusedCell.row]); - pdoc && this.props.setPreviewDoc(pdoc); - } - } - - changeFocusedCellByDirection = (direction: string, curRow: number, curCol: number) => { - switch (direction) { - case "tab": return { row: (curRow + 1 === this.childDocs.length ? 0 : curRow + 1), col: curCol + 1 === this.props.columns.length ? 0 : curCol + 1 }; - case "right": return { row: curRow, col: curCol + 1 === this.props.columns.length ? curCol : curCol + 1 }; - case "left": return { row: curRow, col: curCol === 0 ? curCol : curCol - 1 }; - case "up": return { row: curRow === 0 ? curRow : curRow - 1, col: curCol }; - case "down": return { row: curRow + 1 === this.childDocs.length ? curRow : curRow + 1, col: curCol }; - } - return this._focusedCell; - } - - @action - changeFocusedCellByIndex = (row: number, col: number): void => { - if (this._focusedCell.row !== row || this._focusedCell.col !== col) { - this._focusedCell = { row: row, col: col }; - } - this.props.setFocused(this.props.Document); - } - - @undoBatch - createRow = () => { - this.props.addDocument(Docs.Create.TextDocument("", { title: "", _width: 100, _height: 30 })); - } - - @undoBatch - @action - createColumn = () => { - let index = 0; - let found = this.props.columns.findIndex(col => col.heading.toUpperCase() === "New field".toUpperCase()) > -1; - while (found) { - index++; - found = this.props.columns.findIndex(col => col.heading.toUpperCase() === ("New field (" + index + ")").toUpperCase()) > -1; - } - this.props.columns.push(new SchemaHeaderField(`New field ${index ? "(" + index + ")" : ""}`, "#f1efeb")); - } - - getColumnType = (column: SchemaHeaderField): ColumnType => { - // added functionality to convert old column type stuff to new column type stuff -syip - if (column.type && column.type !== 0) { - return column.type; - } - if (columnTypes.get(column.heading)) { - column.type = columnTypes.get(column.heading)!; - return columnTypes.get(column.heading)!; - } - const typesDoc = FieldValue(Cast(this.props.Document.schemaColumnTypes, Doc)); - if (!typesDoc) { - column.type = ColumnType.Any; - return ColumnType.Any; - } - column.type = NumCast(typesDoc[column.heading]); - return NumCast(typesDoc[column.heading]); - } - - @undoBatch - @action - toggleTextwrap = async () => { - const textwrappedRows = Cast(this.props.Document.textwrappedSchemaRows, listSpec("string"), []); - if (textwrappedRows.length) { - this.props.Document.textwrappedSchemaRows = new List([]); - } else { - const docs = DocListCast(this.props.Document[this.props.fieldKey]); - const allRows = docs instanceof Doc ? [docs[Id]] : docs.map(doc => doc[Id]); - this.props.Document.textwrappedSchemaRows = new List(allRows); - } - } - - @action - toggleTextWrapRow = (doc: Doc): void => { - const textWrapped = this.textWrappedRows; - const index = textWrapped.findIndex(id => doc[Id] === id); - - index > -1 ? textWrapped.splice(index, 1) : textWrapped.push(doc[Id]); - - this.textWrappedRows = textWrapped; - } - - @computed - get reactTable() { - const children = this.childDocs; - const hasCollectionChild = children.reduce((found, doc) => found || doc.type === "collection", false); - const expandedRowsList = this._openCollections.map(col => children.findIndex(doc => doc[Id] === col).toString()); - const expanded = {}; - //@ts-ignore - expandedRowsList.forEach(row => expanded[row] = true); - const rerender = [...this.textWrappedRows]; // TODO: get component to rerender on text wrap change without needign to console.log :(((( - - return (row.original.type !== "collection") ? (null) : -
} - - />; - } - - onContextMenu = (e: React.MouseEvent): void => { - if (!e.isPropagationStopped() && this.props.Document[Id] !== "mainDoc") { // need to test this because GoldenLayout causes a parallel hierarchy in the React DOM for its children and the main document view7 - // ContextMenu.Instance.addItem({ description: "Make DB", event: this.makeDB, icon: "table" }); - ContextMenu.Instance.addItem({ description: "Toggle text wrapping", event: this.toggleTextwrap, icon: "table" }); - } - } - - getField = (row: number, col?: number) => { - const docs = this.childDocs; - - row = row % docs.length; - while (row < 0) row += docs.length; - const columns = this.props.columns; - const doc = docs[row]; - if (col === undefined) { - return doc; - } - if (col >= 0 && col < columns.length) { - const column = this.props.columns[col].heading; - return doc[column]; - } - return undefined; - } - - createTransformer = (row: number, col: number): Transformer => { - const self = this; - const captures: { [name: string]: Field } = {}; - - const transformer: ts.TransformerFactory = context => { - return root => { - function visit(node: ts.Node) { - node = ts.visitEachChild(node, visit, context); - if (ts.isIdentifier(node)) { - const isntPropAccess = !ts.isPropertyAccessExpression(node.parent) || node.parent.expression === node; - const isntPropAssign = !ts.isPropertyAssignment(node.parent) || node.parent.name !== node; - if (isntPropAccess && isntPropAssign) { - if (node.text === "$r") { - return ts.createNumericLiteral(row.toString()); - } else if (node.text === "$c") { - return ts.createNumericLiteral(col.toString()); - } else if (node.text === "$") { - if (ts.isCallExpression(node.parent)) { - // captures.doc = self.props.Document; - // captures.key = self.props.fieldKey; - } - } - } - } - - return node; - } - return ts.visitNode(root, visit); - }; - }; - - // const getVars = () => { - // return { capturedVariables: captures }; - // }; - - return { transformer, /*getVars*/ }; - } - - setComputed = (script: string, doc: Doc, field: string, row: number, col: number): boolean => { - script = - `const $ = (row:number, col?:number) => { - if(col === undefined) { - return (doc as any)[key][row + ${row}]; - } - return (doc as any)[key][row + ${row}][(doc as any).schemaColumns[col + ${col}].heading]; - } - return ${script}`; - const compiled = CompileScript(script, { params: { this: Doc.name }, capturedVariables: { doc: this.props.Document, key: this.props.fieldKey }, typecheck: false, transformer: this.createTransformer(row, col) }); - if (compiled.compiled) { - doc[field] = new ComputedField(compiled); - return true; - } - return false; - } - - @action - showDoc = (doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) => { - this._showDoc = doc; - if (dataDoc && screenX && screenY) { - this._showDocPos = this.props.ScreenToLocalTransform().transformPoint(screenX, screenY); - } - } - - onOpenClick = () => { - if (this._showDoc) { - this.props.addDocTab(this._showDoc, "onRight"); - } - } - - getPreviewTransform = (): Transform => { - return this.props.ScreenToLocalTransform().translate(- this.borderWidth - 4 - this.tableWidth, - this.borderWidth); - } - - render() { - const preview = ""; - return
this.props.active(true) && e.stopPropagation()} - onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > - {this.reactTable} -
this.createRow()}>+ new
- {!this._showDoc ? (null) : -
{ this.onOpenClick(); }} - style={{ - position: "absolute", width: 150, height: 150, - background: "dimGray", display: "block", top: 0, left: 0, - transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1] - 180}px)` - }} - ref="overlay"> false} - PanelWidth={() => 150} - PanelHeight={() => 150} - ScreenToLocalTransform={this.getPreviewTransform} - docFilters={returnEmptyFilter} - ContainingCollectionDoc={this.props.CollectionView?.props.Document} - ContainingCollectionView={this.props.CollectionView} - moveDocument={this.props.moveDocument} - parentActive={this.props.active} - whenActiveChanged={emptyFunction} - addDocTab={this.props.addDocTab} - pinToPres={this.props.pinToPres} - bringToFront={returnFalse} - ContentScaling={returnOne}> - -
} -
; - } } \ No newline at end of file diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx new file mode 100644 index 000000000..97d4bb303 --- /dev/null +++ b/src/client/views/collections/SchemaTable.tsx @@ -0,0 +1,550 @@ +import React = require("react"); +import { IconProp } from '@fortawesome/fontawesome-svg-core'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +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 { 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, BoolCast } from "../../../fields/Types"; +import { Docs, DocumentOptions } from "../../documents/Documents"; +import { CompileScript, Transformer, ts } from "../../util/Scripting"; +import { Transform } from "../../util/Transform"; +import { undoBatch } from "../../util/UndoManager"; +import { COLLECTION_BORDER_WIDTH } from '../../views/globalCssVariables.scss'; +import { ContextMenu } from "../ContextMenu"; +import '../DocumentDecorations.scss'; +import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell, CollectionSchemaImageCell, CollectionSchemaListCell } from "./CollectionSchemaCells"; +import { CollectionSchemaAddColumnHeader } from "./CollectionSchemaHeaders"; +import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC"; +import "./CollectionSchemaView.scss"; +import { CollectionView } from "./CollectionView"; +import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; +import { emptyFunction, returnZero, returnOne, returnFalse, returnEmptyFilter, emptyPath } from "../../../Utils"; + + +enum ColumnType { + Any, + Number, + String, + Boolean, + Doc, + Image, + List +} + +// this map should be used for keys that should have a const type of value +const columnTypes: Map = new Map([ + ["title", ColumnType.String], + ["x", ColumnType.Number], ["y", ColumnType.Number], ["_width", ColumnType.Number], ["_height", ColumnType.Number], + ["_nativeWidth", ColumnType.Number], ["_nativeHeight", ColumnType.Number], ["isPrototype", ColumnType.Boolean], + ["page", ColumnType.Number], ["curPage", ColumnType.Number], ["currentTimecode", ColumnType.Number], ["zIndex", ColumnType.Number] +]); + +export interface SchemaTableProps { + Document: Doc; // child doc + dataDoc?: Doc; + PanelHeight: () => number; + PanelWidth: () => number; + childDocs?: Doc[]; + CollectionView: Opt; + ContainingCollectionView: Opt; + ContainingCollectionDoc: Opt; + fieldKey: string; + renderDepth: number; + deleteDocument: (document: Doc | Doc[]) => boolean; + addDocument: (document: Doc | Doc[]) => boolean; + moveDocument: (document: Doc | Doc[], targetCollection: Doc | undefined, addDocument: (document: Doc | Doc[]) => boolean) => boolean; + ScreenToLocalTransform: () => Transform; + active: (outsideReaction: boolean) => boolean; + onDrop: (e: React.DragEvent, options: DocumentOptions, completed?: (() => void) | undefined) => void; + addDocTab: (document: Doc, where: string) => boolean; + pinToPres: (document: Doc) => void; + isSelected: (outsideReaction?: boolean) => boolean; + isFocused: (document: Doc) => boolean; + setFocused: (document: Doc) => void; + setPreviewDoc: (document: Doc) => void; + columns: SchemaHeaderField[]; + documentKeys: any[]; + headerIsEditing: boolean; + openHeader: (column: any, menu: any, screenx: number, screeny: number) => void; + onPointerDown: (e: React.PointerEvent) => void; + onResizedChange: (newResized: Resize[], event: any) => void; + setColumns: (columns: SchemaHeaderField[]) => void; + reorderColumns: (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => void; +} + +@observer +export class SchemaTable extends React.Component { + private DIVIDER_WIDTH = 4; + + @observable _cellIsEditing: boolean = false; + @observable _focusedCell: { row: number, col: number } = { row: 0, col: 0 }; + @observable _openCollections: Array = []; + + @observable _showDoc: Doc | undefined; + @observable _showDataDoc: any = ""; + @observable _showDocPos: number[] = []; + + @computed get previewWidth() { return () => NumCast(this.props.Document.schemaPreviewWidth); } + @computed get previewHeight() { return () => this.props.PanelHeight() - 2 * this.borderWidth; } + @computed get tableWidth() { return this.props.PanelWidth() - 2 * this.borderWidth - this.DIVIDER_WIDTH - this.previewWidth(); } + + @computed get childDocs() { + if (this.props.childDocs) return this.props.childDocs; + + const doc = this.props.dataDoc ? this.props.dataDoc : this.props.Document; + return DocListCast(doc[this.props.fieldKey]); + } + set childDocs(docs: Doc[]) { + const doc = this.props.dataDoc ? this.props.dataDoc : this.props.Document; + doc[this.props.fieldKey] = new List(docs); + } + + @computed get textWrappedRows() { + return Cast(this.props.Document.textwrappedSchemaRows, listSpec("string"), []); + } + set textWrappedRows(textWrappedRows: string[]) { + this.props.Document.textwrappedSchemaRows = new List(textWrappedRows); + } + + @computed get resized(): { id: string, value: number }[] { + return this.props.columns.reduce((resized, shf) => { + (shf.width > -1) && resized.push({ id: shf.heading, value: shf.width }); + return resized; + }, [] as { id: string, value: number }[]); + } + @computed get sorted(): SortingRule[] { + return this.props.columns.reduce((sorted, shf) => { + shf.desc && sorted.push({ id: shf.heading, desc: shf.desc }); + return sorted; + }, [] as SortingRule[]); + } + + @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } + @computed get tableColumns(): Column[] { + + const possibleKeys = this.props.documentKeys.filter(key => this.props.columns.findIndex(existingKey => existingKey.heading.toUpperCase() === key.toUpperCase()) === -1); + const columns: Column[] = []; + const tableIsFocused = this.props.isFocused(this.props.Document); + const focusedRow = this._focusedCell.row; + const focusedCol = this._focusedCell.col; + const isEditable = !this.props.headerIsEditing; + + if (this.childDocs.reduce((found, doc) => found || doc.type === "collection", false)) { + columns.push( + { + expander: true, + Header: "", + width: 30, + Expander: (rowInfo) => { + if (rowInfo.original.type === "collection") { + if (rowInfo.isExpanded) return
this.onCloseCollection(rowInfo.original)}>
; + if (!rowInfo.isExpanded) return
this.onExpandCollection(rowInfo.original)}>
; + } else { + return null; + } + } + } + ); + } + + const cols = this.props.columns.map(col => { + + const icon: IconProp = this.getColumnType(col) === ColumnType.Number ? "hashtag" : this.getColumnType(col) === ColumnType.String ? "font" : + this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : + this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : "align-justify"; + + + + const menuContent =
{col.heading}
; + const header = +
this.props.openHeader(col, menuContent, e.clientX, e.clientY)} + style={{ + background: col.color, padding: "4px", + letterSpacing: "2px", + textTransform: "uppercase" + }}> + {menuContent} +
; + + return { + Header: , + accessor: (doc: Doc) => doc ? doc[col.heading] : 0, + id: col.heading, + Cell: (rowProps: CellInfo) => { + const rowIndex = rowProps.index; + const columnIndex = this.props.columns.map(c => c.heading).indexOf(rowProps.column.id!); + const isFocused = focusedRow === rowIndex && focusedCol === columnIndex && tableIsFocused; + + const props: CellProps = { + row: rowIndex, + col: columnIndex, + rowProps: rowProps, + isFocused: isFocused, + changeFocusedCellByIndex: this.changeFocusedCellByIndex, + CollectionView: this.props.CollectionView, + ContainingCollection: this.props.ContainingCollectionView, + Document: this.props.Document, + fieldKey: this.props.fieldKey, + renderDepth: this.props.renderDepth, + addDocTab: this.props.addDocTab, + pinToPres: this.props.pinToPres, + moveDocument: this.props.moveDocument, + setIsEditing: this.setCellIsEditing, + isEditable: isEditable, + setPreviewDoc: this.props.setPreviewDoc, + setComputed: this.setComputed, + getField: this.getField, + showDoc: this.showDoc, + }; + + const colType = this.getColumnType(col); + if (colType === ColumnType.Number) return ; + if (colType === ColumnType.String) return ; + if (colType === ColumnType.Boolean) return ; + if (colType === ColumnType.Doc) return ; + if (colType === ColumnType.Image) return ; + if (colType === ColumnType.List) return ; + return ; + }, + minWidth: 200, + }; + }); + columns.push(...cols); + + columns.push({ + Header: , + accessor: (doc: Doc) => 0, + id: "add", + Cell: (rowProps: CellInfo) => <>, + width: 28, + resizable: false + }); + return columns; + } + + constructor(props: SchemaTableProps) { + super(props); + // convert old schema columns (list of strings) into new schema columns (list of schema header fields) + const oldSchemaColumns = Cast(this.props.Document.schemaColumns, listSpec("string"), []); + if (oldSchemaColumns && oldSchemaColumns.length && typeof oldSchemaColumns[0] !== "object") { + const newSchemaColumns = oldSchemaColumns.map(i => typeof i === "string" ? new SchemaHeaderField(i, "#f1efeb") : i); + this.props.Document.schemaColumns = new List(newSchemaColumns); + } + } + + componentDidMount() { + document.addEventListener("keydown", this.onKeyDown); + } + + componentWillUnmount() { + document.removeEventListener("keydown", this.onKeyDown); + } + + tableAddDoc = (doc: Doc, relativeTo?: Doc, before?: boolean) => { + return Doc.AddDocToList(this.props.Document, this.props.fieldKey, doc, relativeTo, before); + } + + private getTrProps: ComponentPropsGetterR = (state, rowInfo) => { + return !rowInfo ? {} : { + ScreenToLocalTransform: this.props.ScreenToLocalTransform, + addDoc: this.tableAddDoc, + removeDoc: this.props.deleteDocument, + rowInfo, + rowFocused: !this.props.headerIsEditing && rowInfo.index === this._focusedCell.row && this.props.isFocused(this.props.Document), + textWrapRow: this.toggleTextWrapRow, + rowWrapped: this.textWrappedRows.findIndex(id => rowInfo.original[Id] === id) > -1, + dropAction: StrCast(this.props.Document.childDropAction), + addDocTab: this.props.addDocTab + }; + } + + private getTdProps: ComponentPropsGetterR = (state, rowInfo, column, instance) => { + if (!rowInfo || column) return {}; + + const row = rowInfo.index; + //@ts-ignore + const col = this.columns.map(c => c.heading).indexOf(column!.id); + const isFocused = this._focusedCell.row === row && this._focusedCell.col === col && this.props.isFocused(this.props.Document); + // TODO: editing border doesn't work :( + return { + style: { + border: !this.props.headerIsEditing && isFocused ? "2px solid rgb(255, 160, 160)" : "1px solid #f1efeb" + } + }; + } + + @action + onCloseCollection = (collection: Doc): void => { + const index = this._openCollections.findIndex(col => col === collection[Id]); + if (index > -1) this._openCollections.splice(index, 1); + } + + @action onExpandCollection = (collection: Doc) => this._openCollections.push(collection[Id]); + @action setCellIsEditing = (isEditing: boolean) => this._cellIsEditing = isEditing; + + @action + onKeyDown = (e: KeyboardEvent): void => { + if (!this._cellIsEditing && !this.props.headerIsEditing && this.props.isFocused(this.props.Document)) {// && this.props.isSelected(true)) { + const direction = e.key === "Tab" ? "tab" : e.which === 39 ? "right" : e.which === 37 ? "left" : e.which === 38 ? "up" : e.which === 40 ? "down" : ""; + this._focusedCell = this.changeFocusedCellByDirection(direction, this._focusedCell.row, this._focusedCell.col); + + const pdoc = FieldValue(this.childDocs[this._focusedCell.row]); + pdoc && this.props.setPreviewDoc(pdoc); + } + } + + changeFocusedCellByDirection = (direction: string, curRow: number, curCol: number) => { + switch (direction) { + case "tab": return { row: (curRow + 1 === this.childDocs.length ? 0 : curRow + 1), col: curCol + 1 === this.props.columns.length ? 0 : curCol + 1 }; + case "right": return { row: curRow, col: curCol + 1 === this.props.columns.length ? curCol : curCol + 1 }; + case "left": return { row: curRow, col: curCol === 0 ? curCol : curCol - 1 }; + case "up": return { row: curRow === 0 ? curRow : curRow - 1, col: curCol }; + case "down": return { row: curRow + 1 === this.childDocs.length ? curRow : curRow + 1, col: curCol }; + } + return this._focusedCell; + } + + @action + changeFocusedCellByIndex = (row: number, col: number): void => { + if (this._focusedCell.row !== row || this._focusedCell.col !== col) { + this._focusedCell = { row: row, col: col }; + } + this.props.setFocused(this.props.Document); + } + + @undoBatch + createRow = () => { + this.props.addDocument(Docs.Create.TextDocument("", { title: "", _width: 100, _height: 30 })); + } + + @undoBatch + @action + createColumn = () => { + let index = 0; + let found = this.props.columns.findIndex(col => col.heading.toUpperCase() === "New field".toUpperCase()) > -1; + while (found) { + index++; + found = this.props.columns.findIndex(col => col.heading.toUpperCase() === ("New field (" + index + ")").toUpperCase()) > -1; + } + this.props.columns.push(new SchemaHeaderField(`New field ${index ? "(" + index + ")" : ""}`, "#f1efeb")); + } + + getColumnType = (column: SchemaHeaderField): ColumnType => { + // added functionality to convert old column type stuff to new column type stuff -syip + if (column.type && column.type !== 0) { + return column.type; + } + if (columnTypes.get(column.heading)) { + column.type = columnTypes.get(column.heading)!; + return columnTypes.get(column.heading)!; + } + const typesDoc = FieldValue(Cast(this.props.Document.schemaColumnTypes, Doc)); + if (!typesDoc) { + column.type = ColumnType.Any; + return ColumnType.Any; + } + column.type = NumCast(typesDoc[column.heading]); + return NumCast(typesDoc[column.heading]); + } + + @undoBatch + @action + toggleTextwrap = async () => { + const textwrappedRows = Cast(this.props.Document.textwrappedSchemaRows, listSpec("string"), []); + if (textwrappedRows.length) { + this.props.Document.textwrappedSchemaRows = new List([]); + } else { + const docs = DocListCast(this.props.Document[this.props.fieldKey]); + const allRows = docs instanceof Doc ? [docs[Id]] : docs.map(doc => doc[Id]); + this.props.Document.textwrappedSchemaRows = new List(allRows); + } + } + + @action + toggleTextWrapRow = (doc: Doc): void => { + const textWrapped = this.textWrappedRows; + const index = textWrapped.findIndex(id => doc[Id] === id); + + index > -1 ? textWrapped.splice(index, 1) : textWrapped.push(doc[Id]); + + this.textWrappedRows = textWrapped; + } + + @computed + get reactTable() { + const children = this.childDocs; + const hasCollectionChild = children.reduce((found, doc) => found || doc.type === "collection", false); + const expandedRowsList = this._openCollections.map(col => children.findIndex(doc => doc[Id] === col).toString()); + const expanded = {}; + //@ts-ignore + expandedRowsList.forEach(row => expanded[row] = true); + const rerender = [...this.textWrappedRows]; // TODO: get component to rerender on text wrap change without needign to console.log :(((( + + return (row.original.type !== "collection") ? (null) : +
} + + />; + } + + onContextMenu = (e: React.MouseEvent): void => { + if (!e.isPropagationStopped() && this.props.Document[Id] !== "mainDoc") { // need to test this because GoldenLayout causes a parallel hierarchy in the React DOM for its children and the main document view7 + // ContextMenu.Instance.addItem({ description: "Make DB", event: this.makeDB, icon: "table" }); + ContextMenu.Instance.addItem({ description: "Toggle text wrapping", event: this.toggleTextwrap, icon: "table" }); + } + } + + getField = (row: number, col?: number) => { + const docs = this.childDocs; + + row = row % docs.length; + while (row < 0) row += docs.length; + const columns = this.props.columns; + const doc = docs[row]; + if (col === undefined) { + return doc; + } + if (col >= 0 && col < columns.length) { + const column = this.props.columns[col].heading; + return doc[column]; + } + return undefined; + } + + createTransformer = (row: number, col: number): Transformer => { + const self = this; + const captures: { [name: string]: Field } = {}; + + const transformer: ts.TransformerFactory = context => { + return root => { + function visit(node: ts.Node) { + node = ts.visitEachChild(node, visit, context); + if (ts.isIdentifier(node)) { + const isntPropAccess = !ts.isPropertyAccessExpression(node.parent) || node.parent.expression === node; + const isntPropAssign = !ts.isPropertyAssignment(node.parent) || node.parent.name !== node; + if (isntPropAccess && isntPropAssign) { + if (node.text === "$r") { + return ts.createNumericLiteral(row.toString()); + } else if (node.text === "$c") { + return ts.createNumericLiteral(col.toString()); + } else if (node.text === "$") { + if (ts.isCallExpression(node.parent)) { + // captures.doc = self.props.Document; + // captures.key = self.props.fieldKey; + } + } + } + } + + return node; + } + return ts.visitNode(root, visit); + }; + }; + + // const getVars = () => { + // return { capturedVariables: captures }; + // }; + + return { transformer, /*getVars*/ }; + } + + setComputed = (script: string, doc: Doc, field: string, row: number, col: number): boolean => { + script = + `const $ = (row:number, col?:number) => { + if(col === undefined) { + return (doc as any)[key][row + ${row}]; + } + return (doc as any)[key][row + ${row}][(doc as any).schemaColumns[col + ${col}].heading]; + } + return ${script}`; + const compiled = CompileScript(script, { params: { this: Doc.name }, capturedVariables: { doc: this.props.Document, key: this.props.fieldKey }, typecheck: false, transformer: this.createTransformer(row, col) }); + if (compiled.compiled) { + doc[field] = new ComputedField(compiled); + return true; + } + return false; + } + + @action + showDoc = (doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) => { + this._showDoc = doc; + if (dataDoc && screenX && screenY) { + this._showDocPos = this.props.ScreenToLocalTransform().transformPoint(screenX, screenY); + } + } + + onOpenClick = () => { + if (this._showDoc) { + this.props.addDocTab(this._showDoc, "onRight"); + } + } + + getPreviewTransform = (): Transform => { + return this.props.ScreenToLocalTransform().translate(- this.borderWidth - 4 - this.tableWidth, - this.borderWidth); + } + + render() { + const preview = ""; + return
this.props.active(true) && e.stopPropagation()} + onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > + {this.reactTable} +
this.createRow()}>+ new
+ {!this._showDoc ? (null) : +
{ this.onOpenClick(); }} + style={{ + position: "absolute", width: 150, height: 150, + background: "dimGray", display: "block", top: 0, left: 0, + transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1] - 180}px)` + }} + ref="overlay"> false} + PanelWidth={() => 150} + PanelHeight={() => 150} + ScreenToLocalTransform={this.getPreviewTransform} + docFilters={returnEmptyFilter} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + moveDocument={this.props.moveDocument} + parentActive={this.props.active} + whenActiveChanged={emptyFunction} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} + bringToFront={returnFalse} + ContentScaling={returnOne}> + +
} +
; + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From b32aa12c76d673bb0cf339741398a1fd1441167c Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 25 Jun 2020 09:45:45 -0500 Subject: minor cleanup --- .../views/collections/CollectionSchemaView.tsx | 23 +++++++--------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 332849526..2e4d10f1d 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -1,37 +1,29 @@ import React = require("react"); -import { library, IconProp } from '@fortawesome/fontawesome-svg-core'; +import { library } from '@fortawesome/fontawesome-svg-core'; import { faCog, faPlus, faSortDown, faSortUp, faTable } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { action, computed, observable, untracked } from "mobx"; import { observer } from "mobx-react"; -import ReactTable, { CellInfo, Column, ComponentPropsGetterR, Resize, SortingRule } from "react-table"; +import { Resize } from "react-table"; import "react-table/react-table.css"; -import { Doc, DocListCast, Field, Opt, LayoutSym } from "../../../fields/Doc"; -import { Id } from "../../../fields/FieldSymbols"; +import { Doc } from "../../../fields/Doc"; import { List } from "../../../fields/List"; import { listSpec } from "../../../fields/Schema"; import { SchemaHeaderField, PastelSchemaPalette } from "../../../fields/SchemaHeaderField"; -import { ComputedField } from "../../../fields/ScriptField"; -import { Cast, FieldValue, NumCast, StrCast, BoolCast } from "../../../fields/Types"; +import { Cast, NumCast, StrCast } from "../../../fields/Types"; import { Docs, DocumentOptions } from "../../documents/Documents"; -import { CompileScript, Transformer, ts } from "../../util/Scripting"; import { Transform } from "../../util/Transform"; import { undoBatch } from "../../util/UndoManager"; import { COLLECTION_BORDER_WIDTH } from '../../views/globalCssVariables.scss'; -import { ContextMenu } from "../ContextMenu"; import '../DocumentDecorations.scss'; -import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell, CollectionSchemaImageCell, CollectionSchemaListCell } from "./CollectionSchemaCells"; -import { CollectionSchemaAddColumnHeader, CollectionSchemaHeader, CollectionSchemaColumnMenu, KeysDropdown } from "./CollectionSchemaHeaders"; +import { KeysDropdown } from "./CollectionSchemaHeaders"; import "./CollectionSchemaView.scss"; import { CollectionSubView } from "./CollectionSubView"; -import { CollectionView } from "./CollectionView"; import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; -import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse, returnEmptyFilter, emptyPath } from "../../../Utils"; +import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse } from "../../../Utils"; import { SnappingManager } from "../../util/SnappingManager"; import Measure from "react-measure"; -import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC"; import { SchemaTable } from "./SchemaTable"; -//import { SchemaTable } from "./SchemaTable"; library.add(faCog, faPlus, faSortUp, faSortDown); library.add(faTable); @@ -354,7 +346,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } getPreviewTransform = (): Transform => { - return this.props.ScreenToLocalTransform().translate(- this.borderWidth - 4 - this.tableWidth, - this.borderWidth); + return this.props.ScreenToLocalTransform().translate(- this.borderWidth - NumCast(COLLECTION_BORDER_WIDTH) - this.tableWidth, - this.borderWidth); } @computed get renderMenu() { @@ -462,7 +454,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @computed get schemaTable() { - const preview = ""; return Date: Thu, 25 Jun 2020 16:44:52 -0500 Subject: slight fix to zooming w menu --- src/client/views/collections/CollectionSchemaView.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 2e4d10f1d..128423014 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -349,13 +349,22 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { return this.props.ScreenToLocalTransform().translate(- this.borderWidth - NumCast(COLLECTION_BORDER_WIDTH) - this.tableWidth, - this.borderWidth); } + @action + onWheel(e: React.WheelEvent) { + const scale = this.props.ScreenToLocalTransform().Scale; + this.props.active(true) && e.stopPropagation(); + this.menuCoordinates[0] += e.screenX * scale; + this.menuCoordinates[1] += e.screenY * scale; + } + @computed get renderMenu() { + const scale = this.props.ScreenToLocalTransform().Scale; return (
this.props.active(true) && e.stopPropagation()} style={{ position: "absolute", background: "white", - transform: `translate(${this.menuCoordinates[0]}px, ${this.menuCoordinates[1]}px)` + transform: `translate(${this.menuCoordinates[0]}px, ${this.menuCoordinates[1] - 100 / scale}px)` }}> { const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); -- cgit v1.2.3-70-g09d2 From 8292aae00bb7fd7716110df21faafa53fd35738d Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 25 Jun 2020 17:28:21 -0500 Subject: menu text selection and more movement tweaks --- src/client/views/collections/CollectionSchemaView.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 128423014..9cd13058f 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -349,12 +349,18 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { return this.props.ScreenToLocalTransform().translate(- this.borderWidth - NumCast(COLLECTION_BORDER_WIDTH) - this.tableWidth, - this.borderWidth); } + @action + onHeaderClick = (e: React.PointerEvent) => { + this.props.active(true); + e.stopPropagation(); + } + @action onWheel(e: React.WheelEvent) { const scale = this.props.ScreenToLocalTransform().Scale; this.props.active(true) && e.stopPropagation(); - this.menuCoordinates[0] += e.screenX * scale; - this.menuCoordinates[1] += e.screenY * scale; + this.menuCoordinates[0] -= e.screenX / scale; + this.menuCoordinates[1] -= e.screenY / scale; } @computed get renderMenu() { @@ -362,9 +368,10 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { return (
this.props.active(true) && e.stopPropagation()} + onPointerDown={e => this.onHeaderClick(e)} style={{ position: "absolute", background: "white", - transform: `translate(${this.menuCoordinates[0]}px, ${this.menuCoordinates[1] - 100 / scale}px)` + transform: `translate(${this.menuCoordinates[0] * scale}px, ${this.menuCoordinates[1] / scale}px)` }}> { const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); -- cgit v1.2.3-70-g09d2 From 4b68d25cc3718a6b9fffdd60d04707cbcc8fc2b2 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 25 Jun 2020 22:33:50 -0500 Subject: adjusting menu trigger --- .../views/collections/CollectionSchemaHeaders.tsx | 2 +- .../views/collections/CollectionSchemaView.scss | 3 +++ .../views/collections/CollectionSchemaView.tsx | 22 +++++++++++++--------- src/client/views/collections/SchemaTable.tsx | 7 ++++++- 4 files changed, 23 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index aaa2e6096..b84b75172 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -376,7 +376,7 @@ export class KeysDropdown extends React.Component { this.onChange(e.target.value)} onClick={(e) => { - this._inputRef.current!.select(); + //this._inputRef.current!.select(); e.stopPropagation(); }} onFocus={this.onFocus} onBlur={this.onBlur}>
diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index a0bbae88f..a21249c58 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -182,6 +182,9 @@ color: gray; z-index: 10000; overflow-y: visible; + display: flex; + justify-content: space-between; + flex-wrap: wrap; .collectionSchema-header-menu { height: 100%; diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 9cd13058f..900949b94 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -299,20 +299,24 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @action closeHeader = () => { this._headerOpen = false; } + renderKeysDropDown = (col: any) => { + return c.heading)} + canAddNew={true} + addNew={false} + onSelect={this.changeColumns} + setIsEditing={this.setHeaderIsEditing} + />; + } + renderContent = (col: any) => { return (
- c.heading)} - canAddNew={true} - addNew={false} - onSelect={this.changeColumns} - setIsEditing={this.setHeaderIsEditing} - /> + {this.renderKeysDropDown(col)}
{false ? <> : <> diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index 97d4bb303..b9df2fe6b 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -163,15 +163,20 @@ export class SchemaTable extends React.Component { const menuContent =
{col.heading}
; + const header =
this.props.openHeader(col, menuContent, e.clientX, e.clientY)} + //onClick={e => this.props.openHeader(col, menuContent, e.clientX, e.clientY)} style={{ background: col.color, padding: "4px", letterSpacing: "2px", textTransform: "uppercase" }}> {menuContent} +
this.props.openHeader(col, menuContent, e.clientX, e.clientY)} + style={{ float: "right" }}> + +
; return { -- cgit v1.2.3-70-g09d2 From bd6dd6a04edf441a819f6f5bdff3aa03b4298d9a Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Fri, 26 Jun 2020 15:22:31 -0500 Subject: editable text in header --- .../views/collections/CollectionSchemaHeaders.tsx | 12 +++-- .../views/collections/CollectionSchemaView.scss | 5 +- .../views/collections/CollectionSchemaView.tsx | 10 ++-- src/client/views/collections/SchemaTable.tsx | 53 +++++++++++++++++----- 4 files changed, 59 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index b84b75172..8494f3dca 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -285,6 +285,7 @@ export interface KeysDropdownProps { addNew: boolean; onSelect: (oldKey: string, newKey: string, addnew: boolean) => void; setIsEditing: (isEditing: boolean) => void; + width?: string; } @observer export class KeysDropdown extends React.Component { @@ -357,12 +358,13 @@ export class KeysDropdown extends React.Component { this.props.existingKeys.findIndex(key => key.toUpperCase() === this._searchTerm.toUpperCase()) > -1; const options = keyOptions.map(key => { - return
e.stopPropagation()} onClick={() => { this.onSelect(key); this.setSearchTerm(""); }}>{key}
; + return
e.stopPropagation()} onClick={() => { this.onSelect(key); this.setSearchTerm(""); }}>{key}
; }); // if search term does not already exist as a group type, give option to create new group type if (!exactFound && this._searchTerm !== "" && this.props.canAddNew) { - options.push(
{ this.onSelect(this._searchTerm); this.setSearchTerm(""); }}> Create "{this._searchTerm}" key
); } @@ -373,13 +375,15 @@ export class KeysDropdown extends React.Component { render() { return (
- this.onChange(e.target.value)} onClick={(e) => { //this._inputRef.current!.select(); e.stopPropagation(); }} onFocus={this.onFocus} onBlur={this.onBlur}> -
+
{this.renderOptions()}
diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index a21249c58..5608cb7ab 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -266,6 +266,7 @@ button.add-column { .keys-dropdown { position: relative; width: 100%; + background-color: white; input { border: 2px solid $light-color-secondary; @@ -285,9 +286,11 @@ button.add-column { position: absolute; top: 28px; box-shadow: 0 10px 16px rgba(0, 0, 0, 0.1); + background-color: white; .key-option { - background-color: $light-color; + //background-color: $light-color; + background-color: white; border: 1px solid lightgray; padding: 2px 3px; diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 900949b94..a9c599e0e 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -60,7 +60,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } @observable _menuWidth = 0; - @observable _menuContent: any = ""; @observable _headerOpen = false; @observable _isOpen = false; @observable _node: HTMLDivElement | null = null; @@ -288,8 +287,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } @action - openHeader = (col: any, menu: any, screenx: number, screeny: number) => { - this._menuContent = menu; + openHeader = (col: any, screenx: number, screeny: number) => { this._col = col; this._headerOpen = !this._headerOpen; this._pointerX = screenx; @@ -363,8 +361,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { onWheel(e: React.WheelEvent) { const scale = this.props.ScreenToLocalTransform().Scale; this.props.active(true) && e.stopPropagation(); - this.menuCoordinates[0] -= e.screenX / scale; - this.menuCoordinates[1] -= e.screenY / scale; + //this.menuCoordinates[0] -= e.screenX / scale; + //this.menuCoordinates[1] -= e.screenY / scale; } @computed get renderMenu() { @@ -505,6 +503,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { onResizedChange={this.onResizedChange} setColumns={this.setColumns} reorderColumns={this.reorderColumns} + changeColumns={this.changeColumns} + setHeaderIsEditing={this.setHeaderIsEditing} />; } diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index b9df2fe6b..5df0a676e 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -20,12 +20,13 @@ import { COLLECTION_BORDER_WIDTH } from '../../views/globalCssVariables.scss'; import { ContextMenu } from "../ContextMenu"; import '../DocumentDecorations.scss'; import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell, CollectionSchemaImageCell, CollectionSchemaListCell } from "./CollectionSchemaCells"; -import { CollectionSchemaAddColumnHeader } from "./CollectionSchemaHeaders"; +import { CollectionSchemaAddColumnHeader, KeysDropdown } from "./CollectionSchemaHeaders"; import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC"; import "./CollectionSchemaView.scss"; import { CollectionView } from "./CollectionView"; import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; import { emptyFunction, returnZero, returnOne, returnFalse, returnEmptyFilter, emptyPath } from "../../../Utils"; +import { TouchScrollableMenuItem } from "../TouchScrollableMenu"; enum ColumnType { @@ -72,11 +73,13 @@ export interface SchemaTableProps { columns: SchemaHeaderField[]; documentKeys: any[]; headerIsEditing: boolean; - openHeader: (column: any, menu: any, screenx: number, screeny: number) => void; + openHeader: (column: any, screenx: number, screeny: number) => void; onPointerDown: (e: React.PointerEvent) => void; onResizedChange: (newResized: Resize[], event: any) => void; setColumns: (columns: SchemaHeaderField[]) => void; reorderColumns: (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => void; + changeColumns: (oldKey: string, newKey: string, addNew: boolean) => void; + setHeaderIsEditing: (isEditing: boolean) => void; } @observer @@ -91,6 +94,8 @@ export class SchemaTable extends React.Component { @observable _showDataDoc: any = ""; @observable _showDocPos: number[] = []; + @observable _showTitleDropdown: boolean = false; + @computed get previewWidth() { return () => NumCast(this.props.Document.schemaPreviewWidth); } @computed get previewHeight() { return () => this.props.PanelHeight() - 2 * this.borderWidth; } @computed get tableWidth() { return this.props.PanelWidth() - 2 * this.borderWidth - this.DIVIDER_WIDTH - this.previewWidth(); } @@ -126,6 +131,9 @@ export class SchemaTable extends React.Component { }, [] as SortingRule[]); } + @action + changeDropdown = () => { console.log("header clicked"); this._showTitleDropdown = !this._showTitleDropdown; } + @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } @computed get tableColumns(): Column[] { @@ -156,26 +164,48 @@ export class SchemaTable extends React.Component { const cols = this.props.columns.map(col => { + const keysDropdown = c.heading)} + canAddNew={true} + addNew={false} + // i think issue is with these two props + onSelect={this.props.changeColumns} + setIsEditing={this.props.setHeaderIsEditing} + width={"100%"} + />; + const icon: IconProp = this.getColumnType(col) === ColumnType.Number ? "hashtag" : this.getColumnType(col) === ColumnType.String ? "font" : this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : "align-justify"; + const headerText = this._showTitleDropdown ? keysDropdown : col.heading; - - const menuContent =
{col.heading}
; + const menuContent =
+ +
+ {keysDropdown} +
+
; const header = -
this.props.openHeader(col, menuContent, e.clientX, e.clientY)} + className="collectionSchemaView-menuOptions" style={{ - background: col.color, padding: "4px", - letterSpacing: "2px", - textTransform: "uppercase" + background: col.color, padding: "2px", + // letterSpacing: "2px", + // textTransform: "uppercase", + display: "flex" }}> {menuContent} -
this.props.openHeader(col, menuContent, e.clientX, e.clientY)} - style={{ float: "right" }}> - +
this.props.openHeader(col, e.clientX, e.clientY)} + style={{ float: "right", paddingRight: "6px" }}> +
; @@ -342,6 +372,7 @@ export class SchemaTable extends React.Component { this.props.columns.push(new SchemaHeaderField(`New field ${index ? "(" + index + ")" : ""}`, "#f1efeb")); } + @action getColumnType = (column: SchemaHeaderField): ColumnType => { // added functionality to convert old column type stuff to new column type stuff -syip if (column.type && column.type !== 0) { -- cgit v1.2.3-70-g09d2 From fa4612e7dfeaecc09e205c5d6fa37743d23f9298 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sat, 27 Jun 2020 02:37:22 -0500 Subject: moved sorting into header --- .../views/collections/CollectionSchemaHeaders.tsx | 15 +++++-- .../views/collections/CollectionSchemaView.scss | 1 + .../views/collections/CollectionSchemaView.tsx | 1 + src/client/views/collections/SchemaTable.tsx | 51 +++++++++++++++++++--- 4 files changed, 58 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index 8494f3dca..096b45bee 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -358,13 +358,19 @@ export class KeysDropdown extends React.Component { this.props.existingKeys.findIndex(key => key.toUpperCase() === this._searchTerm.toUpperCase()) > -1; const options = keyOptions.map(key => { - return
e.stopPropagation()} onClick={() => { this.onSelect(key); this.setSearchTerm(""); }}>{key}
; }); // if search term does not already exist as a group type, give option to create new group type if (!exactFound && this._searchTerm !== "" && this.props.canAddNew) { - options.push(
{ this.onSelect(this._searchTerm); this.setSearchTerm(""); }}> Create "{this._searchTerm}" key
); } @@ -382,7 +388,10 @@ export class KeysDropdown extends React.Component { //this._inputRef.current!.select(); e.stopPropagation(); }} onFocus={this.onFocus} onBlur={this.onBlur}> -
{this.renderOptions()}
diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index 5608cb7ab..9c5f2e8ac 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -293,6 +293,7 @@ button.add-column { background-color: white; border: 1px solid lightgray; padding: 2px 3px; + overflow-x: hidden; &:not(:first-child) { border-top: 0; diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index a9c599e0e..61581aec1 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -505,6 +505,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { reorderColumns={this.reorderColumns} changeColumns={this.changeColumns} setHeaderIsEditing={this.setHeaderIsEditing} + changeColumnSort={this.setColumnSort} />; } diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index 5df0a676e..5d1dcf199 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -80,6 +80,7 @@ export interface SchemaTableProps { reorderColumns: (toMove: SchemaHeaderField, relativeTo: SchemaHeaderField, before: boolean, columnsValues: SchemaHeaderField[]) => void; changeColumns: (oldKey: string, newKey: string, addNew: boolean) => void; setHeaderIsEditing: (isEditing: boolean) => void; + changeColumnSort: (columnField: SchemaHeaderField, descending: boolean | undefined) => void; } @observer @@ -132,7 +133,22 @@ export class SchemaTable extends React.Component { } @action - changeDropdown = () => { console.log("header clicked"); this._showTitleDropdown = !this._showTitleDropdown; } + changeSorting = (col: any) => { + console.log(col.heading); + if (col.desc === undefined) { + // no sorting + this.props.changeColumnSort(col, true); + } else if (col.desc === true) { + // descending sort + this.props.changeColumnSort(col, false); + } else if (col.desc === false) { + // ascending sort + this.props.changeColumnSort(col, undefined); + } + } + + @action + changeTitleMode = () => { console.log("header clicked"); this._showTitleDropdown = !this._showTitleDropdown; } @computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); } @computed get tableColumns(): Column[] { @@ -180,7 +196,17 @@ export class SchemaTable extends React.Component { this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : "align-justify"; - const headerText = this._showTitleDropdown ? keysDropdown : col.heading; + const headerText = this._showTitleDropdown ? keysDropdown :
+ {col.heading}
; + + const sortIcon = col.desc === undefined ? "circle" : col.desc === true ? "caret-down" : "caret-up"; const menuContent =
{ const header =
this.props.openHeader(col, menuContent, e.clientX, e.clientY)} - className="collectionSchemaView-menuOptions" + className="collectionSchemaView-menuOptions-wrapper" style={{ background: col.color, padding: "2px", - // letterSpacing: "2px", - // textTransform: "uppercase", display: "flex" }}> - {menuContent} + +
+
+
+ {keysDropdown} +
+ +
this.changeSorting(col)} + style={{ paddingRight: "6px" }}> + +
this.props.openHeader(col, e.clientX, e.clientY)} style={{ float: "right", paddingRight: "6px" }}> - +
; -- cgit v1.2.3-70-g09d2 From e5385f9421b23d4119ac8704c9d127f1f296ac54 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 28 Jun 2020 01:53:35 -0500 Subject: partial dropdown for types --- .../views/collections/CollectionSchemaHeaders.tsx | 8 +- .../views/collections/CollectionSchemaView.scss | 4 +- .../views/collections/CollectionSchemaView.tsx | 157 ++++++++++++++++----- src/client/views/collections/SchemaTable.tsx | 22 +-- 4 files changed, 135 insertions(+), 56 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index 096b45bee..80c265ba6 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -360,7 +360,7 @@ export class KeysDropdown extends React.Component { const options = keyOptions.map(key => { return
e.stopPropagation()} onClick={() => { this.onSelect(key); this.setSearchTerm(""); }}>{key}
; }); @@ -369,7 +369,7 @@ export class KeysDropdown extends React.Component { if (!exactFound && this._searchTerm !== "" && this.props.canAddNew) { options.push(
{ this.onSelect(this._searchTerm); this.setSearchTerm(""); }}> Create "{this._searchTerm}" key
); @@ -380,8 +380,8 @@ export class KeysDropdown extends React.Component { render() { return ( -
- + this.onChange(e.target.value)} onClick={(e) => { diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index 9c5f2e8ac..2926a8f6f 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -265,7 +265,7 @@ button.add-column { .keys-dropdown { position: relative; - width: 100%; + //width: 100%; background-color: white; input { @@ -273,6 +273,8 @@ button.add-column { padding: 3px; height: 28px; font-weight: bold; + letter-spacing: "2px"; + text-transform: "uppercase"; &:focus { font-weight: normal; diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 61581aec1..bfd5fa96f 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -24,6 +24,7 @@ import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse } import { SnappingManager } from "../../util/SnappingManager"; import Measure from "react-measure"; import { SchemaTable } from "./SchemaTable"; +import { civicinfo } from "googleapis/build/src/apis/civicinfo"; library.add(faCog, faPlus, faSortUp, faSortDown); library.add(faTable); @@ -68,6 +69,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @observable _menuHeight = 0; @observable _pointerX = 0; @observable _pointerY = 0; + @observable _openTypes: boolean = false; @computed get menuCoordinates() { const x = Math.max(0, Math.min(document.body.clientWidth - this._menuWidth, this._pointerX)); const y = Math.max(0, Math.min(document.body.clientHeight - this._menuHeight, this._pointerY)); @@ -123,7 +125,9 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.setHeaderIsEditing(this._isOpen); } + @action changeColumnType = (type: ColumnType, col: any): void => { + this._openTypes = false; this.setColumnType(col, type); } @@ -175,43 +179,74 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { node && (this._node = node); } + @action + typesDropdownChange = (bool: boolean) => { + this._openTypes = bool; + } + + @action renderTypes = (col: any) => { if (columnTypes.get(col.heading)) return (null); const type = col.type; + + const anyType =
this.changeColumnType(ColumnType.Any, col)}> + + Any +
; + + const numType =
this.changeColumnType(ColumnType.Number, col)}> + + Number +
; + + const textType =
this.changeColumnType(ColumnType.String, col)}> + + Text +
; + + const boolType =
this.changeColumnType(ColumnType.Boolean, col)}> + + Checkbox +
; + + const listType =
this.changeColumnType(ColumnType.List, col)}> + + List +
; + + const docType =
this.changeColumnType(ColumnType.Doc, col)}> + + Document +
; + + const imageType =
this.changeColumnType(ColumnType.Image, col)}> + + Image +
; + + + const allColumnTypes =
+ {anyType} + {numType} + {textType} + {boolType} + {listType} + {docType} + {imageType} +
; + + const justColType = type === ColumnType.Any ? anyType : type === ColumnType.Number ? numType : + type === ColumnType.String ? textType : type === ColumnType.Boolean ? boolType : + type === ColumnType.List ? listType : type === ColumnType.Doc ? docType : imageType; + return (
- -
-
this.changeColumnType(ColumnType.Any, col)}> - - Any -
-
this.changeColumnType(ColumnType.Number, col)}> - - Number -
-
this.changeColumnType(ColumnType.String, col)}> - - Text -
-
this.changeColumnType(ColumnType.Boolean, col)}> - - Checkbox -
-
this.changeColumnType(ColumnType.List, col)}> - - List -
-
this.changeColumnType(ColumnType.Doc, col)}> - - Document -
-
this.changeColumnType(ColumnType.Image, col)}> - - Image -
+
this.typesDropdownChange(!this._openTypes)}> + +
+ {this._openTypes ? allColumnTypes : justColType}
); } @@ -288,6 +323,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { @action openHeader = (col: any, screenx: number, screeny: number) => { + console.log("header opening"); this._col = col; this._headerOpen = !this._headerOpen; this._pointerX = screenx; @@ -309,6 +345,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { />; } + @action renderContent = (col: any) => { return (
@@ -365,7 +402,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { //this.menuCoordinates[1] -= e.screenY / scale; } - @computed get renderMenu() { + @action renderMenu() { const scale = this.props.ScreenToLocalTransform().Scale; return (
doc) { const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); this._menuWidth = dim[0]; this._menuHeight = dim[1]; })}> - {({ measureRef }) =>
{this.renderContent(this._col)}
} + {({ measureRef }) =>
+
+
+ + {this.renderKeysDropDown(this._col)} +
+ {false ? <> : + <> + {this.renderTypes(this._col)} + {this.renderSorting(this._col)} + {this.renderColors(this._col)} +
+ +
+ + } +
+ +
}
); @@ -559,6 +615,41 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } render() { + const scale = this.props.ScreenToLocalTransform().Scale; + const menu =
this.props.active(true) && e.stopPropagation()} + onPointerDown={e => this.onHeaderClick(e)} + style={{ + position: "absolute", background: "white", + transform: `translate(${this.menuCoordinates[0] * scale}px, ${this.menuCoordinates[1] / scale}px)` + }}> + { + const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); + this._menuWidth = dim[0]; this._menuHeight = dim[1]; + })}> + {({ measureRef }) =>
+
+
+ + {this.renderKeysDropDown(this._col)} +
+ {false ? <> : + <> + {this.renderTypes(this._col)} + {this.renderSorting(this._col)} + {this.renderColors(this._col)} +
+ +
+ + } +
+ +
} +
+
; + return
doc) {
{this.dividerDragger} {!this.previewWidth() ? (null) : this.previewPanel} - {this._headerOpen ? this.renderMenu : null} + {this._headerOpen ? menu : null}
; } } \ No newline at end of file diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index 5d1dcf199..176091661 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -186,9 +186,10 @@ export class SchemaTable extends React.Component { existingKeys={this.props.columns.map(c => c.heading)} canAddNew={true} addNew={false} - // i think issue is with these two props onSelect={this.props.changeColumns} setIsEditing={this.props.setHeaderIsEditing} + + // try commenting this out width={"100%"} />; @@ -208,16 +209,6 @@ export class SchemaTable extends React.Component { const sortIcon = col.desc === undefined ? "circle" : col.desc === true ? "caret-down" : "caret-up"; - const menuContent =
- -
- {keysDropdown} -
-
; - const header =
this.props.openHeader(col, menuContent, e.clientX, e.clientY)} @@ -226,18 +217,13 @@ export class SchemaTable extends React.Component { background: col.color, padding: "2px", display: "flex" }}> - -
-
+
{keysDropdown}
-
this.changeSorting(col)} - style={{ paddingRight: "6px" }}> + style={{ paddingRight: "6px", display: "inline" }}>
this.props.openHeader(col, e.clientX, e.clientY)} -- cgit v1.2.3-70-g09d2 From af7b4994fa97a2aee0a2e90b30d21d4b030bd2b7 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 28 Jun 2020 01:54:55 -0500 Subject: merge fix --- src/client/views/EditableView.tsx | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src') diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index a4f2f17fc..628db366f 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -182,39 +182,11 @@ export class EditableView extends React.Component { } render() { if (this._editing && this.props.GetValue() !== undefined) { -<<<<<<< HEAD - return this.props.autosuggestProps - ? this.finalizeEdit(e.currentTarget.value, false, true), - onPointerDown: this.stopPropagation, - onClick: this.stopPropagation, - onPointerUp: this.stopPropagation, - value: this.props.autosuggestProps.value, - onChange: this.props.autosuggestProps.onChange - }} - /> - : - this.finalizeEdit(e.currentTarget.value, false, true)} - onPointerDown={this.stopPropagation} onClick={this.stopPropagation} onPointerUp={this.stopPropagation} - style={{ display: this.props.display, fontSize: this.props.fontSize }} - placeholder={this.props.placeholder} - />; -======= return this.props.sizeToContent ?
{this.props.GetValue()}
{this.renderEditor()}
: this.renderEditor(); ->>>>>>> 790cc785a5cad47f0dd274c7f4773eff7d7d9c2e } else { this.props.autosuggestProps?.resetValue(); return (this.props.contents instanceof ObjectField ? (null) : -- cgit v1.2.3-70-g09d2 From fd613140e169912f44966fdc6f25fafd85bae7a1 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 28 Jun 2020 02:31:02 -0500 Subject: started adding date types --- package-lock.json | 2154 +------------------- package.json | 2 + .../views/collections/CollectionSchemaCells.tsx | 49 +- .../views/collections/CollectionSchemaHeaders.tsx | 11 +- .../views/collections/CollectionSchemaView.tsx | 12 +- src/client/views/collections/SchemaTable.tsx | 9 +- 6 files changed, 151 insertions(+), 2086 deletions(-) (limited to 'src') diff --git a/package-lock.json b/package-lock.json index 8db732a8e..6c364530b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1004,6 +1004,17 @@ "@types/reactcss": "*" } }, + "@types/react-datepicker": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-3.0.2.tgz", + "integrity": "sha512-xW04NZRF+9ZnzOD3XrlIzBEKgUsN6LVgZJJsXH8NIUlVjyPh+sdtLPfVoDp+GQzGq1M0TuMLNZsv0sJ3N9XwDA==", + "dev": true, + "requires": { + "@types/react": "*", + "date-fns": "^2.0.1", + "popper.js": "^1.14.1" + } + }, "@types/react-dom": { "version": "16.9.8", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.8.tgz", @@ -4368,6 +4379,11 @@ "whatwg-url": "^7.0.0" } }, + "date-fns": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.14.0.tgz", + "integrity": "sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw==" + }, "dateformat": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", @@ -4429,7 +4445,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, "requires": { "is-arguments": "^1.0.4", "is-date-object": "^1.0.1", @@ -7380,8 +7395,7 @@ "is-arguments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" }, "is-arrayish": { "version": "0.2.1", @@ -9345,12 +9359,7 @@ "dependencies": { "JSONStream": { "version": "1.3.5", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "jsonparse": "^1.2.0", "through": ">=2.2.7 <3" @@ -9358,45 +9367,25 @@ }, "abbrev": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", -======= "bundled": true }, "agent-base": { "version": "4.3.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "es6-promisify": "^5.0.0" } }, "agentkeepalive": { "version": "3.5.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "humanize-ms": "^1.2.1" } }, "ajv": { "version": "5.5.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "co": "^4.6.0", "fast-deep-equal": "^1.0.0", @@ -9406,63 +9395,24 @@ }, "ansi-align": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "string-width": "^2.0.0" } }, "ansi-regex": { "version": "2.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", -======= "bundled": true }, "ansi-styles": { "version": "3.2.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "color-convert": "^1.9.0" } }, "ansicolors": { "version": "0.3.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", - "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=" - }, - "ansistyles": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", - "integrity": "sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=" - }, - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" - }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", -======= "bundled": true }, "ansistyles": { @@ -9480,7 +9430,6 @@ "are-we-there-yet": { "version": "1.1.4", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" @@ -9488,12 +9437,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -9506,12 +9450,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -9520,56 +9459,17 @@ }, "asap": { "version": "2.0.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", -======= "bundled": true }, "asn1": { "version": "0.2.4", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safer-buffer": "~2.1.0" } }, "assert-plus": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", -======= "bundled": true }, "asynckit": { @@ -9591,7 +9491,6 @@ "bcrypt-pbkdf": { "version": "1.0.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "optional": true, "requires": { "tweetnacl": "^0.14.3" @@ -9599,12 +9498,7 @@ }, "bin-links": { "version": "1.1.7", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.7.tgz", - "integrity": "sha512-/eaLaTu7G7/o7PV04QPy1HRT65zf+1tFkPGv0sPTV0tRwufooYBQO3zrcyGgm+ja+ZtBf2GEuKjDRJ2pPG+yqA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "bluebird": "^3.5.3", "cmd-shim": "^3.0.0", @@ -9616,21 +9510,11 @@ }, "bluebird": { "version": "3.5.5", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", - "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==" - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", -======= "bundled": true }, "boxen": { "version": "1.3.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ansi-align": "^2.0.0", "camelcase": "^4.0.0", @@ -9643,12 +9527,7 @@ }, "brace-expansion": { "version": "1.1.11", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -9656,30 +9535,6 @@ }, "buffer-from": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==" - }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=" - }, - "byline": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", - "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=" - }, - "byte-size": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-5.0.1.tgz", - "integrity": "sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw==" - }, - "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", -======= "bundled": true }, "builtins": { @@ -9697,7 +9552,6 @@ "cacache": { "version": "12.0.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "bluebird": "^3.5.5", "chownr": "^1.1.1", @@ -9718,30 +9572,6 @@ }, "call-limit": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/call-limit/-/call-limit-1.1.1.tgz", - "integrity": "sha512-5twvci5b9eRBw2wCfPtN0GmlR2/gadZqyFpPhOK6CvMFoFgA+USnZ6Jpu1lhG9h85pQ3Ouil3PfXWRD4EUaRiQ==" - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=" - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", -======= "bundled": true }, "camelcase": { @@ -9759,7 +9589,6 @@ "chalk": { "version": "2.4.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -9772,42 +9601,22 @@ }, "ci-info": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" - }, - "cidr-regex": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-2.0.10.tgz", - "integrity": "sha512-sB3ogMQXWvreNPbJUZMRApxuRYd+KoIo4RGQ81VatjmMW6WJPo+IJZ2846FGItr9VzKo5w7DXzijPLGtSd0N3Q==", -======= "bundled": true }, "cidr-regex": { "version": "2.0.10", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ip-regex": "^2.1.0" } }, "cli-boxes": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=" - }, - "cli-columns": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cli-columns/-/cli-columns-3.1.2.tgz", - "integrity": "sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4=", -======= "bundled": true }, "cli-columns": { "version": "3.1.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "string-width": "^2.0.0", "strip-ansi": "^3.0.1" @@ -9815,12 +9624,7 @@ }, "cli-table3": { "version": "0.5.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "colors": "^1.1.2", "object-assign": "^4.1.0", @@ -9829,12 +9633,7 @@ }, "cliui": { "version": "4.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "string-width": "^2.1.1", "strip-ansi": "^4.0.0", @@ -9843,21 +9642,11 @@ "dependencies": { "ansi-regex": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", -======= "bundled": true }, "strip-ansi": { "version": "4.0.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ansi-regex": "^3.0.0" } @@ -9866,21 +9655,11 @@ }, "clone": { "version": "1.0.4", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" - }, - "cmd-shim": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-3.0.3.tgz", - "integrity": "sha512-DtGg+0xiFhQIntSBRzL2fRQBnmtAVwXIDo4Qq46HPpObYquxMaZS4sb82U9nH91qJrlosC1wa9gwr0QyL/HypA==", -======= "bundled": true }, "cmd-shim": { "version": "3.0.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "graceful-fs": "^4.1.2", "mkdirp": "~0.5.0" @@ -9888,20 +9667,6 @@ }, "co": { "version": "4.6.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", -======= "bundled": true }, "code-point-at": { @@ -9911,38 +9676,22 @@ "color-convert": { "version": "1.9.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "color-name": "^1.1.1" } }, "color-name": { "version": "1.1.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "colors": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", - "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", -======= "bundled": true }, "colors": { "version": "1.3.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "optional": true }, "columnify": { "version": "1.5.4", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", - "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "strip-ansi": "^3.0.0", "wcwidth": "^1.0.0" @@ -9950,33 +9699,18 @@ }, "combined-stream": { "version": "1.0.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "delayed-stream": "~1.0.0" } }, "concat-map": { "version": "0.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", -======= "bundled": true }, "concat-stream": { "version": "1.6.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -9986,12 +9720,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -10004,12 +9733,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -10018,12 +9742,7 @@ }, "config-chain": { "version": "1.1.12", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", - "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ini": "^1.3.4", "proto-list": "~1.2.1" @@ -10031,12 +9750,7 @@ }, "configstore": { "version": "3.1.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "dot-prop": "^4.1.0", "graceful-fs": "^4.1.2", @@ -10048,21 +9762,11 @@ }, "console-control-strings": { "version": "1.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", -======= "bundled": true }, "copy-concurrently": { "version": "1.0.5", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^1.1.1", "fs-write-stream-atomic": "^1.0.8", @@ -10074,53 +9778,28 @@ "dependencies": { "aproba": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" -======= "bundled": true }, "iferr": { "version": "0.1.5", "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "core-util-is": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", -======= "bundled": true }, "create-error-class": { "version": "3.0.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "capture-stack-trace": "^1.0.0" } }, "cross-spawn": { "version": "5.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", @@ -10129,12 +9808,7 @@ "dependencies": { "lru-cache": { "version": "4.1.5", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" @@ -10142,31 +9816,12 @@ }, "yallist": { "version": "2.1.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "crypto-random-string": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", -======= "bundled": true }, "cyclist": { @@ -10176,50 +9831,25 @@ "dashdash": { "version": "1.14.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "assert-plus": "^1.0.0" } }, "debug": { "version": "3.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ms": "2.0.0" }, "dependencies": { "ms": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "debuglog": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=" - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" -======= "bundled": true }, "decamelize": { @@ -10229,7 +9859,6 @@ "decode-uri-component": { "version": "0.2.0", "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 }, "deep-extend": { "version": "0.6.0", @@ -10237,54 +9866,20 @@ }, "defaults": { "version": "1.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "clone": "^1.0.2" } }, "define-properties": { "version": "1.1.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "object-keys": "^1.0.12" } }, "delayed-stream": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=" - }, - "detect-newline": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=" - }, - "dezalgo": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", -======= "bundled": true }, "delegates": { @@ -10302,7 +9897,6 @@ "dezalgo": { "version": "1.0.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "asap": "^2.0.0", "wrappy": "1" @@ -10310,32 +9904,13 @@ }, "dot-prop": { "version": "4.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "is-obj": "^1.0.0" } }, "dotenv": { "version": "5.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz", - "integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==" - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", -======= "bundled": true }, "duplexer3": { @@ -10345,7 +9920,6 @@ "duplexify": { "version": "3.6.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "end-of-stream": "^1.0.0", "inherits": "^2.0.1", @@ -10355,12 +9929,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -10373,12 +9942,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -10387,12 +9951,7 @@ }, "ecc-jsbn": { "version": "0.1.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "optional": true, "requires": { "jsbn": "~0.1.0", @@ -10401,53 +9960,24 @@ }, "editor": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", - "integrity": "sha1-YMf4e9YrzGqJT6jM1q+3gjok90I=" - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", -======= "bundled": true }, "encoding": { "version": "0.1.12", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "iconv-lite": "~0.4.13" } }, "end-of-stream": { "version": "1.4.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "once": "^1.4.0" } }, "env-paths": { "version": "2.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", - "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" - }, - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", -======= "bundled": true }, "err-code": { @@ -10457,19 +9987,13 @@ "errno": { "version": "0.1.7", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "prr": "~1.0.1" } }, "es-abstract": { "version": "1.12.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "es-to-primitive": "^1.1.1", "function-bind": "^1.1.1", @@ -10480,12 +10004,7 @@ }, "es-to-primitive": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -10494,42 +10013,22 @@ }, "es6-promise": { "version": "4.2.8", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", -======= "bundled": true }, "es6-promisify": { "version": "5.0.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "es6-promise": "^4.0.3" } }, "escape-string-regexp": { "version": "1.0.5", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", -======= "bundled": true }, "execa": { "version": "0.7.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "cross-spawn": "^5.0.1", "get-stream": "^3.0.0", @@ -10542,51 +10041,12 @@ "dependencies": { "get-stream": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "extend": { "version": "3.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==" - }, - "find-npm-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz", - "integrity": "sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA==" - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", -======= "bundled": true }, "extsprintf": { @@ -10612,19 +10072,13 @@ "find-up": { "version": "2.1.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "locate-path": "^2.0.0" } }, "flush-write-stream": { "version": "1.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.4" @@ -10632,12 +10086,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -10650,12 +10099,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -10664,21 +10108,11 @@ }, "forever-agent": { "version": "0.6.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", -======= "bundled": true }, "form-data": { "version": "2.3.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "asynckit": "^0.4.0", "combined-stream": "1.0.6", @@ -10687,12 +10121,7 @@ }, "from2": { "version": "2.3.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" @@ -10700,12 +10129,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -10718,12 +10142,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -10732,24 +10151,14 @@ }, "fs-minipass": { "version": "1.2.7", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "minipass": "^2.6.0" }, "dependencies": { "minipass": { "version": "2.9.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -10759,12 +10168,7 @@ }, "fs-vacuum": { "version": "1.2.10", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.10.tgz", - "integrity": "sha1-t2Kb7AekAxolSP35n17PHMizHjY=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "graceful-fs": "^4.1.2", "path-is-inside": "^1.0.1", @@ -10773,12 +10177,7 @@ }, "fs-write-stream-atomic": { "version": "1.0.10", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "graceful-fs": "^4.1.2", "iferr": "^0.1.5", @@ -10788,21 +10187,11 @@ "dependencies": { "iferr": { "version": "0.1.5", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true }, "readable-stream": { "version": "2.3.6", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -10815,12 +10204,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -10829,20 +10213,6 @@ }, "fs.realpath": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", -======= "bundled": true }, "function-bind": { @@ -10852,7 +10222,6 @@ "gauge": { "version": "2.7.4", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -10866,21 +10235,11 @@ "dependencies": { "aproba": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", -======= "bundled": true }, "string-width": { "version": "1.0.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -10891,21 +10250,11 @@ }, "genfun": { "version": "5.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", - "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==" - }, - "gentle-fs": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.0.tgz", - "integrity": "sha512-3k2CgAmPxuz7S6nKK+AqFE2AdM1QuwqKLPKzIET3VRwK++3q96MsNFobScDjlCrq97ZJ8y5R725MOlm6ffUCjg==", -======= "bundled": true }, "gentle-fs": { "version": "2.3.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^1.1.2", "chownr": "^1.1.2", @@ -10922,53 +10271,28 @@ "dependencies": { "aproba": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" -======= "bundled": true }, "iferr": { "version": "0.1.5", "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "get-caller-file": { "version": "1.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", -======= "bundled": true }, "get-stream": { "version": "4.1.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "pump": "^3.0.0" } }, "getpass": { "version": "0.1.7", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "assert-plus": "^1.0.0" } @@ -10987,24 +10311,14 @@ }, "global-dirs": { "version": "0.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ini": "^1.3.4" } }, "got": { "version": "6.7.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "create-error-class": "^3.0.0", "duplexer3": "^0.1.4", @@ -11021,12 +10335,7 @@ "dependencies": { "get-stream": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, @@ -11036,21 +10345,11 @@ }, "har-schema": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", -======= "bundled": true }, "har-validator": { "version": "5.1.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ajv": "^5.3.0", "har-schema": "^2.0.0" @@ -11058,32 +10357,13 @@ }, "has": { "version": "1.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "function-bind": "^1.1.1" } }, "has-flag": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" -======= "bundled": true }, "has-symbols": { @@ -11093,7 +10373,6 @@ "has-unicode": { "version": "2.0.1", "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 }, "hosted-git-info": { "version": "2.8.8", @@ -11101,21 +10380,11 @@ }, "http-cache-semantics": { "version": "3.8.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" - }, - "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", -======= "bundled": true }, "http-proxy-agent": { "version": "2.1.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "agent-base": "4", "debug": "3.1.0" @@ -11123,12 +10392,7 @@ }, "http-signature": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -11137,12 +10401,7 @@ }, "https-proxy-agent": { "version": "2.2.4", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "agent-base": "^4.3.0", "debug": "^3.1.0" @@ -11150,70 +10409,31 @@ }, "humanize-ms": { "version": "1.2.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ms": "^2.0.0" } }, "iconv-lite": { "version": "0.4.23", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, "iferr": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/iferr/-/iferr-1.0.2.tgz", - "integrity": "sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg==" - }, - "ignore-walk": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", - "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", -======= "bundled": true }, "ignore-walk": { "version": "3.0.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "minimatch": "^3.0.4" } }, "import-lazy": { "version": "2.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", -======= "bundled": true }, "imurmurhash": { @@ -11227,7 +10447,6 @@ "inflight": { "version": "1.0.6", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "once": "^1.3.0", "wrappy": "1" @@ -11235,20 +10454,6 @@ }, "inherits": { "version": "2.0.4", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "init-package-json": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.3.tgz", - "integrity": "sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==", -======= "bundled": true }, "ini": { @@ -11258,7 +10463,6 @@ "init-package-json": { "version": "1.10.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "glob": "^7.1.1", "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", @@ -11272,25 +10476,6 @@ }, "invert-kv": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" -======= "bundled": true }, "ip": { @@ -11304,7 +10489,6 @@ "is-callable": { "version": "1.1.4", "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 }, "is-ci": { "version": "1.2.1", @@ -11315,56 +10499,31 @@ "dependencies": { "ci-info": { "version": "1.6.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "is-cidr": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-3.0.0.tgz", - "integrity": "sha512-8Xnnbjsb0x462VoYiGlhEi+drY8SFwrHiSYuzc/CEwco55vkehTaxAyIjEdpi3EMvLPPJAJi9FlzP+h+03gp0Q==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "cidr-regex": "^2.0.10" } }, "is-date-object": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", -======= "bundled": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "number-is-nan": "^1.0.0" } }, "is-installed-globally": { "version": "0.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "global-dirs": "^0.1.0", "is-path-inside": "^1.0.0" @@ -11372,20 +10531,6 @@ }, "is-npm": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=" - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", -======= "bundled": true }, "is-obj": { @@ -11395,28 +10540,17 @@ "is-path-inside": { "version": "1.0.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "path-is-inside": "^1.0.1" } }, "is-redirect": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", -======= "bundled": true }, "is-regex": { "version": "1.0.4", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "has": "^1.0.1" } @@ -11427,51 +10561,17 @@ }, "is-stream": { "version": "1.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", -======= "bundled": true }, "is-symbol": { "version": "1.0.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "has-symbols": "^1.0.0" } }, "is-typedarray": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", -======= "bundled": true }, "isarray": { @@ -11489,40 +10589,10 @@ "jsbn": { "version": "0.1.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "optional": true }, "json-parse-better-errors": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", -======= "bundled": true }, "json-schema": { @@ -11544,7 +10614,6 @@ "jsprim": { "version": "1.4.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -11554,45 +10623,25 @@ }, "latest-version": { "version": "3.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "package-json": "^4.0.0" } }, "lazy-property": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/lazy-property/-/lazy-property-1.0.0.tgz", - "integrity": "sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc=" - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", -======= "bundled": true }, "lcid": { "version": "2.0.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "invert-kv": "^2.0.0" } }, "libcipm": { "version": "4.0.7", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libcipm/-/libcipm-4.0.7.tgz", - "integrity": "sha512-fTq33otU3PNXxxCTCYCYe7V96o59v/o7bvtspmbORXpgFk+wcWrGf5x6tBgui5gCed/45/wtPomBsZBYm5KbIw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "bin-links": "^1.1.2", "bluebird": "^3.5.1", @@ -11613,12 +10662,7 @@ }, "libnpm": { "version": "3.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpm/-/libnpm-3.0.1.tgz", - "integrity": "sha512-d7jU5ZcMiTfBqTUJVZ3xid44fE5ERBm9vBnmhp2ECD2Ls+FNXWxHSkO7gtvrnbLO78gwPdNPz1HpsF3W4rjkBQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "bin-links": "^1.1.2", "bluebird": "^3.5.3", @@ -11644,12 +10688,7 @@ }, "libnpmaccess": { "version": "3.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.2.tgz", - "integrity": "sha512-01512AK7MqByrI2mfC7h5j8N9V4I7MHJuk9buo8Gv+5QgThpOgpjB7sQBDDkeZqRteFb1QM/6YNdHfG7cDvfAQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^2.0.0", "get-stream": "^4.0.0", @@ -11659,12 +10698,7 @@ }, "libnpmconfig": { "version": "1.2.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", - "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "figgy-pudding": "^3.5.1", "find-up": "^3.0.0", @@ -11673,24 +10707,14 @@ "dependencies": { "find-up": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "locate-path": "^3.0.0" } }, "locate-path": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -11698,47 +10722,27 @@ }, "p-limit": { "version": "2.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "p-try": "^2.0.0" } }, "p-locate": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "p-limit": "^2.0.0" } }, "p-try": { "version": "2.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "libnpmhook": { "version": "5.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.3.tgz", - "integrity": "sha512-UdNLMuefVZra/wbnBXECZPefHMGsVDTq5zaM/LgKNE9Keyl5YXQTnGAzEo+nFOpdRqTWI9LYi4ApqF9uVCCtuA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^2.0.0", "figgy-pudding": "^3.4.1", @@ -11748,12 +10752,7 @@ }, "libnpmorg": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpmorg/-/libnpmorg-1.0.1.tgz", - "integrity": "sha512-0sRUXLh+PLBgZmARvthhYXQAWn0fOsa6T5l3JSe2n9vKG/lCVK4nuG7pDsa7uMq+uTt2epdPK+a2g6btcY11Ww==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^2.0.0", "figgy-pudding": "^3.4.1", @@ -11763,12 +10762,7 @@ }, "libnpmpublish": { "version": "1.1.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-1.1.2.tgz", - "integrity": "sha512-2yIwaXrhTTcF7bkJKIKmaCV9wZOALf/gsTDxVSu/Gu/6wiG3fA8ce8YKstiWKTxSFNC0R7isPUb6tXTVFZHt2g==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^2.0.0", "figgy-pudding": "^3.5.1", @@ -11783,12 +10777,7 @@ }, "libnpmsearch": { "version": "2.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-2.0.2.tgz", - "integrity": "sha512-VTBbV55Q6fRzTdzziYCr64+f8AopQ1YZ+BdPOv16UegIEaE8C0Kch01wo4s3kRTFV64P121WZJwgmBwrq68zYg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "figgy-pudding": "^3.5.1", "get-stream": "^4.0.0", @@ -11797,12 +10786,7 @@ }, "libnpmteam": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpmteam/-/libnpmteam-1.0.2.tgz", - "integrity": "sha512-p420vM28Us04NAcg1rzgGW63LMM6rwe+6rtZpfDxCcXxM0zUTLl7nPFEnRF3JfFBF5skF/yuZDUthTsHgde8QA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^2.0.0", "figgy-pudding": "^3.4.1", @@ -11812,12 +10796,7 @@ }, "libnpx": { "version": "10.2.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.2.tgz", - "integrity": "sha512-ujaYToga1SAX5r7FU5ShMFi88CWpY75meNZtr6RtEyv4l2ZK3+Wgvxq2IqlwWBiDZOqhumdeiocPS1aKrCMe3A==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "dotenv": "^5.0.1", "npm-package-arg": "^6.0.0", @@ -11831,12 +10810,7 @@ }, "locate-path": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -11844,12 +10818,7 @@ }, "lock-verify": { "version": "2.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/lock-verify/-/lock-verify-2.1.0.tgz", - "integrity": "sha512-vcLpxnGvrqisKvLQ2C2v0/u7LVly17ak2YSgoK4PrdsYBXQIax19vhKiLfvKNFx7FRrpTnitrpzF/uuCMuorIg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "npm-package-arg": "^6.1.0", "semver": "^5.4.1" @@ -11857,33 +10826,18 @@ }, "lockfile": { "version": "1.0.4", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.4.tgz", - "integrity": "sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "signal-exit": "^3.0.2" } }, "lodash._baseindexof": { "version": "3.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz", - "integrity": "sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=" - }, - "lodash._baseuniq": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz", - "integrity": "sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg=", -======= "bundled": true }, "lodash._baseuniq": { "version": "4.6.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "lodash._createset": "~4.0.0", "lodash._root": "~3.0.0" @@ -11891,20 +10845,6 @@ }, "lodash._bindcallback": { "version": "3.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", - "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=" - }, - "lodash._cacheindexof": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz", - "integrity": "sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=" - }, - "lodash._createcache": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz", - "integrity": "sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=", -======= "bundled": true }, "lodash._cacheindexof": { @@ -11914,62 +10854,12 @@ "lodash._createcache": { "version": "3.1.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "lodash._getnative": "^3.0.0" } }, "lodash._createset": { "version": "4.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.3.tgz", - "integrity": "sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=" - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" - }, - "lodash.union": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" - }, - "lodash.without": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.without/-/lodash.without-4.4.0.tgz", - "integrity": "sha1-PNRXSgC2e643OpS3SHcmQFB7eqw=" - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", -======= "bundled": true }, "lodash._getnative": { @@ -12007,31 +10897,20 @@ "lru-cache": { "version": "5.1.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "yallist": "^3.0.2" } }, "make-dir": { "version": "1.3.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "pify": "^3.0.0" } }, "make-fetch-happen": { "version": "5.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", - "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "agentkeepalive": "^3.4.1", "cacache": "^12.0.0", @@ -12048,33 +10927,18 @@ }, "map-age-cleaner": { "version": "0.1.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "p-defer": "^1.0.0" } }, "meant": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/meant/-/meant-1.0.1.tgz", - "integrity": "sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg==" - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", -======= "bundled": true }, "mem": { "version": "4.3.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", @@ -12083,68 +10947,38 @@ "dependencies": { "mimic-fn": { "version": "2.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "mime-db": { "version": "1.35.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" - }, - "mime-types": { - "version": "2.1.19", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", - "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", -======= "bundled": true }, "mime-types": { "version": "2.1.19", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "mime-db": "~1.35.0" } }, "minimatch": { "version": "3.0.4", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "brace-expansion": "^1.1.7" } }, "minizlib": { "version": "1.3.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "minipass": "^2.9.0" }, "dependencies": { "minipass": { "version": "2.9.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -12154,12 +10988,7 @@ }, "mississippi": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "concat-stream": "^1.5.0", "duplexify": "^3.4.2", @@ -12174,14 +11003,8 @@ } }, "mkdirp": { -<<<<<<< HEAD - "version": "0.5.4", - "resolved": false, - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", -======= "version": "0.5.5", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "minimist": "^1.2.5" }, @@ -12194,12 +11017,7 @@ }, "move-concurrently": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^1.1.1", "copy-concurrently": "^1.0.0", @@ -12211,36 +11029,12 @@ "dependencies": { "aproba": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "ms": { "version": "2.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" - }, - "node-fetch-npm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", - "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", -======= "bundled": true }, "mute-stream": { @@ -12254,7 +11048,6 @@ "node-fetch-npm": { "version": "2.0.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "encoding": "^0.1.11", "json-parse-better-errors": "^1.0.0", @@ -12288,12 +11081,7 @@ }, "normalize-package-data": { "version": "2.5.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -12303,12 +11091,7 @@ "dependencies": { "resolve": { "version": "1.10.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "path-parse": "^1.0.6" } @@ -12317,12 +11100,7 @@ }, "npm-audit-report": { "version": "1.3.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.2.tgz", - "integrity": "sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "cli-table3": "^0.5.0", "console-control-strings": "^1.1.0" @@ -12330,45 +11108,25 @@ }, "npm-bundled": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", - "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "npm-normalize-package-bin": "^1.0.1" } }, "npm-cache-filename": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz", - "integrity": "sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE=" - }, - "npm-install-checks": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-3.0.2.tgz", - "integrity": "sha512-E4kzkyZDIWoin6uT5howP8VDvkM+E8IQDcHAycaAxMbwkqhIg5eEYALnXOl3Hq9MrkdQB/2/g1xwBINXdKSRkg==", -======= "bundled": true }, "npm-install-checks": { "version": "3.0.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "semver": "^2.3.0 || 3.x || 4 || 5" } }, "npm-lifecycle": { "version": "3.1.4", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz", - "integrity": "sha512-tgs1PaucZwkxECGKhC/stbEgFyc3TGh2TJcg2CDr6jbvQRdteHNhmMeljRzpe4wgFAXQADoy1cSqqi7mtiAa5A==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "byline": "^5.0.0", "graceful-fs": "^4.1.15", @@ -12382,20 +11140,6 @@ }, "npm-logical-tree": { "version": "1.2.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz", - "integrity": "sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg==" - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" - }, - "npm-package-arg": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", -======= "bundled": true }, "npm-normalize-package-bin": { @@ -12405,7 +11149,6 @@ "npm-package-arg": { "version": "6.1.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "hosted-git-info": "^2.7.1", "osenv": "^0.1.5", @@ -12424,12 +11167,7 @@ }, "npm-pick-manifest": { "version": "3.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz", - "integrity": "sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "figgy-pudding": "^3.5.1", "npm-package-arg": "^6.0.0", @@ -12446,14 +11184,8 @@ } }, "npm-registry-fetch": { -<<<<<<< HEAD - "version": "4.0.3", - "resolved": false, - "integrity": "sha512-WGvUx0lkKFhu9MbiGFuT9nG2NpfQ+4dCJwRwwtK2HK5izJEvwDxMeUyqbuMS7N/OkpVCqDorV6rO5E4V9F8lJw==", -======= "version": "4.0.4", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "JSONStream": "^1.3.4", "bluebird": "^3.5.1", @@ -12466,44 +11198,24 @@ "dependencies": { "safe-buffer": { "version": "5.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "npm-run-path": { "version": "2.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "path-key": "^2.0.0" } }, "npm-user-validate": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.0.tgz", - "integrity": "sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE=" - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", -======= "bundled": true }, "npmlog": { "version": "4.1.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -12513,30 +11225,6 @@ }, "number-is-nan": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", -======= "bundled": true }, "oauth-sign": { @@ -12554,7 +11242,6 @@ "object.getownpropertydescriptors": { "version": "2.0.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "define-properties": "^1.1.2", "es-abstract": "^1.5.1" @@ -12562,32 +11249,13 @@ }, "once": { "version": "1.4.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "wrappy": "1" } }, "opener": { "version": "1.5.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", - "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==" - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", -======= "bundled": true }, "os-homedir": { @@ -12597,7 +11265,6 @@ "os-locale": { "version": "3.1.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", @@ -12606,12 +11273,7 @@ "dependencies": { "cross-spawn": { "version": "6.0.5", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -12622,12 +11284,7 @@ }, "execa": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -12642,21 +11299,11 @@ }, "os-tmpdir": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", -======= "bundled": true }, "osenv": { "version": "0.1.5", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -12664,25 +11311,6 @@ }, "p-defer": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" - }, - "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", -======= "bundled": true }, "p-finally": { @@ -12696,40 +11324,24 @@ "p-limit": { "version": "1.2.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "p-try": "^1.0.0" } }, "p-locate": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "p-limit": "^1.1.0" } }, "p-try": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", -======= "bundled": true }, "package-json": { "version": "4.0.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "got": "^6.7.1", "registry-auth-token": "^3.0.1", @@ -12739,12 +11351,7 @@ }, "pacote": { "version": "9.5.12", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.12.tgz", - "integrity": "sha512-BUIj/4kKbwWg4RtnBncXPJd15piFSVNpTzY0rysSr3VnMowTYgkGKcaHrbReepAkjTr8lH2CVWRi58Spg2CicQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "bluebird": "^3.5.3", "cacache": "^12.0.2", @@ -12780,12 +11387,7 @@ "dependencies": { "minipass": { "version": "2.9.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -12795,12 +11397,7 @@ }, "parallel-transform": { "version": "1.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "cyclist": "~0.2.2", "inherits": "^2.0.3", @@ -12809,12 +11406,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -12827,12 +11419,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -12841,60 +11428,6 @@ }, "path-exists": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, - "promise-retry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", - "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", -======= "bundled": true }, "path-is-absolute": { @@ -12936,7 +11469,6 @@ "promise-retry": { "version": "1.1.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "err-code": "^1.0.0", "retry": "^0.10.0" @@ -12944,69 +11476,30 @@ "dependencies": { "retry": { "version": "0.10.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "promzard": { "version": "0.3.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz", - "integrity": "sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "read": "1" } }, "proto-list": { "version": "1.2.4", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" - }, - "protoduck": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", - "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", -======= "bundled": true }, "protoduck": { "version": "5.0.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "genfun": "^5.0.0" } }, "prr": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", -======= "bundled": true }, "pseudomap": { @@ -13020,7 +11513,6 @@ "pump": { "version": "3.0.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -13028,12 +11520,7 @@ }, "pumpify": { "version": "1.5.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "duplexify": "^3.6.0", "inherits": "^2.0.3", @@ -13042,12 +11529,7 @@ "dependencies": { "pump": { "version": "2.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -13057,25 +11539,6 @@ }, "punycode": { "version": "1.4.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "qrcode-terminal": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", - "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==" - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "query-string": { - "version": "6.8.2", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.8.2.tgz", - "integrity": "sha512-J3Qi8XZJXh93t2FiKyd/7Ec6GNifsjKXUsVFkSBj/kjLsDylWhnCz4NT1bkPcKotttPW+QbKGqqPH8OoI2pdqw==", -======= "bundled": true }, "qrcode-terminal": { @@ -13089,7 +11552,6 @@ "query-string": { "version": "6.8.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "decode-uri-component": "^0.2.0", "split-on-first": "^1.0.0", @@ -13098,12 +11560,7 @@ }, "qw": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/qw/-/qw-1.0.1.tgz", - "integrity": "sha1-77/cdA+a0FQwRCassYNBLMi5ltQ=" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 }, "rc": { "version": "1.2.8", @@ -13123,36 +11580,21 @@ }, "read": { "version": "1.0.7", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "mute-stream": "~0.0.4" } }, "read-cmd-shim": { "version": "1.0.5", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz", - "integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "graceful-fs": "^4.1.2" } }, "read-installed": { "version": "4.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", - "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "debuglog": "^1.0.1", "graceful-fs": "^4.1.2", @@ -13165,12 +11607,7 @@ }, "read-package-json": { "version": "2.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.1.tgz", - "integrity": "sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "glob": "^7.1.1", "graceful-fs": "^4.1.2", @@ -13181,12 +11618,7 @@ }, "read-package-tree": { "version": "5.3.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", - "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "read-package-json": "^2.0.0", "readdir-scoped-modules": "^1.0.0", @@ -13204,12 +11636,7 @@ }, "readdir-scoped-modules": { "version": "1.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", - "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "debuglog": "^1.0.1", "dezalgo": "^1.0.0", @@ -13227,24 +11654,14 @@ }, "registry-url": { "version": "3.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "rc": "^1.0.1" } }, "request": { "version": "2.88.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -13270,25 +11687,6 @@ }, "require-directory": { "version": "2.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" - }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" -======= "bundled": true }, "require-main-filename": { @@ -13302,7 +11700,6 @@ "retry": { "version": "0.12.0", "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 }, "rimraf": { "version": "2.7.1", @@ -13313,48 +11710,19 @@ }, "run-queue": { "version": "1.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "aproba": "^1.1.1" }, "dependencies": { "aproba": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "safe-buffer": { "version": "5.1.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", -======= "bundled": true }, "safer-buffer": { @@ -13368,70 +11736,30 @@ "semver-diff": { "version": "2.1.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "semver": "^5.0.3" } }, "set-blocking": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "sha": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/sha/-/sha-3.0.0.tgz", - "integrity": "sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw==", -======= "bundled": true }, "sha": { "version": "3.0.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "graceful-fs": "^4.1.2" } }, "shebang-command": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "shebang-regex": "^1.0.0" } }, "shebang-regex": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" - }, - "smart-buffer": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", - "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==" - }, - "socks": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", - "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", -======= "bundled": true }, "signal-exit": { @@ -13449,7 +11777,6 @@ "socks": { "version": "2.3.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ip": "1.1.5", "smart-buffer": "^4.1.0" @@ -13457,12 +11784,7 @@ }, "socks-proxy-agent": { "version": "4.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", - "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "agent-base": "~4.2.1", "socks": "~2.3.2" @@ -13470,12 +11792,7 @@ "dependencies": { "agent-base": { "version": "4.2.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "es6-promisify": "^5.0.0" } @@ -13484,21 +11801,11 @@ }, "sorted-object": { "version": "2.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz", - "integrity": "sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw=" - }, - "sorted-union-stream": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz", - "integrity": "sha1-x3lMfgd4gAUv9xqNSi27Sppjisc=", -======= "bundled": true }, "sorted-union-stream": { "version": "2.1.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "from2": "^1.3.0", "stream-iterate": "^1.1.0" @@ -13506,12 +11813,7 @@ "dependencies": { "from2": { "version": "1.3.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/from2/-/from2-1.3.0.tgz", - "integrity": "sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "inherits": "~2.0.1", "readable-stream": "~1.1.10" @@ -13519,21 +11821,11 @@ }, "isarray": { "version": "0.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", -======= "bundled": true }, "readable-stream": { "version": "1.1.14", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -13543,23 +11835,13 @@ }, "string_decoder": { "version": "0.10.31", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "spdx-correct": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -13567,21 +11849,11 @@ }, "spdx-exceptions": { "version": "2.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", -======= "bundled": true }, "spdx-expression-parse": { "version": "3.0.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -13589,20 +11861,6 @@ }, "spdx-license-ids": { "version": "3.0.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", - "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==" - }, - "split-on-first": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", - "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==" - }, - "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", -======= "bundled": true }, "split-on-first": { @@ -13612,7 +11870,6 @@ "sshpk": { "version": "1.14.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -13627,24 +11884,14 @@ }, "ssri": { "version": "6.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "figgy-pudding": "^3.5.1" } }, "stream-each": { "version": "1.2.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", - "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "end-of-stream": "^1.1.0", "stream-shift": "^1.0.0" @@ -13652,12 +11899,7 @@ }, "stream-iterate": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/stream-iterate/-/stream-iterate-1.2.0.tgz", - "integrity": "sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "readable-stream": "^2.1.5", "stream-shift": "^1.0.0" @@ -13665,12 +11907,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -13683,12 +11920,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -13697,20 +11929,6 @@ }, "stream-shift": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" - }, - "strict-uri-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", -======= "bundled": true }, "strict-uri-encode": { @@ -13720,7 +11938,6 @@ "string-width": { "version": "2.1.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -13728,20 +11945,6 @@ "dependencies": { "ansi-regex": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", -======= "bundled": true }, "is-fullwidth-code-point": { @@ -13751,7 +11954,6 @@ "strip-ansi": { "version": "4.0.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ansi-regex": "^3.0.0" } @@ -13773,41 +11975,17 @@ }, "stringify-package": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz", - "integrity": "sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg==" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", -======= "bundled": true }, "strip-ansi": { "version": "3.0.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "ansi-regex": "^2.0.0" } }, "strip-eof": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", -======= "bundled": true }, "strip-json-comments": { @@ -13817,19 +11995,13 @@ "supports-color": { "version": "5.4.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "has-flag": "^3.0.0" } }, "tar": { "version": "4.4.13", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", @@ -13842,12 +12014,7 @@ "dependencies": { "minipass": { "version": "2.9.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -13857,32 +12024,13 @@ }, "term-size": { "version": "1.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "execa": "^0.7.0" } }, "text-table": { "version": "0.2.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", -======= "bundled": true }, "through": { @@ -13892,7 +12040,6 @@ "through2": { "version": "2.0.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "readable-stream": "^2.1.5", "xtend": "~4.0.1" @@ -13900,12 +12047,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -13918,12 +12060,7 @@ }, "string_decoder": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "~5.1.0" } @@ -13932,20 +12069,6 @@ }, "timed-out": { "version": "4.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" - }, - "tiny-relative-date": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz", - "integrity": "sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A==" - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", -======= "bundled": true }, "tiny-relative-date": { @@ -13955,7 +12078,6 @@ "tough-cookie": { "version": "2.4.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" @@ -13963,47 +12085,18 @@ }, "tunnel-agent": { "version": "0.6.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "safe-buffer": "^5.0.1" } }, "tweetnacl": { "version": "0.14.5", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "optional": true }, "typedarray": { "version": "0.0.6", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "uid-number": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" - }, - "umask": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz", - "integrity": "sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=" - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", -======= "bundled": true }, "uid-number": { @@ -14017,51 +12110,26 @@ "unique-filename": { "version": "1.1.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "unique-slug": "^2.0.0" } }, "unique-slug": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "imurmurhash": "^0.1.4" } }, "unique-string": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "crypto-random-string": "^1.0.0" } }, "unpipe": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=" - }, - "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", -======= "bundled": true }, "unzip-response": { @@ -14071,7 +12139,6 @@ "update-notifier": { "version": "2.5.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "boxen": "^1.2.1", "chalk": "^2.0.1", @@ -14087,32 +12154,13 @@ }, "url-parse-lax": { "version": "1.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "prepend-http": "^1.0.1" } }, "util-deprecate": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", - "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=" - }, - "util-promisify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz", - "integrity": "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=", -======= "bundled": true }, "util-extend": { @@ -14122,28 +12170,17 @@ "util-promisify": { "version": "2.1.0", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "object.getownpropertydescriptors": "^2.0.3" } }, "uuid": { "version": "3.3.3", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", -======= "bundled": true }, "validate-npm-package-license": { "version": "3.0.4", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -14151,24 +12188,14 @@ }, "validate-npm-package-name": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "builtins": "^1.0.3" } }, "verror": { "version": "1.10.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -14177,57 +12204,32 @@ }, "wcwidth": { "version": "1.0.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "defaults": "^1.0.3" } }, "which": { "version": "1.3.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "isexe": "^2.0.0" } }, "which-module": { "version": "2.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", -======= "bundled": true }, "wide-align": { "version": "1.1.2", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "string-width": "^1.0.2" }, "dependencies": { "string-width": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -14245,24 +12247,14 @@ }, "worker-farm": { "version": "1.7.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", - "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "errno": "~0.1.7" } }, "wrap-ansi": { "version": "2.1.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" @@ -14270,12 +12262,7 @@ "dependencies": { "string-width": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -14286,21 +12273,11 @@ }, "wrappy": { "version": "1.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", -======= "bundled": true }, "write-file-atomic": { "version": "2.4.3", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", @@ -14309,30 +12286,6 @@ }, "xdg-basedir": { "version": "3.0.0", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" - }, - "yargs": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz", - "integrity": "sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==", -======= "bundled": true }, "xtend": { @@ -14350,7 +12303,6 @@ "yargs": { "version": "11.1.1", "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "cliui": "^4.0.0", "decamelize": "^1.1.1", @@ -14368,23 +12320,13 @@ "dependencies": { "y18n": { "version": "3.2.1", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" -======= "bundled": true ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 } } }, "yargs-parser": { "version": "9.0.2", -<<<<<<< HEAD - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", -======= "bundled": true, ->>>>>>> 99d2b19dba130353ac3b021bc7eab079bb125408 "requires": { "camelcase": "^4.1.0" } @@ -14514,7 +12456,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", - "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5" @@ -15129,6 +13070,11 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, + "popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==" + }, "portfinder": { "version": "1.0.26", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz", @@ -15866,6 +13812,18 @@ "warning": "^3.0.0" } }, + "react-datepicker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-3.0.0.tgz", + "integrity": "sha512-Yrxan1tERAiWS0EzitpiaiXOIz0APTUtV75uWbaS+jSaKoGCR6wUN2FDwr1ACGlnEoGhR9QQ2Vq3odnWtgJsOA==", + "requires": { + "classnames": "^2.2.6", + "date-fns": "^2.0.1", + "prop-types": "^15.7.2", + "react-onclickoutside": "^6.9.0", + "react-popper": "^1.3.4" + } + }, "react-dock": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/react-dock/-/react-dock-0.2.4.tgz", @@ -15991,6 +13949,44 @@ } } }, + "react-onclickoutside": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.9.0.tgz", + "integrity": "sha512-8ltIY3bC7oGhj2nPAvWOGi+xGFybPNhJM0V1H8hY/whNcXgmDeaeoCMPPd8VatrpTsUWjb/vGzrmu6SrXVty3A==" + }, + "react-popper": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.7.tgz", + "integrity": "sha512-nmqYTx7QVjCm3WUZLeuOomna138R1luC4EqkW3hxJUrAe+3eNz3oFCLYdnPwILfn0mX1Ew2c3wctrjlUMYYUww==", + "requires": { + "@babel/runtime": "^7.1.2", + "create-react-context": "^0.3.0", + "deep-equal": "^1.1.1", + "popper.js": "^1.14.4", + "prop-types": "^15.6.1", + "typed-styles": "^0.0.7", + "warning": "^4.0.2" + }, + "dependencies": { + "create-react-context": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.3.0.tgz", + "integrity": "sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==", + "requires": { + "gud": "^1.0.0", + "warning": "^4.0.3" + } + }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, "react-resizable": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/react-resizable/-/react-resizable-1.10.1.tgz", @@ -16185,7 +14181,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" @@ -18518,6 +16513,11 @@ "mime-types": "~2.1.24" } }, + "typed-styles": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", + "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==" + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", diff --git a/package.json b/package.json index 683f181c3..fa0f6d425 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "@types/react": "^16.9.41", "@types/react-autosuggest": "^9.3.14", "@types/react-color": "^2.17.4", + "@types/react-datepicker": "^3.0.2", "@types/react-dom": "^16.9.8", "@types/react-grid-layout": "^0.17.1", "@types/react-measure": "^2.0.6", @@ -210,6 +211,7 @@ "react-autosuggest": "^9.4.3", "react-color": "^2.18.1", "react-compound-slider": "^2.5.0", + "react-datepicker": "^3.0.0", "react-dom": "^16.12.0", "react-grid-layout": "^0.18.3", "react-image-lightbox-with-rotate": "^5.1.1", diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 593962e73..0a2c538c2 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -16,7 +16,7 @@ import { EditableView } from "../EditableView"; import { FieldView, FieldViewProps } from "../nodes/FieldView"; import "./CollectionSchemaView.scss"; import { CollectionView, Flyout } from "./CollectionView"; -import { NumCast, StrCast, BoolCast, FieldValue, Cast } from "../../../fields/Types"; +import { NumCast, StrCast, BoolCast, FieldValue, Cast, DateCast } from "../../../fields/Types"; import { Docs } from "../../documents/Documents"; import { library } from '@fortawesome/fontawesome-svg-core'; import { faExpand } from '@fortawesome/free-solid-svg-icons'; @@ -32,6 +32,8 @@ import { DocumentIconContainer } from "../nodes/DocumentIcon"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; import ReactDOM from "react-dom"; +import DatePicker from "react-datepicker"; +import "react-datepicker/dist/react-datepicker.css"; const path = require('path'); library.add(faExpand); @@ -225,6 +227,9 @@ export class CollectionSchemaCell extends React.Component { if (type === "list") { contents = typeof field === "object" ? doc ? StrCast(field) === "" ? "--" : StrCast(field) : `--${typeof field}--` : `--${typeof field}--`; } + if (type === "date") { + contents = typeof field === "object" ? doc ? StrCast(field) === "" ? "--" : StrCast(field) : `--${typeof field}--` : `--${typeof field}--`; + } let className = "collectionSchemaView-cellWrapper"; @@ -340,6 +345,48 @@ export class CollectionSchemaStringCell extends CollectionSchemaCell { } } +@observer +export class CollectionSchemaDateCell extends CollectionSchemaCell { + private prop: FieldViewProps = { + Document: this.props.rowProps.original, + DataDoc: this.props.rowProps.original, + LibraryPath: [], + dropAction: "alias", + bringToFront: emptyFunction, + rootSelected: returnFalse, + fieldKey: this.props.rowProps.column.id as string, + ContainingCollectionView: this.props.CollectionView, + ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, + isSelected: returnFalse, + select: emptyFunction, + renderDepth: this.props.renderDepth + 1, + ScreenToLocalTransform: Transform.Identity, + focus: emptyFunction, + active: returnFalse, + whenActiveChanged: emptyFunction, + PanelHeight: returnZero, + PanelWidth: returnZero, + NativeHeight: returnZero, + NativeWidth: returnZero, + addDocTab: this.props.addDocTab, + pinToPres: this.props.pinToPres, + ContentScaling: returnOne, + docFilters: returnEmptyFilter + }; + @observable private _field = this.prop.Document[this.prop.fieldKey]; + + handleChange = (date: any) => { + this.prop.Document[this.prop.fieldKey] = date; + } + + render() { + return ; + } +} + @observer export class CollectionSchemaDocCell extends CollectionSchemaCell { diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index 80c265ba6..fc7c2400d 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -2,7 +2,7 @@ import React = require("react"); import { action, observable } from "mobx"; import { observer } from "mobx-react"; import "./CollectionSchemaView.scss"; -import { faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faSortAmountDown, faSortAmountUp, faTimes, faImage, faListUl } from '@fortawesome/free-solid-svg-icons'; +import { faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faSortAmountDown, faSortAmountUp, faTimes, faImage, faListUl, faCalendar } from '@fortawesome/free-solid-svg-icons'; import { library, IconProp } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ColumnType } from "./CollectionSchemaView"; @@ -13,7 +13,7 @@ const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; -library.add(faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faFile as any, faSortAmountDown, faSortAmountUp, faTimes, faImage, faListUl); +library.add(faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faFile as any, faSortAmountDown, faSortAmountUp, faTimes, faImage, faListUl, faCalendar); export interface HeaderProps { keyValue: SchemaHeaderField; @@ -34,7 +34,8 @@ export class CollectionSchemaHeader extends React.Component { render() { const icon: IconProp = this.props.keyType === ColumnType.Number ? "hashtag" : this.props.keyType === ColumnType.String ? "font" : this.props.keyType === ColumnType.Boolean ? "check-square" : this.props.keyType === ColumnType.Doc ? "file" : - this.props.keyType === ColumnType.Image ? "image" : this.props.keyType === ColumnType.List ? "list-ul" : "align-justify"; + this.props.keyType === ColumnType.Image ? "image" : this.props.keyType === ColumnType.List ? "list-ul" : this.props.keyType === ColumnType.Date ? "calendar" : + "align-justify"; return (
Image
+
this.changeColumnType(ColumnType.Date)}> + + Date +
); diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index bfd5fa96f..7e8455149 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -37,7 +37,8 @@ export enum ColumnType { Boolean, Doc, Image, - List + List, + Date } // this map should be used for keys that should have a const type of value const columnTypes: Map = new Map([ @@ -225,6 +226,11 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { Image
; + const dateType =
this.changeColumnType(ColumnType.Date, col)}> + + Date +
; + const allColumnTypes =
{anyType} @@ -234,11 +240,13 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { {listType} {docType} {imageType} + {dateType}
; const justColType = type === ColumnType.Any ? anyType : type === ColumnType.Number ? numType : type === ColumnType.String ? textType : type === ColumnType.Boolean ? boolType : - type === ColumnType.List ? listType : type === ColumnType.Doc ? docType : imageType; + type === ColumnType.List ? listType : type === ColumnType.Doc ? docType : + type === ColumnType.Date ? dateType : imageType; return (
diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index 176091661..eb0d234c0 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -19,7 +19,7 @@ import { undoBatch } from "../../util/UndoManager"; import { COLLECTION_BORDER_WIDTH } from '../../views/globalCssVariables.scss'; import { ContextMenu } from "../ContextMenu"; import '../DocumentDecorations.scss'; -import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell, CollectionSchemaImageCell, CollectionSchemaListCell } from "./CollectionSchemaCells"; +import { CellProps, CollectionSchemaCell, CollectionSchemaCheckboxCell, CollectionSchemaDocCell, CollectionSchemaNumberCell, CollectionSchemaStringCell, CollectionSchemaImageCell, CollectionSchemaListCell, CollectionSchemaDateCell } from "./CollectionSchemaCells"; import { CollectionSchemaAddColumnHeader, KeysDropdown } from "./CollectionSchemaHeaders"; import { MovableColumn, MovableRow } from "./CollectionSchemaMovableTableHOC"; import "./CollectionSchemaView.scss"; @@ -36,7 +36,8 @@ enum ColumnType { Boolean, Doc, Image, - List + List, + Date } // this map should be used for keys that should have a const type of value @@ -195,7 +196,8 @@ export class SchemaTable extends React.Component { const icon: IconProp = this.getColumnType(col) === ColumnType.Number ? "hashtag" : this.getColumnType(col) === ColumnType.String ? "font" : this.getColumnType(col) === ColumnType.Boolean ? "check-square" : this.getColumnType(col) === ColumnType.Doc ? "file" : - this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : "align-justify"; + this.getColumnType(col) === ColumnType.Image ? "image" : this.getColumnType(col) === ColumnType.List ? "list-ul" : + this.getColumnType(col) === ColumnType.Date ? "calendar" : "align-justify"; const headerText = this._showTitleDropdown ? keysDropdown :
{ if (colType === ColumnType.Doc) return ; if (colType === ColumnType.Image) return ; if (colType === ColumnType.List) return ; + if (colType === ColumnType.Date) return ; return ; }, minWidth: 200, -- cgit v1.2.3-70-g09d2 From 3764d9a1fbac63452ce9da8fdabfa83c49f8004d Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 28 Jun 2020 12:03:06 -0500 Subject: tweaks to date picker --- src/client/views/collections/CollectionSchemaCells.tsx | 9 +++++++-- src/client/views/collections/CollectionSchemaView.scss | 10 +++++----- src/fields/DateField.ts | 4 ++++ 3 files changed, 16 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 0a2c538c2..cdcc67294 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -34,6 +34,7 @@ import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView" import ReactDOM from "react-dom"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; +import { DateField } from "../../../fields/DateField"; const path = require('path'); library.add(faExpand); @@ -374,15 +375,19 @@ export class CollectionSchemaDateCell extends CollectionSchemaCell { docFilters: returnEmptyFilter }; @observable private _field = this.prop.Document[this.prop.fieldKey]; + @observable private _date = new Date(); + @action handleChange = (date: any) => { + this._date = date; this.prop.Document[this.prop.fieldKey] = date; } render() { return this.handleChange(date)} + onChange={date => this.handleChange(date)} />; } } diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index 2926a8f6f..fa1f01448 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -62,14 +62,14 @@ width: calc(100% - 52px); margin-left: 50px; - z-index: 10000; + z-index: 100; overflow-y: visible; &.-header { font-size: 12px; height: 30px; box-shadow: none; - z-index: 10000; + z-index: 100; overflow-y: visible; } @@ -180,7 +180,7 @@ .collectionSchemaView-header { height: 100%; color: gray; - z-index: 10000; + z-index: 100; overflow-y: visible; display: flex; justify-content: space-between; @@ -188,10 +188,10 @@ .collectionSchema-header-menu { height: 100%; - z-index: 10000; + z-index: 100; .collectionSchema-header-toggler { - z-index: 10000; + z-index: 100; width: 100%; height: 100%; padding: 4px; diff --git a/src/fields/DateField.ts b/src/fields/DateField.ts index a925148c2..bee62663e 100644 --- a/src/fields/DateField.ts +++ b/src/fields/DateField.ts @@ -29,6 +29,10 @@ export class DateField extends ObjectField { [ToString]() { return this.date.toISOString(); } + + getDate() { + return this.date; + } } Scripting.addGlobal(function d(...dateArgs: any[]) { -- cgit v1.2.3-70-g09d2 From d118a988d5233a282cea4f878ee4a569c2d413fc Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 28 Jun 2020 13:19:34 -0500 Subject: slight modification to date --- src/client/views/collections/CollectionSchemaCells.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index cdcc67294..0026ab927 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -380,14 +380,17 @@ export class CollectionSchemaDateCell extends CollectionSchemaCell { @action handleChange = (date: any) => { this._date = date; - this.prop.Document[this.prop.fieldKey] = date; + this.prop.Document[this.prop.fieldKey] = DateCast(date); + this._field = DateCast(date); } render() { return this.handleChange(date)} onChange={date => this.handleChange(date)} + showTimeSelect + dateFormat="Pp" />; } } -- cgit v1.2.3-70-g09d2 From 85311e4096a3e3842d0f8a9f39e7436401455aa3 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sun, 28 Jun 2020 16:52:17 -0400 Subject: fixed drop down menus in schema collection view menu --- package-lock.json | 44 +++------ .../views/collections/CollectionSchemaCells.tsx | 4 - .../views/collections/CollectionSchemaView.scss | 38 ++++---- .../views/collections/CollectionSchemaView.tsx | 108 ++++----------------- 4 files changed, 52 insertions(+), 142 deletions(-) (limited to 'src') diff --git a/package-lock.json b/package-lock.json index 6c364530b..735cff1a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2946,8 +2946,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -2965,13 +2964,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2984,18 +2981,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -3098,8 +3092,7 @@ }, "inherits": { "version": "2.0.4", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -3109,7 +3102,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3122,20 +3114,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.5", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.9.0", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3152,7 +3141,6 @@ "mkdirp": { "version": "0.5.3", "bundled": true, - "optional": true, "requires": { "minimist": "^1.2.5" } @@ -3208,8 +3196,7 @@ }, "npm-normalize-package-bin": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "npm-packlist": { "version": "1.4.8", @@ -3234,8 +3221,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -3245,7 +3231,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -3314,8 +3299,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -3345,7 +3329,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3363,7 +3346,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3402,13 +3384,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.1.1", - "bundled": true, - "optional": true + "bundled": true } } } diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 0026ab927..034ba27cf 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -26,15 +26,11 @@ import { SnappingManager } from "../../util/SnappingManager"; import { ComputedField } from "../../../fields/ScriptField"; import { ImageField } from "../../../fields/URLField"; import { List } from "../../../fields/List"; -import { LinkBox } from "../nodes/LinkBox"; import { OverlayView } from "../OverlayView"; import { DocumentIconContainer } from "../nodes/DocumentIcon"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView"; -import ReactDOM from "react-dom"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; -import { DateField } from "../../../fields/DateField"; const path = require('path'); library.add(faExpand); diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index fa1f01448..2330fcc8a 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -177,6 +177,26 @@ } +.collectionSchema-header-menu { + height: 100%; + z-index: 100; + position: absolute; + background:white; + + .collectionSchema-header-toggler { + z-index: 100; + width: 100%; + height: 100%; + padding: 4px; + letter-spacing: 2px; + text-transform: uppercase; + + svg { + margin-right: 4px; + } + } +} + .collectionSchemaView-header { height: 100%; color: gray; @@ -185,24 +205,6 @@ display: flex; justify-content: space-between; flex-wrap: wrap; - - .collectionSchema-header-menu { - height: 100%; - z-index: 100; - - .collectionSchema-header-toggler { - z-index: 100; - width: 100%; - height: 100%; - padding: 4px; - letter-spacing: 2px; - text-transform: uppercase; - - svg { - margin-right: 4px; - } - } - } } button.add-column { diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 7e8455149..857d8cb50 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -11,7 +11,6 @@ import { List } from "../../../fields/List"; import { listSpec } from "../../../fields/Schema"; import { SchemaHeaderField, PastelSchemaPalette } from "../../../fields/SchemaHeaderField"; import { Cast, NumCast, StrCast } from "../../../fields/Types"; -import { Docs, DocumentOptions } from "../../documents/Documents"; import { Transform } from "../../util/Transform"; import { undoBatch } from "../../util/UndoManager"; import { COLLECTION_BORDER_WIDTH } from '../../views/globalCssVariables.scss'; @@ -23,8 +22,8 @@ import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView" import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse } from "../../../Utils"; import { SnappingManager } from "../../util/SnappingManager"; import Measure from "react-measure"; -import { SchemaTable } from "./SchemaTable"; -import { civicinfo } from "googleapis/build/src/apis/civicinfo"; +import { SchemaTable } from "./SchemaTable" +import { TraceMobx } from "../../../fields/util"; library.add(faCog, faPlus, faSortUp, faSortDown); library.add(faTable); @@ -185,7 +184,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this._openTypes = bool; } - @action renderTypes = (col: any) => { if (columnTypes.get(col.heading)) return (null); @@ -353,29 +351,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { />; } - @action - renderContent = (col: any) => { - return ( -
-
- - {this.renderKeysDropDown(col)} -
- {false ? <> : - <> - {this.renderTypes(col)} - {this.renderSorting(col)} - {this.renderColors(col)} -
- -
- - } -
- ); - } - @undoBatch @action deleteColumn = (key: string) => { @@ -410,45 +385,22 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { //this.menuCoordinates[1] -= e.screenY / scale; } - @action renderMenu() { - const scale = this.props.ScreenToLocalTransform().Scale; - return ( -
this.props.active(true) && e.stopPropagation()} - onPointerDown={e => this.onHeaderClick(e)} - style={{ - position: "absolute", background: "white", - transform: `translate(${this.menuCoordinates[0] * scale}px, ${this.menuCoordinates[1] / scale}px)` - }}> - { - const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); - this._menuWidth = dim[0]; this._menuHeight = dim[1]; - })}> - {({ measureRef }) =>
-
-
- - {this.renderKeysDropDown(this._col)} -
- {false ? <> : - <> - {this.renderTypes(this._col)} - {this.renderSorting(this._col)} - {this.renderColors(this._col)} -
- -
- - } -
- -
} -
+ @computed get renderMenuContent() { + TraceMobx(); + return
+
+ + {this.renderKeysDropDown(this._col)}
- ); + {this.renderTypes(this._col)} + {this.renderSorting(this._col)} + {this.renderColors(this._col)} +
+ +
+
; } - private createTarget = (ele: HTMLDivElement) => { this._previewCont = ele; super.CreateDropTarget(ele); @@ -623,38 +575,18 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } render() { + TraceMobx(); + const menuContent = this.renderMenuContent; const scale = this.props.ScreenToLocalTransform().Scale; const menu =
this.props.active(true) && e.stopPropagation()} onPointerDown={e => this.onHeaderClick(e)} - style={{ - position: "absolute", background: "white", - transform: `translate(${this.menuCoordinates[0] * scale}px, ${this.menuCoordinates[1] / scale}px)` - }}> + style={{ transform: `translate(${this.menuCoordinates[0] * scale}px, ${this.menuCoordinates[1] / scale}px)` }}> { const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); this._menuWidth = dim[0]; this._menuHeight = dim[1]; })}> - {({ measureRef }) =>
-
-
- - {this.renderKeysDropDown(this._col)} -
- {false ? <> : - <> - {this.renderTypes(this._col)} - {this.renderSorting(this._col)} - {this.renderColors(this._col)} -
- -
- - } -
- -
} + {({ measureRef }) =>
{menuContent}
}
; -- cgit v1.2.3-70-g09d2 From 9f7d5a2fd3fca855ed51f4f4178966106ccdbefe Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 28 Jun 2020 23:54:26 -0500 Subject: adjustments to date --- .../views/collections/CollectionSchemaCells.tsx | 40 ++++------------------ .../views/collections/CollectionSchemaView.tsx | 2 +- 2 files changed, 8 insertions(+), 34 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 034ba27cf..a0c5fcde4 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -31,6 +31,7 @@ import { DocumentIconContainer } from "../nodes/DocumentIcon"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; +import { DateField } from "../../../fields/DateField"; const path = require('path'); library.add(faExpand); @@ -344,49 +345,22 @@ export class CollectionSchemaStringCell extends CollectionSchemaCell { @observer export class CollectionSchemaDateCell extends CollectionSchemaCell { - private prop: FieldViewProps = { - Document: this.props.rowProps.original, - DataDoc: this.props.rowProps.original, - LibraryPath: [], - dropAction: "alias", - bringToFront: emptyFunction, - rootSelected: returnFalse, - fieldKey: this.props.rowProps.column.id as string, - ContainingCollectionView: this.props.CollectionView, - ContainingCollectionDoc: this.props.CollectionView && this.props.CollectionView.props.Document, - isSelected: returnFalse, - select: emptyFunction, - renderDepth: this.props.renderDepth + 1, - ScreenToLocalTransform: Transform.Identity, - focus: emptyFunction, - active: returnFalse, - whenActiveChanged: emptyFunction, - PanelHeight: returnZero, - PanelWidth: returnZero, - NativeHeight: returnZero, - NativeWidth: returnZero, - addDocTab: this.props.addDocTab, - pinToPres: this.props.pinToPres, - ContentScaling: returnOne, - docFilters: returnEmptyFilter - }; - @observable private _field = this.prop.Document[this.prop.fieldKey]; - @observable private _date = new Date(); + @observable private _date: Date = this.props.rowProps.original[this.props.rowProps.column.id as string] instanceof DateField ? DateCast(this.props.rowProps.original[this.props.rowProps.column.id as string]).date : new Date(); @action handleChange = (date: any) => { this._date = date; - this.prop.Document[this.prop.fieldKey] = DateCast(date); - this._field = DateCast(date); + const script = CompileScript(date.toString(), { requiredType: "Date", addReturn: true, params: { this: Doc.name } }); + if (script.compiled) { + this.applyToDoc(this._document, this.props.row, this.props.col, script.run); + } } render() { return this.handleChange(date)} onChange={date => this.handleChange(date)} - showTimeSelect - dateFormat="Pp" />; } } diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 857d8cb50..efbe97a8e 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -22,7 +22,7 @@ import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView" import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse } from "../../../Utils"; import { SnappingManager } from "../../util/SnappingManager"; import Measure from "react-measure"; -import { SchemaTable } from "./SchemaTable" +import { SchemaTable } from "./SchemaTable"; import { TraceMobx } from "../../../fields/util"; library.add(faCog, faPlus, faSortUp, faSortDown); -- cgit v1.2.3-70-g09d2 From bc075fbd50200169e8d04b2385516272f24b0a29 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Mon, 29 Jun 2020 09:48:20 -0500 Subject: more merge fixes --- src/client/views/collections/CollectionSchemaView.tsx | 4 ++-- src/client/views/collections/SchemaTable.tsx | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 7e8455149..dc4e75443 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -78,10 +78,10 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } @computed get columns() { - return Cast(this.props.Document.schemaColumns, listSpec(SchemaHeaderField), []); + return Cast(this.props.Document._schemaHeaders, listSpec(SchemaHeaderField), []); } set columns(columns: SchemaHeaderField[]) { - this.props.Document.schemaColumns = new List(columns); + this.props.Document._schemaHeaders = new List(columns); } get documentKeys() { diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index eb0d234c0..5152b16b0 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -294,10 +294,12 @@ export class SchemaTable extends React.Component { constructor(props: SchemaTableProps) { super(props); // convert old schema columns (list of strings) into new schema columns (list of schema header fields) - const oldSchemaColumns = Cast(this.props.Document.schemaColumns, listSpec("string"), []); - if (oldSchemaColumns && oldSchemaColumns.length && typeof oldSchemaColumns[0] !== "object") { - const newSchemaColumns = oldSchemaColumns.map(i => typeof i === "string" ? new SchemaHeaderField(i, "#f1efeb") : i); - this.props.Document.schemaColumns = new List(newSchemaColumns); + const oldSchemaHeaders = Cast(this.props.Document._schemaHeaders, listSpec("string"), []); + if (oldSchemaHeaders?.length && typeof oldSchemaHeaders[0] !== "object") { + const newSchemaHeaders = oldSchemaHeaders.map(i => typeof i === "string" ? new SchemaHeaderField(i, "#f1efeb") : i); + this.props.Document._schemaHeaders = new List(newSchemaHeaders); + } else if (this.props.Document._schemaHeaders === undefined) { + this.props.Document._schemaHeaders = new List([new SchemaHeaderField("title", "#f1efeb")]); } } @@ -539,7 +541,7 @@ export class SchemaTable extends React.Component { if(col === undefined) { return (doc as any)[key][row + ${row}]; } - return (doc as any)[key][row + ${row}][(doc as any).schemaColumns[col + ${col}].heading]; + return (doc as any)[key][row + ${row}][(doc as any)._schemaHeaders[col + ${col}].heading]; } return ${script}`; const compiled = CompileScript(script, { params: { this: Doc.name }, capturedVariables: { doc: this.props.Document, key: this.props.fieldKey }, typecheck: false, transformer: this.createTransformer(row, col) }); -- cgit v1.2.3-70-g09d2 From d6828dba3dc1fd809d0e1449e8230656bb7c5360 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Mon, 29 Jun 2020 10:28:31 -0500 Subject: UI fix and little restructure --- .../views/collections/CollectionSchemaHeaders.tsx | 10 +-- .../views/collections/CollectionSchemaView.scss | 2 +- .../views/collections/CollectionSchemaView.tsx | 99 ++++------------------ .../views/collections/CollectionViewChromes.scss | 1 + src/client/views/collections/SchemaTable.tsx | 2 +- 5 files changed, 26 insertions(+), 88 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx index fc7c2400d..efff4db98 100644 --- a/src/client/views/collections/CollectionSchemaHeaders.tsx +++ b/src/client/views/collections/CollectionSchemaHeaders.tsx @@ -365,7 +365,7 @@ export class KeysDropdown extends React.Component { const options = keyOptions.map(key => { return
e.stopPropagation()} onClick={() => { this.onSelect(key); this.setSearchTerm(""); }}>{key}
; }); @@ -374,7 +374,7 @@ export class KeysDropdown extends React.Component { if (!exactFound && this._searchTerm !== "" && this.props.canAddNew) { options.push(
{ this.onSelect(this._searchTerm); this.setSearchTerm(""); }}> Create "{this._searchTerm}" key
); @@ -385,8 +385,8 @@ export class KeysDropdown extends React.Component { render() { return ( -
- + this.onChange(e.target.value)} onClick={(e) => { @@ -395,7 +395,7 @@ export class KeysDropdown extends React.Component { }} onFocus={this.onFocus} onBlur={this.onBlur}>
{this.renderOptions()} diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index 2330fcc8a..5226a60f1 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -500,7 +500,7 @@ button.add-column { } .collectionSchemaView-toolbar { - z-index: 1000; + z-index: 100; } .collectionSchemaView-toolbar { diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index dc4e75443..c75012595 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -24,7 +24,7 @@ import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse } import { SnappingManager } from "../../util/SnappingManager"; import Measure from "react-measure"; import { SchemaTable } from "./SchemaTable"; -import { civicinfo } from "googleapis/build/src/apis/civicinfo"; +import { TraceMobx } from "../../../fields/util"; library.add(faCog, faPlus, faSortUp, faSortDown); library.add(faTable); @@ -185,7 +185,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this._openTypes = bool; } - @action renderTypes = (col: any) => { if (columnTypes.get(col.heading)) return (null); @@ -353,29 +352,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { />; } - @action - renderContent = (col: any) => { - return ( -
-
- - {this.renderKeysDropDown(col)} -
- {false ? <> : - <> - {this.renderTypes(col)} - {this.renderSorting(col)} - {this.renderColors(col)} -
- -
- - } -
- ); - } - @undoBatch @action deleteColumn = (key: string) => { @@ -410,43 +386,21 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { //this.menuCoordinates[1] -= e.screenY / scale; } - @action renderMenu() { - const scale = this.props.ScreenToLocalTransform().Scale; - return ( -
this.props.active(true) && e.stopPropagation()} - onPointerDown={e => this.onHeaderClick(e)} - style={{ - position: "absolute", background: "white", - transform: `translate(${this.menuCoordinates[0] * scale}px, ${this.menuCoordinates[1] / scale}px)` - }}> - { - const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); - this._menuWidth = dim[0]; this._menuHeight = dim[1]; - })}> - {({ measureRef }) =>
-
-
- - {this.renderKeysDropDown(this._col)} -
- {false ? <> : - <> - {this.renderTypes(this._col)} - {this.renderSorting(this._col)} - {this.renderColors(this._col)} -
- -
- - } -
- -
} -
+ @computed get renderMenuContent() { + TraceMobx(); + return
+
+ + {this.renderKeysDropDown(this._col)}
- ); + {this.renderTypes(this._col)} + {this.renderSorting(this._col)} + {this.renderColors(this._col)} +
+ +
+
; } private createTarget = (ele: HTMLDivElement) => { @@ -623,6 +577,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } render() { + TraceMobx(); + const menuContent = this.renderMenuContent; const scale = this.props.ScreenToLocalTransform().Scale; const menu =
this.props.active(true) && e.stopPropagation()} @@ -635,26 +591,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); this._menuWidth = dim[0]; this._menuHeight = dim[1]; })}> - {({ measureRef }) =>
-
-
- - {this.renderKeysDropDown(this._col)} -
- {false ? <> : - <> - {this.renderTypes(this._col)} - {this.renderSorting(this._col)} - {this.renderColors(this._col)} -
- -
- - } -
- -
} + {({ measureRef }) =>
{menuContent}
}
; diff --git a/src/client/views/collections/CollectionViewChromes.scss b/src/client/views/collections/CollectionViewChromes.scss index 2885ac763..822e15aed 100644 --- a/src/client/views/collections/CollectionViewChromes.scss +++ b/src/client/views/collections/CollectionViewChromes.scss @@ -16,6 +16,7 @@ height: 32px; border-bottom: .5px solid rgb(180, 180, 180); overflow: visible; + z-index: 9001; .collectionViewBaseChrome { display: flex; diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index 5152b16b0..9e3b4d961 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -221,7 +221,7 @@ export class SchemaTable extends React.Component { }}>
+ style={{ display: "inline", zIndex: 1000 }}> {keysDropdown}
this.changeSorting(col)} -- cgit v1.2.3-70-g09d2 From e28fc1fcb0f23d47dfc23dd9e58090b28201289c Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Mon, 29 Jun 2020 11:26:52 -0500 Subject: fixed date type --- .../views/collections/CollectionSchemaCells.tsx | 23 ++++++++++++++-------- src/fields/util.ts | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index a0c5fcde4..5d5f1df57 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -345,15 +345,23 @@ export class CollectionSchemaStringCell extends CollectionSchemaCell { @observer export class CollectionSchemaDateCell extends CollectionSchemaCell { - @observable private _date: Date = this.props.rowProps.original[this.props.rowProps.column.id as string] instanceof DateField ? DateCast(this.props.rowProps.original[this.props.rowProps.column.id as string]).date : new Date(); + @observable private _date: Date = this.props.rowProps.original[this.props.rowProps.column.id as string] instanceof DateField ? DateCast(this.props.rowProps.original[this.props.rowProps.column.id as string]).date : + this.props.rowProps.original[this.props.rowProps.column.id as string] instanceof Date ? this.props.rowProps.original[this.props.rowProps.column.id as string] : new Date(); @action handleChange = (date: any) => { + console.log(date); this._date = date; - const script = CompileScript(date.toString(), { requiredType: "Date", addReturn: true, params: { this: Doc.name } }); - if (script.compiled) { - this.applyToDoc(this._document, this.props.row, this.props.col, script.run); - } + // const script = CompileScript(date.toString(), { requiredType: "Date", addReturn: true, params: { this: Doc.name } }); + // if (script.compiled) { + // console.log("scripting"); + // this.applyToDoc(this._document, this.props.row, this.props.col, script.run); + // } else { + console.log(DateCast(date)); + // ^ DateCast is always undefined for some reason, but that is what the field should be set to + this._document[this.props.rowProps.column.id as string] = date as Date; + console.log(this._document[this.props.rowProps.column.id as string]); + //} } render() { @@ -420,8 +428,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { console.log(results.result); this._doc = results.result; - this.prop.Document[this.prop.fieldKey] = results.result; - this.prop.Document[this.prop.fieldKey] = results.result; + this._document[this.prop.fieldKey] = results.result; this._docTitle = this._doc?.title; return true; @@ -438,7 +445,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { onOpenClick = () => { this._preview = false; if (this._doc) { - this.prop.addDocTab(this._doc, "onRight"); + this.props.addDocTab(this._doc, "onRight"); return true; } return false; diff --git a/src/fields/util.ts b/src/fields/util.ts index 2869ebed1..2dc21c987 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -78,7 +78,7 @@ const _setterImpl = action(function (target: any, prop: string | symbol | number } else { target.__fields[prop] = value; } - if (typeof value === "object" && !(value instanceof ObjectField)) debugger; + //if (typeof value === "object" && !(value instanceof ObjectField)) debugger; if (writeToServer) { if (value === undefined) target[Update]({ '$unset': { ["fields." + prop]: "" } }); else target[Update]({ '$set': { ["fields." + prop]: value instanceof ObjectField ? SerializationHelper.Serialize(value) : (value === undefined ? null : value) } }); -- cgit v1.2.3-70-g09d2 From f78d9d038c3f08615784c6b09b6d925838c8113c Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Mon, 29 Jun 2020 12:09:51 -0500 Subject: menu positioning getting better --- .../views/collections/CollectionSchemaView.tsx | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index c75012595..23e8a4d49 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -77,6 +77,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { return this.props.ScreenToLocalTransform().transformPoint(x, y); } + @observable scale = this.props.ScreenToLocalTransform().Scale; + @computed get columns() { return Cast(this.props.Document._schemaHeaders, listSpec(SchemaHeaderField), []); } @@ -576,16 +578,29 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { this.columns = columns; } + onZoomMenu = (e: React.WheelEvent) => { + this.props.active(true) && e.stopPropagation(); + if (this.menuCoordinates[0] > e.screenX) { + this.menuCoordinates[0] -= e.screenX //* this.scale; + } else { + this.menuCoordinates[0] += e.screenX //* this.scale; + } + if (this.menuCoordinates[1] > e.screenY) { + this.menuCoordinates[1] -= e.screenY //* this.scale; + } else { + this.menuCoordinates[1] += e.screenY //* this.scale; + } + } + render() { TraceMobx(); const menuContent = this.renderMenuContent; - const scale = this.props.ScreenToLocalTransform().Scale; const menu =
this.props.active(true) && e.stopPropagation()} + onWheel={e => this.onZoomMenu(e)} onPointerDown={e => this.onHeaderClick(e)} style={{ - position: "absolute", background: "white", - transform: `translate(${this.menuCoordinates[0] * scale}px, ${this.menuCoordinates[1] / scale}px)` + position: "fixed", background: "white", + transform: `translate(${this.menuCoordinates[0] / this.scale}px, ${this.menuCoordinates[1] / this.scale}px)` }}> { const dim = this.props.ScreenToLocalTransform().inverse().transformDirection(r.offset.width, r.offset.height); -- cgit v1.2.3-70-g09d2 From e11757174fb539d958595c42ff43f85d82b401c9 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Mon, 29 Jun 2020 16:32:01 -0400 Subject: fixed removing of ';' from script in schemaCells --- src/client/views/collections/CollectionSchemaCells.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 5d5f1df57..d76b6d204 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -271,7 +271,7 @@ export class CollectionSchemaCell extends React.Component { } const cscript = cfield instanceof ComputedField ? cfield.script.originalScript : undefined; const cfinalScript = cscript?.split("return")[cscript.split("return").length - 1]; - const val = cscript !== undefined ? `:=${cfinalScript?.substring(0, cfinalScript.length - 2)}` : + const val = cscript !== undefined ? (cfinalScript?.endsWith(";") ? `:=${cfinalScript?.substring(0, cfinalScript.length - 2)}` : cfinalScript) : Field.IsField(cfield) ? Field.toScriptString(cfield) : ""; return val; } -- cgit v1.2.3-70-g09d2 From 45d4390a70f0a1199718f006cdbaef3029c19443 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Tue, 30 Jun 2020 15:37:22 -0400 Subject: added start of push pin annotations --- src/client/views/collections/CollectionView.tsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index 6acf78af7..dab82185a 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -18,7 +18,7 @@ import { BoolCast, Cast, NumCast, ScriptCast, StrCast } from '../../../fields/Ty import { ImageField } from '../../../fields/URLField'; import { TraceMobx } from '../../../fields/util'; import { emptyFunction, emptyPath, returnFalse, returnOne, returnZero, setupMoveUpEvents, Utils, returnEmptyFilter } from '../../../Utils'; -import { Docs } from '../../documents/Documents'; +import { Docs, DocUtils } from '../../documents/Documents'; import { DocumentType } from '../../documents/DocumentTypes'; import { CurrentUserUtils } from '../../util/CurrentUserUtils'; import { ImageUtils } from '../../util/Import & Export/ImageUtils'; @@ -139,7 +139,21 @@ export class CollectionView extends Touchable Doc.AddDocToList(targetDataDoc, this.props.fieldKey, doc)); } else { - added.map(doc => doc.context = this.props.Document); + added.map(doc => { + const context = Cast(doc.context, Doc, null); + if (context && (context?.type === DocumentType.VID || context.type === DocumentType.WEB || context.type === DocumentType.PDF || context.type === DocumentType.IMG)) { + const pushpin = Docs.Create.FreeformDocument([], { + title: "pushpin", x: Cast(doc.x, "number", null), y: Cast(doc.y, "number", null), + _width: 10, _height: 10, _backgroundColor: "red", isLinkButton: true, displayTimecode: Cast(doc.displayTimecode, "number", null) + }); + Doc.AddDocToList(context, Doc.LayoutFieldKey(context) + "-annotations", pushpin); + DocUtils.MakeLink({ doc: pushpin }, { doc: doc }, "pushpin"); + const first = DocListCast(pushpin.links).find(d => d instanceof Doc); + first && (first.hidden = true); + doc.displayTimecode = undefined; + } + doc.context = this.props.Document; + }); added.map(add => Doc.AddDocToList(Cast(Doc.UserDoc().myCatalog, Doc, null), "data", add)); targetDataDoc[this.props.fieldKey] = new List([...docList, ...added]); targetDataDoc[this.props.fieldKey + "-lastModified"] = new DateField(new Date(Date.now())); -- cgit v1.2.3-70-g09d2 From b8d30a43b6bfccf70678ab8536c8caacfb5889ca Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Tue, 30 Jun 2020 17:19:22 -0400 Subject: fixed clearing of search box --- src/client/views/pdf/PDFViewer.tsx | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 372d01b9c..4fdc82388 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -114,8 +114,8 @@ export class PDFViewer extends ViewBoxAnnotatableComponent this._showWaiting = this._showCover = true); this.props.startupLive && this.setupPdfJsViewer(); this._mainCont.current && (this._mainCont.current.scrollTop = this.layoutDoc._scrollTop || 0); - this._searchReactionDisposer = reaction(() => this.Document.searchMatch, search => { - if (search) { - this.search(Doc.SearchQuery(), true); - this._lastSearch = Doc.SearchQuery(); - } - else { - setTimeout(() => this._lastSearch === "mxytzlaf" && this.search("mxytzlaf", true), 200); // bcz: how do we clear search highlights? - this._lastSearch && (this._lastSearch = "mxytzlaf"); - } - }, { fireImmediately: true }); + this._searchReactionDisposer = reaction(() => this.Document.searchMatch, + m => { + if (m) (this._lastSearch = true) && this.search(Doc.SearchQuery(), true); + else !(this._lastSearch = false) && setTimeout(() => !this._lastSearch && this.search("", false, true), 200); + }, { fireImmediately: true }); this._selectionReactionDisposer = reaction(() => this.props.isSelected(), selected => { @@ -395,11 +390,12 @@ export class PDFViewer extends ViewBoxAnnotatableComponent { - if (!searchString) { + search = (searchString: string, fwd: boolean, clear: boolean = false) => { + if (clear) { + this._pdfViewer.findController.executeCommand('reset', {}); + } else if (!searchString) { fwd ? this.nextAnnotation() : this.prevAnnotation(); - } - else if (this._pdfViewer.pageViewsReady) { + } else if (this._pdfViewer.pageViewsReady) { this._pdfViewer.findController.executeCommand('findagain', { caseSensitive: false, findPrevious: !fwd, -- cgit v1.2.3-70-g09d2