solid-ui 2.4.28-69262fe5 → 2.4.28-6acecd56

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/lib/style.js CHANGED
@@ -15,14 +15,14 @@ var style = {
15
15
  // styleModule
16
16
 
17
17
  checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',
18
- checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',
18
+ checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em;',
19
19
  fieldLabelStyle: 'color: #3B5998; text-decoration: none;',
20
- formSelectStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
21
- textInputStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
20
+ formSelectStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
21
+ textInputStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
22
22
  textInputStyleUneditable:
23
23
  // Color difference only
24
- 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',
25
- buttonStyle: 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;',
24
+ 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',
25
+ buttonStyle: 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;',
26
26
  // 'background-color: #eef;
27
27
  commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',
28
28
  iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',
@@ -37,9 +37,11 @@ var style = {
37
37
  searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',
38
38
  autocompleteRowStyle: 'border: 0.2em solid straw;',
39
39
  // Login buttons
40
- signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;',
40
+ signInAndUpButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;',
41
41
  // was 0.5em radius
42
-
42
+ headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important;',
43
+ signUpBackground: 'background-color: #eef;',
44
+ signInBackground: 'background-color: #efe;',
43
45
  // Forms
44
46
  heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;',
45
47
  // originally was brown; now grey
@@ -57,7 +59,7 @@ var style = {
57
59
  formGroupStyle: ["padding-left: 0em; border: 0.0em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), // weight 0
58
60
  "padding-left: 2em; border: 0.05em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.1em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.2em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;") // @@ pink
59
61
  ],
60
- formFieldLabelStyle: "'color: ".concat(_styleConstants["default"].lowProfileLinkColor, "; text-decoration: none;'"),
62
+ formFieldLabelStyle: "color: ".concat(_styleConstants["default"].lowProfileLinkColor, "; text-decoration: none;"),
61
63
  formFieldNameBoxStyle: "padding: 0.3em; vertical-align: middle; width:".concat(_styleConstants["default"].formFieldNameBoxWidth, ";"),
62
64
  multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' + ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',
63
65
  // Buttons
@@ -65,63 +67,62 @@ var style = {
65
67
  imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',
66
68
  linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',
67
69
  // ACL
68
- aclControlBoxContainer: 'margin: 1em',
69
- aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',
70
- aclControlBoxStatus: 'display: none; margin: 1rem 0',
71
- aclControlBoxStatusRevealed: 'display: block',
72
- aclGroupContent: 'maxWidth: 650',
73
- accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',
74
- accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',
75
- defaultsController: 'display: flex',
76
- defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',
77
- bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',
78
- group: 'color: #888',
79
- group1: 'color: green',
80
- group2: 'color: #cc0',
81
- group3: 'color: orange',
82
- group5: 'color: red',
83
- group9: 'color: blue',
84
- group13: 'color: purple',
85
- trustedAppAddApplicationsTable: 'background-color: #eee',
86
- trustedAppCancelButton: 'float: right',
87
- trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',
88
- temporaryStatusInit: 'background: green',
89
- temporaryStatusEnd: 'background: transparent; transition: background 5s linear',
70
+ aclControlBoxContainer: 'margin: 1em;',
71
+ aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem;',
72
+ aclControlBoxStatus: 'display: none; margin: 1rem 0;',
73
+ aclControlBoxStatusRevealed: 'display: block;',
74
+ aclGroupContent: 'maxWidth: 650;',
75
+ accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%;',
76
+ accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%;',
77
+ defaultsController: 'display: flex;',
78
+ defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%;',
79
+ bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em;',
80
+ group: 'color: #888;',
81
+ group1: 'color: green;',
82
+ group2: 'color: #cc0;',
83
+ group3: 'color: orange;',
84
+ group5: 'color: red;',
85
+ group9: 'color: blue;',
86
+ group13: 'color: purple;',
87
+ trustedAppAddApplicationsTable: 'background-color: #eee;',
88
+ trustedAppCancelButton: 'float: right;',
89
+ trustedAppControllerI: 'border-color: orange; border-radius: 1em; border-width: 0.1em;',
90
+ temporaryStatusInit: 'background: green;',
91
+ temporaryStatusEnd: 'background: transparent; transition: background 5s linear;',
90
92
  // header
91
- 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',
92
- 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%)',
93
- headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',
94
- headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',
95
- headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',
96
- 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%)',
97
- headerUserMenuList: 'list-style: none; margin: 0; padding: 0',
98
- headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',
99
- headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',
100
- headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',
101
- headerUserMenuListItem: 'border-bottom: solid 1px #000000',
102
- headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',
103
- headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',
104
- headerBannerLink: 'display: block',
105
- headerBannerRightMenu: 'display: flex',
106
- headerBannerLogin: 'margin-left: auto',
107
- allChildrenVisible: 'display:true',
108
- headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',
109
- headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',
110
- headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',
111
- headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important',
93
+ 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;',
94
+ 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%);',
95
+ headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px;',
96
+ headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important;',
97
+ headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%;',
98
+ 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%);',
99
+ headerUserMenuList: 'list-style: none; margin: 0; padding: 0;',
100
+ headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true;',
101
+ headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true;',
102
+ headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none;',
103
+ headerUserMenuListItem: 'border-bottom: solid 1px #000000;',
104
+ headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px;',
105
+ headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px;',
106
+ headerBannerLink: 'display: block;',
107
+ headerBannerRightMenu: 'display: flex;',
108
+ headerBannerLogin: 'margin-left: auto;',
109
+ allChildrenVisible: 'display:true;',
110
+ headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto;',
111
+ headerBannerHelpMenu: 'border-left: solid 1px #000000; margin-left: auto;',
112
+ headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important;',
112
113
  // may just be 65px round($icon-size * 352 / 322);
113
114
 
114
115
  // footer
115
- footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',
116
+ footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em;',
116
117
  // buttons
117
- 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',
118
- 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',
119
- 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',
120
- 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',
121
- 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',
122
- 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',
123
- 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',
124
- 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',
118
+ 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;',
119
+ 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;',
120
+ 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;',
121
+ 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;',
122
+ 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;',
123
+ 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;',
124
+ 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;',
125
+ 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;',
125
126
  // media
126
127
  controlStyle: "border-radius: 0.5em; margin: 0.8em; width:".concat(_styleConstants["default"].mediaModuleCanvasWidth, "; height:").concat(_styleConstants["default"].mediaModuleCanvasHeight, ";"),
127
128
  // dragAndDrop
