@supersoniks/concorde 3.1.21 → 3.1.23
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/build-infos.json +1 -1
- package/concorde-core.bundle.js +75 -75
- package/concorde-core.es.js +419 -412
- package/dist/concorde-core.bundle.js +75 -75
- package/dist/concorde-core.es.js +419 -412
- package/package.json +1 -1
- package/scripts/pre-build.mjs +0 -0
- package/src/core/_types/types.ts +0 -0
- package/src/core/components/ui/form/input/input.ts +0 -0
- package/src/core/components/ui/modal/modal.ts +46 -21
- package/src/core/components/ui/toast/message-subscriber.ts +0 -0
- package/src/core/components/ui/toast/toast.ts +0 -0
- package/src/core/components/ui/ui.ts +0 -0
- package/src/core/core.ts +0 -0
- package/src/core/mixins/FormCheckable.ts +0 -2
- package/src/core/utils/PublisherProxy.ts +4 -14
- package/src/core/utils/route.ts +0 -0
- package/src/tsconfig-model.json +0 -0
- package/src/tsconfig.json +0 -0
package/package.json
CHANGED
package/scripts/pre-build.mjs
CHANGED
|
File without changes
|
package/src/core/_types/types.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { animate, fadeIn, fadeOut } from "@lit-labs/motion";
|
|
1
|
+
import { animate, fadeIn, fadeOut, Options } from "@lit-labs/motion";
|
|
2
2
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
3
3
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
4
4
|
import { css, html, LitElement, nothing, PropertyValues } from "lit";
|
|
@@ -39,7 +39,12 @@ declare type ModalCreateOptions = {
|
|
|
39
39
|
removeOnHide?: boolean;
|
|
40
40
|
forceAction?: boolean;
|
|
41
41
|
removeHashOnHide?: boolean;
|
|
42
|
+
fullScreen?: boolean;
|
|
43
|
+
effect?: effectType;
|
|
42
44
|
};
|
|
45
|
+
|
|
46
|
+
type effectType = "fade" | "slide" | "none";
|
|
47
|
+
|
|
43
48
|
const tagName = "sonic-modal";
|
|
44
49
|
|
|
45
50
|
@customElement(tagName)
|
|
@@ -180,10 +185,13 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
180
185
|
@property({ type: String }) width = "100%";
|
|
181
186
|
@property({ type: String }) height = "auto";
|
|
182
187
|
@property({ type: String }) zIndex = "var(--sc-modal-z-index)";
|
|
188
|
+
@property({ type: String }) effect?: effectType;
|
|
183
189
|
@property({ type: Object }) options?: ModalCreateOptions;
|
|
184
190
|
@property({ type: Boolean, reflect: true }) fullScreen = false;
|
|
185
191
|
@property({ type: Boolean, reflect: true }) visible = false;
|
|
186
192
|
|
|
193
|
+
@property({ type: Object }) animation?: Options;
|
|
194
|
+
|
|
187
195
|
@query(".modal-wrapper") modalWrapper!: HTMLDivElement;
|
|
188
196
|
@query(".modal") modalElement!: HTMLDivElement;
|
|
189
197
|
|
|
@@ -204,6 +212,8 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
204
212
|
if (options.maxHeight) modal.maxHeight = options?.maxHeight;
|
|
205
213
|
if (options.height) modal.height = options?.height;
|
|
206
214
|
if (options.forceAction) modal.forceAction = true;
|
|
215
|
+
if (options.fullScreen) modal.fullScreen = options?.fullScreen;
|
|
216
|
+
if (options.effect) modal.effect = options?.effect;
|
|
207
217
|
|
|
208
218
|
if (options.paddingX)
|
|
209
219
|
modal.style.setProperty("--sc-modal-px", options?.paddingX);
|
|
@@ -248,6 +258,40 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
248
258
|
if (_changedProperties.has("fullScreen")) {
|
|
249
259
|
this.handleFullsceen();
|
|
250
260
|
}
|
|
261
|
+
if (_changedProperties.has("effect")) {
|
|
262
|
+
if (this.effect == "fade") {
|
|
263
|
+
this.animation = {
|
|
264
|
+
keyframeOptions: {
|
|
265
|
+
duration: 400,
|
|
266
|
+
},
|
|
267
|
+
in: fadeIn,
|
|
268
|
+
out: fadeOut,
|
|
269
|
+
};
|
|
270
|
+
} else if (this.effect == "none") {
|
|
271
|
+
this.animation = undefined;
|
|
272
|
+
} else {
|
|
273
|
+
this.animation = {
|
|
274
|
+
keyframeOptions: {
|
|
275
|
+
duration: 400,
|
|
276
|
+
easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`,
|
|
277
|
+
},
|
|
278
|
+
in: [
|
|
279
|
+
{
|
|
280
|
+
transform: "translateY(25%) scale(1)",
|
|
281
|
+
boxShadow: "0 0 0 rgba(0,0,0,0)",
|
|
282
|
+
opacity: 0,
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
out: [
|
|
286
|
+
{
|
|
287
|
+
transform: "translateY(20%) scale(1)",
|
|
288
|
+
boxShadow: "0 0 0 rgba(0,0,0,0)",
|
|
289
|
+
opacity: 0,
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
}
|
|
251
295
|
super.willUpdate(_changedProperties);
|
|
252
296
|
}
|
|
253
297
|
|
|
@@ -284,26 +328,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
284
328
|
part="modal"
|
|
285
329
|
class="modal custom-scroll"
|
|
286
330
|
style=${styleMap(modalStyles)}
|
|
287
|
-
${animate(
|
|
288
|
-
keyframeOptions: {
|
|
289
|
-
duration: 400,
|
|
290
|
-
easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`,
|
|
291
|
-
},
|
|
292
|
-
in: [
|
|
293
|
-
{
|
|
294
|
-
transform: "translateY(25%) scale(1)",
|
|
295
|
-
boxShadow: "0 0 0 rgba(0,0,0,0)",
|
|
296
|
-
opacity: 0,
|
|
297
|
-
},
|
|
298
|
-
],
|
|
299
|
-
out: [
|
|
300
|
-
{
|
|
301
|
-
transform: "translateY(20%) scale(1)",
|
|
302
|
-
boxShadow: "0 0 0 rgba(0,0,0,0)",
|
|
303
|
-
opacity: 0,
|
|
304
|
-
},
|
|
305
|
-
],
|
|
306
|
-
})}
|
|
331
|
+
${animate(this.animation)}
|
|
307
332
|
>
|
|
308
333
|
<div class="modal-content">
|
|
309
334
|
${!this.options?.forceAction
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/core/core.ts
CHANGED
|
File without changes
|
|
@@ -140,8 +140,6 @@ const Form = <T extends Constructor<FormElementInterface>>(superClass: T) => {
|
|
|
140
140
|
* Le comportement est ici modifié fonction de son mode (checkbox, radio, unique)
|
|
141
141
|
*/
|
|
142
142
|
getValueForFormPublisher() {
|
|
143
|
-
const formPublisher = this.getFormPublisher();
|
|
144
|
-
if (!formPublisher) return null;
|
|
145
143
|
let currentValue = this.getFormPublisherValue();
|
|
146
144
|
|
|
147
145
|
if (this.radio) {
|
|
@@ -294,6 +294,9 @@ export class PublisherProxy<T = any> {
|
|
|
294
294
|
*/
|
|
295
295
|
|
|
296
296
|
async set(newValue: T, lockInternalMutationsTransmission = false) {
|
|
297
|
+
if(Array.isArray(newValue) && newValue.indexOf(null)!=-1){
|
|
298
|
+
console.log(newValue);
|
|
299
|
+
}
|
|
297
300
|
/**
|
|
298
301
|
* On retounre tout de suite si la valeur n'a pas changé
|
|
299
302
|
*/
|
|
@@ -368,20 +371,7 @@ export class PublisherProxy<T = any> {
|
|
|
368
371
|
for (const key in this._value_) {
|
|
369
372
|
if (this._value_[key] === undefined) delete this._value_[key];
|
|
370
373
|
}
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* On supprime les proxys qui ne sont plus dans la nouvelle valeur si ils n'on pas d'écouteurs
|
|
374
|
-
**/
|
|
375
|
-
if ((this._value_ as any)[key] === undefined) {
|
|
376
|
-
// if (!_subProxy?.hasListener()) {
|
|
377
|
-
// // this._proxies_.delete(key);
|
|
378
|
-
// } else {
|
|
379
|
-
if (key != "_parent_") {
|
|
380
|
-
if (prevValue[key]) (this._value_ as any)[key] = null;
|
|
381
|
-
}
|
|
382
|
-
// }
|
|
383
|
-
}
|
|
384
|
-
});
|
|
374
|
+
|
|
385
375
|
/**
|
|
386
376
|
* On prévient les écouteurs que la valeur a changé
|
|
387
377
|
*/
|
package/src/core/utils/route.ts
CHANGED
|
File without changes
|
package/src/tsconfig-model.json
CHANGED
|
File without changes
|
package/src/tsconfig.json
CHANGED
|
File without changes
|