jupiter-dynamic-forms 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2215,8 +2215,25 @@ let JupiterAddColumnDialog = class extends LitElement {
2215
2215
  this._instantDate = today;
2216
2216
  this._selectedType = this.periodType === "instant" ? "instant" : "duration";
2217
2217
  this._selectedDimensions.clear();
2218
+ this._autoSelectSingleMemberDimensions();
2218
2219
  this.requestUpdate();
2219
2220
  }
2221
+ _autoSelectSingleMemberDimensions() {
2222
+ this.availableDimensions.forEach((dimension) => {
2223
+ if (dimension.members && dimension.members.length === 1) {
2224
+ const member = dimension.members[0];
2225
+ const selection = {
2226
+ axisId: dimension.id,
2227
+ axisLabel: dimension.axisLabel,
2228
+ memberId: member.id,
2229
+ memberLabel: member.label,
2230
+ isTyped: false
2231
+ };
2232
+ this._selectedDimensions.set(dimension.id, selection);
2233
+ console.log(`🎯 Auto-selected single member: ${dimension.axisLabel} -> ${member.label}`);
2234
+ }
2235
+ });
2236
+ }
2220
2237
  render() {
2221
2238
  if (!this.open)
2222
2239
  return html``;
@@ -2225,9 +2242,7 @@ let JupiterAddColumnDialog = class extends LitElement {
2225
2242
  <div class="dialog" @click="${(e2) => e2.stopPropagation()}">
2226
2243
  <div class="dialog-header">
2227
2244
  <h2 class="dialog-title">Add Column</h2>
2228
- <p class="dialog-description">
2229
- ${this.periodType === "instant" ? "Add a new instant period column by specifying the date." : this.periodType === "duration" ? "Add a new duration period column by specifying the start and end dates." : "This section contains both instant and duration concepts. Choose the type of column to add."}
2230
- </p>
2245
+
2231
2246
  </div>
2232
2247
 
2233
2248
  <div class="dialog-content">
@@ -2258,25 +2273,27 @@ let JupiterAddColumnDialog = class extends LitElement {
2258
2273
  />
2259
2274
  </div>
2260
2275
  ` : html`
2261
- <div class="form-group">
2262
- <label class="form-label required">Start Period Date</label>
2263
- <input
2264
- type="date"
2265
- class="form-input"
2266
- .value="${this._startDate}"
2267
- @change="${this._handleStartDateChange}"
2268
- required
2269
- />
2270
- </div>
2271
- <div class="form-group">
2272
- <label class="form-label required">End Period Date</label>
2273
- <input
2274
- type="date"
2275
- class="form-input"
2276
- .value="${this._endDate}"
2277
- @change="${this._handleEndDateChange}"
2278
- required
2279
- />
2276
+ <div class="form-group date-row">
2277
+ <div class="date-field">
2278
+ <label class="form-label required">Start Period Date</label>
2279
+ <input
2280
+ type="date"
2281
+ class="form-input"
2282
+ .value="${this._startDate}"
2283
+ @change="${this._handleStartDateChange}"
2284
+ required
2285
+ />
2286
+ </div>
2287
+ <div class="date-field">
2288
+ <label class="form-label required">End Period Date</label>
2289
+ <input
2290
+ type="date"
2291
+ class="form-input"
2292
+ .value="${this._endDate}"
2293
+ @change="${this._handleEndDateChange}"
2294
+ required
2295
+ />
2296
+ </div>
2280
2297
  </div>
2281
2298
  `}
2282
2299
 
@@ -2398,9 +2415,12 @@ JupiterAddColumnDialog.styles = css`
2398
2415
  padding: 24px;
2399
2416
  min-width: 400px;
2400
2417
  max-width: 500px;
2418
+ max-height: 90vh;
2401
2419
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
2402
2420
  transform: scale(0.9);
2403
2421
  transition: transform 0.3s ease;
2422
+ display: flex;
2423
+ flex-direction: column;
2404
2424
  }
2405
2425
 
2406
2426
  :host([open]) .dialog {
@@ -2409,6 +2429,7 @@ JupiterAddColumnDialog.styles = css`
2409
2429
 
2410
2430
  .dialog-header {
2411
2431
  margin-bottom: 20px;
2432
+ flex-shrink: 0;
2412
2433
  }
2413
2434
 
2414
2435
  .dialog-title {
@@ -2426,12 +2447,24 @@ JupiterAddColumnDialog.styles = css`
2426
2447
 
2427
2448
  .dialog-content {
2428
2449
  margin-bottom: 24px;
2450
+ flex: 1;
2451
+ overflow-y: auto;
2452
+ max-height: calc(90vh - 160px);
2429
2453
  }
2430
2454
 
2431
2455
  .form-group {
2432
2456
  margin-bottom: 16px;
2433
2457
  }
2434
2458
 
2459
+ .form-group.date-row {
2460
+ display: flex;
2461
+ gap: 12px;
2462
+ }
2463
+
2464
+ .form-group.date-row .date-field {
2465
+ flex: 1;
2466
+ }
2467
+
2435
2468
  .form-label {
2436
2469
  display: block;
2437
2470
  font-weight: 500;
@@ -2471,6 +2504,10 @@ JupiterAddColumnDialog.styles = css`
2471
2504
  display: flex;
2472
2505
  gap: 12px;
2473
2506
  justify-content: flex-end;
2507
+ flex-shrink: 0;
2508
+ border-top: 1px solid var(--jupiter-border-color, #ddd);
2509
+ padding-top: 16px;
2510
+ margin-top: 16px;
2474
2511
  }
2475
2512
 
2476
2513
  .btn {