@mmlogic/components 0.3.11 → 0.4.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.
Files changed (138) hide show
  1. package/dist/cjs/{index-BPj2cBXs.js → index-CAzwGt9u.js} +38 -0
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mosterdcomponents.cjs.js +2 -2
  4. package/dist/cjs/mrd-boolean-field_23.cjs.entry.js +1313 -1088
  5. package/dist/collection/collection-manifest.json +23 -23
  6. package/dist/collection/components/{mrd-document-container/mrd-document-container.scss → documents/mrd-document-container/mrd-document-container.css} +3 -3
  7. package/dist/collection/components/{mrd-document-container → documents/mrd-document-container}/mrd-document-container.js +7 -7
  8. package/dist/collection/components/documents/mrd-document-list/folder-tree.js +109 -0
  9. package/dist/collection/components/{mrd-document-list/mrd-document-list.scss → documents/mrd-document-list/mrd-document-list.css} +6 -4
  10. package/dist/collection/components/{mrd-document-list → documents/mrd-document-list}/mrd-document-list.js +83 -240
  11. package/dist/collection/components/documents/mrd-document-list/tree-view.js +75 -0
  12. package/dist/collection/components/{mrd-document-view/mrd-document-view.scss → documents/mrd-document-view/mrd-document-view.css} +1 -1
  13. package/dist/collection/components/{mrd-document-view → documents/mrd-document-view}/mrd-document-view.js +4 -4
  14. package/dist/collection/components/fields/field-helpers.js +17 -0
  15. package/dist/collection/components/fields/file-upload-common.js +38 -0
  16. package/dist/collection/components/{mrd-boolean-field/mrd-boolean-field.scss → fields/mrd-boolean-field/mrd-boolean-field.css} +3 -3
  17. package/dist/collection/components/{mrd-boolean-field → fields/mrd-boolean-field}/mrd-boolean-field.js +1 -1
  18. package/dist/collection/components/{mrd-currency-field/mrd-currency-field.scss → fields/mrd-currency-field/mrd-currency-field.css} +11 -9
  19. package/dist/collection/components/{mrd-currency-field → fields/mrd-currency-field}/mrd-currency-field.js +7 -13
  20. package/dist/collection/components/{mrd-date-field/mrd-date-field.scss → fields/mrd-date-field/mrd-date-field.css} +8 -10
  21. package/dist/collection/components/{mrd-date-field → fields/mrd-date-field}/mrd-date-field.js +3 -10
  22. package/dist/collection/components/{mrd-datetime-field/mrd-datetime-field.scss → fields/mrd-datetime-field/mrd-datetime-field.css} +8 -10
  23. package/dist/collection/components/{mrd-datetime-field → fields/mrd-datetime-field}/mrd-datetime-field.js +3 -10
  24. package/dist/collection/components/{mrd-email-field/mrd-email-field.scss → fields/mrd-email-field/mrd-email-field.css} +2 -11
  25. package/dist/collection/components/{mrd-email-field → fields/mrd-email-field}/mrd-email-field.js +6 -13
  26. package/dist/collection/components/{mrd-file-field/mrd-file-field.scss → fields/mrd-file-field/mrd-file-field.css} +19 -24
  27. package/dist/collection/components/{mrd-file-field → fields/mrd-file-field}/mrd-file-field.js +13 -24
  28. package/dist/collection/components/{mrd-hyperlink-field/mrd-hyperlink-field.scss → fields/mrd-hyperlink-field/mrd-hyperlink-field.css} +7 -16
  29. package/dist/collection/components/{mrd-hyperlink-field → fields/mrd-hyperlink-field}/mrd-hyperlink-field.js +9 -15
  30. package/dist/collection/components/{mrd-image-field/mrd-image-field.scss → fields/mrd-image-field/mrd-image-field.css} +15 -24
  31. package/dist/collection/components/{mrd-image-field → fields/mrd-image-field}/mrd-image-field.js +13 -28
  32. package/dist/collection/components/{mrd-list-field/mrd-list-field.scss → fields/mrd-list-field/mrd-list-field.css} +18 -21
  33. package/dist/collection/components/{mrd-list-field → fields/mrd-list-field}/mrd-list-field.js +10 -25
  34. package/dist/collection/components/{mrd-longtext-field/mrd-longtext-field.scss → fields/mrd-longtext-field/mrd-longtext-field.css} +21 -18
  35. package/dist/collection/components/{mrd-longtext-field → fields/mrd-longtext-field}/mrd-longtext-field.js +3 -10
  36. package/dist/collection/components/{mrd-number-field/mrd-number-field.scss → fields/mrd-number-field/mrd-number-field.css} +9 -10
  37. package/dist/collection/components/{mrd-number-field → fields/mrd-number-field}/mrd-number-field.js +7 -6
  38. package/dist/collection/components/{mrd-relation-field/mrd-relation-field.scss → fields/mrd-relation-field/mrd-relation-field.css} +61 -59
  39. package/dist/collection/components/{mrd-relation-field → fields/mrd-relation-field}/mrd-relation-field.js +16 -26
  40. package/dist/collection/components/{mrd-secret-field/mrd-secret-field.scss → fields/mrd-secret-field/mrd-secret-field.css} +7 -10
  41. package/dist/collection/components/{mrd-secret-field → fields/mrd-secret-field}/mrd-secret-field.js +4 -11
  42. package/dist/collection/components/{mrd-text-field/mrd-text-field.scss → fields/mrd-text-field/mrd-text-field.css} +2 -11
  43. package/dist/collection/components/{mrd-text-field → fields/mrd-text-field}/mrd-text-field.js +3 -10
  44. package/dist/collection/components/{mrd-textarea-field/mrd-textarea-field.scss → fields/mrd-textarea-field/mrd-textarea-field.css} +7 -10
  45. package/dist/collection/components/{mrd-textarea-field → fields/mrd-textarea-field}/mrd-textarea-field.js +3 -9
  46. package/dist/collection/components/{mrd-time-field/mrd-time-field.scss → fields/mrd-time-field/mrd-time-field.css} +8 -10
  47. package/dist/collection/components/{mrd-time-field → fields/mrd-time-field}/mrd-time-field.js +3 -10
  48. package/dist/collection/components/{mrd-field/mrd-field.scss → form/mrd-field/mrd-field.css} +1 -1
  49. package/dist/collection/components/{mrd-field → form/mrd-field}/mrd-field.js +3 -3
  50. package/dist/collection/components/{mrd-form/mrd-form.scss → form/mrd-form/mrd-form.css} +1 -1
  51. package/dist/collection/components/{mrd-form → form/mrd-form}/mrd-form.js +5 -5
  52. package/dist/collection/components/layout/mrd-layout-section/field-value.js +111 -0
  53. package/dist/collection/components/layout/mrd-layout-section/layout-helpers.js +29 -0
  54. package/dist/collection/components/{mrd-layout-section/mrd-layout-section.scss → layout/mrd-layout-section/mrd-layout-section.css} +4 -4
  55. package/dist/collection/components/{mrd-layout-section → layout/mrd-layout-section}/mrd-layout-section.js +52 -142
  56. package/dist/collection/components/{mrd-table/mrd-table.scss → table/mrd-table/mrd-table.css} +30 -12
  57. package/dist/collection/components/{mrd-table → table/mrd-table}/mrd-table.js +234 -443
  58. package/dist/collection/components/table/mrd-table/table-filter-popup.js +85 -0
  59. package/dist/collection/components/table/mrd-table/table-parts.js +110 -0
  60. package/dist/collection/components/table/mrd-table/table-query.js +178 -0
  61. package/dist/collection/components/table/mrd-table/virtual-scroll.js +63 -0
  62. package/dist/collection/dev/app.js +19 -18
  63. package/dist/collection/dev/example-data.js +58 -43
  64. package/dist/collection/utils/i18n.js +16 -0
  65. package/dist/collection/utils/query-params.js +43 -0
  66. package/dist/components/field-helpers.js +1 -0
  67. package/dist/components/file-upload-common.js +1 -0
  68. package/dist/components/i18n.js +1 -1
  69. package/dist/components/mrd-boolean-field2.js +1 -1
  70. package/dist/components/mrd-currency-field2.js +1 -1
  71. package/dist/components/mrd-date-field2.js +1 -1
  72. package/dist/components/mrd-datetime-field2.js +1 -1
  73. package/dist/components/mrd-document-container2.js +1 -1
  74. package/dist/components/mrd-document-list2.js +1 -1
  75. package/dist/components/mrd-document-view2.js +1 -1
  76. package/dist/components/mrd-email-field2.js +1 -1
  77. package/dist/components/mrd-file-field2.js +1 -1
  78. package/dist/components/mrd-form.js +1 -1
  79. package/dist/components/mrd-hyperlink-field2.js +1 -1
  80. package/dist/components/mrd-image-field2.js +1 -1
  81. package/dist/components/mrd-layout-section.js +1 -1
  82. package/dist/components/mrd-list-field2.js +1 -1
  83. package/dist/components/mrd-longtext-field2.js +1 -1
  84. package/dist/components/mrd-number-field2.js +1 -1
  85. package/dist/components/mrd-relation-field2.js +1 -1
  86. package/dist/components/mrd-secret-field2.js +1 -1
  87. package/dist/components/mrd-table2.js +1 -1
  88. package/dist/components/mrd-text-field2.js +1 -1
  89. package/dist/components/mrd-textarea-field2.js +1 -1
  90. package/dist/components/mrd-time-field2.js +1 -1
  91. package/dist/components/query-params.js +1 -0
  92. package/dist/esm/{index-_tsCCkAi.js → index-DiSEJMA8.js} +38 -1
  93. package/dist/esm/loader.js +3 -3
  94. package/dist/esm/mosterdcomponents.js +3 -3
  95. package/dist/esm/mrd-boolean-field_23.entry.js +1313 -1088
  96. package/dist/mosterdcomponents/mosterdcomponents.css +1 -1
  97. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  98. package/dist/mosterdcomponents/p-DiSEJMA8.js +2 -0
  99. package/dist/mosterdcomponents/p-b1a2e108.entry.js +1 -0
  100. package/dist/types/components/{mrd-document-container → documents/mrd-document-container}/mrd-document-container.d.ts +2 -2
  101. package/dist/types/components/documents/mrd-document-list/folder-tree.d.ts +66 -0
  102. package/dist/types/components/{mrd-document-list → documents/mrd-document-list}/mrd-document-list.d.ts +4 -37
  103. package/dist/types/components/documents/mrd-document-list/tree-view.d.ts +32 -0
  104. package/dist/types/components/{mrd-document-view → documents/mrd-document-view}/mrd-document-view.d.ts +2 -2
  105. package/dist/types/components/fields/field-helpers.d.ts +18 -0
  106. package/dist/types/components/fields/file-upload-common.d.ts +18 -0
  107. package/dist/types/components/{mrd-boolean-field → fields/mrd-boolean-field}/mrd-boolean-field.d.ts +1 -1
  108. package/dist/types/components/{mrd-currency-field → fields/mrd-currency-field}/mrd-currency-field.d.ts +2 -2
  109. package/dist/types/components/{mrd-date-field → fields/mrd-date-field}/mrd-date-field.d.ts +1 -1
  110. package/dist/types/components/{mrd-datetime-field → fields/mrd-datetime-field}/mrd-datetime-field.d.ts +1 -1
  111. package/dist/types/components/{mrd-email-field → fields/mrd-email-field}/mrd-email-field.d.ts +1 -1
  112. package/dist/types/components/{mrd-file-field → fields/mrd-file-field}/mrd-file-field.d.ts +2 -4
  113. package/dist/types/components/{mrd-hyperlink-field → fields/mrd-hyperlink-field}/mrd-hyperlink-field.d.ts +2 -2
  114. package/dist/types/components/{mrd-image-field → fields/mrd-image-field}/mrd-image-field.d.ts +2 -4
  115. package/dist/types/components/{mrd-list-field → fields/mrd-list-field}/mrd-list-field.d.ts +2 -2
  116. package/dist/types/components/{mrd-longtext-field → fields/mrd-longtext-field}/mrd-longtext-field.d.ts +1 -1
  117. package/dist/types/components/{mrd-number-field → fields/mrd-number-field}/mrd-number-field.d.ts +2 -2
  118. package/dist/types/components/{mrd-relation-field → fields/mrd-relation-field}/mrd-relation-field.d.ts +2 -2
  119. package/dist/types/components/{mrd-secret-field → fields/mrd-secret-field}/mrd-secret-field.d.ts +1 -1
  120. package/dist/types/components/{mrd-text-field → fields/mrd-text-field}/mrd-text-field.d.ts +1 -1
  121. package/dist/types/components/{mrd-textarea-field → fields/mrd-textarea-field}/mrd-textarea-field.d.ts +1 -1
  122. package/dist/types/components/{mrd-time-field → fields/mrd-time-field}/mrd-time-field.d.ts +1 -1
  123. package/dist/types/components/{mrd-field → form/mrd-field}/mrd-field.d.ts +2 -2
  124. package/dist/types/components/{mrd-form → form/mrd-form}/mrd-form.d.ts +2 -2
  125. package/dist/types/components/layout/mrd-layout-section/field-value.d.ts +22 -0
  126. package/dist/types/components/layout/mrd-layout-section/layout-helpers.d.ts +8 -0
  127. package/dist/types/components/{mrd-layout-section → layout/mrd-layout-section}/mrd-layout-section.d.ts +4 -11
  128. package/dist/types/components/{mrd-table → table/mrd-table}/mrd-table.d.ts +29 -13
  129. package/dist/types/components/table/mrd-table/table-filter-popup.d.ts +35 -0
  130. package/dist/types/components/table/mrd-table/table-parts.d.ts +61 -0
  131. package/dist/types/components/table/mrd-table/table-query.d.ts +50 -0
  132. package/dist/types/components/table/mrd-table/virtual-scroll.d.ts +33 -0
  133. package/dist/types/components.d.ts +19 -5
  134. package/dist/types/utils/query-params.d.ts +14 -0
  135. package/package.json +7 -2
  136. package/dist/components/validation.js +0 -1
  137. package/dist/mosterdcomponents/p-_tsCCkAi.js +0 -2
  138. package/dist/mosterdcomponents/p-a9618055.entry.js +0 -1
