avo 3.1.2 → 3.1.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b83432fadc60b30c7f3b0d437f979aa8655bbd6313d2b5faeb12cb4fd2f800a7
4
- data.tar.gz: 8165df836ebf5fe3642495c1bf9349c33c7b2762203f07891ed4b21acbe7b181
3
+ metadata.gz: 58201ebf40ea090bc7ff03e588ae9dba48c913c4d39b16eaa4d0068a99c45211
4
+ data.tar.gz: 2c3efea520399494770be31f454086cc4ea6aa24eaa16c735099ef336e059e8d
5
5
  SHA512:
6
- metadata.gz: b8857ce683ce342b1701188453af961517c477f62f20231e3169eeb59e25f0ef0b33931cad74b8ae9337bbc586c6ec558f617cbabb569160b8c31bc4503c8e1c
7
- data.tar.gz: f73b1b389dafadb7ef3af706f1b6d0838b574c1efcd5f648161fd85cf52dff2d14e201da87bad105963587579dfb580c39ae15db6de14f8596f776c2b99e27a8
6
+ metadata.gz: 5ab96094a881dea361ab8c88817030bf277dc737e70f5f273da59545f1db19e6145aaa14877db6bc6b8aa91347df5c2099a1c57183dc52f6ed10dd896831f852
7
+ data.tar.gz: 404d1af6a00033fc33b3e242fb5e10a1c9a66a0b79771615586466848c6022a3a495ca6ec3e890d394f8c3f5c02c28817c30f30e6563dd443aa1cf0cdd7a7084
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (3.1.2)
4
+ avo (3.1.3)
5
5
  actionview (>= 6.1)
6
6
  active_link_to
7
7
  activerecord (>= 6.1)
@@ -7029,6 +7029,10 @@ tag.tagify__tag{
7029
7029
  width:1rem
7030
7030
  }
7031
7031
 
7032
+ .w-screen{
7033
+ width:100vw
7034
+ }
7035
+
7032
7036
  .w-auto{
7033
7037
  width:auto
7034
7038
  }
@@ -8172,14 +8176,6 @@ tag.tagify__tag{
8172
8176
  font-family:"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
8173
8177
  }
8174
8178
 
8175
- .font-serif{
8176
- font-family:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif
8177
- }
8178
-
8179
- .font-mono{
8180
- font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
8181
- }
8182
-
8183
8179
  .text-base{
8184
8180
  font-size:1rem;
8185
8181
  line-height:1.5rem
@@ -24381,30 +24381,6 @@
24381
24381
  }
24382
24382
  });
24383
24383
 
24384
- // app/javascript/js/local-storage-service.js
24385
- var LocalStorageService;
24386
- var init_local_storage_service = __esm({
24387
- "app/javascript/js/local-storage-service.js"() {
24388
- LocalStorageService = class {
24389
- constructor() {
24390
- __publicField(this, "prefix", "avo");
24391
- }
24392
- prefixedKey(key) {
24393
- return `${this.prefix}.${key}`;
24394
- }
24395
- get(key) {
24396
- return window.localStorage.getItem(this.prefixedKey(key));
24397
- }
24398
- set(key, value) {
24399
- return window.localStorage.setItem(this.prefixedKey(key), value);
24400
- }
24401
- remove(key) {
24402
- return window.localStorage.removeItem(this.prefixedKey(key));
24403
- }
24404
- };
24405
- }
24406
- });
24407
-
24408
24384
  // node_modules/chartkick/dist/chartkick.js
