web-mojo 2.1.917 → 2.1.954
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/admin.cjs.js +1 -1
- package/dist/admin.cjs.js.map +1 -1
- package/dist/admin.es.js +154 -244
- package/dist/admin.es.js.map +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.cjs.js.map +1 -1
- package/dist/auth.es.js +7 -7
- package/dist/auth.es.js.map +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +7 -7
- package/dist/chunks/ChatView-BKa78eKF.js +2 -0
- package/dist/chunks/ChatView-BKa78eKF.js.map +1 -0
- package/dist/chunks/{ChatView-D9hJ2u6c.js → ChatView-Dcz7LkwL.js} +103 -576
- package/dist/chunks/ChatView-Dcz7LkwL.js.map +1 -0
- package/dist/chunks/Collection-OP7c9Zyu.js +989 -0
- package/dist/chunks/Collection-OP7c9Zyu.js.map +1 -0
- package/dist/chunks/Collection-aQF5eOUH.js +2 -0
- package/dist/chunks/Collection-aQF5eOUH.js.map +1 -0
- package/dist/chunks/ContextMenu-DV_wsr9B.js +3 -0
- package/dist/chunks/ContextMenu-DV_wsr9B.js.map +1 -0
- package/dist/chunks/ContextMenu-ixMyAUGS.js +1171 -0
- package/dist/chunks/ContextMenu-ixMyAUGS.js.map +1 -0
- package/dist/chunks/DataView-CdDY9ijM.js +2 -0
- package/dist/chunks/{DataView-CorHtzkO.js.map → DataView-CdDY9ijM.js.map} +1 -1
- package/dist/chunks/{DataView-BDUCD0q0.js → DataView-OUqaLmGB.js} +2 -2
- package/dist/chunks/{DataView-BDUCD0q0.js.map → DataView-OUqaLmGB.js.map} +1 -1
- package/dist/chunks/{Dialog-D9qIh5Jb.js → Dialog-C2mRUxga.js} +8 -6
- package/dist/chunks/{Dialog-D9qIh5Jb.js.map → Dialog-C2mRUxga.js.map} +1 -1
- package/dist/chunks/Dialog-Cl6MN8if.js +2 -0
- package/dist/chunks/{Dialog-ifYDY_7S.js.map → Dialog-Cl6MN8if.js.map} +1 -1
- package/dist/chunks/FormView-BSWaXDav.js +3 -0
- package/dist/chunks/{FormView-Dtzh5qLB.js.map → FormView-BSWaXDav.js.map} +1 -1
- package/dist/chunks/{FormView-Bq74K6dj.js → FormView-HWvIdFkB.js} +10 -6
- package/dist/chunks/FormView-HWvIdFkB.js.map +1 -0
- package/dist/chunks/ListView-Dcz0Gs6D.js +492 -0
- package/dist/chunks/ListView-Dcz0Gs6D.js.map +1 -0
- package/dist/chunks/ListView-eXgn0F0-.js +2 -0
- package/dist/chunks/ListView-eXgn0F0-.js.map +1 -0
- package/dist/chunks/MetricsMiniChartWidget-BkTEO87S.js +2 -0
- package/dist/chunks/{MetricsMiniChartWidget-BHLlrFJf.js.map → MetricsMiniChartWidget-BkTEO87S.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-CoapKHw0.js → MetricsMiniChartWidget-Y70IHFIe.js} +3 -3
- package/dist/chunks/{MetricsMiniChartWidget-CoapKHw0.js.map → MetricsMiniChartWidget-Y70IHFIe.js.map} +1 -1
- package/dist/chunks/PDFViewer-C0aMqGJL.js +2 -0
- package/dist/chunks/{PDFViewer-DxoRBrX9.js.map → PDFViewer-C0aMqGJL.js.map} +1 -1
- package/dist/chunks/{PDFViewer-BXcYgXKx.js → PDFViewer-DkbYnnoV.js} +3 -3
- package/dist/chunks/{PDFViewer-BXcYgXKx.js.map → PDFViewer-DkbYnnoV.js.map} +1 -1
- package/dist/chunks/Page-CvbwEoLv.js +2 -0
- package/dist/chunks/{Page-Cw4qW3aV.js.map → Page-CvbwEoLv.js.map} +1 -1
- package/dist/chunks/{Page-CFzSUQLz.js → Page-Deq4y2Kq.js} +2 -2
- package/dist/chunks/{Page-CFzSUQLz.js.map → Page-Deq4y2Kq.js.map} +1 -1
- package/dist/chunks/Rest-BNYqGlnP.js +2 -0
- package/dist/chunks/Rest-BNYqGlnP.js.map +1 -0
- package/dist/chunks/{WebApp-MzDCFzar.js → Rest-CS4jRCAs.js} +5 -1389
- package/dist/chunks/Rest-CS4jRCAs.js.map +1 -0
- package/dist/chunks/{TopNav-DaX7k8M8.js → TopNav-DXLRdU0o.js} +5 -5
- package/dist/chunks/{TopNav-DaX7k8M8.js.map → TopNav-DXLRdU0o.js.map} +1 -1
- package/dist/chunks/TopNav-GyvI31l2.js +2 -0
- package/dist/chunks/{TopNav-DgPBfS1e.js.map → TopNav-GyvI31l2.js.map} +1 -1
- package/dist/chunks/WebApp-BAadsDpO.js +2 -0
- package/dist/chunks/WebApp-BAadsDpO.js.map +1 -0
- package/dist/chunks/WebApp-BVGZC2rj.js +1388 -0
- package/dist/chunks/WebApp-BVGZC2rj.js.map +1 -0
- package/dist/css/web-mojo.css +2 -2
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.cjs.js.map +1 -1
- package/dist/docit.es.js +12 -10
- package/dist/docit.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +120 -116
- package/dist/index.es.js.map +1 -1
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.cjs.js.map +1 -1
- package/dist/lightbox.es.js +121 -121
- package/dist/lightbox.es.js.map +1 -1
- package/dist/map.cjs.js +2 -0
- package/dist/map.cjs.js.map +1 -0
- package/dist/map.es.js +188 -0
- package/dist/map.es.js.map +1 -0
- package/dist/timeline.cjs.js +2 -0
- package/dist/timeline.cjs.js.map +1 -0
- package/dist/timeline.es.js +225 -0
- package/dist/timeline.es.js.map +1 -0
- package/package.json +9 -1
- package/dist/chunks/ChatView-D9hJ2u6c.js.map +0 -1
- package/dist/chunks/ChatView-u-UdWa-P.js +0 -2
- package/dist/chunks/ChatView-u-UdWa-P.js.map +0 -1
- package/dist/chunks/ContextMenu-BlmrYFlZ.js +0 -2155
- package/dist/chunks/ContextMenu-BlmrYFlZ.js.map +0 -1
- package/dist/chunks/ContextMenu-CfXiUGrB.js +0 -3
- package/dist/chunks/ContextMenu-CfXiUGrB.js.map +0 -1
- package/dist/chunks/DataView-CorHtzkO.js +0 -2
- package/dist/chunks/Dialog-ifYDY_7S.js +0 -2
- package/dist/chunks/FormView-Bq74K6dj.js.map +0 -1
- package/dist/chunks/FormView-Dtzh5qLB.js +0 -3
- package/dist/chunks/MetricsMiniChartWidget-BHLlrFJf.js +0 -2
- package/dist/chunks/PDFViewer-DxoRBrX9.js +0 -2
- package/dist/chunks/Page-Cw4qW3aV.js +0 -2
- package/dist/chunks/TopNav-DgPBfS1e.js +0 -2
- package/dist/chunks/WebApp-DHNZIzfN.js +0 -2
- package/dist/chunks/WebApp-DHNZIzfN.js.map +0 -1
- package/dist/chunks/WebApp-MzDCFzar.js.map +0 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { M as Model, C as Collection
|
|
2
|
-
import { r as rest, V as View, d as dataFormatter,
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { M as Model, C as Collection } from "./Collection-OP7c9Zyu.js";
|
|
2
|
+
import { r as rest, V as View, d as dataFormatter, a as Mustache } from "./Rest-CS4jRCAs.js";
|
|
3
|
+
import { T as ToastService, G as GroupList, c as UserList } from "./ContextMenu-ixMyAUGS.js";
|
|
4
|
+
import { P as Page } from "./Page-Deq4y2Kq.js";
|
|
5
|
+
import Dialog from "./Dialog-C2mRUxga.js";
|
|
6
|
+
import { L as ListViewItem, a as ListView } from "./ListView-Dcz0Gs6D.js";
|
|
7
|
+
import { F as FormView, a as applyFileDropMixin } from "./FormView-HWvIdFkB.js";
|
|
6
8
|
class S3Bucket extends Model {
|
|
7
9
|
constructor(data = {}) {
|
|
8
10
|
super(data, {
|
|
@@ -2753,12 +2755,24 @@ const GeoIPForms = {
|
|
|
2753
2755
|
title: "Edit Security",
|
|
2754
2756
|
size: "md",
|
|
2755
2757
|
fields: [
|
|
2758
|
+
{
|
|
2759
|
+
name: "threat_level",
|
|
2760
|
+
label: "Threat Level",
|
|
2761
|
+
type: "select",
|
|
2762
|
+
cols: 12,
|
|
2763
|
+
options: [
|
|
2764
|
+
{ value: "", label: "None" },
|
|
2765
|
+
{ value: "low", label: "Low" },
|
|
2766
|
+
{ value: "medium", label: "Medium" },
|
|
2767
|
+
{ value: "high", label: "High" },
|
|
2768
|
+
{ value: "critical", label: "Critical" }
|
|
2769
|
+
]
|
|
2770
|
+
},
|
|
2756
2771
|
{ name: "is_tor", label: "TOR Exit Node", type: "switch", cols: 6 },
|
|
2757
2772
|
{ name: "is_vpn", label: "VPN", type: "switch", cols: 6 },
|
|
2758
2773
|
{ name: "is_proxy", label: "Proxy", type: "switch", cols: 6 },
|
|
2759
2774
|
{ name: "is_cloud", label: "Cloud Provider", type: "switch", cols: 6 },
|
|
2760
|
-
{ name: "is_datacenter", label: "Datacenter", type: "switch", cols: 6 }
|
|
2761
|
-
{ name: "threat_level", label: "Threat Level", type: "text", cols: 6 }
|
|
2775
|
+
{ name: "is_datacenter", label: "Datacenter", type: "switch", cols: 6 }
|
|
2762
2776
|
]
|
|
2763
2777
|
},
|
|
2764
2778
|
editNetwork: {
|
|
@@ -2916,491 +2930,6 @@ class TicketNoteList extends Collection {
|
|
|
2916
2930
|
});
|
|
2917
2931
|
}
|
|
2918
2932
|
}
|
|
2919
|
-
class ListViewItem extends View {
|
|
2920
|
-
constructor(options = {}) {
|
|
2921
|
-
super({
|
|
2922
|
-
className: "list-view-item",
|
|
2923
|
-
...options
|
|
2924
|
-
});
|
|
2925
|
-
this.selected = false;
|
|
2926
|
-
this.index = options.index ?? 0;
|
|
2927
|
-
this.listView = options.listView ?? null;
|
|
2928
|
-
if (!this.template) {
|
|
2929
|
-
this.template = `
|
|
2930
|
-
<div class="list-item-content" data-action="select">
|
|
2931
|
-
{{#model}}
|
|
2932
|
-
{{#id}}<span class="item-id">{{id}}</span>{{/id}}
|
|
2933
|
-
{{#name}}<span class="item-name">{{name}}</span>{{/name}}
|
|
2934
|
-
{{#title}}<span class="item-title">{{title}}</span>{{/title}}
|
|
2935
|
-
{{#label}}<span class="item-label">{{label}}</span>{{/label}}
|
|
2936
|
-
{{#description}}<p class="item-description">{{description}}</p>{{/description}}
|
|
2937
|
-
{{/model}}
|
|
2938
|
-
{{^model}}
|
|
2939
|
-
<span class="item-empty">No data</span>
|
|
2940
|
-
{{/model}}
|
|
2941
|
-
</div>
|
|
2942
|
-
`;
|
|
2943
|
-
}
|
|
2944
|
-
}
|
|
2945
|
-
/**
|
|
2946
|
-
* Handle item selection action
|
|
2947
|
-
*/
|
|
2948
|
-
async onActionSelect(event, _element) {
|
|
2949
|
-
event.stopPropagation();
|
|
2950
|
-
if (this.selected) {
|
|
2951
|
-
this.deselect();
|
|
2952
|
-
} else {
|
|
2953
|
-
this.select();
|
|
2954
|
-
}
|
|
2955
|
-
}
|
|
2956
|
-
/**
|
|
2957
|
-
* Select this item
|
|
2958
|
-
*/
|
|
2959
|
-
select() {
|
|
2960
|
-
if (this.selected) return;
|
|
2961
|
-
this.selected = true;
|
|
2962
|
-
this.addClass("selected");
|
|
2963
|
-
this.emit("item:select", {
|
|
2964
|
-
item: this,
|
|
2965
|
-
model: this.model,
|
|
2966
|
-
index: this.index,
|
|
2967
|
-
data: this.model?.toJSON ? this.model.toJSON() : this.model
|
|
2968
|
-
});
|
|
2969
|
-
if (this.listView) {
|
|
2970
|
-
this.listView.emit("item:select", {
|
|
2971
|
-
item: this,
|
|
2972
|
-
model: this.model,
|
|
2973
|
-
index: this.index,
|
|
2974
|
-
data: this.model?.toJSON ? this.model.toJSON() : this.model
|
|
2975
|
-
});
|
|
2976
|
-
}
|
|
2977
|
-
}
|
|
2978
|
-
/**
|
|
2979
|
-
* Deselect this item
|
|
2980
|
-
*/
|
|
2981
|
-
deselect() {
|
|
2982
|
-
if (!this.selected) return;
|
|
2983
|
-
this.selected = false;
|
|
2984
|
-
this.removeClass("selected");
|
|
2985
|
-
this.emit("item:deselect", {
|
|
2986
|
-
item: this,
|
|
2987
|
-
model: this.model,
|
|
2988
|
-
index: this.index,
|
|
2989
|
-
data: this.model?.toJSON ? this.model.toJSON() : this.model
|
|
2990
|
-
});
|
|
2991
|
-
if (this.listView) {
|
|
2992
|
-
this.listView.emit("item:deselect", {
|
|
2993
|
-
item: this,
|
|
2994
|
-
model: this.model,
|
|
2995
|
-
index: this.index,
|
|
2996
|
-
data: this.model?.toJSON ? this.model.toJSON() : this.model
|
|
2997
|
-
});
|
|
2998
|
-
}
|
|
2999
|
-
}
|
|
3000
|
-
/**
|
|
3001
|
-
* Handle click events on the item
|
|
3002
|
-
*/
|
|
3003
|
-
async onActionDefault(action, _event, _element) {
|
|
3004
|
-
this.emit("item:click", {
|
|
3005
|
-
item: this,
|
|
3006
|
-
model: this.model,
|
|
3007
|
-
index: this.index,
|
|
3008
|
-
action,
|
|
3009
|
-
data: this.model?.toJSON ? this.model.toJSON() : this.model
|
|
3010
|
-
});
|
|
3011
|
-
if (this.listView) {
|
|
3012
|
-
this.listView.emit("item:click", {
|
|
3013
|
-
item: this,
|
|
3014
|
-
model: this.model,
|
|
3015
|
-
index: this.index,
|
|
3016
|
-
action,
|
|
3017
|
-
data: this.model?.toJSON ? this.model.toJSON() : this.model
|
|
3018
|
-
});
|
|
3019
|
-
}
|
|
3020
|
-
}
|
|
3021
|
-
/**
|
|
3022
|
-
* Set the item's index in the list
|
|
3023
|
-
*/
|
|
3024
|
-
setIndex(index) {
|
|
3025
|
-
this.index = index;
|
|
3026
|
-
this.element.setAttribute("data-index", index);
|
|
3027
|
-
return this;
|
|
3028
|
-
}
|
|
3029
|
-
/**
|
|
3030
|
-
* Update the item's selection state
|
|
3031
|
-
*/
|
|
3032
|
-
setSelected(selected) {
|
|
3033
|
-
if (selected) {
|
|
3034
|
-
this.select();
|
|
3035
|
-
} else {
|
|
3036
|
-
this.deselect();
|
|
3037
|
-
}
|
|
3038
|
-
return this;
|
|
3039
|
-
}
|
|
3040
|
-
/**
|
|
3041
|
-
* Override destroy to clean up references
|
|
3042
|
-
*/
|
|
3043
|
-
async destroy() {
|
|
3044
|
-
this.listView = null;
|
|
3045
|
-
await super.destroy();
|
|
3046
|
-
}
|
|
3047
|
-
}
|
|
3048
|
-
class ListView extends View {
|
|
3049
|
-
constructor(options = {}) {
|
|
3050
|
-
super({
|
|
3051
|
-
className: "list-view",
|
|
3052
|
-
template: `
|
|
3053
|
-
<div class="list-view-container">
|
|
3054
|
-
{{#loading}}
|
|
3055
|
-
<div class="list-loading">
|
|
3056
|
-
<div class="spinner-border spinner-border-sm" role="status">
|
|
3057
|
-
<span class="visually-hidden">Loading...</span>
|
|
3058
|
-
</div>
|
|
3059
|
-
Loading...
|
|
3060
|
-
</div>
|
|
3061
|
-
{{/loading}}
|
|
3062
|
-
{{^loading}}
|
|
3063
|
-
{{#isEmpty}}
|
|
3064
|
-
<div class="list-empty">
|
|
3065
|
-
{{emptyMessage}}
|
|
3066
|
-
</div>
|
|
3067
|
-
{{/isEmpty}}
|
|
3068
|
-
{{^isEmpty}}
|
|
3069
|
-
<div class="list-items" data-container="items"></div>
|
|
3070
|
-
{{/isEmpty}}
|
|
3071
|
-
{{/loading}}
|
|
3072
|
-
</div>
|
|
3073
|
-
`,
|
|
3074
|
-
...options
|
|
3075
|
-
});
|
|
3076
|
-
this.collection = null;
|
|
3077
|
-
this.itemViews = /* @__PURE__ */ new Map();
|
|
3078
|
-
this.selectedItems = /* @__PURE__ */ new Set();
|
|
3079
|
-
this.itemTemplate = options.itemTemplate || null;
|
|
3080
|
-
this.itemClass = options.itemClass || ListViewItem;
|
|
3081
|
-
this.selectionMode = options.selectionMode || "none";
|
|
3082
|
-
this.emptyMessage = options.emptyMessage || "No items to display";
|
|
3083
|
-
this.loading = false;
|
|
3084
|
-
this.isEmpty = true;
|
|
3085
|
-
}
|
|
3086
|
-
/**
|
|
3087
|
-
* Override onInit to set up initial state
|
|
3088
|
-
*/
|
|
3089
|
-
async onInit() {
|
|
3090
|
-
this._initCollection(this.options.collection || this.options.Collection);
|
|
3091
|
-
}
|
|
3092
|
-
/**
|
|
3093
|
-
* Initialize the collection
|
|
3094
|
-
*/
|
|
3095
|
-
_initCollection(collectionOrClass) {
|
|
3096
|
-
if (!collectionOrClass) {
|
|
3097
|
-
console.log("Collection not provided");
|
|
3098
|
-
return;
|
|
3099
|
-
}
|
|
3100
|
-
if (collectionOrClass instanceof Collection) {
|
|
3101
|
-
this.setCollection(collectionOrClass);
|
|
3102
|
-
} else if (typeof collectionOrClass === "function") {
|
|
3103
|
-
const collection = new collectionOrClass();
|
|
3104
|
-
this.setCollection(collection);
|
|
3105
|
-
} else if (Array.isArray(collectionOrClass)) {
|
|
3106
|
-
const collection = new Collection(null, {}, collectionOrClass);
|
|
3107
|
-
this.setCollection(collection);
|
|
3108
|
-
}
|
|
3109
|
-
}
|
|
3110
|
-
/**
|
|
3111
|
-
* Set the collection for this list view
|
|
3112
|
-
*/
|
|
3113
|
-
setCollection(collection) {
|
|
3114
|
-
if (this.collection === collection) return this;
|
|
3115
|
-
if (this.collection) {
|
|
3116
|
-
this.collection.off("add", this._onModelsAdded, this);
|
|
3117
|
-
this.collection.off("remove", this._onModelsRemoved, this);
|
|
3118
|
-
this.collection.off("reset", this._onCollectionReset, this);
|
|
3119
|
-
this.collection.off("fetch:start", this._onFetchStart, this);
|
|
3120
|
-
this.collection.off("fetch:end", this._onFetchEnd, this);
|
|
3121
|
-
}
|
|
3122
|
-
this.collection = collection;
|
|
3123
|
-
if (this.options.collectionParams) {
|
|
3124
|
-
this.collection.params = { ...this.options.collectionParams, ...this.collection.params };
|
|
3125
|
-
}
|
|
3126
|
-
if (this.collection) {
|
|
3127
|
-
this.collection.on("add", this._onModelsAdded, this);
|
|
3128
|
-
this.collection.on("remove", this._onModelsRemoved, this);
|
|
3129
|
-
this.collection.on("reset", this._onCollectionReset, this);
|
|
3130
|
-
this.collection.on("fetch:start", this._onFetchStart, this);
|
|
3131
|
-
this.collection.on("fetch:end", this._onFetchEnd, this);
|
|
3132
|
-
this._buildItems();
|
|
3133
|
-
}
|
|
3134
|
-
return this;
|
|
3135
|
-
}
|
|
3136
|
-
async _renderChildren() {
|
|
3137
|
-
await super._renderChildren();
|
|
3138
|
-
const itemsContainer = this.getChildElement("items");
|
|
3139
|
-
if (!itemsContainer) {
|
|
3140
|
-
return;
|
|
3141
|
-
}
|
|
3142
|
-
this.forEachItem((item, index) => {
|
|
3143
|
-
itemsContainer.appendChild(item.element);
|
|
3144
|
-
item.render(false);
|
|
3145
|
-
});
|
|
3146
|
-
}
|
|
3147
|
-
/**
|
|
3148
|
-
* Build item views for all models in collection
|
|
3149
|
-
*/
|
|
3150
|
-
_buildItems() {
|
|
3151
|
-
this._clearItems();
|
|
3152
|
-
if (!this.collection || this.collection.isEmpty()) {
|
|
3153
|
-
this.isEmpty = true;
|
|
3154
|
-
this.emit("list:empty");
|
|
3155
|
-
return;
|
|
3156
|
-
}
|
|
3157
|
-
this.isEmpty = false;
|
|
3158
|
-
this.collection.forEach((model, index) => {
|
|
3159
|
-
this._createItemView(model, index);
|
|
3160
|
-
});
|
|
3161
|
-
this.emit("list:loaded", { count: this.collection.length() });
|
|
3162
|
-
if (this.isMounted()) {
|
|
3163
|
-
this.render();
|
|
3164
|
-
}
|
|
3165
|
-
}
|
|
3166
|
-
/**
|
|
3167
|
-
* Create an item view for a model
|
|
3168
|
-
* The itemTemplate is passed as the template option to the itemClass constructor
|
|
3169
|
-
*/
|
|
3170
|
-
_createItemView(model, index) {
|
|
3171
|
-
if (this.itemViews.has(model.id)) return;
|
|
3172
|
-
const itemView = new this.itemClass({
|
|
3173
|
-
model,
|
|
3174
|
-
index,
|
|
3175
|
-
listView: this,
|
|
3176
|
-
template: this.itemTemplate
|
|
3177
|
-
// Pass the itemTemplate to the item view
|
|
3178
|
-
});
|
|
3179
|
-
this.itemViews.set(model.id, itemView);
|
|
3180
|
-
itemView.on("item:select", this._onItemSelect.bind(this));
|
|
3181
|
-
itemView.on("item:deselect", this._onItemDeselect.bind(this));
|
|
3182
|
-
return itemView;
|
|
3183
|
-
}
|
|
3184
|
-
/**
|
|
3185
|
-
* Clear all item views
|
|
3186
|
-
*/
|
|
3187
|
-
_clearItems() {
|
|
3188
|
-
this.forEachItem((itemView) => {
|
|
3189
|
-
this.removeChild(itemView.id);
|
|
3190
|
-
});
|
|
3191
|
-
this.itemViews.clear();
|
|
3192
|
-
this.selectedItems.clear();
|
|
3193
|
-
}
|
|
3194
|
-
/**
|
|
3195
|
-
* Handle models added to collection
|
|
3196
|
-
*/
|
|
3197
|
-
_onModelsAdded(event) {
|
|
3198
|
-
const { models } = event;
|
|
3199
|
-
models.forEach((model) => {
|
|
3200
|
-
const index = this.collection.models.indexOf(model);
|
|
3201
|
-
this._createItemView(model, index);
|
|
3202
|
-
});
|
|
3203
|
-
this.isEmpty = this.collection.isEmpty();
|
|
3204
|
-
if (!this.loading && this.isMounted()) {
|
|
3205
|
-
this.render();
|
|
3206
|
-
}
|
|
3207
|
-
}
|
|
3208
|
-
/**
|
|
3209
|
-
* Handle models removed from collection
|
|
3210
|
-
*/
|
|
3211
|
-
_onModelsRemoved(event) {
|
|
3212
|
-
const { models } = event;
|
|
3213
|
-
models.forEach((model) => {
|
|
3214
|
-
const itemView = this.itemViews.get(model.id);
|
|
3215
|
-
if (itemView) {
|
|
3216
|
-
this.removeChild(itemView.id);
|
|
3217
|
-
this.itemViews.delete(model.id);
|
|
3218
|
-
this.selectedItems.delete(model.id);
|
|
3219
|
-
}
|
|
3220
|
-
});
|
|
3221
|
-
this.isEmpty = this.collection.isEmpty();
|
|
3222
|
-
if (!this.loading && this.isMounted()) {
|
|
3223
|
-
this.render();
|
|
3224
|
-
}
|
|
3225
|
-
if (this.isEmpty) {
|
|
3226
|
-
this.emit("list:empty");
|
|
3227
|
-
}
|
|
3228
|
-
}
|
|
3229
|
-
/**
|
|
3230
|
-
* Handle collection reset
|
|
3231
|
-
*/
|
|
3232
|
-
_onCollectionReset(_event) {
|
|
3233
|
-
this._buildItems();
|
|
3234
|
-
}
|
|
3235
|
-
/**
|
|
3236
|
-
* Handle fetch start
|
|
3237
|
-
*/
|
|
3238
|
-
_onFetchStart() {
|
|
3239
|
-
this.loading = true;
|
|
3240
|
-
if (this.isMounted()) {
|
|
3241
|
-
this.render();
|
|
3242
|
-
}
|
|
3243
|
-
}
|
|
3244
|
-
/**
|
|
3245
|
-
* Handle fetch end
|
|
3246
|
-
*/
|
|
3247
|
-
_onFetchEnd() {
|
|
3248
|
-
this.loading = false;
|
|
3249
|
-
if (this.isMounted()) {
|
|
3250
|
-
this.render();
|
|
3251
|
-
}
|
|
3252
|
-
}
|
|
3253
|
-
/**
|
|
3254
|
-
* Handle item selection
|
|
3255
|
-
*/
|
|
3256
|
-
_onItemSelect(event) {
|
|
3257
|
-
const { model, item } = event;
|
|
3258
|
-
if (this.selectionMode === "none") {
|
|
3259
|
-
item.deselect();
|
|
3260
|
-
return;
|
|
3261
|
-
}
|
|
3262
|
-
if (this.selectionMode === "single") {
|
|
3263
|
-
this.itemViews.forEach((view, id) => {
|
|
3264
|
-
if (id !== model.id && view.selected) {
|
|
3265
|
-
view.deselect();
|
|
3266
|
-
}
|
|
3267
|
-
});
|
|
3268
|
-
this.selectedItems.clear();
|
|
3269
|
-
}
|
|
3270
|
-
this.selectedItems.add(model.id);
|
|
3271
|
-
this.emit("selection:change", {
|
|
3272
|
-
selected: Array.from(this.selectedItems),
|
|
3273
|
-
item,
|
|
3274
|
-
model
|
|
3275
|
-
});
|
|
3276
|
-
}
|
|
3277
|
-
/**
|
|
3278
|
-
* Handle item deselection
|
|
3279
|
-
*/
|
|
3280
|
-
_onItemDeselect(event) {
|
|
3281
|
-
const { model } = event;
|
|
3282
|
-
this.selectedItems.delete(model.id);
|
|
3283
|
-
this.emit("selection:change", {
|
|
3284
|
-
selected: Array.from(this.selectedItems),
|
|
3285
|
-
item: event.item,
|
|
3286
|
-
model
|
|
3287
|
-
});
|
|
3288
|
-
}
|
|
3289
|
-
/**
|
|
3290
|
-
* Get selected items
|
|
3291
|
-
*/
|
|
3292
|
-
getSelectedItems() {
|
|
3293
|
-
const selected = [];
|
|
3294
|
-
this.selectedItems.forEach((id) => {
|
|
3295
|
-
const itemView = this.itemViews.get(id);
|
|
3296
|
-
if (itemView) {
|
|
3297
|
-
selected.push({
|
|
3298
|
-
view: itemView,
|
|
3299
|
-
model: itemView.model,
|
|
3300
|
-
data: itemView.model?.toJSON ? itemView.model.toJSON() : itemView.model
|
|
3301
|
-
});
|
|
3302
|
-
}
|
|
3303
|
-
});
|
|
3304
|
-
return selected;
|
|
3305
|
-
}
|
|
3306
|
-
/**
|
|
3307
|
-
* Iterate over each item view in the list
|
|
3308
|
-
* @param {function} callback - Function to execute for each item (itemView, model, index)
|
|
3309
|
-
* @param {object} thisArg - Optional value to use as this when executing callback
|
|
3310
|
-
* @returns {ListView} Returns the ListView for chaining
|
|
3311
|
-
*/
|
|
3312
|
-
forEachItem(callback, thisArg) {
|
|
3313
|
-
if (typeof callback !== "function") {
|
|
3314
|
-
throw new TypeError("Callback must be a function");
|
|
3315
|
-
}
|
|
3316
|
-
let index = 0;
|
|
3317
|
-
this.itemViews.forEach((itemView, modelId) => {
|
|
3318
|
-
callback.call(thisArg, itemView, itemView.model, index++);
|
|
3319
|
-
});
|
|
3320
|
-
return this;
|
|
3321
|
-
}
|
|
3322
|
-
/**
|
|
3323
|
-
* Clear selection
|
|
3324
|
-
*/
|
|
3325
|
-
clearSelection() {
|
|
3326
|
-
this.forEachItem((itemView) => {
|
|
3327
|
-
if (itemView.selected) {
|
|
3328
|
-
itemView.deselect();
|
|
3329
|
-
}
|
|
3330
|
-
});
|
|
3331
|
-
this.selectedItems.clear();
|
|
3332
|
-
this.emit("selection:change", {
|
|
3333
|
-
selected: []
|
|
3334
|
-
});
|
|
3335
|
-
}
|
|
3336
|
-
/**
|
|
3337
|
-
* Select item by model ID
|
|
3338
|
-
*/
|
|
3339
|
-
selectItem(modelId) {
|
|
3340
|
-
const itemView = this.itemViews.get(modelId);
|
|
3341
|
-
if (itemView) {
|
|
3342
|
-
itemView.select();
|
|
3343
|
-
}
|
|
3344
|
-
return this;
|
|
3345
|
-
}
|
|
3346
|
-
/**
|
|
3347
|
-
* Deselect item by model ID
|
|
3348
|
-
*/
|
|
3349
|
-
deselectItem(modelId) {
|
|
3350
|
-
const itemView = this.itemViews.get(modelId);
|
|
3351
|
-
if (itemView) {
|
|
3352
|
-
itemView.deselect();
|
|
3353
|
-
}
|
|
3354
|
-
return this;
|
|
3355
|
-
}
|
|
3356
|
-
/**
|
|
3357
|
-
* Set or update the item template
|
|
3358
|
-
* @param {string} template - New template string for items
|
|
3359
|
-
* @param {boolean} rerender - Whether to re-render existing items with new template
|
|
3360
|
-
* @returns {ListView} Returns the ListView for chaining
|
|
3361
|
-
*/
|
|
3362
|
-
setItemTemplate(template, rerender = false) {
|
|
3363
|
-
this.itemTemplate = template;
|
|
3364
|
-
if (rerender && this.itemViews.size > 0) {
|
|
3365
|
-
this.forEachItem((itemView) => {
|
|
3366
|
-
itemView.setTemplate(template);
|
|
3367
|
-
if (itemView.isMounted()) {
|
|
3368
|
-
itemView.render();
|
|
3369
|
-
}
|
|
3370
|
-
});
|
|
3371
|
-
}
|
|
3372
|
-
return this;
|
|
3373
|
-
}
|
|
3374
|
-
async onAfterMount() {
|
|
3375
|
-
await super.onAfterMount();
|
|
3376
|
-
if (this.collection && (this.options.fetchOnMount || !this.collection.lastFetchTime)) {
|
|
3377
|
-
this.collection.fetch();
|
|
3378
|
-
}
|
|
3379
|
-
}
|
|
3380
|
-
/**
|
|
3381
|
-
* Refresh the list (re-fetch if collection supports it)
|
|
3382
|
-
*/
|
|
3383
|
-
async refresh() {
|
|
3384
|
-
if (this.collection && this.collection.restEnabled) {
|
|
3385
|
-
return await this.collection.fetch();
|
|
3386
|
-
}
|
|
3387
|
-
this._buildItems();
|
|
3388
|
-
}
|
|
3389
|
-
/**
|
|
3390
|
-
* Override destroy to clean up
|
|
3391
|
-
*/
|
|
3392
|
-
async destroy() {
|
|
3393
|
-
if (this.collection) {
|
|
3394
|
-
this.collection.off("add", this._onModelsAdded, this);
|
|
3395
|
-
this.collection.off("remove", this._onModelsRemoved, this);
|
|
3396
|
-
this.collection.off("reset", this._onCollectionReset, this);
|
|
3397
|
-
this.collection.off("fetch:start", this._onFetchStart, this);
|
|
3398
|
-
this.collection.off("fetch:end", this._onFetchEnd, this);
|
|
3399
|
-
}
|
|
3400
|
-
this._clearItems();
|
|
3401
|
-
await super.destroy();
|
|
3402
|
-
}
|
|
3403
|
-
}
|
|
3404
2933
|
class TableRow extends ListViewItem {
|
|
3405
2934
|
constructor(options = {}) {
|
|
3406
2935
|
super({
|
|
@@ -7466,98 +6995,96 @@ class ChatView extends View {
|
|
|
7466
6995
|
}
|
|
7467
6996
|
}
|
|
7468
6997
|
export {
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
6998
|
+
ComparatorOptions as $,
|
|
6999
|
+
IncidentEventForms as A,
|
|
7000
|
+
Incident as B,
|
|
7472
7001
|
ChatView as C,
|
|
7473
|
-
|
|
7002
|
+
IncidentList as D,
|
|
7474
7003
|
EmailDomain as E,
|
|
7475
7004
|
FilePreviewView as F,
|
|
7476
|
-
|
|
7477
|
-
|
|
7005
|
+
IncidentForms as G,
|
|
7006
|
+
IncidentRuleSet as H,
|
|
7478
7007
|
IncidentEvent as I,
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7008
|
+
IncidentRuleSetList as J,
|
|
7009
|
+
IncidentRule as K,
|
|
7010
|
+
IncidentRuleList as L,
|
|
7482
7011
|
Member as M,
|
|
7483
|
-
|
|
7484
|
-
|
|
7012
|
+
IncidentHistory as N,
|
|
7013
|
+
IncidentHistoryList as O,
|
|
7485
7014
|
ProgressView as P,
|
|
7486
|
-
|
|
7487
|
-
|
|
7015
|
+
RuleSetList as Q,
|
|
7016
|
+
RuleSet as R,
|
|
7488
7017
|
S3Bucket as S,
|
|
7489
7018
|
TableView as T,
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7019
|
+
RuleSetForms as U,
|
|
7020
|
+
Rule as V,
|
|
7021
|
+
RuleList as W,
|
|
7022
|
+
RuleForms as X,
|
|
7023
|
+
IncidentStats as Y,
|
|
7024
|
+
BundleByOptions as Z,
|
|
7025
|
+
MatchByOptions as _,
|
|
7497
7026
|
TableRow as a,
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
TicketList as ay,
|
|
7536
|
-
TicketNote as az,
|
|
7027
|
+
ValueTypeOptions as a0,
|
|
7028
|
+
Job as a1,
|
|
7029
|
+
JobList as a2,
|
|
7030
|
+
JobForms as a3,
|
|
7031
|
+
JobLog as a4,
|
|
7032
|
+
JobLogList as a5,
|
|
7033
|
+
JobEvent as a6,
|
|
7034
|
+
JobEventList as a7,
|
|
7035
|
+
JobsEngineStats as a8,
|
|
7036
|
+
JobRunner as a9,
|
|
7037
|
+
TicketCategories as aA,
|
|
7038
|
+
JobRunnerList as aa,
|
|
7039
|
+
JobRunnerForms as ab,
|
|
7040
|
+
Log as ac,
|
|
7041
|
+
LogList as ad,
|
|
7042
|
+
MemberList as ae,
|
|
7043
|
+
MemberForms as af,
|
|
7044
|
+
MetricsPermission as ag,
|
|
7045
|
+
MetricsPermissionList as ah,
|
|
7046
|
+
MetricsForms as ai,
|
|
7047
|
+
PushDevice as aj,
|
|
7048
|
+
PushDeviceList as ak,
|
|
7049
|
+
PushTemplate as al,
|
|
7050
|
+
PushTemplateList as am,
|
|
7051
|
+
PushConfig as an,
|
|
7052
|
+
PushConfigList as ao,
|
|
7053
|
+
PushDelivery as ap,
|
|
7054
|
+
PushDeliveryList as aq,
|
|
7055
|
+
PushConfigForms as ar,
|
|
7056
|
+
PushTemplateForms as as,
|
|
7057
|
+
GeoLocatedIP as at,
|
|
7058
|
+
GeoLocatedIPList as au,
|
|
7059
|
+
Ticket as av,
|
|
7060
|
+
TicketList as aw,
|
|
7061
|
+
TicketNote as ax,
|
|
7062
|
+
TicketNoteList as ay,
|
|
7063
|
+
TicketForms as az,
|
|
7537
7064
|
TablePage as b,
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7065
|
+
TabView as c,
|
|
7066
|
+
ChatMessageView as d,
|
|
7067
|
+
ChatInputView as e,
|
|
7068
|
+
FileUpload as f,
|
|
7069
|
+
S3BucketList as g,
|
|
7070
|
+
S3BucketForms as h,
|
|
7071
|
+
EmailDomainList as i,
|
|
7072
|
+
EmailDomainForms as j,
|
|
7073
|
+
Mailbox as k,
|
|
7074
|
+
MailboxList as l,
|
|
7075
|
+
MailboxForms as m,
|
|
7076
|
+
SentMessage as n,
|
|
7077
|
+
SentMessageList as o,
|
|
7078
|
+
SentMessageForms as p,
|
|
7079
|
+
EmailTemplate as q,
|
|
7080
|
+
EmailTemplateList as r,
|
|
7081
|
+
EmailTemplateForms as s,
|
|
7082
|
+
FileManager as t,
|
|
7083
|
+
FileManagerList as u,
|
|
7084
|
+
FileManagerForms as v,
|
|
7085
|
+
File$1 as w,
|
|
7086
|
+
FileList as x,
|
|
7087
|
+
FileForms as y,
|
|
7088
|
+
IncidentEventList as z
|
|
7562
7089
|
};
|
|
7563
|
-
//# sourceMappingURL=ChatView-
|
|
7090
|
+
//# sourceMappingURL=ChatView-Dcz7LkwL.js.map
|