@@ -0,0 +1,61 @@
1
+ import { FunctionalComponent } from '../../../stencil-public-runtime';
2
+ import { TableAction, TableColumn } from '../../../utils/cell-renderer';
3
+ import { AggregationResult, ClientCreateType } from '../../../types/client-layout';
4
+ /**
5
+ * Stateless render parts of mrd-table. All state and handlers stay in the
6
+ * component; these components receive plain values and callbacks.
7
+ */
8
+ export declare const FilterIcon: FunctionalComponent;
9
+ export declare const TableCell: FunctionalComponent<{
10
+ col: TableColumn;
11
+ row: Record<string, any>;
12
+ locale: string;
13
+ onDownload: (detail: {
14
+ href: string;
15
+ fileName: string;
16
+ }) => void;
17
+ onOpenTextblock: (full: string) => void;
18
+ onOpenJson: (prettyHtml: string) => void;
19
+ }>;
20
+ /** Formats the aggregation total for one column, '' when not applicable. */
21
+ export declare function formatAggregationValue(col: TableColumn, aggregations: AggregationResult | null, locale: string): string;
22
+ export declare const TotalsRow: FunctionalComponent<{
23
+ columns: TableColumn[];
24
+ aggregations: AggregationResult | null;
25
+ locale: string;
26
+ }>;
27
+ export declare const TextblockModal: FunctionalComponent<{
28
+ text: string | null;
29
+ locale: string;
30
+ onClose: () => void;
31
+ }>;
32
+ export declare const JsonModal: FunctionalComponent<{
33
+ html: string | null;
34
+ locale: string;
35
+ onClose: () => void;
36
+ }>;
37
+ export interface ToolbarCallbacks {
38
+ onFilterToggle: () => void;
39
+ onClearAllFilters: () => void;
40
+ onViewSwitch: (idx: number) => void;
41
+ onToggleViewPopover: (e: MouseEvent) => void;
42
+ onCloseViewPopover: () => void;
43
+ onToggleCreatePicker: () => void;
44
+ /** Emit the create action; basicType set when chosen from the create-type picker. */
45
+ onCreate: (basicType?: string) => void;
46
+ onAction: (action: string) => void;
47
+ }
48
+ export declare const Toolbar: FunctionalComponent<{
49
+ locale: string;
50
+ filterMode: boolean;
51
+ filterCount: number;
52
+ actions: TableAction[];
53
+ views: Array<{
54
+ label: string;
55
+ }>;
56
+ activeViewIdx: number;
57
+ viewPopoverOpen: boolean;
58
+ createPickerOpen: boolean;
59
+ createTypes?: ClientCreateType[] | null;
60
+ cb: ToolbarCallbacks;
61
+ }>;
@@ -0,0 +1,50 @@
1
+ import { ColumnFilter, TableColumn } from '../../../utils/cell-renderer';
2
+ import { ViewFilter } from '../../../types/client-layout';
3
+ /**
4
+ * Pure sort/filter/aggregation query logic for mrd-table.
5
+ * No component state — everything is passed in.
6
+ */
7
+ export declare const TEXT_TYPES: Set<string>;
8
+ export declare const NUMERIC_TYPES: Set<string>;
9
+ export declare const DATE_TYPES: Set<string>;
10
+ export declare const NO_FILTER_TYPES: Set<string>;
11
+ /** Column types that cannot be sorted or filtered (not stored in PostgreSQL). */
12
+ export declare const NON_INTERACTIVE_TYPES: Set<string>;
13
+ export declare function parseDefaultSort(defaultSort: string): {
14
+ field: string;
15
+ dir: 'asc' | 'desc';
16
+ };
17
+ /** Raw sort query-param value, e.g. "name" or "name,desc". */
18
+ export declare function buildSortParam(field: string, dir: 'asc' | 'desc'): string;
19
+ /** Query params for a page request: page + sort + filterClass + view filters + active column filters. */
20
+ export declare function buildTableQueryParams(opts: {
21
+ page: number;
22
+ sort: string;
23
+ filterClass?: string | null;
24
+ viewFilters?: ViewFilter[] | null;
25
+ activeFilters: Iterable<ColumnFilter>;
26
+ }): string;
27
+ /** Groups aggregate columns by function; null when the view has no aggregates. */
28
+ export declare function buildAggregationParams(columns: TableColumn[]): {
29
+ sum?: string[];
30
+ avg?: string[];
31
+ count?: string[];
32
+ } | null;
33
+ /** Aggregation query string: the page-0 query params without page/sort, plus sum/avg/count. */
34
+ export declare function buildAggregationQs(basePageQs: string, columns: TableColumn[]): string;
35
+ /** True when the pending filter actually constrains anything. */
36
+ export declare function filterHasValue(f: Partial<ColumnFilter>): boolean;
37
+ /** UTC ISO string at the start (midnight) of the given local day. */
38
+ export declare function dateLocalToUTCStart(dateStr: string): string;
39
+ /** Start of the day AFTER the given local date (exclusive range end). */
40
+ export declare function dateLocalToUTCEndExclusive(dateStr: string): string;
41
+ /** Stored UTC ISO string back to the local "YYYY-MM-DD" date. */
42
+ export declare function utcISOToLocalDate(utcStr: string): string;
43
+ /** The stored "to" is the exclusive end (next midnight); subtract a day to recover the entered date. */
44
+ export declare function utcISOToLocalDateExclusiveEnd(utcStr: string): string;
45
+ /** Applies the local→UTC conversion when a DATETIME filter is submitted.
46
+ * Exact date → range covering the full local day. */
47
+ export declare function normalizeDatetimeFilter(f: Partial<ColumnFilter>): Partial<ColumnFilter>;
48
+ /** Converts a stored DATETIME filter back to local dates for the popup.
49
+ * A range covering a single local day is restored to exact-date mode. */
50
+ export declare function datetimeFilterToDisplay(existing: ColumnFilter): Partial<ColumnFilter>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Pure window/paging maths for the mrd-table virtual scroll.
3
+ * The window state itself stays @State in the component; these
4
+ * functions only compute values from it.
5
+ */
6
+ export declare const BUFFER = 10;
7
+ /** Wait this long (ms) after the last scroll event before requesting pages,
8
+ * so pages the user quickly scrolls past are skipped. */
9
+ export declare const REQUEST_DEBOUNCE_MS = 150;
10
+ /** Default time (ms) to wait for setPage() before treating a request as stale and retrying. */
11
+ export declare const REQUEST_TIMEOUT_MS = 15000;
12
+ /** Max retries for a stale page request before giving up and showing a retry row. */
13
+ export declare const MAX_RETRY_ATTEMPTS = 3;
14
+ export declare function visibleCount(tableHeight: number, rowHeight: number): number;
15
+ /** Render window (with buffer) for the given scroll offset. */
16
+ export declare function computeWindow(scrollTop: number, rowHeight: number, tableHeight: number, total: number): {
17
+ renderStart: number;
18
+ renderEnd: number;
19
+ };
20
+ /** First/last page (0-based) covering the given row window. */
21
+ export declare function pageRange(start: number, end: number, pageSize: number): {
22
+ firstPage: number;
23
+ lastPage: number;
24
+ };
25
+ export declare function getRowFromPages(pages: Map<number, Record<string, any>[]>, index: number, pageSize: number): Record<string, any> | null;
26
+ /** Authoritative row count: a page shorter than pageSize is the last page,
27
+ * so the true total cannot exceed its end index. */
28
+ export declare function computeEffectiveTotal(loadedPages: Map<number, Record<string, any>[]>, pageSize: number, baseTotal: number): number;
29
+ /** True when some loaded page was short — the exact total is then known. */
30
+ export declare function isTotalKnownFromPages(loadedPages: Map<number, Record<string, any>[]>, pageSize: number): boolean;
31
+ /** Pages whose request timestamp is older than timeoutMs — candidates for retry or failure.
32
+ * Caller is expected to already exclude pages present in loadedPages. */
33
+ export declare function getStalePages(requestedAt: Map<number, number>, now: number, timeoutMs: number): number[];
@@ -7,12 +7,10 @@
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { ClientLayout, ClientLayoutItem as ClientLayoutItem1, ClientLayoutItemFieldDataType, ClientLayoutItemRelationDisplayType, ClientLayoutItemRelationEditBehavior, ClientListValue, CurrencyValue, RelationSearchResult } from "./types";
9
9
  import { AggregationResult, ClientArchetype, ClientLayoutItem, ClientLayoutItemNavigate, ClientViewMetadata, HyperlinkValue, RelationSearchResult as RelationSearchResult1 } from "./types/client-layout";
