@supersoniks/concorde 3.1.28 → 3.1.29
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 +108 -108
- package/concorde-core.es.js +829 -821
- package/dist/concorde-core.bundle.js +108 -108
- package/dist/concorde-core.es.js +829 -821
- package/docs/assets/index-D1OO2yIk.js +4421 -0
- package/docs/assets/index-DCqvoAAf.css +1 -0
- package/docs/css/docs.css +0 -0
- package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
- package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
- package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Light.eot +0 -0
- package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Light.woff +0 -0
- package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
- package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
- package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
- package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
- package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
- package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
- package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
- package/docs/img/concorde-icon.svg +5 -0
- package/docs/img/concorde-logo.svg +1 -0
- package/docs/img/concorde.png +0 -0
- package/docs/img/concorde_def.png +0 -0
- package/docs/img/concorde_seuil.png.webp +0 -0
- package/docs/img/concorde_seuil_invert.png +0 -0
- package/docs/img/paul_metrand.jpg +0 -0
- package/docs/img/paul_metrand_xs.jpg +0 -0
- package/docs/index.html +93 -0
- package/docs/src/core/components/functional/date/date.md +290 -0
- package/docs/src/core/components/functional/fetch/fetch.md +117 -0
- package/docs/src/core/components/functional/if/if.md +16 -0
- package/docs/src/core/components/functional/list/list.md +199 -0
- package/docs/src/core/components/functional/mix/mix.md +41 -0
- package/docs/src/core/components/functional/queue/queue.md +87 -0
- package/docs/src/core/components/functional/router/router.md +112 -0
- package/docs/src/core/components/functional/sdui/default-library.json +108 -0
- package/docs/src/core/components/functional/sdui/example.json +99 -0
- package/docs/src/core/components/functional/sdui/sdui.md +356 -0
- package/docs/src/core/components/functional/states/states.md +87 -0
- package/docs/src/core/components/functional/submit/submit.md +83 -0
- package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
- package/docs/src/core/components/functional/value/value.md +35 -0
- package/docs/src/core/components/ui/alert/alert.md +121 -0
- package/docs/src/core/components/ui/badge/badge.md +102 -0
- package/docs/src/core/components/ui/button/button.md +184 -0
- package/docs/src/core/components/ui/captcha/captcha.md +12 -0
- package/docs/src/core/components/ui/card/card.md +96 -0
- package/docs/src/core/components/ui/divider/divider.md +35 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +96 -0
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +43 -0
- package/docs/src/core/components/ui/form/input/input.md +168 -0
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
- package/docs/src/core/components/ui/form/radio/radio.md +86 -0
- package/docs/src/core/components/ui/form/select/select.md +99 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +65 -0
- package/docs/src/core/components/ui/group/group.md +75 -0
- package/docs/src/core/components/ui/icon/icon.md +125 -0
- package/docs/src/core/components/ui/icon/icons.json +1 -0
- package/docs/src/core/components/ui/image/image.md +107 -0
- package/docs/src/core/components/ui/link/link.md +43 -0
- package/docs/src/core/components/ui/loader/loader.md +37 -0
- package/docs/src/core/components/ui/menu/menu.md +288 -0
- package/docs/src/core/components/ui/modal/modal.md +123 -0
- package/docs/src/core/components/ui/pop/pop.md +79 -0
- package/docs/src/core/components/ui/progress/progress.md +63 -0
- package/docs/src/core/components/ui/table/table.md +455 -0
- package/docs/src/core/components/ui/tooltip/tooltip.md +82 -0
- package/docs/src/docs/_core-concept/overview.md +57 -0
- package/docs/src/docs/_core-concept/subscriber.md +76 -0
- package/docs/src/docs/_getting-started/concorde-outside.md +143 -0
- package/docs/src/docs/_getting-started/create-a-component.md +137 -0
- package/docs/src/docs/_getting-started/my-first-subscriber.md +174 -0
- package/docs/src/docs/_getting-started/pubsub.md +150 -0
- package/docs/src/docs/_getting-started/start.md +39 -0
- package/docs/src/docs/_getting-started/theming.md +91 -0
- package/docs/src/docs/search/docs-search.json +3887 -0
- package/docs/src/tag-list.json +1 -0
- package/docs/src/tsconfig-model.json +23 -0
- package/docs/src/tsconfig.json +808 -0
- package/docs/svg/regular/plane.svg +1 -0
- package/docs/svg/solid/plane.svg +1 -0
- package/index.html +3 -1
- package/package.json +1 -1
- package/scripts/create-search.js +1 -1
- package/scripts/post-build-docs.js +72 -1
- package/src/core/components/ui/toast/toast.ts +5 -2
- package/src/core/mixins/FormElement.ts +1 -3
- package/src/core/utils/PublisherProxy.ts +28 -13
- package/src/core/utils/Utils.ts +12 -0
- package/src/index.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M576 256C576 305 502.1 336 464.2 336H382.2L282.4 496C276.4 506 266.4 512 254.4 512H189.5C179.5 512 169.5 508 163.5 500C157.6 492 155.6 480.1 158.6 471L201.5 336H152.5L113.6 388C107.6 396 98.61 400 88.62 400H31.7C22.72 400 12.73 396 6.74 388C.7485 380-1.248 370 1.747 360L31.7 256L.7488 152C-1.248 143 .7488 133 6.74 125C12.73 117 22.72 112 31.7 112H88.62C98.61 112 107.6 117 113.6 125L152.5 176H201.5L158.6 41C155.6 32 157.6 21 163.5 13C169.5 5 179.5 0 189.5 0H254.4C265.4 0 277.4 7 281.4 16L381.2 176H463.2C502.1 176 576 208 576 256H576zM527.1 256C525.1 246 489.1 224 463.2 224H355.3L245.4 48H211.5L266.4 224H128.6L80.63 160H53.67L81.63 256L53.67 352H80.63L128.6 288H266.4L211.5 464H245.4L355.3 288H463.2C490.1 288 526.1 267 527.1 256V256z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.2-15.4-20.4l49-171.6L112 320 68.8 377.6c-3 4-7.8 6.4-12.8 6.4l-42 0c-7.8 0-14-6.3-14-14c0-1.3 .2-2.6 .5-3.9L32 256 .5 145.9c-.4-1.3-.5-2.6-.5-3.9c0-7.8 6.3-14 14-14l42 0c5 0 9.8 2.4 12.8 6.4L112 192l102.9 0-49-171.6C162.9 10.2 170.6 0 181.2 0l56.2 0c11.5 0 22.1 6.2 27.8 16.1L365.7 192l116.6 0z"/></svg>
|
package/index.html
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
<title>Concorde - A supersonic design system</title>
|
|
8
8
|
<link rel="stylesheet" href="https://use.typekit.net/eda3clw.css" />
|
|
9
9
|
<script src="https://cdn.jsdelivr.net/npm/fuzzysort@2.0.1/fuzzysort.min.js"></script>
|
|
10
|
-
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
10
|
+
<!-- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
11
|
+
-->
|
|
12
|
+
<script src="https://cdn.jsdelivr.net/npm/marked@13.0.3"></script>
|
|
11
13
|
<script type="module" src="./src/docs.ts"></script>
|
|
12
14
|
<link href="./src/docs/tailwind/css/tailwind.css" rel="stylesheet" />
|
|
13
15
|
</head>
|
package/package.json
CHANGED
package/scripts/create-search.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
+
import { exec } from "child_process";
|
|
3
4
|
|
|
4
5
|
const src = path.resolve("src");
|
|
5
6
|
const docs = path.resolve("docs");
|
|
@@ -28,7 +29,6 @@ function listFiles(dir) {
|
|
|
28
29
|
function copyDocs() {
|
|
29
30
|
let files = listFiles(src);
|
|
30
31
|
for (const file of files) {
|
|
31
|
-
console.log(file);
|
|
32
32
|
if (file.indexOf(".md") != -1 || file.indexOf(".json") != -1) {
|
|
33
33
|
let idx = file.indexOf("src/");
|
|
34
34
|
let dest = file.substring(idx);
|
|
@@ -46,3 +46,74 @@ function copyDocs() {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
copyDocs();
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Par rapport au projet, regarder si ../concorde_doc existe et si oui, remplacer le contenu de /concorde_doc par celui de contenu dans docs/ en dehors des fichiers spécifiques à git .git .gitignore .gitattributes)
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
function copyToConcordeDoc() {
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
let concordeDoc = path.resolve("../concorde_doc");
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
if (fs.existsSync(concordeDoc)) {
|
|
62
|
+
/* first remove all files/foilders in concorde_doc except .git folder and .gitignore file */
|
|
63
|
+
let files = listFiles(concordeDoc);
|
|
64
|
+
for (const file of files) {
|
|
65
|
+
if (file.indexOf(".git") == -1) {
|
|
66
|
+
fs.unlinkSync(file);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/*then copy the new files*/
|
|
73
|
+
files = listFiles(docs);
|
|
74
|
+
for (const file of files) {
|
|
75
|
+
|
|
76
|
+
let idx = file.indexOf("docs/")+5;
|
|
77
|
+
let dest = file.substring(idx);
|
|
78
|
+
let split = dest.split("/");
|
|
79
|
+
let dir = path.resolve(concordeDoc);
|
|
80
|
+
for (let i = 0; i < split.length - 1; i++) {
|
|
81
|
+
dir += "/" + split[i];
|
|
82
|
+
if (!fs.existsSync(dir)) {
|
|
83
|
+
fs.mkdirSync(dir);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
dir += "/" + split[split.length - 1];
|
|
87
|
+
fs.copyFileSync(file, dir);
|
|
88
|
+
}
|
|
89
|
+
//log an Emoji finger showing the user what to do next
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
console.info("---");
|
|
93
|
+
console.info("NOW run the following command to publish the docs");
|
|
94
|
+
console.info("👉 cd ../concorde_doc && git add . && git commit -m 'update doc' && git push && cd ../concorde");
|
|
95
|
+
console.info("---");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
copyToConcordeDoc();
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* dans ../concorde_doc, faire un git add, commit et push
|
|
103
|
+
*/
|
|
104
|
+
/*
|
|
105
|
+
function gitConcordeDoc() {
|
|
106
|
+
let concordeDoc = path.resolve("../concorde_doc");
|
|
107
|
+
if (fs.existsSync(concordeDoc)) {
|
|
108
|
+
exec("cd " + concordeDoc + " && git add . && git commit -m 'update doc' && git push", (error, stdout, stderr) => {
|
|
109
|
+
if (error) {
|
|
110
|
+
console.error(`exec error: ${error}`);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
console.log(`stdout: ${stdout}`);
|
|
114
|
+
console.error(`stderr: ${stderr}`);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
gitConcordeDoc(); */
|
|
@@ -11,6 +11,7 @@ import "@supersoniks/concorde/core/components/ui/toast/toast-item";
|
|
|
11
11
|
import { Toast } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
12
12
|
import { ConcordeWindow } from "@supersoniks/concorde/core/_types/types";
|
|
13
13
|
import { Theme } from "@supersoniks/concorde/core/components/ui/theme/theme";
|
|
14
|
+
import { sonicClassPrefix } from "@supersoniks/concorde/core/utils/Utils";
|
|
14
15
|
|
|
15
16
|
declare const window: ConcordeWindow;
|
|
16
17
|
|
|
@@ -205,9 +206,11 @@ export class SonicToast extends LitElement {
|
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
|
|
208
|
-
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
209
212
|
if (typeof window !== "undefined") {
|
|
210
|
-
window
|
|
213
|
+
window[sonicClassPrefix+"Toast"] = window[sonicClassPrefix+"Toast"] || SonicToast;
|
|
211
214
|
}
|
|
212
215
|
|
|
213
216
|
/**
|
|
@@ -309,9 +309,7 @@ const Form = <T extends Constructor<SubscriberInterface>>(superClass: T) => {
|
|
|
309
309
|
this.formDataProvider = this.getAncestorAttributeValue(
|
|
310
310
|
"formDataProvider"
|
|
311
311
|
) as string;
|
|
312
|
-
|
|
313
|
-
this.setAttribute("value", this.value as string);
|
|
314
|
-
}
|
|
312
|
+
|
|
315
313
|
super.connectedCallback();
|
|
316
314
|
this.addKeyboardNavigation();
|
|
317
315
|
}
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
PublisherContentType,
|
|
11
11
|
} from "../_types/types";
|
|
12
12
|
import HTML from "./HTML";
|
|
13
|
+
import { sonicClassPrefix } from "./Utils";
|
|
13
14
|
type DynamicFillingListener = any;
|
|
14
15
|
type TemplateFillingListener = {
|
|
15
16
|
propertyMap: Record<string, string>;
|
|
@@ -32,6 +33,9 @@ if (typeof __SONIC_PREFIX__ === "undefined") {
|
|
|
32
33
|
}
|
|
33
34
|
export const prefix = SONIC_PREFIX;
|
|
34
35
|
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
35
39
|
const localStorageDataKey =
|
|
36
40
|
SONIC_PREFIX == "sonic"
|
|
37
41
|
? "publisher-proxies-data"
|
|
@@ -144,20 +148,27 @@ export class PublisherProxy<T = any> {
|
|
|
144
148
|
);
|
|
145
149
|
}
|
|
146
150
|
_publishDynamicFilling_(key: string, value: CoreJSType) {
|
|
151
|
+
|
|
152
|
+
|
|
147
153
|
this._fillListeners_.forEach((handler) => {
|
|
148
154
|
if (handler[key] !== value) handler[key] = value;
|
|
149
155
|
});
|
|
150
156
|
this._publishTemplateFilling_(key, value);
|
|
151
157
|
}
|
|
152
158
|
_publishTemplateFilling_(key: string, value: CoreJSType) {
|
|
159
|
+
|
|
153
160
|
this._templateFillListeners_.forEach((handler) => {
|
|
161
|
+
|
|
154
162
|
const desc = Object.getOwnPropertyDescriptor(handler, key);
|
|
155
163
|
|
|
164
|
+
|
|
156
165
|
if (desc && !desc.set && !desc.writable) return;
|
|
157
166
|
|
|
167
|
+
|
|
158
168
|
if (handler.propertyMap && handler.propertyMap[key]) {
|
|
159
169
|
key = handler.propertyMap[key];
|
|
160
170
|
}
|
|
171
|
+
|
|
161
172
|
if (typeof handler[key] != "undefined" && handler[key] !== value) {
|
|
162
173
|
handler[key] = value;
|
|
163
174
|
}
|
|
@@ -347,16 +358,19 @@ export class PublisherProxy<T = any> {
|
|
|
347
358
|
this.parent._value_[this._parentKey_] = valueTosetInParent;
|
|
348
359
|
}
|
|
349
360
|
}
|
|
350
|
-
|
|
351
|
-
|
|
361
|
+
|
|
352
362
|
if (isPrimitiveValue) {
|
|
363
|
+
|
|
364
|
+
|
|
353
365
|
//await //await here gives better performance but can cause issues with some listeners
|
|
354
366
|
this._publishAssignement_(lockInternalMutationsTransmission);
|
|
355
|
-
if (this.parent && this._parentKey_)
|
|
356
|
-
|
|
367
|
+
if (this.parent && this._parentKey_){
|
|
368
|
+
|
|
369
|
+
this.parent._publishDynamicFilling_(
|
|
357
370
|
this._parentKey_,
|
|
358
371
|
(this._value_ as any).__value
|
|
359
372
|
);
|
|
373
|
+
}
|
|
360
374
|
|
|
361
375
|
return true;
|
|
362
376
|
}
|
|
@@ -390,6 +404,11 @@ export class PublisherProxy<T = any> {
|
|
|
390
404
|
*/
|
|
391
405
|
//await //await here gives better performance but can cause issues with some listeners
|
|
392
406
|
this._publishAssignement_();
|
|
407
|
+
if (this.parent && this._parentKey_)
|
|
408
|
+
this.parent._publishDynamicFilling_(
|
|
409
|
+
this._parentKey_,
|
|
410
|
+
(this._value_ as any)
|
|
411
|
+
);
|
|
393
412
|
/**
|
|
394
413
|
* Si la donnée est complexe (objet, tableau)
|
|
395
414
|
* on crée les proxys pour les sous-éléments qui n'en on pas
|
|
@@ -429,7 +448,7 @@ export class PublisherProxy<T = any> {
|
|
|
429
448
|
const v = (this._value_ as any).__value;
|
|
430
449
|
return (this._cachedGet_ = (v != undefined ? v : null) as T);
|
|
431
450
|
}
|
|
432
|
-
return (this._cachedGet_ = this._value_);
|
|
451
|
+
return (this._cachedGet_ = (this._value_ != undefined ? this._value_ : null) as T);
|
|
433
452
|
}
|
|
434
453
|
/**
|
|
435
454
|
* retourner le webcomponent auquel le proxy est associé
|
|
@@ -698,15 +717,11 @@ export class PublisherManager {
|
|
|
698
717
|
return new TextDecoder().decode(result);
|
|
699
718
|
}
|
|
700
719
|
}
|
|
701
|
-
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
if (!customWin.SonicPublisherManager) {
|
|
705
|
-
customWin.SonicPublisherManager = PublisherManager;
|
|
720
|
+
if (typeof window !== "undefined") {
|
|
721
|
+
const win = window as any;
|
|
722
|
+
win[sonicClassPrefix+"PublisherManager"] = win[sonicClassPrefix+"PublisherManager"] || PublisherManager;
|
|
706
723
|
}
|
|
707
|
-
|
|
708
|
-
PublisherManager.getInstance()
|
|
709
|
-
);
|
|
724
|
+
|
|
710
725
|
|
|
711
726
|
const internalProps: Set<string> = new Set([
|
|
712
727
|
"invalidate",
|
package/src/core/utils/Utils.ts
CHANGED
|
@@ -10,3 +10,15 @@ export default class Utils {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
declare const __SONIC_PREFIX__: string;
|
|
15
|
+
let SONIC_PREFIX = "sonic";
|
|
16
|
+
|
|
17
|
+
if (typeof __SONIC_PREFIX__ !== "undefined") {
|
|
18
|
+
SONIC_PREFIX = __SONIC_PREFIX__;
|
|
19
|
+
}
|
|
20
|
+
let prefixUpperCamelCase = SONIC_PREFIX.replace(
|
|
21
|
+
/-([a-z])/g,
|
|
22
|
+
(g) => g[1].toUpperCase()
|
|
23
|
+
);
|
|
24
|
+
export const sonicClassPrefix = prefixUpperCamelCase.charAt(0).toUpperCase() + prefixUpperCamelCase.slice(1);
|