@conduction/nextcloud-vue 2.184.0 → 2.185.0

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.
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/nextcloud-vue.cjs.js.map
3
- size: 53764950 bytes
4
- sha256: 9d79106eadd9b97d063d110f8fc759b7f4cd4087d863cd49b781631cf890a89d
3
+ size: 53769567 bytes
4
+ sha256: 7cc4d77eeb0511f533d272f1c0cd03a9f43c59cb67e7625476b8123e75073254
@@ -50186,16 +50186,16 @@ a.cn-record-list__inline-title[data-v-9993ac28] {
50186
50186
  }
50187
50187
 
50188
50188
 
50189
- .cn-add-widget-modal__type[data-v-031e75b9] {
50189
+ .cn-add-widget-modal__type[data-v-057fc07c] {
50190
50190
  display: flex;
50191
50191
  flex-direction: column;
50192
50192
  gap: 6px;
50193
50193
  }
50194
- .cn-add-widget-modal__type-label[data-v-031e75b9] {
50194
+ .cn-add-widget-modal__type-label[data-v-057fc07c] {
50195
50195
  font-size: 14px;
50196
50196
  font-weight: 500;
50197
50197
  }
50198
- .cn-add-widget-modal__type-select[data-v-031e75b9] {
50198
+ .cn-add-widget-modal__type-select[data-v-057fc07c] {
50199
50199
  padding: 8px 12px;
50200
50200
  border: 1px solid var(--color-border);
50201
50201
  border-radius: var(--border-radius);
@@ -50203,7 +50203,7 @@ a.cn-record-list__inline-title[data-v-9993ac28] {
50203
50203
  color: var(--color-main-text);
50204
50204
  font-size: 14px;
50205
50205
  }
50206
- .cn-add-widget-modal__form[data-v-031e75b9] {
50206
+ .cn-add-widget-modal__form[data-v-057fc07c] {
50207
50207
  overflow-y: auto;
50208
50208
  /* Prefer a roomy ~340px for the type-specific fields (data-driven widgets
50209
50209
  carry tall forms — columns, thresholds, data source); still shrinks with
@@ -50211,37 +50211,43 @@ a.cn-record-list__inline-title[data-v-9993ac28] {
50211
50211
  flex: 1 1 340px;
50212
50212
  min-height: 0;
50213
50213
  }
50214
- .cn-add-widget-modal__empty[data-v-031e75b9] {
50214
+ .cn-add-widget-modal__empty[data-v-057fc07c] {
50215
50215
  padding: 16px;
50216
50216
  text-align: center;
50217
50217
  color: var(--color-text-maxcontrast);
50218
50218
  }
50219
- .cn-add-widget-modal__chrome[data-v-031e75b9] {
50219
+ .cn-add-widget-modal__chrome[data-v-057fc07c] {
50220
50220
  display: flex;
50221
50221
  flex-direction: column;
50222
50222
  gap: 10px;
50223
50223
  border-top: 1px solid var(--color-border);
50224
50224
  padding-top: 12px;
50225
50225
  }
50226
- .cn-add-widget-modal__chrome-title[data-v-031e75b9] {
50226
+ .cn-add-widget-modal__chrome-title[data-v-057fc07c] {
50227
50227
  margin: 0;
50228
50228
  font-size: 15px;
50229
50229
  font-weight: 600;
50230
50230
  color: var(--color-text-maxcontrast);
50231
50231
  }
50232
- .cn-add-widget-modal__chrome-row[data-v-031e75b9] {
50232
+ .cn-add-widget-modal__chrome-row[data-v-057fc07c] {
50233
50233
  display: flex;
50234
50234
  align-items: center;
50235
50235
  gap: 12px;
50236
50236
  }
50237
- .cn-add-widget-modal__chrome-label[data-v-031e75b9] {
50237
+ .cn-add-widget-modal__chrome-label[data-v-057fc07c] {
50238
50238
  min-width: 96px;
50239
50239
  font-size: 14px;
50240
50240
  }
50241
- .cn-add-widget-modal__chrome-value[data-v-031e75b9] {
50241
+ .cn-add-widget-modal__chrome-value[data-v-057fc07c] {
50242
50242
  font-size: 13px;
50243
50243
  color: var(--color-text-maxcontrast);
50244
50244
  }
50245
+ .cn-add-widget-modal__notices[data-v-057fc07c] {
50246
+ display: flex;
50247
+ flex-direction: column;
50248
+ gap: 4px;
50249
+ margin-block-end: 12px;
50250
+ }
50245
50251
 
50246
50252
 
50247
50253
  .cn-edit-actions__surface[data-v-3daf62c0] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/nextcloud-vue",
3
- "version": "2.184.0",
3
+ "version": "2.185.0",
4
4
  "description": "Shared Vue component library for Conduction Nextcloud apps — complements @nextcloud/vue with higher-level components, OpenRegister integration, and NL Design System support",
5
5
  "homepage": "https://github.com/ConductionNL/nextcloud-vue#readme",
6
6
  "bugs": {
@@ -31,6 +31,22 @@
31
31
  </select>
32
32
  </div>
33
33
 
34
+ <!-- Notices about the widget being edited, from the host: a finding
35
+ the host made about its configuration (non-fatal), above the form. -->
36
+ <div
37
+ v-if="notices.length > 0 || $slots.notices"
38
+ class="cn-add-widget-modal__notices"
39
+ data-testid="cn-add-widget-modal-notices">
40
+ <!-- @slot Extra notices above the form; replaces nothing, follows the `notices` prop. -->
41
+ <NcNoteCard
42
+ v-for="(notice, index) in notices"
43
+ :key="notice.id || index"
44
+ :type="noticeType(notice)"
45
+ :text="notice.text"
46
+ data-testid="cn-add-widget-modal-notice" />
47
+ <slot name="notices" />
48
+ </div>
49
+
34
50
  <!-- Active per-type sub-form. Driven by `<component :is>` from the
35
51
  shared registry; sub-forms expose `validate()` and either an
36
52
  `assembledContent` getter or `@update:content` events. -->
@@ -111,7 +127,7 @@
111
127
 
112
128
  <script>
113
129
  import { translate as t } from '@nextcloud/l10n'
114
- import { NcButton, NcCheckboxRadioSwitch, NcDialog, NcTextField } from '@nextcloud/vue'
130
+ import { NcButton, NcCheckboxRadioSwitch, NcDialog, NcNoteCard, NcTextField } from '@nextcloud/vue'
115
131
  import { computed, provide } from 'vue'
116
132
  import CnColorPicker from '../components/CnColorPicker/CnColorPicker.vue'
117
133
  import CnIconBrowser from '../components/CnIconBrowser/CnIconBrowser.vue'
@@ -143,6 +159,7 @@ export default {
143
159
  NcButton,
144
160
  NcTextField,
145
161
  NcCheckboxRadioSwitch,
162
+ NcNoteCard,
146
163
  CnIconBrowser,
147
164
  CnColorPicker,
148
165
  },
@@ -221,6 +238,20 @@ export default {
221
238
  default: null,
222
239
  },
223
240
 
241
+ /**
242
+ * Non-fatal notices about the widget, shown above its form: what the
243
+ * host found about its configuration, e.g. a filter dimension the
244
+ * dashboard does not publish. Each is `{ text, type?, id? }`, `type`
245
+ * one of `warning` (default), `info`, `error`, `success`.
246
+ *
247
+ * @type {Array<{text: string, type?: string, id?: string}>}
248
+ * @spec openspec/changes/add-widget-modal-notices/specs/add-widget-modal-notices/spec.md#requirement-the-widget-dialog-can-show-the-hosts-notices
249
+ */
250
+ notices: {
251
+ type: Array,
252
+ default: () => [],
253
+ },
254
+
224
255
  /**
225
256
  * The surface the picker offers types for. `'detail-page'` surfaces
226
257
  * detail-only types (e.g. a second `data` widget) alongside the universal
@@ -535,6 +566,17 @@ export default {
535
566
  },
536
567
 
537
568
  methods: {
569
+ /**
570
+ * The note card type of a notice: its own when known, else `warning`.
571
+ *
572
+ * @param {{type?: string}} notice The notice.
573
+ * @return {string}
574
+ * @spec openspec/changes/add-widget-modal-notices/specs/add-widget-modal-notices/spec.md#requirement-the-widget-dialog-can-show-the-hosts-notices
575
+ */
576
+ noticeType(notice) {
577
+ return ['warning', 'info', 'error', 'success'].includes(notice && notice.type) ? notice.type : 'warning'
578
+ },
579
+
538
580
  t,
539
581
 
540
582
  /**
@@ -815,4 +857,11 @@ export default {
815
857
  font-size: 13px;
816
858
  color: var(--color-text-maxcontrast);
817
859
  }
860
+
861
+ .cn-add-widget-modal__notices {
862
+ display: flex;
863
+ flex-direction: column;
864
+ gap: 4px;
865
+ margin-block-end: 12px;
866
+ }
818
867
  </style>