10
- import { DistinctValue, DocRow } from "./components/mrd-document-list/mrd-document-list";
11
- import { DistinctValue as DistinctValue1 } from "./components/mrd-document-list/mrd-document-list";
10
+ import { DistinctValue, DocRow } from "./components/documents/mrd-document-list/folder-tree";
12
11
  export { ClientLayout, ClientLayoutItem as ClientLayoutItem1, ClientLayoutItemFieldDataType, ClientLayoutItemRelationDisplayType, ClientLayoutItemRelationEditBehavior, ClientListValue, CurrencyValue, RelationSearchResult } from "./types";
13
12
  export { AggregationResult, ClientArchetype, ClientLayoutItem, ClientLayoutItemNavigate, ClientViewMetadata, HyperlinkValue, RelationSearchResult as RelationSearchResult1 } from "./types/client-layout";
14
- export { DistinctValue, DocRow } from "./components/mrd-document-list/mrd-document-list";
15
- export { DistinctValue as DistinctValue1 } from "./components/mrd-document-list/mrd-document-list";
13
+ export { DistinctValue, DocRow } from "./components/documents/mrd-document-list/folder-tree";
16
14
  export namespace Components {
17
15
  interface MrdBooleanField {
18
16
  /**
@@ -464,7 +462,7 @@ export namespace Components {
464
462
  /**
465
463
  * Inject distinct values into an embedded mrd-document-list for a document view.
466
464
  */
467
- "setViewDistinct": (name: string, nodeId: string, values: DistinctValue1[]) => Promise<void>;
465
+ "setViewDistinct": (name: string, nodeId: string, values: DistinctValue[]) => Promise<void>;
468
466
  /**
469
467
  * Inject the uploaded file reference for a dropped file, so the document view can request creation of the new document (see mrdViewUpload).
470
468
  */
@@ -689,6 +687,11 @@ export namespace Components {
689
687
  * @default ''
690
688
  */
691
689
  "parentId": string;
690
+ /**
691
+ * Time (ms) to wait for setPage() before retrying a page request; after MAX_RETRY_ATTEMPTS retries the page is marked failed (see failedPages).
692
+ * @default REQUEST_TIMEOUT_MS
693
+ */
694
+ "requestTimeoutMs": number;
692
695
  /**
693
696
  * Row height in px — used for spacer and scroll-position maths.
694
697
  * @default 36
@@ -1307,6 +1310,7 @@ declare global {
1307
1310
  };
1308
1311
  interface HTMLMrdTableElementEventMap {
1309
1312
  "mrdLoadPage": { page: number; sort: string; path: string; qs: string };
1313
+ "mrdPageError": { page: number };
1310
1314
  "mrdRowClick": Record<string, any>;
1311
1315
  "mrdAction": { action: string; path?: string; qs?: string; dataClass?: string; parentPath?: string | null; basicType?: string };
1312
1316
  "mrdDownload": { href: string; fileName: string };
@@ -2177,6 +2181,10 @@ declare namespace LocalJSX {
2177
2181
  * Fired when a page needs to be fetched. Host fetches and calls setPage(). `sort` is the raw query-param value, e.g. "name" or "name,desc".
2178
2182
  */
2179
2183
  "onMrdLoadPage"?: (event: MrdTableCustomEvent<{ page: number; sort: string; path: string; qs: string }>) => void;
2184
+ /**
2185
+ * Fired when a page request timed out MAX_RETRY_ATTEMPTS times without setPage() being called. Purely informational — the table shows its own retry row regardless of whether a host listens.
2186
+ */
2187
+ "onMrdPageError"?: (event: MrdTableCustomEvent<{ page: number }>) => void;
2180
2188
  /**
2181
2189
  * Fired when a data row is clicked. Detail is the full row object including _links.
2182
2190
  */
@@ -2191,6 +2199,11 @@ declare namespace LocalJSX {
2191
2199
  * @default ''
2192
2200
  */
2193
2201
  "parentId"?: string;
2202
+ /**
2203
+ * Time (ms) to wait for setPage() before retrying a page request; after MAX_RETRY_ATTEMPTS retries the page is marked failed (see failedPages).
2204
+ * @default REQUEST_TIMEOUT_MS
2205
+ */
2206
+ "requestTimeoutMs"?: number;
2194
2207
  /**
2195
2208
  * Row height in px — used for spacer and scroll-position maths.
2196
2209
  * @default 36
@@ -2458,6 +2471,7 @@ declare namespace LocalJSX {
2458
2471
  "pageSize": number;
2459
2472
  "rowHeight": number;
2460
2473
  "tableHeight": number;
2474
+ "requestTimeoutMs": number;
2461
2475
  }
2462
2476
  interface MrdTextFieldAttributes {
2463
2477
  "name": string;
@@ -0,0 +1,14 @@
1
+ import { ViewFilter } from '../types/client-layout';
2
+ /**
3
+ * Shared path/query-param conventions for list requests,
4
+ * used by mrd-table and mrd-document-list.
5
+ */
6
+ /** Applies the view-level static filters to `params` using the API operator conventions. */
7
+ export declare function applyViewFilters(params: URLSearchParams, filters: ViewFilter[] | null | undefined): void;
8
+ /** VIEW: `/{dataClass}`; RELATED_VIEW: `/{fromClass}/{parentId}/{dataClass}`. */
9
+ export declare function buildListPath(opts: {
10
+ isRelatedView: boolean;
11
+ fromClass?: string | null;
12
+ parentId: string;
13
+ dataClass?: string | null;
14
+ }): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmlogic/components",
3
- "version": "0.3.11",
3
+ "version": "0.4.1",
4
4
  "description": "Stencil.js web component library for dynamic forms and virtual-scroll data tables",
5
5
  "license": "MIT",
6
6
  "author": "Mosterd",
@@ -46,8 +46,13 @@
46
46
  "quill": "^2.0.3"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/quill": "^2.0.14",
50
49
  "@stencil/angular-output-target": "^1.3.0",
50
+ "@stencil/sass": "^3.2.3",
51
+ "@types/jest": "^29.5.14",
52
+ "@types/quill": "^2.0.14",
53
+ "jest": "^29.7.0",
54
+ "jest-cli": "^29.7.0",
55
+ "puppeteer": "^21.11.0",
51
56
  "sass": "^1.69.7",
52
57
  "typescript": "^5.3.3"
53
58
  }
@@ -1 +0,0 @@
1
- import{b as r}from"./client-layout.js";function t(r){if(null==r)return!1;if("string"==typeof r)return r.trim().length>0;if(Array.isArray(r))return r.length>0;if("object"==typeof r){if("href"in r)return"string"==typeof r.href&&r.href.trim().length>0;if("amount"in r)return null!=r.amount&&""!==r.amount}return!0}function n(r){return!r||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)}function u(r){if(!r)return!0;try{const t=new URL(r);return"http:"===t.protocol||"https:"===t.protocol}catch(r){return!1}}function e(t,n){if(null==t||""===t)return!0;const u=Number(t);return!isNaN(u)&&(n===r.INTEGER?Number.isInteger(u):n!==r.PERCENTAGE||u>=0&&u<=100)}export{n as a,u as b,e as c,t as v}
@@ -1,2 +0,0 @@
1
- function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.l.u&&e(t,n))},o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="http://www.w3.org/1999/xlink",u="undefined"!=typeof window?window:{},a={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],v=[],b=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&a.u?$(w):a.raf(w))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},w=()=>{y(m),y(v),(h=m.length>0)&&a.raf(w)},$=t=>f().then(t),g=b(v,!0);function j(t){var e,n,l;return null!=(l=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}var O,S,k=new WeakMap,E=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!M(l))&&(l+=""),s&&i?r[r.length-1].m+=l:r.push(s?x(null,l):l),i=s)};if(c(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=x(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=o,u},x=(t,e)=>({u:0,O:t,m:null!=e?e:null,S:null,$:null,v:null,j:null}),L={},N=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,P=t=>{var e;return null==(e=n(t))?void 0:e.$hostElement$},R=(t,e)=>{const n=P(t);return{emit:t=>D(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},D=(t,e,n)=>{const l=a.ce(e,n);return t.dispatchEvent(l),l},H=(t,e,l,s,i,r)=>{if(l===s)return;let f=o(t,e),d=e.toLowerCase();if("class"===e){const e=t.classList,n=A(l);let o=A(s);e.remove(...n.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!n.includes(t))))}else if("style"===e){for(const e in l)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)l&&s[e]===l[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if("ref"===e)s&&K(s,t);else if(f||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const l=e.slice(5);let o;{const e=n(t);if(e&&e.l&&e.l.t){const t=e.l.t[l];t&&t[1]&&(o=t[1])}}return o||(o=l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const n=M(s);if((f||n&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const n=null==s?"":s;"list"===e?f=!1:null!=l&&t[e]===n||("function"==typeof t.__lookupSetter__(e)?t[e]=n:t.setAttribute(e,n))}}catch(t){}let o=!1;d!==(d=d.replace(/^xlink\:?/,""))&&(e=d,o=!0),null==s||!1===s?!1===s&&""!==t.getAttribute(e)||(o?t.removeAttributeNS(c,e):t.removeAttribute(e)):(!f||4&r||i)&&!n&&1===t.nodeType&&(s=!0===s?"":s,o?t.setAttributeNS(c,e,s):t.setAttribute(e,s))}}else if(e="-"===e[2]?e.slice(3):o(u,d)?d.slice(2):d[2]+e.slice(3),l||s){const n=e.endsWith(U);e=e.replace(W,""),l&&a.rel(t,e,l,n),s&&a.ael(t,e,s,n)}},T=/\s/,A=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(T):[]),U="Capture",W=RegExp(U+"$"),z=(t,e,n)=>{const l=11===e.S.nodeType&&e.S.host?e.S.host:e.S,o=t&&t.v||{},s=e.v||{};for(const t of F(Object.keys(o)))t in s||H(l,t,o[t],void 0,n,e.u);for(const t of F(Object.keys(s)))H(l,t,o[t],s[t],n,e.u)};function F(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var V=!1,q=[],G=[],Y=(t,e,n)=>{const l=e.$[n];let o,s,i=0;if(null!=l.m)o=l.S=u.document.createTextNode(l.m);else{if(V||(V="svg"===l.O),!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.S=u.document.createElementNS(V?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.O),V&&"foreignObject"===l.O&&(V=!1),z(null,l,V),null!=O&&void 0!==O&&o["s-si"]!==O&&o.classList.add(o["s-si"]=O),l.$){const e="template"===l.O?o.content:o;for(i=0;i<l.$.length;++i)s=Y(t,l,i),s&&e.appendChild(s)}"svg"===l.O?V=!1:"foreignObject"===o.tagName&&(V=!0)}return o["s-hn"]=S,o},Z=(t,e,n,l,o,s)=>{let i,r=t;for("template"===n.O&&(r=r.content);o<=s;++o)l[o]&&(i=Y(null,n,o),i&&(l[o].S=i,Q(r,i,e)))},_=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.S;J(e),t&&t.remove()}}},B=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),I=(t,e,n=!1)=>{const l=e.S=t.S,o=t.$,s=e.$,i=e.O,r=e.m;null==r?(z(t,e,V="svg"===i||"foreignObject"!==i&&V),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],p=e[f],h=l.length-1,m=l[0],v=l[h];const b="template"===n.O?t.content:t;for(;r<=f&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--f];else if(null==m)m=l[++c];else if(null==v)v=l[--h];else if(B(d,m,o))I(d,m,o),d=e[++r],m=l[++c];else if(B(p,v,o))I(p,v,o),p=e[--f],v=l[--h];else if(B(d,v,o))I(d,v,o),Q(b,d.S,p.S.nextSibling),d=e[++r],v=l[--h];else if(B(p,m,o))I(p,m,o),Q(b,p.S,d.S),p=e[--f],m=l[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(i=e[u],i.O!==m.O?s=Y(e&&e[c],n,u):(I(i,m,o),e[u]=void 0,s=i.S),m=l[++c]):(s=Y(e&&e[c],n,c),m=l[++c]),s&&Q(d.S.parentNode,s,d.S)}r>f?Z(t,null==l[h+1]?null:l[h+1].S,n,l,c,h):c>h&&_(e,r,f)})(l,o,e,s,n):null!==s?(null!==t.m&&(l.textContent=""),Z(l,null,e,s,0,s.length-1)):!n&&null!==o&&_(o,0,o.length-1),V&&"svg"===i&&(V=!1)):t.m!==r&&(l.data=r)},J=t=>{t.v&&t.v.ref&&q.push((()=>t.v.ref(null))),t.$&&t.$.map(J)},K=(t,e)=>{G.push((()=>t(e)))},Q=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),X=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},tt=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);X(t,t.M);const n=()=>et(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},et=(t,e)=>{const n=t.$hostElement$,l=t.i;if(!l)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return e?(t.C.length&&t.C.forEach((t=>t(n))),o=ct(l,"componentWillLoad",void 0,n)):o=ct(l,"componentWillUpdate",void 0,n),o=nt(o,(()=>ct(l,"componentWillRender",void 0,n))),nt(o,(()=>ot(t,l,e)))},nt=(t,e)=>lt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),lt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.u,o=((t,e)=>{var n,l,o;const s=E(e),i=r.get(s);if(!u.document)return s;if(t=11===t.nodeType?t:u.document,i)if("string"==typeof i){let o,r=k.get(t=t.head||t);if(r||k.set(t,r=new Set),!r.has(s)){o=u.document.createElement("style"),o.textContent=i;const c=null!=(n=a.L)?n:j(u.document);if(null!=c&&o.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(i),p?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=i+e.textContent:t.prepend(o)}else t.append(o);1&e.u&&t.insertBefore(o,null),4&e.u&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(s)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(i.constructor===n.CSSStyleSheet)l=i;else{l=new n.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)l.insertRule(i.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(s)}}return s})(n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);st(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>it(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},st=(t,e,n,l)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const l=t.$hostElement$,o=t.N||x(null,null),s=(t=>t&&t.O===L)(e)?e:C(null,null,e);if(S=l.tagName,n&&s.v)for(const t of Object.keys(s.v))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=l[t]);s.O=null,s.u|=4,t.N=s,s.S=o.S=l,O=l["s-sc"],I(o,s,n),q.forEach((t=>t())),q.length=0,G.forEach((t=>t())),G.length=0})(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},it=t=>{const e=t.$hostElement$,n=t.i,l=t.M;ct(n,"componentDidRender",void 0,e),64&t.u?ct(n,"componentDidUpdate",void 0,e):(t.u|=64,ut(e),ct(n,"componentDidLoad",void 0,e),t.P(e),l||rt()),t.R(e),t.k&&(t.k(),t.k=void 0),512&t.u&&$((()=>tt(t,!1))),t.u&=-517},rt=()=>{$((()=>D(u,"appload",{detail:{namespace:"mosterdcomponents"}})))},ct=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,l)}},ut=t=>t.classList.add("hydrated"),at=(t,e,l,o)=>{const i=n(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${o.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.o.get(e),u=i.u,a=i.i;if(l=N(l,o.t[e][0]),!(8&u&&void 0!==c||l===c||Number.isNaN(c)&&Number.isNaN(l))){if(i.o.set(e,l),o.D){const t=o.D[e];t&&t.map((t=>{try{const[[n,o]]=Object.entries(t);(128&u||1&o)&&(a?a[n](l,c,e):i.C.push((()=>{i.i[n](l,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(l,c,e)&&!(16&u))return;16&u||tt(i,!1)}}},ft=(e,l,o)=>{var s,i;const r=e.prototype;{e.watchers&&!l.D&&(l.D=e.watchers),e.deserializers&&!l.H&&(l.H=e.deserializers),e.serializers&&!l.T&&(l.T=e.serializers);const c=Object.entries(null!=(s=l.t)?s:{});if(c.map((([e,[s]])=>{if(31&s||2&o&&32&s){const{get:i,set:c}=t(r,e)||{};i&&(l.t[e][0]|=2048),c&&(l.t[e][0]|=4096),(1&o||!i)&&Object.defineProperty(r,e,{get(){{if(!(2048&l.t[e][0]))return((t,e)=>n(this).o.get(e))(0,e);const t=n(this),o=t?t.i:r;if(!o)return;return o[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const i=n(this);if(i){if(c)return void 0===(32&s?this[e]:i.$hostElement$[e])&&i.o.get(e)&&(t=i.o.get(e)),c.call(this,N(t,s)),void at(this,e,t=32&s?this[e]:i.$hostElement$[e],l);{if(!(1&o&&4096&l.t[e][0]))return at(this,e,t,l),void(1&o&&!i.i&&i.C.push((()=>{4096&l.t[e][0]&&i.i[e]!==i.o.get(e)&&(i.i[e]=t)})));const n=()=>{const n=i.i[e];!i.o.get(e)&&n&&i.o.set(e,n),i.i[e]=N(t,s),at(this,e,i.i[e],l)};i.i?n():i.C.push((()=>{n()}))}}}})}else 1&o&&64&s&&Object.defineProperty(r,e,{value(...t){var l;const o=n(this);return null==(l=null==o?void 0:o.A)?void 0:l.then((()=>{var n;return null==(n=o.i)?void 0:n[e](...t)}))}})})),1&o){const t=new Map;r.attributeChangedCallback=function(e,o,s){a.jmp((()=>{var i;const u=t.get(e),a=n(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==a?void 0:a.u;if(a&&t&&!(8&t)&&s!==o){const n=a.i,r=null==(i=l.D)?void 0:i[e];null==r||r.forEach((l=>{const[[i,r]]=Object.entries(l);null!=n[i]&&(128&t||1&r)&&n[i].call(n,s,o,e)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(r,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=l.D)?i:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},dt=(t,e)=>{ct(t,"connectedCallback",void 0,e)},pt=(t,e)=>{ct(t,"disconnectedCallback",void 0,e||t)},ht=(t,e={})=>{var l;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],c=e.exclude||[],f=u.customElements,p=u.document.head,h=p.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let b,y=!0;if(Object.assign(a,e),a.p=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var l,u,p;const h={u:e[0],h:e[1],t:e[2],U:e[3]};h.t=e[2],h.D=null!=(l=e[4])?l:{},h.T=null!=(u=e[5])?u:{},h.H=null!=(p=e[6])?p:{};const m=h.h,w=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,e)=>{const n={u:0,$hostElement$:t,l:e,o:new Map,W:new Map};n.A=new Promise((t=>n.R=t)),n.F=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[],n.C=[];const l=n;t.__stencil__getHostRef=()=>l})(t=this,h)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),y?v.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const e=n(t);if(!e)return;const l=e.l,o=()=>{};if(1&e.u)(null==e?void 0:e.i)?dt(e.i,t):(null==e?void 0:e.F)&&e.F.then((()=>dt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(e,e.M=n);break}}l.t&&Object.entries(l.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.u)){if(e.u|=32,n.V){const o=((t,e)=>{const n=t.h.replace(/-/g,"_"),l=t.V;if(!l)return;const o=i.get(l);return o?o[n]:import(`./${l}.entry.js`).then((t=>(i.set(l,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(o&&"then"in o){const t=()=>{};l=await o,t()}else l=o;if(!l)throw Error(`Constructor for "${n.h}#${e.q}" was not found`);l.isProxied||(n.D=l.watchers,n.T=l.serializers,n.H=l.deserializers,ft(l,n,2),l.isProxied=!0);const r=()=>{};e.u|=8;try{new l(e)}catch(e){s(e,t)}e.u&=-9,e.u|=128,r(),dt(e.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=E(n);if(!r.has(e)){const l=()=>{};((t,e,n)=>{let l=r.get(t);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,r.set(t,l)})(e,t,!!(1&n.u)),l()}}}const o=e.M,c=()=>tt(e,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()}catch(n){s(n,t),e.k&&(e.k(),e.k=void 0),e.P&&e.P(t)}})(t,e,l)}o()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const e=n(t);(null==e?void 0:e.i)?pt(e.i,t):(null==e?void 0:e.F)&&e.F.then((()=>pt(e.i,t)))}k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const e=n(this);if(!e)return;const l=v.findIndex((t=>t===this));l>-1&&v.splice(l,1),(null==(t=null==e?void 0:e.N)?void 0:t.S)instanceof Node&&!e.N.S.isConnected&&delete e.N.S}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.F}};h.V=t[0],c.includes(m)||f.get(m)||(o.push(m),f.define(m,ft(w,h,1)))}))})),o.length>0&&(m.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(l=a.L)?l:j(u.document);null!=t&&m.setAttribute("nonce",t),p.insertBefore(m,h?h.nextSibling:p.firstChild)}y=!1,v.length?v.map((t=>t.connectedCallback())):a.jmp((()=>b=setTimeout(rt,30)))},mt=t=>a.L=t;export{L as H,ht as b,R as c,P as g,C as h,f as p,l as r,mt as s}