@supersoniks/concorde 1.1.46 → 1.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/cli.js +0 -0
- package/concorde-core.bundle.js +20 -22
- package/concorde-core.es.js +777 -955
- package/concorde-customer.bundle.js +129 -0
- package/concorde-customer.es.js +22004 -0
- package/core/_types/types.d.ts +0 -1
- package/core/components/functional/date/date.js +15 -7
- package/core/components/functional/fetch/fetch.d.ts +1 -0
- package/core/components/functional/list/list.d.ts +33 -18
- package/core/components/functional/list/list.js +12 -22
- package/core/components/functional/queue/queue.d.ts +0 -2
- package/core/components/functional/queue/queue.js +11 -37
- package/core/components/functional/sdui/sdui.d.ts +1 -3
- package/core/components/functional/sdui/sdui.js +0 -3
- package/core/components/ui/_css/type.js +12 -12
- package/core/components/ui/button/button.d.ts +1 -0
- package/core/components/ui/button/button.js +37 -12
- package/core/components/ui/form/input/input.d.ts +0 -1
- package/core/components/ui/form/input/input.js +3 -10
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +13 -93
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +52 -181
- package/core/components/ui/image/image.d.ts +2 -0
- package/core/components/ui/image/image.js +28 -0
- package/core/components/ui/pop/pop.js +6 -17
- package/core/components/ui/theme/css/tailwind.css +0 -0
- package/core/components/ui/theme/css/tailwind.d.ts +0 -0
- package/core/components/ui/theme/theme.js +8 -6
- package/core/components/ui/toast/toast.d.ts +1 -1
- package/core/components/ui/toast/types.d.ts +1 -1
- package/core/components/ui/ui.d.ts +0 -1
- package/core/components/ui/ui.js +0 -1
- package/core/mixins/Fetcher.d.ts +1 -0
- package/core/mixins/Fetcher.js +9 -10
- package/core/mixins/FormElement.d.ts +0 -1
- package/core/mixins/FormElement.js +2 -6
- package/core/utils/LocationHandler.js +9 -3
- package/core/utils/PublisherProxy.d.ts +0 -1
- package/core/utils/PublisherProxy.js +0 -1
- package/img/concorde-logo.svg +0 -0
- package/img/concorde.png +0 -0
- package/img/concorde_def.png +0 -0
- package/mixins.d.ts +1 -0
- package/package.json +1 -1
- package/svg/regular/plane.svg +0 -0
- package/svg/solid/plane.svg +0 -0
package/core/mixins/Fetcher.js
CHANGED
|
@@ -173,9 +173,6 @@ const Fetcher = (superClass, propsType) => {
|
|
|
173
173
|
this.handleLazyLoad();
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
/**
|
|
177
|
-
* Première update, le comportement de lazyload est géré ici a l'aide d'un intersection observer.
|
|
178
|
-
*/
|
|
179
176
|
handleLazyLoad() {
|
|
180
177
|
const lazyLoad = this.getAttribute("lazyload");
|
|
181
178
|
if (lazyLoad === null) {
|
|
@@ -192,15 +189,15 @@ const Fetcher = (superClass, propsType) => {
|
|
|
192
189
|
rootMargin: Math.max(window.innerWidth * boundsRatio, window.innerHeight * boundsRatio) + "px",
|
|
193
190
|
};
|
|
194
191
|
this.iObserver = new IntersectionObserver((entries) => this.onIntersection(entries), options);
|
|
195
|
-
/**
|
|
196
|
-
* on retire cette partie car finalement on mets systématiquement un span pour la détection de l'intersection
|
|
197
|
-
*/
|
|
198
192
|
let elt = (this.shadowRoot ? this.shadowRoot.children[0] : this.children[0]);
|
|
199
|
-
if (elt
|
|
193
|
+
if ((elt === null || elt === void 0 ? void 0 : elt.nodeName.toLocaleLowerCase()) == "slot")
|
|
200
194
|
elt = elt.children[0];
|
|
201
195
|
if (!elt || elt.nodeName.toLocaleLowerCase() == "template") {
|
|
202
196
|
elt = document.createElement("span");
|
|
203
|
-
|
|
197
|
+
const style = elt.style;
|
|
198
|
+
style.position = "absolute";
|
|
199
|
+
style.pointerEvents = "none";
|
|
200
|
+
this.lazyLoadSpan = elt;
|
|
204
201
|
this.appendChild(elt);
|
|
205
202
|
}
|
|
206
203
|
if (elt) {
|
|
@@ -211,11 +208,13 @@ const Fetcher = (superClass, propsType) => {
|
|
|
211
208
|
}
|
|
212
209
|
}
|
|
213
210
|
onIntersection(entries) {
|
|
214
|
-
var _a;
|
|
211
|
+
var _a, _b;
|
|
215
212
|
for (const e of entries) {
|
|
216
213
|
if (e.isIntersecting && this.isFirstLoad) {
|
|
217
214
|
this._fetchData();
|
|
218
|
-
(_a = this.
|
|
215
|
+
(_a = this.lazyLoadSpan) === null || _a === void 0 ? void 0 : _a.remove();
|
|
216
|
+
this.lazyLoadSpan = undefined;
|
|
217
|
+
(_b = this.iObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
219
218
|
break;
|
|
220
219
|
}
|
|
221
220
|
}
|
|
@@ -11,7 +11,6 @@ export interface FormElementInterface extends SubscriberInterface {
|
|
|
11
11
|
getValueForFormPublisher(): FormElementValue;
|
|
12
12
|
validateFormElement(): void;
|
|
13
13
|
focus?: () => void;
|
|
14
|
-
forceAutoFill: boolean;
|
|
15
14
|
shadowRoot?: ShadowRoot;
|
|
16
15
|
error: boolean;
|
|
17
16
|
autofocus: boolean;
|
|
@@ -74,8 +74,7 @@ const Form = (superClass) => {
|
|
|
74
74
|
}
|
|
75
75
|
getFormPublisher() {
|
|
76
76
|
if (!this.formDataProvider)
|
|
77
|
-
this.formDataProvider =
|
|
78
|
-
this.getAncestorAttributeValue("formDataProvider");
|
|
77
|
+
this.formDataProvider = this.getAncestorAttributeValue("formDataProvider");
|
|
79
78
|
if (this.formDataProvider) {
|
|
80
79
|
return PublisherManager.get(this.formDataProvider);
|
|
81
80
|
}
|
|
@@ -121,9 +120,7 @@ const Form = (superClass) => {
|
|
|
121
120
|
}
|
|
122
121
|
initPublisher() {
|
|
123
122
|
let formPublisher = this.getFormPublisher();
|
|
124
|
-
const value = this.hasAncestorAttribute("initFromPublisher") &&
|
|
125
|
-
this._name &&
|
|
126
|
-
formPublisher[this._name].get()
|
|
123
|
+
const value = this.hasAncestorAttribute("initFromPublisher") && this._name && formPublisher[this._name].get()
|
|
127
124
|
? formPublisher[this._name].get()
|
|
128
125
|
: this.getAttribute("value");
|
|
129
126
|
if (this._name && this.publisher)
|
|
@@ -222,7 +219,6 @@ const Form = (superClass) => {
|
|
|
222
219
|
if (elt && elt.focus) {
|
|
223
220
|
elt.focus();
|
|
224
221
|
e.preventDefault();
|
|
225
|
-
e.stopPropagation();
|
|
226
222
|
}
|
|
227
223
|
});
|
|
228
224
|
}
|
|
@@ -56,7 +56,9 @@ export default class LocationHandler {
|
|
|
56
56
|
const origin = document.location.origin;
|
|
57
57
|
const urlDest = goBack || origin;
|
|
58
58
|
const isHTTP = referrer.indexOf("http") == 0;
|
|
59
|
-
const isNotSameOrigin = isHTTP
|
|
59
|
+
const isNotSameOrigin = isHTTP
|
|
60
|
+
? new URL(referrer).origin != origin
|
|
61
|
+
: false;
|
|
60
62
|
const isReferrerEmpty = referrer == "";
|
|
61
63
|
const isFirstPage = history.length < 3; // imparfait mais variabsle selon les situations
|
|
62
64
|
const isFallbackNoReferer = isReferrerEmpty && isFirstPage; // fallback pour ff qui a parfois un referer nulle ex : drupal 9
|
|
@@ -109,14 +111,18 @@ export default class LocationHandler {
|
|
|
109
111
|
* Ajoute l'attribut "active" à l'élément si l'url correspond à la location en donction du mode d'activation
|
|
110
112
|
*/
|
|
111
113
|
static updateComponentActiveState(component) {
|
|
112
|
-
if (component.autoActive == "disabled")
|
|
114
|
+
if (component.autoActive == "disabled") {
|
|
113
115
|
return;
|
|
116
|
+
}
|
|
114
117
|
if (component.href && component.href.indexOf("http") != 0) {
|
|
115
118
|
const url1 = new URL(component.href, document.location.href);
|
|
116
119
|
const url2 = new URL(component.location || "", document.location.origin);
|
|
117
120
|
let isActive = false;
|
|
118
121
|
if (component.autoActive == "strict") {
|
|
119
|
-
isActive =
|
|
122
|
+
isActive =
|
|
123
|
+
url1.pathname == url2.pathname &&
|
|
124
|
+
url1.hash == url2.hash &&
|
|
125
|
+
url1.search == url2.search;
|
|
120
126
|
}
|
|
121
127
|
else
|
|
122
128
|
isActive = url2.href.indexOf(url1.href) == 0;
|
|
@@ -16,7 +16,6 @@ export declare class PublisherProxy<T = any> {
|
|
|
16
16
|
static instancesCounter: number;
|
|
17
17
|
_proxies_: Map<string, PublisherProxy>;
|
|
18
18
|
_value_: T;
|
|
19
|
-
_key_: string;
|
|
20
19
|
_is_savable_: boolean;
|
|
21
20
|
_invalidateListeners_: Set<VoidFunction>;
|
|
22
21
|
_assignListeners_: Set<(value: T) => void>;
|
|
@@ -17,7 +17,6 @@ function isComplex(value) {
|
|
|
17
17
|
export class PublisherProxy {
|
|
18
18
|
constructor(target, parentProxPub) {
|
|
19
19
|
this._proxies_ = new Map();
|
|
20
|
-
this._key_ = "";
|
|
21
20
|
this._is_savable_ = false;
|
|
22
21
|
this._invalidateListeners_ = new Set();
|
|
23
22
|
this._assignListeners_ = new Set();
|
package/img/concorde-logo.svg
CHANGED
|
File without changes
|
package/img/concorde.png
CHANGED
|
File without changes
|
package/img/concorde_def.png
CHANGED
|
File without changes
|
package/mixins.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare const Fetcher: <T extends new (...args: any[]) => mySubscriber.Su
|
|
|
18
18
|
onInvalidate?: (() => void) | undefined;
|
|
19
19
|
disconnectedCallback(): void;
|
|
20
20
|
connectedCallback(): void;
|
|
21
|
+
lazyLoadSpan?: HTMLSpanElement | undefined;
|
|
21
22
|
handleLazyLoad(): void;
|
|
22
23
|
onIntersection(entries: IntersectionObserverEntry[]): void;
|
|
23
24
|
propertyMap: object;
|
package/package.json
CHANGED
package/svg/regular/plane.svg
CHANGED
|
File without changes
|
package/svg/solid/plane.svg
CHANGED
|
File without changes
|