solid-ui 2.4.30 → 2.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/solid-ui.js +1520 -1074
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.map +1 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +14 -18
- package/lib/login/login.js.map +1 -1
- package/lib/media/media-capture.d.ts +2 -2
- package/lib/media/media-capture.d.ts.map +1 -1
- package/lib/media/media-capture.js +11 -15
- package/lib/media/media-capture.js.map +1 -1
- package/lib/pad.d.ts +2 -2
- package/lib/pad.d.ts.map +1 -1
- package/lib/pad.js +15 -39
- package/lib/pad.js.map +1 -1
- package/lib/participation.d.ts +7 -7
- package/lib/participation.d.ts.map +1 -1
- package/lib/participation.js +26 -24
- package/lib/participation.js.map +1 -1
- package/lib/style.js +93 -85
- package/lib/style.js.map +1 -1
- package/lib/styleConstants.js +35 -0
- package/lib/styleConstants.js.map +1 -0
- package/lib/tabs.d.ts +0 -125
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +15 -8
- package/lib/tabs.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +11 -19
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.d.ts.map +1 -1
- package/lib/widgets/error.js +9 -2
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +2 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/basic.d.ts.map +1 -1
- package/lib/widgets/forms/basic.js +5 -4
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/fieldParams.js +2 -2
- package/lib/widgets/forms/fieldParams.js.map +1 -1
- package/lib/widgets/forms.js +9 -8
- package/lib/widgets/forms.js.map +1 -1
- package/package.json +4 -4
package/lib/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","names":["formBorderColor","lowProfileLinkColor","formFieldNameBoxWidth","style","exports","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectSTyle","textInputStyle","textInputStyleUneditable","textInputSize","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","tabBorderRadius","messageBodyStyle","pendingeditModifier","highlightColor","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInButtonStyle","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingColor","formHeadingStyle","formTextInput","formGroupStyle","concat","formFieldLabelStyle","formFieldNameBoxStyle","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","aclControlBoxContainer","aclControlBoxHeader","aclControlBoxStatus","aclControlBoxStatusRevealed","aclGroupContent","accessGroupList","accessGroupListItem","defaultsController","defaultsControllerNotice","bigButton","group","group1","group2","group3","group5","group9","group13","trustedAppAddApplicationsTable","trustedAppCancelButton","trustedAppControllerI","temporaryStatusInit","temporaryStatusEnd","headerUserMenuLink","headerUserMenuLinkHover","headerUserMenuTrigger","headerUserMenuTriggerImg","headerUserMenuButton","headerUserMenuButtonHover","headerUserMenuList","headerUserMenuListDisplay","headerUserMenuNavigationMenu","headerUserMenuNavigationMenuNotDisplayed","headerUserMenuListItem","headerUserMenuPhoto","headerBanner","headerBannerLink","headerBannerRightMenu","headerBannerLogin","allChildrenVisible","headerBannerLoginInput","headerBannerUserMenu","headerBannerHelpMenu","headerBannerIcon","footer","primaryButton","primaryButtonHover","primaryButtonNoBorder","primaryButtonNoBorderHover","secondaryButton","secondaryButtonHover","secondaryButtonNoBorder","secondaryButtonNoBorderHover","setStyle","ele","styleName","module"],"sources":["../src/style.js"],"sourcesContent":["// Common readable consistent stylesheet\n// to avoid using style sheets which are document-global\n// and make programmable style toggling with selection, drag over, etc easier\n\n// These must all end with semicolon so they can be appended to.\n\nconst formBorderColor = '#888888' // Mid-grey\nconst lowProfileLinkColor = '#3B5998' // Grey-blue, e.g., for field labels linking to ontology\nconst formFieldNameBoxWidth = '8em' // The fixed amount to get form fields to line up\n// The latter we put in when switching awy from using tables. Getting allignment between\n// fields in different groups though is hard problem.\n\nexport const style = { // styleModule\n\n checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',\n checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',\n\n fieldLabelStyle: 'color: #3B5998; text-decoration: none;',\n formSelectSTyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyleUneditable: // Color difference only\n 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputSize: 20, // Default text input size in characters roughly\n buttonStyle:\n 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;\n commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',\n iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',\n smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',\n classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle\n confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',\n tabBorderRadius: '0.2em',\n messageBodyStyle:\n 'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',\n pendingeditModifier: 'color: #bbb;',\n highlightColor: '#7C4DFF', // Solid lavendar https://design.inrupt.com/atomic-core/?cat=Core\n\n // Contacts\n personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',\n searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',\n autocompleteRowStyle: 'border: 0.2em solid straw;',\n\n // Login buttons\n signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius\n\n // Forms\n heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey\n heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey\n heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form\n heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things\n\n formBorderColor, // originally was brown; now grey\n formHeadingColor: '#888888', // originally was brown; now grey\n formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey\n formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this\n formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${formBorderColor}; border-radius: 0.2em;`, // weight 0\n `padding-left: 2em; border: 0.05em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.1em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.2em solid ${formBorderColor}; border-radius: 0.2em;` // @@ pink\n ],\n\n formFieldLabelStyle: `'color: ${lowProfileLinkColor}; text-decoration: none;'`,\n formFieldNameBoxWidth,\n formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${formFieldNameBoxWidth};`,\n textInputBackgroundColor: '#eef',\n textInputBackgroundColorUneditable: '#fff',\n textInputColor: '#000',\n textInputColorPending: '#888',\n multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +\n ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',\n\n // Buttons\n renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',\n imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',\n linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',\n\n // ACL\n aclControlBoxContainer: 'margin: 1em',\n aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',\n aclControlBoxStatus: 'display: none; margin: 1rem 0',\n aclControlBoxStatusRevealed: 'display: block',\n aclGroupContent: 'maxWidth: 650',\n accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',\n accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',\n defaultsController: 'display: flex',\n defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',\n bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',\n group: 'color: #888',\n group1: 'color: green',\n group2: 'color: #cc0',\n group3: 'color: orange',\n group5: 'color: red',\n group9: 'color: blue',\n group13: 'color: purple',\n\n trustedAppAddApplicationsTable: 'background-color: #eee',\n trustedAppCancelButton: 'float: right',\n trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',\n temporaryStatusInit: 'background: green',\n temporaryStatusEnd: 'background: transparent; transition: background 5s linear',\n\n // header\n headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none',\n headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',\n headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',\n headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',\n headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',\n headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',\n headerUserMenuList: 'list-style: none; margin: 0; padding: 0',\n headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',\n headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',\n headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',\n headerUserMenuListItem: 'border-bottom: solid 1px #000000',\n headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',\n headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',\n headerBannerLink: 'display: block',\n headerBannerRightMenu: 'display: flex',\n headerBannerLogin: 'margin-left: auto',\n allChildrenVisible: 'display:true',\n headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',\n headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',\n headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',\n headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important', // may just be 65px round($icon-size * 352 / 322);\n\n // footer\n footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',\n\n // buttons\n primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out'\n\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n\nmodule.exports = style // @@ No way to do this in ESM\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;;AAEA,IAAMA,eAAe,GAAG,SAAS,EAAC;AAClC,IAAMC,mBAAmB,GAAG,SAAS,EAAC;AACtC,IAAMC,qBAAqB,GAAG,KAAK,EAAC;AACpC;AACA;;AAEO,IAAMC,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG;EAAE;;EAErBE,aAAa,EAAE,6EAA6E;EAC5FC,kBAAkB,EAAE,0GAA0G;EAE9HC,eAAe,EAAE,wCAAwC;EACzDC,eAAe,EACb,yHAAyH;EAC3HC,cAAc,EACZ,yHAAyH;EAC3HC,wBAAwB;EAAE;EACxB,2HAA2H;EAC7HC,aAAa,EAAE,EAAE;EAAE;EACnBC,WAAW,EACP,2HAA2H;EAAE;EACjIC,YAAY,EAAE,wEAAwE;EACtFC,SAAS,EAAE,6DAA6D;EACxEC,gBAAgB,EAAE,wCAAwC;EAC1DC,cAAc,EAAE,kIAAkI;EAAE;EACpJC,iBAAiB,EAAE,0HAA0H;EAC7IC,eAAe,EAAE,OAAO;EACxBC,gBAAgB,EACd,wIAAwI;EAC1IC,mBAAmB,EAAE,cAAc;EACnCC,cAAc,EAAE,SAAS;EAAE;;EAE3B;EACAC,eAAe,EAAE,2EAA2E;EAC5FC,gBAAgB,EAAE,mHAAmH;EACrIC,oBAAoB,EAAE,4BAA4B;EAElD;EACAC,iBAAiB,EAAE,qDAAqD;EAAE;;EAE1E;EACAC,aAAa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EAAE;EAClDD,GAAG,CAAC/F,KAAK,GAAGA,KAAK,CAACgG,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAAChG,OAAO,GAAGD,KAAK,EAAC"}
|
|
1
|
+
{"version":3,"file":"style.js","names":["_styleConstants","_interopRequireDefault","require","style","exports","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectStyle","textInputStyle","textInputStyleUneditable","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","messageBodyStyle","pendingeditModifier","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInAndUpButtonStyle","headerBannerLoginInput","signUpBackground","signInBackground","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingStyle","formTextInput","formGroupStyle","concat","styleConstants","formBorderColor","formFieldLabelStyle","lowProfileLinkColor","formFieldNameBoxStyle","formFieldNameBoxWidth","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","aclControlBoxContainer","aclControlBoxHeader","aclControlBoxStatus","aclControlBoxStatusRevealed","aclGroupContent","accessGroupList","accessGroupListItem","defaultsController","defaultsControllerNotice","bigButton","group","group1","group2","group3","group5","group9","group13","trustedAppAddApplicationsTable","trustedAppCancelButton","trustedAppControllerI","temporaryStatusInit","temporaryStatusEnd","headerUserMenuLink","headerUserMenuLinkHover","headerUserMenuTrigger","headerUserMenuTriggerImg","headerUserMenuButton","headerUserMenuButtonHover","headerUserMenuList","headerUserMenuListDisplay","headerUserMenuNavigationMenu","headerUserMenuNavigationMenuNotDisplayed","headerUserMenuListItem","headerUserMenuPhoto","headerBanner","headerBannerLink","headerBannerRightMenu","headerBannerLogin","allChildrenVisible","headerBannerUserMenu","headerBannerHelpMenu","headerBannerIcon","footer","primaryButton","primaryButtonHover","primaryButtonNoBorder","primaryButtonNoBorderHover","secondaryButton","secondaryButtonHover","secondaryButtonNoBorder","secondaryButtonNoBorderHover","controlStyle","mediaModuleCanvasWidth","mediaModuleCanvasHeight","dragEvent","dropEvent","restoreStyle","errorCancelButton","errorMessageBlockStyle","notepadStyle","upstreamStatus","downstreamStatus","baseStyle","headingCore","headingStyle","participantsStyle","participantsBlock","personTableTD","tabsNavElement","tabsRootElement","tabsMainElement","tabContainer","makeNewSlot","ellipsis","setStyle","ele","styleName","module"],"sources":["../src/style.js"],"sourcesContent":["// Common readable consistent stylesheet\n// to avoid using style sheets which are document-global\n// and make programmable style toggling with selection, drag over, etc easier\n// These must all end with semicolon so they can be appended to.\n\nimport styleConstants from './styleConstants'\n\nexport const style = { // styleModule\n\n checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',\n checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em;',\n\n fieldLabelStyle: 'color: #3B5998; text-decoration: none;',\n formSelectStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyleUneditable: // Color difference only\n 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n buttonStyle:\n 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;\n commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',\n iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',\n smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',\n classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle\n confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',\n messageBodyStyle:\n 'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',\n pendingeditModifier: 'color: #bbb;',\n\n // Contacts\n personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',\n searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',\n autocompleteRowStyle: 'border: 0.2em solid straw;',\n\n // Login buttons\n signInAndUpButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius\n headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important;',\n signUpBackground: 'background-color: #eef;',\n signInBackground: 'background-color: #efe;',\n\n // Forms\n heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey\n heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey\n heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form\n heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things\n\n formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey\n formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this\n formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`, // weight 0\n `padding-left: 2em; border: 0.05em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.1em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.2em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;` // @@ pink\n ],\n\n formFieldLabelStyle: `color: ${styleConstants.lowProfileLinkColor}; text-decoration: none;`,\n formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${styleConstants.formFieldNameBoxWidth};`,\n multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +\n ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',\n\n // Buttons\n renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',\n imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',\n linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',\n\n // ACL\n aclControlBoxContainer: 'margin: 1em;',\n aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem;',\n aclControlBoxStatus: 'display: none; margin: 1rem 0;',\n aclControlBoxStatusRevealed: 'display: block;',\n aclGroupContent: 'maxWidth: 650;',\n accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%;',\n accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%;',\n defaultsController: 'display: flex;',\n defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%;',\n bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em;',\n group: 'color: #888;',\n group1: 'color: green;',\n group2: 'color: #cc0;',\n group3: 'color: orange;',\n group5: 'color: red;',\n group9: 'color: blue;',\n group13: 'color: purple;',\n\n trustedAppAddApplicationsTable: 'background-color: #eee;',\n trustedAppCancelButton: 'float: right;',\n trustedAppControllerI: 'border-color: orange; border-radius: 1em; border-width: 0.1em;',\n temporaryStatusInit: 'background: green;',\n temporaryStatusEnd: 'background: transparent; transition: background 5s linear;',\n\n // header\n headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none;',\n headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);',\n headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px;',\n headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important;',\n headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%;',\n headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);',\n headerUserMenuList: 'list-style: none; margin: 0; padding: 0;',\n headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true;',\n headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true;',\n headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none;',\n headerUserMenuListItem: 'border-bottom: solid 1px #000000;',\n headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px;',\n headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px;',\n headerBannerLink: 'display: block;',\n headerBannerRightMenu: 'display: flex;',\n headerBannerLogin: 'margin-left: auto;',\n allChildrenVisible: 'display:true;',\n headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto;',\n headerBannerHelpMenu: 'border-left: solid 1px #000000; margin-left: auto;',\n headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important;', // may just be 65px round($icon-size * 352 / 322);\n\n // footer\n footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em;',\n\n // buttons\n primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',\n primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',\n primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',\n primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',\n secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',\n secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',\n secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',\n secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',\n\n // media\n controlStyle: `border-radius: 0.5em; margin: 0.8em; width:${styleConstants.mediaModuleCanvasWidth}; height:${styleConstants.mediaModuleCanvasHeight};`,\n\n // dragAndDrop\n dragEvent: 'background-color: #ccc; border: 0.25em dashed black; border-radius: 0.3em;',\n dropEvent: 'background-color: white; border: 0em solid black;',\n restoreStyle: 'background-color: white;',\n\n // errors\n errorCancelButton: 'width: 2em; height: 2em; align: right;',\n errorMessageBlockStyle: 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;',\n\n // pad\n notepadStyle: 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;',\n upstreamStatus: 'width: 50%;',\n downstreamStatus: 'width: 50%;',\n baseStyle: 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;',\n headingCore: 'font-family: sans-serif; font-weight: bold; border: none;',\n headingStyle: [\n 'font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;',\n 'font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;',\n 'font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;'\n ],\n\n // participation\n participantsStyle: 'margin: 0.8em;',\n participantsBlock: 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888;',\n personTableTD: 'vertical-align: middle;',\n\n // tabs\n tabsNavElement: 'margin: 0;',\n tabsRootElement: 'display: flex; height: 100%; width: 100%;',\n tabsMainElement: 'margin: 0; width:100%; height: 100%;',\n tabContainer: 'list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;',\n makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer;',\n ellipsis: 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;'\n\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n\nmodule.exports = style // @@ No way to do this in ESM\n"],"mappings":";;;;;;;AAKA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AALA;AACA;AACA;AACA;;AAIO,IAAMC,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG;EAAE;;EAErBE,aAAa,EAAE,6EAA6E;EAC5FC,kBAAkB,EAAE,2GAA2G;EAE/HC,eAAe,EAAE,wCAAwC;EACzDC,eAAe,EACb,wHAAwH;EAC1HC,cAAc,EACZ,wHAAwH;EAC1HC,wBAAwB;EAAE;EACxB,0HAA0H;EAC5HC,WAAW,EACP,0HAA0H;EAAE;EAChIC,YAAY,EAAE,wEAAwE;EACtFC,SAAS,EAAE,6DAA6D;EACxEC,gBAAgB,EAAE,wCAAwC;EAC1DC,cAAc,EAAE,kIAAkI;EAAE;EACpJC,iBAAiB,EAAE,0HAA0H;EAC7IC,gBAAgB,EACd,wIAAwI;EAC1IC,mBAAmB,EAAE,cAAc;EAEnC;EACAC,eAAe,EAAE,2EAA2E;EAC5FC,gBAAgB,EAAE,mHAAmH;EACrIC,oBAAoB,EAAE,4BAA4B;EAElD;EACAC,sBAAsB,EAAE,qDAAqD;EAAE;EAC/EC,sBAAsB,EAAE,sEAAsE;EAC9FC,gBAAgB,EAAE,yBAAyB;EAC3CC,gBAAgB,EAAE,yBAAyB;EAE3C;EACAC,aAAa,EAAE,yFAAyF;EAAE;EAC1GC,aAAa,EAAE,0FAA0F;EAAE;EAC3GC,aAAa,EAAE,0FAA0F;EAAE;EAC3GC,aAAa,EAAE,0FAA0F;EAAE;;EAE3GC,gBAAgB,EAAE,2FAA2F;EAAE;EAC/GC,aAAa,EAAE,iDAAiD;EAAE;EAClEC,cAAc,EAAE,2CAAAC,MAAA,CAA2CC,0BAAc,CAACC,eAAe,8BAA2B;EAAA,2CAAAF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gB;EACnCC,iBAAiB,EAAE,uEAAuE;EAC1FC,aAAa,EAAE,yBAAyB;EAExC;EACAC,cAAc,EAAE,YAAY;EAC5BC,eAAe,EAAE,2CAA2C;EAC5DC,eAAe,EAAE,sCAAsC;EACvDC,YAAY,EAAE,yFAAyF;EACvGC,WAAW,EAAE,iEAAiE;EAC9EC,QAAQ,EAAE;AAEZ,CAAC;AAEDlH,KAAK,CAACmH,QAAQ,GAAG,SAASA,QAAQA,CAAEC,GAAG,EAAEC,SAAS,EAAE;EAClDD,GAAG,CAACpH,KAAK,GAAGA,KAAK,CAACqH,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAACrH,OAAO,GAAGD,KAAK,EAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _default = exports["default"] = {
|
|
8
|
+
highlightColor: '#7C4DFF',
|
|
9
|
+
// Solid lavender https://design.inrupt.com/atomic-core/?cat=Core
|
|
10
|
+
|
|
11
|
+
formBorderColor: '#888888',
|
|
12
|
+
// Mid-grey
|
|
13
|
+
formHeadingColor: '#888888',
|
|
14
|
+
// originally was brown; now grey
|
|
15
|
+
lowProfileLinkColor: '#3B5998',
|
|
16
|
+
// Grey-blue, e.g., for field labels linking to ontology
|
|
17
|
+
formFieldNameBoxWidth: '8em',
|
|
18
|
+
// The fixed amount to get form fields to line up
|
|
19
|
+
// We put in the latter when switching away from using tables. However, getting
|
|
20
|
+
// alignment between fields in different groups is a hard problem.
|
|
21
|
+
|
|
22
|
+
mediaModuleCanvasWidth: '640',
|
|
23
|
+
mediaModuleCanvasHeight: '480',
|
|
24
|
+
textInputSize: 20,
|
|
25
|
+
// Rough default text input size, in characters
|
|
26
|
+
tabBorderRadius: '0.2em',
|
|
27
|
+
textInputBackgroundColor: '#eef',
|
|
28
|
+
textInputBackgroundColorUneditable: '#fff',
|
|
29
|
+
textInputColor: '#000',
|
|
30
|
+
textInputColorPending: '#888',
|
|
31
|
+
defaultErrorBackgroundColor: '#fee',
|
|
32
|
+
participationDefaultBackground: 'white',
|
|
33
|
+
basicMaxLength: '4096'
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=styleConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleConstants.js","names":["highlightColor","formBorderColor","formHeadingColor","lowProfileLinkColor","formFieldNameBoxWidth","mediaModuleCanvasWidth","mediaModuleCanvasHeight","textInputSize","tabBorderRadius","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","defaultErrorBackgroundColor","participationDefaultBackground","basicMaxLength"],"sources":["../src/styleConstants.js"],"sourcesContent":["export default {\n highlightColor: '#7C4DFF', // Solid lavender https://design.inrupt.com/atomic-core/?cat=Core\n\n formBorderColor: '#888888', // Mid-grey\n formHeadingColor: '#888888', // originally was brown; now grey\n lowProfileLinkColor: '#3B5998', // Grey-blue, e.g., for field labels linking to ontology\n formFieldNameBoxWidth: '8em', // The fixed amount to get form fields to line up\n // We put in the latter when switching away from using tables. However, getting\n // alignment between fields in different groups is a hard problem.\n\n mediaModuleCanvasWidth: '640',\n mediaModuleCanvasHeight: '480',\n\n textInputSize: 20, // Rough default text input size, in characters\n tabBorderRadius: '0.2em',\n\n textInputBackgroundColor: '#eef',\n textInputBackgroundColorUneditable: '#fff',\n textInputColor: '#000',\n textInputColorPending: '#888',\n\n defaultErrorBackgroundColor: '#fee',\n\n participationDefaultBackground: 'white',\n\n basicMaxLength: '4096'\n}\n"],"mappings":";;;;;;oCAAe;EACbA,cAAc,EAAE,SAAS;EAAE;;EAE3BC,eAAe,EAAE,SAAS;EAAE;EAC5BC,gBAAgB,EAAE,SAAS;EAAE;EAC7BC,mBAAmB,EAAE,SAAS;EAAE;EAChCC,qBAAqB,EAAE,KAAK;EAAE;EAC9B;EACA;;EAEAC,sBAAsB,EAAE,KAAK;EAC7BC,uBAAuB,EAAE,KAAK;EAE9BC,aAAa,EAAE,EAAE;EAAE;EACnBC,eAAe,EAAE,OAAO;EAExBC,wBAAwB,EAAE,MAAM;EAChCC,kCAAkC,EAAE,MAAM;EAC1CC,cAAc,EAAE,MAAM;EACtBC,qBAAqB,EAAE,MAAM;EAE7BC,2BAA2B,EAAE,MAAM;EAEnCC,8BAA8B,EAAE,OAAO;EAEvCC,cAAc,EAAE;AAClB,CAAC"}
|
package/lib/tabs.d.ts
CHANGED
|
@@ -25,131 +25,6 @@ export declare class TabWidgetElement extends HTMLElement {
|
|
|
25
25
|
refresh?: () => void;
|
|
26
26
|
tabContainer?: HTMLElement;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Use this widget to generate tabs from triples set in the global store.
|
|
30
|
-
*
|
|
31
|
-
* [Here you can see examples of the tabs](https://solidos.github.io/solid-ui/examples/tabs/).
|
|
32
|
-
*
|
|
33
|
-
* It assumes that items to use for tabs will be in a collection by default,
|
|
34
|
-
* e.g.:
|
|
35
|
-
*
|
|
36
|
-
* ```turtle
|
|
37
|
-
* :subject :predicate ( :item1 :item2 ) .
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* You can override this by setting `ordered: false`, in which case it expects
|
|
41
|
-
* unordered triples:
|
|
42
|
-
*
|
|
43
|
-
* ```turtle
|
|
44
|
-
* :subject :predicate :item1, :item 2 .
|
|
45
|
-
* ```
|
|
46
|
-
*
|
|
47
|
-
* Triples that are not ordered in collection are in principle not sorted,
|
|
48
|
-
* which means that tabs could change order every time you render the widget.
|
|
49
|
-
* But in this case the widget will try to sort it in order to keep it
|
|
50
|
-
* consistent.
|
|
51
|
-
*
|
|
52
|
-
* In both of these cases you need to define options `subject` and `predicate`
|
|
53
|
-
* to tell the widget which triples it should be looking for.
|
|
54
|
-
*
|
|
55
|
-
* Finally you can set items manually, using the `items` option, e.g.:
|
|
56
|
-
*
|
|
57
|
-
* ```javascript
|
|
58
|
-
* {
|
|
59
|
-
* items: [
|
|
60
|
-
* namedNode('https://domain.tld/#item1'),
|
|
61
|
-
* namedNode('https://domain.tld/#item2')
|
|
62
|
-
* ]
|
|
63
|
-
* }
|
|
64
|
-
* ```
|
|
65
|
-
*
|
|
66
|
-
* When you set items manually you do not need to set `subject` and
|
|
67
|
-
* `predicate`.
|
|
68
|
-
*
|
|
69
|
-
* In any case you probably want to set the renderMain option to specify
|
|
70
|
-
* what should be rendered for the various items, e.g.:
|
|
71
|
-
*
|
|
72
|
-
* ```javascript
|
|
73
|
-
* {
|
|
74
|
-
* renderMain: (bodyMain, subject) => {
|
|
75
|
-
* bodyMain.innerHTML = renderItem(subject)
|
|
76
|
-
* }
|
|
77
|
-
* }
|
|
78
|
-
* ```
|
|
79
|
-
*
|
|
80
|
-
* **Note:** `renderItem` is a custom function that you need to define yourself.
|
|
81
|
-
*
|
|
82
|
-
* The option `renderTabSettings` allows you to render a custom view in the
|
|
83
|
-
* body container that is shown when you hold the ALT key and click on a
|
|
84
|
-
* tab. It works very much like the `renderMain` option:
|
|
85
|
-
*
|
|
86
|
-
* ```javascript
|
|
87
|
-
* {
|
|
88
|
-
* renderTabSettings: (bodyMain, subject) => {
|
|
89
|
-
* bodyMain.innerHTML = renderTabSettings(subject)
|
|
90
|
-
* }
|
|
91
|
-
* }
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* **Note:** `renderTabSettings` is a custom function that you need to define
|
|
95
|
-
* yourself.
|
|
96
|
-
*
|
|
97
|
-
* By default the widget will try to guess the label by using the
|
|
98
|
-
* [[utils.label]] function. If you want to customize this yourself, you can
|
|
99
|
-
* use the `renderTab` option:
|
|
100
|
-
*
|
|
101
|
-
* ```javascript
|
|
102
|
-
* {
|
|
103
|
-
* renderTab: (tabDiv, subject) => {
|
|
104
|
-
* tabDiv.innerText = renderTabText(subject)
|
|
105
|
-
* }
|
|
106
|
-
* }
|
|
107
|
-
* ```
|
|
108
|
-
*
|
|
109
|
-
* **Note:** `renderTabText` is a custom function you need to define yourself.
|
|
110
|
-
*
|
|
111
|
-
* The option renderTab is also important if you want to set which tab should
|
|
112
|
-
* be selected once the widget is rendered. By default it will simply select
|
|
113
|
-
* the first tab, but you can override by setting `dataset.name` on the tab
|
|
114
|
-
* and referring to the same string in `selectedTab`:
|
|
115
|
-
*
|
|
116
|
-
* ```javascript
|
|
117
|
-
* {
|
|
118
|
-
* renderTab: (tabDiv, subject) => {
|
|
119
|
-
* tabDiv.dataset.name = subject.uri
|
|
120
|
-
* },
|
|
121
|
-
* selectedTab: item2.uri
|
|
122
|
-
* }
|
|
123
|
-
* ```
|
|
124
|
-
*
|
|
125
|
-
* You can apply a color to use for tabs and border of the container by using
|
|
126
|
-
* option `background-color`. This is #ddddcc by default.
|
|
127
|
-
*
|
|
128
|
-
* You can override the document object that the widget uses to generate DOM
|
|
129
|
-
* elements by setting the option `dom`. This is encouraged to set if you
|
|
130
|
-
* intend your functionality to be used in environments that don't provide
|
|
131
|
-
* a global `document` object.
|
|
132
|
-
*
|
|
133
|
-
* If you want to render a close button next to the tabs you can set option
|
|
134
|
-
* `onClose` which takes a callback function that is triggered when the
|
|
135
|
-
* button is clicked:
|
|
136
|
-
*
|
|
137
|
-
* ```javascript
|
|
138
|
-
* {
|
|
139
|
-
* onClose: (event) => {
|
|
140
|
-
* // do something that hides the widget altogether
|
|
141
|
-
* }
|
|
142
|
-
* }
|
|
143
|
-
* ```
|
|
144
|
-
*
|
|
145
|
-
* The option `orientation` allows you to set which side the tabs should be
|
|
146
|
-
* located: `'0'` = Top, `'1'` = Left, `'2'` = Bottom, `'3'` = Right
|
|
147
|
-
*
|
|
148
|
-
* If you don't want to render anything in the body container by default,
|
|
149
|
-
* you can set the option `startEmpty` to `true`.
|
|
150
|
-
*
|
|
151
|
-
* @param options
|
|
152
|
-
*/
|
|
153
28
|
export declare function tabWidget(options: TabWidgetOptions): TabWidgetElement;
|
|
154
29
|
export {};
|
|
155
30
|
//# sourceMappingURL=tabs.d.ts.map
|
package/lib/tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../src/tabs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../src/tabs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC;;GAEG;AACH,cAAM,gBAAiB,SAAQ,WAAW;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,KAAK,gBAAgB,GAAG;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACpC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;IACjE,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;IACpE,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;IAC7E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,aAAa,CAAC,EAAE,WAAW,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,YAAY,CAAC,EAAE,WAAW,CAAA;CAC3B;AAyID,wBAAgB,SAAS,CAAE,OAAO,EAAE,gBAAgB,oBAmOnD"}
|
package/lib/tabs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -17,7 +18,10 @@ var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/w
|
|
|
17
18
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
19
|
var _widgets = require("./widgets");
|
|
19
20
|
var _utils = require("./utils");
|
|
21
|
+
var style = _interopRequireWildcard(require("./style"));
|
|
20
22
|
var _solidLogic = require("solid-logic");
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
21
25
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
22
26
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
27
|
/**
|
|
@@ -199,11 +203,12 @@ var TabElement = /*#__PURE__*/function (_HTMLElement3) {
|
|
|
199
203
|
*
|
|
200
204
|
* @param options
|
|
201
205
|
*/
|
|
206
|
+
var tabsDefaultBackgroundColor = '#ddddcc';
|
|
202
207
|
function tabWidget(options) {
|
|
203
208
|
var subject = options.subject;
|
|
204
209
|
var dom = options.dom || document;
|
|
205
210
|
var orientation = parseInt(options.orientation || '0');
|
|
206
|
-
var backgroundColor = options.backgroundColor ||
|
|
211
|
+
var backgroundColor = options.backgroundColor || tabsDefaultBackgroundColor;
|
|
207
212
|
var flipped = orientation & 2;
|
|
208
213
|
var vertical = orientation & 1;
|
|
209
214
|
var onClose = options.onClose;
|
|
@@ -214,13 +219,15 @@ function tabWidget(options) {
|
|
|
214
219
|
var bodyMainStyle = "flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ".concat(selectedColor, "; padding: 1em;");
|
|
215
220
|
var rootElement = dom.createElement('div'); // 20200117a
|
|
216
221
|
|
|
217
|
-
rootElement.setAttribute('style',
|
|
222
|
+
rootElement.setAttribute('style', style.tabsRootElement);
|
|
223
|
+
rootElement.style.flexDirection = (vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';');
|
|
218
224
|
var navElement = rootElement.appendChild(dom.createElement('nav'));
|
|
219
|
-
navElement.setAttribute('style',
|
|
225
|
+
navElement.setAttribute('style', style.tabsNavElement);
|
|
220
226
|
var mainElement = rootElement.appendChild(dom.createElement('main'));
|
|
221
|
-
mainElement.setAttribute('style',
|
|
227
|
+
mainElement.setAttribute('style', style.tabsMainElement); // override tabbedtab.css
|
|
222
228
|
var tabContainer = navElement.appendChild(dom.createElement('ul'));
|
|
223
|
-
tabContainer.setAttribute('style',
|
|
229
|
+
tabContainer.setAttribute('style', style.tabContainer);
|
|
230
|
+
tabContainer.style.flexDirection = "".concat(vertical ? 'column' : 'row');
|
|
224
231
|
var tabElement = 'li';
|
|
225
232
|
var bodyContainer = mainElement;
|
|
226
233
|
rootElement.tabContainer = tabContainer;
|
|
@@ -240,7 +247,7 @@ function tabWidget(options) {
|
|
|
240
247
|
rootElement.refresh = orderedSync;
|
|
241
248
|
orderedSync();
|
|
242
249
|
if (!options.startEmpty && tabContainer.children.length && options.selectedTab) {
|
|
243
|
-
var selectedTab0 = Array.from(tabContainer.children) // Version left for
|
|
250
|
+
var selectedTab0 = Array.from(tabContainer.children) // Version left for compatibility with ??
|
|
244
251
|
.map(function (tab) {
|
|
245
252
|
return tab.firstChild;
|
|
246
253
|
}).find(function (tab) {
|
|
@@ -293,7 +300,7 @@ function tabWidget(options) {
|
|
|
293
300
|
ele.setAttribute('style', unselectedStyle);
|
|
294
301
|
ele.subject = item;
|
|
295
302
|
var div = ele.appendChild(dom.createElement('button'));
|
|
296
|
-
div.setAttribute('style',
|
|
303
|
+
div.setAttribute('style', style.makeNewSlot);
|
|
297
304
|
div.onclick = function () {
|
|
298
305
|
resetTabStyle();
|
|
299
306
|
resetBodyStyle();
|
|
@@ -310,7 +317,7 @@ function tabWidget(options) {
|
|
|
310
317
|
if (options.renderTabSettings && ele.subject) {
|
|
311
318
|
var ellipsis = dom.createElement('button');
|
|
312
319
|
ellipsis.textContent = '...';
|
|
313
|
-
ellipsis.setAttribute('style',
|
|
320
|
+
ellipsis.setAttribute('style', style.ellipsis);
|
|
314
321
|
ellipsis.onclick = function () {
|
|
315
322
|
resetTabStyle();
|
|
316
323
|
resetBodyStyle();
|
package/lib/tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","names":["_widgets","require","_utils","_solidLogic","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","ContainerElement","_HTMLElement","_inherits2","_super","_this","_classCallCheck2","_len","length","args","Array","_key","concat","_defineProperty2","_assertThisInitialized2","_createClass2","_wrapNativeSuper2","HTMLElement","TabWidgetElement","exports","_HTMLElement2","_super2","_this2","_len2","_key2","TabElement","_HTMLElement3","_super3","_this3","_len3","_key3","tabWidget","options","subject","dom","document","orientation","parseInt","backgroundColor","flipped","vertical","onClose","_getColors","getColors","_getColors2","_slicedToArray2","selectedColor","color","bodyMainStyle","rootElement","createElement","setAttribute","navElement","appendChild","mainElement","tabContainer","tabElement","bodyContainer","corners","cornersPrepped","slice","cornersStyle","join","margins","marginsPrepped","marginsStyle","paddingStyle","tabStyle","unselectedStyle","selectedStyle","shownStyle","hiddenStyle","refresh","orderedSync","startEmpty","children","selectedTab","selectedTab0","from","map","tab","firstChild","find","dataset","name","selectedTabURI","uri","selectedTab1","clickMe","click","addCancelButton","onCloseSet","existingCancelButton","querySelector","removeChild","extraTab","classList","add","tabCancelButton","cancelButton","getAttribute","getItems","items","ordered","store","the","predicate","elements","each","makeNewSlot","item","ele","div","onclick","resetTabStyle","resetBodyStyle","bodyTR","bodyMain","getOrCreateContainerElement","renderMain","asSettings","innerHTML","renderTabSettings","ellipsis","textContent","renderTab","label","_ele$bodyTR","newBodyMain","slot","i","j","left","right","differ","sameTerm","insertables","newSlot","newBodyDiv","insertBefore","contains","isLight","colorBlend","a","b","mix","ca","cb","res","str","hex","res2","split","h","l","x","total"],"sources":["../src/tabs.ts"],"sourcesContent":["import { cancelButton } from './widgets'\nimport { label } from './utils'\nimport { NamedNode } from 'rdflib'\nimport { store } from 'solid-logic'\n\n/**\n * @ignore\n */\nclass ContainerElement extends HTMLElement {\n asSettings?: boolean\n}\n\ntype TabWidgetOptions = {\n backgroundColor?: string;\n dom?: HTMLDocument;\n items?: Array<NamedNode>;\n onClose?: (event: Event) => void;\n ordered?: boolean;\n orientation?: '0' | '1' | '2' | '3';\n predicate?: NamedNode;\n renderMain?: (bodyMain: HTMLElement, subject: NamedNode) => void;\n renderTab?: (tabDiv: HTMLButtonElement, subject: NamedNode) => void;\n renderTabSettings?: (bodyMain: ContainerElement, subject: NamedNode) => void;\n selectedTab?: NamedNode;\n startEmpty?: boolean;\n subject?: NamedNode;\n};\n\nexport class TabWidgetElement extends HTMLElement {\n bodyContainer?: HTMLElement\n refresh?: () => void\n tabContainer?: HTMLElement\n}\n\n/**\n * @ignore\n */\nclass TabElement extends HTMLElement {\n bodyTR?: HTMLElement\n subject?: NamedNode\n}\n\n/**\n * Use this widget to generate tabs from triples set in the global store.\n *\n * [Here you can see examples of the tabs](https://solidos.github.io/solid-ui/examples/tabs/).\n *\n * It assumes that items to use for tabs will be in a collection by default,\n * e.g.:\n *\n * ```turtle\n * :subject :predicate ( :item1 :item2 ) .\n * ```\n *\n * You can override this by setting `ordered: false`, in which case it expects\n * unordered triples:\n *\n * ```turtle\n * :subject :predicate :item1, :item 2 .\n * ```\n *\n * Triples that are not ordered in collection are in principle not sorted,\n * which means that tabs could change order every time you render the widget.\n * But in this case the widget will try to sort it in order to keep it\n * consistent.\n *\n * In both of these cases you need to define options `subject` and `predicate`\n * to tell the widget which triples it should be looking for.\n *\n * Finally you can set items manually, using the `items` option, e.g.:\n *\n * ```javascript\n * {\n * items: [\n * namedNode('https://domain.tld/#item1'),\n * namedNode('https://domain.tld/#item2')\n * ]\n * }\n * ```\n *\n * When you set items manually you do not need to set `subject` and\n * `predicate`.\n *\n * In any case you probably want to set the renderMain option to specify\n * what should be rendered for the various items, e.g.:\n *\n * ```javascript\n * {\n * renderMain: (bodyMain, subject) => {\n * bodyMain.innerHTML = renderItem(subject)\n * }\n * }\n * ```\n *\n * **Note:** `renderItem` is a custom function that you need to define yourself.\n *\n * The option `renderTabSettings` allows you to render a custom view in the\n * body container that is shown when you hold the ALT key and click on a\n * tab. It works very much like the `renderMain` option:\n *\n * ```javascript\n * {\n * renderTabSettings: (bodyMain, subject) => {\n * bodyMain.innerHTML = renderTabSettings(subject)\n * }\n * }\n * ```\n *\n * **Note:** `renderTabSettings` is a custom function that you need to define\n * yourself.\n *\n * By default the widget will try to guess the label by using the\n * [[utils.label]] function. If you want to customize this yourself, you can\n * use the `renderTab` option:\n *\n * ```javascript\n * {\n * renderTab: (tabDiv, subject) => {\n * tabDiv.innerText = renderTabText(subject)\n * }\n * }\n * ```\n *\n * **Note:** `renderTabText` is a custom function you need to define yourself.\n *\n * The option renderTab is also important if you want to set which tab should\n * be selected once the widget is rendered. By default it will simply select\n * the first tab, but you can override by setting `dataset.name` on the tab\n * and referring to the same string in `selectedTab`:\n *\n * ```javascript\n * {\n * renderTab: (tabDiv, subject) => {\n * tabDiv.dataset.name = subject.uri\n * },\n * selectedTab: item2.uri\n * }\n * ```\n *\n * You can apply a color to use for tabs and border of the container by using\n * option `background-color`. This is #ddddcc by default.\n *\n * You can override the document object that the widget uses to generate DOM\n * elements by setting the option `dom`. This is encouraged to set if you\n * intend your functionality to be used in environments that don't provide\n * a global `document` object.\n *\n * If you want to render a close button next to the tabs you can set option\n * `onClose` which takes a callback function that is triggered when the\n * button is clicked:\n *\n * ```javascript\n * {\n * onClose: (event) => {\n * // do something that hides the widget altogether\n * }\n * }\n * ```\n *\n * The option `orientation` allows you to set which side the tabs should be\n * located: `'0'` = Top, `'1'` = Left, `'2'` = Bottom, `'3'` = Right\n *\n * If you don't want to render anything in the body container by default,\n * you can set the option `startEmpty` to `true`.\n *\n * @param options\n */\nexport function tabWidget (options: TabWidgetOptions) {\n const subject = options.subject\n const dom = options.dom || document\n const orientation = parseInt(options.orientation || '0')\n const backgroundColor = options.backgroundColor || '#ddddcc'\n const flipped = orientation & 2\n const vertical = orientation & 1\n const onClose = options.onClose\n\n const [selectedColor, color] = getColors(backgroundColor)\n const bodyMainStyle = `flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ${selectedColor}; padding: 1em;`\n const rootElement: TabWidgetElement = dom.createElement('div') // 20200117a\n\n rootElement.setAttribute(\n 'style',\n 'display: flex; height: 100%; width: 100%; flex-direction: ' +\n (vertical ? 'row' : 'column') +\n (flipped ? '-reverse;' : ';')\n )\n\n const navElement = rootElement.appendChild(dom.createElement('nav'))\n navElement.setAttribute('style', 'margin: 0;')\n\n const mainElement = rootElement.appendChild(dom.createElement('main'))\n\n mainElement.setAttribute('style', 'margin: 0; width:100%; height: 100%;') // override tabbedtab.css\n const tabContainer = navElement.appendChild(dom.createElement('ul'))\n tabContainer.setAttribute(\n 'style',\n `\n list-style-type: none;\n display: flex;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n flex-direction: ${vertical ? 'column' : 'row'}\n `\n )\n\n const tabElement = 'li'\n\n const bodyContainer = mainElement\n rootElement.tabContainer = tabContainer\n rootElement.bodyContainer = bodyContainer\n\n const corners = ['0.2em', '0.2em', '0', '0'] // top left, TR, BR, BL\n const cornersPrepped = corners.concat(corners).slice(orientation, orientation + 4)\n const cornersStyle = `border-radius: ${cornersPrepped.join(' ')};`\n\n const margins = ['0.3em', '0.3em', '0', '0.3em'] // top, right, bottom, left\n const marginsPrepped = margins.concat(margins).slice(orientation, orientation + 4)\n const marginsStyle = `margin: ${marginsPrepped.join(' ')};`\n\n const paddingStyle = `padding: ${marginsPrepped.join(' ')};`\n\n const tabStyle = cornersStyle + `position: relative; padding: 0.7em; max-width: 20em; color: ${color};`\n const unselectedStyle = `${\n tabStyle + marginsStyle\n } opacity: 50%; background-color: ${backgroundColor};`\n const selectedStyle = `${tabStyle + marginsStyle} background-color: ${selectedColor};`\n const shownStyle = 'height: 100%; width: 100%;'\n const hiddenStyle = shownStyle + 'display: none;'\n rootElement.refresh = orderedSync\n orderedSync()\n\n if (!options.startEmpty && tabContainer.children.length && options.selectedTab) {\n const selectedTab0 = Array.from(tabContainer.children) // Version left for compatability with ??\n .map((tab) => tab.firstChild as HTMLElement)\n .find((tab) => tab.dataset.name === options.selectedTab)\n\n const selectedTabURI = options.selectedTab.uri\n const selectedTab1 = Array.from(tabContainer.children)\n // @ts-ignore\n .find(\n (tab) =>\n (tab as TabElement).subject &&\n // @ts-ignore\n (tab as TabElement).subject.uri &&\n // @ts-ignore\n (tab as TabElement).subject.uri === selectedTabURI\n )\n\n const tab = selectedTab1 || selectedTab0 || (tabContainer.children[0] as HTMLButtonElement)\n const clickMe = tab.firstChild\n // @ts-ignore\n if (clickMe) clickMe.click()\n } else if (!options.startEmpty) {\n (tabContainer.children[0].firstChild as HTMLButtonElement).click() // Open first tab\n }\n return rootElement\n\n function addCancelButton (tabContainer) {\n if (tabContainer.dataset.onCloseSet) {\n // @@ TODO: this is only here to make the browser tests work\n // Discussion at https://github.com/solidos/solid-ui/pull/110#issuecomment-527080663\n const existingCancelButton = tabContainer.querySelector('.unstyled')\n tabContainer.removeChild(existingCancelButton)\n }\n const extraTab = dom.createElement(tabElement)\n extraTab.classList.add('unstyled')\n const tabCancelButton = cancelButton(dom, onClose)\n tabCancelButton.setAttribute('style', tabCancelButton.getAttribute('style') + paddingStyle)\n extraTab.appendChild(tabCancelButton)\n tabContainer.appendChild(extraTab)\n tabContainer.dataset.onCloseSet = 'true'\n }\n\n function getItems (): Array<NamedNode> {\n if (options.items) return options.items\n if (options.ordered !== false) {\n // options.ordered defaults to true\n return (store.the(subject, options.predicate) as any).elements\n } else {\n return store.each(subject, options.predicate) as any\n }\n }\n\n function makeNewSlot (item: NamedNode) {\n const ele = dom.createElement(tabElement) as TabElement\n ele.setAttribute('style', unselectedStyle)\n ele.subject = item\n const div = ele.appendChild(dom.createElement('button'))\n div.setAttribute('style', 'background: none; border: none; font: inherit; cursor: pointer')\n\n div.onclick = function () {\n resetTabStyle()\n resetBodyStyle()\n ele.setAttribute('style', selectedStyle)\n if (!ele.bodyTR) return\n ele.bodyTR.setAttribute('style', shownStyle)\n const bodyMain = getOrCreateContainerElement(ele)\n if (options.renderMain && ele.subject && bodyMain.asSettings !== false) {\n bodyMain.innerHTML = 'loading item ...' + item\n options.renderMain(bodyMain, ele.subject)\n bodyMain.asSettings = false\n }\n }\n\n if (options.renderTabSettings && ele.subject) {\n const ellipsis = dom.createElement('button')\n ellipsis.textContent = '...'\n ellipsis.setAttribute('style', 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;')\n\n ellipsis.onclick = function () {\n resetTabStyle()\n resetBodyStyle()\n ele.setAttribute('style', selectedStyle)\n if (!ele.bodyTR) return\n ele.bodyTR.setAttribute('style', shownStyle)\n const bodyMain = getOrCreateContainerElement(ele)\n if (options.renderTabSettings && ele.subject && bodyMain.asSettings !== true) {\n bodyMain.innerHTML = 'loading settings ...' + item\n options.renderTabSettings(bodyMain, ele.subject)\n bodyMain.asSettings = true\n }\n }\n ele.appendChild(ellipsis)\n }\n\n if (options.renderTab) {\n options.renderTab(div, item)\n } else {\n div.innerHTML = label(item)\n }\n return ele\n\n function getOrCreateContainerElement (ele: TabElement): ContainerElement {\n const bodyMain = ele.bodyTR?.children[0] as ContainerElement\n if (bodyMain) return bodyMain\n const newBodyMain = ele.bodyTR!.appendChild(dom.createElement('main'))\n newBodyMain.setAttribute('style', bodyMainStyle)\n return newBodyMain\n }\n }\n\n // @@ Use common one from utils?\n function orderedSync () {\n const items = getItems()\n let slot: TabElement, i, j, left, right\n let differ = false\n // Find how many match at each end\n for (left = 0; left < tabContainer.children.length; left++) {\n slot = tabContainer.children[left] as TabElement\n if (left >= items.length || (slot.subject && !slot.subject.sameTerm(items[left]))) {\n differ = true\n break\n }\n }\n if (!differ && items.length === tabContainer.children.length) {\n return // The two just match in order: a case to optimize for\n }\n for (right = tabContainer.children.length - 1; right >= 0; right--) {\n slot = tabContainer.children[right] as TabElement\n j = right - tabContainer.children.length + items.length\n if (slot.subject && !slot.subject.sameTerm(items[j])) {\n break\n }\n }\n // The elements left ... right in tabContainer.children do not match\n const insertables = items.slice(left, right - tabContainer.children.length + items.length + 1)\n while (right >= left) {\n // remove extra\n tabContainer.removeChild(tabContainer.children[left])\n bodyContainer.removeChild(bodyContainer.children[left])\n right -= 1\n }\n for (i = 0; i < insertables.length; i++) {\n const newSlot = makeNewSlot(insertables[i])\n const newBodyDiv = dom.createElement('div')\n newSlot.bodyTR = newBodyDiv\n if (left === tabContainer.children.length) {\n // None left of original on right\n tabContainer.appendChild(newSlot)\n bodyContainer.appendChild(newBodyDiv)\n } else {\n tabContainer.insertBefore(newSlot, tabContainer.children[left + i])\n bodyContainer.insertBefore(newBodyDiv, bodyContainer.children[left + i])\n }\n }\n if (onClose) {\n addCancelButton(tabContainer)\n }\n }\n\n function resetTabStyle () {\n for (let i = 0; i < tabContainer.children.length; i++) {\n const tab = tabContainer.children[i]\n if (tab.classList.contains('unstyled')) {\n continue\n } else {\n tab.setAttribute('style', unselectedStyle)\n }\n }\n }\n\n function resetBodyStyle () {\n for (let i = 0; i < bodyContainer.children.length; i++) {\n bodyContainer.children[i].setAttribute('style', hiddenStyle)\n }\n }\n}\n\n/**\n * @internal\n */\nfunction getColors (backgroundColor: string): [string, string] {\n return isLight(backgroundColor)\n ? [colorBlend(backgroundColor, '#ffffff', 0.3), '#000000']\n : [colorBlend(backgroundColor, '#000000', 0.3), '#ffffff']\n}\n\n/**\n * @internal\n */\nfunction colorBlend (a: string, b: string, mix: number): string {\n let ca, cb, res\n let str = '#'\n const hex = '0123456789abcdef'\n for (let i = 0; i < 3; i++) {\n ca = parseInt(a.slice(i * 2 + 1, i * 2 + 3), 16)\n cb = parseInt(b.slice(i * 2 + 1, i * 2 + 3), 16)\n res = ca * (1.0 - mix) + cb * mix // @@@ rounding\n const res2 = parseInt(('' + res).split('.')[0]) // @@ ugh\n const h = parseInt(('' + res2 / 16).split('.')[0]) // @@ ugh\n const l = parseInt(('' + (res2 % 16)).split('.')[0]) // @@ ugh\n str += hex[h] + hex[l]\n }\n return str\n}\n\n/**\n * @internal\n */\nfunction isLight (x: string): boolean {\n let total = 0\n for (let i = 0; i < 3; i++) {\n total += parseInt(x.slice(i * 2 + 1, i * 2 + 3), 16)\n }\n return total > 128 * 3\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAAmC,SAAAG,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA;AAEnC;AACA;AACA;AAFA,IAGMC,gBAAgB,0BAAAC,YAAA;EAAA,IAAAC,UAAA,aAAAF,gBAAA,EAAAC,YAAA;EAAA,IAAAE,MAAA,GAAAzB,YAAA,CAAAsB,gBAAA;EAAA,SAAAA,iBAAA;IAAA,IAAAI,KAAA;IAAA,IAAAC,gBAAA,mBAAAL,gBAAA;IAAA,SAAAM,IAAA,GAAAhB,SAAA,CAAAiB,MAAA,EAAAC,IAA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,aAAAsB,UAAA,EAAAC,aAAA;EAAA,IAAAC,OAAA,GAAAhD,YAAA,CAAA8C,UAAA;EAAA,SAAAA,WAAA;IAAA,IAAAG,MAAA;IAAA,IAAAtB,gBAAA,mBAAAmB,UAAA;IAAA,SAAAI,KAAA,GAAAtC,SAAA,CAAAiB,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAmB,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;MAAArB,IAAA,CAAAqB,KAAA,IAAAvC,SAAA,CAAAuC,KAAA;IAAA;IAAAF,MAAA,GAAAD,OAAA,CAAA5B,IAAA,CAAAP,KAAA,CAAAmC,OAAA,SAAAf,MAAA,CAAAH,IAAA;IAAA,IAAAI,gBAAA,iBAAAC,uBAAA,aAAAc,MAAA;IAAA,IAAAf,gBAAA,iBAAAC,uBAAA,aAAAc,MAAA;IAAA,OAAAA,MAAA;EAAA;EAAA,WAAAb,aAAA,aAAAU,UAAA;AAAA,oBAAAT,iBAAA,aAASC,WAAW;AAKpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;IAChDkB,GAAG,GAAGF,EAAE,IAAI,GAAG,GAAGD,GAAG,CAAC,GAAGE,EAAE,GAAGF,GAAG,EAAC;IAClC,IAAMM,IAAI,GAAGlH,QAAQ,CAAC,CAAC,EAAE,GAAG+G,GAAG,EAAEI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;IAChD,IAAMC,CAAC,GAAGpH,QAAQ,CAAC,CAAC,EAAE,GAAGkH,IAAI,GAAG,EAAE,EAAEC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;IACnD,IAAME,CAAC,GAAGrH,QAAQ,CAAC,CAAC,EAAE,GAAIkH,IAAI,GAAG,EAAG,EAAEC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;IACrDH,GAAG,IAAIC,GAAG,CAACG,CAAC,CAAC,GAAGH,GAAG,CAACI,CAAC,CAAC;EACxB;EACA,OAAOL,GAAG;AACZ;;AAEA;AACA;AACA;AACA,SAASR,OAAOA,CAAEc,CAAS,EAAW;EACpC,IAAIC,KAAK,GAAG,CAAC;EACb,KAAK,IAAI1B,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC1B0B,KAAK,IAAIvH,QAAQ,CAACsH,CAAC,CAAC/F,KAAK,CAACsE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;EACtD;EACA,OAAO0B,KAAK,GAAG,GAAG,GAAG,CAAC;AACxB"}
|
|
1
|
+
{"version":3,"file":"tabs.js","names":["_widgets","require","_utils","style","_interopRequireWildcard","_solidLogic","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","valueOf","ContainerElement","_HTMLElement","_inherits2","_super","_this","_classCallCheck2","_len","length","args","Array","_key","concat","_defineProperty2","_assertThisInitialized2","_createClass2","_wrapNativeSuper2","HTMLElement","TabWidgetElement","exports","_HTMLElement2","_super2","_this2","_len2","_key2","TabElement","_HTMLElement3","_super3","_this3","_len3","_key3","tabsDefaultBackgroundColor","tabWidget","options","subject","dom","document","orientation","parseInt","backgroundColor","flipped","vertical","onClose","_getColors","getColors","_getColors2","_slicedToArray2","selectedColor","color","bodyMainStyle","rootElement","createElement","setAttribute","tabsRootElement","flexDirection","navElement","appendChild","tabsNavElement","mainElement","tabsMainElement","tabContainer","tabElement","bodyContainer","corners","cornersPrepped","slice","cornersStyle","join","margins","marginsPrepped","marginsStyle","paddingStyle","tabStyle","unselectedStyle","selectedStyle","shownStyle","hiddenStyle","refresh","orderedSync","startEmpty","children","selectedTab","selectedTab0","from","map","tab","firstChild","find","dataset","name","selectedTabURI","uri","selectedTab1","clickMe","click","addCancelButton","onCloseSet","existingCancelButton","querySelector","removeChild","extraTab","classList","add","tabCancelButton","cancelButton","getAttribute","getItems","items","ordered","store","the","predicate","elements","each","makeNewSlot","item","ele","div","onclick","resetTabStyle","resetBodyStyle","bodyTR","bodyMain","getOrCreateContainerElement","renderMain","asSettings","innerHTML","renderTabSettings","ellipsis","textContent","renderTab","label","_ele$bodyTR","newBodyMain","slot","j","left","right","differ","sameTerm","insertables","newSlot","newBodyDiv","insertBefore","contains","isLight","colorBlend","b","mix","ca","cb","res","str","hex","res2","split","h","l","x","total"],"sources":["../src/tabs.ts"],"sourcesContent":["import { cancelButton } from './widgets'\nimport { label } from './utils'\nimport { NamedNode } from 'rdflib'\nimport * as style from './style'\nimport { store } from 'solid-logic'\n\n/**\n * @ignore\n */\nclass ContainerElement extends HTMLElement {\n asSettings?: boolean\n}\n\ntype TabWidgetOptions = {\n backgroundColor?: string;\n dom?: HTMLDocument;\n items?: Array<NamedNode>;\n onClose?: (event: Event) => void;\n ordered?: boolean;\n orientation?: '0' | '1' | '2' | '3';\n predicate?: NamedNode;\n renderMain?: (bodyMain: HTMLElement, subject: NamedNode) => void;\n renderTab?: (tabDiv: HTMLButtonElement, subject: NamedNode) => void;\n renderTabSettings?: (bodyMain: ContainerElement, subject: NamedNode) => void;\n selectedTab?: NamedNode;\n startEmpty?: boolean;\n subject?: NamedNode;\n};\n\nexport class TabWidgetElement extends HTMLElement {\n bodyContainer?: HTMLElement\n refresh?: () => void\n tabContainer?: HTMLElement\n}\n\n/**\n * @ignore\n */\nclass TabElement extends HTMLElement {\n bodyTR?: HTMLElement\n subject?: NamedNode\n}\n\n/**\n * Use this widget to generate tabs from triples set in the global store.\n *\n * [Here you can see examples of the tabs](https://solidos.github.io/solid-ui/examples/tabs/).\n *\n * It assumes that items to use for tabs will be in a collection by default,\n * e.g.:\n *\n * ```turtle\n * :subject :predicate ( :item1 :item2 ) .\n * ```\n *\n * You can override this by setting `ordered: false`, in which case it expects\n * unordered triples:\n *\n * ```turtle\n * :subject :predicate :item1, :item 2 .\n * ```\n *\n * Triples that are not ordered in collection are in principle not sorted,\n * which means that tabs could change order every time you render the widget.\n * But in this case the widget will try to sort it in order to keep it\n * consistent.\n *\n * In both of these cases you need to define options `subject` and `predicate`\n * to tell the widget which triples it should be looking for.\n *\n * Finally you can set items manually, using the `items` option, e.g.:\n *\n * ```javascript\n * {\n * items: [\n * namedNode('https://domain.tld/#item1'),\n * namedNode('https://domain.tld/#item2')\n * ]\n * }\n * ```\n *\n * When you set items manually you do not need to set `subject` and\n * `predicate`.\n *\n * In any case you probably want to set the renderMain option to specify\n * what should be rendered for the various items, e.g.:\n *\n * ```javascript\n * {\n * renderMain: (bodyMain, subject) => {\n * bodyMain.innerHTML = renderItem(subject)\n * }\n * }\n * ```\n *\n * **Note:** `renderItem` is a custom function that you need to define yourself.\n *\n * The option `renderTabSettings` allows you to render a custom view in the\n * body container that is shown when you hold the ALT key and click on a\n * tab. It works very much like the `renderMain` option:\n *\n * ```javascript\n * {\n * renderTabSettings: (bodyMain, subject) => {\n * bodyMain.innerHTML = renderTabSettings(subject)\n * }\n * }\n * ```\n *\n * **Note:** `renderTabSettings` is a custom function that you need to define\n * yourself.\n *\n * By default the widget will try to guess the label by using the\n * [[utils.label]] function. If you want to customize this yourself, you can\n * use the `renderTab` option:\n *\n * ```javascript\n * {\n * renderTab: (tabDiv, subject) => {\n * tabDiv.innerText = renderTabText(subject)\n * }\n * }\n * ```\n *\n * **Note:** `renderTabText` is a custom function you need to define yourself.\n *\n * The option renderTab is also important if you want to set which tab should\n * be selected once the widget is rendered. By default it will simply select\n * the first tab, but you can override by setting `dataset.name` on the tab\n * and referring to the same string in `selectedTab`:\n *\n * ```javascript\n * {\n * renderTab: (tabDiv, subject) => {\n * tabDiv.dataset.name = subject.uri\n * },\n * selectedTab: item2.uri\n * }\n * ```\n *\n * You can apply a color to use for tabs and border of the container by using\n * option `background-color`. This is #ddddcc by default.\n *\n * You can override the document object that the widget uses to generate DOM\n * elements by setting the option `dom`. This is encouraged to set if you\n * intend your functionality to be used in environments that don't provide\n * a global `document` object.\n *\n * If you want to render a close button next to the tabs you can set option\n * `onClose` which takes a callback function that is triggered when the\n * button is clicked:\n *\n * ```javascript\n * {\n * onClose: (event) => {\n * // do something that hides the widget altogether\n * }\n * }\n * ```\n *\n * The option `orientation` allows you to set which side the tabs should be\n * located: `'0'` = Top, `'1'` = Left, `'2'` = Bottom, `'3'` = Right\n *\n * If you don't want to render anything in the body container by default,\n * you can set the option `startEmpty` to `true`.\n *\n * @param options\n */\nconst tabsDefaultBackgroundColor = '#ddddcc'\n\nexport function tabWidget (options: TabWidgetOptions) {\n const subject = options.subject\n const dom = options.dom || document\n const orientation = parseInt(options.orientation || '0')\n const backgroundColor = options.backgroundColor || tabsDefaultBackgroundColor\n const flipped = orientation & 2\n const vertical = orientation & 1\n const onClose = options.onClose\n\n const [selectedColor, color] = getColors(backgroundColor)\n const bodyMainStyle = `flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ${selectedColor}; padding: 1em;`\n const rootElement: TabWidgetElement = dom.createElement('div') // 20200117a\n\n rootElement.setAttribute('style', style.tabsRootElement)\n rootElement.style.flexDirection = (vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';')\n\n const navElement = rootElement.appendChild(dom.createElement('nav'))\n navElement.setAttribute('style', style.tabsNavElement)\n\n const mainElement = rootElement.appendChild(dom.createElement('main'))\n\n mainElement.setAttribute('style', style.tabsMainElement) // override tabbedtab.css\n const tabContainer = navElement.appendChild(dom.createElement('ul'))\n tabContainer.setAttribute('style', style.tabContainer)\n tabContainer.style.flexDirection = `${vertical ? 'column' : 'row'}`\n\n const tabElement = 'li'\n\n const bodyContainer = mainElement\n rootElement.tabContainer = tabContainer\n rootElement.bodyContainer = bodyContainer\n\n const corners = ['0.2em', '0.2em', '0', '0'] // top left, TR, BR, BL\n const cornersPrepped = corners.concat(corners).slice(orientation, orientation + 4)\n const cornersStyle = `border-radius: ${cornersPrepped.join(' ')};`\n\n const margins = ['0.3em', '0.3em', '0', '0.3em'] // top, right, bottom, left\n const marginsPrepped = margins.concat(margins).slice(orientation, orientation + 4)\n const marginsStyle = `margin: ${marginsPrepped.join(' ')};`\n\n const paddingStyle = `padding: ${marginsPrepped.join(' ')};`\n\n const tabStyle = cornersStyle + `position: relative; padding: 0.7em; max-width: 20em; color: ${color};`\n const unselectedStyle = `${\n tabStyle + marginsStyle\n } opacity: 50%; background-color: ${backgroundColor};`\n const selectedStyle = `${tabStyle + marginsStyle} background-color: ${selectedColor};`\n const shownStyle = 'height: 100%; width: 100%;'\n const hiddenStyle = shownStyle + 'display: none;'\n rootElement.refresh = orderedSync\n orderedSync()\n\n if (!options.startEmpty && tabContainer.children.length && options.selectedTab) {\n const selectedTab0 = Array.from(tabContainer.children) // Version left for compatibility with ??\n .map((tab) => tab.firstChild as HTMLElement)\n .find((tab) => tab.dataset.name === options.selectedTab)\n\n const selectedTabURI = options.selectedTab.uri\n const selectedTab1 = Array.from(tabContainer.children)\n // @ts-ignore\n .find(\n (tab) =>\n (tab as TabElement).subject &&\n // @ts-ignore\n (tab as TabElement).subject.uri &&\n // @ts-ignore\n (tab as TabElement).subject.uri === selectedTabURI\n )\n\n const tab = selectedTab1 || selectedTab0 || (tabContainer.children[0] as HTMLButtonElement)\n const clickMe = tab.firstChild\n // @ts-ignore\n if (clickMe) clickMe.click()\n } else if (!options.startEmpty) {\n (tabContainer.children[0].firstChild as HTMLButtonElement).click() // Open first tab\n }\n return rootElement\n\n function addCancelButton (tabContainer) {\n if (tabContainer.dataset.onCloseSet) {\n // @@ TODO: this is only here to make the browser tests work\n // Discussion at https://github.com/solidos/solid-ui/pull/110#issuecomment-527080663\n const existingCancelButton = tabContainer.querySelector('.unstyled')\n tabContainer.removeChild(existingCancelButton)\n }\n const extraTab = dom.createElement(tabElement)\n extraTab.classList.add('unstyled')\n const tabCancelButton = cancelButton(dom, onClose)\n tabCancelButton.setAttribute('style', tabCancelButton.getAttribute('style') + paddingStyle)\n extraTab.appendChild(tabCancelButton)\n tabContainer.appendChild(extraTab)\n tabContainer.dataset.onCloseSet = 'true'\n }\n\n function getItems (): Array<NamedNode> {\n if (options.items) return options.items\n if (options.ordered !== false) {\n // options.ordered defaults to true\n return (store.the(subject, options.predicate) as any).elements\n } else {\n return store.each(subject, options.predicate) as any\n }\n }\n\n function makeNewSlot (item: NamedNode) {\n const ele = dom.createElement(tabElement) as TabElement\n ele.setAttribute('style', unselectedStyle)\n ele.subject = item\n const div = ele.appendChild(dom.createElement('button'))\n div.setAttribute('style', style.makeNewSlot)\n\n div.onclick = function () {\n resetTabStyle()\n resetBodyStyle()\n ele.setAttribute('style', selectedStyle)\n if (!ele.bodyTR) return\n ele.bodyTR.setAttribute('style', shownStyle)\n const bodyMain = getOrCreateContainerElement(ele)\n if (options.renderMain && ele.subject && bodyMain.asSettings !== false) {\n bodyMain.innerHTML = 'loading item ...' + item\n options.renderMain(bodyMain, ele.subject)\n bodyMain.asSettings = false\n }\n }\n\n if (options.renderTabSettings && ele.subject) {\n const ellipsis = dom.createElement('button')\n ellipsis.textContent = '...'\n ellipsis.setAttribute('style', style.ellipsis)\n\n ellipsis.onclick = function () {\n resetTabStyle()\n resetBodyStyle()\n ele.setAttribute('style', selectedStyle)\n if (!ele.bodyTR) return\n ele.bodyTR.setAttribute('style', shownStyle)\n const bodyMain = getOrCreateContainerElement(ele)\n if (options.renderTabSettings && ele.subject && bodyMain.asSettings !== true) {\n bodyMain.innerHTML = 'loading settings ...' + item\n options.renderTabSettings(bodyMain, ele.subject)\n bodyMain.asSettings = true\n }\n }\n ele.appendChild(ellipsis)\n }\n\n if (options.renderTab) {\n options.renderTab(div, item)\n } else {\n div.innerHTML = label(item)\n }\n return ele\n\n function getOrCreateContainerElement (ele: TabElement): ContainerElement {\n const bodyMain = ele.bodyTR?.children[0] as ContainerElement\n if (bodyMain) return bodyMain\n const newBodyMain = ele.bodyTR!.appendChild(dom.createElement('main'))\n newBodyMain.setAttribute('style', bodyMainStyle)\n return newBodyMain\n }\n }\n\n // @@ Use common one from utils?\n function orderedSync () {\n const items = getItems()\n let slot: TabElement, i, j, left, right\n let differ = false\n // Find how many match at each end\n for (left = 0; left < tabContainer.children.length; left++) {\n slot = tabContainer.children[left] as TabElement\n if (left >= items.length || (slot.subject && !slot.subject.sameTerm(items[left]))) {\n differ = true\n break\n }\n }\n if (!differ && items.length === tabContainer.children.length) {\n return // The two just match in order: a case to optimize for\n }\n for (right = tabContainer.children.length - 1; right >= 0; right--) {\n slot = tabContainer.children[right] as TabElement\n j = right - tabContainer.children.length + items.length\n if (slot.subject && !slot.subject.sameTerm(items[j])) {\n break\n }\n }\n // The elements left ... right in tabContainer.children do not match\n const insertables = items.slice(left, right - tabContainer.children.length + items.length + 1)\n while (right >= left) {\n // remove extra\n tabContainer.removeChild(tabContainer.children[left])\n bodyContainer.removeChild(bodyContainer.children[left])\n right -= 1\n }\n for (i = 0; i < insertables.length; i++) {\n const newSlot = makeNewSlot(insertables[i])\n const newBodyDiv = dom.createElement('div')\n newSlot.bodyTR = newBodyDiv\n if (left === tabContainer.children.length) {\n // None left of original on right\n tabContainer.appendChild(newSlot)\n bodyContainer.appendChild(newBodyDiv)\n } else {\n tabContainer.insertBefore(newSlot, tabContainer.children[left + i])\n bodyContainer.insertBefore(newBodyDiv, bodyContainer.children[left + i])\n }\n }\n if (onClose) {\n addCancelButton(tabContainer)\n }\n }\n\n function resetTabStyle () {\n for (let i = 0; i < tabContainer.children.length; i++) {\n const tab = tabContainer.children[i]\n if (tab.classList.contains('unstyled')) {\n continue\n } else {\n tab.setAttribute('style', unselectedStyle)\n }\n }\n }\n\n function resetBodyStyle () {\n for (let i = 0; i < bodyContainer.children.length; i++) {\n bodyContainer.children[i].setAttribute('style', hiddenStyle)\n }\n }\n}\n\n/**\n * @internal\n */\nfunction getColors (backgroundColor: string): [string, string] {\n return isLight(backgroundColor)\n ? [colorBlend(backgroundColor, '#ffffff', 0.3), '#000000']\n : [colorBlend(backgroundColor, '#000000', 0.3), '#ffffff']\n}\n\n/**\n * @internal\n */\nfunction colorBlend (a: string, b: string, mix: number): string {\n let ca, cb, res\n let str = '#'\n const hex = '0123456789abcdef'\n for (let i = 0; i < 3; i++) {\n ca = parseInt(a.slice(i * 2 + 1, i * 2 + 3), 16)\n cb = parseInt(b.slice(i * 2 + 1, i * 2 + 3), 16)\n res = ca * (1.0 - mix) + cb * mix // @@@ rounding\n const res2 = parseInt(('' + res).split('.')[0]) // @@ ugh\n const h = parseInt(('' + res2 / 16).split('.')[0]) // @@ ugh\n const l = parseInt(('' + (res2 % 16)).split('.')[0]) // @@ ugh\n str += hex[h] + hex[l]\n }\n return str\n}\n\n/**\n * @internal\n */\nfunction isLight (x: string): boolean {\n let total = 0\n for (let i = 0; i < 3; i++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AAD,KAAA,EAAAC,KAAA;MAAArB,IAAA,CAAAqB,KAAA,IAAApC,SAAA,CAAAoC,KAAA;IAAA;IAAAF,MAAA,GAAAD,OAAA,CAAAhD,IAAA,CAAAgB,KAAA,CAAAgC,OAAA,SAAAf,MAAA,CAAAH,IAAA;IAAA,IAAAI,gBAAA,iBAAAC,uBAAA,aAAAc,MAAA;IAAA,IAAAf,gBAAA,iBAAAC,uBAAA,aAAAc,MAAA;IAAA,OAAAA,MAAA;EAAA;EAAA,WAAAb,aAAA,aAAAU,UAAA;AAAA,oBAAAT,iBAAA,aAASC,WAAW;AAKpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMc,0BAA0B,GAAG,SAAS;AAErC,SAASC,SAASA,CAAEC,OAAyB,EAAE;EACpD,IAAMC,OAAO,GAAGD,OAAO,CAACC,OAAO;EAC/B,IAAMC,GAAG,GAAGF,OAAO,CAACE,GAAG,IAAIC,QAAQ;EACnC,IAAMC,WAAW,GAAGC,QAAQ,CAACL,OAAO,CAACI,WAAW,IAAI,GAAG,CAAC;EACxD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AAC;IAChD2K,GAAG,GAAGF,EAAE,IAAI,GAAG,GAAGD,GAAG,CAAC,GAAGE,EAAE,GAAGF,GAAG,EAAC;IAClC,IAAMM,IAAI,GAAGpH,QAAQ,CAAC,CAAC,EAAE,GAAGiH,GAAG,EAAEI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;IAChD,IAAMC,CAAC,GAAGtH,QAAQ,CAAC,CAAC,EAAE,GAAGoH,IAAI,GAAG,EAAE,EAAEC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;IACnD,IAAME,CAAC,GAAGvH,QAAQ,CAAC,CAAC,EAAE,GAAIoH,IAAI,GAAG,EAAG,EAAEC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;IACrDH,GAAG,IAAIC,GAAG,CAACG,CAAC,CAAC,GAAGH,GAAG,CAACI,CAAC,CAAC;EACxB;EACA,OAAOL,GAAG;AACZ;;AAEA;AACA;AACA;AACA,SAASP,OAAOA,CAAEa,CAAS,EAAW;EACpC,IAAIC,KAAK,GAAG,CAAC;EACb,KAAK,IAAInL,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC1BmL,KAAK,IAAIzH,QAAQ,CAACwH,CAAC,CAAC7F,KAAK,CAACrF,CAAC,GAAG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;EACtD;EACA,OAAOmL,KAAK,GAAG,GAAG,GAAG,CAAC;AACxB"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.versionInfo = void 0;
|
|
7
7
|
var versionInfo = exports.versionInfo = {
|
|
8
|
-
buildTime: '2023-
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2023-12-01T20:22:18Z',
|
|
9
|
+
commit: 'f40cba957f0cdc0d34ddace42069ce1ae87744af',
|
|
10
10
|
npmInfo: {
|
|
11
|
-
'solid-ui': '2.4.
|
|
11
|
+
'solid-ui': '2.4.31',
|
|
12
12
|
npm: '8.19.4',
|
|
13
13
|
node: '16.20.2',
|
|
14
14
|
v8: '9.4.146.26-node.26',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","names":["versionInfo","exports","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-
|
|
1
|
+
{"version":3,"file":"versionInfo.js","names":["versionInfo","exports","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-12-01T20:22:18Z',\n commit: 'f40cba957f0cdc0d34ddace42069ce1ae87744af',\n npmInfo:\n{\n 'solid-ui': '2.4.31',\n npm: '8.19.4',\n node: '16.20.2',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.1',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.11',\n openssl: '1.1.1v+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n}\n"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACT;IACE,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC"}
|
|
@@ -9,39 +9,34 @@ exports.makeDropTarget = makeDropTarget;
|
|
|
9
9
|
exports.uploadFiles = uploadFiles;
|
|
10
10
|
var debug = _interopRequireWildcard(require("../debug"));
|
|
11
11
|
var mime = _interopRequireWildcard(require("mime-types"));
|
|
12
|
+
var style = _interopRequireWildcard(require("../style"));
|
|
12
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
14
15
|
/* Drag and drop common functionality
|
|
15
16
|
*
|
|
16
17
|
* It is easy to make something draggable, or to make it a drag target!
|
|
17
|
-
* Just call the functions below.
|
|
18
|
-
*
|
|
18
|
+
* Just call the functions below. In a Solid world, any part of the UI which
|
|
19
|
+
* represents one thing which has a URI, should be made draggable using makeDraggable.
|
|
19
20
|
* Any list of things should typically allow you to drag new members of the list
|
|
20
21
|
* onto it.
|
|
21
|
-
* The file upload function uploadFiles is provided as often
|
|
22
|
-
* desktop
|
|
22
|
+
* The file upload function, uploadFiles, is provided as often as someone drags a file from the computer
|
|
23
|
+
* desktop. You may want to upload it into the pod.
|
|
23
24
|
*/
|
|
24
25
|
|
|
25
26
|
/* global FileReader alert */
|
|
26
27
|
|
|
27
28
|
function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
|
|
28
29
|
var dragoverListener = function dragoverListener(e) {
|
|
29
|
-
e.preventDefault(); //
|
|
30
|
+
e.preventDefault(); // Need this; otherwise, drop does not work.
|
|
30
31
|
e.dataTransfer.dropEffect = 'copy';
|
|
31
32
|
};
|
|
32
33
|
var dragenterListener = function dragenterListener(e) {
|
|
33
34
|
debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect);
|
|
34
|
-
if (this.
|
|
35
|
+
if (this.localStyle) {
|
|
35
36
|
// necessary not sure when
|
|
36
37
|
if (!this.savedStyle) {
|
|
37
|
-
this.savedStyle =
|
|
38
|
-
this.savedStyle.border = this.style.border;
|
|
39
|
-
this.savedStyle.backgroundColor = this.style.backgroundColor;
|
|
40
|
-
this.savedStyle.borderRadius = this.style.borderRadius;
|
|
38
|
+
this.savedStyle = style.dragEvent;
|
|
41
39
|
}
|
|
42
|
-
this.style.backgroundColor = '#ccc';
|
|
43
|
-
this.style.border = '0.25em dashed black';
|
|
44
|
-
this.style.borderRadius = '0.3em';
|
|
45
40
|
}
|
|
46
41
|
e.dataTransfer.dropEffect = 'link';
|
|
47
42
|
debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect);
|
|
@@ -49,12 +44,9 @@ function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
|
|
|
49
44
|
var dragleaveListener = function dragleaveListener(e) {
|
|
50
45
|
debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect);
|
|
51
46
|
if (this.savedStyle) {
|
|
52
|
-
this.
|
|
53
|
-
this.style.backgroundColor = this.savedStyle.backgroundColor;
|
|
54
|
-
this.style.borderRadius = this.savedStyle.borderRadius;
|
|
47
|
+
this.localStyle = this.savedStyle;
|
|
55
48
|
} else {
|
|
56
|
-
this.
|
|
57
|
-
this.style.border = '0em solid black';
|
|
49
|
+
this.localStyle = style.dropEvent;
|
|
58
50
|
}
|
|
59
51
|
};
|
|
60
52
|
var dropListener = function dropListener(e) {
|
|
@@ -93,7 +85,7 @@ function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
|
|
|
93
85
|
if (uris) {
|
|
94
86
|
droppedURIHandler(uris);
|
|
95
87
|
}
|
|
96
|
-
this.
|
|
88
|
+
this.localStyle = style.restoreStyle; // restore style
|
|
97
89
|
return false;
|
|
98
90
|
}; // dropListener
|
|
99
91
|
|