@supersoniks/concorde 1.1.26 → 1.1.28
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/components.d.ts +2 -2
- package/components.js +2 -2
- package/concorde-core.bundle.js +18 -18
- package/concorde-core.es.js +16 -16
- package/core/components/functional/list/list.d.ts +1 -4
- package/core/components/functional/list/list.js +1 -1
- package/core/components/ui/button/button.d.ts +1 -1
- package/core/components/ui/form/checkbox/checkbox.d.ts +2 -2
- package/core/components/ui/form/checkbox/checkbox.js +2 -2
- package/core/components/ui/form/input/input.d.ts +1 -4
- package/core/components/ui/form/input/input.js +1 -1
- package/core/components/ui/form/radio/radio.d.ts +1 -1
- package/core/components/ui/form/radio/radio.js +1 -1
- package/core/components/ui/form/select/select.js +1 -1
- package/core/components/ui/form/textarea/textarea.d.ts +1 -1
- package/core/components/ui/form/textarea/textarea.js +1 -1
- package/core/components/ui/icon/icon.js +1 -1
- package/core/components/ui/icon/icons.js +5 -1
- package/core/components/ui/icon/icons.json +1 -1
- package/core/components/ui/loader/loader.js +2 -2
- package/core/components/ui/menu/menu-item.d.ts +1 -1
- package/core/components/ui/menu/menu-item.js +1 -1
- package/core/components/ui/menu/menu.d.ts +1 -1
- package/core/components/ui/menu/menu.js +1 -1
- package/core/components/ui/modal/modal.d.ts +5 -5
- package/core/components/ui/modal/modal.js +5 -5
- package/core/components/ui/table/table.d.ts +7 -7
- package/core/components/ui/table/table.js +7 -7
- package/core/components/ui/tabs/tab.d.ts +1 -1
- package/core/components/ui/tabs/tab.js +1 -1
- package/core/components/ui/tabs/tabs.js +0 -1
- package/core/components/ui/taxonomy/taxonomy.d.ts +2 -2
- package/core/components/ui/taxonomy/taxonomy.js +2 -2
- package/core/components/ui/theme/theme.js +3 -3
- package/core/components/ui/toast/message-subscriber.js +1 -1
- package/core/components/ui/toast/toast-item.d.ts +4 -2
- package/core/components/ui/toast/toast-item.js +24 -1
- package/core/components/ui/toast/toast.d.ts +4 -3
- package/core/components/ui/toast/toast.js +17 -3
- package/core/components/ui/toast/types.d.ts +1 -0
- package/core/mixins/Fetcher.d.ts +3 -5
- package/core/mixins/Fetcher.js +4 -4
- package/core/mixins/FormCheckable.d.ts +4 -1
- package/core/mixins/FormCheckable.js +2 -2
- package/core/mixins/FormElement.d.ts +1 -1
- package/core/mixins/FormElement.js +2 -2
- package/core/mixins/FormInput.d.ts +9 -1
- package/core/mixins/Subscriber.js +1 -1
- package/core/utils/DataBindObserver.js +4 -0
- package/core/utils/LocationHandler.js +4 -2
- package/core/utils/api.js +1 -1
- package/mixins.d.ts +5 -5
- package/mixins.js +6 -6
- package/package.json +192 -189
- package/utils.d.ts +8 -8
- package/utils.js +8 -8
|
@@ -43,7 +43,7 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
|
|
|
43
43
|
getFormPublisher(): any;
|
|
44
44
|
updateDataValue(): void;
|
|
45
45
|
error: true | null;
|
|
46
|
-
autofocus:
|
|
46
|
+
autofocus: boolean;
|
|
47
47
|
disabled: true | null;
|
|
48
48
|
required: true | null;
|
|
49
49
|
formDataProvider: string;
|
|
@@ -67,6 +67,9 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
|
|
|
67
67
|
requestUpdate(): void;
|
|
68
68
|
getAttribute(name: string): string;
|
|
69
69
|
hasAttribute(attributeName: String): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* comme radio,mais peut être désélectionné après sélection
|
|
72
|
+
*/
|
|
70
73
|
disconnectedCallback(): void;
|
|
71
74
|
};
|
|
72
75
|
} & T;
|
|
@@ -97,10 +97,10 @@ const Form = (superClass) => {
|
|
|
97
97
|
*/
|
|
98
98
|
getValueForFormPublisher() {
|
|
99
99
|
let publisher = this.getFormPublisher();
|
|
100
|
-
let currentValue = publisher[this.name].get();
|
|
101
100
|
if (this.unique || this.radio) {
|
|
102
|
-
return this.checked && this.value != null ? this.value :
|
|
101
|
+
return this.checked && this.value != null ? this.value : null;
|
|
103
102
|
}
|
|
103
|
+
let currentValue = publisher[this.name].get();
|
|
104
104
|
if (!Array.isArray(currentValue)) {
|
|
105
105
|
currentValue = [];
|
|
106
106
|
}
|
|
@@ -6,7 +6,7 @@ export interface FormElementInterface extends SubscriberInterface {
|
|
|
6
6
|
handleChange(e?: any): void;
|
|
7
7
|
getValueForFormPublisher(): any;
|
|
8
8
|
error: true | null;
|
|
9
|
-
autofocus:
|
|
9
|
+
autofocus: boolean;
|
|
10
10
|
disabled: true | null;
|
|
11
11
|
required: true | null;
|
|
12
12
|
formDataProvider: string;
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { PublisherManager } from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
|
-
import Objects from "
|
|
9
|
+
import Objects from "@supersoniks/concorde/core/utils/Objects";
|
|
10
10
|
const keyboardLoops = new Map();
|
|
11
11
|
const Form = (superClass) => {
|
|
12
12
|
/**
|
|
@@ -22,7 +22,7 @@ const Form = (superClass) => {
|
|
|
22
22
|
super();
|
|
23
23
|
this.touched = false;
|
|
24
24
|
this.error = null;
|
|
25
|
-
this.autofocus =
|
|
25
|
+
this.autofocus = false;
|
|
26
26
|
this.disabled = null;
|
|
27
27
|
this.required = null;
|
|
28
28
|
this.onValueAssign = null;
|
|
@@ -15,16 +15,24 @@ declare const Form: <T extends Constructor<FormElementInterface>>(superClass: T)
|
|
|
15
15
|
handleChange(e?: any): void;
|
|
16
16
|
getValueForFormPublisher(): any;
|
|
17
17
|
error: true | null;
|
|
18
|
-
autofocus:
|
|
18
|
+
autofocus: boolean;
|
|
19
19
|
disabled: true | null;
|
|
20
20
|
required: true | null;
|
|
21
21
|
formDataProvider: string;
|
|
22
22
|
_value: any;
|
|
23
|
+
/**
|
|
24
|
+
* Le type De l'input, comme en html cependant tous les types ne sont pas actuellements compatibles en raison du style en vigueur
|
|
25
|
+
* On peut essayer text, date, color, email par exemple, mais pas radio/checkbox/range a priori
|
|
26
|
+
*/
|
|
23
27
|
value: any;
|
|
24
28
|
_name: string;
|
|
25
29
|
name: string;
|
|
26
30
|
props: any;
|
|
27
31
|
isConnected: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Le type De l'input, comme en html cependant tous les types ne sont pas actuellements compatibles en raison du style en vigueur
|
|
34
|
+
* On peut essayer text, date, color, email par exemple, mais pas radio/checkbox/range a priori
|
|
35
|
+
*/
|
|
28
36
|
getAncestorAttributeValue(attributeName: string): string;
|
|
29
37
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
30
38
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
@@ -18,7 +18,7 @@ import { property } from "lit/decorators.js";
|
|
|
18
18
|
import API from "@supersoniks/concorde/core/utils/api";
|
|
19
19
|
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
20
20
|
import DataBindObserver from "@supersoniks/concorde/core/utils/DataBindObserver";
|
|
21
|
-
import Objects from "
|
|
21
|
+
import Objects from "@supersoniks/concorde/core/utils/Objects";
|
|
22
22
|
let keepDebugOnMouseOut = false;
|
|
23
23
|
let debugs = new Set();
|
|
24
24
|
//Pour référence
|
|
@@ -17,6 +17,8 @@ export default class DataBindObserver {
|
|
|
17
17
|
Array.from(DataBindObserver.observedElements.keys()).forEach((k) => DataBindObserver.unObserve(k));
|
|
18
18
|
}
|
|
19
19
|
static observe(element) {
|
|
20
|
+
if (!element)
|
|
21
|
+
return;
|
|
20
22
|
if (!DataBindObserver.enabled)
|
|
21
23
|
return;
|
|
22
24
|
if (DataBindObserver.observedElements.has(element))
|
|
@@ -35,6 +37,8 @@ export default class DataBindObserver {
|
|
|
35
37
|
* Arrêter à observer un élément html.
|
|
36
38
|
*/
|
|
37
39
|
static unObserve(element) {
|
|
40
|
+
if (!element)
|
|
41
|
+
return;
|
|
38
42
|
let observer = this.observedElements.get(element);
|
|
39
43
|
if (!observer)
|
|
40
44
|
return;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var _a;
|
|
1
2
|
/**
|
|
2
3
|
* Gestionnaire d'écoute des modifications sur l'url courante.
|
|
3
4
|
* On peut s'y abonner via la methode statique onChange()
|
|
@@ -5,10 +6,11 @@
|
|
|
5
6
|
*/
|
|
6
7
|
export default class LocationHandler {
|
|
7
8
|
static listen() {
|
|
9
|
+
var _a;
|
|
8
10
|
if (!LocationHandler.listening) {
|
|
9
11
|
return;
|
|
10
12
|
}
|
|
11
|
-
let newURL = document.location.href.replace(document.location.origin, "");
|
|
13
|
+
let newURL = (_a = document.location) === null || _a === void 0 ? void 0 : _a.href.replace(document.location.origin, "");
|
|
12
14
|
if (LocationHandler.prevURL && LocationHandler.prevURL != newURL) {
|
|
13
15
|
LocationHandler.prevURL = newURL;
|
|
14
16
|
LocationHandler.listeners.forEach((listener) => {
|
|
@@ -116,4 +118,4 @@ export default class LocationHandler {
|
|
|
116
118
|
}
|
|
117
119
|
LocationHandler.listeners = [];
|
|
118
120
|
LocationHandler.listening = false;
|
|
119
|
-
LocationHandler.prevURL = document.location.href.replace(document.location.origin, "");
|
|
121
|
+
LocationHandler.prevURL = (_a = document.location) === null || _a === void 0 ? void 0 : _a.href.replace(document.location.origin, "");
|
package/core/utils/api.js
CHANGED
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import HTML from "
|
|
10
|
+
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
11
11
|
class API {
|
|
12
12
|
constructor(config) {
|
|
13
13
|
this.serviceURL = config.serviceURL;
|
package/mixins.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare const FormCheckable: <T extends new (...args: any[]) => myFormEle
|
|
|
56
56
|
getFormPublisher(): any;
|
|
57
57
|
updateDataValue(): void;
|
|
58
58
|
error: true | null;
|
|
59
|
-
autofocus:
|
|
59
|
+
autofocus: boolean;
|
|
60
60
|
disabled: true | null;
|
|
61
61
|
required: true | null;
|
|
62
62
|
formDataProvider: string;
|
|
@@ -83,7 +83,7 @@ export declare const FormCheckable: <T extends new (...args: any[]) => myFormEle
|
|
|
83
83
|
disconnectedCallback(): void;
|
|
84
84
|
};
|
|
85
85
|
} & T;
|
|
86
|
-
import * as myFormElement from "
|
|
86
|
+
import * as myFormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
87
87
|
export declare const FormElement: <T extends new (...args: any[]) => mySubscriber.SubscriberInterface>(superClass: T) => (new (...args: any[]) => myFormElement.FormElementInterface) & T;
|
|
88
88
|
export declare const FormInput: <T extends new (...args: any[]) => myFormElement.FormElementInterface>(superClass: T) => {
|
|
89
89
|
new (...args: any[]): {
|
|
@@ -96,7 +96,7 @@ export declare const FormInput: <T extends new (...args: any[]) => myFormElement
|
|
|
96
96
|
handleChange(e?: any): void;
|
|
97
97
|
getValueForFormPublisher(): any;
|
|
98
98
|
error: true | null;
|
|
99
|
-
autofocus:
|
|
99
|
+
autofocus: boolean;
|
|
100
100
|
disabled: true | null;
|
|
101
101
|
required: true | null;
|
|
102
102
|
formDataProvider: string;
|
|
@@ -128,7 +128,7 @@ export declare const FormInput: <T extends new (...args: any[]) => myFormElement
|
|
|
128
128
|
disconnectedCallback(): void;
|
|
129
129
|
};
|
|
130
130
|
} & T;
|
|
131
|
-
import * as mySubscriber from "
|
|
131
|
+
import * as mySubscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
132
132
|
export declare const Subscriber: <T extends new (...args: any[]) => import("lit").LitElement>(superClass: T) => (new (...args: any[]) => mySubscriber.SubscriberInterface) & T;
|
|
133
|
-
import * as myTemplatesContainer from "
|
|
133
|
+
import * as myTemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
|
|
134
134
|
export declare const TemplatesContainer: <T extends new (...args: any[]) => import("lit").LitElement>(superClass: T) => (new (...args: any[]) => myTemplatesContainer.TemplatesContainerInterface) & T;
|
package/mixins.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//
|
|
2
|
-
import * as myFetcher from "
|
|
2
|
+
import * as myFetcher from "@supersoniks/concorde/core/mixins/Fetcher";
|
|
3
3
|
export const Fetcher = myFetcher.default;
|
|
4
|
-
import * as myFormCheckable from "
|
|
4
|
+
import * as myFormCheckable from "@supersoniks/concorde/core/mixins/FormCheckable";
|
|
5
5
|
export const FormCheckable = myFormCheckable.default;
|
|
6
|
-
import * as myFormElement from "
|
|
6
|
+
import * as myFormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
7
7
|
export const FormElement = myFormElement.default;
|
|
8
|
-
import * as myFormInput from "
|
|
8
|
+
import * as myFormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
9
9
|
export const FormInput = myFormInput.default;
|
|
10
|
-
import * as mySubscriber from "
|
|
10
|
+
import * as mySubscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
11
11
|
export const Subscriber = mySubscriber.default;
|
|
12
|
-
import * as myTemplatesContainer from "
|
|
12
|
+
import * as myTemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
|
|
13
13
|
export const TemplatesContainer = myTemplatesContainer.default;
|
|
14
14
|
let win = window;
|
|
15
15
|
win["concorde-mixins"] = win["concorde-mixins"] || {};
|