@supersoniks/concorde 4.4.2 → 4.5.1
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 +670 -584
- package/concorde-core.es.js +9729 -7104
- package/dist/concorde-core.bundle.js +670 -584
- package/dist/concorde-core.es.js +9729 -7104
- package/package.json +7 -4
- package/src/core/components/functional/fetch/fetch.md +0 -0
- package/src/core/components/ui/_css/scroll.ts +0 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/alert/alert.ts +0 -0
- package/src/core/components/ui/button/button.ts +0 -0
- package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
- package/src/core/components/ui/divider/divider.ts +0 -0
- package/src/core/components/ui/menu/menu.md +0 -0
- package/src/core/components/ui/modal/modal-close.ts +0 -0
- package/src/core/components/ui/modal/modal-utils.ts +46 -0
- package/src/core/components/ui/modal/modal.md +0 -0
- package/src/core/components/ui/modal/modal.ts +33 -8
- package/src/core/components/ui/table/table-caption.ts +0 -0
- package/src/core/decorators/subscriber/onAssign.ts +4 -4
- package/src/core/utils/dataProviderKey.spec.ts +8 -0
- package/src/core/utils/dataProviderKey.ts +31 -12
- package/src/core/utils/route.ts +0 -0
- package/src/docs/code.ts +0 -0
- package/src/tsconfig.json +9 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite/config.js +52 -34
- package/vite.config.mts +14 -12
- package/docs/assets/index-CW8cIYT9.js +0 -4949
- package/docs/assets/index-DZtxIZCW.css +0 -1
- 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 +0 -5
- package/docs/img/concorde-logo.svg +0 -1
- 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 +0 -93
- package/docs/src/core/components/functional/date/date.md +0 -290
- package/docs/src/core/components/functional/fetch/fetch.md +0 -123
- package/docs/src/core/components/functional/if/if.md +0 -16
- package/docs/src/core/components/functional/list/list.md +0 -199
- package/docs/src/core/components/functional/mix/mix.md +0 -41
- package/docs/src/core/components/functional/queue/queue.md +0 -87
- package/docs/src/core/components/functional/router/router.md +0 -129
- package/docs/src/core/components/functional/sdui/default-library.json +0 -108
- package/docs/src/core/components/functional/sdui/example.json +0 -99
- package/docs/src/core/components/functional/sdui/sdui.md +0 -356
- package/docs/src/core/components/functional/states/states.md +0 -87
- package/docs/src/core/components/functional/submit/submit.md +0 -83
- package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
- package/docs/src/core/components/functional/value/value.md +0 -35
- package/docs/src/core/components/ui/alert/alert.md +0 -121
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
- package/docs/src/core/components/ui/badge/badge.md +0 -127
- package/docs/src/core/components/ui/button/button.md +0 -182
- package/docs/src/core/components/ui/captcha/captcha.md +0 -24
- package/docs/src/core/components/ui/card/card.md +0 -97
- package/docs/src/core/components/ui/divider/divider.md +0 -35
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -104
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -129
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -77
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -44
- package/docs/src/core/components/ui/form/input/input.md +0 -167
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -131
- package/docs/src/core/components/ui/form/radio/radio.md +0 -84
- package/docs/src/core/components/ui/form/select/select.md +0 -97
- package/docs/src/core/components/ui/form/switch/switch.md +0 -84
- package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
- package/docs/src/core/components/ui/group/group.md +0 -75
- package/docs/src/core/components/ui/icon/icon.md +0 -125
- package/docs/src/core/components/ui/icon/icons.json +0 -1
- package/docs/src/core/components/ui/image/image.md +0 -107
- package/docs/src/core/components/ui/link/link.md +0 -43
- package/docs/src/core/components/ui/loader/loader.md +0 -67
- package/docs/src/core/components/ui/menu/menu.md +0 -329
- package/docs/src/core/components/ui/modal/modal.md +0 -119
- package/docs/src/core/components/ui/pop/pop.md +0 -96
- package/docs/src/core/components/ui/progress/progress.md +0 -63
- package/docs/src/core/components/ui/table/table.md +0 -455
- package/docs/src/core/components/ui/toast/toast.md +0 -166
- package/docs/src/core/components/ui/tooltip/tooltip.md +0 -82
- package/docs/src/docs/_core-concept/overview.md +0 -57
- package/docs/src/docs/_core-concept/subscriber.md +0 -76
- package/docs/src/docs/_decorators/ancestor-attribute.md +0 -78
- package/docs/src/docs/_decorators/auto-subscribe.md +0 -199
- package/docs/src/docs/_decorators/bind.md +0 -164
- package/docs/src/docs/_decorators/get.md +0 -65
- package/docs/src/docs/_decorators/on-assign.md +0 -336
- package/docs/src/docs/_decorators/publish.md +0 -54
- package/docs/src/docs/_decorators/subscribe.md +0 -36
- package/docs/src/docs/_decorators/wait-for-ancestors.md +0 -160
- package/docs/src/docs/_getting-started/concorde-outside.md +0 -143
- package/docs/src/docs/_getting-started/create-a-component.md +0 -137
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -174
- package/docs/src/docs/_getting-started/pubsub.md +0 -150
- package/docs/src/docs/_getting-started/start.md +0 -39
- package/docs/src/docs/_getting-started/theming.md +0 -91
- package/docs/src/docs/_misc/dataProviderKey.md +0 -135
- package/docs/src/docs/_misc/endpoint.md +0 -42
- package/docs/src/docs/_misc/templates-demo.md +0 -19
- package/docs/src/docs/search/docs-search.json +0 -5197
- package/docs/src/tag-list.json +0 -1
- package/docs/src/tsconfig-model.json +0 -23
- package/docs/src/tsconfig.json +0 -987
- package/docs/svg/regular/plane.svg +0 -1
- package/docs/svg/solid/plane.svg +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersoniks/concorde",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "",
|
|
@@ -220,6 +220,9 @@
|
|
|
220
220
|
"./modal-title": "./src/core/components/ui/modal/modal-title.ts",
|
|
221
221
|
"./ui/modal-title": "./src/core/components/ui/modal/modal-title.ts",
|
|
222
222
|
"./ui/modal/modal-title": "./src/core/components/ui/modal/modal-title.ts",
|
|
223
|
+
"./modal-utils": "./src/core/components/ui/modal/modal-utils.ts",
|
|
224
|
+
"./ui/modal-utils": "./src/core/components/ui/modal/modal-utils.ts",
|
|
225
|
+
"./ui/modal/modal-utils": "./src/core/components/ui/modal/modal-utils.ts",
|
|
223
226
|
"./modal": "./src/core/components/ui/modal/modal.ts",
|
|
224
227
|
"./ui/modal": "./src/core/components/ui/modal/modal.ts",
|
|
225
228
|
"./pop": "./src/core/components/ui/pop/pop.ts",
|
|
@@ -341,7 +344,7 @@
|
|
|
341
344
|
"devDependencies": {
|
|
342
345
|
"@tailwindcss/typography": "^0.5.12",
|
|
343
346
|
"@types/node": "^24.5.2",
|
|
344
|
-
"@vitejs/plugin-basic-ssl": "^2.
|
|
347
|
+
"@vitejs/plugin-basic-ssl": "^2.1.0",
|
|
345
348
|
"altcha": "^1.0.7",
|
|
346
349
|
"autoprefixer": "^10.4.19",
|
|
347
350
|
"baseline-browser-mapping": "^2.8.31",
|
|
@@ -354,8 +357,8 @@
|
|
|
354
357
|
"rollup-plugin-postcss-lit": "^2.1.0",
|
|
355
358
|
"tailwindcss": "^3.4.3",
|
|
356
359
|
"typescript": "^5.4.3",
|
|
357
|
-
"vite": "^
|
|
358
|
-
"vitest": "^
|
|
360
|
+
"vite": "^7.1.5",
|
|
361
|
+
"vitest": "^3.2.4"
|
|
359
362
|
},
|
|
360
363
|
"dependencies": {
|
|
361
364
|
"@lit-labs/motion": "^1.0.7",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CSSResultGroup, CSSResult } from "lit";
|
|
2
|
+
|
|
3
|
+
export type ModalStyleSheetInput =
|
|
4
|
+
| CSSResultGroup
|
|
5
|
+
| CSSStyleSheet
|
|
6
|
+
| Array<CSSResultGroup | CSSStyleSheet>;
|
|
7
|
+
|
|
8
|
+
const styleSheetCache = new WeakMap<CSSResult, CSSStyleSheet>();
|
|
9
|
+
|
|
10
|
+
function cssResultToStyleSheet(styleResult: CSSResult): CSSStyleSheet {
|
|
11
|
+
const cachedStyleSheet = styleSheetCache.get(styleResult);
|
|
12
|
+
if (cachedStyleSheet) return cachedStyleSheet;
|
|
13
|
+
|
|
14
|
+
const styleSheet = new CSSStyleSheet();
|
|
15
|
+
styleSheet.replaceSync(styleResult.cssText);
|
|
16
|
+
styleSheetCache.set(styleResult, styleSheet);
|
|
17
|
+
return styleSheet;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function isCSSResult(value: unknown): value is CSSResult {
|
|
21
|
+
return value instanceof CSSResult;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function normalizeStyleSheets(
|
|
25
|
+
styleSheet?: ModalStyleSheetInput
|
|
26
|
+
): Array<CSSStyleSheet> {
|
|
27
|
+
if (!styleSheet) return [];
|
|
28
|
+
|
|
29
|
+
const styleSheets = Array.isArray(styleSheet) ? styleSheet : [styleSheet];
|
|
30
|
+
|
|
31
|
+
return styleSheets.flatMap((sheet) => {
|
|
32
|
+
if (Array.isArray(sheet)) {
|
|
33
|
+
return normalizeStyleSheets(sheet);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (sheet instanceof CSSStyleSheet) {
|
|
37
|
+
return [sheet];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (isCSSResult(sheet)) {
|
|
41
|
+
return [cssResultToStyleSheet(sheet)];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return [];
|
|
45
|
+
});
|
|
46
|
+
}
|
|
File without changes
|
|
@@ -19,6 +19,7 @@ import LocationHandler from "@supersoniks/concorde/core/utils/LocationHandler";
|
|
|
19
19
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
20
20
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
21
21
|
import { ButtonType } from "../button/button";
|
|
22
|
+
import { ModalStyleSheetInput, normalizeStyleSheets } from "./modal-utils";
|
|
22
23
|
|
|
23
24
|
declare const window: ConcordeWindow;
|
|
24
25
|
declare type ModalCreateOptions = {
|
|
@@ -26,6 +27,7 @@ declare type ModalCreateOptions = {
|
|
|
26
27
|
subtitle?: string | DirectiveResult;
|
|
27
28
|
content?: string | DirectiveResult;
|
|
28
29
|
actions?: string | DirectiveResult;
|
|
30
|
+
styleSheet?: ModalStyleSheetInput;
|
|
29
31
|
zIndex?: string;
|
|
30
32
|
paddingX?: string;
|
|
31
33
|
paddingY?: string;
|
|
@@ -171,7 +173,8 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
171
173
|
z-index: 20;
|
|
172
174
|
opacity: 0;
|
|
173
175
|
transform: scale(0);
|
|
174
|
-
transition:
|
|
176
|
+
transition:
|
|
177
|
+
transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
175
178
|
opacity 0.1s linear;
|
|
176
179
|
transform-origin: center center;
|
|
177
180
|
display: flex;
|
|
@@ -223,6 +226,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
223
226
|
@property({ type: String }) width = "100%";
|
|
224
227
|
@property({ type: String }) height = "fit-content";
|
|
225
228
|
@property({ type: String }) effect: effectType = "slide";
|
|
229
|
+
@property({ attribute: false }) styleSheet?: ModalStyleSheetInput;
|
|
226
230
|
|
|
227
231
|
@property({ type: Object }) options?: ModalCreateOptions;
|
|
228
232
|
|
|
@@ -237,6 +241,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
237
241
|
|
|
238
242
|
@state() private _animationState: "visible" | "in" | "out" | "hidden" =
|
|
239
243
|
"hidden";
|
|
244
|
+
private _adoptedStyleSheets: Array<CSSStyleSheet> = [];
|
|
240
245
|
|
|
241
246
|
static create(options: ModalCreateOptions): Modal {
|
|
242
247
|
const modal = document.createElement(tagName) as Modal;
|
|
@@ -260,6 +265,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
260
265
|
if (options.noCloseButton) modal.noCloseButton = true;
|
|
261
266
|
if (options.closeButtonType)
|
|
262
267
|
modal.closeButtonType = options?.closeButtonType;
|
|
268
|
+
if (options.styleSheet) modal.styleSheet = options?.styleSheet;
|
|
263
269
|
if (options.paddingX) modal.paddingX = options?.paddingX;
|
|
264
270
|
if (options.paddingY) modal.paddingY = options?.paddingY;
|
|
265
271
|
if (options.zIndex) modal.zIndex = options?.zIndex;
|
|
@@ -327,6 +333,10 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
327
333
|
} else if (changedToHidden && this._animationState === "visible") {
|
|
328
334
|
this.hide();
|
|
329
335
|
}
|
|
336
|
+
|
|
337
|
+
if (_changedProperties.has("styleSheet")) {
|
|
338
|
+
this.syncAdoptedStyleSheets();
|
|
339
|
+
}
|
|
330
340
|
}
|
|
331
341
|
|
|
332
342
|
// SI c'est en modal
|
|
@@ -393,6 +403,21 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
393
403
|
`;
|
|
394
404
|
}
|
|
395
405
|
|
|
406
|
+
syncAdoptedStyleSheets() {
|
|
407
|
+
if (!(this.renderRoot instanceof ShadowRoot)) return;
|
|
408
|
+
|
|
409
|
+
const nextStyleSheets = normalizeStyleSheets(this.styleSheet);
|
|
410
|
+
const currentStyleSheets = this.renderRoot.adoptedStyleSheets.filter(
|
|
411
|
+
(sheet) => !this._adoptedStyleSheets.includes(sheet),
|
|
412
|
+
);
|
|
413
|
+
|
|
414
|
+
this.renderRoot.adoptedStyleSheets = [
|
|
415
|
+
...currentStyleSheets,
|
|
416
|
+
...nextStyleSheets,
|
|
417
|
+
];
|
|
418
|
+
this._adoptedStyleSheets = nextStyleSheets;
|
|
419
|
+
}
|
|
420
|
+
|
|
396
421
|
modalFragment(optionKey: keyof ModalCreateOptions) {
|
|
397
422
|
const optionValue: Object | PrimitiveType = this.options?.[optionKey];
|
|
398
423
|
if (!optionValue) return nothing;
|
|
@@ -440,7 +465,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
440
465
|
this.visible = false;
|
|
441
466
|
if (this.hasAttribute("resetDataProviderOnHide")) {
|
|
442
467
|
PublisherManager.get(this.getAttribute("resetDataProviderOnHide")).set(
|
|
443
|
-
{}
|
|
468
|
+
{},
|
|
444
469
|
);
|
|
445
470
|
}
|
|
446
471
|
if (this.removeHashOnHide) {
|
|
@@ -470,7 +495,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
470
495
|
if (e.key === "Escape") {
|
|
471
496
|
e.preventDefault();
|
|
472
497
|
const visibleModals = Modal.modals.filter(
|
|
473
|
-
(modal) => modal._animationState !== "hidden" && !modal.forceAction
|
|
498
|
+
(modal) => modal._animationState !== "hidden" && !modal.forceAction,
|
|
474
499
|
);
|
|
475
500
|
if (visibleModals.length > 0) {
|
|
476
501
|
const lastVisibleModal = visibleModals[visibleModals.length - 1];
|
|
@@ -529,8 +554,8 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
529
554
|
easing: isEntering ? quartOut : quadOut,
|
|
530
555
|
fill: "both",
|
|
531
556
|
delay: delay,
|
|
532
|
-
}
|
|
533
|
-
)
|
|
557
|
+
},
|
|
558
|
+
),
|
|
534
559
|
);
|
|
535
560
|
animations.push(
|
|
536
561
|
element.animate(
|
|
@@ -540,13 +565,13 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
540
565
|
easing: linear,
|
|
541
566
|
fill: "both",
|
|
542
567
|
delay: delay,
|
|
543
|
-
}
|
|
544
|
-
)
|
|
568
|
+
},
|
|
569
|
+
),
|
|
545
570
|
);
|
|
546
571
|
}
|
|
547
572
|
|
|
548
573
|
Promise.all(animations.map((anim) => anim.finished)).then(() =>
|
|
549
|
-
resolve()
|
|
574
|
+
resolve(),
|
|
550
575
|
);
|
|
551
576
|
});
|
|
552
577
|
}
|
|
File without changes
|
|
@@ -36,7 +36,7 @@ export function onAssign(...values: Array<string>) {
|
|
|
36
36
|
return function (
|
|
37
37
|
target: unknown,
|
|
38
38
|
_propertyKey: string,
|
|
39
|
-
descriptor: PropertyDescriptor
|
|
39
|
+
descriptor: PropertyDescriptor,
|
|
40
40
|
) {
|
|
41
41
|
setSubscribable(target);
|
|
42
42
|
const stateKey = `__onAssign_state_${_propertyKey}__`;
|
|
@@ -88,7 +88,7 @@ export function onAssign(...values: Array<string>) {
|
|
|
88
88
|
|
|
89
89
|
const subscribeToPath = (
|
|
90
90
|
conf: Configuration,
|
|
91
|
-
resolvedPath: string | null
|
|
91
|
+
resolvedPath: string | null,
|
|
92
92
|
) => {
|
|
93
93
|
// Désabonnement de l'ancien publisher
|
|
94
94
|
if (conf.unsubscribePublisher) {
|
|
@@ -124,7 +124,7 @@ export function onAssign(...values: Array<string>) {
|
|
|
124
124
|
if (conf.pathConfig.isDynamic) {
|
|
125
125
|
const resolution = resolveDynamicPath(
|
|
126
126
|
component,
|
|
127
|
-
conf.pathConfig.originalPath
|
|
127
|
+
conf.pathConfig.originalPath,
|
|
128
128
|
);
|
|
129
129
|
if (!resolution.ready) {
|
|
130
130
|
subscribeToPath(conf, null);
|
|
@@ -146,7 +146,7 @@ export function onAssign(...values: Array<string>) {
|
|
|
146
146
|
onAssignDynamicWatchKeys.hooked,
|
|
147
147
|
component,
|
|
148
148
|
dependency,
|
|
149
|
-
() => refreshSubscriptions()
|
|
149
|
+
() => refreshSubscriptions(),
|
|
150
150
|
);
|
|
151
151
|
state.cleanupWatchers.push(unsubscribe);
|
|
152
152
|
}
|
|
@@ -12,6 +12,14 @@ type ControlStats = {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
describe("DataProviderKey", () => {
|
|
15
|
+
it("chaîne sans optional chaining quand le schéma Swagger a des propriétés optionnelles", () => {
|
|
16
|
+
type Perm = {access_control?: {use_app?: boolean}};
|
|
17
|
+
type AdminLike = {permissions?: Perm};
|
|
18
|
+
const key = new DataProviderKey<AdminLike>("admin");
|
|
19
|
+
const useApp = key.permissions.access_control.use_app;
|
|
20
|
+
expect(useApp.path).toBe("admin.permissions.access_control.use_app");
|
|
21
|
+
});
|
|
22
|
+
|
|
15
23
|
it("construit le chemin cumulatif via les accès", () => {
|
|
16
24
|
const myKey = new DataProviderKey<ControlStats>(
|
|
17
25
|
"idDonneesDeStats",
|
|
@@ -19,22 +19,41 @@ type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
|
19
19
|
* Prototype de classe décorée : propriétés minimales attendues sur l’hôte quand la clé est
|
|
20
20
|
* `DataProviderKey<…, U>` (U renseigné à la construction). Avec `U` par défaut (`any`), pas de contrainte.
|
|
21
21
|
*/
|
|
22
|
-
export type DataProviderKeyHost<U> =
|
|
23
|
-
? object
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
export type DataProviderKeyHost<U> =
|
|
23
|
+
IsAny<U> extends true ? object : keyof U extends never ? object : object & U;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Navigation « dot » : une propriété optionnelle `foo?: X` reste traversable (le chemin publisher
|
|
27
|
+
* existe). On retire `null` / `undefined` seulement quand la partie non-nulle est un `object`
|
|
28
|
+
* (y compris tableaux, tuples), pour que le chaînage `.bar.baz` soit typé sans `?.`.
|
|
29
|
+
* Les feuilles (`boolean | undefined`, `string`, etc.) gardent leur union telle quelle.
|
|
30
|
+
*/
|
|
31
|
+
type DataProviderKeyNavigate<T> = T extends (...args: unknown[]) => unknown
|
|
32
|
+
? T
|
|
33
|
+
: NonNullable<T> extends infer U
|
|
34
|
+
? [U] extends [never]
|
|
35
|
+
? T
|
|
36
|
+
: U extends object
|
|
37
|
+
? U
|
|
38
|
+
: T
|
|
39
|
+
: T;
|
|
27
40
|
|
|
28
41
|
/**
|
|
29
42
|
* U : forme minimale du composant pour résoudre les placeholders `${…}` du path ; inchangée lors de la navigation.
|
|
30
43
|
*/
|
|
31
|
-
type DataProviderKeyProxy<T, U = any> =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
type DataProviderKeyProxy<T, U = any> =
|
|
45
|
+
NonNullable<T> extends object
|
|
46
|
+
? {
|
|
47
|
+
[K in keyof NonNullable<T> as NonNullable<T>[K] extends (
|
|
48
|
+
...args: unknown[]
|
|
49
|
+
) => unknown
|
|
50
|
+
? never
|
|
51
|
+
: K]-?: DataProviderKey<
|
|
52
|
+
DataProviderKeyNavigate<NonNullable<T>[K]>,
|
|
53
|
+
U
|
|
54
|
+
>;
|
|
55
|
+
}
|
|
56
|
+
: object;
|
|
38
57
|
|
|
39
58
|
export type DataProviderKey<T, U = any> = DataProviderKeyImpl<T, U> &
|
|
40
59
|
DataProviderKeyProxy<T, U>;
|
package/src/core/utils/route.ts
CHANGED
|
File without changes
|
package/src/docs/code.ts
CHANGED
|
File without changes
|
package/src/tsconfig.json
CHANGED
|
@@ -612,6 +612,15 @@
|
|
|
612
612
|
"./ui/modal/modal-title": [
|
|
613
613
|
"/sites/concorde/src/core/components/ui/modal/modal-title.ts"
|
|
614
614
|
],
|
|
615
|
+
"./modal-utils": [
|
|
616
|
+
"/sites/concorde/src/core/components/ui/modal/modal-utils.ts"
|
|
617
|
+
],
|
|
618
|
+
"./ui/modal-utils": [
|
|
619
|
+
"/sites/concorde/src/core/components/ui/modal/modal-utils.ts"
|
|
620
|
+
],
|
|
621
|
+
"./ui/modal/modal-utils": [
|
|
622
|
+
"/sites/concorde/src/core/components/ui/modal/modal-utils.ts"
|
|
623
|
+
],
|
|
615
624
|
"./modal": [
|
|
616
625
|
"/sites/concorde/src/core/components/ui/modal/modal.ts"
|
|
617
626
|
],
|
package/src/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./components.ts","./concorde-loaded.ts","./dataprovider.ts","./decorators.ts","./directives.ts","./index.ts","./mixins.ts","./utils.ts","./core/core.ts","./core/_types/endpoint.ts","./core/_types/key.ts","./core/_types/types.ts","./core/components/functional/functional.ts","./core/components/functional/date/date.ts","./core/components/functional/example/example.ts","./core/components/functional/fetch/fetch.ts","./core/components/functional/if/if.test.ts","./core/components/functional/if/if.ts","./core/components/functional/list/list.demo.ts","./core/components/functional/list/list.spec.ts","./core/components/functional/list/list.ts","./core/components/functional/mix/mix.ts","./core/components/functional/queue/queue.demo.ts","./core/components/functional/queue/queue.ts","./core/components/functional/router/redirect.ts","./core/components/functional/router/router.demo.ts","./core/components/functional/router/router.spec.ts","./core/components/functional/router/router.ts","./core/components/functional/sdui/SDUIDescriptorTransformer.ts","./core/components/functional/sdui/sdui-utils.ts","./core/components/functional/sdui/sdui.ts","./core/components/functional/sdui/types.ts","./core/components/functional/sonic-scope/sonic-scope.ts","./core/components/functional/states/states.demo.ts","./core/components/functional/states/states.spec.ts","./core/components/functional/states/states.ts","./core/components/functional/submit/submit.ts","./core/components/functional/subscriber/subscriber.ts","./core/components/functional/translation/translation.ts","./core/components/functional/value/value.ts","./core/components/ui/ui.ts","./core/components/ui/_css/scroll.ts","./core/components/ui/_css/shadow.ts","./core/components/ui/_css/size.ts","./core/components/ui/_css/type.ts","./core/components/ui/alert/alert.ts","./core/components/ui/alert-messages/alert-messages.ts","./core/components/ui/badge/badge.ts","./core/components/ui/button/button.ts","./core/components/ui/captcha/altchaStyles.ts","./core/components/ui/captcha/captcha.ts","./core/components/ui/card/card-footer.ts","./core/components/ui/card/card-header-descripton.ts","./core/components/ui/card/card-header.ts","./core/components/ui/card/card-main.ts","./core/components/ui/card/card.ts","./core/components/ui/divider/divider.ts","./core/components/ui/form/checkbox/checkbox.ts","./core/components/ui/form/css/form-control.ts","./core/components/ui/form/fieldset/fieldset.ts","./core/components/ui/form/fieldset/legend-description.ts","./core/components/ui/form/fieldset/legend.ts","./core/components/ui/form/form-actions/form-actions.ts","./core/components/ui/form/form-layout/form-layout.ts","./core/components/ui/form/input/input.ts","./core/components/ui/form/input/password-helper.ts","./core/components/ui/form/input/same-value-helper.ts","./core/components/ui/form/input-autocomplete/input-autocomplete.ts","./core/components/ui/form/radio/radio.ts","./core/components/ui/form/select/select.ts","./core/components/ui/form/switch/switch.ts","./core/components/ui/form/textarea/textarea.ts","./core/components/ui/group/group.ts","./core/components/ui/icon/icon.stories.ts","./core/components/ui/icon/icon.ts","./core/components/ui/icon/icons.ts","./core/components/ui/image/image.ts","./core/components/ui/link/link.ts","./core/components/ui/loader/loader.stories.ts","./core/components/ui/loader/loader.ts","./core/components/ui/loader/styles/fixed.ts","./core/components/ui/loader/styles/inline.ts","./core/components/ui/menu/menu-item.ts","./core/components/ui/menu/menu.ts","./core/components/ui/modal/modal-actions.ts","./core/components/ui/modal/modal-close.ts","./core/components/ui/modal/modal-content.ts","./core/components/ui/modal/modal-subtitle.ts","./core/components/ui/modal/modal-title.ts","./core/components/ui/modal/modal.ts","./core/components/ui/pop/pop.ts","./core/components/ui/progress/progress.ts","./core/components/ui/table/table-caption.ts","./core/components/ui/table/table-tbody.ts","./core/components/ui/table/table-td.ts","./core/components/ui/table/table-tfoot.ts","./core/components/ui/table/table-th.ts","./core/components/ui/table/table-thead.ts","./core/components/ui/table/table-tr.ts","./core/components/ui/table/table.ts","./core/components/ui/theme/theme.ts","./core/components/ui/theme/theme-collection/core-variables.ts","./core/components/ui/theme/theme-collection/dark.ts","./core/components/ui/theme/theme-collection/light.ts","./core/components/ui/toast/message-subscriber.ts","./core/components/ui/toast/toast-item.ts","./core/components/ui/toast/toast.ts","./core/components/ui/toast/types.ts","./core/components/ui/tooltip/tooltip.ts","./core/decorators/Subscriber.ts","./core/decorators/api.spec.ts","./core/decorators/api.ts","./core/decorators/lifecycle.ts","./core/decorators/subscriber/ancestorAttribute.ts","./core/decorators/subscriber/autoFill.ts","./core/decorators/subscriber/autoSubscribe.ts","./core/decorators/subscriber/bind.ts","./core/decorators/subscriber/common.ts","./core/decorators/subscriber/dynamicPath.ts","./core/decorators/subscriber/dynamicPropertyWatch.ts","./core/decorators/subscriber/onAssign.ts","./core/decorators/subscriber/publish.spec.ts","./core/decorators/subscriber/publish.ts","./core/decorators/subscriber/publisherPath.ts","./core/decorators/subscriber/subscribe.spec.ts","./core/decorators/subscriber/subscribe.ts","./core/directives/DataProvider.ts","./core/directives/Wording.ts","./core/mixins/Fetcher.ts","./core/mixins/FormCheckable.ts","./core/mixins/FormElement.ts","./core/mixins/FormInput.ts","./core/mixins/Subscriber.ts","./core/mixins/TemplatesContainer.ts","./core/mixins/mixins.ts","./core/utils/Arrays.ts","./core/utils/DataBindObserver.ts","./core/utils/Electron.ts","./core/utils/Format.ts","./core/utils/HTML.ts","./core/utils/LocationHandler.ts","./core/utils/Objects.ts","./core/utils/PublisherProxy.ts","./core/utils/Utils.ts","./core/utils/aesCrypto.ts","./core/utils/api.ts","./core/utils/dataProviderKey.spec.ts","./core/utils/dataProviderKey.ts","./core/utils/endpoint.spec.ts","./core/utils/endpoint.ts","./core/utils/route.spec.ts","./core/utils/route.ts","./core/utils/url-pattern.ts","./test-utils/TestUtils.ts"],"version":"5.9.2"}
|
|
1
|
+
{"root":["./components.ts","./concorde-loaded.ts","./dataprovider.ts","./decorators.ts","./directives.ts","./index.ts","./mixins.ts","./utils.ts","./core/core.ts","./core/_types/endpoint.ts","./core/_types/key.ts","./core/_types/types.ts","./core/components/functional/functional.ts","./core/components/functional/date/date.ts","./core/components/functional/example/example.ts","./core/components/functional/fetch/fetch.ts","./core/components/functional/if/if.test.ts","./core/components/functional/if/if.ts","./core/components/functional/list/list.demo.ts","./core/components/functional/list/list.spec.ts","./core/components/functional/list/list.ts","./core/components/functional/mix/mix.ts","./core/components/functional/queue/queue.demo.ts","./core/components/functional/queue/queue.ts","./core/components/functional/router/redirect.ts","./core/components/functional/router/router.demo.ts","./core/components/functional/router/router.spec.ts","./core/components/functional/router/router.ts","./core/components/functional/sdui/SDUIDescriptorTransformer.ts","./core/components/functional/sdui/sdui-utils.ts","./core/components/functional/sdui/sdui.ts","./core/components/functional/sdui/types.ts","./core/components/functional/sonic-scope/sonic-scope.ts","./core/components/functional/states/states.demo.ts","./core/components/functional/states/states.spec.ts","./core/components/functional/states/states.ts","./core/components/functional/submit/submit.ts","./core/components/functional/subscriber/subscriber.ts","./core/components/functional/translation/translation.ts","./core/components/functional/value/value.ts","./core/components/ui/ui.ts","./core/components/ui/_css/scroll.ts","./core/components/ui/_css/shadow.ts","./core/components/ui/_css/size.ts","./core/components/ui/_css/type.ts","./core/components/ui/alert/alert.ts","./core/components/ui/alert-messages/alert-messages.ts","./core/components/ui/badge/badge.ts","./core/components/ui/button/button.ts","./core/components/ui/captcha/altchaStyles.ts","./core/components/ui/captcha/captcha.ts","./core/components/ui/card/card-footer.ts","./core/components/ui/card/card-header-descripton.ts","./core/components/ui/card/card-header.ts","./core/components/ui/card/card-main.ts","./core/components/ui/card/card.ts","./core/components/ui/divider/divider.ts","./core/components/ui/form/checkbox/checkbox.ts","./core/components/ui/form/css/form-control.ts","./core/components/ui/form/fieldset/fieldset.ts","./core/components/ui/form/fieldset/legend-description.ts","./core/components/ui/form/fieldset/legend.ts","./core/components/ui/form/form-actions/form-actions.ts","./core/components/ui/form/form-layout/form-layout.ts","./core/components/ui/form/input/input.ts","./core/components/ui/form/input/password-helper.ts","./core/components/ui/form/input/same-value-helper.ts","./core/components/ui/form/input-autocomplete/input-autocomplete.ts","./core/components/ui/form/radio/radio.ts","./core/components/ui/form/select/select.ts","./core/components/ui/form/switch/switch.ts","./core/components/ui/form/textarea/textarea.ts","./core/components/ui/group/group.ts","./core/components/ui/icon/icon.stories.ts","./core/components/ui/icon/icon.ts","./core/components/ui/icon/icons.ts","./core/components/ui/image/image.ts","./core/components/ui/link/link.ts","./core/components/ui/loader/loader.stories.ts","./core/components/ui/loader/loader.ts","./core/components/ui/loader/styles/fixed.ts","./core/components/ui/loader/styles/inline.ts","./core/components/ui/menu/menu-item.ts","./core/components/ui/menu/menu.ts","./core/components/ui/modal/modal-actions.ts","./core/components/ui/modal/modal-close.ts","./core/components/ui/modal/modal-content.ts","./core/components/ui/modal/modal-subtitle.ts","./core/components/ui/modal/modal-title.ts","./core/components/ui/modal/modal-utils.ts","./core/components/ui/modal/modal.ts","./core/components/ui/pop/pop.ts","./core/components/ui/progress/progress.ts","./core/components/ui/table/table-caption.ts","./core/components/ui/table/table-tbody.ts","./core/components/ui/table/table-td.ts","./core/components/ui/table/table-tfoot.ts","./core/components/ui/table/table-th.ts","./core/components/ui/table/table-thead.ts","./core/components/ui/table/table-tr.ts","./core/components/ui/table/table.ts","./core/components/ui/theme/theme.ts","./core/components/ui/theme/theme-collection/core-variables.ts","./core/components/ui/theme/theme-collection/dark.ts","./core/components/ui/theme/theme-collection/light.ts","./core/components/ui/toast/message-subscriber.ts","./core/components/ui/toast/toast-item.ts","./core/components/ui/toast/toast.ts","./core/components/ui/toast/types.ts","./core/components/ui/tooltip/tooltip.ts","./core/decorators/Subscriber.ts","./core/decorators/api.spec.ts","./core/decorators/api.ts","./core/decorators/lifecycle.ts","./core/decorators/subscriber/ancestorAttribute.ts","./core/decorators/subscriber/autoFill.ts","./core/decorators/subscriber/autoSubscribe.ts","./core/decorators/subscriber/bind.ts","./core/decorators/subscriber/common.ts","./core/decorators/subscriber/dynamicPath.ts","./core/decorators/subscriber/dynamicPropertyWatch.ts","./core/decorators/subscriber/onAssign.ts","./core/decorators/subscriber/publish.spec.ts","./core/decorators/subscriber/publish.ts","./core/decorators/subscriber/publisherPath.ts","./core/decorators/subscriber/subscribe.spec.ts","./core/decorators/subscriber/subscribe.ts","./core/directives/DataProvider.ts","./core/directives/Wording.ts","./core/mixins/Fetcher.ts","./core/mixins/FormCheckable.ts","./core/mixins/FormElement.ts","./core/mixins/FormInput.ts","./core/mixins/Subscriber.ts","./core/mixins/TemplatesContainer.ts","./core/mixins/mixins.ts","./core/utils/Arrays.ts","./core/utils/DataBindObserver.ts","./core/utils/Electron.ts","./core/utils/Format.ts","./core/utils/HTML.ts","./core/utils/LocationHandler.ts","./core/utils/Objects.ts","./core/utils/PublisherProxy.ts","./core/utils/Utils.ts","./core/utils/aesCrypto.ts","./core/utils/api.ts","./core/utils/dataProviderKey.spec.ts","./core/utils/dataProviderKey.ts","./core/utils/endpoint.spec.ts","./core/utils/endpoint.ts","./core/utils/route.spec.ts","./core/utils/route.ts","./core/utils/url-pattern.ts","./test-utils/TestUtils.ts"],"version":"5.9.2"}
|
package/vite/config.js
CHANGED
|
@@ -93,7 +93,8 @@ componentsFiles.forEach((file) => {
|
|
|
93
93
|
}
|
|
94
94
|
if (shortPathMapping[`@concorde/${last}`]) {
|
|
95
95
|
console.warn(
|
|
96
|
-
`@concorde/${last} already exists in ${
|
|
96
|
+
`@concorde/${last} already exists in ${
|
|
97
|
+
shortPathMapping[`@concorde/${last}`]
|
|
97
98
|
} : ${file}`
|
|
98
99
|
);
|
|
99
100
|
}
|
|
@@ -115,7 +116,8 @@ componentsFiles.forEach((file) => {
|
|
|
115
116
|
}
|
|
116
117
|
if (shortPathMapping[`@concorde/${joined}`]) {
|
|
117
118
|
console.warn(
|
|
118
|
-
`@concorde/${joined} already exists in ${
|
|
119
|
+
`@concorde/${joined} already exists in ${
|
|
120
|
+
shortPathMapping[`@concorde/${joined}`]
|
|
119
121
|
}`
|
|
120
122
|
);
|
|
121
123
|
}
|
|
@@ -227,7 +229,7 @@ const scopeComponents = (prefix, filesFilter) => {
|
|
|
227
229
|
// // remap source beginig with @supersoniks/concorde to the local path
|
|
228
230
|
const result = path.resolve(
|
|
229
231
|
source.replace("@supersoniks/concorde", __dirname + "/../src") +
|
|
230
|
-
|
|
232
|
+
extension
|
|
231
233
|
);
|
|
232
234
|
// console.log("longPathMapping", result);
|
|
233
235
|
|
|
@@ -268,6 +270,10 @@ const config = (
|
|
|
268
270
|
const tsConfig = options.tsConfig;
|
|
269
271
|
const viteConfig = options.viteConfig;
|
|
270
272
|
const result = { ...viteConfig };
|
|
273
|
+
const decoratorsCompilerOptions = {
|
|
274
|
+
experimentalDecorators: true,
|
|
275
|
+
useDefineForClassFields: false,
|
|
276
|
+
};
|
|
271
277
|
|
|
272
278
|
result.plugins = [
|
|
273
279
|
...(result.plugins || []),
|
|
@@ -284,24 +290,45 @@ const config = (
|
|
|
284
290
|
__SONIC_PREFIX__: JSON.stringify(__SONIC_PREFIX__),
|
|
285
291
|
};
|
|
286
292
|
|
|
287
|
-
tsConfig
|
|
288
|
-
|
|
289
|
-
|
|
293
|
+
if (tsConfig?.compilerOptions) {
|
|
294
|
+
tsConfig.compilerOptions.paths = {
|
|
295
|
+
...(tsConfig.compilerOptions.paths || {}),
|
|
296
|
+
...shortPathMapping,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
result.esbuild = {
|
|
301
|
+
...(result.esbuild || {}),
|
|
302
|
+
tsconfigRaw: {
|
|
303
|
+
compilerOptions: {
|
|
304
|
+
...decoratorsCompilerOptions,
|
|
305
|
+
...(result.esbuild?.tsconfigRaw?.compilerOptions || {}),
|
|
306
|
+
},
|
|
307
|
+
},
|
|
290
308
|
};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
result.
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
309
|
+
|
|
310
|
+
result.optimizeDeps = {
|
|
311
|
+
...(result.optimizeDeps || {}),
|
|
312
|
+
esbuildOptions: {
|
|
313
|
+
...(result.optimizeDeps?.esbuildOptions || {}),
|
|
314
|
+
tsconfigRaw: {
|
|
315
|
+
compilerOptions: {
|
|
316
|
+
...decoratorsCompilerOptions,
|
|
317
|
+
...(result.optimizeDeps?.esbuildOptions?.tsconfigRaw
|
|
318
|
+
?.compilerOptions || {}),
|
|
319
|
+
},
|
|
298
320
|
},
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
321
|
+
},
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
if (tsConfig) {
|
|
325
|
+
result.esbuild = {
|
|
326
|
+
...result.esbuild,
|
|
327
|
+
tsconfigRaw: {
|
|
328
|
+
...tsConfig,
|
|
302
329
|
compilerOptions: {
|
|
303
|
-
...
|
|
304
|
-
...
|
|
330
|
+
...decoratorsCompilerOptions,
|
|
331
|
+
...(tsConfig.compilerOptions || {}),
|
|
305
332
|
},
|
|
306
333
|
},
|
|
307
334
|
};
|
|
@@ -309,22 +336,13 @@ const config = (
|
|
|
309
336
|
...(result.optimizeDeps || {}),
|
|
310
337
|
exclude: ["@supersoniks/concorde"],
|
|
311
338
|
include: ["url-pattern", "url-pattern/*", "url-pattern/*/*"],
|
|
312
|
-
|
|
313
|
-
...(result.optimizeDeps?.
|
|
314
|
-
|
|
315
|
-
...
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
...
|
|
319
|
-
},
|
|
320
|
-
tsconfig: {
|
|
321
|
-
...(result.optimizeDeps?.rolldownOptions?.transform?.tsconfig || {}),
|
|
322
|
-
...tsconfigInline,
|
|
323
|
-
compilerOptions: {
|
|
324
|
-
...(result.optimizeDeps?.rolldownOptions?.transform?.tsconfig
|
|
325
|
-
?.compilerOptions || {}),
|
|
326
|
-
...tsconfigInline.compilerOptions,
|
|
327
|
-
},
|
|
339
|
+
esbuildOptions: {
|
|
340
|
+
...(result.optimizeDeps?.esbuildOptions || {}),
|
|
341
|
+
tsconfigRaw: {
|
|
342
|
+
...tsConfig,
|
|
343
|
+
compilerOptions: {
|
|
344
|
+
...decoratorsCompilerOptions,
|
|
345
|
+
...(tsConfig.compilerOptions || {}),
|
|
328
346
|
},
|
|
329
347
|
},
|
|
330
348
|
},
|
package/vite.config.mts
CHANGED
|
@@ -43,15 +43,6 @@ const build = {
|
|
|
43
43
|
// minify: "terser",
|
|
44
44
|
emptyOutDir: true, //!currentConfig.isLibrary,
|
|
45
45
|
outDir: currentConfig.outDir,
|
|
46
|
-
// require("electron") dans src/core/utils/Electron.ts (lib + doc)
|
|
47
|
-
rolldownOptions: {
|
|
48
|
-
external: ["electron"],
|
|
49
|
-
transform: {
|
|
50
|
-
decorator: {
|
|
51
|
-
legacy: true,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
46
|
};
|
|
56
47
|
if (currentConfig.isLibrary) {
|
|
57
48
|
build.lib = {
|
|
@@ -74,13 +65,24 @@ fs.writeFileSync(
|
|
|
74
65
|
|
|
75
66
|
// https://vitejs.dev/config/
|
|
76
67
|
export default defineConfig({
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
esbuild: {
|
|
69
|
+
tsconfigRaw: {
|
|
70
|
+
compilerOptions: {
|
|
71
|
+
experimentalDecorators: true,
|
|
72
|
+
useDefineForClassFields: false,
|
|
73
|
+
},
|
|
80
74
|
},
|
|
81
75
|
},
|
|
82
76
|
optimizeDeps: {
|
|
83
77
|
exclude: ["electron"],
|
|
78
|
+
esbuildOptions: {
|
|
79
|
+
tsconfigRaw: {
|
|
80
|
+
compilerOptions: {
|
|
81
|
+
experimentalDecorators: true,
|
|
82
|
+
useDefineForClassFields: false,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
84
86
|
},
|
|
85
87
|
base: "./",
|
|
86
88
|
test: {
|