@@ -133,8 +134,8 @@ var style = {
133
134
  errorMessageBlockStyle: 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;',
134
135
  // pad
135
136
  notepadStyle: 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;',
136
- upstreamStatus: 'width:50%',
137
- downstreamStatus: 'width:50%',
137
+ upstreamStatus: 'width: 50%;',
138
+ downstreamStatus: 'width: 50%;',
138
139
  baseStyle: 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;',
139
140
  headingCore: 'font-family: sans-serif; font-weight: bold; border: none;',
140
141
  headingStyle: ['font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;', 'font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;', 'font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;'],
@@ -147,7 +148,7 @@ var style = {
147
148
  tabsRootElement: 'display: flex; height: 100%; width: 100%;',
148
149
  tabsMainElement: 'margin: 0; width:100%; height: 100%;',
149
150
  tabContainer: 'list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;',
150
- makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer',
151
+ makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer;',
151
152
  ellipsis: 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;'
152
153
  };
153
154
  exports.style = style;
package/lib/style.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":["_styleConstants","_interopRequireDefault","require","style","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectStyle","textInputStyle","textInputStyleUneditable","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","messageBodyStyle","pendingeditModifier","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInButtonStyle","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","headerBannerLoginInput","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 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 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 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 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,6EAA6E;EAC5FC,kBAAkB,EAAE,0GAA0G;EAE9HC,eAAe,EAAE,wCAAwC;EACzDC,e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,OAAO,GAAGhH,KAAK,EAAC"}
1
+ {"version":3,"file":"style.js","names":["_styleConstants","_interopRequireDefault","require","style","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectStyle","textInputStyle","textInputStyleUneditable","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","messageBodyStyle","pendingeditModifier","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInAndUpButtonStyle","headerBannerLoginInput","signUpBackground","signInBackground","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingStyle","formTextInput","formGroupStyle","concat","styleConstants","formBorderColor","formFieldLabelStyle","lowProfileLinkColor","formFieldNameBoxStyle","formFieldNameBoxWidth","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","aclControlBoxContainer","aclControlBoxHeader","aclControlBoxStatus","aclControlBoxStatusRevealed","aclGroupContent","accessGroupList","accessGroupListItem","defaultsController","defaultsControllerNotice","bigButton","group","group1","group2","group3","group5","group9","group13","trustedAppAddApplicationsTable","trustedAppCancelButton","trustedAppControllerI","temporaryStatusInit","temporaryStatusEnd","headerUserMenuLink","headerUserMenuLinkHover","headerUserMenuTrigger","headerUserMenuTriggerImg","headerUserMenuButton","headerUserMenuButtonHover","headerUserMenuList","headerUserMenuListDisplay","headerUserMenuNavigationMenu","headerUserMenuNavigationMenuNotDisplayed","headerUserMenuListItem","headerUserMenuPhoto","headerBanner","headerBannerLink","headerBannerRightMenu","headerBannerLogin","allChildrenVisible","headerBannerUserMenu","headerBannerHelpMenu","headerBannerIcon","footer","primaryButton","primaryButtonHover","primaryButtonNoBorder","primaryButtonNoBorderHover","secondaryButton","secondaryButtonHover","secondaryButtonNoBorder","secondaryButtonNoBorderHover","controlStyle","mediaModuleCanvasWidth","mediaModuleCanvasHeight","dragEvent","dropEvent","restoreStyle","errorCancelButton","errorMessageBlockStyle","notepadStyle","upstreamStatus","downstreamStatus","baseStyle","headingCore","headingStyle","participantsStyle","participantsBlock","personTableTD","tabsNavElement","tabsRootElement","tabsMainElement","tabContainer","makeNewSlot","ellipsis","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; border-radius: 1em; border-width: 0.1em;',\n temporaryStatusInit: 'background: green;',\n temporaryStatusEnd: 'background: transparent; transition: background 5s linear;',\n\n // header\n headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none;',\n headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);',\n headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px;',\n headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important;',\n headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%;',\n headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);',\n headerUserMenuList: 'list-style: none; margin: 0; padding: 0;',\n headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true;',\n headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true;',\n headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none;',\n headerUserMenuListItem: 'border-bottom: solid 1px #000000;',\n headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px;',\n headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px;',\n headerBannerLink: 'display: block;',\n headerBannerRightMenu: 'display: flex;',\n headerBannerLogin: 'margin-left: auto;',\n allChildrenVisible: 'display:true;',\n headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto;',\n headerBannerHelpMenu: 'border-left: solid 1px #000000; margin-left: auto;',\n headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important;', // may just be 65px round($icon-size * 352 / 322);\n\n // footer\n footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em;',\n\n // buttons\n primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',\n primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',\n primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',\n primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',\n secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',\n secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',\n secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',\n secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',\n\n // media\n controlStyle: `border-radius: 0.5em; margin: 0.8em; width:${styleConstants.mediaModuleCanvasWidth}; height:${styleConstants.mediaModuleCanvasHeight};`,\n\n // dragAndDrop\n dragEvent: 'background-color: #ccc; border: 0.25em dashed black; border-radius: 0.3em;',\n dropEvent: 'background-color: white; border: 0em solid black;',\n restoreStyle: 'background-color: white;',\n\n // errors\n errorCancelButton: 'width: 2em; height: 2em; align: right;',\n errorMessageBlockStyle: 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;',\n\n // pad\n notepadStyle: 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;',\n upstreamStatus: 'width: 50%;',\n downstreamStatus: 'width: 50%;',\n baseStyle: 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;',\n headingCore: 'font-family: sans-serif; font-weight: bold; border: none;',\n headingStyle: [\n 'font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;',\n 'font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;',\n 'font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;'\n ],\n\n // participation\n participantsStyle: 'margin: 0.8em;',\n participantsBlock: 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888;',\n personTableTD: 'vertical-align: middle;',\n\n // tabs\n tabsNavElement: 'margin: 0;',\n tabsRootElement: 'display: flex; height: 100%; width: 100%;',\n tabsMainElement: 'margin: 0; width:100%; height: 100%;',\n tabContainer: 'list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;',\n makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer;',\n ellipsis: 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;'\n\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n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AAe,EAAE,sCAAsC;EACvDC,YAAY,EAAE,yFAAyF;EACvGC,WAAW,EAAE,iEAAiE;EAC9EC,QAAQ,EAAE;AAEZ,CAAC;AAAAC,OAAA,CAAAlH,KAAA,GAAAA,KAAA;AAEDA,KAAK,CAACmH,QAAQ,GAAG,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"}
@@ -22,13 +22,15 @@ var _default = {
22
22
  mediaModuleCanvasWidth: '640',
23
23
  mediaModuleCanvasHeight: '480',
24
24
  textInputSize: 20,
25
- // Default text input size in characters roughly
25
+ // Rough default text input size, in characters
26
26
  tabBorderRadius: '0.2em',
27
27
  textInputBackgroundColor: '#eef',
28
28
  textInputBackgroundColorUneditable: '#fff',
29
29
  textInputColor: '#000',
30
30
  textInputColorPending: '#888',
31
- defaultErrorBackgroundColor: '#fee'
31
+ defaultErrorBackgroundColor: '#fee',
32
+ participationDefaultBackground: 'white',
33
+ basicMaxLength: '4096'
32
34
  };
33
35
  exports["default"] = _default;
34
36
  //# sourceMappingURL=styleConstants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styleConstants.js","names":["highlightColor","formBorderColor","formHeadingColor","lowProfileLinkColor","formFieldNameBoxWidth","mediaModuleCanvasWidth","mediaModuleCanvasHeight","textInputSize","tabBorderRadius","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","defaultErrorBackgroundColor","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"],"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;AAC/B,CAAC;AAAAC,OAAA,cAAAC,QAAA"}
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, // Rough default text input size, in characters\n tabBorderRadius: '0.2em',\n\n textInputBackgroundColor: '#eef',\n textInputBackgroundColorUneditable: '#fff',\n textInputColor: '#000',\n textInputColorPending: '#888',\n\n defaultErrorBackgroundColor: '#fee',\n\n participationDefaultBackground: 'white',\n\n basicMaxLength: '4096'\n}\n"],"mappings":";;;;;;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"}
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.versionInfo = void 0;
7
7
  var versionInfo = {
8
- buildTime: '2023-07-01T18:56:58Z',
9
- commit: '69262fe5c4176380c506b5e146e8fbc0cff58c12',
8
+ buildTime: '2023-08-16T08:07:53Z',
9
+ commit: '6acecd56300c8f2aeab15d3da2f6d11f83a0653d',
10
10
  npmInfo: {
11
11
  'solid-ui': '2.4.28',
12
12
  npm: '8.19.4',
@@ -1 +1 @@
1
- {"version":3,"file":"versionInfo.js","names":["versionInfo","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3","exports"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-07-01T18:56:58Z',\n commit: '69262fe5c4176380c506b5e146e8fbc0cff58c12',\n npmInfo:\n{\n 'solid-ui': '2.4.28',\n npm: '8.19.4',\n node: '16.20.1',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.1',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.11',\n openssl: '1.1.1u+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n}\n"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAG;EACzBC,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACT;IACE,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC;AAAAC,OAAA,CAAAtB,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"versionInfo.js","names":["versionInfo","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3","exports"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-08-16T08:07:53Z',\n commit: '6acecd56300c8f2aeab15d3da2f6d11f83a0653d',\n npmInfo:\n{\n 'solid-ui': '2.4.28',\n npm: '8.19.4',\n node: '16.20.1',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.1',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.11',\n openssl: '1.1.1u+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n}\n"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAG;EACzBC,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACT;IACE,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC;AAAAC,OAAA,CAAAtB,WAAA,GAAAA,WAAA"}
@@ -15,19 +15,19 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
15
15
  /* Drag and drop common functionality
16
16
  *
17
17
  * It is easy to make something draggable, or to make it a drag target!
18
- * Just call the functions below. In a solid world, any part of the UI which
19
- * represent one thing which has a URI, should be made draggable using makeDraggable
18
+ * Just call the functions below. In a Solid world, any part of the UI which
19
+ * represents one thing which has a URI, should be made draggable using makeDraggable.
20
20
  * Any list of things should typically allow you to drag new members of the list
21
21
  * onto it.
22
- * The file upload function uploadFiles is provided as often as someone drags a file from the computer
23
- * desktop, you may want to upload it into the pod.
22
+ * The file upload function, uploadFiles, is provided as often as someone drags a file from the computer
23
+ * desktop. You may want to upload it into the pod.
24
24
  */
25
25
 
26
26
  /* global FileReader alert */
27
27
 
28
28
  function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
29
29
  var dragoverListener = function dragoverListener(e) {
30
- e.preventDefault(); // Need else drop does not work [sic]
30
+ e.preventDefault(); // Need this; otherwise, drop does not work.
31
31
  e.dataTransfer.dropEffect = 'copy';
32
32
  };
33
33
  var dragenterListener = function dragenterListener(e) {
@@ -1 +1 @@
1
- {"version":3,"file":"dragAndDrop.js","names":["debug","_interopRequireWildcard","require","mime","style","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","makeDropTarget","ele","droppedURIHandler","droppedFileHandler","dragoverListener","e","preventDefault","dataTransfer","dropEffect","dragenterListener","log","localStyle","savedStyle","dragEvent","dragleaveListener","dropEvent","dropListener","types","join","uris","text","t","length","type","getData","split","files","i","f","name","size","lastModifiedDate","toLocaleDateString","slice","restoreStyle","addTargetListeners","addEventListener","makeDraggable","tr","setAttribute","fontWeight","setData","uri","outerHTML","stopPropagation","uploadFiles","fetcher","fileBase","imageBase","successHandler","reader","FileReader","onload","theFile","data","target","result","suffix","byteLength","contentType","lookup","msg","alert","Error","extension","endsWith","folderName","startsWith","destURI","encodeURIComponent","webOperation","then","_response","error","readAsArrayBuffer"],"sources":["../../src/widgets/dragAndDrop.js"],"sourcesContent":["/* Drag and drop common functionality\n *\n * It is easy to make something draggable, or to make it a drag target!\n * Just call the functions below. In a solid world, any part of the UI which\n * represent one thing which has a URI, should be made draggable using makeDraggable\n * Any list of things should typically allow you to drag new members of the list\n * onto it.\n * The file upload function uploadFiles is provided as often as someone drags a file from the computer\n * desktop, you may want to upload it into the pod.\n */\nimport * as debug from '../debug'\nimport * as mime from 'mime-types'\nimport * as style from '../style'\n\n/* global FileReader alert */\n\nexport function makeDropTarget (ele, droppedURIHandler, droppedFileHandler) {\n const dragoverListener = function (e) {\n e.preventDefault() // Need else drop does not work [sic]\n e.dataTransfer.dropEffect = 'copy'\n }\n\n const dragenterListener = function (e) {\n debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect)\n if (this.localStyle) {\n // necessary not sure when\n if (!this.savedStyle) {\n this.savedStyle = style.dragEvent\n }\n }\n\n e.dataTransfer.dropEffect = 'link'\n debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect)\n }\n const dragleaveListener = function (e) {\n debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect)\n if (this.savedStyle) {\n this.localStyle = this.savedStyle\n } else {\n this.localStyle = style.dropEvent\n }\n }\n\n const dropListener = function (e) {\n if (e.preventDefault) e.preventDefault() // stops the browser from redirecting off to the text.\n debug.log('Drop event. dropEffect: ' + e.dataTransfer.dropEffect)\n debug.log(\n 'Drop event. types: ' +\n (e.dataTransfer.types ? e.dataTransfer.types.join(', ') : 'NOPE')\n )\n\n let uris = null\n let text\n if (e.dataTransfer.types) {\n for (let t = 0; t < e.dataTransfer.types.length; t++) {\n const type = e.dataTransfer.types[t]\n if (type === 'text/uri-list') {\n uris = e.dataTransfer.getData(type).split('\\n') // @ ignore those starting with #\n debug.log('Dropped text/uri-list: ' + uris)\n } else if (type === 'text/plain') {\n text = e.dataTransfer.getData(type)\n } else if (type === 'Files' && droppedFileHandler) {\n const files = e.dataTransfer.files // FileList object.\n for (let i = 0; files[i]; i++) {\n const f = files[i]\n debug.log(\n 'Filename: ' +\n f.name +\n ', type: ' +\n (f.type || 'n/a') +\n ' size: ' +\n f.size +\n ' bytes, last modified: ' +\n (f.lastModifiedDate\n ? f.lastModifiedDate.toLocaleDateString()\n : 'n/a')\n )\n }\n droppedFileHandler(files)\n }\n }\n if (uris === null && text && text.slice(0, 4) === 'http') {\n uris = text\n debug.log(\"Waring: Poor man's drop: using text for URI\") // chrome disables text/uri-list??\n }\n } else {\n // ... however, if we're IE, we don't have the .types property, so we'll just get the Text value\n uris = [e.dataTransfer.getData('Text')]\n debug.log('WARNING non-standard drop event: ' + uris[0])\n }\n debug.log('Dropped URI list (2): ' + uris)\n if (uris) {\n droppedURIHandler(uris)\n }\n this.localStyle = style.restoreStyle // restore style\n return false\n } // dropListener\n\n const addTargetListeners = function (ele) {\n if (!ele) {\n debug.log('@@@ addTargetListeners: ele ' + ele)\n }\n ele.addEventListener('dragover', dragoverListener)\n ele.addEventListener('dragenter', dragenterListener)\n ele.addEventListener('dragleave', dragleaveListener)\n ele.addEventListener('drop', dropListener)\n }\n addTargetListeners(ele, droppedURIHandler)\n} // listen for dropped URIs\n\n// Make an HTML element draggable as a URI-identified thing\n//\n// Possibly later set the drag image too?\n//\nexport function makeDraggable (tr, obj) {\n tr.setAttribute('draggable', 'true') // Stop the image being dragged instead - just the TR\n\n tr.addEventListener(\n 'dragstart',\n function (e) {\n tr.style.fontWeight = 'bold'\n e.dataTransfer.setData('text/uri-list', obj.uri)\n e.dataTransfer.setData('text/plain', obj.uri)\n e.dataTransfer.setData('text/html', tr.outerHTML)\n debug.log(\n 'Dragstart: ' + tr + ' -> ' + obj + 'de: ' + e.dataTransfer.dropEffect\n )\n },\n false\n )\n\n tr.addEventListener(\n 'drag',\n function (e) {\n e.preventDefault()\n e.stopPropagation()\n // debug.log('Drag: dropEffect: ' + e.dataTransfer.dropEffect)\n },\n false\n )\n\n tr.addEventListener(\n 'dragend',\n function (e) {\n tr.style.fontWeight = 'normal'\n debug.log('Dragend dropeffect: ' + e.dataTransfer.dropEffect)\n debug.log('Dragend: ' + tr + ' -> ' + obj)\n },\n false\n )\n}\n\n/** uploadFiles\n**\n** Generic uploader of local files to the web\n** typically called from dropped file handler\n**\n** @param {Fetcher} fetcher instance of class Fetcher as in kb.fetcher\n** @param {Array<File>} files Array of file objects\n** @param {String} fileBase URI of folder in which to put files (except images) (no trailing slash)\n** @param {String } imageBase URI of folder in which to put images\n** @param successHandler function(file, uploadedURI) Called after EACH success upload\n** With file object an final URI as params\n*/\n\nexport function uploadFiles (fetcher, files, fileBase, imageBase, successHandler) {\n for (let i = 0; files[i]; i++) {\n const f = files[i]\n debug.log(\n ' dropped: Filename: ' +\n f.name +\n ', type: ' +\n (f.type || 'n/a') +\n ' size: ' +\n f.size +\n ' bytes, last modified: ' +\n (f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a')\n ) // See e.g. https://www.html5rocks.com/en/tutorials/file/dndfiles/\n\n // @@ Add: progress bar(s)\n const reader = new FileReader()\n reader.onload = (function (theFile) {\n return function (e) {\n const data = e.target.result\n let suffix = ''\n debug.log(' File read byteLength : ' + data.byteLength)\n let contentType = theFile.type\n if (!theFile.type || theFile.type === '') {\n // Not known by browser\n contentType = mime.lookup(theFile.name)\n if (!contentType) {\n const msg =\n 'Filename needs to have an extension which gives a type we know: ' +\n theFile.name\n debug.log(msg)\n alert(msg)\n throw new Error(msg)\n }\n } else {\n const extension = mime.extension(theFile.type)\n // Note not simple: eg .mp3 => audio/mpeg; .mpga => audio/mpeg; audio/mp3 => .mp3\n if (extension && extension !== 'false' && !theFile.name.endsWith('.' + extension) && // Not already has preferred extension? and ...\n theFile.type !== mime.lookup(theFile.name)) { // the mime type of this ext is not the right one?\n suffix = '_.' + extension\n // console.log('MIME TYPE MISMATCH: ' + mime.lookup(theFile.name) + ': adding extension: ' + suffix)\n }\n }\n const folderName = theFile.type.startsWith('image/')\n ? imageBase || fileBase\n : fileBase\n const destURI =\n folderName +\n (folderName.endsWith('/') ? '' : '/') +\n encodeURIComponent(theFile.name) +\n suffix\n\n fetcher\n .webOperation('PUT', destURI, {\n data,\n contentType\n })\n .then(\n _response => {\n debug.log(' Upload: put OK: ' + destURI)\n successHandler(theFile, destURI)\n },\n error => {\n const msg = ' Upload: FAIL ' + destURI + ', Error: ' + error\n debug.log(msg)\n alert(msg)\n throw new Error(msg)\n }\n )\n }\n })(f)\n reader.readAsArrayBuffer(f)\n }\n}\n"],"mappings":";;;;;;;;;AAUA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AAAiC,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,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AmB,GAAG0D,OAAO,CAAC;UACxCnB,cAAc,CAACI,OAAO,EAAEe,OAAO,CAAC;QAClC,CAAC,EACD,UAAAK,KAAK,EAAI;UACP,IAAMZ,GAAG,GAAG,gBAAgB,GAAGO,OAAO,GAAG,WAAW,GAAGK,KAAK;UAC5DpG,KAAK,CAACqC,GAAG,CAACmD,GAAG,CAAC;UACdC,KAAK,CAACD,GAAG,CAAC;UACV,MAAM,IAAIE,KAAK,CAACF,GAAG,CAAC;QACtB,CAAC,CACF;MACL,CAAC;IACH,CAAC,CAAEjC,CAAC,CAAC;IACLsB,MAAM,CAACwB,iBAAiB,CAAC9C,CAAC,CAAC;EAC7B;AACF"}
1
+ {"version":3,"file":"dragAndDrop.js","names":["debug","_interopRequireWildcard","require","mime","style","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","makeDropTarget","ele","droppedURIHandler","droppedFileHandler","dragoverListener","e","preventDefault","dataTransfer","dropEffect","dragenterListener","log","localStyle","savedStyle","dragEvent","dragleaveListener","dropEvent","dropListener","types","join","uris","text","t","length","type","getData","split","files","i","f","name","size","lastModifiedDate","toLocaleDateString","slice","restoreStyle","addTargetListeners","addEventListener","makeDraggable","tr","setAttribute","fontWeight","setData","uri","outerHTML","stopPropagation","uploadFiles","fetcher","fileBase","imageBase","successHandler","reader","FileReader","onload","theFile","data","target","result","suffix","byteLength","contentType","lookup","msg","alert","Error","extension","endsWith","folderName","startsWith","destURI","encodeURIComponent","webOperation","then","_response","error","readAsArrayBuffer"],"sources":["../../src/widgets/dragAndDrop.js"],"sourcesContent":["/* Drag and drop common functionality\n *\n * It is easy to make something draggable, or to make it a drag target!\n * Just call the functions below. In a Solid world, any part of the UI which\n * represents one thing which has a URI, should be made draggable using makeDraggable.\n * Any list of things should typically allow you to drag new members of the list\n * onto it.\n * The file upload function, uploadFiles, is provided as often as someone drags a file from the computer\n * desktop. You may want to upload it into the pod.\n */\nimport * as debug from '../debug'\nimport * as mime from 'mime-types'\nimport * as style from '../style'\n\n/* global FileReader alert */\n\nexport function makeDropTarget (ele, droppedURIHandler, droppedFileHandler) {\n const dragoverListener = function (e) {\n e.preventDefault() // Need this; otherwise, drop does not work.\n e.dataTransfer.dropEffect = 'copy'\n }\n\n const dragenterListener = function (e) {\n debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect)\n if (this.localStyle) {\n // necessary not sure when\n if (!this.savedStyle) {\n this.savedStyle = style.dragEvent\n }\n }\n\n e.dataTransfer.dropEffect = 'link'\n debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect)\n }\n const dragleaveListener = function (e) {\n debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect)\n if (this.savedStyle) {\n this.localStyle = this.savedStyle\n } else {\n this.localStyle = style.dropEvent\n }\n }\n\n const dropListener = function (e) {\n if (e.preventDefault) e.preventDefault() // stops the browser from redirecting off to the text.\n debug.log('Drop event. dropEffect: ' + e.dataTransfer.dropEffect)\n debug.log(\n 'Drop event. types: ' +\n (e.dataTransfer.types ? e.dataTransfer.types.join(', ') : 'NOPE')\n )\n\n let uris = null\n let text\n if (e.dataTransfer.types) {\n for (let t = 0; t < e.dataTransfer.types.length; t++) {\n const type = e.dataTransfer.types[t]\n if (type === 'text/uri-list') {\n uris = e.dataTransfer.getData(type).split('\\n') // @ ignore those starting with #\n debug.log('Dropped text/uri-list: ' + uris)\n } else if (type === 'text/plain') {\n text = e.dataTransfer.getData(type)\n } else if (type === 'Files' && droppedFileHandler) {\n const files = e.dataTransfer.files // FileList object.\n for (let i = 0; files[i]; i++) {\n const f = files[i]\n debug.log(\n 'Filename: ' +\n f.name +\n ', type: ' +\n (f.type || 'n/a') +\n ' size: ' +\n f.size +\n ' bytes, last modified: ' +\n (f.lastModifiedDate\n ? f.lastModifiedDate.toLocaleDateString()\n : 'n/a')\n )\n }\n droppedFileHandler(files)\n }\n }\n if (uris === null && text && text.slice(0, 4) === 'http') {\n uris = text\n debug.log(\"Waring: Poor man's drop: using text for URI\") // chrome disables text/uri-list??\n }\n } else {\n // ... however, if we're IE, we don't have the .types property, so we'll just get the Text value\n uris = [e.dataTransfer.getData('Text')]\n debug.log('WARNING non-standard drop event: ' + uris[0])\n }\n debug.log('Dropped URI list (2): ' + uris)\n if (uris) {\n droppedURIHandler(uris)\n }\n this.localStyle = style.restoreStyle // restore style\n return false\n } // dropListener\n\n const addTargetListeners = function (ele) {\n if (!ele) {\n debug.log('@@@ addTargetListeners: ele ' + ele)\n }\n ele.addEventListener('dragover', dragoverListener)\n ele.addEventListener('dragenter', dragenterListener)\n ele.addEventListener('dragleave', dragleaveListener)\n ele.addEventListener('drop', dropListener)\n }\n addTargetListeners(ele, droppedURIHandler)\n} // listen for dropped URIs\n\n// Make an HTML element draggable as a URI-identified thing\n//\n// Possibly later set the drag image too?\n//\nexport function makeDraggable (tr, obj) {\n tr.setAttribute('draggable', 'true') // Stop the image being dragged instead - just the TR\n\n tr.addEventListener(\n 'dragstart',\n function (e) {\n tr.style.fontWeight = 'bold'\n e.dataTransfer.setData('text/uri-list', obj.uri)\n e.dataTransfer.setData('text/plain', obj.uri)\n e.dataTransfer.setData('text/html', tr.outerHTML)\n debug.log(\n 'Dragstart: ' + tr + ' -> ' + obj + 'de: ' + e.dataTransfer.dropEffect\n )\n },\n false\n )\n\n tr.addEventListener(\n 'drag',\n function (e) {\n e.preventDefault()\n e.stopPropagation()\n // debug.log('Drag: dropEffect: ' + e.dataTransfer.dropEffect)\n },\n false\n )\n\n tr.addEventListener(\n 'dragend',\n function (e) {\n tr.style.fontWeight = 'normal'\n debug.log('Dragend dropeffect: ' + e.dataTransfer.dropEffect)\n debug.log('Dragend: ' + tr + ' -> ' + obj)\n },\n false\n )\n}\n\n/** uploadFiles\n**\n** Generic uploader of local files to the web\n** typically called from dropped file handler\n**\n** @param {Fetcher} fetcher instance of class Fetcher as in kb.fetcher\n** @param {Array<File>} files Array of file objects\n** @param {String} fileBase URI of folder in which to put files (except images) (no trailing slash)\n** @param {String } imageBase URI of folder in which to put images\n** @param successHandler function(file, uploadedURI) Called after EACH success upload\n** With file object an final URI as params\n*/\n\nexport function uploadFiles (fetcher, files, fileBase, imageBase, successHandler) {\n for (let i = 0; files[i]; i++) {\n const f = files[i]\n debug.log(\n ' dropped: Filename: ' +\n f.name +\n ', type: ' +\n (f.type || 'n/a') +\n ' size: ' +\n f.size +\n ' bytes, last modified: ' +\n (f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a')\n ) // See e.g. https://www.html5rocks.com/en/tutorials/file/dndfiles/\n\n // @@ Add: progress bar(s)\n const reader = new FileReader()\n reader.onload = (function (theFile) {\n return function (e) {\n const data = e.target.result\n let suffix = ''\n debug.log(' File read byteLength : ' + data.byteLength)\n let contentType = theFile.type\n if (!theFile.type || theFile.type === '') {\n // Not known by browser\n contentType = mime.lookup(theFile.name)\n if (!contentType) {\n const msg =\n 'Filename needs to have an extension which gives a type we know: ' +\n theFile.name\n debug.log(msg)\n alert(msg)\n throw new Error(msg)\n }\n } else {\n const extension = mime.extension(theFile.type)\n // Note not simple: eg .mp3 => audio/mpeg; .mpga => audio/mpeg; audio/mp3 => .mp3\n if (extension && extension !== 'false' && !theFile.name.endsWith('.' + extension) && // Not already has preferred extension? and ...\n theFile.type !== mime.lookup(theFile.name)) { // the mime type of this ext is not the right one?\n suffix = '_.' + extension\n // console.log('MIME TYPE MISMATCH: ' + mime.lookup(theFile.name) + ': adding extension: ' + suffix)\n }\n }\n const folderName = theFile.type.startsWith('image/')\n ? imageBase || fileBase\n : fileBase\n const destURI =\n folderName +\n (folderName.endsWith('/') ? '' : '/') +\n encodeURIComponent(theFile.name) +\n suffix\n\n fetcher\n .webOperation('PUT', destURI, {\n data,\n contentType\n })\n .then(\n _response => {\n debug.log(' Upload: put OK: ' + destURI)\n successHandler(theFile, destURI)\n },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GAAGK,KAAK;UAC5DpG,KAAK,CAACqC,GAAG,CAACmD,GAAG,CAAC;UACdC,KAAK,CAACD,GAAG,CAAC;UACV,MAAM,IAAIE,KAAK,CAACF,GAAG,CAAC;QACtB,CAAC,CACF;MACL,CAAC;IACH,CAAC,CAAEjC,CAAC,CAAC;IACLsB,MAAM,CAACwB,iBAAiB,CAAC9C,CAAC,CAAC;EAC7B;AACF"}
@@ -137,7 +137,7 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
137
137
  var size = kb.anyJS(form, ns.ui('size')) || _styleConstants["default"].textInputSize || 20;
138
138
  field.setAttribute('size', size);
139
139
  var maxLength = kb.any(form, ns.ui('maxLength'));
140
- field.setAttribute('maxLength', maxLength ? '' + maxLength : '4096');
140
+ field.setAttribute('maxLength', maxLength ? '' + maxLength : _styleConstants["default"].basicMaxLength);
141
141
  doc = doc || fieldStore(subject, property, doc);
142
142
  var obj = kb.any(subject, property, undefined, doc);
143
143
  if (!obj) {
@@ -1 +1 @@
1
- {"version":3,"file":"basic.js","names":["_rdflib","require","_solidLogic","ns","_interopRequireWildcard","_style","_styleConstants","_interopRequireDefault","_utils","_error","_fieldFunction","_fieldParams","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","store","solidLogicSingleton","renderNameValuePair","dom","kb","box","form","label","style","display","flexDirection","lhs","appendChild","createElement","width","styleConstants","formFieldNameBoxWidth","rhs","setAttribute","formFieldNameBoxStyle","createTextNode","any","ui","fieldLabel","errorMessageBlock","property","fieldInQuestion","lab","undefined","anchor","uri","textContent","fieldStore","subject","predicate","def","sts","statementsMatching","length","updater","Error","why","value","editable","sym","basicField","container","already","doc","callbackFunction","formDoc","suppressEmptyUneditable","anyJS","mostSpecificClassURI","params","fieldParams","paramStyle","textInputStyle","field","type","size","textInputSize","maxLength","uriPrefix","decodeURIComponent","replace","readOnly","textInputStyleUneditable","addEventListener","_e","pattern","match","disabled","ds","result","namedNode","encodeURIComponent","dt","Literal","trim","xsd","is","map","statement","st","updateMany","callback","docs","forEach","includes","push","update","pop","is1","filter","is2","ds1","ds2","ok","body"],"sources":["../../../src/widgets/forms/basic.ts"],"sourcesContent":["import { BlankNode, Literal, NamedNode, Node, st, Store, Variable } from 'rdflib'\nimport { solidLogicSingleton } from 'solid-logic'\nimport * as ns from '../../ns'\nimport { formFieldNameBoxStyle, textInputStyle, textInputStyleUneditable } from '../../style'\nimport styleConstants from '../../styleConstants'\nimport { label } from '../../utils'\nimport { errorMessageBlock } from '../error'\nimport { mostSpecificClassURI } from './fieldFunction'\nimport { fieldParams } from './fieldParams'\n\nconst store = solidLogicSingleton.store\n\n/* Style and create a name, value pair\n*/\nexport function renderNameValuePair (dom: HTMLDocument, kb: Store, box: HTMLElement, form: NamedNode, label?: string):HTMLElement {\n // const property = kb.any(form, ns.ui('property'))\n box.style.display = 'flex'\n box.style.flexDirection = 'row'\n const lhs = box.appendChild(dom.createElement('div'))\n lhs.style.width = styleConstants.formFieldNameBoxWidth\n const rhs = box.appendChild(dom.createElement('div'))\n\n lhs.setAttribute('class', 'formFieldName')\n lhs.setAttribute('style', formFieldNameBoxStyle)\n rhs.setAttribute('class', 'formFieldValue')\n if (label) {\n lhs.appendChild(dom.createTextNode(label))\n } else if (kb.any(form, ns.ui('property'))) { // Assume more space for error on right\n lhs.appendChild(fieldLabel(dom, kb.any(form, ns.ui('property')) as NamedNode, form))\n } else {\n rhs.appendChild(errorMessageBlock(dom, 'No property or label given for form field: ' + form))\n lhs.appendChild(dom.createTextNode('???'))\n }\n return rhs\n}\n\n/**\n * Create an anchor element with a label as the anchor text.\n *\n * @param dom The DOM\n * @param property href for the anchor element\n * @param fieldInQuestion field to produce a label for\n *\n * @internal exporting this only for unit tests\n */\nexport function fieldLabel (dom: HTMLDocument, property: NamedNode | undefined, fieldInQuestion: Node): HTMLElement | Text {\n let lab = store.any(fieldInQuestion as any, ns.ui('label'))\n if (!lab) lab = label(property, true) // Init capital\n if (property === undefined) {\n return dom.createTextNode('@@Internal error: undefined property')\n }\n const anchor = dom.createElement('a')\n /* istanbul ignore next */\n if (property.uri) anchor.setAttribute('href', property.uri)\n anchor.setAttribute('style', 'color: #3B5998; text-decoration: none;') // Not too blue and no underline\n anchor.textContent = lab as any\n return anchor\n}\n\n/**\n * Returns the document for the first quad that matches\n * the subject and predicate provided, or default if that\n * store is not editable.\n *\n * @param subject Subject about which we want to find an editable RDF document\n * @param predicate Predicate about which we want to find an editable RDF document\n * @param def default RDF document to return if none found\n *\n * @internal exporting this only for unit tests\n */\nexport function fieldStore (subject: NamedNode | BlankNode | Variable, predicate: NamedNode | Variable, def: NamedNode | undefined): NamedNode | undefined {\n const sts = store.statementsMatching(subject, predicate)\n if (sts.length === 0) return def // can used default as no data yet\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n if (\n sts.length > 0 &&\n sts[0].why.value &&\n store.updater.editable(sts[0].why.value, store)\n ) {\n return store.sym(sts[0].why.value)\n }\n return def\n}\n\n/**\n * Render a basic form field\n *\n * The same function is used for many similar one-value fields, with different\n * regexps used to validate.\n *\n * @param dom The HTML Document object aka Document Object Model\n * @param container If present, the created widget will be appended to this\n * @param already A hash table of (form, subject) kept to prevent recursive forms looping\n * @param subject The thing about which the form displays/edits data\n * @param form The form or field to be rendered\n * @param doc The web document in which the data is\n * @param callbackFunction Called when data is changed?\n *\n * @returns The HTML widget created\n */\n// eslint-disable-next-line complexity\nexport function basicField (\n dom: HTMLDocument,\n container: HTMLElement | undefined,\n already,\n subject: NamedNode | BlankNode | Variable,\n form: NamedNode,\n doc: NamedNode | undefined,\n callbackFunction: (_ok: boolean, _errorMessage: string) => void\n): HTMLElement {\n const kb = store\n const formDoc = form.doc ? form.doc() : null // @@ if blank no way to know\n\n const box = dom.createElement('div')\n\n const property = kb.any(form, ns.ui('property'))\n if (container) container.appendChild(box)\n if (!property) {\n return box.appendChild(\n errorMessageBlock(dom, 'Error: No property given for text field: ' + form)\n )\n }\n const rhs = renderNameValuePair(dom, kb, box, form)\n\n // It can be cleaner to just remove empty fields if you can't edit them anyway\n const suppressEmptyUneditable = kb.anyJS(form, ns.ui('suppressEmptyUneditable'), null, formDoc)\n\n const uri = mostSpecificClassURI(form)\n let params = fieldParams[uri]\n if (params === undefined) params = { style: '' } // non-bottom field types can do this\n const paramStyle = params.style || ''\n const style = textInputStyle + paramStyle\n const field = dom.createElement('input')\n ;(field as any).style = style\n rhs.appendChild(field)\n field.setAttribute('type', params.type ? params.type : 'text')\n\n const size = kb.anyJS(form, ns.ui('size')) || styleConstants.textInputSize || 20\n field.setAttribute('size', size)\n\n const maxLength = kb.any(form, ns.ui('maxLength'))\n field.setAttribute('maxLength', maxLength ? '' + maxLength : '4096')\n\n doc = doc || fieldStore(subject, property as any, doc)\n\n let obj = kb.any(subject, property as any, undefined, doc)\n if (!obj) {\n obj = kb.any(form, ns.ui('default'))\n }\n if (obj && obj.value && params.uriPrefix) {\n // eg tel: or mailto:\n field.value = decodeURIComponent(obj.value.replace(params.uriPrefix, '')) // should have no spaces but in case\n .replace(/ /g, '')\n } else if (obj) {\n /* istanbul ignore next */\n field.value = obj.value || obj.value || ''\n }\n field.setAttribute('style', style)\n if (!kb.updater) {\n throw new Error('kb has no updater')\n }\n if (!kb.updater.editable((doc as NamedNode).uri)) {\n field.readOnly = true // was: disabled. readOnly is better\n ;(field as any).style = textInputStyleUneditable + paramStyle\n if (suppressEmptyUneditable && field.value === '') {\n box.style.display = 'none' // clutter\n }\n return box\n }\n\n // read-write:\n field.addEventListener(\n 'keyup',\n function (_e) {\n if (params.pattern) {\n field.setAttribute(\n 'style',\n style +\n (field.value.match(params.pattern)\n ? 'color: green;'\n : 'color: red;')\n )\n }\n },\n true\n )\n field.addEventListener(\n 'change',\n function (_e) {\n // i.e. lose focus with changed data\n if (params.pattern && !field.value.match(params.pattern)) return\n field.disabled = true // See if this stops getting two dates from fumbling e.g the chrome datepicker.\n field.setAttribute('style', style + 'color: gray;') // pending\n const ds = kb.statementsMatching(subject, property as any) // remove any multiple values\n let result\n if (params.namedNode) {\n result = kb.sym(field.value)\n } else if (params.uriPrefix) {\n result = encodeURIComponent(field.value.replace(/ /g, ''))\n result = kb.sym(params.uriPrefix + field.value)\n } else {\n if (params.dt) {\n result = new Literal(\n field.value.trim(),\n undefined,\n ns.xsd(params.dt)\n )\n } else {\n result = new Literal(field.value)\n }\n }\n let is = ds.map(statement => st(statement.subject, statement.predicate, result, statement.why)) // can include >1 doc\n if (is.length === 0) {\n // or none\n is = [st(subject, property as any, result, doc)]\n }\n\n function updateMany (ds, is: { why: { uri: string } }[], callback) {\n const docs: any[] = []\n is.forEach(st => {\n if (!docs.includes(st.why.uri)) docs.push(st.why.uri)\n })\n ds.forEach(st => {\n /* istanbul ignore next */\n if (!docs.includes(st.why.uri)) docs.push(st.why.uri)\n })\n /* istanbul ignore next */\n if (docs.length === 0) {\n throw new Error('updateMany has no docs to patch')\n }\n if (!kb.updater) {\n throw new Error('kb has no updater')\n }\n if (docs.length === 1) {\n return kb.updater.update(ds, is as any, callback)\n }\n // return kb.updater.update(ds, is, callback)\n\n const doc = docs.pop()\n const is1 = is.filter(st => st.why.uri === doc)\n const is2 = is.filter(st => st.why.uri !== doc)\n const ds1 = ds.filter(st => st.why.uri === doc)\n const ds2 = ds.filter(st => st.why.uri !== doc)\n kb.updater.update(ds1, is1 as any, function (uri, ok, body) {\n if (ok) {\n updateMany(ds2, is2, callback)\n } else {\n callback(uri, ok, body)\n }\n })\n }\n\n updateMany(ds, is as any, function (uri, ok, body) {\n // kb.updater.update(ds, is, function (uri, ok, body) {\n if (ok) {\n field.disabled = false\n field.setAttribute('style', style)\n } else {\n box.appendChild(errorMessageBlock(dom, body))\n }\n callbackFunction(ok, body)\n })\n },\n true\n )\n return box\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA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AK;QACtBd,KAAK,CAACxC,YAAY,CAAC,OAAO,EAAEV,KAAK,CAAC;MACpC,CAAC,MAAM;QACLH,GAAG,CAACO,WAAW,CAAC,IAAAY,wBAAiB,EAACrB,GAAG,EAAEgG,IAAI,CAAC,CAAC;MAC/C;MACAlD,gBAAgB,CAACiD,EAAE,EAAEC,IAAI,CAAC;IAC5B,CAAC,CAAC;EACJ,CAAC,EACD,IAAI,CACL;EACD,OAAO9F,GAAG;AACZ"}
1
+ {"version":3,"file":"basic.js","names":["_rdflib","require","_solidLogic","ns","_interopRequireWildcard","_style","_styleConstants","_interopRequireDefault","_utils","_error","_fieldFunction","_fieldParams","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","store","solidLogicSingleton","renderNameValuePair","dom","kb","box","form","label","style","display","flexDirection","lhs","appendChild","createElement","width","styleConstants","formFieldNameBoxWidth","rhs","setAttribute","formFieldNameBoxStyle","createTextNode","any","ui","fieldLabel","errorMessageBlock","property","fieldInQuestion","lab","undefined","anchor","uri","textContent","fieldStore","subject","predicate","def","sts","statementsMatching","length","updater","Error","why","value","editable","sym","basicField","container","already","doc","callbackFunction","formDoc","suppressEmptyUneditable","anyJS","mostSpecificClassURI","params","fieldParams","paramStyle","textInputStyle","field","type","size","textInputSize","maxLength","basicMaxLength","uriPrefix","decodeURIComponent","replace","readOnly","textInputStyleUneditable","addEventListener","_e","pattern","match","disabled","ds","result","namedNode","encodeURIComponent","dt","Literal","trim","xsd","is","map","statement","st","updateMany","callback","docs","forEach","includes","push","update","pop","is1","filter","is2","ds1","ds2","ok","body"],"sources":["../../../src/widgets/forms/basic.ts"],"sourcesContent":["import { BlankNode, Literal, NamedNode, Node, st, Store, Variable } from 'rdflib'\nimport { solidLogicSingleton } from 'solid-logic'\nimport * as ns from '../../ns'\nimport { formFieldNameBoxStyle, textInputStyle, textInputStyleUneditable } from '../../style'\nimport styleConstants from '../../styleConstants'\nimport { label } from '../../utils'\nimport { errorMessageBlock } from '../error'\nimport { mostSpecificClassURI } from './fieldFunction'\nimport { fieldParams } from './fieldParams'\n\nconst store = solidLogicSingleton.store\n\n/* Style and create a name, value pair\n*/\nexport function renderNameValuePair (dom: HTMLDocument, kb: Store, box: HTMLElement, form: NamedNode, label?: string):HTMLElement {\n // const property = kb.any(form, ns.ui('property'))\n box.style.display = 'flex'\n box.style.flexDirection = 'row'\n const lhs = box.appendChild(dom.createElement('div'))\n lhs.style.width = styleConstants.formFieldNameBoxWidth\n const rhs = box.appendChild(dom.createElement('div'))\n\n lhs.setAttribute('class', 'formFieldName')\n lhs.setAttribute('style', formFieldNameBoxStyle)\n rhs.setAttribute('class', 'formFieldValue')\n if (label) {\n lhs.appendChild(dom.createTextNode(label))\n } else if (kb.any(form, ns.ui('property'))) { // Assume more space for error on right\n lhs.appendChild(fieldLabel(dom, kb.any(form, ns.ui('property')) as NamedNode, form))\n } else {\n rhs.appendChild(errorMessageBlock(dom, 'No property or label given for form field: ' + form))\n lhs.appendChild(dom.createTextNode('???'))\n }\n return rhs\n}\n\n/**\n * Create an anchor element with a label as the anchor text.\n *\n * @param dom The DOM\n * @param property href for the anchor element\n * @param fieldInQuestion field to produce a label for\n *\n * @internal exporting this only for unit tests\n */\nexport function fieldLabel (dom: HTMLDocument, property: NamedNode | undefined, fieldInQuestion: Node): HTMLElement | Text {\n let lab = store.any(fieldInQuestion as any, ns.ui('label'))\n if (!lab) lab = label(property, true) // Init capital\n if (property === undefined) {\n return dom.createTextNode('@@Internal error: undefined property')\n }\n const anchor = dom.createElement('a')\n /* istanbul ignore next */\n if (property.uri) anchor.setAttribute('href', property.uri)\n anchor.setAttribute('style', 'color: #3B5998; text-decoration: none;') // Not too blue and no underline\n anchor.textContent = lab as any\n return anchor\n}\n\n/**\n * Returns the document for the first quad that matches\n * the subject and predicate provided, or default if that\n * store is not editable.\n *\n * @param subject Subject about which we want to find an editable RDF document\n * @param predicate Predicate about which we want to find an editable RDF document\n * @param def default RDF document to return if none found\n *\n * @internal exporting this only for unit tests\n */\nexport function fieldStore (subject: NamedNode | BlankNode | Variable, predicate: NamedNode | Variable, def: NamedNode | undefined): NamedNode | undefined {\n const sts = store.statementsMatching(subject, predicate)\n if (sts.length === 0) return def // can used default as no data yet\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n if (\n sts.length > 0 &&\n sts[0].why.value &&\n store.updater.editable(sts[0].why.value, store)\n ) {\n return store.sym(sts[0].why.value)\n }\n return def\n}\n\n/**\n * Render a basic form field\n *\n * The same function is used for many similar one-value fields, with different\n * regexps used to validate.\n *\n * @param dom The HTML Document object aka Document Object Model\n * @param container If present, the created widget will be appended to this\n * @param already A hash table of (form, subject) kept to prevent recursive forms looping\n * @param subject The thing about which the form displays/edits data\n * @param form The form or field to be rendered\n * @param doc The web document in which the data is\n * @param callbackFunction Called when data is changed?\n *\n * @returns The HTML widget created\n */\n// eslint-disable-next-line complexity\nexport function basicField (\n dom: HTMLDocument,\n container: HTMLElement | undefined,\n already,\n subject: NamedNode | BlankNode | Variable,\n form: NamedNode,\n doc: NamedNode | undefined,\n callbackFunction: (_ok: boolean, _errorMessage: string) => void\n): HTMLElement {\n const kb = store\n const formDoc = form.doc ? form.doc() : null // @@ if blank no way to know\n\n const box = dom.createElement('div')\n\n const property = kb.any(form, ns.ui('property'))\n if (container) container.appendChild(box)\n if (!property) {\n return box.appendChild(\n errorMessageBlock(dom, 'Error: No property given for text field: ' + form)\n )\n }\n const rhs = renderNameValuePair(dom, kb, box, form)\n\n // It can be cleaner to just remove empty fields if you can't edit them anyway\n const suppressEmptyUneditable = kb.anyJS(form, ns.ui('suppressEmptyUneditable'), null, formDoc)\n\n const uri = mostSpecificClassURI(form)\n let params = fieldParams[uri]\n if (params === undefined) params = { style: '' } // non-bottom field types can do this\n const paramStyle = params.style || ''\n const style = textInputStyle + paramStyle\n const field = dom.createElement('input')\n ;(field as any).style = style\n rhs.appendChild(field)\n field.setAttribute('type', params.type ? params.type : 'text')\n\n const size = kb.anyJS(form, ns.ui('size')) || styleConstants.textInputSize || 20\n field.setAttribute('size', size)\n\n const maxLength = kb.any(form, ns.ui('maxLength'))\n field.setAttribute('maxLength', maxLength ? '' + maxLength : styleConstants.basicMaxLength)\n\n doc = doc || fieldStore(subject, property as any, doc)\n\n let obj = kb.any(subject, property as any, undefined, doc)\n if (!obj) {\n obj = kb.any(form, ns.ui('default'))\n }\n if (obj && obj.value && params.uriPrefix) {\n // eg tel: or mailto:\n field.value = decodeURIComponent(obj.value.replace(params.uriPrefix, '')) // should have no spaces but in case\n .replace(/ /g, '')\n } else if (obj) {\n /* istanbul ignore next */\n field.value = obj.value || obj.value || ''\n }\n field.setAttribute('style', style)\n if (!kb.updater) {\n throw new Error('kb has no updater')\n }\n if (!kb.updater.editable((doc as NamedNode).uri)) {\n field.readOnly = true // was: disabled. readOnly is better\n ;(field as any).style = textInputStyleUneditable + paramStyle\n if (suppressEmptyUneditable && field.value === '') {\n box.style.display = 'none' // clutter\n }\n return box\n }\n\n // read-write:\n field.addEventListener(\n 'keyup',\n function (_e) {\n if (params.pattern) {\n field.setAttribute(\n 'style',\n style +\n (field.value.match(params.pattern)\n ? 'color: green;'\n : 'color: red;')\n )\n }\n },\n true\n )\n field.addEventListener(\n 'change',\n function (_e) {\n // i.e. lose focus with changed data\n if (params.pattern && !field.value.match(params.pattern)) return\n field.disabled = true // See if this stops getting two dates from fumbling e.g the chrome datepicker.\n field.setAttribute('style', style + 'color: gray;') // pending\n const ds = kb.statementsMatching(subject, property as any) // remove any multiple values\n let result\n if (params.namedNode) {\n result = kb.sym(field.value)\n } else if (params.uriPrefix) {\n result = encodeURIComponent(field.value.replace(/ /g, ''))\n result = kb.sym(params.uriPrefix + field.value)\n } else {\n if (params.dt) {\n result = new Literal(\n field.value.trim(),\n undefined,\n ns.xsd(params.dt)\n )\n } else {\n result = new Literal(field.value)\n }\n }\n let is = ds.map(statement => st(statement.subject, statement.predicate, result, statement.why)) // can include >1 doc\n if (is.length === 0) {\n // or none\n is = [st(subject, property as any, result, doc)]\n }\n\n function updateMany (ds, is: { why: { uri: string } }[], callback) {\n const docs: any[] = []\n is.forEach(st => {\n if (!docs.includes(st.why.uri)) docs.push(st.why.uri)\n })\n ds.forEach(st => {\n /* istanbul ignore next */\n if (!docs.includes(st.why.uri)) docs.push(st.why.uri)\n })\n /* istanbul ignore next */\n if (docs.length === 0) {\n throw new Error('updateMany has no docs to patch')\n }\n if (!kb.updater) {\n throw new Error('kb has no updater')\n }\n if (docs.length === 1) {\n return kb.updater.update(ds, is as any, callback)\n }\n // return kb.updater.update(ds, is, callback)\n\n const doc = docs.pop()\n const is1 = is.filter(st => st.why.uri === doc)\n const is2 = is.filter(st => st.why.uri !== doc)\n const ds1 = ds.filter(st => st.why.uri === doc)\n const ds2 = ds.filter(st => st.why.uri !== doc)\n kb.updater.update(ds1, is1 as any, function (uri, ok, body) {\n if (ok) {\n updateMany(ds2, is2, callback)\n } else {\n callback(uri, ok, body)\n }\n })\n }\n\n updateMany(ds, is as any, function (uri, ok, body) {\n // kb.updater.update(ds, is, function (uri, ok, body) {\n if (ok) {\n field.disabled = false\n field.setAttribute('style', style)\n } else {\n box.appendChild(errorMessageBlock(dom, body))\n }\n callbackFunction(ok, body)\n })\n },\n true\n )\n return box\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAA2C,SAAAW,yBAAAC,WAA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