@furo/open-models 1.16.3 → 1.17.0
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/custom-elements.json +659 -290
- package/dist/API_OPTIONS.js +5 -4
- package/dist/API_OPTIONS.js.map +1 -1
- package/dist/Fetcher.d.ts +2 -1
- package/dist/Fetcher.js +5 -5
- package/dist/Fetcher.js.map +1 -1
- package/dist/StrictFetcher.d.ts +58 -0
- package/dist/StrictFetcher.js +420 -0
- package/dist/StrictFetcher.js.map +1 -0
- package/dist/decorators/ModelDecorators.d.ts +11 -13
- package/dist/decorators/ModelDecorators.js +34 -14
- package/dist/decorators/ModelDecorators.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -12
- package/web-types.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"type": {
|
|
13
13
|
"text": "IApiOptions"
|
|
14
14
|
},
|
|
15
|
-
"default": "{ serverAddr:
|
|
15
|
+
"default": "{ serverAddr: \"\", ApiBaseURL: \"/api\", headers: new Headers({ \"Content-Type\": \"application/json\" }), // timeout: 3000 UseProtoNames: true, // server uses proto names UseProtoNamesForQueryParams: true, }",
|
|
16
16
|
"description": "To set the API OPTIONS you should update this const, before you create new services"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
@@ -1672,6 +1672,359 @@
|
|
|
1672
1672
|
}
|
|
1673
1673
|
]
|
|
1674
1674
|
},
|
|
1675
|
+
{
|
|
1676
|
+
"kind": "javascript-module",
|
|
1677
|
+
"path": "dist/StrictFetcher.js",
|
|
1678
|
+
"declarations": [
|
|
1679
|
+
{
|
|
1680
|
+
"kind": "class",
|
|
1681
|
+
"description": "",
|
|
1682
|
+
"name": "StrictFetcher",
|
|
1683
|
+
"members": [
|
|
1684
|
+
{
|
|
1685
|
+
"kind": "field",
|
|
1686
|
+
"name": "timeout",
|
|
1687
|
+
"type": {
|
|
1688
|
+
"text": "number"
|
|
1689
|
+
},
|
|
1690
|
+
"privacy": "public"
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
"kind": "field",
|
|
1694
|
+
"name": "lastResponse",
|
|
1695
|
+
"type": {
|
|
1696
|
+
"text": "Response | undefined"
|
|
1697
|
+
},
|
|
1698
|
+
"privacy": "public"
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"kind": "field",
|
|
1702
|
+
"name": "isLoading",
|
|
1703
|
+
"type": {
|
|
1704
|
+
"text": "boolean"
|
|
1705
|
+
},
|
|
1706
|
+
"privacy": "public",
|
|
1707
|
+
"default": "false"
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"kind": "field",
|
|
1711
|
+
"name": "path",
|
|
1712
|
+
"type": {
|
|
1713
|
+
"text": "string"
|
|
1714
|
+
},
|
|
1715
|
+
"privacy": "private",
|
|
1716
|
+
"default": "path"
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
"kind": "field",
|
|
1720
|
+
"name": "requestInit",
|
|
1721
|
+
"type": {
|
|
1722
|
+
"text": "RequestInit"
|
|
1723
|
+
},
|
|
1724
|
+
"privacy": "private",
|
|
1725
|
+
"default": "{ method: this.method, signal, headers: this.API_OPTIONS.headers, redirect: \"follow\", }"
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
"kind": "field",
|
|
1729
|
+
"name": "method",
|
|
1730
|
+
"type": {
|
|
1731
|
+
"text": "string"
|
|
1732
|
+
},
|
|
1733
|
+
"privacy": "private",
|
|
1734
|
+
"default": "method"
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
"kind": "field",
|
|
1738
|
+
"name": "responseHandler",
|
|
1739
|
+
"type": {
|
|
1740
|
+
"text": "Map<string, (r: Response) => void>"
|
|
1741
|
+
},
|
|
1742
|
+
"privacy": "private",
|
|
1743
|
+
"default": "new Map<string, (r: Response) => void>()"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"kind": "field",
|
|
1747
|
+
"name": "abortController",
|
|
1748
|
+
"type": {
|
|
1749
|
+
"text": "AbortController"
|
|
1750
|
+
},
|
|
1751
|
+
"privacy": "private",
|
|
1752
|
+
"default": "new AbortController()"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
"kind": "field",
|
|
1756
|
+
"name": "timeoutId",
|
|
1757
|
+
"type": {
|
|
1758
|
+
"text": "ReturnType<typeof setTimeout> | number | undefined"
|
|
1759
|
+
},
|
|
1760
|
+
"privacy": "private"
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"kind": "field",
|
|
1764
|
+
"name": "bodyField",
|
|
1765
|
+
"type": {
|
|
1766
|
+
"text": "keyof REQ | \"*\" | undefined"
|
|
1767
|
+
},
|
|
1768
|
+
"privacy": "private",
|
|
1769
|
+
"default": "bodyField"
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"kind": "field",
|
|
1773
|
+
"name": "API_OPTIONS",
|
|
1774
|
+
"type": {
|
|
1775
|
+
"text": "IApiOptions"
|
|
1776
|
+
},
|
|
1777
|
+
"privacy": "private",
|
|
1778
|
+
"default": "options"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"kind": "field",
|
|
1782
|
+
"name": "ReqType",
|
|
1783
|
+
"type": {
|
|
1784
|
+
"text": "FieldNodeConstructor"
|
|
1785
|
+
},
|
|
1786
|
+
"privacy": "private",
|
|
1787
|
+
"default": "ReqType"
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"kind": "field",
|
|
1791
|
+
"name": "ResType",
|
|
1792
|
+
"type": {
|
|
1793
|
+
"text": "FieldNodeConstructor"
|
|
1794
|
+
},
|
|
1795
|
+
"privacy": "private",
|
|
1796
|
+
"default": "ResType"
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
"kind": "field",
|
|
1800
|
+
"name": "reqProtoNameMap",
|
|
1801
|
+
"type": {
|
|
1802
|
+
"text": "Map<string, string>"
|
|
1803
|
+
},
|
|
1804
|
+
"privacy": "private",
|
|
1805
|
+
"default": "new Map<string, string>()"
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
"kind": "field",
|
|
1809
|
+
"name": "reqFieldConstructorMap",
|
|
1810
|
+
"type": {
|
|
1811
|
+
"text": "Map<string, any>"
|
|
1812
|
+
},
|
|
1813
|
+
"privacy": "private",
|
|
1814
|
+
"default": "new Map<string, FieldNodeConstructor>()"
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"kind": "method",
|
|
1818
|
+
"name": "setRequestOptions",
|
|
1819
|
+
"privacy": "public",
|
|
1820
|
+
"parameters": [
|
|
1821
|
+
{
|
|
1822
|
+
"name": "ri",
|
|
1823
|
+
"type": {
|
|
1824
|
+
"text": "RequestInit"
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
]
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"kind": "method",
|
|
1831
|
+
"name": "setHandlers",
|
|
1832
|
+
"privacy": "public",
|
|
1833
|
+
"parameters": [
|
|
1834
|
+
{
|
|
1835
|
+
"name": "handlers",
|
|
1836
|
+
"type": {
|
|
1837
|
+
"text": "Handlers<REQ, RES>"
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
]
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
"kind": "method",
|
|
1844
|
+
"name": "abortPendingRequest",
|
|
1845
|
+
"privacy": "public",
|
|
1846
|
+
"return": {
|
|
1847
|
+
"type": {
|
|
1848
|
+
"text": "void"
|
|
1849
|
+
}
|
|
1850
|
+
},
|
|
1851
|
+
"parameters": [
|
|
1852
|
+
{
|
|
1853
|
+
"name": "reason",
|
|
1854
|
+
"type": {
|
|
1855
|
+
"text": "any"
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
]
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"kind": "method",
|
|
1862
|
+
"name": "invoke",
|
|
1863
|
+
"privacy": "public",
|
|
1864
|
+
"return": {
|
|
1865
|
+
"type": {
|
|
1866
|
+
"text": "Promise<RES>"
|
|
1867
|
+
}
|
|
1868
|
+
},
|
|
1869
|
+
"parameters": [
|
|
1870
|
+
{
|
|
1871
|
+
"name": "rqo",
|
|
1872
|
+
"type": {
|
|
1873
|
+
"text": "REQ"
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
"name": "options",
|
|
1878
|
+
"optional": true,
|
|
1879
|
+
"type": {
|
|
1880
|
+
"text": "RequestInit"
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
]
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
"kind": "method",
|
|
1887
|
+
"name": "_reworkRequest",
|
|
1888
|
+
"return": {
|
|
1889
|
+
"type": {
|
|
1890
|
+
"text": "Promise<RES>"
|
|
1891
|
+
}
|
|
1892
|
+
},
|
|
1893
|
+
"parameters": [
|
|
1894
|
+
{
|
|
1895
|
+
"name": "response",
|
|
1896
|
+
"type": {
|
|
1897
|
+
"text": "Response"
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
]
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
"kind": "method",
|
|
1904
|
+
"name": "_parseResponse",
|
|
1905
|
+
"parameters": [
|
|
1906
|
+
{
|
|
1907
|
+
"name": "response",
|
|
1908
|
+
"type": {
|
|
1909
|
+
"text": "Response"
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
]
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"kind": "method",
|
|
1916
|
+
"name": "buildPathAndBodyfield",
|
|
1917
|
+
"privacy": "private",
|
|
1918
|
+
"return": {
|
|
1919
|
+
"type": {
|
|
1920
|
+
"text": "{\n evaluatedPath: string;\n evaluatedBody: string | undefined;\n }"
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
"parameters": [
|
|
1924
|
+
{
|
|
1925
|
+
"name": "path",
|
|
1926
|
+
"type": {
|
|
1927
|
+
"text": "string"
|
|
1928
|
+
}
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
"name": "bodyField",
|
|
1932
|
+
"type": {
|
|
1933
|
+
"text": "keyof REQ | \"*\" | undefined"
|
|
1934
|
+
}
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
"name": "rqo",
|
|
1938
|
+
"type": {
|
|
1939
|
+
"text": "REQ"
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
]
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
"kind": "field",
|
|
1946
|
+
"name": "onResponse",
|
|
1947
|
+
"type": {
|
|
1948
|
+
"text": "(response: RES, serverResponse: Response) => void | undefined"
|
|
1949
|
+
}
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"kind": "field",
|
|
1953
|
+
"name": "onResponseError",
|
|
1954
|
+
"type": {
|
|
1955
|
+
"text": "(parsedResponse: unknown, serverResponse: Response) => void | undefined"
|
|
1956
|
+
}
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
"kind": "field",
|
|
1960
|
+
"name": "onRequestStarted",
|
|
1961
|
+
"type": {
|
|
1962
|
+
"text": "(req: REQ) => void | undefined"
|
|
1963
|
+
}
|
|
1964
|
+
},
|
|
1965
|
+
{
|
|
1966
|
+
"kind": "field",
|
|
1967
|
+
"name": "onRequestFinished",
|
|
1968
|
+
"type": {
|
|
1969
|
+
"text": "(req: REQ) => void | undefined"
|
|
1970
|
+
}
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
"kind": "field",
|
|
1974
|
+
"name": "onRequestAborted",
|
|
1975
|
+
"type": {
|
|
1976
|
+
"text": "(req: REQ) => void | undefined"
|
|
1977
|
+
}
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
"kind": "field",
|
|
1981
|
+
"name": "onResponseRaw",
|
|
1982
|
+
"type": {
|
|
1983
|
+
"text": "(serverResponse: Response) => void | undefined"
|
|
1984
|
+
}
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
"kind": "field",
|
|
1988
|
+
"name": "onResponseErrorRaw",
|
|
1989
|
+
"type": {
|
|
1990
|
+
"text": "(serverResponse: Response) => void | undefined"
|
|
1991
|
+
}
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
"kind": "field",
|
|
1995
|
+
"name": "onResponseParseError",
|
|
1996
|
+
"type": {
|
|
1997
|
+
"text": "(error: unknown, serverResponse: Response) => void | undefined"
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
"kind": "field",
|
|
2002
|
+
"name": "onResponseErrorParseError",
|
|
2003
|
+
"type": {
|
|
2004
|
+
"text": "(error: unknown, serverResponse: Response) => void | undefined"
|
|
2005
|
+
}
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
"kind": "field",
|
|
2009
|
+
"name": "onFatalError",
|
|
2010
|
+
"type": {
|
|
2011
|
+
"text": "(error: unknown) => void | undefined"
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
]
|
|
2015
|
+
}
|
|
2016
|
+
],
|
|
2017
|
+
"exports": [
|
|
2018
|
+
{
|
|
2019
|
+
"kind": "js",
|
|
2020
|
+
"name": "StrictFetcher",
|
|
2021
|
+
"declaration": {
|
|
2022
|
+
"name": "StrictFetcher",
|
|
2023
|
+
"module": "src/StrictFetcher.ts"
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
]
|
|
2027
|
+
},
|
|
1675
2028
|
{
|
|
1676
2029
|
"kind": "javascript-module",
|
|
1677
2030
|
"path": "dist/Validator.js",
|
|
@@ -2138,6 +2491,306 @@
|
|
|
2138
2491
|
"name": "EntityServiceEventMap",
|
|
2139
2492
|
"module": "./decorators/EntityServiceTypes"
|
|
2140
2493
|
}
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
"kind": "js",
|
|
2497
|
+
"name": "StrictFetcher",
|
|
2498
|
+
"declaration": {
|
|
2499
|
+
"name": "StrictFetcher",
|
|
2500
|
+
"module": "./StrictFetcher"
|
|
2501
|
+
}
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
"kind": "js",
|
|
2505
|
+
"name": "IStrictApiOptions",
|
|
2506
|
+
"declaration": {
|
|
2507
|
+
"name": "IApiOptions",
|
|
2508
|
+
"module": "./StrictFetcher"
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
]
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
"kind": "javascript-module",
|
|
2515
|
+
"path": "dist/decorators/DefaultServiceEventHandlers.js",
|
|
2516
|
+
"declarations": [
|
|
2517
|
+
{
|
|
2518
|
+
"kind": "function",
|
|
2519
|
+
"name": "DefaultServiceEventHandlers",
|
|
2520
|
+
"parameters": [
|
|
2521
|
+
{
|
|
2522
|
+
"name": "dispatch",
|
|
2523
|
+
"type": {
|
|
2524
|
+
"text": "DispatchFn"
|
|
2525
|
+
},
|
|
2526
|
+
"description": "Function to dispatch events (typically bound to the service's dispatchEvent)"
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
"name": "options",
|
|
2530
|
+
"default": "{}",
|
|
2531
|
+
"type": {
|
|
2532
|
+
"text": "DefaultServiceEventHandlersOptions"
|
|
2533
|
+
},
|
|
2534
|
+
"description": "Optional configuration"
|
|
2535
|
+
}
|
|
2536
|
+
],
|
|
2537
|
+
"description": "### DefaultServiceEventHandlers\n\nCreates default service handlers that dispatch standard events.\nUse this to reduce boilerplate when setting up service handlers.\n\nThe `onResponse` handler is intentionally NOT included - you must provide your own\nimplementation since response handling is typically service-specific.\n\nUsage:\n```typescript\nclass MyEntityService extends EventTarget {\n private dispatch = createDispatch(this);\n\n setupHandlers() {\n this.service.Get.setHandlers({\n ...DefaultServiceEventHandlers(this.dispatch),\n onResponse: (response, serverResponse) => {\n // Your custom response handling\n this.entity.fromLiteral(response.entity);\n this.dispatch(\"response-received\", { response, serverResponse });\n },\n });\n }\n}\n```\n\nWith loading check:\n```typescript\nthis.service.Get.setHandlers({\n ...DefaultServiceEventHandlers(this.dispatch, {\n isLoading: () => this.service.Get.isLoading || this.service.Update.isLoading,\n }),\n onResponse: (response, serverResponse) => { ... },\n});\n```",
|
|
2538
|
+
"return": {
|
|
2539
|
+
"type": {
|
|
2540
|
+
"text": ""
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
},
|
|
2544
|
+
{
|
|
2545
|
+
"kind": "function",
|
|
2546
|
+
"name": "CreateDispatch",
|
|
2547
|
+
"return": {
|
|
2548
|
+
"type": {
|
|
2549
|
+
"text": ""
|
|
2550
|
+
}
|
|
2551
|
+
},
|
|
2552
|
+
"parameters": [
|
|
2553
|
+
{
|
|
2554
|
+
"name": "target",
|
|
2555
|
+
"type": {
|
|
2556
|
+
"text": "EventTarget"
|
|
2557
|
+
},
|
|
2558
|
+
"description": "The EventTarget to dispatch events on"
|
|
2559
|
+
}
|
|
2560
|
+
],
|
|
2561
|
+
"description": "### createDispatch\n\nHelper to create a typed dispatch function for an EventTarget.\n\nUsage:\n```typescript\nclass MyService extends EventTarget {\n private dispatch = createDispatch(this);\n\n doSomething() {\n this.dispatch(\"busy-changed\", { busy: true });\n }\n}\n```"
|
|
2562
|
+
}
|
|
2563
|
+
],
|
|
2564
|
+
"exports": [
|
|
2565
|
+
{
|
|
2566
|
+
"kind": "js",
|
|
2567
|
+
"name": "DefaultServiceEventHandlers",
|
|
2568
|
+
"declaration": {
|
|
2569
|
+
"name": "DefaultServiceEventHandlers",
|
|
2570
|
+
"module": "src/decorators/DefaultServiceEventHandlers.ts"
|
|
2571
|
+
}
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
"kind": "js",
|
|
2575
|
+
"name": "CreateDispatch",
|
|
2576
|
+
"declaration": {
|
|
2577
|
+
"name": "CreateDispatch",
|
|
2578
|
+
"module": "src/decorators/DefaultServiceEventHandlers.ts"
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
]
|
|
2582
|
+
},
|
|
2583
|
+
{
|
|
2584
|
+
"kind": "javascript-module",
|
|
2585
|
+
"path": "dist/decorators/EntityServiceTypes.js",
|
|
2586
|
+
"declarations": [],
|
|
2587
|
+
"exports": []
|
|
2588
|
+
},
|
|
2589
|
+
{
|
|
2590
|
+
"kind": "javascript-module",
|
|
2591
|
+
"path": "dist/decorators/FieldBindings.js",
|
|
2592
|
+
"declarations": [
|
|
2593
|
+
{
|
|
2594
|
+
"kind": "variable",
|
|
2595
|
+
"name": "fieldBindings",
|
|
2596
|
+
"type": {
|
|
2597
|
+
"text": "object"
|
|
2598
|
+
},
|
|
2599
|
+
"default": "{ /** * Decorator for the `model` property. * * Handles: * - Binding/unbinding when model changes * - Resolving reader/writer functions based on model type * - Calling reader on model value changes * - Providing `writeToModel()` method */ model() { return function modelDecorator(target: object, propertyKey: string) { const ctor = target.constructor as typeof ReactiveElement; // Patch lifecycle patchLifecycle(ctor); // Add writeToModel helper method if (!Object.prototype.hasOwnProperty.call(target, \"writeToModel\")) { Object.defineProperty(target, \"writeToModel\", { value: function writeToModel(this: LitElement & Record<symbol, (() => void) | undefined>) { const writeFn = this[MODEL_WRITE_FN]; if (writeFn) { try { writeFn(); } catch (e) { console.error(\"Failed to write to model:\", e); } } }, writable: false, enumerable: false, configurable: true, }); } // Create getter/setter for the model property Object.defineProperty(target, propertyKey, { get(this: LitElement & Record<symbol, FieldNodeLike | undefined>): FieldNodeLike | undefined { return this[CURRENT_MODEL]; }, set(this: LitElement & BindableComponent & Record<symbol, FieldNodeLike | (() => void) | undefined>, value: FieldNodeLike | undefined) { const oldModel = this[CURRENT_MODEL] as FieldNodeLike | undefined; if (value === oldModel) return; // Unbind from old model if (oldModel) { unbindFromModel(this, oldModel); } // Store new model this[CURRENT_MODEL] = value; // Resolve reader/writer functions based on type if (value) { const typeName = value.__meta?.typeName ?? \"primitives.STRING\"; // Resolve reader // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) const reader = this.modelReaders?.get(typeName); if (reader) { this[MODEL_READ_FN] = reader.bind(this); } else { // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) console.warn(`No modelReader for type \"${typeName}\". Available: ${[...(this.modelReaders?.keys() ?? [])].join(\", \")}`); this[MODEL_READ_FN] = undefined; } // Resolve writer // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) const writer = this.modelWriters?.get(typeName); if (writer) { this[MODEL_WRITE_FN] = writer.bind(this); } else { // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) console.warn(`No modelWriter for type \"${typeName}\". Available: ${[...(this.modelWriters?.keys() ?? [])].join(\", \")}`); this[MODEL_WRITE_FN] = undefined; } } else { this[MODEL_READ_FN] = undefined; this[MODEL_WRITE_FN] = undefined; } // Bind to new model (if connected) if (value && this.isConnected) { bindToModel(this, value); } // Trigger Lit update this.requestUpdate(); }, enumerable: true, configurable: true, }); }; }, /** * Binds a method to an event on the model. * When the event fires, the method is called with the event detail. * * @param eventType - The event type to listen for */ onEvent(eventType: ModelEventType) { return function onEventDecorator(target: object, propertyKey: string, descriptor: PropertyDescriptor) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const originalMethod = descriptor.value; const ctor = target.constructor as typeof ReactiveElement; let events = (ctor as unknown as Record<symbol, FieldEventMeta[]>)[FIELD_EVENTS]; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) if (!events) { events = []; (ctor as unknown as Record<symbol, FieldEventMeta[]>)[FIELD_EVENTS] = events; } // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment events.push({ propertyKey, eventType, method: originalMethod }); patchLifecycle(ctor); }; }, /** * Decorator that marks a method to be called once after a new model is assigned and bound. * * Useful for one-time setup like setting a11y attributes, placeholders, or constraints * based on the model's type. * * @example * ```typescript * @fieldBindings.onInit() * protected init() { * this.accessibleName = this.model?.__label ?? \"Toggle\"; * } * ``` */ onInit() { return function onInitDecorator(target: object, propertyKey: string, descriptor: PropertyDescriptor) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const originalMethod = descriptor.value; const ctor = target.constructor as typeof ReactiveElement; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type let inits = (ctor as unknown as Record<symbol, { propertyKey: string; method: Function }[]>)[FIELD_INIT_METHODS]; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) if (!inits) { inits = []; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type (ctor as unknown as Record<symbol, { propertyKey: string; method: Function }[]>)[FIELD_INIT_METHODS] = inits; } // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment inits.push({ propertyKey, method: originalMethod }); patchLifecycle(ctor); }; }, }",
|
|
2600
|
+
"description": "### fieldBindings\n\nDecorators for creating reusable components that bind to FieldNode models.\n\nThe component provides `modelReaders` and `modelWriters` maps keyed by\n`__meta.typeName`. The decorator handles:\n- Binding/unbinding on model change\n- Calling the correct reader when model value changes\n- Providing `writeToModel()` method that calls the correct writer"
|
|
2601
|
+
}
|
|
2602
|
+
],
|
|
2603
|
+
"exports": [
|
|
2604
|
+
{
|
|
2605
|
+
"kind": "js",
|
|
2606
|
+
"name": "fieldBindings",
|
|
2607
|
+
"declaration": {
|
|
2608
|
+
"name": "fieldBindings",
|
|
2609
|
+
"module": "src/decorators/FieldBindings.ts"
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
]
|
|
2613
|
+
},
|
|
2614
|
+
{
|
|
2615
|
+
"kind": "javascript-module",
|
|
2616
|
+
"path": "dist/decorators/ModelDecorators.js",
|
|
2617
|
+
"declarations": [
|
|
2618
|
+
{
|
|
2619
|
+
"kind": "function",
|
|
2620
|
+
"name": "ModelBindings",
|
|
2621
|
+
"parameters": [
|
|
2622
|
+
{
|
|
2623
|
+
"name": "model",
|
|
2624
|
+
"type": {
|
|
2625
|
+
"text": "FieldNodeLike"
|
|
2626
|
+
},
|
|
2627
|
+
"description": "The FieldNode model to bind to"
|
|
2628
|
+
}
|
|
2629
|
+
],
|
|
2630
|
+
"description": "### ModelBindings Factory\n\nCreates type-safe decorators bound to a specific FieldNode model.\nUse this to bind component properties and methods to model events.\n\nUsage:\n```typescript\nimport { ModelBindings } from \"@x/furo/open-models/ModelDecorators\";\nimport { CubeEntityModel } from \"./CubeEntityModel\";\n\nconst cubeModel = ModelBindings(CubeEntityModel.model);\n\nclass MyComponent extends LitElement {\n // Bind to a nested field value - updates when cube.length changes",
|
|
2631
|
+
"return": {
|
|
2632
|
+
"type": {
|
|
2633
|
+
"text": ""
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
}
|
|
2637
|
+
],
|
|
2638
|
+
"exports": [
|
|
2639
|
+
{
|
|
2640
|
+
"kind": "js",
|
|
2641
|
+
"name": "ModelBindings",
|
|
2642
|
+
"declaration": {
|
|
2643
|
+
"name": "ModelBindings",
|
|
2644
|
+
"module": "src/decorators/ModelDecorators.ts"
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
]
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
"kind": "javascript-module",
|
|
2651
|
+
"path": "dist/decorators/SchemaBuilder.js",
|
|
2652
|
+
"declarations": [
|
|
2653
|
+
{
|
|
2654
|
+
"kind": "class",
|
|
2655
|
+
"description": "",
|
|
2656
|
+
"name": "SchemaBuilder",
|
|
2657
|
+
"members": [
|
|
2658
|
+
{
|
|
2659
|
+
"kind": "method",
|
|
2660
|
+
"name": "generate",
|
|
2661
|
+
"privacy": "public",
|
|
2662
|
+
"static": true,
|
|
2663
|
+
"return": {
|
|
2664
|
+
"type": {
|
|
2665
|
+
"text": "JSONSchema7"
|
|
2666
|
+
}
|
|
2667
|
+
},
|
|
2668
|
+
"parameters": [
|
|
2669
|
+
{
|
|
2670
|
+
"name": "model",
|
|
2671
|
+
"type": {
|
|
2672
|
+
"text": "FieldNode"
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
]
|
|
2676
|
+
},
|
|
2677
|
+
{
|
|
2678
|
+
"kind": "method",
|
|
2679
|
+
"name": "getProps",
|
|
2680
|
+
"privacy": "private",
|
|
2681
|
+
"static": true,
|
|
2682
|
+
"return": {
|
|
2683
|
+
"type": {
|
|
2684
|
+
"text": "Record<string, JSONSchema7Definition>"
|
|
2685
|
+
}
|
|
2686
|
+
},
|
|
2687
|
+
"parameters": [
|
|
2688
|
+
{
|
|
2689
|
+
"name": "model",
|
|
2690
|
+
"type": {
|
|
2691
|
+
"text": "FieldNode"
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
]
|
|
2695
|
+
},
|
|
2696
|
+
{
|
|
2697
|
+
"kind": "method",
|
|
2698
|
+
"name": "getRequiredFields",
|
|
2699
|
+
"privacy": "private",
|
|
2700
|
+
"static": true,
|
|
2701
|
+
"return": {
|
|
2702
|
+
"type": {
|
|
2703
|
+
"text": "string[]"
|
|
2704
|
+
}
|
|
2705
|
+
},
|
|
2706
|
+
"parameters": [
|
|
2707
|
+
{
|
|
2708
|
+
"name": "descriptors",
|
|
2709
|
+
"type": {
|
|
2710
|
+
"text": "FieldDescriptor[]"
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
]
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
"kind": "method",
|
|
2717
|
+
"name": "getConstraints",
|
|
2718
|
+
"privacy": "private",
|
|
2719
|
+
"static": true,
|
|
2720
|
+
"parameters": [
|
|
2721
|
+
{
|
|
2722
|
+
"name": "constraints",
|
|
2723
|
+
"type": {
|
|
2724
|
+
"text": "FieldConstraints | undefined"
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
]
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
"kind": "method",
|
|
2731
|
+
"name": "createFieldNodeFromSchema",
|
|
2732
|
+
"privacy": "public",
|
|
2733
|
+
"static": true,
|
|
2734
|
+
"return": {
|
|
2735
|
+
"type": {
|
|
2736
|
+
"text": "FieldNode"
|
|
2737
|
+
}
|
|
2738
|
+
},
|
|
2739
|
+
"parameters": [
|
|
2740
|
+
{
|
|
2741
|
+
"name": "schema",
|
|
2742
|
+
"type": {
|
|
2743
|
+
"text": "FieldNodeSchema"
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
]
|
|
2747
|
+
}
|
|
2748
|
+
]
|
|
2749
|
+
}
|
|
2750
|
+
],
|
|
2751
|
+
"exports": [
|
|
2752
|
+
{
|
|
2753
|
+
"kind": "js",
|
|
2754
|
+
"name": "SchemaBuilder",
|
|
2755
|
+
"declaration": {
|
|
2756
|
+
"name": "SchemaBuilder",
|
|
2757
|
+
"module": "src/decorators/SchemaBuilder.ts"
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
]
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
"kind": "javascript-module",
|
|
2764
|
+
"path": "dist/decorators/ServiceDecorators.js",
|
|
2765
|
+
"declarations": [
|
|
2766
|
+
{
|
|
2767
|
+
"kind": "function",
|
|
2768
|
+
"name": "ServiceBindings",
|
|
2769
|
+
"parameters": [
|
|
2770
|
+
{
|
|
2771
|
+
"name": "service",
|
|
2772
|
+
"type": {
|
|
2773
|
+
"text": "EventTarget"
|
|
2774
|
+
},
|
|
2775
|
+
"description": "The EventTarget service to bind to"
|
|
2776
|
+
}
|
|
2777
|
+
],
|
|
2778
|
+
"description": "### ServiceBindings Factory\n\nCreates type-safe decorators bound to a specific service instance.\nUse this to bind component properties and methods to service events.\n\nThe factory is generic and works with any `EventTarget`.\nEvent types and their detail payloads are type-checked at compile time\nvia the `TEventMap` type parameter.\n\nUsage:\n```typescript\nimport { cubeEntityService } from \"./CubeEntityService\";\nimport { ServiceBindings } from \"./ServiceDecorators\";\n\nconst cube = ServiceBindings(cubeEntityService);\n\nclass MyComponent extends LitElement {\n // Property binding - type-safe event name, auto-extracts from detail",
|
|
2779
|
+
"return": {
|
|
2780
|
+
"type": {
|
|
2781
|
+
"text": ""
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
],
|
|
2786
|
+
"exports": [
|
|
2787
|
+
{
|
|
2788
|
+
"kind": "js",
|
|
2789
|
+
"name": "ServiceBindings",
|
|
2790
|
+
"declaration": {
|
|
2791
|
+
"name": "ServiceBindings",
|
|
2792
|
+
"module": "src/decorators/ServiceDecorators.ts"
|
|
2793
|
+
}
|
|
2141
2794
|
}
|
|
2142
2795
|
]
|
|
2143
2796
|
},
|
|
@@ -15847,284 +16500,15 @@
|
|
|
15847
16500
|
},
|
|
15848
16501
|
{
|
|
15849
16502
|
"kind": "javascript-module",
|
|
15850
|
-
"path": "dist/
|
|
15851
|
-
"declarations": [
|
|
15852
|
-
{
|
|
15853
|
-
"kind": "function",
|
|
15854
|
-
"name": "DefaultServiceEventHandlers",
|
|
15855
|
-
"parameters": [
|
|
15856
|
-
{
|
|
15857
|
-
"name": "dispatch",
|
|
15858
|
-
"type": {
|
|
15859
|
-
"text": "DispatchFn"
|
|
15860
|
-
},
|
|
15861
|
-
"description": "Function to dispatch events (typically bound to the service's dispatchEvent)"
|
|
15862
|
-
},
|
|
15863
|
-
{
|
|
15864
|
-
"name": "options",
|
|
15865
|
-
"default": "{}",
|
|
15866
|
-
"type": {
|
|
15867
|
-
"text": "DefaultServiceEventHandlersOptions"
|
|
15868
|
-
},
|
|
15869
|
-
"description": "Optional configuration"
|
|
15870
|
-
}
|
|
15871
|
-
],
|
|
15872
|
-
"description": "### DefaultServiceEventHandlers\n\nCreates default service handlers that dispatch standard events.\nUse this to reduce boilerplate when setting up service handlers.\n\nThe `onResponse` handler is intentionally NOT included - you must provide your own\nimplementation since response handling is typically service-specific.\n\nUsage:\n```typescript\nclass MyEntityService extends EventTarget {\n private dispatch = createDispatch(this);\n\n setupHandlers() {\n this.service.Get.setHandlers({\n ...DefaultServiceEventHandlers(this.dispatch),\n onResponse: (response, serverResponse) => {\n // Your custom response handling\n this.entity.fromLiteral(response.entity);\n this.dispatch(\"response-received\", { response, serverResponse });\n },\n });\n }\n}\n```\n\nWith loading check:\n```typescript\nthis.service.Get.setHandlers({\n ...DefaultServiceEventHandlers(this.dispatch, {\n isLoading: () => this.service.Get.isLoading || this.service.Update.isLoading,\n }),\n onResponse: (response, serverResponse) => { ... },\n});\n```",
|
|
15873
|
-
"return": {
|
|
15874
|
-
"type": {
|
|
15875
|
-
"text": ""
|
|
15876
|
-
}
|
|
15877
|
-
}
|
|
15878
|
-
},
|
|
15879
|
-
{
|
|
15880
|
-
"kind": "function",
|
|
15881
|
-
"name": "CreateDispatch",
|
|
15882
|
-
"return": {
|
|
15883
|
-
"type": {
|
|
15884
|
-
"text": ""
|
|
15885
|
-
}
|
|
15886
|
-
},
|
|
15887
|
-
"parameters": [
|
|
15888
|
-
{
|
|
15889
|
-
"name": "target",
|
|
15890
|
-
"type": {
|
|
15891
|
-
"text": "EventTarget"
|
|
15892
|
-
},
|
|
15893
|
-
"description": "The EventTarget to dispatch events on"
|
|
15894
|
-
}
|
|
15895
|
-
],
|
|
15896
|
-
"description": "### createDispatch\n\nHelper to create a typed dispatch function for an EventTarget.\n\nUsage:\n```typescript\nclass MyService extends EventTarget {\n private dispatch = createDispatch(this);\n\n doSomething() {\n this.dispatch(\"busy-changed\", { busy: true });\n }\n}\n```"
|
|
15897
|
-
}
|
|
15898
|
-
],
|
|
15899
|
-
"exports": [
|
|
15900
|
-
{
|
|
15901
|
-
"kind": "js",
|
|
15902
|
-
"name": "DefaultServiceEventHandlers",
|
|
15903
|
-
"declaration": {
|
|
15904
|
-
"name": "DefaultServiceEventHandlers",
|
|
15905
|
-
"module": "src/decorators/DefaultServiceEventHandlers.ts"
|
|
15906
|
-
}
|
|
15907
|
-
},
|
|
15908
|
-
{
|
|
15909
|
-
"kind": "js",
|
|
15910
|
-
"name": "CreateDispatch",
|
|
15911
|
-
"declaration": {
|
|
15912
|
-
"name": "CreateDispatch",
|
|
15913
|
-
"module": "src/decorators/DefaultServiceEventHandlers.ts"
|
|
15914
|
-
}
|
|
15915
|
-
}
|
|
15916
|
-
]
|
|
15917
|
-
},
|
|
15918
|
-
{
|
|
15919
|
-
"kind": "javascript-module",
|
|
15920
|
-
"path": "dist/decorators/EntityServiceTypes.js",
|
|
16503
|
+
"path": "dist/web-components/furo-type-renderer.js",
|
|
15921
16504
|
"declarations": [],
|
|
15922
|
-
"exports": []
|
|
15923
|
-
},
|
|
15924
|
-
{
|
|
15925
|
-
"kind": "javascript-module",
|
|
15926
|
-
"path": "dist/decorators/FieldBindings.js",
|
|
15927
|
-
"declarations": [
|
|
15928
|
-
{
|
|
15929
|
-
"kind": "variable",
|
|
15930
|
-
"name": "fieldBindings",
|
|
15931
|
-
"type": {
|
|
15932
|
-
"text": "object"
|
|
15933
|
-
},
|
|
15934
|
-
"default": "{ /** * Decorator for the `model` property. * * Handles: * - Binding/unbinding when model changes * - Resolving reader/writer functions based on model type * - Calling reader on model value changes * - Providing `writeToModel()` method */ model() { return function modelDecorator(target: object, propertyKey: string) { const ctor = target.constructor as typeof ReactiveElement; // Patch lifecycle patchLifecycle(ctor); // Add writeToModel helper method if (!Object.prototype.hasOwnProperty.call(target, \"writeToModel\")) { Object.defineProperty(target, \"writeToModel\", { value: function writeToModel(this: LitElement & Record<symbol, (() => void) | undefined>) { const writeFn = this[MODEL_WRITE_FN]; if (writeFn) { try { writeFn(); } catch (e) { console.error(\"Failed to write to model:\", e); } } }, writable: false, enumerable: false, configurable: true, }); } // Create getter/setter for the model property Object.defineProperty(target, propertyKey, { get(this: LitElement & Record<symbol, FieldNodeLike | undefined>): FieldNodeLike | undefined { return this[CURRENT_MODEL]; }, set(this: LitElement & BindableComponent & Record<symbol, FieldNodeLike | (() => void) | undefined>, value: FieldNodeLike | undefined) { const oldModel = this[CURRENT_MODEL] as FieldNodeLike | undefined; if (value === oldModel) return; // Unbind from old model if (oldModel) { unbindFromModel(this, oldModel); } // Store new model this[CURRENT_MODEL] = value; // Resolve reader/writer functions based on type if (value) { const typeName = value.__meta?.typeName ?? \"primitives.STRING\"; // Resolve reader // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) const reader = this.modelReaders?.get(typeName); if (reader) { this[MODEL_READ_FN] = reader.bind(this); } else { // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) console.warn(`No modelReader for type \"${typeName}\". Available: ${[...(this.modelReaders?.keys() ?? [])].join(\", \")}`); this[MODEL_READ_FN] = undefined; } // Resolve writer // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) const writer = this.modelWriters?.get(typeName); if (writer) { this[MODEL_WRITE_FN] = writer.bind(this); } else { // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) console.warn(`No modelWriter for type \"${typeName}\". Available: ${[...(this.modelWriters?.keys() ?? [])].join(\", \")}`); this[MODEL_WRITE_FN] = undefined; } } else { this[MODEL_READ_FN] = undefined; this[MODEL_WRITE_FN] = undefined; } // Bind to new model (if connected) if (value && this.isConnected) { bindToModel(this, value); } // Trigger Lit update this.requestUpdate(); }, enumerable: true, configurable: true, }); }; }, /** * Binds a method to an event on the model. * When the event fires, the method is called with the event detail. * * @param eventType - The event type to listen for */ onEvent(eventType: ModelEventType) { return function onEventDecorator(target: object, propertyKey: string, descriptor: PropertyDescriptor) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const originalMethod = descriptor.value; const ctor = target.constructor as typeof ReactiveElement; let events = (ctor as unknown as Record<symbol, FieldEventMeta[]>)[FIELD_EVENTS]; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) if (!events) { events = []; (ctor as unknown as Record<symbol, FieldEventMeta[]>)[FIELD_EVENTS] = events; } // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment events.push({ propertyKey, eventType, method: originalMethod }); patchLifecycle(ctor); }; }, /** * Decorator that marks a method to be called once after a new model is assigned and bound. * * Useful for one-time setup like setting a11y attributes, placeholders, or constraints * based on the model's type. * * @example * ```typescript * @fieldBindings.onInit() * protected init() { * this.accessibleName = this.model?.__label ?? \"Toggle\"; * } * ``` */ onInit() { return function onInitDecorator(target: object, propertyKey: string, descriptor: PropertyDescriptor) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const originalMethod = descriptor.value; const ctor = target.constructor as typeof ReactiveElement; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type let inits = (ctor as unknown as Record<symbol, { propertyKey: string; method: Function }[]>)[FIELD_INIT_METHODS]; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- runtime data may not match types (REST API input) if (!inits) { inits = []; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type (ctor as unknown as Record<symbol, { propertyKey: string; method: Function }[]>)[FIELD_INIT_METHODS] = inits; } // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment inits.push({ propertyKey, method: originalMethod }); patchLifecycle(ctor); }; }, }",
|
|
15935
|
-
"description": "### fieldBindings\n\nDecorators for creating reusable components that bind to FieldNode models.\n\nThe component provides `modelReaders` and `modelWriters` maps keyed by\n`__meta.typeName`. The decorator handles:\n- Binding/unbinding on model change\n- Calling the correct reader when model value changes\n- Providing `writeToModel()` method that calls the correct writer"
|
|
15936
|
-
}
|
|
15937
|
-
],
|
|
15938
16505
|
"exports": [
|
|
15939
16506
|
{
|
|
15940
|
-
"kind": "
|
|
15941
|
-
"name": "
|
|
15942
|
-
"declaration": {
|
|
15943
|
-
"name": "fieldBindings",
|
|
15944
|
-
"module": "src/decorators/FieldBindings.ts"
|
|
15945
|
-
}
|
|
15946
|
-
}
|
|
15947
|
-
]
|
|
15948
|
-
},
|
|
15949
|
-
{
|
|
15950
|
-
"kind": "javascript-module",
|
|
15951
|
-
"path": "dist/decorators/ModelDecorators.js",
|
|
15952
|
-
"declarations": [
|
|
15953
|
-
{
|
|
15954
|
-
"kind": "function",
|
|
15955
|
-
"name": "ModelBindings",
|
|
15956
|
-
"parameters": [
|
|
15957
|
-
{
|
|
15958
|
-
"name": "model",
|
|
15959
|
-
"type": {
|
|
15960
|
-
"text": "FieldNodeLike"
|
|
15961
|
-
},
|
|
15962
|
-
"description": "The FieldNode model to bind to"
|
|
15963
|
-
}
|
|
15964
|
-
],
|
|
15965
|
-
"description": "### ModelBindings Factory\n\nCreates type-safe decorators bound to a specific FieldNode model.\nUse this to bind component properties and methods to model events.\n\nUsage:\n```typescript\nimport { ModelBindings } from \"@x/furo/open-models/ModelDecorators\";\nimport { CubeEntityModel } from \"./CubeEntityModel\";\n\nconst cubeModel = ModelBindings(CubeEntityModel.model);\n\nclass MyComponent extends LitElement {\n // Triggers re-render on any model update",
|
|
15966
|
-
"return": {
|
|
15967
|
-
"type": {
|
|
15968
|
-
"text": ""
|
|
15969
|
-
}
|
|
15970
|
-
}
|
|
15971
|
-
}
|
|
15972
|
-
],
|
|
15973
|
-
"exports": [
|
|
15974
|
-
{
|
|
15975
|
-
"kind": "js",
|
|
15976
|
-
"name": "ModelBindings",
|
|
15977
|
-
"declaration": {
|
|
15978
|
-
"name": "ModelBindings",
|
|
15979
|
-
"module": "src/decorators/ModelDecorators.ts"
|
|
15980
|
-
}
|
|
15981
|
-
}
|
|
15982
|
-
]
|
|
15983
|
-
},
|
|
15984
|
-
{
|
|
15985
|
-
"kind": "javascript-module",
|
|
15986
|
-
"path": "dist/decorators/SchemaBuilder.js",
|
|
15987
|
-
"declarations": [
|
|
15988
|
-
{
|
|
15989
|
-
"kind": "class",
|
|
15990
|
-
"description": "",
|
|
15991
|
-
"name": "SchemaBuilder",
|
|
15992
|
-
"members": [
|
|
15993
|
-
{
|
|
15994
|
-
"kind": "method",
|
|
15995
|
-
"name": "generate",
|
|
15996
|
-
"privacy": "public",
|
|
15997
|
-
"static": true,
|
|
15998
|
-
"return": {
|
|
15999
|
-
"type": {
|
|
16000
|
-
"text": "JSONSchema7"
|
|
16001
|
-
}
|
|
16002
|
-
},
|
|
16003
|
-
"parameters": [
|
|
16004
|
-
{
|
|
16005
|
-
"name": "model",
|
|
16006
|
-
"type": {
|
|
16007
|
-
"text": "FieldNode"
|
|
16008
|
-
}
|
|
16009
|
-
}
|
|
16010
|
-
]
|
|
16011
|
-
},
|
|
16012
|
-
{
|
|
16013
|
-
"kind": "method",
|
|
16014
|
-
"name": "getProps",
|
|
16015
|
-
"privacy": "private",
|
|
16016
|
-
"static": true,
|
|
16017
|
-
"return": {
|
|
16018
|
-
"type": {
|
|
16019
|
-
"text": "Record<string, JSONSchema7Definition>"
|
|
16020
|
-
}
|
|
16021
|
-
},
|
|
16022
|
-
"parameters": [
|
|
16023
|
-
{
|
|
16024
|
-
"name": "model",
|
|
16025
|
-
"type": {
|
|
16026
|
-
"text": "FieldNode"
|
|
16027
|
-
}
|
|
16028
|
-
}
|
|
16029
|
-
]
|
|
16030
|
-
},
|
|
16031
|
-
{
|
|
16032
|
-
"kind": "method",
|
|
16033
|
-
"name": "getRequiredFields",
|
|
16034
|
-
"privacy": "private",
|
|
16035
|
-
"static": true,
|
|
16036
|
-
"return": {
|
|
16037
|
-
"type": {
|
|
16038
|
-
"text": "string[]"
|
|
16039
|
-
}
|
|
16040
|
-
},
|
|
16041
|
-
"parameters": [
|
|
16042
|
-
{
|
|
16043
|
-
"name": "descriptors",
|
|
16044
|
-
"type": {
|
|
16045
|
-
"text": "FieldDescriptor[]"
|
|
16046
|
-
}
|
|
16047
|
-
}
|
|
16048
|
-
]
|
|
16049
|
-
},
|
|
16050
|
-
{
|
|
16051
|
-
"kind": "method",
|
|
16052
|
-
"name": "getConstraints",
|
|
16053
|
-
"privacy": "private",
|
|
16054
|
-
"static": true,
|
|
16055
|
-
"parameters": [
|
|
16056
|
-
{
|
|
16057
|
-
"name": "constraints",
|
|
16058
|
-
"type": {
|
|
16059
|
-
"text": "FieldConstraints | undefined"
|
|
16060
|
-
}
|
|
16061
|
-
}
|
|
16062
|
-
]
|
|
16063
|
-
},
|
|
16064
|
-
{
|
|
16065
|
-
"kind": "method",
|
|
16066
|
-
"name": "createFieldNodeFromSchema",
|
|
16067
|
-
"privacy": "public",
|
|
16068
|
-
"static": true,
|
|
16069
|
-
"return": {
|
|
16070
|
-
"type": {
|
|
16071
|
-
"text": "FieldNode"
|
|
16072
|
-
}
|
|
16073
|
-
},
|
|
16074
|
-
"parameters": [
|
|
16075
|
-
{
|
|
16076
|
-
"name": "schema",
|
|
16077
|
-
"type": {
|
|
16078
|
-
"text": "FieldNodeSchema"
|
|
16079
|
-
}
|
|
16080
|
-
}
|
|
16081
|
-
]
|
|
16082
|
-
}
|
|
16083
|
-
]
|
|
16084
|
-
}
|
|
16085
|
-
],
|
|
16086
|
-
"exports": [
|
|
16087
|
-
{
|
|
16088
|
-
"kind": "js",
|
|
16089
|
-
"name": "SchemaBuilder",
|
|
16090
|
-
"declaration": {
|
|
16091
|
-
"name": "SchemaBuilder",
|
|
16092
|
-
"module": "src/decorators/SchemaBuilder.ts"
|
|
16093
|
-
}
|
|
16094
|
-
}
|
|
16095
|
-
]
|
|
16096
|
-
},
|
|
16097
|
-
{
|
|
16098
|
-
"kind": "javascript-module",
|
|
16099
|
-
"path": "dist/decorators/ServiceDecorators.js",
|
|
16100
|
-
"declarations": [
|
|
16101
|
-
{
|
|
16102
|
-
"kind": "function",
|
|
16103
|
-
"name": "ServiceBindings",
|
|
16104
|
-
"parameters": [
|
|
16105
|
-
{
|
|
16106
|
-
"name": "service",
|
|
16107
|
-
"type": {
|
|
16108
|
-
"text": "EventTarget"
|
|
16109
|
-
},
|
|
16110
|
-
"description": "The EventTarget service to bind to"
|
|
16111
|
-
}
|
|
16112
|
-
],
|
|
16113
|
-
"description": "### ServiceBindings Factory\n\nCreates type-safe decorators bound to a specific service instance.\nUse this to bind component properties and methods to service events.\n\nThe factory is generic and works with any `EventTarget`.\nEvent types and their detail payloads are type-checked at compile time\nvia the `TEventMap` type parameter.\n\nUsage:\n```typescript\nimport { cubeEntityService } from \"./CubeEntityService\";\nimport { ServiceBindings } from \"./ServiceDecorators\";\n\nconst cube = ServiceBindings(cubeEntityService);\n\nclass MyComponent extends LitElement {\n // Property binding - type-safe event name, auto-extracts from detail",
|
|
16114
|
-
"return": {
|
|
16115
|
-
"type": {
|
|
16116
|
-
"text": ""
|
|
16117
|
-
}
|
|
16118
|
-
}
|
|
16119
|
-
}
|
|
16120
|
-
],
|
|
16121
|
-
"exports": [
|
|
16122
|
-
{
|
|
16123
|
-
"kind": "js",
|
|
16124
|
-
"name": "ServiceBindings",
|
|
16507
|
+
"kind": "custom-element-definition",
|
|
16508
|
+
"name": "furo-type-renderer",
|
|
16125
16509
|
"declaration": {
|
|
16126
|
-
"name": "
|
|
16127
|
-
"module": "src/
|
|
16510
|
+
"name": "TypeRenderer",
|
|
16511
|
+
"module": "/src/web-components/impl/TypeRenderer/TypeRenderer"
|
|
16128
16512
|
}
|
|
16129
16513
|
}
|
|
16130
16514
|
]
|
|
@@ -37601,21 +37985,6 @@
|
|
|
37601
37985
|
}
|
|
37602
37986
|
]
|
|
37603
37987
|
},
|
|
37604
|
-
{
|
|
37605
|
-
"kind": "javascript-module",
|
|
37606
|
-
"path": "dist/web-components/furo-type-renderer.js",
|
|
37607
|
-
"declarations": [],
|
|
37608
|
-
"exports": [
|
|
37609
|
-
{
|
|
37610
|
-
"kind": "custom-element-definition",
|
|
37611
|
-
"name": "furo-type-renderer",
|
|
37612
|
-
"declaration": {
|
|
37613
|
-
"name": "TypeRenderer",
|
|
37614
|
-
"module": "/src/web-components/impl/TypeRenderer/TypeRenderer"
|
|
37615
|
-
}
|
|
37616
|
-
}
|
|
37617
|
-
]
|
|
37618
|
-
},
|
|
37619
37988
|
{
|
|
37620
37989
|
"kind": "javascript-module",
|
|
37621
37990
|
"path": "dist/web-components/impl/TypeRenderer/TypeRenderer.js",
|