@catandbox/schrodinger-web-adapter 0.1.20 → 0.1.21

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.
@@ -16,7 +16,7 @@ const FOCUS_STYLE = "this.style.borderColor='var(--p-color-border-focus, #2c6ecb
16
16
  const BLUR_STYLE = "this.style.borderColor='var(--p-color-border, #c9cccf)'; this.style.boxShadow='none'";
17
17
  export function renderNewTicketForm(container, client, categories, emitter) {
18
18
  const categoryOptions = categories
19
- .map((cat) => `<option value="${cat.id}">${escapeHtml(cat.name)}</option>`)
19
+ .map((cat) => `<s-option value="${cat.id}">${escapeHtml(cat.name)}</s-option>`)
20
20
  .join("");
21
21
  const fileUpload = createFileUpload();
22
22
  setInnerHtml(container, `
@@ -41,19 +41,6 @@ export function renderNewTicketForm(container, client, categories, emitter) {
41
41
 
42
42
  <form id="sch-new-ticket-form">
43
43
  <s-stack gap="base">
44
- ${categories.length > 0
45
- ? `
46
- <div>
47
- <label for="sch-category" style="display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--p-color-text, #202223);">Category</label>
48
- <select id="sch-category" style="${FIELD_STYLE}; cursor:pointer;"
49
- onfocus="${FOCUS_STYLE}" onblur="${BLUR_STYLE}">
50
- <option value="">Select a category...</option>
51
- ${categoryOptions}
52
- </select>
53
- </div>
54
- `
55
- : ""}
56
-
57
44
  <div>
58
45
  <label for="sch-title" style="display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--p-color-text, #202223);">Subject</label>
59
46
  <input id="sch-title" type="text" required
@@ -62,6 +49,22 @@ export function renderNewTicketForm(container, client, categories, emitter) {
62
49
  placeholder="Brief summary of your issue" />
63
50
  </div>
64
51
 
52
+ <div style="display:flex; gap:16px;">
53
+ <div style="flex:1; min-width:0;">
54
+ ${fileUpload.render()}
55
+ </div>
56
+ ${categories.length > 0
57
+ ? `
58
+ <div style="flex:1; min-width:0;">
59
+ <s-select id="sch-category" label="Category">
60
+ <s-option value="">Select a category...</s-option>
61
+ ${categoryOptions}
62
+ </s-select>
63
+ </div>
64
+ `
65
+ : ""}
66
+ </div>
67
+
65
68
  <div>
66
69
  <label for="sch-body" style="display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--p-color-text, #202223);">Description</label>
67
70
  ${renderFormattingField({
@@ -73,8 +76,6 @@ export function renderNewTicketForm(container, client, categories, emitter) {
73
76
  })}
74
77
  </div>
75
78
 
76
- ${fileUpload.render()}
77
-
78
79
  <div id="sch-form-error"></div>
79
80
 
80
81
  <div style="display:flex; justify-content:flex-end; gap:8px; padding-top:4px;">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@catandbox/schrodinger-web-adapter",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",