avo 1.20.2.pre.2 → 1.22.0.pre.1
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 +57 -57
- data/README.md +1 -1
- data/app/assets/builds/avo.css +405 -224
- data/app/assets/builds/avo.js +16 -6
- data/app/assets/builds/avo.js.map +2 -2
- data/app/assets/stylesheets/avo.css +1 -1
- data/app/assets/stylesheets/css/fonts.css +53 -0
- data/app/assets/stylesheets/css/pagination.css +9 -9
- data/app/assets/stylesheets/css/search.css +3 -2
- data/app/assets/svgs/dashboards-icon.svg +6 -0
- data/app/assets/svgs/resources-icon.svg +13 -0
- data/app/assets/svgs/three-dots.svg +5 -0
- data/app/assets/svgs/tools-icon.svg +3 -0
- data/app/components/avo/button_component.html.erb +1 -0
- data/app/components/avo/button_component.rb +111 -0
- data/app/components/avo/fields/belongs_to_field/autocomplete_component.html.erb +14 -7
- data/app/components/avo/fields/belongs_to_field/autocomplete_component.rb +47 -3
- data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +59 -38
- data/app/components/avo/fields/belongs_to_field/edit_component.rb +37 -0
- data/app/components/avo/fields/boolean_field/index_component.html.erb +1 -1
- data/app/components/avo/index/field_wrapper_component.html.erb +8 -2
- data/app/components/avo/index/field_wrapper_component.rb +2 -1
- data/app/components/avo/index/resource_table_component.html.erb +3 -3
- data/app/components/avo/index/table_row_component.html.erb +1 -1
- data/app/components/avo/navigation_heading_component.html.erb +2 -2
- data/app/components/avo/navigation_heading_component.rb +5 -1
- data/app/components/avo/navigation_link_component.html.erb +2 -2
- data/app/components/avo/navigation_link_component.rb +5 -0
- data/app/components/avo/panel_component.html.erb +5 -3
- data/app/components/avo/sidebar_profile_component.html.erb +28 -0
- data/app/components/avo/sidebar_profile_component.rb +43 -0
- data/app/components/avo/views/resource_index_component.html.erb +8 -7
- data/app/components/avo/views/resource_show_component.html.erb +10 -0
- data/app/controllers/avo/application_controller.rb +14 -12
- data/app/controllers/avo/base_controller.rb +4 -1
- data/app/helpers/avo/application_helper.rb +7 -5
- data/app/helpers/avo/resources_helper.rb +2 -2
- data/app/javascript/js/controllers/fields/date_field_controller.js +10 -2
- data/app/javascript/js/controllers/item_selector_controller.js +29 -19
- data/app/javascript/js/controllers/search_controller.js +8 -3
- data/app/views/avo/base/_actions.html.erb +4 -3
- data/app/views/avo/base/_filters.html.erb +3 -1
- data/app/views/avo/partials/_global_search.html.erb +2 -2
- data/app/views/avo/partials/_logo.html.erb +3 -1
- data/app/views/avo/partials/_navbar.html.erb +11 -0
- data/app/views/avo/partials/_paginator.html.erb +4 -3
- data/app/views/avo/partials/_resource_search.html.erb +1 -1
- data/app/views/avo/partials/_sidebar.html.erb +35 -0
- data/app/views/avo/partials/_table_header.html.erb +3 -3
- data/app/views/avo/partials/_turbo_frame_wrap.html.erb +7 -1
- data/app/views/avo/partials/_view_toggle_button.html.erb +22 -16
- data/app/views/layouts/avo/application.html.erb +3 -13
- data/db/factories.rb +7 -3
- data/lib/avo/app.rb +4 -3
- data/lib/avo/base_resource.rb +16 -14
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.css +405 -224
- data/public/avo-assets/avo.js +16 -6
- data/public/avo-assets/avo.js.map +2 -2
- data/public/avo-assets/fonts/inter-v7-latin-500.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.svg +351 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.svg +351 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.svg +352 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.svg +351 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.woff2 +0 -0
- data/public/avo-assets/logo.png +0 -0
- metadata +32 -5
- data/app/assets/images/avo/logo.png +0 -0
- data/app/views/avo/partials/_profile_dropdown.html.erb +0 -25
- data/app/views/avo/sidebar/_sidebar.html.erb +0 -33
data/public/avo-assets/avo.js
CHANGED
@@ -83368,6 +83368,9 @@
|
|
83368
83368
|
var esm_default = flatpickr;
|
83369
83369
|
|
83370
83370
|
// app/javascript/js/controllers/fields/date_field_controller.js
|
83371
|
+
function universalTimestamp(timestampStr) {
|
83372
|
+
return new Date(new Date(timestampStr).getTime() + new Date(timestampStr).getTimezoneOffset() * 60 * 1e3);
|
83373
|
+
}
|
83371
83374
|
var date_field_controller_default = class extends Controller {
|
83372
83375
|
connect() {
|
83373
83376
|
const options = {
|
@@ -83393,7 +83396,7 @@
|
|
83393
83396
|
options.time_24hr = castBoolean(this.inputTarget.dataset.time24hr);
|
83394
83397
|
options.appTimezone = this.inputTarget.dataset.timezone;
|
83395
83398
|
} else {
|
83396
|
-
currentValue =
|
83399
|
+
currentValue = universalTimestamp(this.inputTarget.value);
|
83397
83400
|
}
|
83398
83401
|
options.defaultDate = currentValue;
|
83399
83402
|
esm_default(this.inputTarget, options);
|
@@ -83443,6 +83446,9 @@
|
|
83443
83446
|
return [];
|
83444
83447
|
}
|
83445
83448
|
}
|
83449
|
+
get actionLinks() {
|
83450
|
+
return document.querySelectorAll('.js-actions-dropdown a[data-actions-picker-target="resourceAction"]');
|
83451
|
+
}
|
83446
83452
|
set currentIds(value) {
|
83447
83453
|
this.stateHolderElement.dataset.selectedResources = JSON.stringify(value);
|
83448
83454
|
if (this.actionsPanelPresent) {
|
@@ -83476,7 +83482,7 @@
|
|
83476
83482
|
}
|
83477
83483
|
}
|
83478
83484
|
enableResourceActions() {
|
83479
|
-
|
83485
|
+
this.actionLinks.forEach((link) => {
|
83480
83486
|
link.classList.add("text-gray-700");
|
83481
83487
|
link.classList.remove("text-gray-500");
|
83482
83488
|
link.setAttribute("data-href", link.getAttribute("href"));
|
@@ -83484,7 +83490,7 @@
|
|
83484
83490
|
});
|
83485
83491
|
}
|
83486
83492
|
disableResourceActions() {
|
83487
|
-
|
83493
|
+
this.actionLinks.forEach((link) => {
|
83488
83494
|
link.classList.remove("text-gray-700");
|
83489
83495
|
link.classList.add("text-gray-500");
|
83490
83496
|
link.setAttribute("href", link.getAttribute("data-href"));
|
@@ -87339,7 +87345,9 @@
|
|
87339
87345
|
this.hiddenIdTarget.setAttribute("value", item._id);
|
87340
87346
|
this.buttonTarget.setAttribute("value", item._label);
|
87341
87347
|
document.querySelector(".aa-DetachedOverlay").remove();
|
87342
|
-
this.
|
87348
|
+
if (this.hasClearButtonTarget) {
|
87349
|
+
this.clearButtonTarget.classList.remove("hidden");
|
87350
|
+
}
|
87343
87351
|
} else {
|
87344
87352
|
turbo_es2017_esm_exports.visit(item._url, { action: "advance" });
|
87345
87353
|
}
|
@@ -87398,7 +87406,7 @@
|
|
87398
87406
|
const that = this;
|
87399
87407
|
this.buttonTarget.onclick = () => this.showSearchPanel();
|
87400
87408
|
this.clearValueTargets.forEach((target) => {
|
87401
|
-
if (target.getAttribute("value")) {
|
87409
|
+
if (target.getAttribute("value") && this.hasClearButtonTarget) {
|
87402
87410
|
this.clearButtonTarget.classList.remove("hidden");
|
87403
87411
|
}
|
87404
87412
|
});
|
@@ -87418,7 +87426,9 @@
|
|
87418
87426
|
return that.debouncedFetch(endpoint).then((response) => response.json()).then((data) => Object.keys(data).map((resourceName) => that.addSource(resourceName, data[resourceName])));
|
87419
87427
|
}
|
87420
87428
|
});
|
87421
|
-
this.buttonTarget.
|
87429
|
+
if (this.buttonTarget.dataset.shouldBeDisabled !== "true") {
|
87430
|
+
this.buttonTarget.removeAttribute("disabled");
|
87431
|
+
}
|
87422
87432
|
}
|
87423
87433
|
};
|
87424
87434
|
__publicField(search_controller_default, "targets", [
|