@uxland/primary-shell 8.6.0 → 8.6.2
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/dist/{component-c1SwwXj_.js → component-C0AUl-kU.js} +2 -2
- package/dist/{component-c1SwwXj_.js.map → component-C0AUl-kU.js.map} +1 -1
- package/dist/{index-DL-lEtue.js → index-D5WXBXnJ.js} +20114 -20397
- package/dist/index-D5WXBXnJ.js.map +1 -0
- package/dist/index.d.ts +44 -45
- package/dist/index.js +1 -1
- package/dist/{plugin-DaByeVsR.js → plugin-a1Rs2E_Q.js} +4 -4
- package/dist/plugin-a1Rs2E_Q.js.map +1 -0
- package/package.json +2 -2
- package/dist/index-DL-lEtue.js.map +0 -1
- package/dist/plugin-DaByeVsR.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,20 +31,20 @@ declare const activityHistoryRegions: {
|
|
|
31
31
|
customFilters: string;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export declare interface AddHistoryItemPayload {
|
|
34
|
+
export declare interface AddHistoryItemPayload<TItem extends IActivityHistoryItem = IActivityHistoryItem> {
|
|
35
35
|
entityId: string;
|
|
36
|
-
item:
|
|
37
|
-
componentFactory:
|
|
36
|
+
item: TItem;
|
|
37
|
+
componentFactory: TActivityHistoryComponentFactory<TItem>;
|
|
38
38
|
searchPredicate?: (searchString: string, item: any) => boolean;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export declare interface AddHistoryItemsPayload {
|
|
41
|
+
export declare interface AddHistoryItemsPayload<TItem extends IActivityHistoryItem = IActivityHistoryItem> {
|
|
42
42
|
entityId: string;
|
|
43
|
-
items:
|
|
44
|
-
componentFactory:
|
|
43
|
+
items: TItem[];
|
|
44
|
+
componentFactory: TActivityHistoryComponentFactory<TItem>;
|
|
45
45
|
filters?: IActivityHistoryCustomFilterGroup;
|
|
46
46
|
searchPredicate?: (searchString: string, item: any) => boolean;
|
|
47
|
-
historyDataImporterRules?: IHistoryDataImporterRules
|
|
47
|
+
historyDataImporterRules?: IHistoryDataImporterRules<TItem>;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
declare const administrativeManagementRegions: {
|
|
@@ -357,6 +357,10 @@ declare interface HttpClient {
|
|
|
357
357
|
request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
+
declare interface IActivityHistoryComponentFactoryProps<TItem extends IActivityHistoryItem = IActivityHistoryItem> {
|
|
361
|
+
item: TItem;
|
|
362
|
+
}
|
|
363
|
+
|
|
360
364
|
/**
|
|
361
365
|
* Filtre propi d'un plugin, tal com el declara.
|
|
362
366
|
*
|
|
@@ -372,7 +376,7 @@ export declare interface IActivityHistoryCustomFilter {
|
|
|
372
376
|
/** Prop de l'ítem que es mostra a cada opció. Només als `Checkbox`: un
|
|
373
377
|
* `Switch` s'etiqueta amb el títol del filtre. */
|
|
374
378
|
propsPathDescription?: string[];
|
|
375
|
-
type: ActivityHistoryFilterType
|
|
379
|
+
type: `${ActivityHistoryFilterType}`;
|
|
376
380
|
/**
|
|
377
381
|
* Limita el filtre als ítems amb un d'aquests tipus de nota. Per defecte un
|
|
378
382
|
* filtre parla de tota la col·lecció de la seva iniciativa.
|
|
@@ -495,10 +499,10 @@ export declare interface IHistoryDataImporterContext {
|
|
|
495
499
|
* Quins ítems s'hi veuen NO es declara aquí: l'importador té una llista única
|
|
496
500
|
* de tipus de nota que val per a totes les iniciatives.
|
|
497
501
|
*/
|
|
498
|
-
export declare interface IHistoryDataImporterRules {
|
|
502
|
+
export declare interface IHistoryDataImporterRules<TItem extends IActivityHistoryItem = IActivityHistoryItem> {
|
|
499
503
|
/** If provided, items matching this predicate are auto-selected the first
|
|
500
504
|
* time the importer modal renders the data. */
|
|
501
|
-
shouldPreselect?: (item:
|
|
505
|
+
shouldPreselect?: (item: TItem, ctx: IHistoryDataImporterContext) => boolean;
|
|
502
506
|
}
|
|
503
507
|
|
|
504
508
|
export declare interface ImportParams {
|
|
@@ -523,17 +527,17 @@ export declare interface ImportParamsDiagnostic {
|
|
|
523
527
|
*/
|
|
524
528
|
export declare const initializeShell: (hostAppElement: HTMLElement, ecapContext?: EcapContext) => void;
|
|
525
529
|
|
|
526
|
-
export declare interface InjectAsyncHistoryItemsPayload {
|
|
530
|
+
export declare interface InjectAsyncHistoryItemsPayload<TItem extends IActivityHistoryItem = IActivityHistoryItem> {
|
|
527
531
|
entityId: string;
|
|
528
532
|
entityDescription: string;
|
|
529
|
-
asyncDataProvider: () => Promise<
|
|
530
|
-
componentFactory:
|
|
531
|
-
searchPredicate?: (searchString: string, item:
|
|
533
|
+
asyncDataProvider: () => Promise<TItem[]>;
|
|
534
|
+
componentFactory: TActivityHistoryComponentFactory<TItem>;
|
|
535
|
+
searchPredicate?: (searchString: string, item: TItem) => boolean;
|
|
532
536
|
errorMessage: string;
|
|
533
537
|
/** Grup de filtres propi del plugin. Opcional: sense grup, els seus ítems es
|
|
534
538
|
* filtren només pels filtres globals de l'històric. */
|
|
535
539
|
filters?: IActivityHistoryCustomFilterGroup;
|
|
536
|
-
historyDataImporterRules?: IHistoryDataImporterRules
|
|
540
|
+
historyDataImporterRules?: IHistoryDataImporterRules<TItem>;
|
|
537
541
|
}
|
|
538
542
|
|
|
539
543
|
declare interface IOwner {
|
|
@@ -757,7 +761,7 @@ export declare interface PrimariaPlugin extends Plugin_2 {
|
|
|
757
761
|
*
|
|
758
762
|
* This component internally handles:
|
|
759
763
|
* - Creating a container with the appropriate ID
|
|
760
|
-
* -
|
|
764
|
+
* - Declaring the region for this instance (`regionDefinitions`)
|
|
761
765
|
* - Managing the region lifecycle
|
|
762
766
|
*/
|
|
763
767
|
export declare class PrimariaRegion extends PrimariaRegion_base {
|
|
@@ -774,35 +778,33 @@ export declare class PrimariaRegion extends PrimariaRegion_base {
|
|
|
774
778
|
* Each plugin activates its own view; the adapter deactivates the rest automatically.
|
|
775
779
|
*/
|
|
776
780
|
mode: "multi" | "single";
|
|
777
|
-
/**
|
|
778
|
-
* Render in light DOM instead of shadow DOM.
|
|
779
|
-
* This allows the region content to be visible in the parent's DOM tree.
|
|
780
|
-
*/
|
|
781
|
-
createRenderRoot(): this;
|
|
782
|
-
/**
|
|
783
|
-
* Override shadowRoot getter to return this (light DOM) instead of null.
|
|
784
|
-
* The region mixin tries to find elements using shadowRoot.querySelector(),
|
|
785
|
-
* so we need to make it work with light DOM.
|
|
786
|
-
*/
|
|
787
|
-
get shadowRoot(): ShadowRoot | null;
|
|
788
781
|
/**
|
|
789
782
|
* The region instance created by the region host mixin.
|
|
790
783
|
* Plugins can inject content into this region using the region manager.
|
|
791
784
|
*/
|
|
792
785
|
region: IRegion | undefined;
|
|
793
786
|
/**
|
|
794
|
-
*
|
|
795
|
-
*
|
|
787
|
+
* Render in light DOM instead of shadow DOM, so the region content is visible in the parent's
|
|
788
|
+
* DOM tree. `@uxland/regions` looks up the region target in the render root, so it finds the
|
|
789
|
+
* container in light DOM.
|
|
796
790
|
*/
|
|
797
|
-
|
|
798
|
-
|
|
791
|
+
createRenderRoot(): this;
|
|
792
|
+
private get targetId();
|
|
799
793
|
/**
|
|
800
|
-
*
|
|
801
|
-
*
|
|
794
|
+
* This instance's region, declared from its `name` attribute. Every `primaria-region` declares
|
|
795
|
+
* its own region, so several instances with different names can coexist.
|
|
802
796
|
*/
|
|
797
|
+
get regionDefinitions(): {
|
|
798
|
+
region: {
|
|
799
|
+
name: string;
|
|
800
|
+
targetId: string;
|
|
801
|
+
};
|
|
802
|
+
} | {
|
|
803
|
+
region?: undefined;
|
|
804
|
+
};
|
|
803
805
|
connectedCallback(): void;
|
|
804
806
|
/**
|
|
805
|
-
* Mixin hook fired after
|
|
807
|
+
* Mixin hook fired after the region is created.
|
|
806
808
|
*
|
|
807
809
|
* Hydrates the freshly-created region with every view that has already been
|
|
808
810
|
* registered for this region name via `regionManager.registerViewWithRegion`.
|
|
@@ -813,27 +815,20 @@ export declare class PrimariaRegion extends PrimariaRegion_base {
|
|
|
813
815
|
* registry here makes injection transparent: any plugin can register once
|
|
814
816
|
* and any region with that name auto-populates.
|
|
815
817
|
*/
|
|
816
|
-
regionsCreated(_regions:
|
|
818
|
+
regionsCreated(_regions: IRegion[]): void;
|
|
817
819
|
/**
|
|
818
820
|
* Called when the component is removed from the DOM.
|
|
819
821
|
*
|
|
820
822
|
* The base mixin's `disconnectedCallback` removes the region from the manager
|
|
821
|
-
* but
|
|
822
|
-
*
|
|
823
|
-
* the region. That breaks the "drawer opens, closes, opens again" flow:
|
|
823
|
+
* but keeps `this.region`, so on a later reconnect the region would not be
|
|
824
|
+
* created again. That breaks the "drawer opens, closes, opens again" flow:
|
|
824
825
|
* the second open would render the host but never receive the plugin's
|
|
825
826
|
* view. Clear the reference (and drop the orphan container) so the next
|
|
826
827
|
* connect rebuilds everything from scratch.
|
|
827
828
|
*/
|
|
828
829
|
disconnectedCallback(): void;
|
|
829
830
|
/**
|
|
830
|
-
*
|
|
831
|
-
* Updates the region definition if the name changes.
|
|
832
|
-
*/
|
|
833
|
-
protected willUpdate(changedProperties: Map<PropertyKey, unknown>): void;
|
|
834
|
-
/**
|
|
835
|
-
* Renders nothing because we create the container div manually in connectedCallback.
|
|
836
|
-
* This is necessary because the mixin needs the div to exist before it tries to create the region.
|
|
831
|
+
* Renders nothing because the container is created in connectedCallback.
|
|
837
832
|
*/
|
|
838
833
|
render(): TemplateResult<1>;
|
|
839
834
|
}
|
|
@@ -959,6 +954,10 @@ declare const shellRegions: {
|
|
|
959
954
|
importDataActivityHistory: string;
|
|
960
955
|
};
|
|
961
956
|
|
|
957
|
+
declare type TActivityHistoryComponentFactory<TItem extends IActivityHistoryItem = IActivityHistoryItem> = (
|
|
958
|
+
props: IActivityHistoryComponentFactoryProps<TItem>,
|
|
959
|
+
) => HTMLElement | Promise<HTMLElement>;
|
|
960
|
+
|
|
962
961
|
/**
|
|
963
962
|
* API pública de tokens disponible per als plugins via `api.tokenManager`.
|
|
964
963
|
* Els plugins poden llegir el token actual o forçar-ne el refresc; NO poden
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as E, w as e, x as s, E as r, y as S, H as t, L as I, z as n, A as T, B as _, F as R, I as P, P as o, J as C, R as D, K as c, M as A, N as l, O as m, u as N, S as O } from "./index-
|
|
1
|
+
import { f as E, w as e, x as s, E as r, y as S, H as t, L as I, z as n, A as T, B as _, F as R, I as P, P as o, J as C, R as D, K as c, M as A, N as l, O as m, u as N, S as O } from "./index-D5WXBXnJ.js";
|
|
2
2
|
export {
|
|
3
3
|
E as CIPDS_DIAGNOSTIC_FILTER_HISTORIC_REQUESTED,
|
|
4
4
|
e as CIPDS_SELECTION_REQUEST,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as xe, i as yt, a as ut, G as Tn, n as ee, C as On, D as E, k as h, r as q, b as j, h as Y, t as Q, Q as le, c as os, e as te, f as In, g as En, j as Mn, l as Dn, m as Pn, o as $i, p as Is, q as Fn, s as $n, P as An } from "./index-
|
|
1
|
+
import { d as xe, i as yt, a as ut, G as Tn, n as ee, C as On, D as E, k as h, r as q, b as j, h as Y, t as Q, Q as le, c as os, e as te, f as In, g as En, j as Mn, l as Dn, m as Pn, o as $i, p as Is, q as Fn, s as $n, P as An } from "./index-D5WXBXnJ.js";
|
|
2
2
|
const kn = ({ primaryApi: e, store: t }) => {
|
|
3
3
|
class s {
|
|
4
4
|
constructor(o) {
|
|
@@ -5509,8 +5509,8 @@ class Qu {
|
|
|
5509
5509
|
* Element que ha de renderitzar l'item, creant-lo si encara no existeix o si
|
|
5510
5510
|
* l'item ha canviat.
|
|
5511
5511
|
*
|
|
5512
|
-
*
|
|
5513
|
-
*
|
|
5512
|
+
* Si la factory retorna l'element, resol sense esperes ni segon render. Si
|
|
5513
|
+
* retorna una `Promise`, la fila queda buida fins que es resol.
|
|
5514
5514
|
* Retorna `undefined` quan no hi ha res a pintar encara: sense factory, si ha
|
|
5515
5515
|
* petat, o mentre una factory asíncrona estigui pendent.
|
|
5516
5516
|
*/
|
|
@@ -8421,4 +8421,4 @@ export {
|
|
|
8421
8421
|
$p as dispose,
|
|
8422
8422
|
Fp as initialize
|
|
8423
8423
|
};
|
|
8424
|
-
//# sourceMappingURL=plugin-
|
|
8424
|
+
//# sourceMappingURL=plugin-a1Rs2E_Q.js.map
|