@conduction/nextcloud-vue 0.1.0-beta.17 → 0.1.0-beta.18

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.
@@ -26,6 +26,7 @@ var Vue = require('vue');
26
26
  var ContentSaveOutline = require('vue-material-design-icons/ContentSaveOutline.vue');
27
27
  var AlertCircle = require('vue-material-design-icons/AlertCircle.vue');
28
28
  var Alert = require('vue-material-design-icons/Alert.vue');
29
+ var PencilOutline = require('vue-material-design-icons/PencilOutline.vue');
29
30
  var LockOutline = require('vue-material-design-icons/LockOutline.vue');
30
31
  var Tooltip = require('@nextcloud/vue/dist/Directives/Tooltip.js');
31
32
  var pinia = require('pinia');
@@ -8474,7 +8475,7 @@ var script$R = {
8474
8475
  computed: {
8475
8476
  itemName() {
8476
8477
  if (this.nameFormatter) return this.nameFormatter(this.item)
8477
- return this.item[this.nameField] || this.item.name || this.item.title || this.item.id
8478
+ return this.item[this.nameField] || this.item.name || this.item.naam || this.item.title || this.item.id
8478
8479
  },
8479
8480
  resolvedWarningText() {
8480
8481
  return this.warningText.replace('{name}', this.itemName)
@@ -8635,7 +8636,7 @@ __vue_render__$R._withStripped = true;
8635
8636
  /* style */
8636
8637
  const __vue_inject_styles__$R = undefined;
8637
8638
  /* scoped */
8638
- const __vue_scope_id__$R = "data-v-4fc24979";
8639
+ const __vue_scope_id__$R = "data-v-a85683fa";
8639
8640
  /* module identifier */
8640
8641
  const __vue_module_identifier__$R = undefined;
8641
8642
  /* functional template */
@@ -46990,14 +46991,24 @@ __vue_render__$M._withStripped = true;
46990
46991
  //
46991
46992
  //
46992
46993
  //
46994
+ //
46995
+ //
46996
+ //
46997
+ //
46998
+ //
46999
+ //
47000
+ //
47001
+ //
46993
47002
 
46994
47003
 
46995
47004
  var script$L = {
46996
47005
  name: 'CnPropertiesTab',
46997
47006
 
46998
47007
  components: {
47008
+ NcNoteCard: vue.NcNoteCard,
46999
47009
  AlertCircle,
47000
47010
  Alert,
47011
+ PencilOutline,
47001
47012
  LockOutline,
47002
47013
  Plus,
47003
47014
  CnPropertyValueCell: __vue_component__$M,
@@ -47034,9 +47045,14 @@ var script$L = {
47034
47045
  * Any other CSS color string is applied directly.
47035
47046
  */
47036
47047
  propCellColor: { type: String, default: null },
47048
+ isNew: { type: Boolean, default: false },
47037
47049
  },
47038
47050
 
47039
47051
  computed: {
47052
+ hasUnsavedChanges() {
47053
+ if (this.isNew) return false
47054
+ return Object.keys(this.formData).some(key => this.isValueChanged(key))
47055
+ },
47040
47056
  propCellStyle() {
47041
47057
  if (this.propCellColor === null) return undefined
47042
47058
  if (this.propCellColor === 'none') return { boxShadow: 'none' }
@@ -47123,7 +47139,7 @@ var script$L = {
47123
47139
  return { boxShadow: 'inset 3px 0 0 0 var(--color-error)' }
47124
47140
  }
47125
47141
  if (this.isValueChanged(key)) {
47126
- return { boxShadow: 'inset 3px 0 0 0 var(--color-warning)' }
47142
+ return { boxShadow: 'inset 3px 0 0 0 var(--color-primary-element)' }
47127
47143
  }
47128
47144
  if (state === 'valid') {
47129
47145
  return { boxShadow: 'inset 3px 0 0 0 var(--color-success)' }
@@ -47132,7 +47148,7 @@ var script$L = {
47132
47148
  return { boxShadow: 'inset 3px 0 0 0 var(--color-warning)' }
47133
47149
  }
47134
47150
  if (state === 'new') {
47135
- return { boxShadow: 'inset 3px 0 0 0 var(--color-primary-element)' }
47151
+ return { boxShadow: 'inset 3px 0 0 0 var(--color-new)' }
47136
47152
  }
47137
47153
  return this.propCellStyle
47138
47154
  },
@@ -47413,346 +47429,382 @@ var __vue_render__$L = function () {
47413
47429
  var _c = _vm._self._c || _h;
47414
47430
  return _c(
47415
47431
  "div",
47416
- { staticClass: "cn-advanced-form-dialog__table-container" },
47417
47432
  [
47418
- _c("table", { staticClass: "cn-advanced-form-dialog__table" }, [
47419
- _c("thead", [
47420
- _c("tr", { staticClass: "cn-advanced-form-dialog__table-row" }, [
47421
- _c(
47422
- "th",
47423
- { staticClass: "cn-advanced-form-dialog__table-col-constrained" },
47424
- [
47425
- _vm._v(
47426
- "\n\t\t\t\t\t" +
47427
- _vm._s(_vm.t("nextcloud-vue", "Property")) +
47428
- "\n\t\t\t\t"
47429
- ),
47430
- ]
47431
- ),
47432
- _vm._v(" "),
47433
- _c(
47434
- "th",
47435
- { staticClass: "cn-advanced-form-dialog__table-col-expanded" },
47436
- [
47437
- _vm._v(
47438
- "\n\t\t\t\t\t" +
47439
- _vm._s(_vm.t("nextcloud-vue", "Value")) +
47440
- "\n\t\t\t\t"
47441
- ),
47442
- ]
47443
- ),
47444
- _vm._v(" "),
47445
- _vm.hasRowActionsSlot
47446
- ? _c(
47447
- "th",
47448
- { staticClass: "cn-advanced-form-dialog__table-col-actions" },
47449
- [_vm._t("row-actions-header")],
47450
- 2
47451
- )
47452
- : _vm._e(),
47433
+ _vm.hasUnsavedChanges
47434
+ ? _c(
47435
+ "NcNoteCard",
47436
+ {
47437
+ staticClass: "cn-advanced-form-dialog__unsaved-note",
47438
+ attrs: { type: "warning" },
47439
+ },
47440
+ [
47441
+ _vm._v(
47442
+ "\n\t\t" +
47443
+ _vm._s(
47444
+ _vm.t(
47445
+ "nextcloud-vue",
47446
+ "You have unsaved changes. Save to apply them."
47447
+ )
47448
+ ) +
47449
+ "\n\t"
47450
+ ),
47451
+ ]
47452
+ )
47453
+ : _vm._e(),
47454
+ _vm._v(" "),
47455
+ _c("div", { staticClass: "cn-advanced-form-dialog__table-container" }, [
47456
+ _c("table", { staticClass: "cn-advanced-form-dialog__table" }, [
47457
+ _c("thead", [
47458
+ _c("tr", { staticClass: "cn-advanced-form-dialog__table-row" }, [
47459
+ _c(
47460
+ "th",
47461
+ {
47462
+ staticClass: "cn-advanced-form-dialog__table-col-constrained",
47463
+ },
47464
+ [
47465
+ _vm._v(
47466
+ "\n\t\t\t\t\t\t" +
47467
+ _vm._s(_vm.t("nextcloud-vue", "Property")) +
47468
+ "\n\t\t\t\t\t"
47469
+ ),
47470
+ ]
47471
+ ),
47472
+ _vm._v(" "),
47473
+ _c(
47474
+ "th",
47475
+ { staticClass: "cn-advanced-form-dialog__table-col-expanded" },
47476
+ [
47477
+ _vm._v(
47478
+ "\n\t\t\t\t\t\t" +
47479
+ _vm._s(_vm.t("nextcloud-vue", "Value")) +
47480
+ "\n\t\t\t\t\t"
47481
+ ),
47482
+ ]
47483
+ ),
47484
+ _vm._v(" "),
47485
+ _vm.hasRowActionsSlot
47486
+ ? _c(
47487
+ "th",
47488
+ {
47489
+ staticClass: "cn-advanced-form-dialog__table-col-actions",
47490
+ },
47491
+ [_vm._t("row-actions-header")],
47492
+ 2
47493
+ )
47494
+ : _vm._e(),
47495
+ ]),
47453
47496
  ]),
47454
- ]),
47455
- _vm._v(" "),
47456
- _c(
47457
- "tbody",
47458
- _vm._l(_vm.objectProperties, function (ref) {
47459
- var _obj;
47497
+ _vm._v(" "),
47498
+ _c(
47499
+ "tbody",
47500
+ _vm._l(_vm.objectProperties, function (ref) {
47501
+ var _obj;
47460
47502
 
47461
- var key = ref[0];
47462
- var value = ref[1];
47463
- return _c(
47464
- "tr",
47465
- {
47466
- key: key,
47467
- staticClass: "cn-advanced-form-dialog__table-row",
47468
- class:
47469
- ((_obj = {
47470
- "cn-advanced-form-dialog__table-row--selected":
47471
- _vm.selectedProperty === key,
47472
- "cn-advanced-form-dialog__table-row--edited":
47473
- _vm.isValueChanged(key),
47474
- "cn-advanced-form-dialog__table-row--non-editable":
47475
- !_vm.isPropertyEditable(
47476
- key,
47477
- _vm.resolvedValue(key, value)
47478
- ),
47479
- }),
47480
- (_obj[_vm.getPropertyValidationClass(key, value)] =
47481
- _vm.validationDisplay === "indicator"),
47482
- _obj),
47483
- on: {
47484
- click: function ($event) {
47485
- return _vm.handleRowClick(key, $event)
47486
- },
47487
- },
47488
- },
47489
- [
47490
- _c(
47491
- "td",
47492
- {
47493
- staticClass:
47494
- "cn-advanced-form-dialog__table-col-constrained cn-advanced-form-dialog__prop-cell",
47495
- style: _vm.getPropCellStyle(key, value),
47496
- },
47497
- [
47498
- _c(
47499
- "div",
47500
- {
47501
- staticClass:
47502
- "cn-advanced-form-dialog__prop-cell-content",
47503
- },
47504
- [
47505
- _vm.validationDisplay === "indicator" &&
47506
- _vm.getPropertyValidationState(
47503
+ var key = ref[0];
47504
+ var value = ref[1];
47505
+ return _c(
47506
+ "tr",
47507
+ {
47508
+ key: key,
47509
+ staticClass: "cn-advanced-form-dialog__table-row",
47510
+ class:
47511
+ ((_obj = {
47512
+ "cn-advanced-form-dialog__table-row--selected":
47513
+ _vm.selectedProperty === key,
47514
+ "cn-advanced-form-dialog__table-row--edited":
47515
+ _vm.isValueChanged(key),
47516
+ "cn-advanced-form-dialog__table-row--non-editable":
47517
+ !_vm.isPropertyEditable(
47507
47518
  key,
47508
47519
  _vm.resolvedValue(key, value)
47509
- ) === "invalid"
47510
- ? _c("AlertCircle", {
47511
- staticClass:
47512
- "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--error",
47513
- attrs: {
47514
- size: 16,
47515
- title: _vm.getPropertyErrorMessage(
47516
- key,
47517
- _vm.resolvedValue(key, value)
47518
- ),
47519
- },
47520
- })
47521
- : _vm.validationDisplay === "indicator" &&
47522
- _vm.isValueChanged(key) &&
47523
- _vm.getPropertyValidationState(
47524
- key,
47525
- _vm.resolvedValue(key, value)
47526
- ) !== "invalid"
47527
- ? _c("Alert", {
47528
- staticClass:
47529
- "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--edited",
47530
- attrs: {
47531
- size: 16,
47532
- title: _vm.t(
47533
- "nextcloud-vue",
47534
- "This field has been changed"
47535
- ),
47536
- },
47537
- })
47538
- : _vm.validationDisplay === "indicator" &&
47539
- _vm.getPropertyValidationState(
47540
- key,
47541
- _vm.resolvedValue(key, value)
47542
- ) === "warning"
47543
- ? _c("Alert", {
47544
- staticClass:
47545
- "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--warning",
47546
- attrs: {
47547
- size: 16,
47548
- title: _vm.getPropertyWarningMessage(
47549
- key,
47550
- _vm.resolvedValue(key, value)
47551
- ),
47552
- },
47553
- })
47554
- : _vm.validationDisplay === "indicator" &&
47555
- _vm.getPropertyValidationState(
47556
- key,
47557
- _vm.resolvedValue(key, value)
47558
- ) === "new"
47559
- ? _c("Plus", {
47560
- staticClass:
47561
- "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--new",
47562
- attrs: {
47563
- size: 16,
47564
- title: _vm.getPropertyNewMessage(key),
47565
- },
47566
- })
47567
- : !_vm.isPropertyEditable(
47568
- key,
47569
- _vm.resolvedValue(key, value)
47570
- )
47571
- ? _c("LockOutline", {
47572
- staticClass:
47573
- "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--lock",
47574
- attrs: {
47575
- size: 16,
47576
- title:
47577
- _vm.getEditabilityWarning(
47578
- key,
47579
- _vm.resolvedValue(key, value)
47580
- ) || "",
47581
- },
47582
- })
47583
- : _vm._e(),
47584
- _vm._v(" "),
47585
- _c(
47586
- "span",
47587
- { attrs: { title: _vm.getPropertyTooltip(key) } },
47588
- [_vm._v(_vm._s(_vm.getPropertyDisplayName(key)))]
47589
47520
  ),
47590
- _vm._v(" "),
47591
- _vm.isRequired(key)
47592
- ? _c(
47593
- "span",
47594
- {
47521
+ }),
47522
+ (_obj[_vm.getPropertyValidationClass(key, value)] =
47523
+ _vm.validationDisplay === "indicator"),
47524
+ _obj),
47525
+ on: {
47526
+ click: function ($event) {
47527
+ return _vm.handleRowClick(key, $event)
47528
+ },
47529
+ },
47530
+ },
47531
+ [
47532
+ _c(
47533
+ "td",
47534
+ {
47535
+ staticClass:
47536
+ "cn-advanced-form-dialog__table-col-constrained cn-advanced-form-dialog__prop-cell",
47537
+ style: _vm.getPropCellStyle(key, value),
47538
+ },
47539
+ [
47540
+ _c(
47541
+ "div",
47542
+ {
47543
+ staticClass:
47544
+ "cn-advanced-form-dialog__prop-cell-content",
47545
+ },
47546
+ [
47547
+ _vm.validationDisplay === "indicator" &&
47548
+ _vm.getPropertyValidationState(
47549
+ key,
47550
+ _vm.resolvedValue(key, value)
47551
+ ) === "invalid"
47552
+ ? _c("AlertCircle", {
47595
47553
  staticClass:
47596
- "cn-advanced-form-dialog__required-indicator",
47554
+ "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--error",
47597
47555
  attrs: {
47598
- title: _vm.t("nextcloud-vue", "Required"),
47599
- "aria-label": "required",
47556
+ size: 16,
47557
+ title: _vm.getPropertyErrorMessage(
47558
+ key,
47559
+ _vm.resolvedValue(key, value)
47560
+ ),
47600
47561
  },
47601
- },
47602
- [_vm._v("*")]
47603
- )
47604
- : _vm._e(),
47605
- _vm._v(" "),
47606
- _vm.isImmutableHint(key)
47607
- ? _c(
47608
- "span",
47609
- {
47562
+ })
47563
+ : _vm.validationDisplay === "indicator" &&
47564
+ _vm.isValueChanged(key) &&
47565
+ _vm.getPropertyValidationState(
47566
+ key,
47567
+ _vm.resolvedValue(key, value)
47568
+ ) !== "invalid"
47569
+ ? _c("PencilOutline", {
47570
+ directives: [
47571
+ {
47572
+ name: "tooltip",
47573
+ rawName: "v-tooltip",
47574
+ value: _vm.t(
47575
+ "nextcloud-vue",
47576
+ "This field has been changed — save to apply"
47577
+ ),
47578
+ expression:
47579
+ "t('nextcloud-vue', 'This field has been changed — save to apply')",
47580
+ },
47581
+ ],
47610
47582
  staticClass:
47611
- "cn-advanced-form-dialog__immutable-badge",
47583
+ "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--edited",
47584
+ attrs: { size: 16 },
47585
+ })
47586
+ : _vm.validationDisplay === "indicator" &&
47587
+ _vm.getPropertyValidationState(
47588
+ key,
47589
+ _vm.resolvedValue(key, value)
47590
+ ) === "warning"
47591
+ ? _c("Alert", {
47592
+ staticClass:
47593
+ "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--warning",
47612
47594
  attrs: {
47613
- title: _vm.t(
47614
- "nextcloud-vue",
47615
- "This value can be set on creation but cannot be changed afterwards."
47595
+ size: 16,
47596
+ title: _vm.getPropertyWarningMessage(
47597
+ key,
47598
+ _vm.resolvedValue(key, value)
47616
47599
  ),
47617
47600
  },
47618
- },
47619
- [
47620
- _vm._v(
47621
- "\n\t\t\t\t\t\t\t" +
47622
- _vm._s(_vm.t("nextcloud-vue", "Set once")) +
47623
- "\n\t\t\t\t\t\t"
47624
- ),
47625
- ]
47626
- )
47627
- : _vm._e(),
47628
- ],
47629
- 1
47630
- ),
47631
- ]
47632
- ),
47633
- _vm._v(" "),
47634
- _c(
47635
- "td",
47636
- {
47637
- staticClass:
47638
- "cn-advanced-form-dialog__table-col-expanded cn-advanced-form-dialog__value-cell",
47639
- },
47640
- [
47641
- _vm._t(
47642
- "value-cell",
47643
- function () {
47644
- return [
47645
- _c("CnPropertyValueCell", {
47646
- ref: "cell-" + key,
47647
- refInFor: true,
47648
- attrs: {
47649
- "property-key": key,
47650
- schema: _vm.schema,
47651
- value: _vm.resolvedValue(key, value),
47652
- "is-editable": _vm.isPropertyEditable(
47601
+ })
47602
+ : _vm.validationDisplay === "indicator" &&
47603
+ _vm.getPropertyValidationState(
47653
47604
  key,
47654
47605
  _vm.resolvedValue(key, value)
47655
- ),
47656
- "is-editing": _vm.selectedProperty === key,
47657
- "display-name": _vm.getPropertyDisplayName(key),
47658
- "editability-warning":
47659
- _vm.getPropertyEditabilityWarning(
47606
+ ) === "new"
47607
+ ? _c("Plus", {
47608
+ staticClass:
47609
+ "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--new",
47610
+ attrs: {
47611
+ size: 16,
47612
+ title: _vm.getPropertyNewMessage(key),
47613
+ },
47614
+ })
47615
+ : !_vm.isPropertyEditable(
47616
+ key,
47617
+ _vm.resolvedValue(key, value)
47618
+ )
47619
+ ? _c("LockOutline", {
47620
+ staticClass:
47621
+ "cn-advanced-form-dialog__validation-icon cn-advanced-form-dialog__validation-icon--lock",
47622
+ attrs: {
47623
+ size: 16,
47624
+ title:
47625
+ _vm.getEditabilityWarning(
47626
+ key,
47627
+ _vm.resolvedValue(key, value)
47628
+ ) || "",
47629
+ },
47630
+ })
47631
+ : _vm._e(),
47632
+ _vm._v(" "),
47633
+ _c(
47634
+ "span",
47635
+ { attrs: { title: _vm.getPropertyTooltip(key) } },
47636
+ [_vm._v(_vm._s(_vm.getPropertyDisplayName(key)))]
47637
+ ),
47638
+ _vm._v(" "),
47639
+ _vm.isRequired(key)
47640
+ ? _c(
47641
+ "span",
47642
+ {
47643
+ staticClass:
47644
+ "cn-advanced-form-dialog__required-indicator",
47645
+ attrs: {
47646
+ title: _vm.t("nextcloud-vue", "Required"),
47647
+ "aria-label": "required",
47648
+ },
47649
+ },
47650
+ [_vm._v("*")]
47651
+ )
47652
+ : _vm._e(),
47653
+ _vm._v(" "),
47654
+ _vm.isImmutableHint(key)
47655
+ ? _c(
47656
+ "span",
47657
+ {
47658
+ staticClass:
47659
+ "cn-advanced-form-dialog__immutable-badge",
47660
+ attrs: {
47661
+ title: _vm.t(
47662
+ "nextcloud-vue",
47663
+ "This value can be set on creation but cannot be changed afterwards."
47664
+ ),
47665
+ },
47666
+ },
47667
+ [
47668
+ _vm._v(
47669
+ "\n\t\t\t\t\t\t\t\t" +
47670
+ _vm._s(
47671
+ _vm.t("nextcloud-vue", "Set once")
47672
+ ) +
47673
+ "\n\t\t\t\t\t\t\t"
47674
+ ),
47675
+ ]
47676
+ )
47677
+ : _vm._e(),
47678
+ ],
47679
+ 1
47680
+ ),
47681
+ ]
47682
+ ),
47683
+ _vm._v(" "),
47684
+ _c(
47685
+ "td",
47686
+ {
47687
+ staticClass:
47688
+ "cn-advanced-form-dialog__table-col-expanded cn-advanced-form-dialog__value-cell",
47689
+ },
47690
+ [
47691
+ _vm._t(
47692
+ "value-cell",
47693
+ function () {
47694
+ return [
47695
+ _c("CnPropertyValueCell", {
47696
+ ref: "cell-" + key,
47697
+ refInFor: true,
47698
+ attrs: {
47699
+ "property-key": key,
47700
+ schema: _vm.schema,
47701
+ value: _vm.resolvedValue(key, value),
47702
+ "is-editable": _vm.isPropertyEditable(
47660
47703
  key,
47661
47704
  _vm.resolvedValue(key, value)
47662
47705
  ),
47663
- widget:
47664
- (_vm.propertyOverrides[key] &&
47665
- _vm.propertyOverrides[key].widget) ||
47666
- null,
47667
- "select-options":
47668
- (_vm.propertyOverrides[key] &&
47669
- _vm.propertyOverrides[key].selectOptions) ||
47670
- null,
47671
- "select-multiple": _vm.propertyOverrides[key]
47672
- ? _vm.propertyOverrides[key].selectMultiple !==
47673
- false
47674
- : true,
47675
- "textarea-rows":
47676
- (_vm.propertyOverrides[key] &&
47677
- _vm.propertyOverrides[key].textareaRows) ||
47678
- 4,
47679
- },
47680
- on: {
47681
- "update:value": function ($event) {
47682
- return _vm.onPropertyValueUpdate(key, $event)
47706
+ "is-editing": _vm.selectedProperty === key,
47707
+ "display-name": _vm.getPropertyDisplayName(key),
47708
+ "editability-warning":
47709
+ _vm.getPropertyEditabilityWarning(
47710
+ key,
47711
+ _vm.resolvedValue(key, value)
47712
+ ),
47713
+ widget:
47714
+ (_vm.propertyOverrides[key] &&
47715
+ _vm.propertyOverrides[key].widget) ||
47716
+ null,
47717
+ "select-options":
47718
+ (_vm.propertyOverrides[key] &&
47719
+ _vm.propertyOverrides[key].selectOptions) ||
47720
+ null,
47721
+ "select-multiple": _vm.propertyOverrides[key]
47722
+ ? _vm.propertyOverrides[key]
47723
+ .selectMultiple !== false
47724
+ : true,
47725
+ "textarea-rows":
47726
+ (_vm.propertyOverrides[key] &&
47727
+ _vm.propertyOverrides[key].textareaRows) ||
47728
+ 4,
47683
47729
  },
47684
- },
47685
- }),
47686
- ]
47687
- },
47688
- {
47689
- propertyKey: key,
47690
- value: value,
47691
- resolvedValue: _vm.resolvedValue(key, value),
47692
- isEditing: _vm.selectedProperty === key,
47693
- isEditable: _vm.isPropertyEditable(
47694
- key,
47695
- _vm.resolvedValue(key, value)
47696
- ),
47697
- displayName: _vm.getPropertyDisplayName(key),
47698
- schemaProp:
47699
- _vm.schema &&
47700
- _vm.schema.properties &&
47701
- _vm.schema.properties[key],
47702
- editabilityWarning: _vm.getPropertyEditabilityWarning(
47703
- key,
47704
- _vm.resolvedValue(key, value)
47705
- ),
47706
- onUpdate: function (v) {
47707
- return _vm.onPropertyValueUpdate(key, v)
47708
- },
47709
- }
47710
- ),
47711
- ],
47712
- 2
47713
- ),
47714
- _vm._v(" "),
47715
- _vm.hasRowActionsSlot
47716
- ? _c(
47717
- "td",
47718
- {
47719
- staticClass:
47720
- "cn-advanced-form-dialog__table-col-actions",
47721
- on: {
47722
- click: function ($event) {
47723
- $event.stopPropagation();
47724
- },
47730
+ on: {
47731
+ "update:value": function ($event) {
47732
+ return _vm.onPropertyValueUpdate(key, $event)
47733
+ },
47734
+ },
47735
+ }),
47736
+ ]
47725
47737
  },
47726
- },
47727
- [
47728
- _vm._t("row-actions", null, {
47738
+ {
47729
47739
  propertyKey: key,
47730
47740
  value: value,
47731
47741
  resolvedValue: _vm.resolvedValue(key, value),
47742
+ isEditing: _vm.selectedProperty === key,
47732
47743
  isEditable: _vm.isPropertyEditable(
47733
47744
  key,
47734
47745
  _vm.resolvedValue(key, value)
47735
47746
  ),
47736
- isSchemaProperty: !!(
47747
+ displayName: _vm.getPropertyDisplayName(key),
47748
+ schemaProp:
47737
47749
  _vm.schema &&
47738
47750
  _vm.schema.properties &&
47739
- Object.prototype.hasOwnProperty.call(
47740
- _vm.schema.properties,
47741
- key
47742
- )
47751
+ _vm.schema.properties[key],
47752
+ editabilityWarning: _vm.getPropertyEditabilityWarning(
47753
+ key,
47754
+ _vm.resolvedValue(key, value)
47743
47755
  ),
47744
- }),
47745
- ],
47746
- 2
47747
- )
47748
- : _vm._e(),
47749
- ]
47750
- )
47751
- }),
47752
- 0
47753
- ),
47756
+ onUpdate: function (v) {
47757
+ return _vm.onPropertyValueUpdate(key, v)
47758
+ },
47759
+ }
47760
+ ),
47761
+ ],
47762
+ 2
47763
+ ),
47764
+ _vm._v(" "),
47765
+ _vm.hasRowActionsSlot
47766
+ ? _c(
47767
+ "td",
47768
+ {
47769
+ staticClass:
47770
+ "cn-advanced-form-dialog__table-col-actions",
47771
+ on: {
47772
+ click: function ($event) {
47773
+ $event.stopPropagation();
47774
+ },
47775
+ },
47776
+ },
47777
+ [
47778
+ _vm._t("row-actions", null, {
47779
+ propertyKey: key,
47780
+ value: value,
47781
+ resolvedValue: _vm.resolvedValue(key, value),
47782
+ isEditable: _vm.isPropertyEditable(
47783
+ key,
47784
+ _vm.resolvedValue(key, value)
47785
+ ),
47786
+ isSchemaProperty: !!(
47787
+ _vm.schema &&
47788
+ _vm.schema.properties &&
47789
+ Object.prototype.hasOwnProperty.call(
47790
+ _vm.schema.properties,
47791
+ key
47792
+ )
47793
+ ),
47794
+ }),
47795
+ ],
47796
+ 2
47797
+ )
47798
+ : _vm._e(),
47799
+ ]
47800
+ )
47801
+ }),
47802
+ 0
47803
+ ),
47804
+ ]),
47754
47805
  ]),
47755
- ]
47806
+ ],
47807
+ 1
47756
47808
  )
47757
47809
  };
47758
47810
  var __vue_staticRenderFns__$L = [];
@@ -47761,7 +47813,7 @@ __vue_render__$L._withStripped = true;
47761
47813
  /* style */
47762
47814
  const __vue_inject_styles__$L = undefined;
47763
47815
  /* scoped */
47764
- const __vue_scope_id__$L = "data-v-0e9d750d";
47816
+ const __vue_scope_id__$L = "data-v-7a17ec5c";
47765
47817
  /* module identifier */
47766
47818
  const __vue_module_identifier__$L = undefined;
47767
47819
  /* functional template */
@@ -50997,7 +51049,7 @@ function relationsPlugin(options = {}) {
50997
51049
  * upload (multipart), publish, unpublish, and delete.
50998
51050
  *
50999
51051
  * State: files, filesLoading, filesError, tags, tagsLoading, tagsError
51000
- * Actions: fetchFiles, uploadFiles, publishFile, unpublishFile, deleteFile, clearFiles, fetchTags
51052
+ * Actions: fetchFiles, uploadFiles, publishFile, unpublishFile, deleteFile, batchFiles, clearFiles, fetchTags
51001
51053
  * Getters: getFiles, isFilesLoading, getFilesError, getTags, isTagsLoading, getTagsError
51002
51054
  *
51003
51055
  * @param {object} [options={}] Plugin options
@@ -51233,6 +51285,58 @@ function filesPlugin(options = {}) {
51233
51285
  this.filesLoading = false;
51234
51286
  }
51235
51287
  },
51288
+
51289
+ /**
51290
+ * Apply a batch action across multiple files in ONE request.
51291
+ *
51292
+ * Replaces the N-sequential-call pattern (loop calling
51293
+ * publishFile/unpublishFile/deleteFile per id) with a single POST
51294
+ * to /files/batch. The backend returns 200 when every operation
51295
+ * succeeds, or 207 (multi-status) when some fail; the per-file
51296
+ * outcomes live in `data.results` and the aggregate counts in
51297
+ * `data.summary` (`{ succeeded, failed, total }`).
51298
+ *
51299
+ * @param {string} type The registered object type slug
51300
+ * @param {string} objectId The parent object ID
51301
+ * @param {('publish'|'depublish'|'delete'|'label')} action The batch action to apply
51302
+ * @param {(string|number)[]} fileIds File IDs to act on (max 100, validated server-side)
51303
+ * @param {object} [params={}] Action-specific parameters (e.g. labels for the 'label' action)
51304
+ * @return {Promise<object|null>} Response body `{ results, summary }`, or null on transport error
51305
+ */
51306
+ async batchFiles(type, objectId, action, fileIds, params = {}) {
51307
+ this.filesLoading = true;
51308
+ this.filesError = null;
51309
+
51310
+ try {
51311
+ const url = this._buildUrl(type, objectId) + '/files/batch';
51312
+
51313
+ const response = await fetch(url, {
51314
+ method: 'POST',
51315
+ headers: buildHeaders(),
51316
+ body: JSON.stringify({
51317
+ action,
51318
+ fileIds,
51319
+ ...params,
51320
+ }),
51321
+ });
51322
+
51323
+ // 200 = all succeeded, 207 = partial success — both are
51324
+ // valid responses; the caller inspects data.summary.
51325
+ if (!response.ok && response.status !== 207) {
51326
+ this.filesError = await parseResponseError(response, 'files');
51327
+ return null
51328
+ }
51329
+
51330
+ const data = await response.json();
51331
+ await this.fetchFiles(type, objectId);
51332
+ return data
51333
+ } catch (error) {
51334
+ this.filesError = networkError(error);
51335
+ return null
51336
+ } finally {
51337
+ this.filesLoading = false;
51338
+ }
51339
+ },
51236
51340
  },
51237
51341
  }
51238
51342
  }
@@ -64867,6 +64971,18 @@ __vue_render__$B._withStripped = true;
64867
64971
  //
64868
64972
  //
64869
64973
  //
64974
+ //
64975
+ //
64976
+ //
64977
+ //
64978
+ //
64979
+ //
64980
+ //
64981
+ //
64982
+ //
64983
+ //
64984
+ //
64985
+ //
64870
64986
 
64871
64987
 
64872
64988
  /**
@@ -64926,6 +65042,20 @@ var script$A = {
64926
65042
  type: String,
64927
65043
  default: null,
64928
65044
  },
65045
+ /**
65046
+ * Position of the title-icon slot in the header.
65047
+ * 'left' places it before the title; 'right' places it after the actions.
65048
+ */
65049
+ titleIconPosition: {
65050
+ type: String,
65051
+ default: 'right',
65052
+ validator: (v) => ['left', 'right'].includes(v),
65053
+ },
65054
+ /** CSS color value applied to the title-icon slot container */
65055
+ titleIconColor: {
65056
+ type: String,
65057
+ default: null,
65058
+ },
64929
65059
  /** Footer action buttons: [{ text, link }] */
64930
65060
  buttons: {
64931
65061
  type: Array,
@@ -64991,6 +65121,20 @@ var __vue_render__$A = function () {
64991
65121
  [
64992
65122
  _vm.showTitle
64993
65123
  ? _c("div", { staticClass: "cn-widget-wrapper__header" }, [
65124
+ _vm.$slots["title-icon"] && _vm.titleIconPosition === "left"
65125
+ ? _c(
65126
+ "div",
65127
+ {
65128
+ staticClass: "cn-widget-wrapper__title-icon",
65129
+ style: _vm.titleIconColor
65130
+ ? { color: _vm.titleIconColor }
65131
+ : {},
65132
+ },
65133
+ [_vm._t("title-icon")],
65134
+ 2
65135
+ )
65136
+ : _vm._e(),
65137
+ _vm._v(" "),
64994
65138
  _c("div", { staticClass: "cn-widget-wrapper__header-left" }, [
64995
65139
  _vm.iconUrl
64996
65140
  ? _c("img", {
@@ -65015,6 +65159,20 @@ var __vue_render__$A = function () {
65015
65159
  [_vm._t("actions")],
65016
65160
  2
65017
65161
  ),
65162
+ _vm._v(" "),
65163
+ _vm.$slots["title-icon"] && _vm.titleIconPosition === "right"
65164
+ ? _c(
65165
+ "div",
65166
+ {
65167
+ staticClass: "cn-widget-wrapper__title-icon",
65168
+ style: _vm.titleIconColor
65169
+ ? { color: _vm.titleIconColor }
65170
+ : {},
65171
+ },
65172
+ [_vm._t("title-icon")],
65173
+ 2
65174
+ )
65175
+ : _vm._e(),
65018
65176
  ])
65019
65177
  : _vm._e(),
65020
65178
  _vm._v(" "),
@@ -65056,7 +65214,7 @@ __vue_render__$A._withStripped = true;
65056
65214
  /* style */
65057
65215
  const __vue_inject_styles__$A = undefined;
65058
65216
  /* scoped */
65059
- const __vue_scope_id__$A = "data-v-2653d35b";
65217
+ const __vue_scope_id__$A = "data-v-38c9c90e";
65060
65218
  /* module identifier */
65061
65219
  const __vue_module_identifier__$A = undefined;
65062
65220
  /* functional template */
@@ -65655,6 +65813,12 @@ __vue_render__$y._withStripped = true;
65655
65813
  //
65656
65814
  //
65657
65815
  //
65816
+ //
65817
+ //
65818
+ //
65819
+ //
65820
+ //
65821
+ //
65658
65822
 
65659
65823
 
65660
65824
  /**
@@ -65845,6 +66009,16 @@ var script$x = {
65845
66009
  return def?.buttons || []
65846
66010
  },
65847
66011
 
66012
+ getWidgetTitleIconPosition(item) {
66013
+ const def = this.getWidgetDef(item.widgetId);
66014
+ return def?.titleIconPosition || 'right'
66015
+ },
66016
+
66017
+ getWidgetTitleIconColor(item) {
66018
+ const def = this.getWidgetDef(item.widgetId);
66019
+ return def?.titleIconColor || null
66020
+ },
66021
+
65848
66022
  isTile(item) {
65849
66023
  const def = this.getWidgetDef(item.widgetId);
65850
66024
  return def?.type === 'tile'
@@ -66009,9 +66183,37 @@ var __vue_render__$x = function () {
66009
66183
  flush: item.flush === true,
66010
66184
  buttons: _vm.getWidgetButtons(item),
66011
66185
  "style-config": item.styleConfig || {},
66186
+ "title-icon-position":
66187
+ _vm.getWidgetTitleIconPosition(item),
66188
+ "title-icon-color":
66189
+ _vm.getWidgetTitleIconColor(item),
66012
66190
  },
66013
66191
  scopedSlots: _vm._u(
66014
66192
  [
66193
+ _vm.$slots[
66194
+ "widget-" + item.widgetId + "-title-icon"
66195
+ ]
66196
+ ? {
66197
+ key: "title-icon",
66198
+ fn: function () {
66199
+ return [
66200
+ _vm._t(
66201
+ "widget-" +
66202
+ item.widgetId +
66203
+ "-title-icon",
66204
+ null,
66205
+ {
66206
+ item: item,
66207
+ widget: _vm.getWidgetDef(
66208
+ item.widgetId
66209
+ ),
66210
+ }
66211
+ ),
66212
+ ]
66213
+ },
66214
+ proxy: true,
66215
+ }
66216
+ : null,
66015
66217
  _vm.$slots[
66016
66218
  "widget-" + item.widgetId + "-actions"
66017
66219
  ]
@@ -66042,6 +66244,7 @@ var __vue_render__$x = function () {
66042
66244
  ),
66043
66245
  },
66044
66246
  [
66247
+ _vm._v(" "),
66045
66248
  _vm._v(" "),
66046
66249
  _vm._t("widget-" + item.widgetId, null, {
66047
66250
  item: item,
@@ -66113,7 +66316,7 @@ __vue_render__$x._withStripped = true;
66113
66316
  /* style */
66114
66317
  const __vue_inject_styles__$x = undefined;
66115
66318
  /* scoped */
66116
- const __vue_scope_id__$x = "data-v-5b5cafec";
66319
+ const __vue_scope_id__$x = "data-v-3abb3b3a";
66117
66320
  /* module identifier */
66118
66321
  const __vue_module_identifier__$x = undefined;
66119
66322
  /* functional template */
@@ -104920,6 +105123,7 @@ var translations$1 = {
104920
105123
  "The 'admin' group always has full access (cannot be changed)": "The 'admin' group always has full access (cannot be changed)",
104921
105124
  "The following items will be permanently deleted. Remove any items you want to keep.": "The following items will be permanently deleted. Remove any items you want to keep.",
104922
105125
  "The object owner always has full access": "The object owner always has full access",
105126
+ "This field has been changed — save to apply": "This field has been changed — save to apply",
104923
105127
  Time: "Time",
104924
105128
  Title: "Title",
104925
105129
  "Title *": "Title *",
@@ -104952,6 +105156,7 @@ var translations$1 = {
104952
105156
  "Widget not available": "Widget not available",
104953
105157
  "Write a note...": "Write a note...",
104954
105158
  "Write back": "Write back",
105159
+ "You have unsaved changes. Save to apply them.": "You have unsaved changes. Save to apply them.",
104955
105160
  "{name} (Copy)": "{name} (Copy)",
104956
105161
  "{name} - Copy": "{name} - Copy",
104957
105162
  "{title} saved successfully.": "{title} saved successfully.",
@@ -105333,6 +105538,7 @@ var translations = {
105333
105538
  "The 'admin' group always has full access (cannot be changed)": "De 'admin'-groep heeft altijd volledige toegang (kan niet worden gewijzigd)",
105334
105539
  "The following items will be permanently deleted. Remove any items you want to keep.": "De volgende items worden permanent verwijderd. Haal items die u wilt bewaren uit de selectie.",
105335
105540
  "The object owner always has full access": "De eigenaar van het object heeft altijd volledige toegang",
105541
+ "This field has been changed — save to apply": "Dit veld is gewijzigd — sla op om toe te passen",
105336
105542
  Time: "Tijd",
105337
105543
  Title: "Titel",
105338
105544
  "Title *": "Titel *",
@@ -105365,6 +105571,7 @@ var translations = {
105365
105571
  "Widget not available": "Widget niet beschikbaar",
105366
105572
  "Write a note...": "Schrijf een notitie...",
105367
105573
  "Write back": "Terugschrijven",
105574
+ "You have unsaved changes. Save to apply them.": "U heeft niet-opgeslagen wijzigingen. Sla op om ze toe te passen.",
105368
105575
  "{name} (Copy)": "{name} (Kopie)",
105369
105576
  "{name} - Copy": "{name} - Kopie",
105370
105577
  "{title} saved successfully.": "{title} succesvol opgeslagen.",