aa-intel-tool 2.8.0__py3-none-any.whl → 2.8.1__py3-none-any.whl

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.
Files changed (32) hide show
  1. aa_intel_tool/__init__.py +1 -1
  2. aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.css +5 -0
  3. aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css +1 -1
  4. aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css.map +1 -1
  5. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.js +240 -315
  6. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.min.js +1 -1
  7. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.min.js.map +1 -1
  8. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.js +70 -90
  9. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js +1 -1
  10. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js.map +1 -1
  11. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.js +58 -90
  12. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.min.js +1 -1
  13. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.min.js.map +1 -1
  14. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.js +158 -197
  15. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js +1 -1
  16. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js.map +1 -1
  17. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition-highlight.js +79 -93
  18. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition-highlight.min.js +1 -1
  19. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition-highlight.min.js.map +1 -1
  20. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.js +67 -91
  21. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js +1 -1
  22. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js.map +1 -1
  23. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.js +333 -132
  24. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js +1 -1
  25. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js.map +1 -1
  26. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.js +16 -9
  27. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js +1 -1
  28. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js.map +1 -1
  29. {aa_intel_tool-2.8.0.dist-info → aa_intel_tool-2.8.1.dist-info}/METADATA +1 -1
  30. {aa_intel_tool-2.8.0.dist-info → aa_intel_tool-2.8.1.dist-info}/RECORD +32 -32
  31. {aa_intel_tool-2.8.0.dist-info → aa_intel_tool-2.8.1.dist-info}/WHEEL +0 -0
  32. {aa_intel_tool-2.8.0.dist-info → aa_intel_tool-2.8.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,140 +1,108 @@
1
1
  /* jshint -W097 */
2
2
  'use strict';
3
3
 
4
- /* Highlighting similar table rows on mouse over and click for d-scans
5
- ------------------------------------------------------------------------------------- */
6
-
7
4
  const elementShipClassTable = $('table.aa-intel-dscan-ship-classes');
8
5
  const elementShipTypeTable = $('table.aa-intel-dscan-ship-types');
9
6
 
10
-
11
7
  /**
12
- * Determine if we can remove all sticky states for this corporation
8
+ * Determine if we can remove all sticky states for this shiptype
13
9
  *
14
10
  * @param {string} byData The table data attribute for which this function is triggered
15
- * @param {element} tableRow The table row that is to be changed
11
+ * @param {jQuery|HTMLElement} tableRow The table row that is to be changed
16
12
  * @returns {boolean}
17
13
  */
18
14
  const removeDscanShiptypeStickyComplete = (byData, tableRow) => {
19
- let removeSticky = true;
15
+ const shiptypeId = tableRow.data('shiptype-id');
16
+ const relatedElements = elementShipClassTable.find(`tr[data-shiptype-id="${shiptypeId}"]`);
20
17
 
21
- elementShipClassTable.find(`tr[data-shiptype-id="${tableRow.data('shiptype-id')}"]`).each((i, el) => {
22
- if (byData === 'shiptype' && !$(el).hasClass('aa-intel-highlight-sticky')) {
23
- removeSticky = false;
24
- } else if (byData === 'shipclass' && $(el).hasClass('aa-intel-highlight-sticky')) {
25
- removeSticky = false;
26
- }
27
- });
18
+ return relatedElements.toArray().every((el) => {
19
+ const $el = $(el);
28
20
 
29
- return removeSticky;
21
+ return byData === 'shiptype'
22
+ ? $el.hasClass('aa-intel-highlight-sticky') // jshint ignore:line
23
+ : !$el.hasClass('aa-intel-highlight-sticky');
24
+ });
30
25
  };
31
26
 
32
-
33
27
  /**
34
- * Add highlight to other tables
28
+ * Apply or remove CSS class to target elements
35
29
  *
36
30
  * @param {string} byData The table data attribute for which this function is triggered
37
- * @param {element} tableRow The table row that is to be changed
31
+ * @param {jQuery|HTMLElement} tableRow The table row that is to be changed
32
+ * @param {string} className The CSS class to add or remove
33
+ * @param {boolean} add Whether to add (true) or remove (false) the class
38
34
  */
39
- const addDscanHighlight = (byData, tableRow) => { // eslint-disable-line no-unused-vars
40
- elementShipClassTable
41
- .find(`tr[data-${byData}-id="${tableRow.data(`${byData}-id`)}"]`)
42
- .addClass('aa-intel-highlight');
43
-
44
- elementShipTypeTable
45
- .find(`tr[data-shiptype-id="${tableRow.data('shiptype-id')}"]`)
46
- .addClass('aa-intel-highlight');
47
- };
48
-
35
+ const manipulateTableHighlight = ({byData, tableRow, className, add}) => {
36
+ const action = add ? 'addClass' : 'removeClass';
37
+ const shiptypeId = tableRow.data('shiptype-id');
38
+ const dataId = tableRow.data(`${byData}-id`);
49
39
 
50
- /**
51
- * Add highlight to other tables
52
- *
53
- * @param {string} byData The table data attribute for which this function is triggered
54
- * @param {element} tableRow The table row that is to be changed
55
- */
56
- const removeDscanHighlight = (byData, tableRow) => { // eslint-disable-line no-unused-vars
57
- elementShipClassTable
58
- .find(`tr[data-${byData}-id="${tableRow.data(`${byData}-id`)}"]`)
59
- .removeClass('aa-intel-highlight');
40
+ if (byData === 'shiptype') {
41
+ elementShipClassTable.find(`tr[data-shiptype-id="${shiptypeId}"]`)[action](className);
42
+ } else if (byData === 'shipclass') {
43
+ elementShipClassTable.find(`tr[data-shipclass-id="${dataId}"]`)[action](className);
60
44
 
61
- elementShipTypeTable
62
- .find(`tr[data-shiptype-id="${tableRow.data('shiptype-id')}"]`)
63
- .removeClass('aa-intel-highlight');
45
+ if (add || removeDscanShiptypeStickyComplete(byData, tableRow)) {
46
+ elementShipTypeTable.find(`tr[data-shiptype-id="${shiptypeId}"]`)[action](className);
47
+ }
48
+ }
64
49
  };
65
50
 
66
-
67
51
  /**
68
- * Add sticky highlight to other tables
52
+ * Add highlight to other tables
69
53
  *
70
54
  * @param {string} byData The table data attribute for which this function is triggered
71
- * @param {element} tableRow The table row that is to be changed
55
+ * @param {jQuery|HTMLElement} tableRow The table row that is to be changed
72
56
  */
73
- const addDscanSticky = (byData, tableRow) => {
74
- tableRow.addClass('aa-intel-highlight-sticky');
75
-
76
- if (byData === 'shiptype') {
77
- elementShipClassTable
78
- .find(`tr[data-shiptype-id="${tableRow.data('shiptype-id')}"]`)
79
- .addClass('aa-intel-highlight-sticky');
80
- }
81
-
82
- if (byData === 'shipclass') {
83
- elementShipClassTable
84
- .find(`tr[data-shipclass-id="${tableRow.data('shipclass-id')}"]`)
85
- .addClass('aa-intel-highlight-sticky');
86
-
87
- elementShipTypeTable
88
- .find(`tr[data-shiptype-id="${tableRow.data('shiptype-id')}"]`)
89
- .addClass('aa-intel-highlight-sticky');
90
- }
57
+ const addDscanHighlight = (byData, tableRow) => { // eslint-disable-line no-unused-vars
58
+ manipulateTableHighlight({
59
+ byData: byData,
60
+ tableRow: tableRow,
61
+ className: 'aa-intel-highlight',
62
+ add: true
63
+ });
91
64
  };
92
65
 
93
-
94
66
  /**
95
- * Remove sticky highlight to other tables
67
+ * Remove highlight from other tables
96
68
  *
97
69
  * @param {string} byData The table data attribute for which this function is triggered
98
- * @param {element} tableRow The table row that is to be changed
70
+ * @param {jQuery|HTMLElement} tableRow The table row that is to be changed
99
71
  */
100
- const removeDscanSticky = (byData, tableRow) => {
101
- tableRow.removeClass('aa-intel-highlight-sticky');
102
-
103
- if (byData === 'shiptype') {
104
- elementShipClassTable
105
- .find(`tr[data-shiptype-id="${tableRow.data('shiptype-id')}"]`)
106
- .removeClass('aa-intel-highlight-sticky');
107
- }
108
-
109
- if (byData === 'shipclass') {
110
- elementShipClassTable
111
- .find(`tr[data-shipclass-id="${tableRow.data('shipclass-id')}"]`)
112
- .removeClass('aa-intel-highlight-sticky');
113
-
114
- if (removeDscanShiptypeStickyComplete(byData, tableRow) === true) {
115
- elementShipTypeTable
116
- .find(`tr[data-shiptype-id="${tableRow.data('shiptype-id')}"]`)
117
- .removeClass('aa-intel-highlight-sticky');
118
- }
119
- }
72
+ const removeDscanHighlight = (byData, tableRow) => { // eslint-disable-line no-unused-vars
73
+ manipulateTableHighlight({
74
+ byData: byData,
75
+ tableRow: tableRow,
76
+ className: 'aa-intel-highlight',
77
+ add: false
78
+ });
120
79
  };
121
80
 
122
-
123
81
  /**
124
82
  * Change the status of the sticky highlight
125
83
  *
126
84
  * @param {string} byData The table data attribute for which this function is triggered
127
- * @param {element} tableRow The table row that is to be changed
85
+ * @param {jQuery|HTMLElement} tableRow The table row that is to be changed
128
86
  */
129
87
  const changeDscanStickyHighlight = (byData, tableRow) => { // eslint-disable-line no-unused-vars
130
88
  if (
131
89
  (
132
90
  byData === 'shiptype' && tableRow.hasClass('aa-intel-highlight-sticky') === true
133
- && removeDscanShiptypeStickyComplete(byData, tableRow) === true
91
+ && removeDscanShiptypeStickyComplete(byData, tableRow) === true // jshint ignore:line
134
92
  ) || (byData === 'shipclass' && tableRow.hasClass('aa-intel-highlight-sticky') === true)
135
93
  ) {
136
- removeDscanSticky(byData, tableRow);
94
+ manipulateTableHighlight({
95
+ byData: byData,
96
+ tableRow: tableRow,
97
+ className: 'aa-intel-highlight-sticky',
98
+ add: false
99
+ });
137
100
  } else {
138
- addDscanSticky(byData, tableRow);
101
+ manipulateTableHighlight({
102
+ byData: byData,
103
+ tableRow: tableRow,
104
+ className: 'aa-intel-highlight-sticky',
105
+ add: true
106
+ });
139
107
  }
140
108
  };
@@ -1,2 +1,2 @@
1
- const elementShipClassTable=$("table.aa-intel-dscan-ship-classes"),elementShipTypeTable=$("table.aa-intel-dscan-ship-types"),removeDscanShiptypeStickyComplete=(e,a)=>{let t=!0;return elementShipClassTable.find(`tr[data-shiptype-id="${a.data("shiptype-id")}"]`).each((a,i)=>{("shiptype"===e&&!$(i).hasClass("aa-intel-highlight-sticky")||"shipclass"===e&&$(i).hasClass("aa-intel-highlight-sticky"))&&(t=!1)}),t},addDscanHighlight=(a,i)=>{elementShipClassTable.find(`tr[data-${a}-id="${i.data(`${a}-id`)}"]`).addClass("aa-intel-highlight"),elementShipTypeTable.find(`tr[data-shiptype-id="${i.data("shiptype-id")}"]`).addClass("aa-intel-highlight")},removeDscanHighlight=(a,i)=>{elementShipClassTable.find(`tr[data-${a}-id="${i.data(`${a}-id`)}"]`).removeClass("aa-intel-highlight"),elementShipTypeTable.find(`tr[data-shiptype-id="${i.data("shiptype-id")}"]`).removeClass("aa-intel-highlight")},addDscanSticky=(a,i)=>{i.addClass("aa-intel-highlight-sticky"),"shiptype"===a&&elementShipClassTable.find(`tr[data-shiptype-id="${i.data("shiptype-id")}"]`).addClass("aa-intel-highlight-sticky"),"shipclass"===a&&(elementShipClassTable.find(`tr[data-shipclass-id="${i.data("shipclass-id")}"]`).addClass("aa-intel-highlight-sticky"),elementShipTypeTable.find(`tr[data-shiptype-id="${i.data("shiptype-id")}"]`).addClass("aa-intel-highlight-sticky"))},removeDscanSticky=(a,i)=>{i.removeClass("aa-intel-highlight-sticky"),"shiptype"===a&&elementShipClassTable.find(`tr[data-shiptype-id="${i.data("shiptype-id")}"]`).removeClass("aa-intel-highlight-sticky"),"shipclass"===a&&(elementShipClassTable.find(`tr[data-shipclass-id="${i.data("shipclass-id")}"]`).removeClass("aa-intel-highlight-sticky"),!0===removeDscanShiptypeStickyComplete(a,i))&&elementShipTypeTable.find(`tr[data-shiptype-id="${i.data("shiptype-id")}"]`).removeClass("aa-intel-highlight-sticky")},changeDscanStickyHighlight=(a,i)=>{("shiptype"===a&&!0===i.hasClass("aa-intel-highlight-sticky")&&!0===removeDscanShiptypeStickyComplete(a,i)||"shipclass"===a&&!0===i.hasClass("aa-intel-highlight-sticky")?removeDscanSticky:addDscanSticky)(a,i)};
1
+ 'use strict';const elementShipClassTable=$('table.aa-intel-dscan-ship-classes'),elementShipTypeTable=$('table.aa-intel-dscan-ship-types'),removeDscanShiptypeStickyComplete=(a,t)=>{const e=t.data('shiptype-id');return elementShipClassTable.find(`tr[data-shiptype-id="${e}"]`).toArray().every(t=>{const e=$(t);return'shiptype'===a?e.hasClass('aa-intel-highlight-sticky'):!e.hasClass('aa-intel-highlight-sticky')})},manipulateTableHighlight=({byData:a,tableRow:t,className:e,add:i})=>{const l=i?'addClass':'removeClass',s=t.data('shiptype-id'),h=t.data(`${a}-id`);'shiptype'===a?elementShipClassTable.find(`tr[data-shiptype-id="${s}"]`)[l](e):'shipclass'===a&&(elementShipClassTable.find(`tr[data-shipclass-id="${h}"]`)[l](e),(i||removeDscanShiptypeStickyComplete(a,t))&&elementShipTypeTable.find(`tr[data-shiptype-id="${s}"]`)[l](e))},addDscanHighlight=(a,t)=>{manipulateTableHighlight({byData:a,tableRow:t,className:'aa-intel-highlight',add:!0})},removeDscanHighlight=(a,t)=>{manipulateTableHighlight({byData:a,tableRow:t,className:'aa-intel-highlight',add:!1})},changeDscanStickyHighlight=(a,t)=>{'shiptype'===a&&!0===t.hasClass('aa-intel-highlight-sticky')&&!0===removeDscanShiptypeStickyComplete(a,t)||'shipclass'===a&&!0===t.hasClass('aa-intel-highlight-sticky')?manipulateTableHighlight({byData:a,tableRow:t,className:'aa-intel-highlight-sticky',add:!1}):manipulateTableHighlight({byData:a,tableRow:t,className:'aa-intel-highlight-sticky',add:!0})};
2
2
  //# sourceMappingURL=aa-intel-tool-dscan-highlight.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["aa-intel-tool-dscan-highlight.js"],"names":["elementShipClassTable","$","elementShipTypeTable","removeDscanShiptypeStickyComplete","byData","tableRow","let","removeSticky","find","data","each","i","el","hasClass","addDscanHighlight","addClass","removeDscanHighlight","removeClass","addDscanSticky","removeDscanSticky","changeDscanStickyHighlight"],"mappings":"AAMA,MAAMA,sBAAwBC,EAAE,mCAAmC,EAC7DC,qBAAuBD,EAAE,iCAAiC,EAU1DE,kCAAoC,CAACC,EAAQC,KAC/CC,IAAIC,EAAe,CAAA,EAUnB,OARAP,sBAAsBQ,6BAA6BH,EAASI,KAAK,aAAa,KAAK,EAAEC,KAAK,CAACC,EAAGC,MAC3E,aAAXR,GAA0BH,CAAAA,EAAEW,CAAE,EAAEC,SAAS,2BAA2B,GAElD,cAAXT,GAA0BH,EAAEW,CAAE,EAAEC,SAAS,2BAA2B,KAD3EN,EAAe,CAAA,EAIvB,CAAC,EAEMA,CACX,EASMO,kBAAoB,CAACV,EAAQC,KAC/BL,sBACKQ,gBAAgBJ,SAAcC,EAASI,QAAQL,MAAW,KAAK,EAC/DW,SAAS,oBAAoB,EAElCb,qBACKM,6BAA6BH,EAASI,KAAK,aAAa,KAAK,EAC7DM,SAAS,oBAAoB,CACtC,EASMC,qBAAuB,CAACZ,EAAQC,KAClCL,sBACKQ,gBAAgBJ,SAAcC,EAASI,QAAQL,MAAW,KAAK,EAC/Da,YAAY,oBAAoB,EAErCf,qBACKM,6BAA6BH,EAASI,KAAK,aAAa,KAAK,EAC7DQ,YAAY,oBAAoB,CACzC,EASMC,eAAiB,CAACd,EAAQC,KAC5BA,EAASU,SAAS,2BAA2B,EAE9B,aAAXX,GACAJ,sBACKQ,6BAA6BH,EAASI,KAAK,aAAa,KAAK,EAC7DM,SAAS,2BAA2B,EAG9B,cAAXX,IACAJ,sBACKQ,8BAA8BH,EAASI,KAAK,cAAc,KAAK,EAC/DM,SAAS,2BAA2B,EAEzCb,qBACKM,6BAA6BH,EAASI,KAAK,aAAa,KAAK,EAC7DM,SAAS,2BAA2B,EAEjD,EASMI,kBAAoB,CAACf,EAAQC,KAC/BA,EAASY,YAAY,2BAA2B,EAEjC,aAAXb,GACAJ,sBACKQ,6BAA6BH,EAASI,KAAK,aAAa,KAAK,EAC7DQ,YAAY,2BAA2B,EAGjC,cAAXb,IACAJ,sBACKQ,8BAA8BH,EAASI,KAAK,cAAc,KAAK,EAC/DQ,YAAY,2BAA2B,EAEgB,CAAA,IAAxDd,kCAAkCC,EAAQC,CAAQ,IAClDH,qBACKM,6BAA6BH,EAASI,KAAK,aAAa,KAAK,EAC7DQ,YAAY,2BAA2B,CAGxD,EASMG,2BAA6B,CAAChB,EAAQC,MAGrB,aAAXD,GAA4E,CAAA,IAAnDC,EAASQ,SAAS,2BAA2B,GACX,CAAA,IAAxDV,kCAAkCC,EAAQC,CAAQ,GACxC,cAAXD,GAA6E,CAAA,IAAnDC,EAASQ,SAAS,2BAA2B,EAE7EM,kBAEAD,gBAFkBd,EAAQC,CAAQ,CAI1C"}
1
+ {"version":3,"names":["elementShipClassTable","$","elementShipTypeTable","removeDscanShiptypeStickyComplete","byData","tableRow","shiptypeId","data","find","toArray","every","el","$el","hasClass","manipulateTableHighlight","className","add","action","dataId","addDscanHighlight","removeDscanHighlight","changeDscanStickyHighlight"],"sources":["aa-intel-tool-dscan-highlight.js"],"mappings":"AACA,aAEA,MAAMA,sBAAwBC,EAAE,qCAC1BC,qBAAuBD,EAAE,mCASzBE,kCAAoC,CAACC,EAAQC,KAC/C,MAAMC,EAAaD,EAASE,KAAK,eAGjC,OAFwBP,sBAAsBQ,KAAK,wBAAwBF,OAEpDG,UAAUC,MAAOC,IACpC,MAAMC,EAAMX,EAAEU,GAEd,MAAkB,aAAXP,EACDQ,EAAIC,SAAS,8BACZD,EAAIC,SAAS,gCAYtBC,yBAA2B,EAAEV,SAAQC,WAAUU,YAAWC,UAC5D,MAAMC,EAASD,EAAM,WAAa,cAC5BV,EAAaD,EAASE,KAAK,eAC3BW,EAASb,EAASE,KAAK,GAAGH,QAEjB,aAAXA,EACAJ,sBAAsBQ,KAAK,wBAAwBF,OAAgBW,GAAQF,GACzD,cAAXX,IACPJ,sBAAsBQ,KAAK,yBAAyBU,OAAYD,GAAQF,IAEpEC,GAAOb,kCAAkCC,EAAQC,KACjDH,qBAAqBM,KAAK,wBAAwBF,OAAgBW,GAAQF,KAWhFI,kBAAoB,CAACf,EAAQC,KAC/BS,yBAAyB,CACrBV,OAAQA,EACRC,SAAUA,EACVU,UAAW,qBACXC,KAAK,KAUPI,qBAAuB,CAAChB,EAAQC,KAClCS,yBAAyB,CACrBV,OAAQA,EACRC,SAAUA,EACVU,UAAW,qBACXC,KAAK,KAUPK,2BAA6B,CAACjB,EAAQC,KAGrB,aAAXD,IAA4E,IAAnDC,EAASQ,SAAS,+BACgB,IAAxDV,kCAAkCC,EAAQC,IAChC,cAAXD,IAA6E,IAAnDC,EAASQ,SAAS,6BAElDC,yBAAyB,CACrBV,OAAQA,EACRC,SAAUA,EACVU,UAAW,4BACXC,KAAK,IAGTF,yBAAyB,CACrBV,OAAQA,EACRC,SAAUA,EACVU,UAAW,4BACXC,KAAK","ignoreList":[]}