solid-ui 2.4.28-a414b470 → 2.4.28-a4f5fbef
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/805.solid-ui.min.js +1 -1
- package/dist/805.solid-ui.min.js.map +1 -1
- package/dist/solid-ui.js +1348 -2109
- 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/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js +1955 -1955
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js.map +1 -1
- package/lib/chat/bookmarks.js +7 -6
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +65 -249
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +126 -129
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +423 -637
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +193 -332
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +277 -463
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +209 -299
- package/lib/chat/thread.js.map +1 -1
- package/lib/header/index.js +0 -5
- package/lib/header/index.js.map +1 -1
- package/lib/log.js +5 -5
- package/lib/log.js.map +1 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +45 -83
- 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 -41
- package/lib/pad.js.map +1 -1
- package/lib/participation.d.ts +5 -5
- package/lib/participation.d.ts.map +1 -1
- package/lib/participation.js +24 -24
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js +0 -4
- package/lib/preferences.js.map +1 -1
- package/lib/style.js +39 -31
- package/lib/style.js.map +1 -1
- package/lib/styleConstants.js +36 -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/utils/headerFooterHelpers.js +0 -2
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.js +6 -6
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons.js +2 -0
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +10 -18
- 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/autocompleteBar.js +1 -8
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +5 -9
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +0 -5
- package/lib/widgets/forms/autocomplete/language.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 +10 -12
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/peoplePicker.js +0 -11
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/package.json +2 -3
package/lib/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","names":["formBorderColor","lowProfileLinkColor","formFieldNameBoxWidth","style","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","exports","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,GAAG;EAAE;;EAErBC,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,EAAE,yFAAyF;EAAE;EAC1GC,aAAa,EAAE,0FAA0F;EAAE;EAC3GC,aAAa,EAAE,0FAA0F;EAAE;EAC3GC,aAAa,EAAE,0FAA0F;EAAE;;EAE3G5B,eAAe,EAAfA,eAAe;EAAE;EACjB6B,gBAAgB,EAAE,SAAS;EAAE;EAC7BC,gBAAgB,EAAE,2FAA2F;EAAE;EAC/GC,aAAa,EAAE,i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elStyle","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","exports","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; 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 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,GAAG;EAAE;;EAErBC,aAAa,EAAE,6E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SAASA,QAAQA,CAAEC,GAAG,EAAEC,SAAS,EAAE;EAClDD,GAAG,CAACpH,KAAK,GAAGA,KAAK,CAACqH,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAACJ,OAAO,GAAGlH,KAAK,EAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _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
|
+
// The latter we put in when switching awy from using tables. Getting alignment between
|
|
20
|
+
// fields in different groups though is hard problem.
|
|
21
|
+
|
|
22
|
+
mediaModuleCanvasWidth: '640',
|
|
23
|
+
mediaModuleCanvasHeight: '480',
|
|
24
|
+
textInputSize: 20,
|
|
25
|
+
// Default text input size in characters roughly
|
|
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
|
+
exports["default"] = _default;
|
|
36
|
+
//# 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","exports","_default"],"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 // The latter we put in when switching awy from using tables. Getting alignment between\n // fields in different groups though is hard problem.\n\n mediaModuleCanvasWidth: '640',\n mediaModuleCanvasHeight: '480',\n\n textInputSize: 20, // Default text input size in characters roughly\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":";;;;;;eAAe;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;AAAAC,OAAA,cAAAC,QAAA"}
|
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":"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"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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
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
|
/**
|
|
@@ -200,11 +204,12 @@ var TabElement = /*#__PURE__*/function (_HTMLElement3) {
|
|
|
200
204
|
*
|
|
201
205
|
* @param options
|
|
202
206
|
*/
|
|
207
|
+
var tabsDefaultBackgroundColor = '#ddddcc';
|
|
203
208
|
function tabWidget(options) {
|
|
204
209
|
var subject = options.subject;
|
|
205
210
|
var dom = options.dom || document;
|
|
206
211
|
var orientation = parseInt(options.orientation || '0');
|
|
207
|
-
var backgroundColor = options.backgroundColor ||
|
|
212
|
+
var backgroundColor = options.backgroundColor || tabsDefaultBackgroundColor;
|
|
208
213
|
var flipped = orientation & 2;
|
|
209
214
|
var vertical = orientation & 1;
|
|
210
215
|
var onClose = options.onClose;
|
|
@@ -215,13 +220,15 @@ function tabWidget(options) {
|
|
|
215
220
|
var bodyMainStyle = "flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ".concat(selectedColor, "; padding: 1em;");
|
|
216
221
|
var rootElement = dom.createElement('div'); // 20200117a
|
|
217
222
|
|
|
218
|
-
rootElement.setAttribute('style',
|
|
223
|
+
rootElement.setAttribute('style', style.tabsRootElement);
|
|
224
|
+
rootElement.style.flexDirection = (vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';');
|
|
219
225
|
var navElement = rootElement.appendChild(dom.createElement('nav'));
|
|
220
|
-
navElement.setAttribute('style',
|
|
226
|
+
navElement.setAttribute('style', style.tabsNavElement);
|
|
221
227
|
var mainElement = rootElement.appendChild(dom.createElement('main'));
|
|
222
|
-
mainElement.setAttribute('style',
|
|
228
|
+
mainElement.setAttribute('style', style.tabsMainElement); // override tabbedtab.css
|
|
223
229
|
var tabContainer = navElement.appendChild(dom.createElement('ul'));
|
|
224
|
-
tabContainer.setAttribute('style',
|
|
230
|
+
tabContainer.setAttribute('style', style.tabContainer);
|
|
231
|
+
tabContainer.style.flexDirection = "".concat(vertical ? 'column' : 'row');
|
|
225
232
|
var tabElement = 'li';
|
|
226
233
|
var bodyContainer = mainElement;
|
|
227
234
|
rootElement.tabContainer = tabContainer;
|
|
@@ -241,7 +248,7 @@ function tabWidget(options) {
|
|
|
241
248
|
rootElement.refresh = orderedSync;
|
|
242
249
|
orderedSync();
|
|
243
250
|
if (!options.startEmpty && tabContainer.children.length && options.selectedTab) {
|
|
244
|
-
var selectedTab0 = Array.from(tabContainer.children) // Version left for
|
|
251
|
+
var selectedTab0 = Array.from(tabContainer.children) // Version left for compatibility with ??
|
|
245
252
|
.map(function (tab) {
|
|
246
253
|
return tab.firstChild;
|
|
247
254
|
}).find(function (tab) {
|
|
@@ -295,7 +302,7 @@ function tabWidget(options) {
|
|
|
295
302
|
ele.setAttribute('style', unselectedStyle);
|
|
296
303
|
ele.subject = item;
|
|
297
304
|
var div = ele.appendChild(dom.createElement('button'));
|
|
298
|
-
div.setAttribute('style',
|
|
305
|
+
div.setAttribute('style', style.makeNewSlot);
|
|
299
306
|
div.onclick = function () {
|
|
300
307
|
resetTabStyle();
|
|
301
308
|
resetBodyStyle();
|
|
@@ -312,7 +319,7 @@ function tabWidget(options) {
|
|
|
312
319
|
if (options.renderTabSettings && ele.subject) {
|
|
313
320
|
var ellipsis = dom.createElement('button');
|
|
314
321
|
ellipsis.textContent = '...';
|
|
315
|
-
ellipsis.setAttribute('style',
|
|
322
|
+
ellipsis.setAttribute('style', style.ellipsis);
|
|
316
323
|
ellipsis.onclick = function () {
|
|
317
324
|
resetTabStyle();
|
|
318
325
|
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","_HTMLElement2","_super2","_this2","_len2","_key2","exports","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,IAAA,OAAAC,KAAA,CAAAH,IAAA,GAAAI,IAAA,MAAAA,IAAA,G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AAAhD,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;AACA;AACA;AACA;AACO,SAASc,SAASA,CAAEC,OAAyB,EAA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AAC,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","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","valueOf","e","ContainerElement","_HTMLElement","_inherits2","_super","_this","_classCallCheck2","_len","length","args","Array","_key","concat","_defineProperty2","_assertThisInitialized2","_createClass2","_wrapNativeSuper2","HTMLElement","TabWidgetElement","_HTMLElement2","_super2","_this2","_len2","_key2","exports","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","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 * 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++) {\n total += parseInt(x.slice(i * 2 + 1, i * 2 + 3), 16)\n }\n return total > 128 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AAAqC,KAAA;IAAA;IAAAF,MAAA,GAAAD,OAAA,CAAAjD,IAAA,CAAAgB,KAAA,CAAAiC,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,IAAME,eAAe,GAAGN,OAAO,CAACM,eAAe,IAAIR,0BAA0B;EAC7E,IAAM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,CAAC,CAAC,EAAE,GAAGmH,GAAG,EAAEI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;IAChD,IAAMC,CAAC,GAAGxH,QAAQ,CAAC,CAAC,EAAE,GAAGsH,IAAI,GAAG,EAAE,EAAEC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;IACnD,IAAME,CAAC,GAAGzH,QAAQ,CAAC,CAAC,EAAE,GAAIsH,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,IAAI3H,QAAQ,CAAC0H,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headerFooterHelpers.js","names":["_rdflib","require","_","getPod","sym","document","location","origin","site","getPodOwner","_x","_x2","_getPodOwner","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","pod","store","response","containerTurtle","podOwner","guess","wrap","_callee$","_context","prev","next","any","ns","ldp","fetcher","webOperation","uri","initFetchOptions","headers","accept","sent","responseText","parse","t0","console","error","abrupt","holds","rdf","space","warn","solid","load","doc","t1","concat","t2","stop","getName","user","anyValue","vcard","foaf","throttle","func","wait","options","length","undefined","context","args","result","timeout","previous","later","leading","Date","now","remaining","clearTimeout","trailing","setTimeout"],"sources":["../../src/utils/headerFooterHelpers.ts"],"sourcesContent":["/*\n Copied from mashlib/src/global/metadata.ts\n */\nimport { IndexedFormula, LiveStore, NamedNode, parse, sym } from 'rdflib'\nimport { ns } from '..'\n\n/* @ts-ignore no-console */\ntype ThrottleOptions = {\n leading?: boolean;\n throttling?: boolean;\n trailing?: boolean;\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getPod (): NamedNode {\n // @@ TODO: This is given that mashlib runs on NSS - might need to change when we want it to run on other Pod servers\n return sym(document.location.origin).site()\n}\n/**\n */\nexport async function getPodOwner (pod: NamedNode, store: LiveStore): Promise<NamedNode | null> {\n // This is a massive guess. In future\n // const podOwner = sym(`${pod.uri}profile/card#me`)\n/* eslint-disable no-console */\n try {\n // load turtle Container representation\n if (!store.any(pod, null, ns.ldp('Container'), pod)) {\n const response = await store.fetcher.webOperation('GET', pod.uri, store.fetcher.initFetchOptions(pod.uri, { headers: { accept: 'text/turtle' } }))\n const containerTurtle = response.responseText\n parse(containerTurtle as string, store, pod.uri, 'text/turtle')\n }\n } catch (err) {\n console.error('Error loading pod ' + pod + ': ' + err)\n return null\n }\n if (!store.holds(pod, ns.rdf('type'), ns.space('Storage'), pod)) {\n console.warn('Pod ' + pod + ' does not declare itself as a space:Storage')\n return null\n }\n const podOwner = store.any(pod, ns.solid('owner'), null, pod) ||\n store.any(null, ns.space('storage'), pod, pod)\n if (podOwner) {\n try {\n await store.fetcher.load((podOwner as NamedNode).doc())\n } catch (err) {\n console.warn('Unable to load profile of pod owner ' + podOwner)\n return null\n }\n if (!store.holds(podOwner, ns.space('storage'), pod, (podOwner as NamedNode).doc())) {\n console.warn(`Pod owner ${podOwner} does NOT list pod ${pod} as their storage`)\n }\n return podOwner as NamedNode// Success!\n } else { // pod owner not declared in pod\n // @@ TODO: This is given the structure that NSS provides\n // This is a massive guess. For old pods which don't have owner link\n const guess = sym(`${pod.uri}profile/card#me`)\n try {\n // @ts-ignore LiveStore always has fetcher\n await store.fetcher.load(guess)\n } catch (err) {\n console.error('Ooops. Guessed wrong pod owner webid {$guess} : can\\'t load it.')\n return null\n }\n if (store.holds(guess, ns.space('storage'), pod, guess.doc())) {\n console.warn('Using guessed pod owner webid but it links back.')\n return guess\n }\n return null\n }\n /* eslint-enable no-console */\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getName (store: IndexedFormula, user: NamedNode): string {\n return store.anyValue(user, ns.vcard('fn'), null, user.doc()) ||\n store.anyValue(user, ns.foaf('name'), null, user.doc()) ||\n user.uri\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function throttle (func: Function, wait: number, options: ThrottleOptions = {}): (...args: any[]) => any {\n let context: any,\n args: any,\n result: any\n let timeout: any = null\n let previous = 0\n const later = function () {\n previous = !options.leading ? 0 : Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) context = args = null\n }\n return function () {\n const now = Date.now()\n if (!previous && !options.leading) previous = now\n const remaining = wait - (now - previous)\n // @ts-ignore\n context = this\n args = arguments\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n previous = now\n result = func.apply(context, args)\n if (!timeout) context = args = null\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining)\n }\n return result\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAD,OAAA;AAJA;AACA;AACA;;
|
|
1
|
+
{"version":3,"file":"headerFooterHelpers.js","names":["_rdflib","require","_","getPod","sym","document","location","origin","site","getPodOwner","_x","_x2","_getPodOwner","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","pod","store","response","containerTurtle","podOwner","guess","wrap","_callee$","_context","prev","next","any","ns","ldp","fetcher","webOperation","uri","initFetchOptions","headers","accept","sent","responseText","parse","t0","console","error","abrupt","holds","rdf","space","warn","solid","load","doc","t1","concat","t2","stop","getName","user","anyValue","vcard","foaf","throttle","func","wait","options","length","undefined","context","args","result","timeout","previous","later","leading","Date","now","remaining","clearTimeout","trailing","setTimeout"],"sources":["../../src/utils/headerFooterHelpers.ts"],"sourcesContent":["/*\n Copied from mashlib/src/global/metadata.ts\n */\nimport { IndexedFormula, LiveStore, NamedNode, parse, sym } from 'rdflib'\nimport { ns } from '..'\n\n/* @ts-ignore no-console */\ntype ThrottleOptions = {\n leading?: boolean;\n throttling?: boolean;\n trailing?: boolean;\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getPod (): NamedNode {\n // @@ TODO: This is given that mashlib runs on NSS - might need to change when we want it to run on other Pod servers\n return sym(document.location.origin).site()\n}\n/**\n */\nexport async function getPodOwner (pod: NamedNode, store: LiveStore): Promise<NamedNode | null> {\n // This is a massive guess. In future\n // const podOwner = sym(`${pod.uri}profile/card#me`)\n/* eslint-disable no-console */\n try {\n // load turtle Container representation\n if (!store.any(pod, null, ns.ldp('Container'), pod)) {\n const response = await store.fetcher.webOperation('GET', pod.uri, store.fetcher.initFetchOptions(pod.uri, { headers: { accept: 'text/turtle' } }))\n const containerTurtle = response.responseText\n parse(containerTurtle as string, store, pod.uri, 'text/turtle')\n }\n } catch (err) {\n console.error('Error loading pod ' + pod + ': ' + err)\n return null\n }\n if (!store.holds(pod, ns.rdf('type'), ns.space('Storage'), pod)) {\n console.warn('Pod ' + pod + ' does not declare itself as a space:Storage')\n return null\n }\n const podOwner = store.any(pod, ns.solid('owner'), null, pod) ||\n store.any(null, ns.space('storage'), pod, pod)\n if (podOwner) {\n try {\n await store.fetcher.load((podOwner as NamedNode).doc())\n } catch (err) {\n console.warn('Unable to load profile of pod owner ' + podOwner)\n return null\n }\n if (!store.holds(podOwner, ns.space('storage'), pod, (podOwner as NamedNode).doc())) {\n console.warn(`Pod owner ${podOwner} does NOT list pod ${pod} as their storage`)\n }\n return podOwner as NamedNode// Success!\n } else { // pod owner not declared in pod\n // @@ TODO: This is given the structure that NSS provides\n // This is a massive guess. For old pods which don't have owner link\n const guess = sym(`${pod.uri}profile/card#me`)\n try {\n // @ts-ignore LiveStore always has fetcher\n await store.fetcher.load(guess)\n } catch (err) {\n console.error('Ooops. Guessed wrong pod owner webid {$guess} : can\\'t load it.')\n return null\n }\n if (store.holds(guess, ns.space('storage'), pod, guess.doc())) {\n console.warn('Using guessed pod owner webid but it links back.')\n return guess\n }\n return null\n }\n /* eslint-enable no-console */\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getName (store: IndexedFormula, user: NamedNode): string {\n return store.anyValue(user, ns.vcard('fn'), null, user.doc()) ||\n store.anyValue(user, ns.foaf('name'), null, user.doc()) ||\n user.uri\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function throttle (func: Function, wait: number, options: ThrottleOptions = {}): (...args: any[]) => any {\n let context: any,\n args: any,\n result: any\n let timeout: any = null\n let previous = 0\n const later = function () {\n previous = !options.leading ? 0 : Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) context = args = null\n }\n return function () {\n const now = Date.now()\n if (!previous && !options.leading) previous = now\n const remaining = wait - (now - previous)\n // @ts-ignore\n context = this\n args = arguments\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n previous = now\n result = func.apply(context, args)\n if (!timeout) context = args = null\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining)\n }\n return result\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAWA;AACA;AACA;AACO,SAASE,MAAMA,CAAA,EAAe;EACnC;EACA,OAAO,IAAAC,WAAG,EAACC,QAAQ,CAACC,QAAQ,CAACC,MAAM,CAAC,CAACC,IAAI,EAAE;AAC7C;AACA;AACA;AADA,SAEsBC,WAAWA,CAAAC,EAAA,EAAAC,GAAA;EAAA,OAAAC,YAAA,CAAAC,KAAA,OAAAC,SA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ACE,OAAO,EAAEH,OAAO,GAAGC,IAAI,GAAG,IAAI;IACrC,CAAC,MAAM,IAAI,CAACE,OAAO,IAAIN,OAAO,CAACc,QAAQ,KAAK,KAAK,EAAE;MACjDR,OAAO,GAAGS,UAAU,CAACP,KAAK,EAAEI,SAAS,CAAC;IACxC;IACA,OAAOP,MAAM;EACf,CAAC;AACH"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -5,22 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.versionInfo = void 0;
|
|
7
7
|
var versionInfo = {
|
|
8
|
-
buildTime: '2023-
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2023-07-01T19:30:56Z',
|
|
9
|
+
commit: 'a4f5fbef4052d6f8d92d313e57d0d59a03281ece',
|
|
10
10
|
npmInfo: {
|
|
11
11
|
'solid-ui': '2.4.28',
|
|
12
12
|
npm: '8.19.4',
|
|
13
|
-
node: '16.20.
|
|
13
|
+
node: '16.20.1',
|
|
14
14
|
v8: '9.4.146.26-node.26',
|
|
15
15
|
uv: '1.43.0',
|
|
16
16
|
zlib: '1.2.11',
|
|
17
17
|
brotli: '1.0.9',
|
|
18
|
-
ares: '1.19.
|
|
18
|
+
ares: '1.19.1',
|
|
19
19
|
modules: '93',
|
|
20
20
|
nghttp2: '1.47.0',
|
|
21
21
|
napi: '8',
|
|
22
|
-
llhttp: '6.0.
|
|
23
|
-
openssl: '1.1.
|
|
22
|
+
llhttp: '6.0.11',
|
|
23
|
+
openssl: '1.1.1u+quic',
|
|
24
24
|
cldr: '41.0',
|
|
25
25
|
icu: '71.1',
|
|
26
26
|
tz: '2022f',
|