avo 3.1.1 → 3.1.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/builds/avo.base.css +8 -0
- data/app/assets/builds/avo.base.js +60 -29
- data/app/assets/builds/avo.base.js.map +3 -3
- data/app/components/avo/fields/has_one_field/show_component.rb +1 -0
- data/lib/avo/dynamic_router.rb +5 -29
- data/lib/avo/resources/resource_manager.rb +16 -24
- data/lib/avo/version.rb +1 -1
- data/lib/avo.rb +0 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b83432fadc60b30c7f3b0d437f979aa8655bbd6313d2b5faeb12cb4fd2f800a7
|
4
|
+
data.tar.gz: 8165df836ebf5fe3642495c1bf9349c33c7b2762203f07891ed4b21acbe7b181
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8857ce683ce342b1701188453af961517c477f62f20231e3169eeb59e25f0ef0b33931cad74b8ae9337bbc586c6ec558f617cbabb569160b8c31bc4503c8e1c
|
7
|
+
data.tar.gz: f73b1b389dafadb7ef3af706f1b6d0838b574c1efcd5f648161fd85cf52dff2d14e201da87bad105963587579dfb580c39ae15db6de14f8596f776c2b99e27a8
|
data/Gemfile.lock
CHANGED
@@ -8172,6 +8172,14 @@ tag.tagify__tag{
|
|
8172
8172
|
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
8173
|
}
|
8174
8174
|
|
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
|
+
|
8175
8183
|
.text-base{
|
8176
8184
|
font-size:1rem;
|
8177
8185
|
line-height:1.5rem
|
@@ -24381,6 +24381,30 @@
|
|
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
|
+
|
24384
24408
|
// node_modules/chartkick/dist/chartkick.js
|
24385
24409
|
var require_chartkick = __commonJS({
|
24386
24410
|
"node_modules/chartkick/dist/chartkick.js"(exports2, module2) {
|
@@ -118851,45 +118875,49 @@
|
|
118851
118875
|
var init_tabs_controller = __esm({
|
118852
118876
|
"app/javascript/js/controllers/tabs_controller.js"() {
|
118853
118877
|
init_stimulus();
|
118854
|
-
init_cast_boolean();
|
118855
118878
|
tabs_controller_default = class extends Controller {
|
118856
|
-
|
118857
|
-
|
118879
|
+
connect() {
|
118880
|
+
this.selectCurrentTab();
|
118858
118881
|
}
|
118859
|
-
|
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) {
|
118860
118900
|
return this.tabPanelTargets.find((element) => element.dataset.tabId === id);
|
118861
118901
|
}
|
118902
|
+
groupParam(groupId) {
|
118903
|
+
return encodeURIComponent(`tab-group_${groupId}`);
|
118904
|
+
}
|
118862
118905
|
changeTab(e4) {
|
118863
118906
|
return __async(this, null, function* () {
|
118864
118907
|
e4.preventDefault();
|
118865
118908
|
const { params } = e4;
|
118866
|
-
const {
|
118867
|
-
|
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);
|
118868
118915
|
this.hideAllTabs();
|
118869
|
-
this.
|
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 = "";
|
118916
|
+
this.revealTabByName(tabName);
|
118886
118917
|
});
|
118887
118918
|
}
|
118888
|
-
|
118889
|
-
this.
|
118890
|
-
}
|
118891
|
-
revealTab(id) {
|
118892
|
-
this.targetTabPanel(id).classList.remove("hidden");
|
118919
|
+
revealTabByName(name) {
|
118920
|
+
this.getTabByName(name).classList.remove("hidden");
|
118893
118921
|
}
|
118894
118922
|
hideAllTabs() {
|
118895
118923
|
this.tabPanelTargets.map((element) => element.classList.add("hidden"));
|
@@ -118898,7 +118926,8 @@
|
|
118898
118926
|
__publicField(tabs_controller_default, "targets", ["tabPanel"]);
|
118899
118927
|
__publicField(tabs_controller_default, "values", {
|
118900
118928
|
view: String,
|
118901
|
-
activeTab: String
|
118929
|
+
activeTab: String,
|
118930
|
+
groupId: String
|
118902
118931
|
});
|
118903
118932
|
}
|
118904
118933
|
});
|
@@ -125021,10 +125050,12 @@
|
|
125021
125050
|
init_turbo();
|
125022
125051
|
var import_ujs = __toESM(require_rails_ujs());
|
125023
125052
|
init_tippy_esm();
|
125053
|
+
init_local_storage_service();
|
125024
125054
|
init_chart_esm2();
|
125025
125055
|
init_active_storage();
|
125026
125056
|
init_controllers();
|
125027
125057
|
init_custom_stream_actions();
|
125058
|
+
window.Avo.localStorage = new LocalStorageService();
|
125028
125059
|
import_ujs.default.start();
|
125029
125060
|
window.Turbolinks = turbo_es2017_esm_exports;
|
125030
125061
|
var scrollTop = null;
|