Skip to content

Commit 0bc01cd

Browse files
committed
Remove unused QueryStringPlugin
1 parent 03f63cc commit 0bc01cd

File tree

5 files changed

+0
-79
lines changed

5 files changed

+0
-79
lines changed

src/LiveComponent/assets/dist/Component/plugins/QueryStringPlugin.d.ts

-13
This file was deleted.

src/LiveComponent/assets/dist/live_controller.d.ts

-9
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ export default class LiveControllerDefault extends Controller<HTMLElement> imple
4949
type: StringConstructor;
5050
default: string;
5151
};
52-
queryMapping: {
53-
type: ObjectConstructor;
54-
default: {};
55-
};
5652
};
5753
readonly nameValue: string;
5854
readonly urlValue: string;
@@ -76,11 +72,6 @@ export default class LiveControllerDefault extends Controller<HTMLElement> imple
7672
readonly debounceValue: number;
7773
readonly fingerprintValue: string;
7874
readonly requestMethodValue: 'get' | 'post';
79-
readonly queryMappingValue: {
80-
[p: string]: {
81-
name: string;
82-
};
83-
};
8475
private proxiedComponent;
8576
private mutationObserver;
8677
component: Component;

src/LiveComponent/assets/dist/live_controller.js

-21
Original file line numberDiff line numberDiff line change
@@ -2856,25 +2856,6 @@ class PollingPlugin {
28562856
}
28572857
}
28582858

2859-
class QueryStringPlugin {
2860-
constructor(mapping) {
2861-
this.mapping = mapping;
2862-
}
2863-
attachToComponent(component) {
2864-
component.on('render:finished', (component) => {
2865-
const urlUtils = new UrlUtils(window.location.href);
2866-
const currentUrl = urlUtils.toString();
2867-
Object.entries(this.mapping).forEach(([prop, mapping]) => {
2868-
const value = component.valueStore.get(prop);
2869-
urlUtils.set(mapping.name, value);
2870-
});
2871-
if (currentUrl !== urlUtils.toString()) {
2872-
HistoryStrategy.replace(new UrlUtils(currentUrl));
2873-
}
2874-
});
2875-
}
2876-
}
2877-
28782859
class SetValueOntoModelFieldsPlugin {
28792860
attachToComponent(component) {
28802861
this.synchronizeValueOfModelFields(component);
@@ -3084,7 +3065,6 @@ class LiveControllerDefault extends Controller {
30843065
new PageUnloadingPlugin(),
30853066
new PollingPlugin(),
30863067
new SetValueOntoModelFieldsPlugin(),
3087-
new QueryStringPlugin(this.queryMappingValue),
30883068
new ChildComponentPlugin(this.component),
30893069
];
30903070
plugins.forEach((plugin) => {
@@ -3194,7 +3174,6 @@ LiveControllerDefault.values = {
31943174
debounce: { type: Number, default: 150 },
31953175
fingerprint: { type: String, default: '' },
31963176
requestMethod: { type: String, default: 'post' },
3197-
queryMapping: { type: Object, default: {} },
31983177
};
31993178
LiveControllerDefault.backendFactory = (controller) => new Backend(controller.urlValue, controller.requestMethodValue);
32003179

src/LiveComponent/assets/src/Component/plugins/QueryStringPlugin.ts

-32
This file was deleted.

src/LiveComponent/assets/src/live_controller.ts

-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import LoadingPlugin from './Component/plugins/LoadingPlugin';
88
import PageUnloadingPlugin from './Component/plugins/PageUnloadingPlugin';
99
import type { PluginInterface } from './Component/plugins/PluginInterface';
1010
import PollingPlugin from './Component/plugins/PollingPlugin';
11-
import QueryStringPlugin from './Component/plugins/QueryStringPlugin';
1211
import SetValueOntoModelFieldsPlugin from './Component/plugins/SetValueOntoModelFieldsPlugin';
1312
import ValidatedFieldsPlugin from './Component/plugins/ValidatedFieldsPlugin';
1413
import { type DirectiveModifier, parseDirectives } from './Directive/directives_parser';
@@ -42,7 +41,6 @@ export default class LiveControllerDefault extends Controller<HTMLElement> imple
4241
debounce: { type: Number, default: 150 },
4342
fingerprint: { type: String, default: '' },
4443
requestMethod: { type: String, default: 'post' },
45-
queryMapping: { type: Object, default: {} },
4644
};
4745

4846
declare readonly nameValue: string;
@@ -61,7 +59,6 @@ export default class LiveControllerDefault extends Controller<HTMLElement> imple
6159
declare readonly debounceValue: number;
6260
declare readonly fingerprintValue: string;
6361
declare readonly requestMethodValue: 'get' | 'post';
64-
declare readonly queryMappingValue: { [p: string]: { name: string } };
6562

6663
/** The component, wrapped in the convenience Proxy */
6764
private proxiedComponent: Component;
@@ -301,7 +298,6 @@ export default class LiveControllerDefault extends Controller<HTMLElement> imple
301298
new PageUnloadingPlugin(),
302299
new PollingPlugin(),
303300
new SetValueOntoModelFieldsPlugin(),
304-
new QueryStringPlugin(this.queryMappingValue),
305301
new ChildComponentPlugin(this.component),
306302
];
307303
plugins.forEach((plugin) => {

0 commit comments

Comments
 (0)