From c48b9015da3f68e83179fea9cb03cfe9fe7d1331 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Tue, 6 Jun 2023 17:03:25 -0400 Subject: Context and link message is back --- src/client/views/PropertiesView.tsx | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 5c3ed39a4..0007ac84f 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -7,7 +7,7 @@ import { intersection } from 'lodash'; import { action, computed, Lambda, observable } from 'mobx'; import { observer } from 'mobx-react'; import { ColorState, SketchPicker } from 'react-color'; -import { AclAdmin, AclSym, DataSym, Doc, Field, FieldResult, HeightSym, HierarchyMapping, NumListCast, Opt, StrListCast, WidthSym } from '../../fields/Doc'; +import { AclAdmin, AclSym, DataSym, Doc, DocListCast, Field, FieldResult, HeightSym, HierarchyMapping, NumListCast, Opt, StrListCast, WidthSym } from '../../fields/Doc'; import { Id } from '../../fields/FieldSymbols'; import { InkField } from '../../fields/InkField'; import { List } from '../../fields/List'; @@ -46,6 +46,7 @@ interface PropertiesViewProps { addDocTab: (doc: Doc, where: OpenWhere) => boolean; } + @observer export class PropertiesView extends React.Component { private _widthUndo?: UndoManager.Batch; @@ -244,11 +245,33 @@ export class PropertiesView extends React.Component { return !this.selectedDoc ? null : ; } + @computed get contextCount(){ + if (this.selectedDoc != undefined){ + const aliases = DocListCast(this.selectedDoc.aliases) + return aliases.length + } else{ + return 0; + } + } + @computed get links() { + console.log("this is selected doc" + this.selectedDoc) + // console.log("this is selected doc" + this.selectedDoc) const selAnchor = this.selectedDocumentView?.anchorViewDoc ?? LinkManager.currentLinkAnchor ?? this.selectedDoc; + console.log("this is selAnchor" + selAnchor) return !selAnchor ? null : ; } + @computed get linkCount(){ + const selAnchor = this.selectedDocumentView?.anchorViewDoc ?? LinkManager.currentLinkAnchor ?? this.selectedDoc; + if (selAnchor != undefined){ + const links = DocListCast(selAnchor.links) + return links.length + } else{ + return 0 + } + } + @computed get layoutPreview() { if (SelectionManager.Views().length > 1) { return '-- multiple selected --'; @@ -1118,21 +1141,23 @@ export class PropertiesView extends React.Component { - {this.openContexts ?
{this.contexts}
: null} + {!this.openContexts ? null : this.contextCount > 0 ?
{this.contexts}
:
There are no other contexts.
} ); } @computed get linksSubMenu() { + return (
+
(this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> Linked To
- {this.openLinks ?
{this.links}
: null} + {!this.openLinks ? null : this.linkCount > 0 ?
{this.links}
:
There are no current links.
}
); } -- cgit v1.2.3-70-g09d2 From 7ba42015e6cc197393254205459d94d681e26f61 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Tue, 6 Jun 2023 17:28:13 -0400 Subject: started changing top section of prop menu --- src/client/views/PropertiesView.scss | 17 +++++++++++++---- src/client/views/PropertiesView.tsx | 9 +++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesView.scss b/src/client/views/PropertiesView.scss index 897be9a32..5e6bd85e6 100644 --- a/src/client/views/PropertiesView.scss +++ b/src/client/views/PropertiesView.scss @@ -15,13 +15,14 @@ overflow-y: auto; .propertiesView-title { - text-align: center; + text-align: left; padding-top: 12px; - padding-bottom: 12px; + // padding-bottom: 12px; + padding-left: 10px; display: flex; - font-size: 18px; + font-size: 25px; font-weight: bold; - justify-content: center; + // justify-content: center; .propertiesView-title-icon { width: 20px; @@ -830,8 +831,16 @@ } } +.propertiesView-wordTitle{ + color:silver; + font-weight:200; +} + .editable-title { border: solid 1px #323232; + padding-left: 5px; + padding-top: 4px; + border-radius: 4px; height: fit-content; &:hover { diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 0007ac84f..3c473498e 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -466,9 +466,13 @@ export class PropertiesView extends React.Component { SelectionManager.Views().forEach(dv => titles.add(StrCast(dv.rootDoc.title))); const title = Array.from(titles.keys()).length > 1 ? '--multiple selected--' : StrCast(this.selectedDoc?.title); return ( -
- title} SetValue={this.setTitle} /> +
+
Title
+
+ title} SetValue={this.setTitle} /> +
+ ); } @@ -1659,6 +1663,7 @@ export class PropertiesView extends React.Component { Presentation
+ {this.editableTitle}
{PresBox.Instance.selectedArray.size} selected
-- cgit v1.2.3-70-g09d2 From 6707f6ad559b463e514bdbbd634ded25bae4a5f7 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Wed, 7 Jun 2023 13:35:24 -0400 Subject: got types but trying to get icon --- src/client/documents/DocumentTypes.ts | 2 +- src/client/documents/Documents.ts | 3 +- src/client/views/PropertiesView.scss | 27 ++++++++++++++++- src/client/views/PropertiesView.tsx | 55 ++++++++++++++++++++++++++++++++--- 4 files changed, 80 insertions(+), 7 deletions(-) (limited to 'src/client/views') diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts index cdc8c275c..bd71281fa 100644 --- a/src/client/documents/DocumentTypes.ts +++ b/src/client/documents/DocumentTypes.ts @@ -2,7 +2,7 @@ export enum DocumentType { NONE = 'none', // core data types - RTF = 'rtf', + RTF = 'rich text', IMG = 'image', WEB = 'web', COL = 'collection', diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 515a870b5..f877f2598 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -430,7 +430,8 @@ export namespace Docs { nativeHeightUnfrozen: true, layout_forceReflow: true, defaultDoubleClick: 'ignore', - }, + systemIcon: 'AiFillFileText' + }, }, ], [ diff --git a/src/client/views/PropertiesView.scss b/src/client/views/PropertiesView.scss index 5e6bd85e6..b3d16d82a 100644 --- a/src/client/views/PropertiesView.scss +++ b/src/client/views/PropertiesView.scss @@ -41,7 +41,7 @@ } .propertiesView-name { - border-bottom: 1px solid black; + // border-bottom: 1px solid black; padding: 8.5px; font-size: 12.5px; @@ -50,6 +50,11 @@ } } + .propertiesView-type{ + padding: 8.5px; + font-size: 12.5px; + } + .propertiesView-settings { //border-bottom: 1px solid black; //padding: 8.5px; @@ -848,6 +853,26 @@ } } +.propertiesView-wordType{ + color:silver; + font-weight:200; +} + +.currentType{ + text-decoration: underline; + display: flex; + align-items:center; + // border: solid 1px #323232; + // padding-left: 5px; + // padding-top: 4px; + // border-radius: 4px; + // height: fit-content; +} + +.currentType-icon{ + margin-right:5px; +} + .properties-flyout { grid-column: 2/4; } diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 3c473498e..c5dd0eaf5 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -2,7 +2,7 @@ import React = require('react'); import { IconLookup } from '@fortawesome/fontawesome-svg-core'; import { faAnchor, faArrowRight, faWindowMaximize } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Checkbox, Tooltip } from '@material-ui/core'; +import { Checkbox, Icon, Tooltip } from '@material-ui/core'; import { intersection } from 'lodash'; import { action, computed, Lambda, observable } from 'mobx'; import { observer } from 'mobx-react'; @@ -34,6 +34,13 @@ import { PropertiesDocBacklinksSelector } from './PropertiesDocBacklinksSelector import { PropertiesDocContextSelector } from './PropertiesDocContextSelector'; import './PropertiesView.scss'; import { DefaultStyleProvider } from './StyleProvider'; +import { RichTextField } from '../../fields/RichTextField'; +import { AiFillFileText } from "react-icons/ai" +import {BsCollectionFill, BsFillFileEarmarkImageFill} from "react-icons/bs" +import { CgBrowser} from "react-icons/cg" +import { ImageField, VideoField, WebField } from '../../fields/URLField'; +import { FaFileVideo } from 'react-icons/fa'; +import { IconButton } from 'browndash-components'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -255,10 +262,7 @@ export class PropertiesView extends React.Component { } @computed get links() { - console.log("this is selected doc" + this.selectedDoc) - // console.log("this is selected doc" + this.selectedDoc) const selAnchor = this.selectedDocumentView?.anchorViewDoc ?? LinkManager.currentLinkAnchor ?? this.selectedDoc; - console.log("this is selAnchor" + selAnchor) return !selAnchor ? null : ; } @@ -462,6 +466,7 @@ export class PropertiesView extends React.Component { }; @computed get editableTitle() { + const titles = new Set(); SelectionManager.Views().forEach(dv => titles.add(StrCast(dv.rootDoc.title))); const title = Array.from(titles.keys()).length > 1 ? '--multiple selected--' : StrCast(this.selectedDoc?.title); @@ -476,6 +481,45 @@ export class PropertiesView extends React.Component { ); } + @computed get currentType() { + // const layoutField = this.selectedDoc?.[Doc.LayoutFieldKey(this.selectedDoc)]; + const documentType = StrCast(this.selectedDoc?.type) + //console.log("this is tyoe " + typezzz) + var currentType: string = ""; + var currentTypeComponent = ; + + currentType = documentType + // currentTypeComponent = //c + //}// else if (layoutField instanceof ImageField){ + // currentType = 'Image' + // currentTypeComponent = + // } else if(layoutField instanceof WebField){ + // currentType = 'Website' + // currentTypeComponent = + // } else if (layoutField instanceof VideoField){ + // currentType = 'Video' + // currentTypeComponent = + // } + + // else{ + // currentType = 'Collection' + // currentTypeComponent = + // } + + return ( +
+
Type
+ +
+ {/* */} + {/* */} + {currentType} +
+
+ + ) + } + @undoBatch @action setTitle = (value: string) => { @@ -1420,6 +1464,9 @@ export class PropertiesView extends React.Component {
{this.editableTitle}
+
{this.currentType}
+ + {this.contextsSubMenu} {this.linksSubMenu} -- cgit v1.2.3-70-g09d2 From ae956f7e5c3d4f95a7a59ce21c79ec0ce665069b Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Thu, 8 Jun 2023 10:11:13 -0400 Subject: staring on thursday --- src/client/views/PropertiesButtons.tsx | 435 +++++++++++++++++---------------- src/client/views/PropertiesView.tsx | 4 +- 2 files changed, 224 insertions(+), 215 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 76828a576..2c88eacc6 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -1,5 +1,5 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Tooltip } from '@material-ui/core'; +import { Icon, Tooltip } from '@material-ui/core'; import { action, computed, observable } from 'mobx'; import { observer } from 'mobx-react'; import { Doc, DocListCast, Opt } from '../../fields/Doc'; @@ -21,6 +21,9 @@ import { DocumentView, OpenWhere } from './nodes/DocumentView'; import { pasteImageBitmap } from './nodes/WebBoxRenderer'; import './PropertiesButtons.scss'; import React = require('react'); +import { JsxElement } from 'typescript'; +import { FaThumbtack } from 'react-icons/fa'; +import { AiOutlineApple } from 'react-icons/ai'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -30,6 +33,7 @@ enum UtilityButtonState { OpenRight, OpenExternally, } + @observer export class PropertiesButtons extends React.Component<{}, {}> { @observable public static Instance: PropertiesButtons; @@ -41,7 +45,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { return !SelectionManager.SelectedSchemaDoc() && SelectionManager.Views().lastElement()?.topMost; } - propertyToggleBtn = (label: string, property: string, tooltip: (on?: any) => string, icon: (on: boolean) => string, onClick?: (dv: Opt, doc: Doc, property: string) => void, useUserDoc?: boolean) => { + propertyToggleBtn = (label: string, property: string, tooltip: (on?: any) => string, icon: (on: boolean) => any, onClick?: (dv: Opt, doc: Doc, property: string) => void, useUserDoc?: boolean) => { const targetDoc = useUserDoc ? Doc.UserDoc() : this.selectedDoc; const onPropToggle = (dv: Opt, doc: Doc, prop: string) => ((dv?.layoutDoc || doc)[prop] = (dv?.layoutDoc || doc)[prop] ? false : true); return !targetDoc ? null : ( @@ -55,7 +59,9 @@ export class PropertiesButtons extends React.Component<{}, {}> { SelectionManager.Views().forEach(dv => (onClick ?? onPropToggle)(dv, dv.rootDoc, property)); } else if (targetDoc) (onClick ?? onPropToggle)(undefined, targetDoc, property); }, property)}> - + {icon((BoolCast(targetDoc?.[property])) as any)} + + {/* */}
{label}
@@ -67,216 +73,217 @@ export class PropertiesButtons extends React.Component<{}, {}> { 'No\xA0Drag', '_lockedPosition', on => `${on ? 'Unlock' : 'Lock'} position to prevent dragging`, - on => 'thumbtack' - ); - } - @computed get maskButton() { - return this.propertyToggleBtn( - 'Mask', - 'stroke_isInkMask', - on => (on ? 'Make plain ink' : 'Make highlight mask'), - on => 'paint-brush', - (dv, doc) => InkingStroke.toggleMask(dv?.layoutDoc || doc) - ); - } - @computed get hideImageButton() { - return this.propertyToggleBtn( - 'Background', - '_hideImage', - on => (on ? 'Show Image' : 'Show Background'), - on => 'portrait' - ); - } - @computed get clustersButton() { - return this.propertyToggleBtn( - 'Clusters', - '_freeform_useClusters', - on => `${on ? 'Hide' : 'Show'} clusters`, - on => 'braille' - ); - } - @computed get panButton() { - return this.propertyToggleBtn( - 'Lock\xA0View', - '_lockedTransform', - on => `${on ? 'Unlock' : 'Lock'} panning of view`, - on => 'lock' - ); - } - @computed get forceActiveButton() { - return this.propertyToggleBtn( - 'Active', - '_forceActive', - on => `${on ? 'Select to activate' : 'Contents always active'} `, - on => 'eye' - ); - } - @computed get fitContentButton() { - return this.propertyToggleBtn( - 'View All', - '_freeform_fitContentsToBox', - on => `${on ? "Don't" : 'Do'} fit content to container visible area`, - on => 'object-group' - ); - } - // this implments a container pattern by marking the targetDoc (collection) as a lightbox - // that always fits its contents to its container and that hides all other documents when - // a link is followed that targets a 'lightbox' destination - @computed get isLightboxButton() { - return this.propertyToggleBtn( - 'Lightbox', - 'isLightbox', - on => `${on ? 'Set' : 'Remove'} lightbox flag`, - on => 'window-restore', - onClick => { - SelectionManager.Views().forEach(dv => { - const containerDoc = dv.rootDoc; - //containerDoc.followAllLinks = - // containerDoc.noShadow = - // containerDoc.disableDocBrushing = - // containerDoc._forceActive = - //containerDoc._freeform_fitContentsToBox = - containerDoc._isLightbox = !containerDoc._isLightbox; - //containerDoc._xPadding = containerDoc._yPadding = containerDoc._isLightbox ? 10 : undefined; - const containerContents = DocListCast(dv.dataDoc[dv.props.fieldKey ?? Doc.LayoutFieldKey(containerDoc)]); - //dv.rootDoc.onClick = ScriptField.MakeScript('{self.data = undefined; documentView.select(false)}', { documentView: 'any' }); - containerContents.forEach(doc => LinkManager.Links(doc).forEach(link => (link.layout_linkDisplay = false))); - }); - } - ); - } - @computed get layout_fitWidthButton() { - return this.propertyToggleBtn( - 'Fit\xA0Width', - '_layout_fitWidth', - on => `${on ? "Don't" : 'Do'} fit content to width of container`, - on => 'arrows-alt-h' - ); - } - @computed get captionButton() { - return this.propertyToggleBtn( - 'Caption', - '_layout_showCaption', - on => `${on ? 'Hide' : 'Show'} caption footer`, - on => 'closed-captioning', - (dv, doc) => ((dv?.rootDoc || doc)._layout_showCaption = (dv?.rootDoc || doc)._layout_showCaption === undefined ? 'caption' : undefined) - ); - } - @computed get chromeButton() { - return this.propertyToggleBtn( - 'Controls', - '_chromeHidden', - on => `${on ? 'Show' : 'Hide'} editing UI`, - on => 'edit', - (dv, doc) => ((dv?.rootDoc || doc)._chromeHidden = !(dv?.rootDoc || doc)._chromeHidden) - ); - } - @computed get titleButton() { - return this.propertyToggleBtn( - 'Title', - '_layout_showTitle', - on => 'Switch between title styles', - on => 'text-width', - (dv, doc) => { - const tdoc = dv?.rootDoc || doc; - const newtitle = !tdoc._layout_showTitle ? 'title' : tdoc._layout_showTitle === 'title' ? 'title:hover' : ''; - tdoc._layout_showTitle = newtitle; - } - ); - } - @computed get layout_autoHeightButton() { - return this.propertyToggleBtn( - 'Auto\xA0Size', - '_layout_autoHeight', - on => `Automatical vertical sizing to show all content`, - on => 'arrows-alt-v' - ); - } - @computed get gridButton() { - return this.propertyToggleBtn( - 'Grid', - '_freeform_backgroundGrid', - on => `Display background grid in collection`, - on => 'border-all' - ); - } - @computed get groupButton() { - return this.propertyToggleBtn( - 'Group', - 'isGroup', - on => `Display collection as a Group`, - on => 'object-group', - (dv, doc) => { - doc.isGroup = !doc.isGroup; - doc.forceActive = doc.isGroup; - } - ); - } - @computed get freezeThumb() { - return this.propertyToggleBtn( - 'FreezeThumb', - '_thumb-frozen', - on => `${on ? 'Freeze' : 'Unfreeze'} thumbnail`, - on => 'snowflake', - (dv, doc) => { - if (doc['thumb-frozen']) doc['thumb-frozen'] = undefined; - else { - document.body.focus(); // so that we can access the clipboard without an error - setTimeout(() => - pasteImageBitmap((data_url: any, error: any) => { - error && console.log(error); - data_url && Utils.convertDataUri(data_url, doc[Id] + '-thumb-frozen', true).then(returnedfilename => (doc['thumb-frozen'] = new ImageField(returnedfilename))); - }) - ); - } - } - ); - } - @computed get snapButton() { - return this.propertyToggleBtn( - 'Snap\xA0Lines', - 'freeform_snapLines', - on => `Display snapping lines when objects are dragged`, - on => 'th', - undefined, - true + on => + // on => 'thumbtack' ); } + // @computed get maskButton() { + // return this.propertyToggleBtn( + // 'Mask', + // 'stroke_isInkMask', + // on => (on ? 'Make plain ink' : 'Make highlight mask'), + // on => 'paint-brush', + // (dv, doc) => InkingStroke.toggleMask(dv?.layoutDoc || doc) + // ); + // } + // @computed get hideImageButton() { + // return this.propertyToggleBtn( + // 'Background', + // '_hideImage', + // on => (on ? 'Show Image' : 'Show Background'), + // on => 'portrait' + // ); + // } + // @computed get clustersButton() { + // return this.propertyToggleBtn( + // 'Clusters', + // '_freeform_useClusters', + // on => `${on ? 'Hide' : 'Show'} clusters`, + // on => 'braille' + // ); + // } + // @computed get panButton() { + // return this.propertyToggleBtn( + // 'Lock\xA0View', + // '_lockedTransform', + // on => `${on ? 'Unlock' : 'Lock'} panning of view`, + // on => 'lock' + // ); + // } + // @computed get forceActiveButton() { + // return this.propertyToggleBtn( + // 'Active', + // '_forceActive', + // on => `${on ? 'Select to activate' : 'Contents always active'} `, + // on => 'eye' + // ); + // } + // @computed get fitContentButton() { + // return this.propertyToggleBtn( + // 'View All', + // '_freeform_fitContentsToBox', + // on => `${on ? "Don't" : 'Do'} fit content to container visible area`, + // on => 'object-group' + // ); + // } + // // this implments a container pattern by marking the targetDoc (collection) as a lightbox + // // that always fits its contents to its container and that hides all other documents when + // // a link is followed that targets a 'lightbox' destination + // @computed get isLightboxButton() { + // return this.propertyToggleBtn( + // 'Lightbox', + // 'isLightbox', + // on => `${on ? 'Set' : 'Remove'} lightbox flag`, + // on => 'window-restore', + // onClick => { + // SelectionManager.Views().forEach(dv => { + // const containerDoc = dv.rootDoc; + // //containerDoc.followAllLinks = + // // containerDoc.noShadow = + // // containerDoc.disableDocBrushing = + // // containerDoc._forceActive = + // //containerDoc._freeform_fitContentsToBox = + // containerDoc._isLightbox = !containerDoc._isLightbox; + // //containerDoc._xPadding = containerDoc._yPadding = containerDoc._isLightbox ? 10 : undefined; + // const containerContents = DocListCast(dv.dataDoc[dv.props.fieldKey ?? Doc.LayoutFieldKey(containerDoc)]); + // //dv.rootDoc.onClick = ScriptField.MakeScript('{self.data = undefined; documentView.select(false)}', { documentView: 'any' }); + // containerContents.forEach(doc => LinkManager.Links(doc).forEach(link => (link.layout_linkDisplay = false))); + // }); + // } + // ); + // } + // @computed get layout_fitWidthButton() { + // return this.propertyToggleBtn( + // 'Fit\xA0Width', + // '_layout_fitWidth', + // on => `${on ? "Don't" : 'Do'} fit content to width of container`, + // on => 'arrows-alt-h' + // ); + // } + // @computed get captionButton() { + // return this.propertyToggleBtn( + // 'Caption', + // '_layout_showCaption', + // on => `${on ? 'Hide' : 'Show'} caption footer`, + // on => 'closed-captioning', + // (dv, doc) => ((dv?.rootDoc || doc)._layout_showCaption = (dv?.rootDoc || doc)._layout_showCaption === undefined ? 'caption' : undefined) + // ); + // } + // @computed get chromeButton() { + // return this.propertyToggleBtn( + // 'Controls', + // '_chromeHidden', + // on => `${on ? 'Show' : 'Hide'} editing UI`, + // on => 'edit', + // (dv, doc) => ((dv?.rootDoc || doc)._chromeHidden = !(dv?.rootDoc || doc)._chromeHidden) + // ); + // } + // @computed get titleButton() { + // return this.propertyToggleBtn( + // 'Title', + // '_layout_showTitle', + // on => 'Switch between title styles', + // on => 'text-width', + // (dv, doc) => { + // const tdoc = dv?.rootDoc || doc; + // const newtitle = !tdoc._layout_showTitle ? 'title' : tdoc._layout_showTitle === 'title' ? 'title:hover' : ''; + // tdoc._layout_showTitle = newtitle; + // } + // ); + // } + // @computed get layout_autoHeightButton() { + // return this.propertyToggleBtn( + // 'Auto\xA0Size', + // '_layout_autoHeight', + // on => `Automatical vertical sizing to show all content`, + // on => 'arrows-alt-v' + // ); + // } + // @computed get gridButton() { + // return this.propertyToggleBtn( + // 'Grid', + // '_freeform_backgroundGrid', + // on => `Display background grid in collection`, + // on => 'border-all' + // ); + // } + // @computed get groupButton() { + // return this.propertyToggleBtn( + // 'Group', + // 'isGroup', + // on => `Display collection as a Group`, + // on => 'object-group', + // (dv, doc) => { + // doc.isGroup = !doc.isGroup; + // doc.forceActive = doc.isGroup; + // } + // ); + // } + // @computed get freezeThumb() { + // return this.propertyToggleBtn( + // 'FreezeThumb', + // '_thumb-frozen', + // on => `${on ? 'Freeze' : 'Unfreeze'} thumbnail`, + // on => 'snowflake', + // (dv, doc) => { + // if (doc['thumb-frozen']) doc['thumb-frozen'] = undefined; + // else { + // document.body.focus(); // so that we can access the clipboard without an error + // setTimeout(() => + // pasteImageBitmap((data_url: any, error: any) => { + // error && console.log(error); + // data_url && Utils.convertDataUri(data_url, doc[Id] + '-thumb-frozen', true).then(returnedfilename => (doc['thumb-frozen'] = new ImageField(returnedfilename))); + // }) + // ); + // } + // } + // ); + // } + // @computed get snapButton() { + // return this.propertyToggleBtn( + // 'Snap\xA0Lines', + // 'freeform_snapLines', + // on => `Display snapping lines when objects are dragged`, + // on => 'th', + // undefined, + // true + // ); + // } - @computed - get onClickButton() { - return !this.selectedDoc ? null : ( - Choose onClick behavior} placement="top"> -
-
- -
e.stopPropagation()}> - -
-
-
-
onclick
-
-
- ); - } - @computed - get perspectiveButton() { - return !this.selectedDoc ? null : ( - Choose view perspective} placement="top"> -
-
- -
e.stopPropagation()}> - -
-
-
-
Perspective
-
-
- ); - } + // @computed + // get onClickButton() { + // return !this.selectedDoc ? null : ( + // Choose onClick behavior} placement="top"> + //
+ //
+ // + //
e.stopPropagation()}> + // + //
+ //
+ //
+ //
onclick
+ //
+ //
+ // ); + // } + // @computed + // get perspectiveButton() { + // return !this.selectedDoc ? null : ( + // Choose view perspective} placement="top"> + //
+ //
+ // + //
e.stopPropagation()}> + // + //
+ //
+ //
+ //
Perspective
+ //
+ //
+ // ); + // } @undoBatch handlePerspectiveChange = (e: any) => { @@ -407,10 +414,10 @@ export class PropertiesButtons extends React.Component<{}, {}> { const isNovice = Doc.noviceMode; return !this.selectedDoc ? null : (
- {toggle(this.titleButton)} - {toggle(this.captionButton)} + {/* {toggle(this.titleButton)} + {toggle(this.captionButton)} */} {toggle(this.lockButton)} - {toggle(this.onClickButton)} + {/* {toggle(this.onClickButton)} {toggle(this.layout_fitWidthButton)} {toggle(this.freezeThumb)} {toggle(this.forceActiveButton)} @@ -425,7 +432,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} {toggle(this.clustersButton, { display: !isFreeForm ? 'none' : '' })} {toggle(this.panButton, { display: !isFreeForm ? 'none' : '' })} - {toggle(this.perspectiveButton, { display: !isCollection || isNovice ? 'none' : '' })} + {toggle(this.perspectiveButton, { display: !isCollection || isNovice ? 'none' : '' })} */}
); } diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index c5dd0eaf5..5ba71b815 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -486,7 +486,7 @@ export class PropertiesView extends React.Component { const documentType = StrCast(this.selectedDoc?.type) //console.log("this is tyoe " + typezzz) var currentType: string = ""; - var currentTypeComponent = ; + var currentTypeComponent = ; currentType = documentType // currentTypeComponent = //c @@ -511,8 +511,10 @@ export class PropertiesView extends React.Component {
Type
+ {/* */} {/* */} + {/* {currentTypeComponent} */} {currentType}
-- cgit v1.2.3-70-g09d2 From baf6955c9c4d4dc79df072778449f882aa63d68e Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Thu, 8 Jun 2023 13:37:37 -0400 Subject: got icon through string working but broke something in links --- src/client/documents/Documents.ts | 18 ++++----- src/client/views/PropertiesView.tsx | 78 +++++++++++++++++++++---------------- 2 files changed, 54 insertions(+), 42 deletions(-) (limited to 'src/client/views') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index f877f2598..e5168c882 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -430,7 +430,7 @@ export namespace Docs { nativeHeightUnfrozen: true, layout_forceReflow: true, defaultDoubleClick: 'ignore', - systemIcon: 'AiFillFileText' + systemIcon : 'BsFileEarmarkTextFill' }, }, ], @@ -452,21 +452,21 @@ export namespace Docs { DocumentType.IMG, { layout: { view: ImageBox, dataField: defaultDataKey }, - options: { freeform: '' }, + options: { freeform: '', systemIcon: 'BsFileEarmarkImageFill' }, }, ], [ DocumentType.WEB, { layout: { view: WebBox, dataField: defaultDataKey }, - options: { _height: 300, _layout_fitWidth: true, nativeDimModifiable: true, nativeHeightUnfrozen: true, waitForDoubleClickToClick: 'always' }, + options: { _height: 300, _layout_fitWidth: true, nativeDimModifiable: true, nativeHeightUnfrozen: true, waitForDoubleClickToClick: 'always', systemIcon: 'BsGlobe' }, }, ], [ DocumentType.COL, { layout: { view: CollectionView, dataField: defaultDataKey }, - options: { _layout_fitWidth: true, freeform: '', _freeform_panX: 0, _freeform_panY: 0, _freeform_scale: 1 }, + options: { _layout_fitWidth: true, freeform: '', _freeform_panX: 0, _freeform_panY: 0, _freeform_scale: 1, systemIcon: 'BsFillCollectionFill' }, }, ], [ @@ -480,35 +480,35 @@ export namespace Docs { DocumentType.VID, { layout: { view: VideoBox, dataField: defaultDataKey }, - options: { _layout_currentTimecode: 0 }, + options: { _layout_currentTimecode: 0, systemIcon: 'BsFileEarmarkPlayFill' }, }, ], [ DocumentType.AUDIO, { layout: { view: AudioBox, dataField: defaultDataKey }, - options: { _height: 100, layout_fitWidth: true, layout_forceReflow: true, nativeDimModifiable: true }, + options: { _height: 100, layout_fitWidth: true, layout_forceReflow: true, nativeDimModifiable: true, systemIcon: 'BsFillVolumeUpFill' }, }, ], [ DocumentType.REC, { layout: { view: VideoBox, dataField: defaultDataKey }, - options: { _height: 100, backgroundColor: 'pink' }, + options: { _height: 100, backgroundColor: 'pink', systemIcon: 'BsFillMicFill' }, }, ], [ DocumentType.PDF, { layout: { view: PDFBox, dataField: defaultDataKey }, - options: { _layout_curPage: 1, _layout_fitWidth: true, nativeDimModifiable: true, nativeHeightUnfrozen: true }, + options: { _layout_curPage: 1, _layout_fitWidth: true, nativeDimModifiable: true, nativeHeightUnfrozen: true, systemIcon: 'BsFileEarmarkPdfFill' }, }, ], [ DocumentType.MAP, { layout: { view: MapBox, dataField: defaultDataKey }, - options: { _height: 600, _width: 800, nativeDimModifiable: true }, + options: { _height: 600, _width: 800, nativeDimModifiable: true, systemIcon: 'BsFillPinMapFill' }, }, ], [ diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 5ba71b815..a6c94d0d9 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -35,12 +35,14 @@ import { PropertiesDocContextSelector } from './PropertiesDocContextSelector'; import './PropertiesView.scss'; import { DefaultStyleProvider } from './StyleProvider'; import { RichTextField } from '../../fields/RichTextField'; -import { AiFillFileText } from "react-icons/ai" -import {BsCollectionFill, BsFillFileEarmarkImageFill} from "react-icons/bs" +import { AiFillFileText } from "react-icons/ai" //* as Icons from "react-icons/ai" // +import * as Icons from "react-icons/bs" //{BsCollectionFill, BsFillFileEarmarkImageFill} from "react-icons/bs" import { CgBrowser} from "react-icons/cg" import { ImageField, VideoField, WebField } from '../../fields/URLField'; -import { FaFileVideo } from 'react-icons/fa'; +import { FaFileVideo } from 'react-icons/fa'; //* as Icons from "react-icons/fa"; // import { IconButton } from 'browndash-components'; +import { IconBase } from 'react-icons'; +import { MdOutlineMedicalServices } from 'react-icons/md'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -268,8 +270,16 @@ export class PropertiesView extends React.Component { @computed get linkCount(){ const selAnchor = this.selectedDocumentView?.anchorViewDoc ?? LinkManager.currentLinkAnchor ?? this.selectedDoc; + + if (this.links === null){ + console.log("this is where i want to be") + } + console.log("this is based on links() " + this.links?.key) + if (selAnchor != undefined){ + console.log("thsi si selAnchr " + selAnchor.links) const links = DocListCast(selAnchor.links) + console.log("we linkin yo " + links) return links.length } else{ return 0 @@ -481,42 +491,43 @@ export class PropertiesView extends React.Component { ); } + @computed get currentComponent() { + + var iconName = StrCast(this.selectedDoc?.systemIcon) + + // if (this.selectedDoc?.type === DocumentType.COL){ + // console.log("i did it!") + // } + + + if (iconName){ + const Icon = Icons[iconName as keyof typeof Icons]; + return ; + } else{ + return + + } + } + @computed get currentType() { - // const layoutField = this.selectedDoc?.[Doc.LayoutFieldKey(this.selectedDoc)]; + console.log("current type " + this.selectedDoc?.type) + const documentType = StrCast(this.selectedDoc?.type) - //console.log("this is tyoe " + typezzz) - var currentType: string = ""; - var currentTypeComponent = ; - - currentType = documentType - // currentTypeComponent = //c - //}// else if (layoutField instanceof ImageField){ - // currentType = 'Image' - // currentTypeComponent = - // } else if(layoutField instanceof WebField){ - // currentType = 'Website' - // currentTypeComponent = - // } else if (layoutField instanceof VideoField){ - // currentType = 'Video' - // currentTypeComponent = - // } - - // else{ - // currentType = 'Collection' - // currentTypeComponent = - // } + var currentType: string = documentType; + var capitalizedDocType = currentType.charAt(0).toUpperCase() + currentType.slice(1) return (
-
Type
- +
Type
- - {/* */} - {/* */} - {/* {currentTypeComponent} */} - {currentType} +
+ {this.currentComponent} +
+ + {capitalizedDocType} +
+
) @@ -1207,7 +1218,8 @@ export class PropertiesView extends React.Component { - {!this.openLinks ? null : this.linkCount > 0 ?
{this.links}
:
There are no current links.
} + {/* {!this.openLinks ? null : this.linkCount > 0 ?
{this.links}
:
There are no current links.
} */} + {!this.openLinks ? null :
{this.links}
} ); } -- cgit v1.2.3-70-g09d2 From aae37436b520e03c4d403f22bd61c9849c1938ec Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Thu, 8 Jun 2023 16:05:45 -0400 Subject: fixed linking bug; added more icons - cant add icon for simulation and equation; look at more types to add icons --- src/client/documents/Documents.ts | 6 +++--- src/client/util/CaptureManager.tsx | 1 - src/client/views/PropertiesView.tsx | 25 ++++++++++--------------- 3 files changed, 13 insertions(+), 19 deletions(-) (limited to 'src/client/views') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index e5168c882..8f62a484f 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -575,7 +575,7 @@ export namespace Docs { DocumentType.EQUATION, { layout: { view: EquationBox, dataField: 'text' }, - options: { nativeDimModifiable: true, fontSize: '14px', layout_hideResizeHandles: true, layout_hideDecorationTitle: true }, + options: { nativeDimModifiable: true, fontSize: '14px', layout_hideResizeHandles: true, layout_hideDecorationTitle: true}, }, ], [ @@ -639,7 +639,7 @@ export namespace Docs { { // NOTE: this is unused!! ink fields are filled in directly within the InkDocument() method layout: { view: InkingStroke, dataField: 'stroke' }, - options: {}, + options: { systemIcon: 'BsFillPencilFill'}, }, ], [ @@ -691,7 +691,7 @@ export namespace Docs { { data: '', layout: { view: PhysicsSimulationBox, dataField: defaultDataKey, _width: 1000, _height: 800 }, - options: { _height: 100, layout_forceReflow: true, nativeHeightUnfrozen: true, mass1: '', mass2: '', nativeDimModifiable: true, position: '', acceleration: '', pendulum: '', spring: '', wedge: '', simulation: '', review: '' }, + options: { _height: 100, layout_forceReflow: true, nativeHeightUnfrozen: true, mass1: '', mass2: '', nativeDimModifiable: true, position: '', acceleration: '', pendulum: '', spring: '', wedge: '', simulation: '', review: ''}, }, ], ]); diff --git a/src/client/util/CaptureManager.tsx b/src/client/util/CaptureManager.tsx index d68761ba7..f42336ee7 100644 --- a/src/client/util/CaptureManager.tsx +++ b/src/client/util/CaptureManager.tsx @@ -58,7 +58,6 @@ export class CaptureManager extends React.Component<{}> { ) ); } - return (
Links
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index a6c94d0d9..d956c874c 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -270,20 +270,13 @@ export class PropertiesView extends React.Component { @computed get linkCount(){ const selAnchor = this.selectedDocumentView?.anchorViewDoc ?? LinkManager.currentLinkAnchor ?? this.selectedDoc; - - if (this.links === null){ - console.log("this is where i want to be") - } - console.log("this is based on links() " + this.links?.key) + var counter = 0; - if (selAnchor != undefined){ - console.log("thsi si selAnchr " + selAnchor.links) - const links = DocListCast(selAnchor.links) - console.log("we linkin yo " + links) - return links.length - } else{ - return 0 - } + LinkManager.Links(selAnchor).forEach((l, i) => + counter ++ + ); + + return counter; } @computed get layoutPreview() { @@ -1208,6 +1201,8 @@ export class PropertiesView extends React.Component { } @computed get linksSubMenu() { + // this.linkCount + // this.links return (
@@ -1218,8 +1213,8 @@ export class PropertiesView extends React.Component {
- {/* {!this.openLinks ? null : this.linkCount > 0 ?
{this.links}
:
There are no current links.
} */} - {!this.openLinks ? null :
{this.links}
} + {!this.openLinks ? null : this.linkCount > 0 ?
{this.links}
:
There are no current links.
} + {/* {!this.openLinks ? null :
{this.links}
} */} ); } -- cgit v1.2.3-70-g09d2 From 6de23b772d7d40d75d60abd3343c1f6fd684b06f Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Mon, 12 Jun 2023 14:05:37 -0400 Subject: fixing options --- src/client/documents/Documents.ts | 4 +- src/client/views/MainView.scss | 4 +- src/client/views/PropertiesButtons.scss | 98 +++++++++++++++++++++------------ src/client/views/PropertiesButtons.tsx | 36 ++++++------ src/client/views/PropertiesView.scss | 4 +- 5 files changed, 88 insertions(+), 58 deletions(-) (limited to 'src/client/views') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 478209fe9..e9cae76e4 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -575,7 +575,7 @@ export namespace Docs { DocumentType.EQUATION, { layout: { view: EquationBox, dataField: 'text' }, - options: { nativeDimModifiable: true, fontSize: '14px', layout_hideResizeHandles: true, layout_hideDecorationTitle: true, }, ///systemIcon: 'BsSuperscript' + BsSubscript + options: { nativeDimModifiable: true, fontSize: '14px', layout_hideResizeHandles: true, layout_hideDecorationTitle: true, systemIcon: 'BsCalculatorFill' }, ///systemIcon: 'BsSuperscript' + BsSubscript }, ], [ @@ -691,7 +691,7 @@ export namespace Docs { { data: '', layout: { view: PhysicsSimulationBox, dataField: defaultDataKey, _width: 1000, _height: 800 }, - options: { _height: 100, layout_forceReflow: true, nativeHeightUnfrozen: true, mass1: '', mass2: '', nativeDimModifiable: true, position: '', acceleration: '', pendulum: '', spring: '', wedge: '', simulation: '', review: '' }, + options: { _height: 100, layout_forceReflow: true, nativeHeightUnfrozen: true, mass1: '', mass2: '', nativeDimModifiable: true, position: '', acceleration: '', pendulum: '', spring: '', wedge: '', simulation: '', review: '', systemIcon: 'BsShareFill' }, }, ], ]); diff --git a/src/client/views/MainView.scss b/src/client/views/MainView.scss index b95ce0e99..eee9066b5 100644 --- a/src/client/views/MainView.scss +++ b/src/client/views/MainView.scss @@ -198,10 +198,10 @@ h1, left: 0; position: absolute; z-index: 2; - background-color: $light-gray; + background-color: linen;//$light-gray; .editable-title { - background-color: $light-gray; + background-color: linen;//$light-gray; } } } diff --git a/src/client/views/PropertiesButtons.scss b/src/client/views/PropertiesButtons.scss index 36b2df73e..f571dcf25 100644 --- a/src/client/views/PropertiesButtons.scss +++ b/src/client/views/PropertiesButtons.scss @@ -20,22 +20,31 @@ $linkGap : 3px; .propertiesButtons-linkButton-empty, .propertiesButtons-linkButton-nonempty { - height: 25px; - width: 29px; - border-radius: 6px; - pointer-events: auto; - background-color: $dark-gray; - color: #fcfbf7; - text-transform: uppercase; - letter-spacing: 2px; - font-size: 75%; - transition: transform 0.2s; - text-align: center; + // margin-right: 7px; + // margin-left: 8px; + height: 28px; + width: 226px;//29px; display: flex; - justify-content: center; align-items: center; - margin-right: 10px; - margin-left: 4px; + // height: 25px; + // width: 230px;//29px; + // display: flex; + // align-items: center; + // border-radius: 6px; + pointer-events: auto; + // background-color: $dark-gray; + // color: #fcfbf7; + // text-transform: uppercase; + // letter-spacing: 2px; + // font-size: 75%; + transition: transform 0.2s; + // text-align: center; + + + // justify-content: center; + + // margin-right: 10px; + // margin-left: 4px; &:hover { background: $medium-gray; @@ -52,19 +61,24 @@ $linkGap : 3px; color: $black; } .propertiesButtons-linkButton-empty.toggle-off { - background-color: $dark-gray; - color: white; + background-color: white;//$dark-gray; + color: black; //white; +} + +.propertiesButtons-icon { + margin-left:8px; } .propertiesButtons { - margin-top: 3px; - grid-column: 1/4; - width: 100%; - height: auto; - display: flex; - flex-direction: row; - flex-wrap: wrap; - padding-bottom: 5.5px; + position:relative; + // margin-top: 3px; +// // grid-column: 1/4; +// width: 100%; +// height: auto; +// display: flex; +// // flex-direction: row; +// // flex-wrap: wrap; +// padding-bottom: 5.5px; } .onClickFlyout-editScript { @@ -110,18 +124,32 @@ $linkGap : 3px; } } -.propertiesButtons-title { - background: $dark-gray; - color: $white; - font-size: 6px; - width: 37px; - padding: 3px; - height: 12px; - border-radius: 7px; +// .propertiesButtons-iconAndText{ +// height: 28px; +// width: 220px;//29px; +// display: flex; +// align-items: center; +// background-color: white; +// } + +.propertiesButtons-label { text-transform: uppercase; - text-align: center; - margin-top: -4px; -} + margin-left: 8px; + // margin-right: 50 px; +} + +// .propertiesButtons-title { +// background: pink; //$dark-gray; +// color: $white; +// font-size: 6px; +// width: 37px; +// padding: 3px; +// height: 12px; +// border-radius: 7px; +// text-transform: uppercase; +// text-align: center; +// margin-top: -4px; +// } .propertiesButtons-linker { height: 25px; diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 2c88eacc6..247368685 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -22,7 +22,7 @@ import { pasteImageBitmap } from './nodes/WebBoxRenderer'; import './PropertiesButtons.scss'; import React = require('react'); import { JsxElement } from 'typescript'; -import { FaThumbtack } from 'react-icons/fa'; +import { FaBraille, FaThumbtack } from 'react-icons/fa'; import { AiOutlineApple } from 'react-icons/ai'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; @@ -50,7 +50,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { const onPropToggle = (dv: Opt, doc: Doc, prop: string) => ((dv?.layoutDoc || doc)[prop] = (dv?.layoutDoc || doc)[prop] ? false : true); return !targetDoc ? null : ( {tooltip(targetDoc?.[property])} } placement="top"> -
+
e.stopPropagation()} @@ -59,11 +59,13 @@ export class PropertiesButtons extends React.Component<{}, {}> { SelectionManager.Views().forEach(dv => (onClick ?? onPropToggle)(dv, dv.rootDoc, property)); } else if (targetDoc) (onClick ?? onPropToggle)(undefined, targetDoc, property); }, property)}> - {icon((BoolCast(targetDoc?.[property])) as any)} - +
{icon((BoolCast(targetDoc?.[property])) as any)}
+ +
{label}
{/* */}
-
{label}
+ +
); @@ -94,14 +96,14 @@ export class PropertiesButtons extends React.Component<{}, {}> { // on => 'portrait' // ); // } - // @computed get clustersButton() { - // return this.propertyToggleBtn( - // 'Clusters', - // '_freeform_useClusters', - // on => `${on ? 'Hide' : 'Show'} clusters`, - // on => 'braille' - // ); - // } + @computed get clustersButton() { + return this.propertyToggleBtn( + 'Clusters', + '_freeform_useClusters', + on => `${on ? 'Hide' : 'Show'} clusters`, + on => + ); + } // @computed get panButton() { // return this.propertyToggleBtn( // 'Lock\xA0View', @@ -416,8 +418,8 @@ export class PropertiesButtons extends React.Component<{}, {}> {
{/* {toggle(this.titleButton)} {toggle(this.captionButton)} */} - {toggle(this.lockButton)} - {/* {toggle(this.onClickButton)} + {toggle(this.lockButton)} + {/*{toggle(this.onClickButton)} {toggle(this.layout_fitWidthButton)} {toggle(this.freezeThumb)} {toggle(this.forceActiveButton)} @@ -429,9 +431,9 @@ export class PropertiesButtons extends React.Component<{}, {}> { {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} {toggle(this.gridButton, { display: !isCollection ? 'none' : '' })} {toggle(this.groupButton, { display: isTabView || !isCollection ? 'none' : '' })} - {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} + {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} */} {toggle(this.clustersButton, { display: !isFreeForm ? 'none' : '' })} - {toggle(this.panButton, { display: !isFreeForm ? 'none' : '' })} + {/* {toggle(this.panButton, { display: !isFreeForm ? 'none' : '' })} {toggle(this.perspectiveButton, { display: !isCollection || isNovice ? 'none' : '' })} */}
); diff --git a/src/client/views/PropertiesView.scss b/src/client/views/PropertiesView.scss index b3d16d82a..49f2fc6fe 100644 --- a/src/client/views/PropertiesView.scss +++ b/src/client/views/PropertiesView.scss @@ -837,7 +837,7 @@ } .propertiesView-wordTitle{ - color:silver; + color:darkslategray; font-weight:200; } @@ -854,7 +854,7 @@ } .propertiesView-wordType{ - color:silver; + color:darkslategray; font-weight:200; } -- cgit v1.2.3-70-g09d2 From 31311af1d7a10883f2f9e0fb84cb279da6a318be Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Wed, 14 Jun 2023 12:59:02 -0400 Subject: basics double clicking, fixed customizable options for icons and text --- src/client/views/PropertiesButtons.tsx | 102 ++++++++++++++++++--------------- src/client/views/PropertiesView.tsx | 5 +- 2 files changed, 59 insertions(+), 48 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 247368685..3d61ee273 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -22,8 +22,10 @@ import { pasteImageBitmap } from './nodes/WebBoxRenderer'; import './PropertiesButtons.scss'; import React = require('react'); import { JsxElement } from 'typescript'; -import { FaBraille, FaThumbtack } from 'react-icons/fa'; -import { AiOutlineApple } from 'react-icons/ai'; +import { FaBraille, FaHighlighter, FaThumbtack } from 'react-icons/fa'; +import { AiOutlineApple, AiOutlinePicture } from 'react-icons/ai'; +import { MdSubtitles, MdSubtitlesOff } from 'react-icons/md'; +import {TbHighlight, TbHighlightOff} from 'react-icons/tb' const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -45,9 +47,12 @@ export class PropertiesButtons extends React.Component<{}, {}> { return !SelectionManager.SelectedSchemaDoc() && SelectionManager.Views().lastElement()?.topMost; } - propertyToggleBtn = (label: string, property: string, tooltip: (on?: any) => string, icon: (on: boolean) => any, onClick?: (dv: Opt, doc: Doc, property: string) => void, useUserDoc?: boolean) => { + propertyToggleBtn = (label: (on?: any) => string, property: string, tooltip: (on?: any) => string, icon: (on?: any) => any, onClick?: (dv: Opt, doc: Doc, property: string) => void, useUserDoc?: boolean) => { const targetDoc = useUserDoc ? Doc.UserDoc() : this.selectedDoc; const onPropToggle = (dv: Opt, doc: Doc, prop: string) => ((dv?.layoutDoc || doc)[prop] = (dv?.layoutDoc || doc)[prop] ? false : true); + + console.log("current icon " + icon((targetDoc?.[property]))) + return !targetDoc ? null : ( {tooltip(targetDoc?.[property])}
} placement="top">
@@ -59,9 +64,9 @@ export class PropertiesButtons extends React.Component<{}, {}> { SelectionManager.Views().forEach(dv => (onClick ?? onPropToggle)(dv, dv.rootDoc, property)); } else if (targetDoc) (onClick ?? onPropToggle)(undefined, targetDoc, property); }, property)}> -
{icon((BoolCast(targetDoc?.[property])) as any)}
+
{icon((targetDoc?.[property]) as any)}
-
{label}
+
{label(targetDoc?.[property])}
{/* */}
@@ -70,35 +75,54 @@ export class PropertiesButtons extends React.Component<{}, {}> {
); }; - @computed get lockButton() { + + + + @computed get titleButton() { return this.propertyToggleBtn( - 'No\xA0Drag', - '_lockedPosition', - on => `${on ? 'Unlock' : 'Lock'} position to prevent dragging`, - on => - // on => 'thumbtack' + on => !on ? 'SHOW TITLE' : (this.selectedDoc?.['_layout_showTitle']) === 'title:hover' ? 'REMOVE TITLE' : 'HOVER TITLE' , + '_layout_showTitle', + on => 'Switch between title styles', + on => on ? : , // {currentIcon}, //(on ? :) , //,'text-width', on ? : , + (dv, doc) => { + const tdoc = dv?.rootDoc || doc; + const newtitle = !tdoc._layout_showTitle ? 'title' : tdoc._layout_showTitle === 'title' ? 'title:hover' : ''; + tdoc._layout_showTitle = newtitle; + } ); } - // @computed get maskButton() { - // return this.propertyToggleBtn( - // 'Mask', - // 'stroke_isInkMask', - // on => (on ? 'Make plain ink' : 'Make highlight mask'), - // on => 'paint-brush', - // (dv, doc) => InkingStroke.toggleMask(dv?.layoutDoc || doc) - // ); - // } - // @computed get hideImageButton() { + + // @computed get lockButton() { // return this.propertyToggleBtn( - // 'Background', - // '_hideImage', - // on => (on ? 'Show Image' : 'Show Background'), - // on => 'portrait' + // 'No\xA0Drag', + // '_lockedPosition', + // on => `${on ? 'Unlock' : 'Lock'} position to prevent dragging`, + // on => + // // on => 'thumbtack' // ); // } + @computed get maskButton() { //highlight text while going down and reading through + return this.propertyToggleBtn( + on => on ? 'PLAIN INK': 'HIGHLIGHTER MASK', + 'stroke_isInkMask', + on => (on ? 'Make plain ink' : 'Make highlight mask'), + on => on ? : , // ,// 'paint-brush', + (dv, doc) => InkingStroke.toggleMask(dv?.layoutDoc || doc) + ); + } + + @computed get hideImageButton() { // put in developer -- can trace on top of object and drawing is still there + return this.propertyToggleBtn( + on => 'Background', + '_hideImage', + on => (on ? 'Show Image' : 'Show Background'), + on => //'portrait' + ); + } + @computed get clustersButton() { return this.propertyToggleBtn( - 'Clusters', + on =>'Clusters', '_freeform_useClusters', on => `${on ? 'Hide' : 'Show'} clusters`, on => @@ -180,19 +204,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { // (dv, doc) => ((dv?.rootDoc || doc)._chromeHidden = !(dv?.rootDoc || doc)._chromeHidden) // ); // } - // @computed get titleButton() { - // return this.propertyToggleBtn( - // 'Title', - // '_layout_showTitle', - // on => 'Switch between title styles', - // on => 'text-width', - // (dv, doc) => { - // const tdoc = dv?.rootDoc || doc; - // const newtitle = !tdoc._layout_showTitle ? 'title' : tdoc._layout_showTitle === 'title' ? 'title:hover' : ''; - // tdoc._layout_showTitle = newtitle; - // } - // ); - // } + // @computed get layout_autoHeightButton() { // return this.propertyToggleBtn( // 'Auto\xA0Size', @@ -416,19 +428,19 @@ export class PropertiesButtons extends React.Component<{}, {}> { const isNovice = Doc.noviceMode; return !this.selectedDoc ? null : (
- {/* {toggle(this.titleButton)} - {toggle(this.captionButton)} */} - {toggle(this.lockButton)} + {toggle(this.titleButton)} + {/* {toggle(this.captionButton)} */} + {/* {toggle(this.lockButton)} */} {/*{toggle(this.onClickButton)} {toggle(this.layout_fitWidthButton)} {toggle(this.freezeThumb)} {toggle(this.forceActiveButton)} {toggle(this.fitContentButton, { display: !isFreeForm && !isMap ? 'none' : '' })} {toggle(this.isLightboxButton, { display: !isFreeForm && !isMap ? 'none' : '' })} - {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })} + {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })}*/} {toggle(this.maskButton, { display: !isInk ? 'none' : '' })} - {toggle(this.hideImageButton, { display: !isImage ? 'none' : '' })} - {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} + {toggle(this.hideImageButton, { display: !isImage ? 'none' : '' })} + {/* {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} {toggle(this.gridButton, { display: !isCollection ? 'none' : '' })} {toggle(this.groupButton, { display: isTabView || !isCollection ? 'none' : '' })} {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} */} diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index d956c874c..8d496e992 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -1201,13 +1201,12 @@ export class PropertiesView extends React.Component { } @computed get linksSubMenu() { - // this.linkCount - // this.links + // onPointerDown={action(() => (this.openLinks = !this.openLinks))} return (
-
(this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> +
(this.openContexts = !this.openContexts, this.openOptions = !this.openOptions, this.openTransform = !this.openTransform))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> Linked To
-- cgit v1.2.3-70-g09d2 From 96abb67130a29c472209eca74d90844090034640 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Wed, 14 Jun 2023 15:42:51 -0400 Subject: trying to fix double click --- src/client/views/PropertiesView.tsx | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 8d496e992..9c327b3f1 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -43,6 +43,7 @@ import { FaFileVideo } from 'react-icons/fa'; //* as Icons from "react-icons/fa" import { IconButton } from 'browndash-components'; import { IconBase } from 'react-icons'; import { MdOutlineMedicalServices } from 'react-icons/md'; +import { createPromiseCapability } from 'pdfjs-dist'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -1200,13 +1201,37 @@ export class PropertiesView extends React.Component { ); } + @computed get doubleClickClose() { + //action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = !this.openTransform)) + //console.log(this.openContexts + " hello " + this.openOptions + this.openTransform + this.openLinks + this.openFields) + if (this.openContexts || this.openOptions || this.openTransform || this.openLinks || this.openFields){ + this.openContexts = false; + this.openOptions = false; + this.openTransform = false; + this.openLinks = false; + this.openFields = false; + + } else if (!this.openContexts && !this.openOptions && !this.openTransform && !this.openLinks && !this.openFields){ + this.openContexts = true; + this.openOptions = true; + this.openTransform = true; + this.openLinks = true; + this.openFields = true; + + } + + return ( + console.log("made") + ) + } + @computed get linksSubMenu() { // onPointerDown={action(() => (this.openLinks = !this.openLinks))} return (
-
(this.openContexts = !this.openContexts, this.openOptions = !this.openOptions, this.openTransform = !this.openTransform))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> +
( this.doubleClickClose, this.openLinks = true))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> Linked To
-- cgit v1.2.3-70-g09d2 From 7f132b33ec74fe86d8164b528458a5c2d4aca9cf Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Fri, 16 Jun 2023 10:03:25 -0400 Subject: changing parts about buttons --- src/client/views/PropertiesButtons.tsx | 66 +++++++++++++++++----------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 3d61ee273..fc56ec861 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -25,7 +25,8 @@ import { JsxElement } from 'typescript'; import { FaBraille, FaHighlighter, FaThumbtack } from 'react-icons/fa'; import { AiOutlineApple, AiOutlinePicture } from 'react-icons/ai'; import { MdSubtitles, MdSubtitlesOff } from 'react-icons/md'; -import {TbHighlight, TbHighlightOff} from 'react-icons/tb' +import { TbHighlight, TbHighlightOff } from 'react-icons/tb'; +import { BiHide, BiShow } from 'react-icons/bi'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -51,11 +52,11 @@ export class PropertiesButtons extends React.Component<{}, {}> { const targetDoc = useUserDoc ? Doc.UserDoc() : this.selectedDoc; const onPropToggle = (dv: Opt, doc: Doc, prop: string) => ((dv?.layoutDoc || doc)[prop] = (dv?.layoutDoc || doc)[prop] ? false : true); - console.log("current icon " + icon((targetDoc?.[property]))) + console.log('current icon ' + icon(targetDoc?.[property])); return !targetDoc ? null : ( {tooltip(targetDoc?.[property])}
} placement="top"> -
+
e.stopPropagation()} @@ -64,26 +65,22 @@ export class PropertiesButtons extends React.Component<{}, {}> { SelectionManager.Views().forEach(dv => (onClick ?? onPropToggle)(dv, dv.rootDoc, property)); } else if (targetDoc) (onClick ?? onPropToggle)(undefined, targetDoc, property); }, property)}> -
{icon((targetDoc?.[property]) as any)}
- -
{label(targetDoc?.[property])}
+
{icon(targetDoc?.[property] as any)}
+ +
{label(targetDoc?.[property])}
{/* */}
- -
); }; - - @computed get titleButton() { return this.propertyToggleBtn( - on => !on ? 'SHOW TITLE' : (this.selectedDoc?.['_layout_showTitle']) === 'title:hover' ? 'REMOVE TITLE' : 'HOVER TITLE' , + on => (!on ? 'SHOW TITLE' : this.selectedDoc?.['_layout_showTitle'] === 'title:hover' ? 'REMOVE TITLE' : 'HOVER TITLE'), '_layout_showTitle', on => 'Switch between title styles', - on => on ? : , // {currentIcon}, //(on ? :) , //,'text-width', on ? : , + on => (on ? : ), // {currentIcon}, //(on ? :) , //,'text-width', on ? : , (dv, doc) => { const tdoc = dv?.rootDoc || doc; const newtitle = !tdoc._layout_showTitle ? 'title' : tdoc._layout_showTitle === 'title' ? 'title:hover' : ''; @@ -101,41 +98,44 @@ export class PropertiesButtons extends React.Component<{}, {}> { // // on => 'thumbtack' // ); // } - @computed get maskButton() { //highlight text while going down and reading through + @computed get maskButton() { + //highlight text while going down and reading through return this.propertyToggleBtn( - on => on ? 'PLAIN INK': 'HIGHLIGHTER MASK', + on => (on ? 'PLAIN INK' : 'HIGHLIGHTER MASK'), 'stroke_isInkMask', on => (on ? 'Make plain ink' : 'Make highlight mask'), - on => on ? : , // ,// 'paint-brush', + on => (on ? : ), // ,// 'paint-brush', (dv, doc) => InkingStroke.toggleMask(dv?.layoutDoc || doc) ); } - - @computed get hideImageButton() { // put in developer -- can trace on top of object and drawing is still there + + @computed get hideImageButton() { + // put in developer -- can trace on top of object and drawing is still there return this.propertyToggleBtn( - on => 'Background', + on => (on ? 'SHOW BACKGROUND IMAGE' : 'HIDE BACKGROUND IMAGE'), //'Background', '_hideImage', on => (on ? 'Show Image' : 'Show Background'), - on => //'portrait' + on => (on ? : ) //'portrait' ); } @computed get clustersButton() { return this.propertyToggleBtn( - on =>'Clusters', + on => 'Clusters', '_freeform_useClusters', on => `${on ? 'Hide' : 'Show'} clusters`, - on => + on => ); } - // @computed get panButton() { - // return this.propertyToggleBtn( - // 'Lock\xA0View', - // '_lockedTransform', - // on => `${on ? 'Unlock' : 'Lock'} panning of view`, - // on => 'lock' - // ); - // } + @computed get panButton() { + return this.propertyToggleBtn( + on => 'Lock\xA0View', + '_lockedTransform', + on => `${on ? 'Unlock' : 'Lock'} panning of view`, + on => 'lock' + ); + } + // @computed get forceActiveButton() { // return this.propertyToggleBtn( // 'Active', @@ -428,9 +428,9 @@ export class PropertiesButtons extends React.Component<{}, {}> { const isNovice = Doc.noviceMode; return !this.selectedDoc ? null : (
- {toggle(this.titleButton)} - {/* {toggle(this.captionButton)} */} - {/* {toggle(this.lockButton)} */} + {toggle(this.titleButton)} + {/* {toggle(this.captionButton)} */} + {/* {toggle(this.lockButton)} */} {/*{toggle(this.onClickButton)} {toggle(this.layout_fitWidthButton)} {toggle(this.freezeThumb)} @@ -439,7 +439,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { {toggle(this.isLightboxButton, { display: !isFreeForm && !isMap ? 'none' : '' })} {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })}*/} {toggle(this.maskButton, { display: !isInk ? 'none' : '' })} - {toggle(this.hideImageButton, { display: !isImage ? 'none' : '' })} + {toggle(this.hideImageButton, { display: !isImage ? 'none' : '' })} {/* {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} {toggle(this.gridButton, { display: !isCollection ? 'none' : '' })} {toggle(this.groupButton, { display: isTabView || !isCollection ? 'none' : '' })} -- cgit v1.2.3-70-g09d2 From 62339a419ddf1ba64b869a8ce0a45f6e47348528 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Mon, 19 Jun 2023 23:25:48 -0400 Subject: adding buttons back --- src/client/views/PropertiesButtons.tsx | 233 +++++++++++++++++---------------- 1 file changed, 123 insertions(+), 110 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index fc56ec861..749b33539 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -22,11 +22,15 @@ import { pasteImageBitmap } from './nodes/WebBoxRenderer'; import './PropertiesButtons.scss'; import React = require('react'); import { JsxElement } from 'typescript'; -import { FaBraille, FaHighlighter, FaThumbtack } from 'react-icons/fa'; -import { AiOutlineApple, AiOutlinePicture } from 'react-icons/ai'; -import { MdSubtitles, MdSubtitlesOff } from 'react-icons/md'; -import { TbHighlight, TbHighlightOff } from 'react-icons/tb'; +import { FaBraille, FaHighlighter, FaLock, FaLockOpen, FaThumbtack } from 'react-icons/fa'; +import { AiOutlineApple, AiOutlineColumnWidth, AiOutlinePicture } from 'react-icons/ai'; +import { MdClosedCaption, MdClosedCaptionDisabled, MdGridOff, MdGridOn, MdSubtitles, MdSubtitlesOff } from 'react-icons/md'; +import { TbHandOff, TbHandStop, TbHighlight, TbHighlightOff } from 'react-icons/tb'; import { BiHide, BiShow } from 'react-icons/bi'; +import { BsGrid3X3GapFill } from 'react-icons/bs'; +import { TfiBarChart } from 'react-icons/tfi'; +import { CiGrid31 } from 'react-icons/ci'; +import { RxWidth } from 'react-icons/rx'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -77,7 +81,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { @computed get titleButton() { return this.propertyToggleBtn( - on => (!on ? 'SHOW TITLE' : this.selectedDoc?.['_layout_showTitle'] === 'title:hover' ? 'REMOVE TITLE' : 'HOVER TITLE'), + on => (!on ? 'SHOW TITLE' : this.selectedDoc?.['_layout_showTitle'] === 'title:hover' ? 'HIDE TITLE' : 'HOVER TITLE'), '_layout_showTitle', on => 'Switch between title styles', on => (on ? : ), // {currentIcon}, //(on ? :) , //,'text-width', on ? : , @@ -89,15 +93,16 @@ export class PropertiesButtons extends React.Component<{}, {}> { ); } - // @computed get lockButton() { - // return this.propertyToggleBtn( - // 'No\xA0Drag', - // '_lockedPosition', - // on => `${on ? 'Unlock' : 'Lock'} position to prevent dragging`, - // on => - // // on => 'thumbtack' - // ); - // } + @computed get lockButton() { + return this.propertyToggleBtn( + on => (on ? 'UNLOCK' : 'LOCK'), // 'No\xA0Drag', + '_lockedPosition', + on => `${on ? 'Unlock' : 'Lock'} position to prevent dragging`, + on => (on ? : ) + // on => 'thumbtack' + ); + } + @computed get maskButton() { //highlight text while going down and reading through return this.propertyToggleBtn( @@ -129,35 +134,37 @@ export class PropertiesButtons extends React.Component<{}, {}> { } @computed get panButton() { return this.propertyToggleBtn( - on => 'Lock\xA0View', + on => (on ? 'ENABLE PANNING' : 'DISABLE PANNING'), //'Lock\xA0View', '_lockedTransform', on => `${on ? 'Unlock' : 'Lock'} panning of view`, - on => 'lock' + on => (on ? : ) //'lock' ); } - // @computed get forceActiveButton() { + // @computed get forceActiveButton() { // WHAT HAPPENS HERE // return this.propertyToggleBtn( - // 'Active', + // on => 'Active', // '_forceActive', // on => `${on ? 'Select to activate' : 'Contents always active'} `, // on => 'eye' // ); // } - // @computed get fitContentButton() { - // return this.propertyToggleBtn( - // 'View All', - // '_freeform_fitContentsToBox', - // on => `${on ? "Don't" : 'Do'} fit content to container visible area`, - // on => 'object-group' - // ); - // } + + @computed get fitContentButton() { + return this.propertyToggleBtn( + on => (on ? 'PREVIOUS VIEW' : 'VIEW ALL'), //'View All', + '_freeform_fitContentsToBox', + on => `${on ? "Don't" : 'Do'} fit content to container visible area`, + on => (on ? : ) //'object-group' + ); + } + // // this implments a container pattern by marking the targetDoc (collection) as a lightbox // // that always fits its contents to its container and that hides all other documents when // // a link is followed that targets a 'lightbox' destination - // @computed get isLightboxButton() { + // @computed get isLightboxButton() { WHAT IS THIS // return this.propertyToggleBtn( - // 'Lightbox', + // on => 'Lightbox', // 'isLightbox', // on => `${on ? 'Set' : 'Remove'} lightbox flag`, // on => 'window-restore', @@ -178,26 +185,29 @@ export class PropertiesButtons extends React.Component<{}, {}> { // } // ); // } - // @computed get layout_fitWidthButton() { - // return this.propertyToggleBtn( - // 'Fit\xA0Width', - // '_layout_fitWidth', - // on => `${on ? "Don't" : 'Do'} fit content to width of container`, - // on => 'arrows-alt-h' - // ); - // } - // @computed get captionButton() { - // return this.propertyToggleBtn( - // 'Caption', - // '_layout_showCaption', - // on => `${on ? 'Hide' : 'Show'} caption footer`, - // on => 'closed-captioning', - // (dv, doc) => ((dv?.rootDoc || doc)._layout_showCaption = (dv?.rootDoc || doc)._layout_showCaption === undefined ? 'caption' : undefined) - // ); - // } - // @computed get chromeButton() { + + @computed get layout_fitWidthButton() { + return this.propertyToggleBtn( + on => (on ? 'RESTRICT WIDTH' : 'FIT WIDTH'), //'Fit\xA0Width', + '_layout_fitWidth', + on => `${on ? "Don't" : 'Do'} fit content to width of container`, + on => (on ? : ) // 'arrows-alt-h' + ); + } + + @computed get captionButton() { + return this.propertyToggleBtn( + on => (on ? 'HIDE CAPTION' : 'SHOW CAPTION'), //'Caption', + '_layout_showCaption', + on => `${on ? 'Hide' : 'Show'} caption footer`, + on => (on ? : ), //'closed-captioning', + (dv, doc) => ((dv?.rootDoc || doc)._layout_showCaption = (dv?.rootDoc || doc)._layout_showCaption === undefined ? 'caption' : undefined) + ); + } + + // @computed get chromeButton() { // WHAT // return this.propertyToggleBtn( - // 'Controls', + // on => 'Controls', // '_chromeHidden', // on => `${on ? 'Show' : 'Hide'} editing UI`, // on => 'edit', @@ -205,25 +215,27 @@ export class PropertiesButtons extends React.Component<{}, {}> { // ); // } - // @computed get layout_autoHeightButton() { + // @computed get layout_autoHeightButton() { // shouldn't be here unless you can set it back to its original size // return this.propertyToggleBtn( - // 'Auto\xA0Size', + // on => 'Auto\xA0Size', // '_layout_autoHeight', // on => `Automatical vertical sizing to show all content`, // on => 'arrows-alt-v' // ); // } - // @computed get gridButton() { - // return this.propertyToggleBtn( - // 'Grid', - // '_freeform_backgroundGrid', - // on => `Display background grid in collection`, - // on => 'border-all' - // ); - // } - // @computed get groupButton() { + + @computed get gridButton() { + return this.propertyToggleBtn( + on => (on ? 'HIDE GRID' : 'DISPLAY GRID'), + '_freeform_backgroundGrid', + on => `Display background grid in collection`, + on => (on ? : ) //'border-all' + ); + } + + // @computed get groupButton() { WHERE ARE YOU // return this.propertyToggleBtn( - // 'Group', + // on => 'Group', // 'isGroup', // on => `Display collection as a Group`, // on => 'object-group', @@ -233,6 +245,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { // } // ); // } + // @computed get freezeThumb() { // return this.propertyToggleBtn( // 'FreezeThumb', @@ -253,12 +266,12 @@ export class PropertiesButtons extends React.Component<{}, {}> { // } // ); // } - // @computed get snapButton() { + // @computed get snapButton() { // THESE ARE NOT COMING // return this.propertyToggleBtn( - // 'Snap\xA0Lines', + // on => (on ? 'HIDE SNAP LINES' : 'SHOW SNAP LINES'), // 'freeform_snapLines', // on => `Display snapping lines when objects are dragged`, - // on => 'th', + // on => , //'th', // undefined, // true // ); @@ -281,23 +294,23 @@ export class PropertiesButtons extends React.Component<{}, {}> { // // ); // } - // @computed - // get perspectiveButton() { - // return !this.selectedDoc ? null : ( - // Choose view perspective
} placement="top"> - //
- //
- // - //
e.stopPropagation()}> - // - //
- //
- //
- //
Perspective
- //
- // - // ); - // } + @computed + get perspectiveButton() { + return !this.selectedDoc ? null : ( + Choose view perspective
} placement="top"> +
+
+ +
e.stopPropagation()}> + +
+
+
+
Perspective
+
+ + ); + } @undoBatch handlePerspectiveChange = (e: any) => { @@ -386,26 +399,26 @@ export class PropertiesButtons extends React.Component<{}, {}> {
); } - @computed - get onPerspectiveFlyout() { - const excludedViewTypes = [CollectionViewType.Invalid, CollectionViewType.Docking, CollectionViewType.Pile, CollectionViewType.StackedTimeline, CollectionViewType.Linear]; + // @computed WHERE IS THIS + // get onPerspectiveFlyout() { + // const excludedViewTypes = [CollectionViewType.Invalid, CollectionViewType.Docking, CollectionViewType.Pile, CollectionViewType.StackedTimeline, CollectionViewType.Linear]; - const makeLabel = (value: string, label: string) => ( -
- -
- ); - return ( -
- {Object.values(CollectionViewType) - .filter(type => !excludedViewTypes.includes(type)) - .map(type => makeLabel(type, type))} -
- ); - } + // const makeLabel = (value: string, label: string) => ( + //
+ // + //
+ // ); + // return ( + //
+ // {Object.values(CollectionViewType) + // .filter(type => !excludedViewTypes.includes(type)) + // .map(type => makeLabel(type, type))} + //
+ // ); + // } render() { const layoutField = this.selectedDoc?.[Doc.LayoutFieldKey(this.selectedDoc)]; @@ -429,24 +442,24 @@ export class PropertiesButtons extends React.Component<{}, {}> { return !this.selectedDoc ? null : (
{toggle(this.titleButton)} - {/* {toggle(this.captionButton)} */} - {/* {toggle(this.lockButton)} */} - {/*{toggle(this.onClickButton)} + {toggle(this.captionButton)} + {toggle(this.lockButton)} + {/* {toggle(this.onClickButton)} */} {toggle(this.layout_fitWidthButton)} - {toggle(this.freezeThumb)} - {toggle(this.forceActiveButton)} + {/* {toggle(this.freezeThumb)} */} + {/* {toggle(this.forceActiveButton)} */} {toggle(this.fitContentButton, { display: !isFreeForm && !isMap ? 'none' : '' })} - {toggle(this.isLightboxButton, { display: !isFreeForm && !isMap ? 'none' : '' })} - {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })}*/} + {/* {toggle(this.isLightboxButton, { display: !isFreeForm && !isMap ? 'none' : '' })} */} + {/* {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })} */} {toggle(this.maskButton, { display: !isInk ? 'none' : '' })} {toggle(this.hideImageButton, { display: !isImage ? 'none' : '' })} - {/* {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} + {/* {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} */} {toggle(this.gridButton, { display: !isCollection ? 'none' : '' })} - {toggle(this.groupButton, { display: isTabView || !isCollection ? 'none' : '' })} - {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} */} + {/* {toggle(this.groupButton, { display: isTabView || !isCollection ? 'none' : '' })} */} + {/* {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} */} {toggle(this.clustersButton, { display: !isFreeForm ? 'none' : '' })} - {/* {toggle(this.panButton, { display: !isFreeForm ? 'none' : '' })} - {toggle(this.perspectiveButton, { display: !isCollection || isNovice ? 'none' : '' })} */} + {toggle(this.panButton, { display: !isFreeForm ? 'none' : '' })} + {/* {toggle(this.perspectiveButton, { display: !isCollection || isNovice ? 'none' : '' })} */}
); } -- cgit v1.2.3-70-g09d2 From 50ee9be87269ced48f0c0c8867316c9ff0b4258b Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Tue, 20 Jun 2023 11:55:32 -0400 Subject: fixing buttons tues morn --- src/client/views/MainView.tsx | 2 +- src/client/views/PropertiesButtons.tsx | 96 +++++++++++++++++----------------- src/client/views/PropertiesView.scss | 11 ++++ src/client/views/PropertiesView.tsx | 53 +++++++++---------- 4 files changed, 85 insertions(+), 77 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 50f451c0a..541b74722 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -810,7 +810,7 @@ export class MainView extends React.Component { {this.dockingContent} {this._hideUI ? null : ( -
+
)} diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 749b33539..7527a0793 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -56,7 +56,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { const targetDoc = useUserDoc ? Doc.UserDoc() : this.selectedDoc; const onPropToggle = (dv: Opt, doc: Doc, prop: string) => ((dv?.layoutDoc || doc)[prop] = (dv?.layoutDoc || doc)[prop] ? false : true); - console.log('current icon ' + icon(targetDoc?.[property])); + // console.log('current icon ' + icon(targetDoc?.[property])); return !targetDoc ? null : ( {tooltip(targetDoc?.[property])}
} placement="top"> @@ -141,14 +141,14 @@ export class PropertiesButtons extends React.Component<{}, {}> { ); } - // @computed get forceActiveButton() { // WHAT HAPPENS HERE - // return this.propertyToggleBtn( - // on => 'Active', - // '_forceActive', - // on => `${on ? 'Select to activate' : 'Contents always active'} `, - // on => 'eye' - // ); - // } + @computed get forceActiveButton() { //select text + return this.propertyToggleBtn( + on => 'Active', + '_forceActive', + on => `${on ? 'Select to activate' : 'Contents always active'} `, + on => 'eye' + ); + } @computed get fitContentButton() { return this.propertyToggleBtn( @@ -162,7 +162,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { // // this implments a container pattern by marking the targetDoc (collection) as a lightbox // // that always fits its contents to its container and that hides all other documents when // // a link is followed that targets a 'lightbox' destination - // @computed get isLightboxButton() { WHAT IS THIS + // @computed get isLightboxButton() { // developer // return this.propertyToggleBtn( // on => 'Lightbox', // 'isLightbox', @@ -205,31 +205,31 @@ export class PropertiesButtons extends React.Component<{}, {}> { ); } - // @computed get chromeButton() { // WHAT - // return this.propertyToggleBtn( - // on => 'Controls', - // '_chromeHidden', - // on => `${on ? 'Show' : 'Hide'} editing UI`, - // on => 'edit', - // (dv, doc) => ((dv?.rootDoc || doc)._chromeHidden = !(dv?.rootDoc || doc)._chromeHidden) - // ); - // } + @computed get chromeButton() { // developer -- removing UI decoration + return this.propertyToggleBtn( + on => 'Controls', + '_chromeHidden', + on => `${on ? 'Show' : 'Hide'} editing UI`, + on => 'edit', + (dv, doc) => ((dv?.rootDoc || doc)._chromeHidden = !(dv?.rootDoc || doc)._chromeHidden) + ); + } - // @computed get layout_autoHeightButton() { // shouldn't be here unless you can set it back to its original size - // return this.propertyToggleBtn( - // on => 'Auto\xA0Size', - // '_layout_autoHeight', - // on => `Automatical vertical sizing to show all content`, - // on => 'arrows-alt-v' - // ); - // } + @computed get layout_autoHeightButton() { // shouldn't be here unless you can set it back to its original size + return this.propertyToggleBtn( + on => 'Auto\xA0Size', + '_layout_autoHeight', + on => `Automatical vertical sizing to show all content`, + on => 'arrows-alt-v' + ); + } @computed get gridButton() { return this.propertyToggleBtn( on => (on ? 'HIDE GRID' : 'DISPLAY GRID'), '_freeform_backgroundGrid', on => `Display background grid in collection`, - on => (on ? : ) //'border-all' + on => (on ? : ) //'border-all' ); } @@ -294,23 +294,23 @@ export class PropertiesButtons extends React.Component<{}, {}> { // // ); // } - @computed - get perspectiveButton() { - return !this.selectedDoc ? null : ( - Choose view perspective
} placement="top"> -
-
- -
e.stopPropagation()}> - -
-
-
-
Perspective
-
- - ); - } + // @computed + // get perspectiveButton() { //WHERE ARE YOU + // return !this.selectedDoc ? null : ( + // Choose view perspective
} placement="top"> + //
+ //
+ // + //
e.stopPropagation()}> + // + //
+ //
+ //
+ //
Perspective
+ //
+ // + // ); + // } @undoBatch handlePerspectiveChange = (e: any) => { @@ -447,13 +447,13 @@ export class PropertiesButtons extends React.Component<{}, {}> { {/* {toggle(this.onClickButton)} */} {toggle(this.layout_fitWidthButton)} {/* {toggle(this.freezeThumb)} */} - {/* {toggle(this.forceActiveButton)} */} + {toggle(this.forceActiveButton)} {toggle(this.fitContentButton, { display: !isFreeForm && !isMap ? 'none' : '' })} {/* {toggle(this.isLightboxButton, { display: !isFreeForm && !isMap ? 'none' : '' })} */} - {/* {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })} */} + {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })} {toggle(this.maskButton, { display: !isInk ? 'none' : '' })} {toggle(this.hideImageButton, { display: !isImage ? 'none' : '' })} - {/* {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} */} + {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} {toggle(this.gridButton, { display: !isCollection ? 'none' : '' })} {/* {toggle(this.groupButton, { display: isTabView || !isCollection ? 'none' : '' })} */} {/* {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} */} diff --git a/src/client/views/PropertiesView.scss b/src/client/views/PropertiesView.scss index 49f2fc6fe..a9577b232 100644 --- a/src/client/views/PropertiesView.scss +++ b/src/client/views/PropertiesView.scss @@ -14,6 +14,10 @@ overflow-x: hidden; overflow-y: auto; + .propertiesView-propAndInfoGrouping{ + display: flex; + } + .propertiesView-title { text-align: left; padding-top: 12px; @@ -40,6 +44,13 @@ } } + .propertiesView-info{ + margin-top: 20; + margin-right: 10; + float: right; + font-size: 20; + } + .propertiesView-name { // border-bottom: 1px solid black; padding: 8.5px; diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 9c327b3f1..6b208f25e 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -1,6 +1,6 @@ import React = require('react'); import { IconLookup } from '@fortawesome/fontawesome-svg-core'; -import { faAnchor, faArrowRight, faWindowMaximize } from '@fortawesome/free-solid-svg-icons'; +import { faAnchor, faArrowRight, faListNumeric, faWindowMaximize } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Checkbox, Icon, Tooltip } from '@material-ui/core'; import { intersection } from 'lodash'; @@ -37,6 +37,7 @@ import { DefaultStyleProvider } from './StyleProvider'; import { RichTextField } from '../../fields/RichTextField'; import { AiFillFileText } from "react-icons/ai" //* as Icons from "react-icons/ai" // import * as Icons from "react-icons/bs" //{BsCollectionFill, BsFillFileEarmarkImageFill} from "react-icons/bs" +import { GrCircleInformation } from 'react-icons/gr' import { CgBrowser} from "react-icons/cg" import { ImageField, VideoField, WebField } from '../../fields/URLField'; import { FaFileVideo } from 'react-icons/fa'; //* as Icons from "react-icons/fa"; // @@ -114,6 +115,9 @@ export class PropertiesView extends React.Component { @observable inOptions: boolean = false; @observable _controlButton: boolean = false; + + @observable allClose: boolean = false; + componentDidMount() { this.selectedDocListenerDisposer?.(); // this.selectedDocListenerDisposer = autorun(() => this.openFilters && this.selectedDoc && this.checkFilterDoc()); @@ -504,7 +508,7 @@ export class PropertiesView extends React.Component { } @computed get currentType() { - console.log("current type " + this.selectedDoc?.type) + // console.log("current type " + this.selectedDoc?.type) const documentType = StrCast(this.selectedDoc?.type) var currentType: string = documentType; @@ -1201,37 +1205,23 @@ export class PropertiesView extends React.Component { ); } - @computed get doubleClickClose() { - //action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = !this.openTransform)) - //console.log(this.openContexts + " hello " + this.openOptions + this.openTransform + this.openLinks + this.openFields) - if (this.openContexts || this.openOptions || this.openTransform || this.openLinks || this.openFields){ - this.openContexts = false; - this.openOptions = false; - this.openTransform = false; - this.openLinks = false; - this.openFields = false; - - } else if (!this.openContexts && !this.openOptions && !this.openTransform && !this.openLinks && !this.openFields){ - this.openContexts = true; - this.openOptions = true; - this.openTransform = true; - this.openLinks = true; - this.openFields = true; - } - - return ( - console.log("made") - ) - } +// create observable with current property +// if everyother one is closed, set allClsoe = true +// on double click close all except current +// if everything is closed on double clikc then open everythigng + +// if everythign is closed except current property ==> double click = open all +// else ==> double click = close except current property @computed get linksSubMenu() { // onPointerDown={action(() => (this.openLinks = !this.openLinks))} - + //(this.openContexts = false, this.openOptions = false, this.openTransform = false))} onClick={action(() => (this.openLinks = !this.openLinks)) + //this.allClose == false ? (this.openContexts = false , this.allClose = true ): (this.openContexts = true, this.allClose = false) return (
-
( this.doubleClickClose, this.openLinks = true))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> +
Linked To
@@ -1492,9 +1482,16 @@ export class PropertiesView extends React.Component { minWidth: this.props.width, //overflowY: this.scrolling ? "scroll" : "visible" }}> -
- Properties +
+
+ Properties +
+
window.open('https://brown-dash.github.io/Dash-Documentation/')}> +
+
+ +
{this.editableTitle}
{this.currentType}
-- cgit v1.2.3-70-g09d2 From 0fe0f06b117fe7d703b0bc6da5e4b9d5f8e0a1e5 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Tue, 20 Jun 2023 15:08:08 -0400 Subject: updating buttons and plan to move forward --- src/client/views/PropertiesButtons.tsx | 41 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 7527a0793..2a31f0f2c 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -24,8 +24,8 @@ import React = require('react'); import { JsxElement } from 'typescript'; import { FaBraille, FaHighlighter, FaLock, FaLockOpen, FaThumbtack } from 'react-icons/fa'; import { AiOutlineApple, AiOutlineColumnWidth, AiOutlinePicture } from 'react-icons/ai'; -import { MdClosedCaption, MdClosedCaptionDisabled, MdGridOff, MdGridOn, MdSubtitles, MdSubtitlesOff } from 'react-icons/md'; -import { TbHandOff, TbHandStop, TbHighlight, TbHighlightOff } from 'react-icons/tb'; +import { MdClosedCaption, MdClosedCaptionDisabled, MdGridOff, MdGridOn, MdSubtitles, MdSubtitlesOff, MdTouchApp } from 'react-icons/md'; +import { TbEditCircle, TbEditCircleOff, TbHandOff, TbHandStop, TbHighlight, TbHighlightOff } from 'react-icons/tb'; import { BiHide, BiShow } from 'react-icons/bi'; import { BsGrid3X3GapFill } from 'react-icons/bs'; import { TfiBarChart } from 'react-icons/tfi'; @@ -143,10 +143,10 @@ export class PropertiesButtons extends React.Component<{}, {}> { @computed get forceActiveButton() { //select text return this.propertyToggleBtn( - on => 'Active', + on => on ? 'INACTIVE INTERACTION' : 'ACTIVE INTERACTION', '_forceActive', on => `${on ? 'Select to activate' : 'Contents always active'} `, - on => 'eye' + on => // 'eye' ); } @@ -196,7 +196,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { } @computed get captionButton() { - return this.propertyToggleBtn( + return this.propertyToggleBtn( //DEVELOPER on => (on ? 'HIDE CAPTION' : 'SHOW CAPTION'), //'Caption', '_layout_showCaption', on => `${on ? 'Hide' : 'Show'} caption footer`, @@ -207,15 +207,15 @@ export class PropertiesButtons extends React.Component<{}, {}> { @computed get chromeButton() { // developer -- removing UI decoration return this.propertyToggleBtn( - on => 'Controls', + on => on ? 'ENABLE UI CONTROLS' : 'DISABLE UI CONTROLS', '_chromeHidden', on => `${on ? 'Show' : 'Hide'} editing UI`, - on => 'edit', + on => on? : , // 'edit', (dv, doc) => ((dv?.rootDoc || doc)._chromeHidden = !(dv?.rootDoc || doc)._chromeHidden) ); } - @computed get layout_autoHeightButton() { // shouldn't be here unless you can set it back to its original size + @computed get layout_autoHeightButton() { // store previous dimensions to store old values return this.propertyToggleBtn( on => 'Auto\xA0Size', '_layout_autoHeight', @@ -233,7 +233,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { ); } - // @computed get groupButton() { WHERE ARE YOU + // @computed get groupButton() { //developer // return this.propertyToggleBtn( // on => 'Group', // 'isGroup', @@ -266,16 +266,15 @@ export class PropertiesButtons extends React.Component<{}, {}> { // } // ); // } - // @computed get snapButton() { // THESE ARE NOT COMING - // return this.propertyToggleBtn( - // on => (on ? 'HIDE SNAP LINES' : 'SHOW SNAP LINES'), - // 'freeform_snapLines', - // on => `Display snapping lines when objects are dragged`, - // on => , //'th', - // undefined, - // true - // ); - // } + @computed get snapButton() { // THESE ARE NOT COMING + return this.propertyToggleBtn( + on => (on ? 'HIDE SNAP LINES' : 'SHOW SNAP LINES'), + 'freeform_snapLines', + on => `Display snapping lines when objects are dragged`, + on => , //'th', + undefined, + ); + } // @computed // get onClickButton() { @@ -295,7 +294,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { // ); // } // @computed - // get perspectiveButton() { //WHERE ARE YOU + // get perspectiveButton() { // gone // return !this.selectedDoc ? null : ( // Choose view perspective
} placement="top"> //
@@ -456,7 +455,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { {toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })} {toggle(this.gridButton, { display: !isCollection ? 'none' : '' })} {/* {toggle(this.groupButton, { display: isTabView || !isCollection ? 'none' : '' })} */} - {/* {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} */} + {toggle(this.snapButton, { display: !isCollection ? 'none' : '' })} {toggle(this.clustersButton, { display: !isFreeForm ? 'none' : '' })} {toggle(this.panButton, { display: !isFreeForm ? 'none' : '' })} {/* {toggle(this.perspectiveButton, { display: !isCollection || isNovice ? 'none' : '' })} */} -- cgit v1.2.3-70-g09d2 From c357aefb0668780b3bb4f96270886e0570723d09 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Wed, 21 Jun 2023 12:31:14 -0400 Subject: double click working with small bug --- src/client/views/PropertiesView.tsx | 51 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 24 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 6b208f25e..89a355ae3 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -43,7 +43,7 @@ import { ImageField, VideoField, WebField } from '../../fields/URLField'; import { FaFileVideo } from 'react-icons/fa'; //* as Icons from "react-icons/fa"; // import { IconButton } from 'browndash-components'; import { IconBase } from 'react-icons'; -import { MdOutlineMedicalServices } from 'react-icons/md'; +import { MdOutlineAddShoppingCart, MdOutlineMedicalServices } from 'react-icons/md'; import { createPromiseCapability } from 'pdfjs-dist'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; @@ -115,9 +115,6 @@ export class PropertiesView extends React.Component { @observable inOptions: boolean = false; @observable _controlButton: boolean = false; - - @observable allClose: boolean = false; - componentDidMount() { this.selectedDocListenerDisposer?.(); // this.selectedDocListenerDisposer = autorun(() => this.openFilters && this.selectedDoc && this.checkFilterDoc()); @@ -1055,7 +1052,9 @@ export class PropertiesView extends React.Component { @computed get optionsSubMenu() { return (
(this.inOptions = true))} onPointerLeave={action(() => (this.inOptions = false))}> -
(this.openOptions = !this.openOptions))} style={{ backgroundColor: this.openOptions ? 'black' : '' }}> +
(this.openContexts = false, this.openLinks = false, this.openTransform = false, + this.openFields = false, this.openSharing = false, this.openFilters = false, this.openLayout = false))} + onClick={action(() => (this.openOptions = !this.openOptions))} style={{ backgroundColor: this.openOptions ? 'black' : '' }}> Options
@@ -1073,7 +1072,9 @@ export class PropertiesView extends React.Component { @computed get sharingSubMenu() { return (
-
(this.openSharing = !this.openSharing))} style={{ backgroundColor: this.openSharing ? 'black' : '' }}> +
(this.openContexts = false, this.openLinks = false, this.openTransform = false, + this.openOptions = false, this.openFields = false, this.openFilters = false, this.openLayout))} + onClick={action(() => (this.openSharing = !this.openSharing))} style={{ backgroundColor: this.openSharing ? 'black' : '' }}> Sharing {'&'} Permissions
@@ -1128,7 +1129,9 @@ export class PropertiesView extends React.Component { @computed get filtersSubMenu() { return (
-
(this.openFilters = !this.openFilters))} style={{ backgroundColor: this.openFilters ? 'black' : '' }}> +
(this.openContexts = false, this.openLinks = false, this.openTransform = false, + this.openOptions = false, this.openFields = false, this.openSharing = false, this.openLayout = false))} + onClick={action(() => (this.openFilters = !this.openFilters))} style={{ backgroundColor: this.openFilters ? 'black' : '' }}> Filters
@@ -1159,7 +1162,9 @@ export class PropertiesView extends React.Component { )}
-
(this.openTransform = !this.openTransform))} style={{ backgroundColor: this.openTransform ? 'black' : '' }}> +
(this.openTransform = !this.openTransform))} onDoubleClick={action(() => (this.openContexts = false, this.openLinks = false, this.openOptions = false, + this.openFields = false, this.openSharing = false, this.openFilters = false, this.openLayout = false, this.openTransform = true))} + style={{ backgroundColor: this.openTransform ? 'black' : '' }}> Transform
@@ -1174,7 +1179,9 @@ export class PropertiesView extends React.Component { @computed get fieldsSubMenu() { return (
-
(this.openFields = !this.openFields))} style={{ backgroundColor: this.openFields ? 'black' : '' }}> +
(this.openContexts = false, this.openLinks = false, this.openTransform = false, + this.openOptions = false, this.openSharing = false, this.openFilters = false, this.openLayout = false))} + onClick={action(() => (this.openFields = !this.openFields))} style={{ backgroundColor: this.openFields ? 'black' : '' }}> Fields {'&'} Tags
@@ -1194,7 +1201,9 @@ export class PropertiesView extends React.Component { @computed get contextsSubMenu() { return (
-
(this.openContexts = !this.openContexts))} style={{ backgroundColor: this.openContexts ? 'black' : '' }}> +
(this.openLinks = false, this.openTransform = false, this.openOptions = false, this.openFields = false, + this.openSharing = false, this.openFilters = false, this.openLayout = false ))} + onClick ={action(() => (this.openContexts = !this.openContexts))} style={{ backgroundColor: this.openContexts ? 'black' : '' }}> Other Contexts
@@ -1205,30 +1214,22 @@ export class PropertiesView extends React.Component { ); } + @computed get linksSubMenu() { + var isDouble: boolean = false; -// create observable with current property -// if everyother one is closed, set allClsoe = true -// on double click close all except current -// if everything is closed on double clikc then open everythigng - -// if everythign is closed except current property ==> double click = open all -// else ==> double click = close except current property - @computed get linksSubMenu() { - // onPointerDown={action(() => (this.openLinks = !this.openLinks))} - //(this.openContexts = false, this.openOptions = false, this.openTransform = false))} onClick={action(() => (this.openLinks = !this.openLinks)) - //this.allClose == false ? (this.openContexts = false , this.allClose = true ): (this.openContexts = true, this.allClose = false) return (
-
+
(this.openLinks = !this.openLinks))} onDoubleClick={action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = false, + this.openFields = false, this.openSharing = false, this.openLayout = false, this.openFilters = false, this.openLinks = false ))} + style={{ backgroundColor: this.openLinks ? 'black' : '' }}> Linked To
{!this.openLinks ? null : this.linkCount > 0 ?
{this.links}
:
There are no current links.
} - {/* {!this.openLinks ? null :
{this.links}
} */}
); } @@ -1236,7 +1237,9 @@ export class PropertiesView extends React.Component { @computed get layoutSubMenu() { return (
-
(this.openLayout = !this.openLayout))} style={{ backgroundColor: this.openLayout ? 'black' : '' }}> +
(this.openContexts = false, this.openLinks = false, this.openTransform = false, + this.openOptions = false, this.openFields = false, this.openSharing = false, this.openFilters = false ))} + onClick={action(() => (this.openLayout = !this.openLayout))} style={{ backgroundColor: this.openLayout ? 'black' : '' }}> Layout
-- cgit v1.2.3-70-g09d2 From ddf20606684cd8755571a82eed1c4ffdc27f9274 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Wed, 21 Jun 2023 15:15:00 -0400 Subject: fixed double click bug for links --- src/client/views/PropertiesView.tsx | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 89a355ae3..a0c45bc70 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -1214,15 +1214,40 @@ export class PropertiesView extends React.Component { ); } + + @computed get linksSubMenu() { - var isDouble: boolean = false; +//onClick={action(() => (this.openLinks = !this.openLinks))} onDoubleClick={action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = false, +//this.openFields = false, this.openSharing = false, this.openLayout = false, this.openFilters = false, this.openLinks = false ))} + let isDouble = false; return (
-
(this.openLinks = !this.openLinks))} onDoubleClick={action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = false, - this.openFields = false, this.openSharing = false, this.openLayout = false, this.openFilters = false, this.openLinks = false ))} +
{ + if (!isDouble){ + this.openLinks = !this.openLinks + } } )} + + onDoubleClick = {action(() => { + isDouble = true; + + this.openContexts = false; + this.openOptions = false; + this.openTransform = false; + this.openFields = false; + this.openSharing = false; + this.openLayout = false; + this.openFilters = false; + this.openLinks = true; + + setTimeout(() => { + isDouble = false; + }, 300) + } + + )} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> Linked To
-- cgit v1.2.3-70-g09d2 From e0757ecfe8666a13a38b1c396d4a9e5138b4a3bd Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Thu, 22 Jun 2023 11:26:24 -0400 Subject: double clicking works --- src/client/views/PropertiesView.tsx | 196 ++++++++++++++++++++++++++++++++---- 1 file changed, 176 insertions(+), 20 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index a0c45bc70..60e93cdfd 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -1050,11 +1050,34 @@ export class PropertiesView extends React.Component { } @computed get optionsSubMenu() { + let isDouble = false; + return (
(this.inOptions = true))} onPointerLeave={action(() => (this.inOptions = false))}> -
(this.openContexts = false, this.openLinks = false, this.openTransform = false, - this.openFields = false, this.openSharing = false, this.openFilters = false, this.openLayout = false))} - onClick={action(() => (this.openOptions = !this.openOptions))} style={{ backgroundColor: this.openOptions ? 'black' : '' }}> +
{ + if (!isDouble){ + this.openOptions = !this.openOptions + } } )} + onDoubleClick={action(() => { + isDouble = true; + + this.openContexts = false; + this.openLinks = false; + this.openOptions = true; + this.openTransform = false; + this.openFields = false; + this.openSharing = false; + this.openLayout = false; + this.openFilters = false; + + + setTimeout(() => { + isDouble = false; + }, 300) + } + + )} + style={{ backgroundColor: this.openOptions ? 'black' : '' }}> Options
@@ -1070,11 +1093,32 @@ export class PropertiesView extends React.Component { } @computed get sharingSubMenu() { + let isDouble:boolean = false; + return (
-
(this.openContexts = false, this.openLinks = false, this.openTransform = false, - this.openOptions = false, this.openFields = false, this.openFilters = false, this.openLayout))} - onClick={action(() => (this.openSharing = !this.openSharing))} style={{ backgroundColor: this.openSharing ? 'black' : '' }}> +
{ + if (!isDouble){ + this.openSharing = !this.openSharing + } } )} + onDoubleClick={action(() => { + isDouble = true; + + this.openContexts = false; + this.openLinks = false; + this.openOptions = false; + this.openTransform = false; + this.openFields = false; + this.openSharing = true; + this.openLayout = false; + this.openFilters = false; + + + setTimeout(() => { + isDouble = false; + }, 300) + })} + style={{ backgroundColor: this.openSharing ? 'black' : '' }}> Sharing {'&'} Permissions
@@ -1127,11 +1171,34 @@ export class PropertiesView extends React.Component { }; @computed get filtersSubMenu() { + let isDouble: boolean = false; + return (
-
(this.openContexts = false, this.openLinks = false, this.openTransform = false, - this.openOptions = false, this.openFields = false, this.openSharing = false, this.openLayout = false))} - onClick={action(() => (this.openFilters = !this.openFilters))} style={{ backgroundColor: this.openFilters ? 'black' : '' }}> +
{ + if (!isDouble){ + this.openFilters = !this.openFilters + } } )} + onDoubleClick={action(() => { + isDouble = true; + + this.openContexts = false; + this.openLinks = false; + this.openOptions = false; + this.openTransform = false; + this.openFields = false; + this.openSharing = false; + this.openLayout = false; + this.openFilters = true; + + + setTimeout(() => { + isDouble = false; + }, 300) + } + + )} + style={{ backgroundColor: this.openFilters ? 'black' : '' }}> Filters
@@ -1147,6 +1214,8 @@ export class PropertiesView extends React.Component { } @computed get inkSubMenu() { + let isDouble = false; + return ( <> {!this.isInk ? null : ( @@ -1162,8 +1231,27 @@ export class PropertiesView extends React.Component { )}
-
(this.openTransform = !this.openTransform))} onDoubleClick={action(() => (this.openContexts = false, this.openLinks = false, this.openOptions = false, - this.openFields = false, this.openSharing = false, this.openFilters = false, this.openLayout = false, this.openTransform = true))} +
{ + if (!isDouble){ + this.openTransform = !this.openTransform + } } )} + onDoubleClick={action(() => { + isDouble = true; + + this.openContexts = false; + this.openLinks = false; + this.openOptions = false; + this.openTransform = true; + this.openFields = false; + this.openSharing = false; + this.openLayout = false; + this.openFilters = false; + + + setTimeout(() => { + isDouble = false; + }, 300) + })} style={{ backgroundColor: this.openTransform ? 'black' : '' }}> Transform
@@ -1177,11 +1265,34 @@ export class PropertiesView extends React.Component { } @computed get fieldsSubMenu() { + let isDouble: boolean = false; + return (
-
(this.openContexts = false, this.openLinks = false, this.openTransform = false, - this.openOptions = false, this.openSharing = false, this.openFilters = false, this.openLayout = false))} - onClick={action(() => (this.openFields = !this.openFields))} style={{ backgroundColor: this.openFields ? 'black' : '' }}> +
{ + if (!isDouble){ + this.openFields = !this.openFields + } } )} + onDoubleClick={action(() => { + isDouble = true; + + this.openContexts = false; + this.openLinks = false; + this.openOptions = false; + this.openTransform = false; + this.openFields = true; + this.openSharing = false; + this.openLayout = false; + this.openFilters = false; + + + setTimeout(() => { + isDouble = false; + }, 300) + } + + )} + style={{ backgroundColor: this.openFields ? 'black' : '' }}> Fields {'&'} Tags
@@ -1199,11 +1310,33 @@ export class PropertiesView extends React.Component { } @computed get contextsSubMenu() { + let isDouble = false; return (
-
(this.openLinks = false, this.openTransform = false, this.openOptions = false, this.openFields = false, - this.openSharing = false, this.openFilters = false, this.openLayout = false ))} - onClick ={action(() => (this.openContexts = !this.openContexts))} style={{ backgroundColor: this.openContexts ? 'black' : '' }}> +
{ + if (!isDouble){ + this.openContexts = !this.openContexts + } } )} + onDoubleClick={action(() => { + isDouble = true; + + this.openContexts = true; + this.openLinks = false; + this.openOptions = false; + this.openTransform = false; + this.openFields = false; + this.openSharing = false; + this.openLayout = false; + this.openFilters = false; + + + setTimeout(() => { + isDouble = false; + }, 300) + } + + )} + style={{ backgroundColor: this.openContexts ? 'black' : '' }}> Other Contexts
@@ -1260,11 +1393,34 @@ export class PropertiesView extends React.Component { } @computed get layoutSubMenu() { + let isDouble: boolean = false; + return (
-
(this.openContexts = false, this.openLinks = false, this.openTransform = false, - this.openOptions = false, this.openFields = false, this.openSharing = false, this.openFilters = false ))} - onClick={action(() => (this.openLayout = !this.openLayout))} style={{ backgroundColor: this.openLayout ? 'black' : '' }}> +
{ + if (!isDouble){ + this.openLayout = !this.openLayout + } } )} + onDoubleClick={action(() => { + isDouble = true; + + this.openContexts = false; + this.openLinks = false; + this.openOptions = false; + this.openTransform = false; + this.openFields = false; + this.openSharing = false; + this.openLayout = true; + this.openFilters = false; + + + setTimeout(() => { + isDouble = false; + }, 300) + } + + )} + style={{ backgroundColor: this.openLayout ? 'black' : '' }}> Layout
-- cgit v1.2.3-70-g09d2 From 1a8abf3991fccd5ee5d2bd66b28a6d5562e8ef36 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Tue, 27 Jun 2023 12:33:50 -0400 Subject: options in properties menu fit better --- src/client/views/PropertiesButtons.scss | 10 +++++++--- src/client/views/PropertiesButtons.tsx | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesButtons.scss b/src/client/views/PropertiesButtons.scss index f571dcf25..dd4f67106 100644 --- a/src/client/views/PropertiesButtons.scss +++ b/src/client/views/PropertiesButtons.scss @@ -23,7 +23,7 @@ $linkGap : 3px; // margin-right: 7px; // margin-left: 8px; height: 28px; - width: 226px;//29px; + // width: 226px;//29px; display: flex; align-items: center; // height: 25px; @@ -55,14 +55,17 @@ $linkGap : 3px; .propertiesButtons-linkButton-empty.toggle-on { background-color: $medium-blue; color: $white; + width:100% } .propertiesButtons-linkButton-empty.toggle-hover { background-color: $light-blue; color: $black; + width:100% } .propertiesButtons-linkButton-empty.toggle-off { background-color: white;//$dark-gray; color: black; //white; + width:100% } .propertiesButtons-icon { @@ -71,6 +74,7 @@ $linkGap : 3px; .propertiesButtons { position:relative; + width: 100%; // margin-top: 3px; // // grid-column: 1/4; // width: 100%; @@ -94,8 +98,8 @@ $linkGap : 3px; .propertiesButtons-button { pointer-events: auto; - padding-right: 5px; - width: 25px; + padding-right: 8px;//5px; + width: 100%;//width: 25px; border-radius: 5px; margin-right: 20px; margin-bottom: 8px; diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 2a31f0f2c..ba25e6697 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -126,7 +126,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { @computed get clustersButton() { return this.propertyToggleBtn( - on => 'Clusters', + on => (on ?'DISABLE CLUSTERS' : 'HIGHLIGHT CLUSTERS'), '_freeform_useClusters', on => `${on ? 'Hide' : 'Show'} clusters`, on => -- cgit v1.2.3-70-g09d2 From 5b7a0804fa2bd4b956b3617501619737814bd28b Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Fri, 30 Jun 2023 14:47:41 -0400 Subject: contexts work now --- src/client/views/PropertiesDocContextSelector.tsx | 3 +++ src/client/views/PropertiesView.scss | 14 +++++++++++--- src/client/views/PropertiesView.tsx | 16 ++++++++++------ 3 files changed, 24 insertions(+), 9 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/PropertiesDocContextSelector.tsx b/src/client/views/PropertiesDocContextSelector.tsx index e1279c9a7..ea3bb434b 100644 --- a/src/client/views/PropertiesDocContextSelector.tsx +++ b/src/client/views/PropertiesDocContextSelector.tsx @@ -19,6 +19,7 @@ type PropertiesDocContextSelectorProps = { @observer export class PropertiesDocContextSelector extends React.Component { + @computed get _docs() { if (!this.props.DocView) return []; const target = this.props.DocView.props.Document; @@ -39,6 +40,8 @@ export class PropertiesDocContextSelector extends React.Component()) .keys() ); + console.log("embeddings " + embeddings.length); + return doclayouts .filter(doc => !Doc.AreProtosEqual(doc, CollectionDockingView.Instance?.props.Document)) .filter(doc => !Doc.IsSystem(doc)) diff --git a/src/client/views/PropertiesView.scss b/src/client/views/PropertiesView.scss index a9577b232..023e08e6a 100644 --- a/src/client/views/PropertiesView.scss +++ b/src/client/views/PropertiesView.scss @@ -443,12 +443,20 @@ .propertiesView-fields-checkbox { float: right; height: 20px; - margin-top: -9px; + margin-top: -4px; + //margin-top: -9px; + display: flex; + flex-direction: column; + align-items: center; + color:black; + // justify-content: center; .propertiesView-fields-checkbox-text { font-size: 7px; - margin-top: -10px; - margin-left: 6px; + text-align: center; + margin-right: 6px; + margin-top: -10px; + // margin-left: 6px; } } diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 60e93cdfd..585076b67 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -198,7 +198,7 @@ export class PropertiesView extends React.Component { }); rows.push( -
+
''} SetValue={this.setKeyValue} />
); @@ -257,9 +257,12 @@ export class PropertiesView extends React.Component { } @computed get contextCount(){ - if (this.selectedDoc != undefined){ - const aliases = DocListCast(this.selectedDoc.aliases) - return aliases.length + console.log("in context count"); + if (this.selectedDocumentView){ + const target = (this.selectedDocumentView.props.Document) + const embeddings = DocListCast(target.proto_embeddings) + console.log(embeddings.length -1 ); + return (embeddings.length - 1) } else{ return 0; } @@ -462,6 +465,7 @@ export class PropertiesView extends React.Component { } @computed get fieldsCheckbox() { + // color= "primary" return ; } @@ -1301,7 +1305,7 @@ export class PropertiesView extends React.Component { {!Doc.noviceMode && this.openFields ? (
{this.fieldsCheckbox} -
Layout
+
Embedding
) : null} {!this.openFields ? null :
{Doc.noviceMode ? this.noviceFields : this.expandedField}
} @@ -1342,7 +1346,7 @@ export class PropertiesView extends React.Component {
- {!this.openContexts ? null : this.contextCount > 0 ?
{this.contexts}
:
There are no other contexts.
} + {!this.openContexts ? null : this.contextCount > 0 ?
{this.contexts}
:
There are no other contexts.
}
); } -- cgit v1.2.3-70-g09d2 From 934c232fabb2f7a16d3efe1f048649b63b327d2c Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Wed, 5 Jul 2023 15:47:18 -0400 Subject: trying to add importBox --- src/client/util/CurrentUserUtils.ts | 5 +- .../views/nodes/importBox/ImportElementBox.tsx | 70 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 src/client/views/nodes/importBox/ImportElementBox.tsx (limited to 'src/client/views') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 11a8dcaf6..074e89753 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -30,6 +30,8 @@ import { LinkManager } from "./LinkManager"; import { ScriptingGlobals } from "./ScriptingGlobals"; import { ColorScheme } from "./SettingsManager"; import { UndoManager } from "./UndoManager"; +import { PresElementBox } from "../views/nodes/trails"; +import { ImportElementBox } from "../views/nodes/importBox/importElementBox"; interface Button { // DocumentOptions fields a button can set @@ -800,8 +802,9 @@ export class CurrentUserUtils { /// Import option on the left side button panel static setupImportSidebar(doc: Doc, field:string) { + // PresElementBox.LayoutString('data') const reqdOpts:DocumentOptions = { - title: "My Imports", _forceActive: true, ignoreClick: true, _layout_showTitle: "title", + title: "My Imports", _forceActive: true, ignoreClick: true, _layout_showTitle: "title", childLayoutString: ImportElementBox.LayoutString('data'), _dragOnlyWithinContainer: true, _layout_hideContextMenu: true, childLimitHeight: 0, childDragAction: "copy", _layout_autoHeight: true, _yMargin: 50, _gridGap: 15, layout_boxShadow: "0 0", _lockedPosition: true, isSystem: true, _chromeHidden: true, dontRegisterView: true, layout_explainer: "This is where documents that are Imported into Dash will go." diff --git a/src/client/views/nodes/importBox/ImportElementBox.tsx b/src/client/views/nodes/importBox/ImportElementBox.tsx new file mode 100644 index 000000000..a5d21cc8e --- /dev/null +++ b/src/client/views/nodes/importBox/ImportElementBox.tsx @@ -0,0 +1,70 @@ +import { observer } from "mobx-react"; +import { ViewBoxBaseComponent } from "../../DocComponent"; +import { FieldView, FieldViewProps } from "../FieldView"; +import { computed } from "mobx"; +import { Id } from "../../../../fields/FieldSymbols"; +import React from "react"; +import { EditableView } from "../../EditableView"; +import { DocListCast } from "../../../../fields/Doc"; +import { StrCast } from "../../../../fields/Types"; + + +@observer +export class ImportElementBox extends ViewBoxBaseComponent() { + public static LayoutString(fieldKey: string) { + return FieldView.LayoutString(ImportElementBox, fieldKey); + } + + private _itemRef: React.RefObject = React.createRef(); + private _dragRef: React.RefObject = React.createRef(); + private _titleRef: React.RefObject = React.createRef(); + + @computed importBoxVoew() { + return this.props.DocumentView?.()?.props.docViewPath().lastElement()?.ComponentView as PresBox; + } + + @computed get indexInPres() { + return DocListCast(this.presBox?.[StrCast(this.presBox.presFieldKey, 'data')]).indexOf(this.rootDoc); + } + + @computed get presBox() { + return this.props.DocumentView?.().props.docViewPath().lastElement()?.rootDoc; + } + + // @computed get selectedArray() { + // return this.presBoxView?.selectedArray; + // } + +@computed get mainItem() { + const isCurrent: boolean = this.presBox?._itemIndex === this.indexInPres; + //const isSelected: boolean = this.selectedArray?.has(this.rootDoc) ? true : false; + // const activeItem: Doc = this.rootDoc; + + return( +
+
+
+ {/* StrCast(activeItem.title)} SetValue={this.onSetValue} /> */} + +
+
+ +
+ ) +} + +} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From c9779f31d9ce2363e61c3c9fa7e3446203622dde Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Mon, 17 Jul 2023 16:02:35 -0400 Subject: starting remodel for filter --- src/client/views/FilterPanel.scss | 23 ++++++++++++++++++++++- src/client/views/FilterPanel.tsx | 21 ++++++++++++++++++--- src/client/views/PropertiesButtons.scss | 8 -------- src/client/views/PropertiesButtons.tsx | 4 ++-- 4 files changed, 42 insertions(+), 14 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/FilterPanel.scss b/src/client/views/FilterPanel.scss index c903f29ee..34d06ea23 100644 --- a/src/client/views/FilterPanel.scss +++ b/src/client/views/FilterPanel.scss @@ -156,7 +156,7 @@ right: 0; top: 0; z-index: 1; - background-color: #9f9f9f; + // background-color: #9f9f9f; .filterBox-tree { z-index: 0; @@ -182,6 +182,7 @@ } .filterBox-tree { + padding-top: 8px; display: inline-block; width: 100%; margin-bottom: 10px; @@ -189,3 +190,23 @@ overflow: auto; } } + + + +.filterBox-facetHeader{ + display: flex; + align-items: center; + // float:right; + + .filterBox-facetHeader-collapse{ + float: right; + justify-items: right; + align-items: flex-end; + margin-left: auto; + margin-right: 9px; + } + +} + + + diff --git a/src/client/views/FilterPanel.tsx b/src/client/views/FilterPanel.tsx index a5c18cd8b..b10fafb57 100644 --- a/src/client/views/FilterPanel.tsx +++ b/src/client/views/FilterPanel.tsx @@ -11,6 +11,8 @@ import './FilterPanel.scss'; import { FieldView } from './nodes/FieldView'; import { SearchBox } from './search/SearchBox'; import { undoable } from '../util/UndoManager'; +import { AiOutlineMinusSquare } from 'react-icons/ai'; +import { CiCircleRemove } from 'react-icons/ci'; interface filterProps { rootDoc: Doc; @@ -167,13 +169,15 @@ export class FilterPanel extends React.Component { render() { const options = this._allFacets.filter(facet => this.currentFacets.indexOf(facet) === -1).map(facet => ({ value: facet, label: facet })); + console.log("this is option " + options) + console.log("this is alll facets " + this._allFacets) return (
this.targetDoc && (this.targetDoc._childFilters_boolean = (e.target as any).value))} defaultValue={StrCast(this.targetDoc?.childFilters_boolean)}> {['AND', 'OR'].map(bool => ( ))} -
{' '} +
{' '} */}
{Array.from(this.activeFacets.keys()).map(facetHeader => (
- {facetHeader} +
+
+ {facetHeader.charAt(0).toUpperCase() + facetHeader.slice(1)} + +
+ + +
+ +
+ + {this.displayFacetValueFilterUIs(this.activeFacets.get(facetHeader), facetHeader)}
))} diff --git a/src/client/views/PropertiesButtons.scss b/src/client/views/PropertiesButtons.scss index dd4f67106..b801b3abf 100644 --- a/src/client/views/PropertiesButtons.scss +++ b/src/client/views/PropertiesButtons.scss @@ -128,14 +128,6 @@ $linkGap : 3px; } } -// .propertiesButtons-iconAndText{ -// height: 28px; -// width: 220px;//29px; -// display: flex; -// align-items: center; -// background-color: white; -// } - .propertiesButtons-label { text-transform: uppercase; margin-left: 8px; diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index 387397e9d..7a9820a35 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -60,7 +60,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { return !targetDoc ? null : ( {tooltip(targetDoc?.[property])}
} placement="top"> -
+
e.stopPropagation()} @@ -74,7 +74,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
{label(targetDoc?.[property])}
{/* */}
-
+ ); }; -- cgit v1.2.3-70-g09d2 From 684beffb74b539ef649956631a047b219e699b41 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 18 Jul 2023 12:27:00 -0400 Subject: fixed typing spaces into text inside schemas --- src/client/views/collections/collectionSchema/SchemaTableCell.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/views') diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index a958f53ea..1c9c0de53 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -272,7 +272,7 @@ export class SchemaRTFCell extends React.Component { fieldProps.isContentActive = this.selectedFunc; return (
- {this.selected ? : (field => (field ? Field.toString(field) : ''))(FieldValue(fieldProps.Document[fieldProps.fieldKey]))} + {this.selected ? : (field => (field ? Field.toString(field) : ''))(FieldValue(fieldProps.Document[fieldProps.fieldKey]))}
); } -- cgit v1.2.3-70-g09d2 From f736a3ae2322a7448c13518890a4d3f051501885 Mon Sep 17 00:00:00 2001 From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:31:45 -0400 Subject: variant --- package-lock.json | 6 +++--- package.json | 2 +- src/client/util/CurrentUserUtils.ts | 2 +- src/client/views/ContextMenu.tsx | 13 +++++++++++-- 4 files changed, 16 insertions(+), 7 deletions(-) (limited to 'src/client/views') diff --git a/package-lock.json b/package-lock.json index a92a58956..eed489547 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6198,9 +6198,9 @@ } }, "browndash-components": { - "version": "0.0.81", - "resolved": "https://registry.npmjs.org/browndash-components/-/browndash-components-0.0.81.tgz", - "integrity": "sha512-IEFEj7E7h6kX/zPX8+HxHP4kmXV7gsZEmi3ZZMWDxYm5HhRXfnxZXdhxTDuXJ7HH4EORraUCuI9PR19qbFsJ2A==", + "version": "0.0.82", + "resolved": "https://registry.npmjs.org/browndash-components/-/browndash-components-0.0.82.tgz", + "integrity": "sha512-1ZLjG8XWDusY7ceQHWEjsMALe7Uxv9g1Kz4ZU3anw8XpiPGBINWDdx/wcuHPIz9ekTeanr3tNDoQiJNnK3N7uQ==", "requires": { "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", diff --git a/package.json b/package.json index eed85ca6b..c65b84636 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "body-parser": "^1.19.2", "bootstrap": "^4.6.1", "brotli": "^1.3.3", - "browndash-components": "0.0.81", + "browndash-components": "0.0.82", "browser-assert": "^1.2.1", "bson": "^4.6.1", "canvas": "^2.9.3", diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 76dd3c356..1372cbb79 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -645,7 +645,7 @@ export class CurrentUserUtils { { title: "Under", toolTip: "Underline (Ctrl+U)", btnType: ButtonType.ToggleButton, icon: "underline", toolType:"underline",ignoreClick: true, scripts: {onClick: '{ return toggleCharStyle(self.toolType, _readOnly_);}'} }, { title: "Bullets", toolTip: "Bullet List", btnType: ButtonType.ToggleButton, icon: "list", toolType:"bullet", ignoreClick: true, scripts: {onClick: '{ return toggleCharStyle(self.toolType, _readOnly_);}'} }, { title: "#", toolTip: "Number List", btnType: ButtonType.ToggleButton, icon: "list-ol", toolType:"decimal", ignoreClick: true, scripts: {onClick: '{ return toggleCharStyle(self.toolType, _readOnly_);}'} }, - { title: "Alignment",toolTip: "Alignment", btnType: ButtonType.MultiToggleButton, toolType:"alignment", ignoreClick: true, scripts: {script: '{ return setFontAttr(self.toolType, value, _readOnly_);}'}, + { title: "Alignment",toolTip: "Alignment", btnType: ButtonType.MultiToggleButton, toolType:"alignment", ignoreClick: true, subMenu: [ { title: "Left", toolTip: "Left align (Cmd-[)", btnType: ButtonType.ToggleButton, icon: "align-left", toolType:"left", ignoreClick: true, scripts: {onClick: '{ return toggleCharStyle(self.toolType, _readOnly_);}' }}, { title: "Center", toolTip: "Center align (Cmd-\\)",btnType: ButtonType.ToggleButton, icon: "align-center",toolType:"center",ignoreClick: true, scripts: {onClick: '{ return toggleCharStyle(self.toolType, _readOnly_);}'} }, diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx index e4c3e864b..d54d4dc7b 100644 --- a/src/client/views/ContextMenu.tsx +++ b/src/client/views/ContextMenu.tsx @@ -5,6 +5,8 @@ import { observer } from 'mobx-react'; import './ContextMenu.scss'; import { ContextMenuItem, ContextMenuProps, OriginalMenuProps } from './ContextMenuItem'; import { Utils } from '../../Utils'; +import { StrCast } from '../../fields/Types'; +import { Doc } from '../../fields/Doc'; @observer export class ContextMenu extends React.Component { @@ -190,7 +192,11 @@ export class ContextMenu extends React.Component { } return this.filteredItems.map((value, index) => Array.isArray(value) ? ( -
+
{value.join(' -> ')}
) : ( @@ -213,7 +219,10 @@ export class ContextMenu extends React.Component { this._height = Number(getComputedStyle(r).height.replace('px', '')); } })} - style={{ left: this.pageX, ...(this._yRelativeToTop ? { top: this.pageY } : { bottom: this.pageY }) }}> + style={{ + left: this.pageX, ...(this._yRelativeToTop ? { top: this.pageY } : { bottom: this.pageY }), + background: StrCast(Doc.UserDoc().userBackgroundColor) + }}> {!this.itemsNeedSearch ? null : ( -- cgit v1.2.3-70-g09d2 From c13c54f4ab45ab098efe991a403f8fc0a2467704 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Tue, 18 Jul 2023 12:35:52 -0400 Subject: merged with master for component library --- package-lock.json | 243 ++++++++++++++++++-------------- src/client/views/FilterPanel.scss | 10 +- src/client/views/FilterPanel.tsx | 5 +- src/client/views/PropertiesSection.scss | 2 +- src/client/views/PropertiesSection.tsx | 27 +++- src/client/views/PropertiesView.tsx | 72 ++++------ 6 files changed, 201 insertions(+), 158 deletions(-) (limited to 'src/client/views') diff --git a/package-lock.json b/package-lock.json index d89dc2f65..ec4130567 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4481,7 +4481,7 @@ "@types/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==", + "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=", "dev": true }, "@types/strip-json-comments": { @@ -4837,7 +4837,7 @@ "textarea-caret": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/textarea-caret/-/textarea-caret-3.0.2.tgz", - "integrity": "sha1-82DEhpmqGr9xhoCkOjGoUGZcLK8=" + "integrity": "sha512-gRzeti2YS4did7UJnPQ47wrjD+vp+CJIe9zbsu0bJ987d8QVLvLNG9757rqiQTIy4hGIeFauTTJt5Xkn51UkXg==" } } }, @@ -4936,7 +4936,7 @@ "after": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=" + "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==" }, "agent-base": { "version": "6.0.2", @@ -5867,7 +5867,7 @@ "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" + "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==" }, "bail": { "version": "2.0.2", @@ -5937,7 +5937,7 @@ "base64-arraybuffer": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", - "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=" + "integrity": "sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==" }, "base64-js": { "version": "1.5.1", @@ -7413,7 +7413,7 @@ "component-bind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=" + "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" }, "component-emitter": { "version": "1.3.0", @@ -7423,7 +7423,7 @@ "component-inherit": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" + "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==" }, "compress-commons": { "version": "2.1.1", @@ -8151,7 +8151,7 @@ "custom-event": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=" + "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==" }, "cyclist": { "version": "1.0.1", @@ -8159,6 +8159,16 @@ "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", "dev": true }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "d3": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/d3/-/d3-7.8.4.tgz", @@ -9225,7 +9235,7 @@ "dynamic-dedupe": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", - "integrity": "sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ==", + "integrity": "sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE=", "dev": true, "requires": { "xtend": "^4.0.0" @@ -9355,7 +9365,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "ws": { "version": "7.4.6", @@ -9539,6 +9549,28 @@ "is-symbol": "^1.0.2" } }, + "es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, "es6-promise": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz", @@ -9550,6 +9582,7 @@ "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", "dev": true, "requires": { + "d": "^1.0.1", "ext": "^1.1.2" } }, @@ -11862,7 +11895,7 @@ "fs-extra": { "version": "0.26.7", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", - "integrity": "sha512-waKu+1KumRhYv8D8gMRCKJGAMI9pRnPuEb1mvgYD0f7wBscg+h6bW4FDTmEZhB9VKxvoTtxW+Y7bnIlB7zja6Q==", + "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=", "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^2.1.0", @@ -12532,14 +12565,14 @@ "isarray": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" } } }, "has-cors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=" + "integrity": "sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==" }, "has-flag": { "version": "3.0.0", @@ -13115,7 +13148,7 @@ "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==" }, "inflight": { "version": "1.0.6", @@ -14226,7 +14259,7 @@ "jsonfile": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "requires": { "graceful-fs": "^4.1.6" } @@ -14649,7 +14682,7 @@ "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, "lodash.isplainobject": { "version": "4.0.6", @@ -14910,7 +14943,7 @@ "mathquill": { "version": "0.10.1-a", "resolved": "https://registry.npmjs.org/mathquill/-/mathquill-0.10.1-a.tgz", - "integrity": "sha1-vyylaQEAY6w0vNXVKa3Ag3zVPD8=", + "integrity": "sha512-snSAEwAtwdwBFSor+nVBnWWQtTw67kgAgKMyAIxuz4ZPboy0qkWZmd7BL3lfOXp/INihhRlU1PcfaAtDaRhmzA==", "requires": { "jquery": "^1.12.3" }, @@ -14918,7 +14951,7 @@ "jquery": { "version": "1.12.4", "resolved": "https://registry.npmjs.org/jquery/-/jquery-1.12.4.tgz", - "integrity": "sha1-AeHfuikP5z3rp3zurLD5ui/sngw=" + "integrity": "sha512-UEVp7PPK9xXYSk8xqXCJrkXnKZtlgWkd2GsAQbMRFK6S/ePU2JN5G2Zum8hIVjzR3CpdfSqdqAzId/xd4TJHeg==" } } }, @@ -16604,7 +16637,7 @@ "dependencies": { "@iarna/cli": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@iarna/cli/-/cli-2.1.0.tgz", + "resolved": false, "integrity": "sha512-rvVVqDa2g860niRbqs3D5RhL4la3dc1vwk+NlpKPZxKaMSHtE2se6C2x8NeveN+rcjp3/686X+u+09CZ+7lmAQ==", "requires": { "glob": "^7.1.2", @@ -16707,7 +16740,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -16722,7 +16755,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -16731,12 +16764,12 @@ }, "asap": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "resolved": false, "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, "asn1": { "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "resolved": false, "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "requires": { "safer-buffer": "~2.1.0" @@ -16744,7 +16777,7 @@ }, "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "resolved": false, "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" }, "asynckit": { @@ -16754,22 +16787,22 @@ }, "aws-sign2": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "resolved": false, "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" }, "aws4": { "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "resolved": false, "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "resolved": false, "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "bcrypt-pbkdf": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "resolved": false, "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "requires": { "tweetnacl": "^0.14.3" @@ -16790,7 +16823,7 @@ }, "bluebird": { "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "resolved": false, "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "boxen": { @@ -16838,7 +16871,7 @@ }, "cacache": { "version": "12.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "resolved": false, "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", "requires": { "bluebird": "^3.5.5", @@ -16875,7 +16908,7 @@ }, "caseless": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "resolved": false, "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, "chalk": { @@ -17019,7 +17052,7 @@ }, "combined-stream": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "resolved": false, "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "requires": { "delayed-stream": "~1.0.0" @@ -17027,7 +17060,7 @@ }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": false, "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "concat-stream": { @@ -17057,7 +17090,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17072,7 +17105,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17081,7 +17114,7 @@ }, "config-chain": { "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "resolved": false, "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", "requires": { "ini": "^1.3.4", @@ -17182,7 +17215,7 @@ }, "dashdash": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "resolved": false, "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "requires": { "assert-plus": "^1.0.0" @@ -17215,7 +17248,7 @@ }, "decode-uri-component": { "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "resolved": false, "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==" }, "deep-extend": { @@ -17261,7 +17294,7 @@ }, "dezalgo": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "resolved": false, "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", "requires": { "asap": "^2.0.0", @@ -17313,7 +17346,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17328,7 +17361,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17337,7 +17370,7 @@ }, "ecc-jsbn": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "resolved": false, "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "requires": { "jsbn": "~0.1.0", @@ -17372,7 +17405,7 @@ }, "env-paths": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "resolved": false, "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" }, "err-code": { @@ -17456,7 +17489,7 @@ }, "extsprintf": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "resolved": false, "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" }, "fast-json-stable-stringify": { @@ -17466,12 +17499,12 @@ }, "figgy-pudding": { "version": "3.5.2", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "resolved": false, "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==" }, "filter-obj": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "resolved": false, "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==" }, "find-npm-prefix": { @@ -17504,7 +17537,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17519,7 +17552,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17528,12 +17561,12 @@ }, "forever-agent": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "resolved": false, "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" }, "form-data": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "resolved": false, "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "requires": { "asynckit": "^0.4.0", @@ -17566,7 +17599,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17581,7 +17614,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17649,7 +17682,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17664,7 +17697,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -17673,7 +17706,7 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "resolved": false, "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "function-bind": { @@ -17763,7 +17796,7 @@ }, "getpass": { "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "resolved": false, "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "requires": { "assert-plus": "^1.0.0" @@ -17771,7 +17804,7 @@ }, "glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "resolved": false, "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "requires": { "fs.realpath": "^1.0.0", @@ -17784,7 +17817,7 @@ "dependencies": { "minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "resolved": false, "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" @@ -17827,12 +17860,12 @@ }, "graceful-fs": { "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "resolved": false, "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, "har-schema": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "resolved": false, "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" }, "har-validator": { @@ -17911,7 +17944,7 @@ }, "http-signature": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "resolved": false, "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", "requires": { "assert-plus": "^1.0.0", @@ -18038,7 +18071,7 @@ }, "is-cidr": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-3.1.1.tgz", + "resolved": false, "integrity": "sha512-Gx+oErgq1j2jAKCR2Kbq0b3wbH0vQKqZ0wOlHxm0o56nq51Cs/DZA8oz9dMDhbHyHEGgJ86eTeVudtgMMOx3Mw==", "requires": { "cidr-regex": "^2.0.10" @@ -18117,7 +18150,7 @@ }, "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "resolved": false, "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, "isarray": { @@ -18132,12 +18165,12 @@ }, "isstream": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "resolved": false, "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" }, "jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "resolved": false, "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, "json-parse-better-errors": { @@ -18147,7 +18180,7 @@ }, "json-parse-even-better-errors": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "resolved": false, "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema": { @@ -18157,7 +18190,7 @@ }, "json-stringify-safe": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "resolved": false, "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, "jsonparse": { @@ -18375,7 +18408,7 @@ }, "lock-verify": { "version": "2.2.2", - "resolved": "https://registry.npmjs.org/lock-verify/-/lock-verify-2.2.2.tgz", + "resolved": false, "integrity": "sha512-2CUNtr1ZSVKJHcYP8uEzafmmuyauCB5zZimj8TvQd/Lflt9kXVZs+8S+EbAzZLaVUDn8CYGmeC3DFGdYfnCzeQ==", "requires": { "@iarna/cli": "^2.1.0", @@ -18504,7 +18537,7 @@ }, "meant": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/meant/-/meant-1.0.3.tgz", + "resolved": false, "integrity": "sha512-88ZRGcNxAq4EH38cQ4D85PM57pikCwS8Z99EWHODxN7KBY+UuPiqzRTtZzS8KTXO/ywSWbdjjJST2Hly/EQxLw==" }, "mime-db": { @@ -18522,7 +18555,7 @@ }, "minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "resolved": false, "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" @@ -18571,7 +18604,7 @@ }, "mkdirp": { "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "resolved": false, "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "requires": { "minimist": "^1.2.6" @@ -18619,7 +18652,7 @@ }, "node-gyp": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.1.1.tgz", + "resolved": false, "integrity": "sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw==", "requires": { "env-paths": "^2.2.0", @@ -18957,7 +18990,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -18972,7 +19005,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -18986,7 +19019,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": false, "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" }, "path-is-inside": { @@ -19006,7 +19039,7 @@ }, "performance-now": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "resolved": false, "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "pify": { @@ -19055,7 +19088,7 @@ }, "proto-list": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "resolved": false, "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==" }, "protoduck": { @@ -19078,7 +19111,7 @@ }, "psl": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "resolved": false, "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "pump": { @@ -19118,12 +19151,12 @@ }, "qs": { "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "resolved": false, "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" }, "query-string": { "version": "6.14.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz", + "resolved": false, "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==", "requires": { "decode-uri-component": "^0.2.0", @@ -19134,7 +19167,7 @@ }, "qw": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/qw/-/qw-1.0.2.tgz", + "resolved": false, "integrity": "sha512-1PhZ/iLKwlVNq45dnerTMKFjMof49uqli7/0QsvPNbX5OJ3IZ8msa9lUpvPheVdP+IYYPrf6cOaVil7S35joVA==" }, "rc": { @@ -19180,7 +19213,7 @@ }, "read-package-json": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", + "resolved": false, "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", "requires": { "glob": "^7.1.1", @@ -19239,7 +19272,7 @@ }, "request": { "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "resolved": false, "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "requires": { "aws-sign2": "~0.7.0", @@ -19309,7 +19342,7 @@ }, "safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "resolved": false, "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safer-buffer": { @@ -19480,7 +19513,7 @@ }, "sshpk": { "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "resolved": false, "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "requires": { "asn1": "~0.2.3", @@ -19536,7 +19569,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -19551,7 +19584,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -19565,7 +19598,7 @@ }, "strict-uri-encode": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "resolved": false, "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==" }, "string-width": { @@ -19721,7 +19754,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -19736,7 +19769,7 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } @@ -19755,7 +19788,7 @@ }, "tough-cookie": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "resolved": false, "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "requires": { "psl": "^1.1.28", @@ -19764,7 +19797,7 @@ "dependencies": { "punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "resolved": false, "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" } } @@ -19779,7 +19812,7 @@ }, "tweetnacl": { "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "resolved": false, "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" }, "typedarray": { @@ -19850,7 +19883,7 @@ }, "uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "resolved": false, "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "requires": { "punycode": "^2.1.0" @@ -19891,7 +19924,7 @@ }, "uuid": { "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "resolved": false, "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "validate-npm-package-license": { @@ -19913,7 +19946,7 @@ }, "verror": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "resolved": false, "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "requires": { "assert-plus": "^1.0.0", @@ -24773,12 +24806,12 @@ "to-array": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" + "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==" }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==" + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, "to-object-path": { "version": "0.3.0", @@ -25145,7 +25178,7 @@ "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true } } @@ -25281,6 +25314,12 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -26420,7 +26459,7 @@ "resolve-cwd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha512-ccu8zQTrzVr954472aUVPLEcB3YpKSYR3cg/3lo1okzobPBM+1INXBbBZlDbnI/hbEocnf8j0QVo43hQKrbchg==", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { "resolve-from": "^3.0.0" @@ -26429,7 +26468,7 @@ "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true }, "semver": { @@ -26981,7 +27020,7 @@ "yeast": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" + "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==" }, "yn": { "version": "3.1.1", diff --git a/src/client/views/FilterPanel.scss b/src/client/views/FilterPanel.scss index 34d06ea23..4f0460659 100644 --- a/src/client/views/FilterPanel.scss +++ b/src/client/views/FilterPanel.scss @@ -199,11 +199,11 @@ // float:right; .filterBox-facetHeader-collapse{ - float: right; - justify-items: right; - align-items: flex-end; - margin-left: auto; - margin-right: 9px; + float: right; + justify-items: right; + align-items: flex-end; + margin-left: auto; + margin-right: 9px; } } diff --git a/src/client/views/FilterPanel.tsx b/src/client/views/FilterPanel.tsx index b10fafb57..68d29942b 100644 --- a/src/client/views/FilterPanel.tsx +++ b/src/client/views/FilterPanel.tsx @@ -177,7 +177,8 @@ export class FilterPanel extends React.Component {
this.targetDoc && (this.targetDoc._childFilters_boolean = (e.target as any).value))} defaultValue={StrCast(this.targetDoc?.childFilters_boolean)}> {['AND', 'OR'].map(bool => (
diff --git a/src/client/views/PropertiesSection.scss b/src/client/views/PropertiesSection.scss index 79479a4ce..321b6300c 100644 --- a/src/client/views/PropertiesSection.scss +++ b/src/client/views/PropertiesSection.scss @@ -9,7 +9,7 @@ .propertiesView-sectionTitle { text-align: center; display: flex; - padding: 10px; + padding: 3px 10px; font-size: 14px; font-weight: bold; justify-content: space-between; diff --git a/src/client/views/PropertiesSection.tsx b/src/client/views/PropertiesSection.tsx index b900d17ca..ec8043ffe 100644 --- a/src/client/views/PropertiesSection.tsx +++ b/src/client/views/PropertiesSection.tsx @@ -1,6 +1,6 @@ import React = require('react'); import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" -import { action, computed } from "mobx" +import { action, computed, observable } from "mobx" import { observer } from "mobx-react" import './PropertiesSection.scss' import { Doc } from '../../fields/Doc'; @@ -12,7 +12,8 @@ export interface PropertiesSectionProps { isOpen: boolean, setIsOpen: (bool: boolean) => any inSection?: boolean, - setInSection?: (bool: boolean) => any + setInSection?: (bool: boolean) => any + onDoubleClick?: () => void } @observer @@ -28,14 +29,28 @@ export class PropertiesSection extends React.Component { @computed get variantColor() { return StrCast(Doc.UserDoc().userVariantColor); } + + @observable isDouble: boolean = false; + render() { console.log(this.props.title, this.props.content) if (this.props.content === undefined || this.props.content === null) return null else return
(this.props.setInSection && this.props.setInSection(true)))} onPointerLeave={action(() => (this.props.setInSection && this.props.setInSection(false)))}> -
(this.props.setIsOpen(!this.props.isOpen)))} style={{ - background: this.props.isOpen ? this.variantColor : this.backgroundColor, - color: this.color - }}> +
{ + this.isDouble = true; + this.props.onDoubleClick && this.props.onDoubleClick() + console.log("open options") + this.props.setIsOpen(true) + setTimeout(() => this.isDouble = false, 300) + })} + onClick={action((e) => { + this.props.setIsOpen(!this.props.isOpen) + })} + style={{ + background: this.props.isOpen ? this.variantColor : this.backgroundColor, + color: this.color + }}> {this.props.title}
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 31c03de4c..cb0663554 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -575,19 +575,29 @@ export class PropertiesView extends React.Component { ); } - @computed get type() { - const type = Utils.cleanDocumentType(StrCast(this.selectedDoc?.type) as DocumentType); - return ( -
} isOpen={this.openFilters} setIsOpen={(bool) => this.openFilters = bool} - onDoubleClick={() => this.onDoubleClick()} + onDoubleClick={() => this.onDoubleClick()} /> } @@ -1232,7 +1219,7 @@ export class PropertiesView extends React.Component { content={this.isInk ? this.appearanceEditor : null} isOpen={this.openAppearance} setIsOpen={(bool) => this.openAppearance = bool} - onDoubleClick={() => this.onDoubleClick()} + onDoubleClick={() => this.onDoubleClick()} /> { @computed get contextsSubMenu() { return 0 ? this.contexts : "There are no other contexts."} isOpen={this.openContexts} setIsOpen={(bool) => this.openContexts = bool} onDoubleClick={() => this.onDoubleClick()} @@ -1269,10 +1256,12 @@ export class PropertiesView extends React.Component { + + @computed get linksSubMenu() { return 0 ? this.links : "There are no current links." } isOpen={this.openLinks} setIsOpen={(bool) => this.openLinks = bool} onDoubleClick={() => this.onDoubleClick()} @@ -1753,7 +1742,6 @@ export class PropertiesView extends React.Component {
{this.editableTitle}
{this.currentType}
-
{this.type}
{this.contextsSubMenu} {this.linksSubMenu} {!this.selectedDoc || !LinkManager.currentLink || (!hasSelectedAnchor && this.selectedDoc !== LinkManager.currentLink) ? null : ( -- cgit v1.2.3-70-g09d2 From b62a751b6a16acd28b4f9a9794ded6ea14fa0de8 Mon Sep 17 00:00:00 2001 From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:55:43 -0400 Subject: fixed ClickButton --- src/client/util/CurrentUserUtils.ts | 2 +- src/client/views/nodes/FontIconBox/FontIconBox.tsx | 15 ++++++++------- .../buxton/narratives/.Theme - Chord Kbds.docx.icloud | Bin 175 -> 0 bytes 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 src/scraping/buxton/narratives/.Theme - Chord Kbds.docx.icloud (limited to 'src/client/views') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index d93ee9a2e..a7775715c 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -822,7 +822,7 @@ export class CurrentUserUtils { const reqdBtnOpts:DocumentOptions = { _forceActive: true, toolTip: "Import from computer", _width: 30, _height: 30, color: Colors.BLACK, _dragOnlyWithinContainer: true, _layout_hideContextMenu: true, title: "Import", btnType: ButtonType.ClickButton, - buttonText: "Import", icon: "upload", isSystem: true }; + buttonText: "Import", icon: "upload", isSystem: true, ignoreClick: true }; DocUtils.AssignDocField(myImports, "layout_headerButton", (opts) => Docs.Create.FontIconDocument(opts), reqdBtnOpts, undefined, { onClick: "importDocument()" }); return myImports; } diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.tsx b/src/client/views/nodes/FontIconBox/FontIconBox.tsx index 39be4022e..f676641ac 100644 --- a/src/client/views/nodes/FontIconBox/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox/FontIconBox.tsx @@ -398,18 +398,19 @@ export class FontIconBox extends DocComponent() { button = this.dropdownButton; break; case ButtonType.ToggleButton: button = this.toggleButton; break; - case ButtonType.TextButton: - const script = ScriptCast(this.rootDoc.script); + case ButtonType.ClickButton: + case ButtonType.ToolButton: + const script = ScriptCast(this.rootDoc.onClick); const checkResult = script?.script.run({ _readOnly_: true }).result; - // Script for checking the outcome of the toggle button = ( -