@cortezaproject/corteza-vue 2024.9.3-dev.1 → 2024.9.3-dev.3
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/components/notifications/types/index.d.ts +3 -3
- package/dist/index.es.js +100 -70
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +100 -70
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7778,6 +7778,15 @@ var __vue_staticRenderFns__$14 = [];
|
|
|
7778
7778
|
//
|
|
7779
7779
|
//
|
|
7780
7780
|
//
|
|
7781
|
+
//
|
|
7782
|
+
//
|
|
7783
|
+
//
|
|
7784
|
+
//
|
|
7785
|
+
//
|
|
7786
|
+
//
|
|
7787
|
+
//
|
|
7788
|
+
//
|
|
7789
|
+
//
|
|
7781
7790
|
|
|
7782
7791
|
var script$17 = {
|
|
7783
7792
|
name: 'CFormTableWrapper',
|
|
@@ -7807,6 +7816,11 @@ var script$17 = {
|
|
|
7807
7816
|
type: String,
|
|
7808
7817
|
default: '',
|
|
7809
7818
|
},
|
|
7819
|
+
|
|
7820
|
+
loading: {
|
|
7821
|
+
type: Boolean,
|
|
7822
|
+
default: false,
|
|
7823
|
+
},
|
|
7810
7824
|
},
|
|
7811
7825
|
};
|
|
7812
7826
|
|
|
@@ -7814,17 +7828,17 @@ var script$17 = {
|
|
|
7814
7828
|
const __vue_script__$17 = script$17;
|
|
7815
7829
|
|
|
7816
7830
|
/* template */
|
|
7817
|
-
var __vue_render__$13 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"list-background w-100 p-3 rounded border border-light"},[_vm._t("default"),_vm._v(" "),(!_vm.hideAddButton)?_c('b-button',{class:_vm.addButtonClass,attrs:{"variant":"primary","size":"sm","data-test-id":_vm.testID,"disabled":_vm.disableAddButton},on:{"click":function($event){return _vm.$emit('add-item')}}},[_c('font-awesome-icon',{staticClass:"mr-1",attrs:{"icon":['fas', 'plus']}}),_vm._v("\n\n "+_vm._s(_vm.labels.addButton || '')+"\n ")],1):_vm._e()],2)};
|
|
7831
|
+
var __vue_render__$13 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"list-background w-100 p-3 rounded border border-light"},[(_vm.loading)?_c('div',{staticClass:"d-flex justify-content-center align-items-center w-100"},[_c('b-spinner')],1):_vm._t("default"),_vm._v(" "),(!_vm.hideAddButton && !_vm.loading)?_c('b-button',{class:_vm.addButtonClass,attrs:{"variant":"primary","size":"sm","data-test-id":_vm.testID,"disabled":_vm.disableAddButton},on:{"click":function($event){return _vm.$emit('add-item')}}},[_c('font-awesome-icon',{staticClass:"mr-1",attrs:{"icon":['fas', 'plus']}}),_vm._v("\n\n "+_vm._s(_vm.labels.addButton || '')+"\n ")],1):_vm._e()],2)};
|
|
7818
7832
|
var __vue_staticRenderFns__$13 = [];
|
|
7819
7833
|
|
|
7820
7834
|
/* style */
|
|
7821
7835
|
const __vue_inject_styles__$18 = function (inject) {
|
|
7822
7836
|
if (!inject) return
|
|
7823
|
-
inject("data-v-
|
|
7837
|
+
inject("data-v-7ae53668_0", { source: ".list-background[data-v-7ae53668]{background-color:var(--body-bg)}", map: undefined, media: undefined });
|
|
7824
7838
|
|
|
7825
7839
|
};
|
|
7826
7840
|
/* scoped */
|
|
7827
|
-
const __vue_scope_id__$18 = "data-v-
|
|
7841
|
+
const __vue_scope_id__$18 = "data-v-7ae53668";
|
|
7828
7842
|
/* module identifier */
|
|
7829
7843
|
const __vue_module_identifier__$18 = undefined;
|
|
7830
7844
|
/* functional template */
|
|
@@ -8066,7 +8080,7 @@ var script$16 = {
|
|
|
8066
8080
|
const __vue_script__$16 = script$16;
|
|
8067
8081
|
|
|
8068
8082
|
/* template */
|
|
8069
|
-
var __vue_render__$12 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('c-form-table-wrapper',{attrs:{"labels":{ addButton: _vm.labels.addButton },"hide-add-button":_vm.textInput},on:{"add-item":function($event){return _vm.items.push({ field: undefined, descending: false })}}},[(!_vm.textInput)?_c('b-form-group',{attrs:{"label":_vm.labels.title,"label-class":"text-primary"}},[_c('b-table-simple',{staticClass:"mb-0",attrs:{"borderless":"","small":"","responsive":"
|
|
8083
|
+
var __vue_render__$12 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('c-form-table-wrapper',{attrs:{"labels":{ addButton: _vm.labels.addButton },"hide-add-button":_vm.textInput},on:{"add-item":function($event){return _vm.items.push({ field: undefined, descending: false })}}},[(!_vm.textInput)?_c('b-form-group',{attrs:{"label":_vm.labels.title,"label-class":"text-primary"}},[_c('b-table-simple',{staticClass:"mb-0",attrs:{"borderless":"","small":"","responsive":""}},[_c('draggable',{attrs:{"list":_vm.items,"group":"sort","handle":".grab","tag":"tbody"},on:{"update:list":function($event){_vm.items=$event;}}},_vm._l((_vm.items),function(column,index){return _c('tr',{key:index},[_c('td',{staticClass:"grab text-center align-middle",staticStyle:{"width":"40px"}},[_c('font-awesome-icon',{staticClass:"text-secondary",attrs:{"icon":['fas', 'bars']}})],1),_vm._v(" "),_c('td',{staticClass:"align-middle",staticStyle:{"min-width":"250px"}},[_c('c-input-select',{staticClass:"rounded",attrs:{"options":_vm.availableFields,"reduce":function (o) { return o.name; },"placeholder":_vm.labels.none},model:{value:(column.field),callback:function ($$v) {_vm.$set(column, "field", $$v);},expression:"column.field"}})],1),_vm._v(" "),_c('td',{staticClass:"text-center align-middle",staticStyle:{"min-width":"200px"}},[_c('b-form-radio-group',{staticClass:"bg-white",attrs:{"options":_vm.sortDirections,"buttons":"","button-variant":"outline-primary"},model:{value:(column.descending),callback:function ($$v) {_vm.$set(column, "descending", $$v);},expression:"column.descending"}})],1),_vm._v(" "),_c('td',{staticClass:"align-middle text-right",staticStyle:{"min-width":"80px","width":"80px"}},[_c('c-input-confirm',{attrs:{"show-icon":""},on:{"confirmed":function($event){return _vm.items.splice(index, 1)}}})],1)])}),0)],1)],1):_c('div',[_c('b-form-textarea',{attrs:{"placeholder":_vm.labels.placeholder},model:{value:(_vm.presortValue),callback:function ($$v) {_vm.presortValue=$$v;},expression:"presortValue"}}),_vm._v(" "),_c('b-form-text',[_vm._v("\n "+_vm._s(_vm.labels.footnote)+"\n ")])],1),_vm._v(" "),(_vm.allowTextInput)?_c('div',{staticClass:"d-flex align-items-center mt-1"},[_c('b-button',{staticClass:"text-decoration-none ml-auto",attrs:{"variant":"link","size":"sm"},on:{"click":function($event){_vm.textInput = !_vm.textInput;}}},[_vm._v("\n "+_vm._s(_vm.labels.toggleInput)+"\n ")])],1):_vm._e()],1)};
|
|
8070
8084
|
var __vue_staticRenderFns__$12 = [];
|
|
8071
8085
|
|
|
8072
8086
|
/* style */
|
|
@@ -12358,11 +12372,6 @@ var node = {
|
|
|
12358
12372
|
//
|
|
12359
12373
|
//
|
|
12360
12374
|
//
|
|
12361
|
-
//
|
|
12362
|
-
//
|
|
12363
|
-
//
|
|
12364
|
-
//
|
|
12365
|
-
//
|
|
12366
12375
|
|
|
12367
12376
|
|
|
12368
12377
|
/**
|
|
@@ -12370,6 +12379,7 @@ var node = {
|
|
|
12370
12379
|
*/
|
|
12371
12380
|
var script$_ = {
|
|
12372
12381
|
name: 'TNattrAlignment',
|
|
12382
|
+
|
|
12373
12383
|
extends: __vue_component__$11,
|
|
12374
12384
|
|
|
12375
12385
|
props: {
|
|
@@ -12427,7 +12437,7 @@ var script$_ = {
|
|
|
12427
12437
|
const __vue_script__$_ = script$_;
|
|
12428
12438
|
|
|
12429
12439
|
/* template */
|
|
12430
|
-
var __vue_render__$Y = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-dropdown',{attrs:{"menu-class":"text-center","variant":"link","boundary":"window"},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('span',{staticClass:"text-dark font-weight-bold"},[_c('span',{class:_vm.rootActiveClasses()},[(_vm.format.icon)?_c('font-awesome-icon',{attrs:{"icon":_vm.format.icon}}):_c('span',[_vm._v("\n "+_vm._s(_vm.format.label)+"\n ")])],1)])]},proxy:true}])},[_vm._v(" "),_vm._l((_vm.format.variants),function(v){return _c('b-dropdown-item-button',{key:v.variant,on:{"click":function($event){return _vm.dispatchTransaction(v)}}},[_c('
|
|
12440
|
+
var __vue_render__$Y = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-dropdown',{attrs:{"menu-class":"text-center","variant":"link","boundary":"window"},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('span',{staticClass:"text-dark font-weight-bold"},[_c('span',{class:_vm.rootActiveClasses()},[(_vm.format.icon)?_c('font-awesome-icon',{attrs:{"icon":_vm.format.icon}}):_c('span',[_vm._v("\n "+_vm._s(_vm.format.label)+"\n ")])],1)])]},proxy:true}])},[_vm._v(" "),_vm._l((_vm.format.variants),function(v){return _c('b-dropdown-item-button',{key:v.variant,on:{"click":function($event){return _vm.dispatchTransaction(v)}}},[_c('span',{class:_vm.activeClasses(v.attrs)},[(_vm.format.icon)?_c('font-awesome-icon',{attrs:{"icon":v.icon}}):_c('span',[_vm._v("\n "+_vm._s(v.label)+"\n ")])],1)])})],2)};
|
|
12431
12441
|
var __vue_staticRenderFns__$Y = [];
|
|
12432
12442
|
|
|
12433
12443
|
/* style */
|
|
@@ -12514,6 +12524,7 @@ var script$Z = {
|
|
|
12514
12524
|
const b = (this.isActive[type]);
|
|
12515
12525
|
return b && (b(attrs))
|
|
12516
12526
|
};
|
|
12527
|
+
|
|
12517
12528
|
if (ac(an.node.type.name, { ...an.node.attrs, ...attrs })) {
|
|
12518
12529
|
return ['text-success']
|
|
12519
12530
|
}
|
|
@@ -16764,6 +16775,12 @@ var __vue_staticRenderFns__$y = [];
|
|
|
16764
16775
|
//
|
|
16765
16776
|
//
|
|
16766
16777
|
//
|
|
16778
|
+
//
|
|
16779
|
+
//
|
|
16780
|
+
//
|
|
16781
|
+
//
|
|
16782
|
+
//
|
|
16783
|
+
//
|
|
16767
16784
|
|
|
16768
16785
|
|
|
16769
16786
|
fontawesomeSvgCore.library.add(freeSolidSvgIcons.faMoon, freeSolidSvgIcons.faSun);
|
|
@@ -16909,12 +16926,12 @@ var __vue_staticRenderFns__$x = [];
|
|
|
16909
16926
|
/* style */
|
|
16910
16927
|
const __vue_inject_styles__$z = function (inject) {
|
|
16911
16928
|
if (!inject) return
|
|
16912
|
-
inject("data-v-
|
|
16913
|
-
,inject("data-v-
|
|
16929
|
+
inject("data-v-2aa7b5d6_0", { source: ".nav-icon[data-v-2aa7b5d6]{width:calc(var(--topbar-height) - 24px);height:calc(var(--topbar-height) - 24px)}.nav-user-icon[data-v-2aa7b5d6]{min-width:calc(var(--topbar-height) - 16px);min-height:calc(var(--topbar-height) - 16px)}.header-navigation[data-v-2aa7b5d6]{width:100vw;min-height:var(--topbar-height);background-color:var(--topbar-bg)}.header-navigation .sidebar-spacer[data-v-2aa7b5d6]{display:none;min-width:calc(var(--sidebar-width) - 60px)}.header-navigation .sidebar-spacer.expanded[data-v-2aa7b5d6]{display:block}.avatar[data-v-2aa7b5d6]{border-radius:50%;background-size:cover;background-repeat:no-repeat;background-position:center}.avatar[data-v-2aa7b5d6]:hover{opacity:.8;transition:opacity .25s ease-in-out;-moz-transition:opacity .25s ease-in-out;-webkit-transition:opacity .25s ease-in-out}.title[data-v-2aa7b5d6]{display:flex;align-items:center;min-height:calc(var(--topbar-height) - 16px);padding-left:47px}.title .vue-portal-target[data-v-2aa7b5d6]{display:-webkit-box;display:-ms-flexbox;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;text-overflow:ellipsis}.tools-wrapper[data-v-2aa7b5d6]{flex-grow:1}.tools-wrapper .vue-portal-target[data-v-2aa7b5d6]{display:flex;justify-content:end;align-items:center;flex-wrap:wrap}", map: undefined, media: undefined })
|
|
16930
|
+
,inject("data-v-2aa7b5d6_1", { source: ".topbar-dropdown-menu{z-index:1100}#theme-dropleft .btn{font-family:var(--font-regular)}", map: undefined, media: undefined });
|
|
16914
16931
|
|
|
16915
16932
|
};
|
|
16916
16933
|
/* scoped */
|
|
16917
|
-
const __vue_scope_id__$z = "data-v-
|
|
16934
|
+
const __vue_scope_id__$z = "data-v-2aa7b5d6";
|
|
16918
16935
|
/* module identifier */
|
|
16919
16936
|
const __vue_module_identifier__$z = undefined;
|
|
16920
16937
|
/* functional template */
|
|
@@ -20987,7 +21004,7 @@ var __vue_staticRenderFns__$a = [];
|
|
|
20987
21004
|
/* style */
|
|
20988
21005
|
const __vue_inject_styles__$a = undefined;
|
|
20989
21006
|
/* scoped */
|
|
20990
|
-
const __vue_scope_id__$a = "data-v-
|
|
21007
|
+
const __vue_scope_id__$a = "data-v-92f5374e";
|
|
20991
21008
|
/* module identifier */
|
|
20992
21009
|
const __vue_module_identifier__$a = undefined;
|
|
20993
21010
|
/* functional template */
|
|
@@ -21063,71 +21080,84 @@ var script$9 = {
|
|
|
21063
21080
|
async handleRecordNavigation () {
|
|
21064
21081
|
const { namespaceID, recordID, moduleID, openMode, edit } = this.notification.config;
|
|
21065
21082
|
|
|
21066
|
-
|
|
21083
|
+
try {
|
|
21084
|
+
const namespace = await this.$ComposeAPI.namespaceRead({ namespaceID });
|
|
21067
21085
|
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
|
|
21086
|
+
if (!namespace) {
|
|
21087
|
+
this.toastDanger(this.$t('namespaceNotFound'));
|
|
21088
|
+
return
|
|
21089
|
+
}
|
|
21071
21090
|
|
|
21072
|
-
|
|
21091
|
+
const slug = namespace.slug || namespace.namespaceID;
|
|
21073
21092
|
|
|
21074
|
-
|
|
21093
|
+
const recordPages = await this.$ComposeAPI.pageList({ moduleID, namespaceID }).then(({ set = [] }) => set);
|
|
21075
21094
|
|
|
21076
|
-
|
|
21077
|
-
|
|
21078
|
-
|
|
21079
|
-
|
|
21080
|
-
const { pageID } = recordPages[0];
|
|
21095
|
+
if (!recordPages || recordPages.length === 0) {
|
|
21096
|
+
this.toastDanger(this.$t('pageNotFound'));
|
|
21097
|
+
return
|
|
21098
|
+
}
|
|
21081
21099
|
|
|
21082
|
-
|
|
21083
|
-
const u = new URL(window.location);
|
|
21084
|
-
const url = `${u.origin}/compose/ns/${slug}/pages/${pageID}/record/${recordID}/${edit ? 'edit' : ''}`;
|
|
21100
|
+
const record = await this.$ComposeAPI.recordRead({ recordID, moduleID, namespaceID });
|
|
21085
21101
|
|
|
21086
|
-
if (
|
|
21087
|
-
|
|
21088
|
-
|
|
21089
|
-
window.location = url;
|
|
21102
|
+
if (!record) {
|
|
21103
|
+
this.toastDanger(this.$t('recordNotFound'));
|
|
21104
|
+
return
|
|
21090
21105
|
}
|
|
21091
21106
|
|
|
21092
|
-
|
|
21093
|
-
}
|
|
21107
|
+
const { pageID } = recordPages[0];
|
|
21094
21108
|
|
|
21095
|
-
|
|
21109
|
+
if (this.$router.app.$options.name !== 'compose') {
|
|
21110
|
+
const u = new URL(window.location);
|
|
21111
|
+
const url = `${u.origin}/compose/ns/${slug}/pages/${pageID}/record/${recordID}/${edit ? 'edit' : ''}`;
|
|
21096
21112
|
|
|
21097
|
-
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
|
|
21113
|
+
if (openMode === 'newTab') {
|
|
21114
|
+
window.open(url, '_blank');
|
|
21115
|
+
} else {
|
|
21116
|
+
window.location = url;
|
|
21117
|
+
}
|
|
21102
21118
|
|
|
21103
|
-
|
|
21104
|
-
|
|
21105
|
-
params: {
|
|
21106
|
-
recordID,
|
|
21107
|
-
pageID,
|
|
21108
|
-
slug,
|
|
21109
|
-
edit,
|
|
21110
|
-
},
|
|
21111
|
-
};
|
|
21119
|
+
return
|
|
21120
|
+
}
|
|
21112
21121
|
|
|
21113
|
-
|
|
21114
|
-
|
|
21115
|
-
|
|
21116
|
-
|
|
21117
|
-
|
|
21118
|
-
|
|
21119
|
-
|
|
21120
|
-
|
|
21121
|
-
|
|
21122
|
-
|
|
21123
|
-
|
|
21124
|
-
|
|
21122
|
+
let routeName = 'page.record';
|
|
21123
|
+
|
|
21124
|
+
if (!recordID || recordID === '0') {
|
|
21125
|
+
routeName += '.create';
|
|
21126
|
+
} else if (edit) {
|
|
21127
|
+
routeName += '.edit';
|
|
21128
|
+
}
|
|
21129
|
+
|
|
21130
|
+
const routeParams = {
|
|
21131
|
+
name: routeName,
|
|
21132
|
+
params: {
|
|
21133
|
+
recordID,
|
|
21134
|
+
pageID,
|
|
21135
|
+
slug,
|
|
21125
21136
|
edit,
|
|
21126
|
-
|
|
21137
|
+
},
|
|
21138
|
+
};
|
|
21127
21139
|
|
|
21128
|
-
|
|
21129
|
-
|
|
21130
|
-
|
|
21140
|
+
// If name and params match, make sure to refresh page instead of pushing
|
|
21141
|
+
const sameRoute = routeName === this.$route.name &&
|
|
21142
|
+
slug === this.$route.params.slug &&
|
|
21143
|
+
pageID === this.$route.params.pageID &&
|
|
21144
|
+
recordID === this.$route.params.recordID;
|
|
21145
|
+
|
|
21146
|
+
if (openMode === 'newTab') {
|
|
21147
|
+
window.open(this.$router.resolve(routeParams).href, '_blank');
|
|
21148
|
+
} else if (this.isOnPagesRouteOrChild && !sameRoute && openMode === 'modal') {
|
|
21149
|
+
this.$root.$emit('show-record-modal', {
|
|
21150
|
+
recordID: !recordID || recordID === '0' ? '0' : recordID,
|
|
21151
|
+
recordPageID: pageID,
|
|
21152
|
+
edit,
|
|
21153
|
+
});
|
|
21154
|
+
|
|
21155
|
+
return
|
|
21156
|
+
} else {
|
|
21157
|
+
this.$router.push(routeParams);
|
|
21158
|
+
}
|
|
21159
|
+
} catch (error) {
|
|
21160
|
+
this.toastErrorHandler(this.$t('recordRedirectError'))(error);
|
|
21131
21161
|
}
|
|
21132
21162
|
},
|
|
21133
21163
|
},
|
|
@@ -21167,8 +21197,8 @@ var __vue_staticRenderFns__$9 = [];
|
|
|
21167
21197
|
undefined);
|
|
21168
21198
|
|
|
21169
21199
|
var NotificationTypes = {
|
|
21170
|
-
|
|
21171
|
-
|
|
21200
|
+
NotificationSimple: __vue_component__$a,
|
|
21201
|
+
NotificationRecord: __vue_component__$9,
|
|
21172
21202
|
};
|
|
21173
21203
|
|
|
21174
21204
|
//
|
|
@@ -21265,7 +21295,7 @@ var script$8 = {
|
|
|
21265
21295
|
let { kind } = this.notification;
|
|
21266
21296
|
kind = kind.charAt(0).toUpperCase() + kind.slice(1);
|
|
21267
21297
|
|
|
21268
|
-
return NotificationTypes[kind]
|
|
21298
|
+
return NotificationTypes[`Notification${kind}`]
|
|
21269
21299
|
},
|
|
21270
21300
|
},
|
|
21271
21301
|
};
|
|
@@ -21280,11 +21310,11 @@ var __vue_staticRenderFns__$8 = [];
|
|
|
21280
21310
|
/* style */
|
|
21281
21311
|
const __vue_inject_styles__$8 = function (inject) {
|
|
21282
21312
|
if (!inject) return
|
|
21283
|
-
inject("data-v-
|
|
21313
|
+
inject("data-v-de33bfca_0", { source: ".notification-item-container[data-v-de33bfca]:hover{background-color:var(--light)!important}.notification-item-container .notification-item[data-v-de33bfca]{transition:background-color .2s ease;cursor:pointer}.notification-item-container .notification-item.read .notification-item-content[data-v-de33bfca]{opacity:.5!important}.notification-item-container:hover .action-menu[data-v-de33bfca]{opacity:1!important;pointer-events:auto}.notification-item-container .action-menu[data-v-de33bfca]{position:absolute;top:.5rem;right:.5rem;z-index:2;opacity:0;pointer-events:none;transition:opacity .2s ease}", map: undefined, media: undefined });
|
|
21284
21314
|
|
|
21285
21315
|
};
|
|
21286
21316
|
/* scoped */
|
|
21287
|
-
const __vue_scope_id__$8 = "data-v-
|
|
21317
|
+
const __vue_scope_id__$8 = "data-v-de33bfca";
|
|
21288
21318
|
/* module identifier */
|
|
21289
21319
|
const __vue_module_identifier__$8 = undefined;
|
|
21290
21320
|
/* functional template */
|