@iankibetsh/shframework 5.7.8 → 5.7.9
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/library.js +144 -97
- package/dist/library.mjs +144 -97
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -5686,6 +5686,39 @@ vue.onBeforeUnmount(() => {
|
|
|
5686
5686
|
});
|
|
5687
5687
|
|
|
5688
5688
|
// --- Utils used in template
|
|
5689
|
+
const getData = (record, key) => {
|
|
5690
|
+
if (!key || !record) return ''
|
|
5691
|
+
if (typeof key !== 'string') return ''
|
|
5692
|
+
return key.split('.').reduce((obj, i) => (obj ? obj[i] : ''), record)
|
|
5693
|
+
};
|
|
5694
|
+
|
|
5695
|
+
const getLabel = (title) => {
|
|
5696
|
+
if (typeof title === 'string') {
|
|
5697
|
+
if (title.includes('.')) {
|
|
5698
|
+
const parts = title.split('.');
|
|
5699
|
+
return parts[parts.length - 1].replace(/_/g, ' ')
|
|
5700
|
+
}
|
|
5701
|
+
return title.replace(/_/g, ' ')
|
|
5702
|
+
}
|
|
5703
|
+
if (typeof title === 'object') {
|
|
5704
|
+
if (title.label) return title.label
|
|
5705
|
+
const key = title.key ?? title.field ?? '';
|
|
5706
|
+
if (key.includes('.')) {
|
|
5707
|
+
const parts = key.split('.');
|
|
5708
|
+
return parts[parts.length - 1].replace(/_/g, ' ')
|
|
5709
|
+
}
|
|
5710
|
+
return key.replace(/_/g, ' ')
|
|
5711
|
+
}
|
|
5712
|
+
return ''
|
|
5713
|
+
};
|
|
5714
|
+
|
|
5715
|
+
const getSlotName = (key) => {
|
|
5716
|
+
if (typeof key === 'string') return key
|
|
5717
|
+
if (typeof key === 'object') return key.key ?? key.field ?? ''
|
|
5718
|
+
if (typeof key === 'function') return key(null)
|
|
5719
|
+
return ''
|
|
5720
|
+
};
|
|
5721
|
+
|
|
5689
5722
|
const cleanColumn = (col) => {
|
|
5690
5723
|
const newCol = {...col};
|
|
5691
5724
|
delete newCol.component;
|
|
@@ -5748,9 +5781,13 @@ const getFieldType = (field) => {
|
|
|
5748
5781
|
const numbers = ['age', 'interest_rate_pa'];
|
|
5749
5782
|
const moneys = ['amount', 'paid_amount', 'total_paid', 'total', 'monthly_fee', 'share_cost', 'min_contribution', 'min_membership_contribution'];
|
|
5750
5783
|
const dates = ['invoice_date', 'free_tier_days', 'updated_at', 'created_at', 'end_time'];
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5784
|
+
|
|
5785
|
+
const rawField = typeof field === 'object' ? (field.key ?? field.field ?? '') : field;
|
|
5786
|
+
const lastPart = typeof rawField === 'string' && rawField.includes('.') ? rawField.split('.').pop() : rawField;
|
|
5787
|
+
|
|
5788
|
+
if (typeof lastPart === 'string' && numbers.includes(lastPart)) return 'numeric'
|
|
5789
|
+
if (typeof lastPart === 'string' && moneys.includes(lastPart)) return 'money'
|
|
5790
|
+
if (typeof lastPart === 'string' && dates.includes(lastPart)) return 'date'
|
|
5754
5791
|
return 'string'
|
|
5755
5792
|
};
|
|
5756
5793
|
|
|
@@ -6070,13 +6107,13 @@ return (_ctx, _cache) => {
|
|
|
6070
6107
|
key: 0,
|
|
6071
6108
|
class: "text-capitalize",
|
|
6072
6109
|
onClick: $event => (changeKey('order_by', title))
|
|
6073
|
-
}, vue.toDisplayString(title
|
|
6110
|
+
}, vue.toDisplayString(getLabel(title)), 9 /* TEXT, PROPS */, _hoisted_15$1))
|
|
6074
6111
|
: (typeof title === 'object')
|
|
6075
6112
|
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
6076
6113
|
key: 1,
|
|
6077
6114
|
class: "text-capitalize",
|
|
6078
6115
|
onClick: $event => (changeKey('order_by', title.key))
|
|
6079
|
-
}, vue.toDisplayString(title
|
|
6116
|
+
}, vue.toDisplayString(getLabel(title)), 9 /* TEXT, PROPS */, _hoisted_16))
|
|
6080
6117
|
: (typeof title === 'function')
|
|
6081
6118
|
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
6082
6119
|
key: 2,
|
|
@@ -6088,7 +6125,7 @@ return (_ctx, _cache) => {
|
|
|
6088
6125
|
key: 3,
|
|
6089
6126
|
class: "text-capitalize",
|
|
6090
6127
|
onClick: $event => (changeKey('order_by', title))
|
|
6091
|
-
}, vue.toDisplayString(String(title)
|
|
6128
|
+
}, vue.toDisplayString(String(getLabel(title))), 9 /* TEXT, PROPS */, _hoisted_18))
|
|
6092
6129
|
: vue.createCommentVNode("v-if", true)
|
|
6093
6130
|
]))
|
|
6094
6131
|
: vue.createCommentVNode("v-if", true)
|
|
@@ -6143,54 +6180,59 @@ return (_ctx, _cache) => {
|
|
|
6143
6180
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: key }, [
|
|
6144
6181
|
(showColumn(key))
|
|
6145
6182
|
? (vue.openBlock(), vue.createElementBlock("td", _hoisted_28, [
|
|
6146
|
-
(
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
: (typeof key === 'function')
|
|
6183
|
+
vue.renderSlot(_ctx.$slots, getSlotName(key), {
|
|
6184
|
+
row: record,
|
|
6185
|
+
index: index
|
|
6186
|
+
}, () => [
|
|
6187
|
+
(typeof key === 'string' && __props.links && __props.links[key])
|
|
6188
|
+
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
6189
|
+
key: 0,
|
|
6190
|
+
target: __props.links[key].target ? '_blank':'',
|
|
6191
|
+
to: replaceLinkUrl(__props.links[key], record),
|
|
6192
|
+
class: vue.normalizeClass(getLinkClass(__props.links[key])),
|
|
6193
|
+
innerHTML: getData(record, key)
|
|
6194
|
+
}, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
|
|
6195
|
+
: (getFieldType(key) === 'numeric')
|
|
6196
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_29, vue.toDisplayString(Intl.NumberFormat().format(getData(record, key))), 1 /* TEXT */))
|
|
6197
|
+
: (getFieldType(key) === 'money')
|
|
6198
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_30, vue.toDisplayString(Intl.NumberFormat().format(getData(record, key))), 1 /* TEXT */))
|
|
6199
|
+
: (getFieldType(key) === 'date')
|
|
6200
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_31, vue.toDisplayString(formatDate(getData(record, key))), 1 /* TEXT */))
|
|
6201
|
+
: (typeof key === 'string')
|
|
6166
6202
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6167
|
-
key:
|
|
6168
|
-
innerHTML:
|
|
6169
|
-
}, null, 8 /* PROPS */,
|
|
6170
|
-
: (typeof key === '
|
|
6203
|
+
key: 4,
|
|
6204
|
+
innerHTML: getData(record, key)
|
|
6205
|
+
}, null, 8 /* PROPS */, _hoisted_32))
|
|
6206
|
+
: (typeof key === 'function')
|
|
6171
6207
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6172
|
-
key:
|
|
6173
|
-
innerHTML: key
|
|
6174
|
-
}, null, 8 /* PROPS */,
|
|
6175
|
-
: (typeof key === 'object' && key.
|
|
6208
|
+
key: 5,
|
|
6209
|
+
innerHTML: key(record, index)
|
|
6210
|
+
}, null, 8 /* PROPS */, _hoisted_33))
|
|
6211
|
+
: (typeof key === 'object' && key.callBack)
|
|
6176
6212
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6177
|
-
key:
|
|
6178
|
-
innerHTML: key.
|
|
6179
|
-
}, null, 8 /* PROPS */,
|
|
6180
|
-
: (typeof key === 'object' && key.
|
|
6181
|
-
? (vue.openBlock(), vue.
|
|
6182
|
-
key:
|
|
6183
|
-
|
|
6184
|
-
},
|
|
6185
|
-
: (typeof key === 'object')
|
|
6186
|
-
? (vue.openBlock(), vue.
|
|
6187
|
-
key:
|
|
6188
|
-
|
|
6189
|
-
}, null,
|
|
6190
|
-
: (
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6213
|
+
key: 6,
|
|
6214
|
+
innerHTML: key.callBack(record, index)
|
|
6215
|
+
}, null, 8 /* PROPS */, _hoisted_34))
|
|
6216
|
+
: (typeof key === 'object' && key.callback)
|
|
6217
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6218
|
+
key: 7,
|
|
6219
|
+
innerHTML: key.callback(record, index)
|
|
6220
|
+
}, null, 8 /* PROPS */, _hoisted_35))
|
|
6221
|
+
: (typeof key === 'object' && key.component)
|
|
6222
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
|
|
6223
|
+
key: 8,
|
|
6224
|
+
item: record
|
|
6225
|
+
}, { ref_for: true }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
|
|
6226
|
+
: (typeof key === 'object')
|
|
6227
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6228
|
+
key: 9,
|
|
6229
|
+
innerHTML: getData(record, key.key ?? key.field)
|
|
6230
|
+
}, null, 8 /* PROPS */, _hoisted_36))
|
|
6231
|
+
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
6232
|
+
key: 10,
|
|
6233
|
+
innerHTML: getData(record, key[0])
|
|
6234
|
+
}, null, 8 /* PROPS */, _hoisted_37))
|
|
6235
|
+
])
|
|
6194
6236
|
]))
|
|
6195
6237
|
: vue.createCommentVNode("v-if", true)
|
|
6196
6238
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -6240,60 +6282,65 @@ return (_ctx, _cache) => {
|
|
|
6240
6282
|
(showColumn(key))
|
|
6241
6283
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6242
6284
|
(typeof key === 'string' )
|
|
6243
|
-
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_44, vue.toDisplayString(key
|
|
6285
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_44, vue.toDisplayString(getLabel(key)), 1 /* TEXT */))
|
|
6244
6286
|
: (typeof key === 'function')
|
|
6245
6287
|
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_45, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
6246
6288
|
: (typeof key === 'object')
|
|
6247
|
-
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_46, vue.toDisplayString(key
|
|
6289
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_46, vue.toDisplayString(getLabel(key)), 1 /* TEXT */))
|
|
6248
6290
|
: (vue.openBlock(), vue.createElementBlock("p", _hoisted_47, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
6249
6291
|
vue.createElementVNode("span", null, [
|
|
6250
|
-
(
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
: (typeof key === 'object' && key.callBack)
|
|
6292
|
+
vue.renderSlot(_ctx.$slots, getSlotName(key), {
|
|
6293
|
+
row: record,
|
|
6294
|
+
index: index
|
|
6295
|
+
}, () => [
|
|
6296
|
+
(typeof key === 'string' && __props.links && __props.links[key])
|
|
6297
|
+
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
6298
|
+
key: 0,
|
|
6299
|
+
to: replaceLinkUrl(__props.links[key],record),
|
|
6300
|
+
class: vue.normalizeClass(getLinkClass(__props.links[key])),
|
|
6301
|
+
innerHTML: getData(record, key)
|
|
6302
|
+
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
6303
|
+
: (getFieldType(key) === 'numeric')
|
|
6304
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_48, vue.toDisplayString(Intl.NumberFormat().format(getData(record, key))), 1 /* TEXT */))
|
|
6305
|
+
: (getFieldType(key) === 'money')
|
|
6306
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_49, vue.toDisplayString(Intl.NumberFormat().format(getData(record, key))), 1 /* TEXT */))
|
|
6307
|
+
: (getFieldType(key) === 'date')
|
|
6308
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_50, vue.toDisplayString(formatDate(getData(record, key))), 1 /* TEXT */))
|
|
6309
|
+
: (typeof key === 'string')
|
|
6269
6310
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6270
|
-
key:
|
|
6271
|
-
innerHTML:
|
|
6272
|
-
}, null, 8 /* PROPS */,
|
|
6273
|
-
: (typeof key === 'object' && key.
|
|
6311
|
+
key: 4,
|
|
6312
|
+
innerHTML: getData(record, key)
|
|
6313
|
+
}, null, 8 /* PROPS */, _hoisted_51))
|
|
6314
|
+
: (typeof key === 'object' && key.callBack)
|
|
6274
6315
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6275
|
-
key:
|
|
6276
|
-
innerHTML: key.
|
|
6277
|
-
}, null, 8 /* PROPS */,
|
|
6278
|
-
: (typeof key === 'object' && key.
|
|
6279
|
-
? (vue.openBlock(), vue.
|
|
6280
|
-
key:
|
|
6281
|
-
|
|
6282
|
-
},
|
|
6283
|
-
: (typeof key === 'object')
|
|
6284
|
-
? (vue.openBlock(), vue.
|
|
6285
|
-
key:
|
|
6286
|
-
|
|
6287
|
-
}, null,
|
|
6288
|
-
: (typeof key === '
|
|
6316
|
+
key: 5,
|
|
6317
|
+
innerHTML: key.callBack(record, index)
|
|
6318
|
+
}, null, 8 /* PROPS */, _hoisted_52))
|
|
6319
|
+
: (typeof key === 'object' && key.callback)
|
|
6320
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6321
|
+
key: 6,
|
|
6322
|
+
innerHTML: key.callback(record, index)
|
|
6323
|
+
}, null, 8 /* PROPS */, _hoisted_53))
|
|
6324
|
+
: (typeof key === 'object' && key.component)
|
|
6325
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
|
|
6326
|
+
key: 7,
|
|
6327
|
+
item: record
|
|
6328
|
+
}, { ref_for: true }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
|
|
6329
|
+
: (typeof key === 'object')
|
|
6289
6330
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6290
|
-
key:
|
|
6291
|
-
innerHTML:
|
|
6292
|
-
}, null, 8 /* PROPS */,
|
|
6293
|
-
: (
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6331
|
+
key: 8,
|
|
6332
|
+
innerHTML: getData(record, key.key ?? key.field)
|
|
6333
|
+
}, null, 8 /* PROPS */, _hoisted_54))
|
|
6334
|
+
: (typeof key === 'function')
|
|
6335
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6336
|
+
key: 9,
|
|
6337
|
+
innerHTML: key(record, index)
|
|
6338
|
+
}, null, 8 /* PROPS */, _hoisted_55))
|
|
6339
|
+
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
6340
|
+
key: 10,
|
|
6341
|
+
innerHTML: getData(record, key[0])
|
|
6342
|
+
}, null, 8 /* PROPS */, _hoisted_56))
|
|
6343
|
+
])
|
|
6297
6344
|
])
|
|
6298
6345
|
], 64 /* STABLE_FRAGMENT */))
|
|
6299
6346
|
: vue.createCommentVNode("v-if", true),
|
package/dist/library.mjs
CHANGED
|
@@ -5675,6 +5675,39 @@ onBeforeUnmount(() => {
|
|
|
5675
5675
|
});
|
|
5676
5676
|
|
|
5677
5677
|
// --- Utils used in template
|
|
5678
|
+
const getData = (record, key) => {
|
|
5679
|
+
if (!key || !record) return ''
|
|
5680
|
+
if (typeof key !== 'string') return ''
|
|
5681
|
+
return key.split('.').reduce((obj, i) => (obj ? obj[i] : ''), record)
|
|
5682
|
+
};
|
|
5683
|
+
|
|
5684
|
+
const getLabel = (title) => {
|
|
5685
|
+
if (typeof title === 'string') {
|
|
5686
|
+
if (title.includes('.')) {
|
|
5687
|
+
const parts = title.split('.');
|
|
5688
|
+
return parts[parts.length - 1].replace(/_/g, ' ')
|
|
5689
|
+
}
|
|
5690
|
+
return title.replace(/_/g, ' ')
|
|
5691
|
+
}
|
|
5692
|
+
if (typeof title === 'object') {
|
|
5693
|
+
if (title.label) return title.label
|
|
5694
|
+
const key = title.key ?? title.field ?? '';
|
|
5695
|
+
if (key.includes('.')) {
|
|
5696
|
+
const parts = key.split('.');
|
|
5697
|
+
return parts[parts.length - 1].replace(/_/g, ' ')
|
|
5698
|
+
}
|
|
5699
|
+
return key.replace(/_/g, ' ')
|
|
5700
|
+
}
|
|
5701
|
+
return ''
|
|
5702
|
+
};
|
|
5703
|
+
|
|
5704
|
+
const getSlotName = (key) => {
|
|
5705
|
+
if (typeof key === 'string') return key
|
|
5706
|
+
if (typeof key === 'object') return key.key ?? key.field ?? ''
|
|
5707
|
+
if (typeof key === 'function') return key(null)
|
|
5708
|
+
return ''
|
|
5709
|
+
};
|
|
5710
|
+
|
|
5678
5711
|
const cleanColumn = (col) => {
|
|
5679
5712
|
const newCol = {...col};
|
|
5680
5713
|
delete newCol.component;
|
|
@@ -5737,9 +5770,13 @@ const getFieldType = (field) => {
|
|
|
5737
5770
|
const numbers = ['age', 'interest_rate_pa'];
|
|
5738
5771
|
const moneys = ['amount', 'paid_amount', 'total_paid', 'total', 'monthly_fee', 'share_cost', 'min_contribution', 'min_membership_contribution'];
|
|
5739
5772
|
const dates = ['invoice_date', 'free_tier_days', 'updated_at', 'created_at', 'end_time'];
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5773
|
+
|
|
5774
|
+
const rawField = typeof field === 'object' ? (field.key ?? field.field ?? '') : field;
|
|
5775
|
+
const lastPart = typeof rawField === 'string' && rawField.includes('.') ? rawField.split('.').pop() : rawField;
|
|
5776
|
+
|
|
5777
|
+
if (typeof lastPart === 'string' && numbers.includes(lastPart)) return 'numeric'
|
|
5778
|
+
if (typeof lastPart === 'string' && moneys.includes(lastPart)) return 'money'
|
|
5779
|
+
if (typeof lastPart === 'string' && dates.includes(lastPart)) return 'date'
|
|
5743
5780
|
return 'string'
|
|
5744
5781
|
};
|
|
5745
5782
|
|
|
@@ -6059,13 +6096,13 @@ return (_ctx, _cache) => {
|
|
|
6059
6096
|
key: 0,
|
|
6060
6097
|
class: "text-capitalize",
|
|
6061
6098
|
onClick: $event => (changeKey('order_by', title))
|
|
6062
|
-
}, toDisplayString(title
|
|
6099
|
+
}, toDisplayString(getLabel(title)), 9 /* TEXT, PROPS */, _hoisted_15$1))
|
|
6063
6100
|
: (typeof title === 'object')
|
|
6064
6101
|
? (openBlock(), createElementBlock("a", {
|
|
6065
6102
|
key: 1,
|
|
6066
6103
|
class: "text-capitalize",
|
|
6067
6104
|
onClick: $event => (changeKey('order_by', title.key))
|
|
6068
|
-
}, toDisplayString(title
|
|
6105
|
+
}, toDisplayString(getLabel(title)), 9 /* TEXT, PROPS */, _hoisted_16))
|
|
6069
6106
|
: (typeof title === 'function')
|
|
6070
6107
|
? (openBlock(), createElementBlock("a", {
|
|
6071
6108
|
key: 2,
|
|
@@ -6077,7 +6114,7 @@ return (_ctx, _cache) => {
|
|
|
6077
6114
|
key: 3,
|
|
6078
6115
|
class: "text-capitalize",
|
|
6079
6116
|
onClick: $event => (changeKey('order_by', title))
|
|
6080
|
-
}, toDisplayString(String(title)
|
|
6117
|
+
}, toDisplayString(String(getLabel(title))), 9 /* TEXT, PROPS */, _hoisted_18))
|
|
6081
6118
|
: createCommentVNode("v-if", true)
|
|
6082
6119
|
]))
|
|
6083
6120
|
: createCommentVNode("v-if", true)
|
|
@@ -6132,54 +6169,59 @@ return (_ctx, _cache) => {
|
|
|
6132
6169
|
return (openBlock(), createElementBlock(Fragment, { key: key }, [
|
|
6133
6170
|
(showColumn(key))
|
|
6134
6171
|
? (openBlock(), createElementBlock("td", _hoisted_28, [
|
|
6135
|
-
(
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
: (typeof key === 'function')
|
|
6172
|
+
renderSlot(_ctx.$slots, getSlotName(key), {
|
|
6173
|
+
row: record,
|
|
6174
|
+
index: index
|
|
6175
|
+
}, () => [
|
|
6176
|
+
(typeof key === 'string' && __props.links && __props.links[key])
|
|
6177
|
+
? (openBlock(), createBlock(_component_router_link, {
|
|
6178
|
+
key: 0,
|
|
6179
|
+
target: __props.links[key].target ? '_blank':'',
|
|
6180
|
+
to: replaceLinkUrl(__props.links[key], record),
|
|
6181
|
+
class: normalizeClass(getLinkClass(__props.links[key])),
|
|
6182
|
+
innerHTML: getData(record, key)
|
|
6183
|
+
}, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
|
|
6184
|
+
: (getFieldType(key) === 'numeric')
|
|
6185
|
+
? (openBlock(), createElementBlock("span", _hoisted_29, toDisplayString(Intl.NumberFormat().format(getData(record, key))), 1 /* TEXT */))
|
|
6186
|
+
: (getFieldType(key) === 'money')
|
|
6187
|
+
? (openBlock(), createElementBlock("span", _hoisted_30, toDisplayString(Intl.NumberFormat().format(getData(record, key))), 1 /* TEXT */))
|
|
6188
|
+
: (getFieldType(key) === 'date')
|
|
6189
|
+
? (openBlock(), createElementBlock("span", _hoisted_31, toDisplayString(formatDate(getData(record, key))), 1 /* TEXT */))
|
|
6190
|
+
: (typeof key === 'string')
|
|
6155
6191
|
? (openBlock(), createElementBlock("span", {
|
|
6156
|
-
key:
|
|
6157
|
-
innerHTML:
|
|
6158
|
-
}, null, 8 /* PROPS */,
|
|
6159
|
-
: (typeof key === '
|
|
6192
|
+
key: 4,
|
|
6193
|
+
innerHTML: getData(record, key)
|
|
6194
|
+
}, null, 8 /* PROPS */, _hoisted_32))
|
|
6195
|
+
: (typeof key === 'function')
|
|
6160
6196
|
? (openBlock(), createElementBlock("span", {
|
|
6161
|
-
key:
|
|
6162
|
-
innerHTML: key
|
|
6163
|
-
}, null, 8 /* PROPS */,
|
|
6164
|
-
: (typeof key === 'object' && key.
|
|
6197
|
+
key: 5,
|
|
6198
|
+
innerHTML: key(record, index)
|
|
6199
|
+
}, null, 8 /* PROPS */, _hoisted_33))
|
|
6200
|
+
: (typeof key === 'object' && key.callBack)
|
|
6165
6201
|
? (openBlock(), createElementBlock("span", {
|
|
6166
|
-
key:
|
|
6167
|
-
innerHTML: key.
|
|
6168
|
-
}, null, 8 /* PROPS */,
|
|
6169
|
-
: (typeof key === 'object' && key.
|
|
6170
|
-
? (openBlock(),
|
|
6171
|
-
key:
|
|
6172
|
-
|
|
6173
|
-
},
|
|
6174
|
-
: (typeof key === 'object')
|
|
6175
|
-
? (openBlock(),
|
|
6176
|
-
key:
|
|
6177
|
-
|
|
6178
|
-
}, null,
|
|
6179
|
-
: (
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6202
|
+
key: 6,
|
|
6203
|
+
innerHTML: key.callBack(record, index)
|
|
6204
|
+
}, null, 8 /* PROPS */, _hoisted_34))
|
|
6205
|
+
: (typeof key === 'object' && key.callback)
|
|
6206
|
+
? (openBlock(), createElementBlock("span", {
|
|
6207
|
+
key: 7,
|
|
6208
|
+
innerHTML: key.callback(record, index)
|
|
6209
|
+
}, null, 8 /* PROPS */, _hoisted_35))
|
|
6210
|
+
: (typeof key === 'object' && key.component)
|
|
6211
|
+
? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
|
|
6212
|
+
key: 8,
|
|
6213
|
+
item: record
|
|
6214
|
+
}, { ref_for: true }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
|
|
6215
|
+
: (typeof key === 'object')
|
|
6216
|
+
? (openBlock(), createElementBlock("span", {
|
|
6217
|
+
key: 9,
|
|
6218
|
+
innerHTML: getData(record, key.key ?? key.field)
|
|
6219
|
+
}, null, 8 /* PROPS */, _hoisted_36))
|
|
6220
|
+
: (openBlock(), createElementBlock("span", {
|
|
6221
|
+
key: 10,
|
|
6222
|
+
innerHTML: getData(record, key[0])
|
|
6223
|
+
}, null, 8 /* PROPS */, _hoisted_37))
|
|
6224
|
+
])
|
|
6183
6225
|
]))
|
|
6184
6226
|
: createCommentVNode("v-if", true)
|
|
6185
6227
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -6229,60 +6271,65 @@ return (_ctx, _cache) => {
|
|
|
6229
6271
|
(showColumn(key))
|
|
6230
6272
|
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6231
6273
|
(typeof key === 'string' )
|
|
6232
|
-
? (openBlock(), createElementBlock("p", _hoisted_44, toDisplayString(key
|
|
6274
|
+
? (openBlock(), createElementBlock("p", _hoisted_44, toDisplayString(getLabel(key)), 1 /* TEXT */))
|
|
6233
6275
|
: (typeof key === 'function')
|
|
6234
6276
|
? (openBlock(), createElementBlock("p", _hoisted_45, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
6235
6277
|
: (typeof key === 'object')
|
|
6236
|
-
? (openBlock(), createElementBlock("p", _hoisted_46, toDisplayString(key
|
|
6278
|
+
? (openBlock(), createElementBlock("p", _hoisted_46, toDisplayString(getLabel(key)), 1 /* TEXT */))
|
|
6237
6279
|
: (openBlock(), createElementBlock("p", _hoisted_47, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
6238
6280
|
createElementVNode("span", null, [
|
|
6239
|
-
(
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
: (typeof key === 'object' && key.callBack)
|
|
6281
|
+
renderSlot(_ctx.$slots, getSlotName(key), {
|
|
6282
|
+
row: record,
|
|
6283
|
+
index: index
|
|
6284
|
+
}, () => [
|
|
6285
|
+
(typeof key === 'string' && __props.links && __props.links[key])
|
|
6286
|
+
? (openBlock(), createBlock(_component_router_link, {
|
|
6287
|
+
key: 0,
|
|
6288
|
+
to: replaceLinkUrl(__props.links[key],record),
|
|
6289
|
+
class: normalizeClass(getLinkClass(__props.links[key])),
|
|
6290
|
+
innerHTML: getData(record, key)
|
|
6291
|
+
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
6292
|
+
: (getFieldType(key) === 'numeric')
|
|
6293
|
+
? (openBlock(), createElementBlock("span", _hoisted_48, toDisplayString(Intl.NumberFormat().format(getData(record, key))), 1 /* TEXT */))
|
|
6294
|
+
: (getFieldType(key) === 'money')
|
|
6295
|
+
? (openBlock(), createElementBlock("span", _hoisted_49, toDisplayString(Intl.NumberFormat().format(getData(record, key))), 1 /* TEXT */))
|
|
6296
|
+
: (getFieldType(key) === 'date')
|
|
6297
|
+
? (openBlock(), createElementBlock("span", _hoisted_50, toDisplayString(formatDate(getData(record, key))), 1 /* TEXT */))
|
|
6298
|
+
: (typeof key === 'string')
|
|
6258
6299
|
? (openBlock(), createElementBlock("span", {
|
|
6259
|
-
key:
|
|
6260
|
-
innerHTML:
|
|
6261
|
-
}, null, 8 /* PROPS */,
|
|
6262
|
-
: (typeof key === 'object' && key.
|
|
6300
|
+
key: 4,
|
|
6301
|
+
innerHTML: getData(record, key)
|
|
6302
|
+
}, null, 8 /* PROPS */, _hoisted_51))
|
|
6303
|
+
: (typeof key === 'object' && key.callBack)
|
|
6263
6304
|
? (openBlock(), createElementBlock("span", {
|
|
6264
|
-
key:
|
|
6265
|
-
innerHTML: key.
|
|
6266
|
-
}, null, 8 /* PROPS */,
|
|
6267
|
-
: (typeof key === 'object' && key.
|
|
6268
|
-
? (openBlock(),
|
|
6269
|
-
key:
|
|
6270
|
-
|
|
6271
|
-
},
|
|
6272
|
-
: (typeof key === 'object')
|
|
6273
|
-
? (openBlock(),
|
|
6274
|
-
key:
|
|
6275
|
-
|
|
6276
|
-
}, null,
|
|
6277
|
-
: (typeof key === '
|
|
6305
|
+
key: 5,
|
|
6306
|
+
innerHTML: key.callBack(record, index)
|
|
6307
|
+
}, null, 8 /* PROPS */, _hoisted_52))
|
|
6308
|
+
: (typeof key === 'object' && key.callback)
|
|
6309
|
+
? (openBlock(), createElementBlock("span", {
|
|
6310
|
+
key: 6,
|
|
6311
|
+
innerHTML: key.callback(record, index)
|
|
6312
|
+
}, null, 8 /* PROPS */, _hoisted_53))
|
|
6313
|
+
: (typeof key === 'object' && key.component)
|
|
6314
|
+
? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
|
|
6315
|
+
key: 7,
|
|
6316
|
+
item: record
|
|
6317
|
+
}, { ref_for: true }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
|
|
6318
|
+
: (typeof key === 'object')
|
|
6278
6319
|
? (openBlock(), createElementBlock("span", {
|
|
6279
|
-
key:
|
|
6280
|
-
innerHTML:
|
|
6281
|
-
}, null, 8 /* PROPS */,
|
|
6282
|
-
: (
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6320
|
+
key: 8,
|
|
6321
|
+
innerHTML: getData(record, key.key ?? key.field)
|
|
6322
|
+
}, null, 8 /* PROPS */, _hoisted_54))
|
|
6323
|
+
: (typeof key === 'function')
|
|
6324
|
+
? (openBlock(), createElementBlock("span", {
|
|
6325
|
+
key: 9,
|
|
6326
|
+
innerHTML: key(record, index)
|
|
6327
|
+
}, null, 8 /* PROPS */, _hoisted_55))
|
|
6328
|
+
: (openBlock(), createElementBlock("span", {
|
|
6329
|
+
key: 10,
|
|
6330
|
+
innerHTML: getData(record, key[0])
|
|
6331
|
+
}, null, 8 /* PROPS */, _hoisted_56))
|
|
6332
|
+
])
|
|
6286
6333
|
])
|
|
6287
6334
|
], 64 /* STABLE_FRAGMENT */))
|
|
6288
6335
|
: createCommentVNode("v-if", true),
|