Skip to content

Commit

Permalink
fix(livewire): add 'fl-no-cache' class to identify elements for remov…
Browse files Browse the repository at this point in the history
…al during Livewire page caching
  • Loading branch information
yoeunes committed Dec 16, 2023
1 parent 4196b8e commit a2a3a08
Show file tree
Hide file tree
Showing 45 changed files with 4,616 additions and 3,346 deletions.
1 change: 1 addition & 0 deletions packages/flasher/dist/common.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/flasher/dist/flasher.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion packages/flasher/dist/flasher.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
/* global Reflect, Promise, SuppressedError, Symbol */


function __spreadArray(to, from, pack) {
Expand All @@ -31,6 +31,11 @@
return to.concat(ar || Array.prototype.slice.call(from));
}

typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};

var FlasherFactory = (function () {
function FlasherFactory(viewFactory) {
this.options = {
Expand Down Expand Up @@ -111,12 +116,14 @@
var container = document.querySelector(containerSelector);
if (container) {
container.dataset.turboCache = 'false';
container.classList.add('fl-no-cache');
return container;
}
container = document.createElement('div');
container.classList.add('fl-main-container');
container.dataset.position = options.position;
container.dataset.turboCache = 'false';
container.classList.add('fl-no-cache');
Object.keys(options.style).forEach(function (key) {
container === null || container === void 0 ? void 0 : container.style.setProperty(key, options.style[key]);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/flasher/dist/flasher.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/flasher/dist/flasherFactory.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/flasher/dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion packages/flasher/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
/* global Reflect, Promise, SuppressedError, Symbol */


function __spreadArray(to, from, pack) {
Expand All @@ -27,6 +27,11 @@ function __spreadArray(to, from, pack) {
return to.concat(ar || Array.prototype.slice.call(from));
}

typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};

var FlasherFactory = (function () {
function FlasherFactory(viewFactory) {
this.options = {
Expand Down Expand Up @@ -107,12 +112,14 @@ var FlasherFactory = (function () {
var container = document.querySelector(containerSelector);
if (container) {
container.dataset.turboCache = 'false';
container.classList.add('fl-no-cache');
return container;
}
container = document.createElement('div');
container.classList.add('fl-main-container');
container.dataset.position = options.position;
container.dataset.turboCache = 'false';
container.classList.add('fl-no-cache');
Object.keys(options.style).forEach(function (key) {
container === null || container === void 0 ? void 0 : container.style.setProperty(key, options.style[key]);
});
Expand Down
2 changes: 2 additions & 0 deletions packages/flasher/src/flasherFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ export default class FlasherFactory implements NotificationFactoryInterface {
let container = document.querySelector(containerSelector) as HTMLDivElement;
if (container) {
container.dataset.turboCache = 'false';
container.classList.add('fl-no-cache');
return container;
}

container = document.createElement('div');
container.classList.add('fl-main-container');
container.dataset.position = options.position;
container.dataset.turboCache = 'false';
container.classList.add('fl-no-cache');

Object.keys(options.style).forEach((key: string) => {
container?.style.setProperty(key, options.style[key as keyof Properties] as string);
Expand Down
2 changes: 1 addition & 1 deletion packages/noty/dist/flasher-noty.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a2a3a08

Please sign in to comment.