24409
24385
  var require_chartkick = __commonJS({
24410
24386
  "node_modules/chartkick/dist/chartkick.js"(exports2, module2) {
@@ -118875,49 +118851,45 @@
118875
118851
  var init_tabs_controller = __esm({
118876
118852
  "app/javascript/js/controllers/tabs_controller.js"() {
118877
118853
  init_stimulus();
118854
+ init_cast_boolean();
118878
118855
  tabs_controller_default = class extends Controller {
118879
- connect() {
118880
- this.selectCurrentTab();
118856
+ get currentTab() {
118857
+ return this.tabPanelTargets.find((element) => element.dataset.tabId === this.activeTabValue);
118881
118858
  }
118882
- selectCurrentTab() {
118883
- const params = {};
118884
- Array.from(new URL(window.location).searchParams.entries()).forEach(([key, value]) => {
118885
- params[key] = value;
118886
- });
118887
- const lsValue = window.Avo.localStorage.get(`resources.user.tabgroups.${this.groupIdValue}.selectedTab`);
118888
- let groupId = null;
118889
- if (params[this.groupParam(this.groupIdValue)]) {
118890
- groupId = params[this.groupParam(this.groupIdValue)];
118891
- } else if (lsValue) {
118892
- groupId = lsValue;
118893
- }
118894
- if (this.getTabByName(groupId)) {
118895
- this.hideAllTabs();
118896
- this.revealTabByName(groupId);
118897
- }
118898
- }
118899
- getTabByName(id) {
118859
+ targetTabPanel(id) {
118900
118860
  return this.tabPanelTargets.find((element) => element.dataset.tabId === id);
118901
118861
  }
118902
- groupParam(groupId) {
118903
- return encodeURIComponent(`tab-group_${groupId}`);
118904
- }
118905
118862
  changeTab(e4) {
118906
118863
  return __async(this, null, function* () {
118907
118864
  e4.preventDefault();
118908
118865
  const { params } = e4;
118909
- const { groupId, tabName, resourceName } = params;
118910
- const key = `resources.${resourceName}.tabgroups.${groupId}.selectedTab`;
118911
- const u3 = new URL(window.location);
118912
- u3.searchParams.set(this.groupParam(groupId), encodeURIComponent(tabName));
118913
- window.history.replaceState(null, "", u3.pathname + u3.search);
118914
- window.Avo.localStorage.set(key, tabName);
118866
+ const { id } = params;
118867
+ yield this.setTheTargetPanelHeight(id);
118915
118868
  this.hideAllTabs();
118916
- this.revealTabByName(tabName);
118869
+ this.revealTab(id);
118870
+ this.markTabLoaded(id);
118871
+ this.activeTabValue = id;
118872
+ });
118873
+ }
118874
+ setTheTargetPanelHeight(id) {
118875
+ return __async(this, null, function* () {
118876
+ if (this.viewValue === "edit" || this.viewValue === "new") {
118877
+ return;
118878
+ }
118879
+ if (castBoolean(this.targetTabPanel(id).dataset.loaded)) {
118880
+ return;
118881
+ }
118882
+ const { height } = this.currentTab.getBoundingClientRect();
118883
+ this.targetTabPanel(id).style.height = `${height}px`;
118884
+ yield this.targetTabPanel(id).loaded;
118885
+ this.targetTabPanel(id).style.height = "";
118917
118886
  });
118918
118887
  }
118919
- revealTabByName(name) {
118920
- this.getTabByName(name).classList.remove("hidden");
118888
+ markTabLoaded(id) {
118889
+ this.targetTabPanel(id).dataset.loaded = true;
118890
+ }
118891
+ revealTab(id) {
118892
+ this.targetTabPanel(id).classList.remove("hidden");
118921
118893
  }
118922
118894
  hideAllTabs() {
118923
118895
  this.tabPanelTargets.map((element) => element.classList.add("hidden"));
@@ -118926,8 +118898,7 @@
118926
118898
  __publicField(tabs_controller_default, "targets", ["tabPanel"]);
118927
118899
  __publicField(tabs_controller_default, "values", {
118928
118900
  view: String,
118929
- activeTab: String,
118930
- groupId: String
118901
+ activeTab: String
118931
118902
  });
118932
118903
  }
118933
118904
  });
@@ -125050,12 +125021,10 @@
125050
125021
  init_turbo();
125051
125022
  var import_ujs = __toESM(require_rails_ujs());
125052
125023
  init_tippy_esm();
125053
- init_local_storage_service();
125054
125024
  init_chart_esm2();
125055
125025
  init_active_storage();
125056
125026
  init_controllers();
125057
125027
  init_custom_stream_actions();
125058
- window.Avo.localStorage = new LocalStorageService();
125059
125028
  import_ujs.default.start();
125060
125029
  window.Turbolinks = turbo_es2017_esm_exports;
125061
125030
  var scrollTop = null;