@supersoniks/concorde 1.1.7 → 1.1.10
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/core/components/functional/configuration/configuration.d.ts +5 -0
- package/core/components/functional/configuration/configuration.js +21 -0
- package/core/components/functional/date/date.d.ts +2 -1
- package/core/components/functional/date/date.js +9 -2
- package/core/components/functional/fetch/fetch.d.ts +27 -10
- package/core/components/functional/fetch/fetch.js +27 -12
- package/core/components/functional/functional.d.ts +1 -0
- package/core/components/functional/functional.js +1 -0
- package/core/components/functional/list/list.d.ts +12 -7
- package/core/components/functional/list/list.js +55 -17
- package/core/components/functional/queue/queue.js +7 -3
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +5 -0
- package/core/components/functional/sonic-scope/sonic-scope.js +20 -0
- package/core/components/functional/states/states.js +0 -2
- package/core/components/functional/submit/submit.d.ts +2 -0
- package/core/components/functional/submit/submit.js +23 -8
- package/core/components/ui/badge/badge.js +0 -1
- package/core/components/ui/button/button.d.ts +10 -2
- package/core/components/ui/button/button.js +10 -2
- package/core/components/ui/card/card-footer.d.ts +5 -0
- package/core/components/ui/card/card-footer.js +27 -0
- package/core/components/ui/card/card-header-descripton.d.ts +5 -0
- package/core/components/ui/card/card-header-descripton.js +33 -0
- package/core/components/ui/card/card-header.d.ts +8 -0
- package/core/components/ui/card/card-header.js +67 -0
- package/core/components/ui/card/card-main.d.ts +5 -0
- package/core/components/ui/card/card-main.js +29 -0
- package/core/components/ui/card/card.d.ts +12 -0
- package/core/components/ui/card/card.js +90 -0
- package/core/components/ui/form/checkbox/checkbox.d.ts +0 -2
- package/core/components/ui/form/checkbox/checkbox.js +3 -3
- package/core/components/ui/form/css/form-control.js +2 -0
- package/core/components/ui/form/fieldset/fieldset.js +1 -1
- package/core/components/ui/form/fieldset/legend-description.d.ts +5 -0
- package/core/components/ui/form/fieldset/legend-description.js +35 -0
- package/core/components/ui/form/fieldset/legend.d.ts +4 -5
- package/core/components/ui/form/fieldset/legend.js +21 -25
- package/core/components/ui/form/input/input.d.ts +1 -2
- package/core/components/ui/form/input/input.js +3 -3
- package/core/components/ui/form/textarea/textarea.d.ts +0 -1
- package/core/components/ui/form/textarea/textarea.js +2 -2
- package/core/components/ui/progress/progress.d.ts +7 -0
- package/core/components/ui/progress/progress.js +63 -0
- package/core/components/ui/table/table-caption.d.ts +5 -0
- package/core/components/ui/table/table-caption.js +24 -0
- package/core/components/ui/table/table-tbody.d.ts +5 -0
- package/core/components/ui/table/table-tbody.js +37 -0
- package/core/components/ui/table/table-td.d.ts +7 -0
- package/core/components/ui/table/table-td.js +45 -0
- package/core/components/ui/table/table-tfoot.d.ts +5 -0
- package/core/components/ui/table/table-tfoot.js +23 -0
- package/core/components/ui/table/table-th.d.ts +6 -0
- package/core/components/ui/table/table-th.js +43 -0
- package/core/components/ui/table/table-thead.d.ts +5 -0
- package/core/components/ui/table/table-thead.js +24 -0
- package/core/components/ui/table/table-tr.d.ts +5 -0
- package/core/components/ui/table/table-tr.js +24 -0
- package/core/components/ui/table/table.d.ts +16 -0
- package/core/components/ui/table/table.js +88 -0
- package/core/components/ui/theme/theme-collection/core-variables.js +2 -2
- package/core/components/ui/theme/theme-collection/dark.js +3 -2
- package/core/components/ui/theme/theme-collection/light.js +1 -0
- package/core/components/ui/ui.d.ts +3 -0
- package/core/components/ui/ui.js +3 -0
- package/core/mixins/Fetcher.d.ts +1 -4
- package/core/mixins/Fetcher.js +2 -2
- package/core/mixins/FormCheckable.d.ts +3 -2
- package/core/mixins/FormInput.d.ts +0 -1
- package/core/mixins/Subscriber.d.ts +0 -1
- package/core/mixins/Subscriber.js +0 -15
- package/core/utils/DataBindObserver.js +0 -2
- package/core/utils/Objects.d.ts +2 -1
- package/core/utils/Objects.js +8 -2
- package/core/utils/PublisherProxy.mjs +42 -12
- package/core/utils/api.js +1 -1
- package/package.json +36 -1
|
@@ -59,7 +59,7 @@ export class PublisherProxy {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
_publishAssignement_(lockInternalMutationsTransmission = false) {
|
|
62
|
-
this._assignListeners_.forEach((handler) => handler(this.
|
|
62
|
+
this._assignListeners_.forEach((handler) => handler(this.get()));
|
|
63
63
|
this._publishInternalMutation_(lockInternalMutationsTransmission);
|
|
64
64
|
}
|
|
65
65
|
_publishInvalidation_() {
|
|
@@ -93,7 +93,7 @@ export class PublisherProxy {
|
|
|
93
93
|
if (typeof handler != "function")
|
|
94
94
|
return;
|
|
95
95
|
this._assignListeners_.add(handler);
|
|
96
|
-
handler(this.
|
|
96
|
+
handler(this.get());
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Stop les appels de la fonction "handler" (passée en paramettre) lorsque la valeur gérée par le proxy change par assignation
|
|
@@ -181,6 +181,9 @@ export class PublisherProxy {
|
|
|
181
181
|
* Assigne une nouvelle valeur au proxy ce qui déclenche la transmission de la donnée en fonction des "écouteurs" associés
|
|
182
182
|
*/
|
|
183
183
|
set(newValue, lockInternalMutationsTransmission = false) {
|
|
184
|
+
/**
|
|
185
|
+
* On retounre tout de suite si la valeur n'a pas changé
|
|
186
|
+
*/
|
|
184
187
|
if (this._value_ === newValue)
|
|
185
188
|
return true;
|
|
186
189
|
if (this._value_.hasOwnProperty("__value") &&
|
|
@@ -188,24 +191,45 @@ export class PublisherProxy {
|
|
|
188
191
|
this._value_.__value === newValue.__value) {
|
|
189
192
|
return true;
|
|
190
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* On assigne la nouvelle valeur
|
|
196
|
+
*/
|
|
191
197
|
this._value_ = newValue;
|
|
192
|
-
|
|
198
|
+
/**
|
|
199
|
+
* Si il s'agit d'une valeur primitive (un entier, une chaine ) la valeure en renseignée par un objet contenant la vaeur {__value}
|
|
200
|
+
* On publie juste et on sen va.
|
|
201
|
+
*/
|
|
202
|
+
const isPrimitiveValue = (this._value_.hasOwnProperty("__value"));
|
|
203
|
+
if (isPrimitiveValue) {
|
|
193
204
|
this._publishAssignement_(lockInternalMutationsTransmission);
|
|
194
205
|
return true;
|
|
195
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* On fait la diff sur l'existant.
|
|
209
|
+
* On maintient les proxys à supprimer et ceux à ajouter.
|
|
210
|
+
* On met à jour leur valeur interne
|
|
211
|
+
* On publie les maj au fur et a mesure de modifications
|
|
212
|
+
*/
|
|
196
213
|
Array.from(this._proxies_.keys()).forEach((key) => {
|
|
197
|
-
|
|
214
|
+
/**
|
|
215
|
+
* On supprime les proxys qui ne sont plus dans la nouvelle valeur si ils n'on pas d'écouteurs
|
|
216
|
+
**/
|
|
198
217
|
if (!this._value_[key] && this._proxies_.has(key) && !this._proxies_.get(key).hasListener()) {
|
|
199
218
|
this._proxies_.delete(key);
|
|
200
219
|
}
|
|
201
220
|
});
|
|
221
|
+
/**
|
|
222
|
+
* Si la donnée est complexe (objet, tableau)
|
|
223
|
+
* on crée les proxys pour les sous-éléments qui n'en on pas
|
|
224
|
+
* On renseigne les nouvelles valeurs internes des proxies
|
|
225
|
+
*/
|
|
202
226
|
if (isComplex(this._value_)) {
|
|
203
227
|
for (let key in this._value_) {
|
|
204
228
|
let v = newValue[key];
|
|
205
229
|
let isVComplex = isComplex(v);
|
|
206
230
|
let valueV = isVComplex ? v : { __value: v };
|
|
207
231
|
if (!this._proxies_.has(key)) {
|
|
208
|
-
let newPublisher = new Publisher(
|
|
232
|
+
let newPublisher = new Publisher({}, this);
|
|
209
233
|
this._proxies_.set(key, newPublisher, true);
|
|
210
234
|
newPublisher._proxies_.set("_parent_", this);
|
|
211
235
|
}
|
|
@@ -213,6 +237,9 @@ export class PublisherProxy {
|
|
|
213
237
|
this._publishDynamicFilling_(key, v);
|
|
214
238
|
}
|
|
215
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* On prévient les écouteurs que la valeur a changé
|
|
242
|
+
*/
|
|
216
243
|
this._publishAssignement_();
|
|
217
244
|
return true;
|
|
218
245
|
}
|
|
@@ -220,8 +247,10 @@ export class PublisherProxy {
|
|
|
220
247
|
* Extraire la valeur actuelle du proxy
|
|
221
248
|
*/
|
|
222
249
|
get() {
|
|
223
|
-
if (this._value_.hasOwnProperty("__value"))
|
|
224
|
-
|
|
250
|
+
if (this._value_.hasOwnProperty("__value")) {
|
|
251
|
+
let v = this._value_.__value;
|
|
252
|
+
return v != undefined ? v : null;
|
|
253
|
+
}
|
|
225
254
|
return this._value_;
|
|
226
255
|
}
|
|
227
256
|
}
|
|
@@ -344,24 +373,25 @@ export default class Publisher extends PublisherProxy {
|
|
|
344
373
|
* Les gestionnairs associés sopnt déclenchés en conséquence de manière profonde et remontante si nécessaire.
|
|
345
374
|
*/
|
|
346
375
|
set: function (oTarget, sKey, vValue) {
|
|
376
|
+
//Fonctionnement pour la donnée interne pas de dispatch;
|
|
347
377
|
if (sKey == "_value_") {
|
|
348
378
|
oTarget._value_ = vValue;
|
|
349
379
|
return oTarget._value_;
|
|
350
380
|
}
|
|
351
|
-
|
|
381
|
+
//Création du publisher si il n'existe pas
|
|
352
382
|
if (!that._proxies_.has(sKey)) {
|
|
353
|
-
let newPublisher = new Publisher(
|
|
383
|
+
let newPublisher = new Publisher({}, that);
|
|
354
384
|
newPublisher._proxies_.set("_parent_", thisProxy);
|
|
355
385
|
that._proxies_.set(sKey, newPublisher);
|
|
356
386
|
}
|
|
357
|
-
|
|
358
|
-
return vValue;
|
|
387
|
+
//mis à jour et publication de la donnée si elle a changé
|
|
359
388
|
const prevValue = that._value_[sKey];
|
|
360
389
|
if (prevValue !== vValue) {
|
|
361
390
|
that._value_[sKey] = vValue;
|
|
362
391
|
that._publishDynamicFilling_(sKey, vValue);
|
|
392
|
+
that._proxies_.get(sKey).set(isComplex(vValue) ? vValue : { __value: vValue });
|
|
363
393
|
}
|
|
364
|
-
|
|
394
|
+
//on retourne le proxy pour pouvoir chainer les assignements
|
|
365
395
|
return that._proxies_.get(sKey);
|
|
366
396
|
},
|
|
367
397
|
/**
|
package/core/utils/api.js
CHANGED
|
@@ -84,7 +84,7 @@ class API {
|
|
|
84
84
|
* Concatène le serviceURL et le endpoint donné en paramètre
|
|
85
85
|
*/
|
|
86
86
|
computeURL(path) {
|
|
87
|
-
return this.serviceURL + "/" + path;
|
|
87
|
+
return (this.serviceURL + "/" + path).replace(/([^(https?\:)])\/{2,}/g, "$1/");
|
|
88
88
|
}
|
|
89
89
|
/*
|
|
90
90
|
* Envoie des données au endPoint passé en paramètre. par défaut en POST
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersoniks/concorde",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10",
|
|
4
4
|
"customElements": "custom-elements.json",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@lit-labs/motion": "^1.0.1",
|
|
11
11
|
"@lit-labs/observers": "^1.0.1",
|
|
12
|
+
"chart.js": "^3.9.1",
|
|
12
13
|
"lit": "^2.2.3",
|
|
13
14
|
"url-pattern": "^1.0.3"
|
|
14
15
|
},
|
|
@@ -23,6 +24,8 @@
|
|
|
23
24
|
"vite": "^2.6.14"
|
|
24
25
|
},
|
|
25
26
|
"exports": {
|
|
27
|
+
"./core/components/functional/configuration/configuration": "./core/components/functional/configuration/configuration",
|
|
28
|
+
"./functional/configuration": "./core/components/functional/configuration/configuration",
|
|
26
29
|
"./core/components/functional/date/date": "./core/components/functional/date/date",
|
|
27
30
|
"./functional/date": "./core/components/functional/date/date",
|
|
28
31
|
"./core/components/functional/example/example": "./core/components/functional/example/example",
|
|
@@ -41,6 +44,8 @@
|
|
|
41
44
|
"./functional/router/redirect": "./core/components/functional/router/redirect",
|
|
42
45
|
"./core/components/functional/router/router": "./core/components/functional/router/router",
|
|
43
46
|
"./functional/router": "./core/components/functional/router/router",
|
|
47
|
+
"./core/components/functional/sonic-scope/sonic-scope": "./core/components/functional/sonic-scope/sonic-scope",
|
|
48
|
+
"./functional/sonic-scope": "./core/components/functional/sonic-scope/sonic-scope",
|
|
44
49
|
"./core/components/functional/states/states": "./core/components/functional/states/states",
|
|
45
50
|
"./functional/states": "./core/components/functional/states/states",
|
|
46
51
|
"./core/components/functional/submit/submit": "./core/components/functional/submit/submit",
|
|
@@ -53,6 +58,16 @@
|
|
|
53
58
|
"./ui/badge": "./core/components/ui/badge/badge",
|
|
54
59
|
"./core/components/ui/button/button": "./core/components/ui/button/button",
|
|
55
60
|
"./ui/button": "./core/components/ui/button/button",
|
|
61
|
+
"./core/components/ui/card/card-footer": "./core/components/ui/card/card-footer",
|
|
62
|
+
"./ui/card/card-footer": "./core/components/ui/card/card-footer",
|
|
63
|
+
"./core/components/ui/card/card-header-descripton": "./core/components/ui/card/card-header-descripton",
|
|
64
|
+
"./ui/card/card-header-descripton": "./core/components/ui/card/card-header-descripton",
|
|
65
|
+
"./core/components/ui/card/card-header": "./core/components/ui/card/card-header",
|
|
66
|
+
"./ui/card/card-header": "./core/components/ui/card/card-header",
|
|
67
|
+
"./core/components/ui/card/card-main": "./core/components/ui/card/card-main",
|
|
68
|
+
"./ui/card/card-main": "./core/components/ui/card/card-main",
|
|
69
|
+
"./core/components/ui/card/card": "./core/components/ui/card/card",
|
|
70
|
+
"./ui/card": "./core/components/ui/card/card",
|
|
56
71
|
"./core/components/ui/divider/divider": "./core/components/ui/divider/divider",
|
|
57
72
|
"./ui/divider": "./core/components/ui/divider/divider",
|
|
58
73
|
"./core/components/ui/form/checkbox/checkbox": "./core/components/ui/form/checkbox/checkbox",
|
|
@@ -61,6 +76,8 @@
|
|
|
61
76
|
"./ui/form/css/form-control": "./core/components/ui/form/css/form-control",
|
|
62
77
|
"./core/components/ui/form/fieldset/fieldset": "./core/components/ui/form/fieldset/fieldset",
|
|
63
78
|
"./ui/form/fieldset": "./core/components/ui/form/fieldset/fieldset",
|
|
79
|
+
"./core/components/ui/form/fieldset/legend-description": "./core/components/ui/form/fieldset/legend-description",
|
|
80
|
+
"./ui/form/fieldset/legend-description": "./core/components/ui/form/fieldset/legend-description",
|
|
64
81
|
"./core/components/ui/form/fieldset/legend": "./core/components/ui/form/fieldset/legend",
|
|
65
82
|
"./ui/form/fieldset/legend": "./core/components/ui/form/fieldset/legend",
|
|
66
83
|
"./core/components/ui/form/form-layout/form-actions": "./core/components/ui/form/form-layout/form-actions",
|
|
@@ -109,6 +126,24 @@
|
|
|
109
126
|
"./ui/modal": "./core/components/ui/modal/modal",
|
|
110
127
|
"./core/components/ui/pop/pop": "./core/components/ui/pop/pop",
|
|
111
128
|
"./ui/pop": "./core/components/ui/pop/pop",
|
|
129
|
+
"./core/components/ui/progress/progress": "./core/components/ui/progress/progress",
|
|
130
|
+
"./ui/progress": "./core/components/ui/progress/progress",
|
|
131
|
+
"./core/components/ui/table/table-caption": "./core/components/ui/table/table-caption",
|
|
132
|
+
"./ui/table/table-caption": "./core/components/ui/table/table-caption",
|
|
133
|
+
"./core/components/ui/table/table-tbody": "./core/components/ui/table/table-tbody",
|
|
134
|
+
"./ui/table/table-tbody": "./core/components/ui/table/table-tbody",
|
|
135
|
+
"./core/components/ui/table/table-td": "./core/components/ui/table/table-td",
|
|
136
|
+
"./ui/table/table-td": "./core/components/ui/table/table-td",
|
|
137
|
+
"./core/components/ui/table/table-tfoot": "./core/components/ui/table/table-tfoot",
|
|
138
|
+
"./ui/table/table-tfoot": "./core/components/ui/table/table-tfoot",
|
|
139
|
+
"./core/components/ui/table/table-th": "./core/components/ui/table/table-th",
|
|
140
|
+
"./ui/table/table-th": "./core/components/ui/table/table-th",
|
|
141
|
+
"./core/components/ui/table/table-thead": "./core/components/ui/table/table-thead",
|
|
142
|
+
"./ui/table/table-thead": "./core/components/ui/table/table-thead",
|
|
143
|
+
"./core/components/ui/table/table-tr": "./core/components/ui/table/table-tr",
|
|
144
|
+
"./ui/table/table-tr": "./core/components/ui/table/table-tr",
|
|
145
|
+
"./core/components/ui/table/table": "./core/components/ui/table/table",
|
|
146
|
+
"./ui/table": "./core/components/ui/table/table",
|
|
112
147
|
"./core/components/ui/tabs/tab": "./core/components/ui/tabs/tab",
|
|
113
148
|
"./ui/tabs/tab": "./core/components/ui/tabs/tab",
|
|
114
149
|
"./core/components/ui/tabs/tabs": "./core/components/ui/tabs/tabs",
|