@furo/open-models 1.20.1 → 1.21.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 +373 -366
- package/dist/StrictFetcher.d.ts +3 -0
- package/dist/StrictFetcher.js +4 -0
- package/dist/StrictFetcher.js.map +1 -1
- package/dist/primitives/BOOLEAN.js +8 -0
- package/dist/primitives/BOOLEAN.js.map +1 -1
- package/dist/primitives/BYTES.js +8 -0
- package/dist/primitives/BYTES.js.map +1 -1
- package/dist/primitives/DOUBLE.js +8 -0
- package/dist/primitives/DOUBLE.js.map +1 -1
- package/dist/primitives/FLOAT.js +8 -0
- package/dist/primitives/FLOAT.js.map +1 -1
- package/dist/primitives/INT32.js +8 -0
- package/dist/primitives/INT32.js.map +1 -1
- package/dist/primitives/INT64.js +11 -1
- package/dist/primitives/INT64.js.map +1 -1
- package/dist/primitives/SINT32.js +8 -0
- package/dist/primitives/SINT32.js.map +1 -1
- package/dist/primitives/SINT64.js +11 -1
- package/dist/primitives/SINT64.js.map +1 -1
- package/dist/primitives/STRING.js +8 -0
- package/dist/primitives/STRING.js.map +1 -1
- package/dist/primitives/UINT32.js +8 -0
- package/dist/primitives/UINT32.js.map +1 -1
- package/dist/primitives/UINT64.js +11 -1
- package/dist/primitives/UINT64.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -2110,6 +2110,13 @@
|
|
|
2110
2110
|
"type": {
|
|
2111
2111
|
"text": "(error: unknown) => void | undefined"
|
|
2112
2112
|
}
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"kind": "field",
|
|
2116
|
+
"name": "onRawJsonResponse",
|
|
2117
|
+
"type": {
|
|
2118
|
+
"text": "(json: JSONObject) => void | undefined"
|
|
2119
|
+
}
|
|
2113
2120
|
}
|
|
2114
2121
|
]
|
|
2115
2122
|
}
|
|
@@ -2620,151 +2627,435 @@
|
|
|
2620
2627
|
},
|
|
2621
2628
|
{
|
|
2622
2629
|
"kind": "javascript-module",
|
|
2623
|
-
"path": "dist/
|
|
2630
|
+
"path": "dist/decorators/DefaultServiceEventHandlers.js",
|
|
2624
2631
|
"declarations": [
|
|
2625
2632
|
{
|
|
2626
|
-
"kind": "
|
|
2627
|
-
"
|
|
2628
|
-
"
|
|
2629
|
-
"members": [
|
|
2633
|
+
"kind": "function",
|
|
2634
|
+
"name": "DefaultServiceEventHandlers",
|
|
2635
|
+
"parameters": [
|
|
2630
2636
|
{
|
|
2631
|
-
"
|
|
2632
|
-
"name": "_value",
|
|
2637
|
+
"name": "dispatch",
|
|
2633
2638
|
"type": {
|
|
2634
|
-
"text": "
|
|
2639
|
+
"text": "DispatchFn"
|
|
2635
2640
|
},
|
|
2636
|
-
"
|
|
2637
|
-
"default": "[]"
|
|
2641
|
+
"description": "Function to dispatch events (typically bound to the service's dispatchEvent)"
|
|
2638
2642
|
},
|
|
2639
2643
|
{
|
|
2640
|
-
"
|
|
2641
|
-
"
|
|
2644
|
+
"name": "options",
|
|
2645
|
+
"default": "{}",
|
|
2642
2646
|
"type": {
|
|
2643
|
-
"text": "
|
|
2647
|
+
"text": "DefaultServiceEventHandlersOptions"
|
|
2644
2648
|
},
|
|
2645
|
-
"
|
|
2646
|
-
|
|
2647
|
-
|
|
2649
|
+
"description": "Optional configuration"
|
|
2650
|
+
}
|
|
2651
|
+
],
|
|
2652
|
+
"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```",
|
|
2653
|
+
"return": {
|
|
2654
|
+
"type": {
|
|
2655
|
+
"text": ""
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
"kind": "function",
|
|
2661
|
+
"name": "CreateDispatch",
|
|
2662
|
+
"return": {
|
|
2663
|
+
"type": {
|
|
2664
|
+
"text": ""
|
|
2665
|
+
}
|
|
2666
|
+
},
|
|
2667
|
+
"parameters": [
|
|
2668
|
+
{
|
|
2669
|
+
"name": "target",
|
|
2670
|
+
"type": {
|
|
2671
|
+
"text": "EventTarget"
|
|
2672
|
+
},
|
|
2673
|
+
"description": "The EventTarget to dispatch events on"
|
|
2674
|
+
}
|
|
2675
|
+
],
|
|
2676
|
+
"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```"
|
|
2677
|
+
}
|
|
2678
|
+
],
|
|
2679
|
+
"exports": [
|
|
2680
|
+
{
|
|
2681
|
+
"kind": "js",
|
|
2682
|
+
"name": "DefaultServiceEventHandlers",
|
|
2683
|
+
"declaration": {
|
|
2684
|
+
"name": "DefaultServiceEventHandlers",
|
|
2685
|
+
"module": "src/decorators/DefaultServiceEventHandlers.ts"
|
|
2686
|
+
}
|
|
2687
|
+
},
|
|
2688
|
+
{
|
|
2689
|
+
"kind": "js",
|
|
2690
|
+
"name": "CreateDispatch",
|
|
2691
|
+
"declaration": {
|
|
2692
|
+
"name": "CreateDispatch",
|
|
2693
|
+
"module": "src/decorators/DefaultServiceEventHandlers.ts"
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
]
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
"kind": "javascript-module",
|
|
2700
|
+
"path": "dist/decorators/EntityServiceTypes.js",
|
|
2701
|
+
"declarations": [],
|
|
2702
|
+
"exports": []
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
"kind": "javascript-module",
|
|
2706
|
+
"path": "dist/decorators/FieldBindings.js",
|
|
2707
|
+
"declarations": [
|
|
2708
|
+
{
|
|
2709
|
+
"kind": "variable",
|
|
2710
|
+
"name": "fieldBindings",
|
|
2711
|
+
"type": {
|
|
2712
|
+
"text": "object"
|
|
2713
|
+
},
|
|
2714
|
+
"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); }; }, }",
|
|
2715
|
+
"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"
|
|
2716
|
+
}
|
|
2717
|
+
],
|
|
2718
|
+
"exports": [
|
|
2719
|
+
{
|
|
2720
|
+
"kind": "js",
|
|
2721
|
+
"name": "fieldBindings",
|
|
2722
|
+
"declaration": {
|
|
2723
|
+
"name": "fieldBindings",
|
|
2724
|
+
"module": "src/decorators/FieldBindings.ts"
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
]
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
"kind": "javascript-module",
|
|
2731
|
+
"path": "dist/decorators/ModelDecorators.js",
|
|
2732
|
+
"declarations": [
|
|
2733
|
+
{
|
|
2734
|
+
"kind": "function",
|
|
2735
|
+
"name": "ModelBindings",
|
|
2736
|
+
"parameters": [
|
|
2737
|
+
{
|
|
2738
|
+
"name": "model",
|
|
2739
|
+
"type": {
|
|
2740
|
+
"text": "FieldNodeLike"
|
|
2741
|
+
},
|
|
2742
|
+
"description": "The FieldNode model to bind to"
|
|
2743
|
+
}
|
|
2744
|
+
],
|
|
2745
|
+
"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",
|
|
2746
|
+
"return": {
|
|
2747
|
+
"type": {
|
|
2748
|
+
"text": ""
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
],
|
|
2753
|
+
"exports": [
|
|
2754
|
+
{
|
|
2755
|
+
"kind": "js",
|
|
2756
|
+
"name": "ModelBindings",
|
|
2757
|
+
"declaration": {
|
|
2758
|
+
"name": "ModelBindings",
|
|
2759
|
+
"module": "src/decorators/ModelDecorators.ts"
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
]
|
|
2763
|
+
},
|
|
2764
|
+
{
|
|
2765
|
+
"kind": "javascript-module",
|
|
2766
|
+
"path": "dist/decorators/SchemaBuilder.js",
|
|
2767
|
+
"declarations": [
|
|
2768
|
+
{
|
|
2769
|
+
"kind": "class",
|
|
2770
|
+
"description": "",
|
|
2771
|
+
"name": "SchemaBuilder",
|
|
2772
|
+
"members": [
|
|
2648
2773
|
{
|
|
2649
2774
|
"kind": "method",
|
|
2650
|
-
"name": "
|
|
2775
|
+
"name": "generate",
|
|
2651
2776
|
"privacy": "public",
|
|
2777
|
+
"static": true,
|
|
2652
2778
|
"return": {
|
|
2653
2779
|
"type": {
|
|
2654
|
-
"text": "
|
|
2780
|
+
"text": "JSONSchema7"
|
|
2655
2781
|
}
|
|
2656
2782
|
},
|
|
2657
2783
|
"parameters": [
|
|
2658
2784
|
{
|
|
2659
|
-
"name": "
|
|
2660
|
-
"optional": true,
|
|
2661
|
-
"type": {
|
|
2662
|
-
"text": "I"
|
|
2663
|
-
}
|
|
2664
|
-
},
|
|
2665
|
-
{
|
|
2666
|
-
"name": "before",
|
|
2667
|
-
"optional": true,
|
|
2785
|
+
"name": "model",
|
|
2668
2786
|
"type": {
|
|
2669
|
-
"text": "
|
|
2787
|
+
"text": "FieldNode"
|
|
2670
2788
|
}
|
|
2671
2789
|
}
|
|
2672
|
-
]
|
|
2673
|
-
"description": "Creates an element of type T and adds it to the beginning or end (default) of the ARRAY"
|
|
2790
|
+
]
|
|
2674
2791
|
},
|
|
2675
2792
|
{
|
|
2676
2793
|
"kind": "method",
|
|
2677
|
-
"name": "
|
|
2794
|
+
"name": "getProps",
|
|
2795
|
+
"privacy": "private",
|
|
2796
|
+
"static": true,
|
|
2797
|
+
"return": {
|
|
2798
|
+
"type": {
|
|
2799
|
+
"text": "Record<string, JSONSchema7Definition>"
|
|
2800
|
+
}
|
|
2801
|
+
},
|
|
2678
2802
|
"parameters": [
|
|
2679
2803
|
{
|
|
2680
|
-
"name": "
|
|
2804
|
+
"name": "model",
|
|
2681
2805
|
"type": {
|
|
2682
|
-
"text": "
|
|
2806
|
+
"text": "FieldNode"
|
|
2683
2807
|
}
|
|
2684
2808
|
}
|
|
2685
2809
|
]
|
|
2686
2810
|
},
|
|
2687
2811
|
{
|
|
2688
2812
|
"kind": "method",
|
|
2689
|
-
"name": "
|
|
2813
|
+
"name": "getRequiredFields",
|
|
2814
|
+
"privacy": "private",
|
|
2815
|
+
"static": true,
|
|
2690
2816
|
"return": {
|
|
2691
2817
|
"type": {
|
|
2692
|
-
"text": "
|
|
2818
|
+
"text": "string[]"
|
|
2693
2819
|
}
|
|
2694
2820
|
},
|
|
2695
2821
|
"parameters": [
|
|
2696
2822
|
{
|
|
2697
|
-
"name": "
|
|
2823
|
+
"name": "descriptors",
|
|
2698
2824
|
"type": {
|
|
2699
|
-
"text": "
|
|
2825
|
+
"text": "FieldDescriptor[]"
|
|
2700
2826
|
}
|
|
2701
2827
|
}
|
|
2702
|
-
]
|
|
2703
|
-
"description": "creates a literal type from a json type",
|
|
2704
|
-
"inheritedFrom": {
|
|
2705
|
-
"name": "FieldNode",
|
|
2706
|
-
"module": "dist/FieldNode.js"
|
|
2707
|
-
}
|
|
2828
|
+
]
|
|
2708
2829
|
},
|
|
2709
2830
|
{
|
|
2710
2831
|
"kind": "method",
|
|
2711
|
-
"name": "
|
|
2832
|
+
"name": "getConstraints",
|
|
2833
|
+
"privacy": "private",
|
|
2834
|
+
"static": true,
|
|
2712
2835
|
"parameters": [
|
|
2713
2836
|
{
|
|
2714
|
-
"name": "
|
|
2837
|
+
"name": "constraints",
|
|
2715
2838
|
"type": {
|
|
2716
|
-
"text": "
|
|
2839
|
+
"text": "FieldConstraints | undefined"
|
|
2717
2840
|
}
|
|
2718
2841
|
}
|
|
2719
|
-
]
|
|
2720
|
-
"description": "Updates the model from literal data, without changing the validity and value state.",
|
|
2721
|
-
"inheritedFrom": {
|
|
2722
|
-
"name": "FieldNode",
|
|
2723
|
-
"module": "dist/FieldNode.js"
|
|
2724
|
-
}
|
|
2842
|
+
]
|
|
2725
2843
|
},
|
|
2726
2844
|
{
|
|
2727
2845
|
"kind": "method",
|
|
2728
|
-
"name": "
|
|
2846
|
+
"name": "createFieldNodeFromSchema",
|
|
2847
|
+
"privacy": "public",
|
|
2848
|
+
"static": true,
|
|
2729
2849
|
"return": {
|
|
2730
2850
|
"type": {
|
|
2731
|
-
"text": "FieldNode
|
|
2851
|
+
"text": "FieldNode"
|
|
2732
2852
|
}
|
|
2733
2853
|
},
|
|
2734
2854
|
"parameters": [
|
|
2735
2855
|
{
|
|
2736
|
-
"name": "
|
|
2737
|
-
"default": "\"\""
|
|
2738
|
-
}
|
|
2739
|
-
],
|
|
2740
|
-
"description": "Get a FieldNode by giving a field path using the proto names for the fields.\n\n\n\n- `email_addresses[3].type[2]` for the second `type` value in the third `email_addresses` message.\n- `user.location.street` for the street in location in user.",
|
|
2741
|
-
"inheritedFrom": {
|
|
2742
|
-
"name": "FieldNode",
|
|
2743
|
-
"module": "dist/FieldNode.js"
|
|
2744
|
-
}
|
|
2745
|
-
},
|
|
2746
|
-
{
|
|
2747
|
-
"kind": "method",
|
|
2748
|
-
"name": "__notifyArrayChanges",
|
|
2749
|
-
"privacy": "private",
|
|
2750
|
-
"parameters": [
|
|
2751
|
-
{
|
|
2752
|
-
"name": "bubbles",
|
|
2753
|
-
"optional": true,
|
|
2856
|
+
"name": "schema",
|
|
2754
2857
|
"type": {
|
|
2755
|
-
"text": "
|
|
2858
|
+
"text": "FieldNodeSchema"
|
|
2756
2859
|
}
|
|
2757
2860
|
}
|
|
2758
2861
|
]
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2862
|
+
}
|
|
2863
|
+
]
|
|
2864
|
+
}
|
|
2865
|
+
],
|
|
2866
|
+
"exports": [
|
|
2867
|
+
{
|
|
2868
|
+
"kind": "js",
|
|
2869
|
+
"name": "SchemaBuilder",
|
|
2870
|
+
"declaration": {
|
|
2871
|
+
"name": "SchemaBuilder",
|
|
2872
|
+
"module": "src/decorators/SchemaBuilder.ts"
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
]
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"kind": "javascript-module",
|
|
2879
|
+
"path": "dist/decorators/ServiceDecorators.js",
|
|
2880
|
+
"declarations": [
|
|
2881
|
+
{
|
|
2882
|
+
"kind": "function",
|
|
2883
|
+
"name": "ServiceBindings",
|
|
2884
|
+
"parameters": [
|
|
2885
|
+
{
|
|
2886
|
+
"name": "service",
|
|
2887
|
+
"type": {
|
|
2888
|
+
"text": "EventTarget"
|
|
2889
|
+
},
|
|
2890
|
+
"description": "The EventTarget service to bind to"
|
|
2891
|
+
}
|
|
2892
|
+
],
|
|
2893
|
+
"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",
|
|
2894
|
+
"return": {
|
|
2895
|
+
"type": {
|
|
2896
|
+
"text": ""
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
],
|
|
2901
|
+
"exports": [
|
|
2902
|
+
{
|
|
2903
|
+
"kind": "js",
|
|
2904
|
+
"name": "ServiceBindings",
|
|
2905
|
+
"declaration": {
|
|
2906
|
+
"name": "ServiceBindings",
|
|
2907
|
+
"module": "src/decorators/ServiceDecorators.ts"
|
|
2908
|
+
}
|
|
2909
|
+
}
|
|
2910
|
+
]
|
|
2911
|
+
},
|
|
2912
|
+
{
|
|
2913
|
+
"kind": "javascript-module",
|
|
2914
|
+
"path": "dist/proxies/ARRAY.js",
|
|
2915
|
+
"declarations": [
|
|
2916
|
+
{
|
|
2917
|
+
"kind": "class",
|
|
2918
|
+
"description": "",
|
|
2919
|
+
"name": "ARRAY",
|
|
2920
|
+
"members": [
|
|
2921
|
+
{
|
|
2922
|
+
"kind": "field",
|
|
2923
|
+
"name": "_value",
|
|
2924
|
+
"type": {
|
|
2925
|
+
"text": "T[]"
|
|
2926
|
+
},
|
|
2927
|
+
"privacy": "private",
|
|
2928
|
+
"default": "[]"
|
|
2929
|
+
},
|
|
2930
|
+
{
|
|
2931
|
+
"kind": "field",
|
|
2932
|
+
"name": "___Constructor",
|
|
2933
|
+
"type": {
|
|
2934
|
+
"text": "(new () => T) | undefined"
|
|
2935
|
+
},
|
|
2936
|
+
"privacy": "private",
|
|
2937
|
+
"default": "undefined"
|
|
2938
|
+
},
|
|
2939
|
+
{
|
|
2940
|
+
"kind": "method",
|
|
2941
|
+
"name": "add",
|
|
2942
|
+
"privacy": "public",
|
|
2943
|
+
"return": {
|
|
2944
|
+
"type": {
|
|
2945
|
+
"text": "T"
|
|
2946
|
+
}
|
|
2947
|
+
},
|
|
2948
|
+
"parameters": [
|
|
2949
|
+
{
|
|
2950
|
+
"name": "initData",
|
|
2951
|
+
"optional": true,
|
|
2952
|
+
"type": {
|
|
2953
|
+
"text": "I"
|
|
2954
|
+
}
|
|
2955
|
+
},
|
|
2956
|
+
{
|
|
2957
|
+
"name": "before",
|
|
2958
|
+
"optional": true,
|
|
2959
|
+
"type": {
|
|
2960
|
+
"text": "boolean"
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
],
|
|
2964
|
+
"description": "Creates an element of type T and adds it to the beginning or end (default) of the ARRAY"
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
"kind": "method",
|
|
2968
|
+
"name": "initFromLiteral",
|
|
2969
|
+
"parameters": [
|
|
2970
|
+
{
|
|
2971
|
+
"name": "initData",
|
|
2972
|
+
"type": {
|
|
2973
|
+
"text": "I[]"
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2976
|
+
]
|
|
2977
|
+
},
|
|
2978
|
+
{
|
|
2979
|
+
"kind": "method",
|
|
2980
|
+
"name": "__mapProtoNameJsonToJson",
|
|
2981
|
+
"return": {
|
|
2982
|
+
"type": {
|
|
2983
|
+
"text": "any"
|
|
2984
|
+
}
|
|
2985
|
+
},
|
|
2986
|
+
"parameters": [
|
|
2987
|
+
{
|
|
2988
|
+
"name": "data",
|
|
2989
|
+
"type": {
|
|
2990
|
+
"text": "any"
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
],
|
|
2994
|
+
"description": "creates a literal type from a json type",
|
|
2995
|
+
"inheritedFrom": {
|
|
2996
|
+
"name": "FieldNode",
|
|
2997
|
+
"module": "dist/FieldNode.js"
|
|
2998
|
+
}
|
|
2999
|
+
},
|
|
3000
|
+
{
|
|
3001
|
+
"kind": "method",
|
|
3002
|
+
"name": "__updateWithLiteral",
|
|
3003
|
+
"parameters": [
|
|
3004
|
+
{
|
|
3005
|
+
"name": "initData",
|
|
3006
|
+
"type": {
|
|
3007
|
+
"text": "I[]"
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
],
|
|
3011
|
+
"description": "Updates the model from literal data, without changing the validity and value state.",
|
|
3012
|
+
"inheritedFrom": {
|
|
3013
|
+
"name": "FieldNode",
|
|
3014
|
+
"module": "dist/FieldNode.js"
|
|
3015
|
+
}
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
"kind": "method",
|
|
3019
|
+
"name": "__getFieldNodeByPath",
|
|
3020
|
+
"return": {
|
|
3021
|
+
"type": {
|
|
3022
|
+
"text": "FieldNode | undefined"
|
|
3023
|
+
}
|
|
3024
|
+
},
|
|
3025
|
+
"parameters": [
|
|
3026
|
+
{
|
|
3027
|
+
"name": "deepPath",
|
|
3028
|
+
"default": "\"\""
|
|
3029
|
+
}
|
|
3030
|
+
],
|
|
3031
|
+
"description": "Get a FieldNode by giving a field path using the proto names for the fields.\n\n\n\n- `email_addresses[3].type[2]` for the second `type` value in the third `email_addresses` message.\n- `user.location.street` for the street in location in user.",
|
|
3032
|
+
"inheritedFrom": {
|
|
3033
|
+
"name": "FieldNode",
|
|
3034
|
+
"module": "dist/FieldNode.js"
|
|
3035
|
+
}
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
"kind": "method",
|
|
3039
|
+
"name": "__notifyArrayChanges",
|
|
3040
|
+
"privacy": "private",
|
|
3041
|
+
"parameters": [
|
|
3042
|
+
{
|
|
3043
|
+
"name": "bubbles",
|
|
3044
|
+
"optional": true,
|
|
3045
|
+
"type": {
|
|
3046
|
+
"text": "boolean"
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
]
|
|
3050
|
+
},
|
|
3051
|
+
{
|
|
3052
|
+
"kind": "field",
|
|
3053
|
+
"name": "__childNodes",
|
|
3054
|
+
"type": {
|
|
3055
|
+
"text": "any[]"
|
|
3056
|
+
},
|
|
3057
|
+
"privacy": "public",
|
|
3058
|
+
"description": "Returns the child nodes of a node.",
|
|
2768
3059
|
"readonly": true,
|
|
2769
3060
|
"inheritedFrom": {
|
|
2770
3061
|
"name": "FieldNode",
|
|
@@ -7306,290 +7597,6 @@
|
|
|
7306
7597
|
}
|
|
7307
7598
|
]
|
|
7308
7599
|
},
|
|
7309
|
-
{
|
|
7310
|
-
"kind": "javascript-module",
|
|
7311
|
-
"path": "dist/decorators/DefaultServiceEventHandlers.js",
|
|
7312
|
-
"declarations": [
|
|
7313
|
-
{
|
|
7314
|
-
"kind": "function",
|
|
7315
|
-
"name": "DefaultServiceEventHandlers",
|
|
7316
|
-
"parameters": [
|
|
7317
|
-
{
|
|
7318
|
-
"name": "dispatch",
|
|
7319
|
-
"type": {
|
|
7320
|
-
"text": "DispatchFn"
|
|
7321
|
-
},
|
|
7322
|
-
"description": "Function to dispatch events (typically bound to the service's dispatchEvent)"
|
|
7323
|
-
},
|
|
7324
|
-
{
|
|
7325
|
-
"name": "options",
|
|
7326
|
-
"default": "{}",
|
|
7327
|
-
"type": {
|
|
7328
|
-
"text": "DefaultServiceEventHandlersOptions"
|
|
7329
|
-
},
|
|
7330
|
-
"description": "Optional configuration"
|
|
7331
|
-
}
|
|
7332
|
-
],
|
|
7333
|
-
"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```",
|
|
7334
|
-
"return": {
|
|
7335
|
-
"type": {
|
|
7336
|
-
"text": ""
|
|
7337
|
-
}
|
|
7338
|
-
}
|
|
7339
|
-
},
|
|
7340
|
-
{
|
|
7341
|
-
"kind": "function",
|
|
7342
|
-
"name": "CreateDispatch",
|
|
7343
|
-
"return": {
|
|
7344
|
-
"type": {
|
|
7345
|
-
"text": ""
|
|
7346
|
-
}
|
|
7347
|
-
},
|
|
7348
|
-
"parameters": [
|
|
7349
|
-
{
|
|
7350
|
-
"name": "target",
|
|
7351
|
-
"type": {
|
|
7352
|
-
"text": "EventTarget"
|
|
7353
|
-
},
|
|
7354
|
-
"description": "The EventTarget to dispatch events on"
|
|
7355
|
-
}
|
|
7356
|
-
],
|
|
7357
|
-
"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```"
|
|
7358
|
-
}
|
|
7359
|
-
],
|
|
7360
|
-
"exports": [
|
|
7361
|
-
{
|
|
7362
|
-
"kind": "js",
|
|
7363
|
-
"name": "DefaultServiceEventHandlers",
|
|
7364
|
-
"declaration": {
|
|
7365
|
-
"name": "DefaultServiceEventHandlers",
|
|
7366
|
-
"module": "src/decorators/DefaultServiceEventHandlers.ts"
|
|
7367
|
-
}
|
|
7368
|
-
},
|
|
7369
|
-
{
|
|
7370
|
-
"kind": "js",
|
|
7371
|
-
"name": "CreateDispatch",
|
|
7372
|
-
"declaration": {
|
|
7373
|
-
"name": "CreateDispatch",
|
|
7374
|
-
"module": "src/decorators/DefaultServiceEventHandlers.ts"
|
|
7375
|
-
}
|
|
7376
|
-
}
|
|
7377
|
-
]
|
|
7378
|
-
},
|
|
7379
|
-
{
|
|
7380
|
-
"kind": "javascript-module",
|
|
7381
|
-
"path": "dist/decorators/EntityServiceTypes.js",
|
|
7382
|
-
"declarations": [],
|
|
7383
|
-
"exports": []
|
|
7384
|
-
},
|
|
7385
|
-
{
|
|
7386
|
-
"kind": "javascript-module",
|
|
7387
|
-
"path": "dist/decorators/FieldBindings.js",
|
|
7388
|
-
"declarations": [
|
|
7389
|
-
{
|
|
7390
|
-
"kind": "variable",
|
|
7391
|
-
"name": "fieldBindings",
|
|
7392
|
-
"type": {
|
|
7393
|
-
"text": "object"
|
|
7394
|
-
},
|
|
7395
|
-
"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); }; }, }",
|
|
7396
|
-
"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"
|
|
7397
|
-
}
|
|
7398
|
-
],
|
|
7399
|
-
"exports": [
|
|
7400
|
-
{
|
|
7401
|
-
"kind": "js",
|
|
7402
|
-
"name": "fieldBindings",
|
|
7403
|
-
"declaration": {
|
|
7404
|
-
"name": "fieldBindings",
|
|
7405
|
-
"module": "src/decorators/FieldBindings.ts"
|
|
7406
|
-
}
|
|
7407
|
-
}
|
|
7408
|
-
]
|
|
7409
|
-
},
|
|
7410
|
-
{
|
|
7411
|
-
"kind": "javascript-module",
|
|
7412
|
-
"path": "dist/decorators/ModelDecorators.js",
|
|
7413
|
-
"declarations": [
|
|
7414
|
-
{
|
|
7415
|
-
"kind": "function",
|
|
7416
|
-
"name": "ModelBindings",
|
|
7417
|
-
"parameters": [
|
|
7418
|
-
{
|
|
7419
|
-
"name": "model",
|
|
7420
|
-
"type": {
|
|
7421
|
-
"text": "FieldNodeLike"
|
|
7422
|
-
},
|
|
7423
|
-
"description": "The FieldNode model to bind to"
|
|
7424
|
-
}
|
|
7425
|
-
],
|
|
7426
|
-
"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",
|
|
7427
|
-
"return": {
|
|
7428
|
-
"type": {
|
|
7429
|
-
"text": ""
|
|
7430
|
-
}
|
|
7431
|
-
}
|
|
7432
|
-
}
|
|
7433
|
-
],
|
|
7434
|
-
"exports": [
|
|
7435
|
-
{
|
|
7436
|
-
"kind": "js",
|
|
7437
|
-
"name": "ModelBindings",
|
|
7438
|
-
"declaration": {
|
|
7439
|
-
"name": "ModelBindings",
|
|
7440
|
-
"module": "src/decorators/ModelDecorators.ts"
|
|
7441
|
-
}
|
|
7442
|
-
}
|
|
7443
|
-
]
|
|
7444
|
-
},
|
|
7445
|
-
{
|
|
7446
|
-
"kind": "javascript-module",
|
|
7447
|
-
"path": "dist/decorators/SchemaBuilder.js",
|
|
7448
|
-
"declarations": [
|
|
7449
|
-
{
|
|
7450
|
-
"kind": "class",
|
|
7451
|
-
"description": "",
|
|
7452
|
-
"name": "SchemaBuilder",
|
|
7453
|
-
"members": [
|
|
7454
|
-
{
|
|
7455
|
-
"kind": "method",
|
|
7456
|
-
"name": "generate",
|
|
7457
|
-
"privacy": "public",
|
|
7458
|
-
"static": true,
|
|
7459
|
-
"return": {
|
|
7460
|
-
"type": {
|
|
7461
|
-
"text": "JSONSchema7"
|
|
7462
|
-
}
|
|
7463
|
-
},
|
|
7464
|
-
"parameters": [
|
|
7465
|
-
{
|
|
7466
|
-
"name": "model",
|
|
7467
|
-
"type": {
|
|
7468
|
-
"text": "FieldNode"
|
|
7469
|
-
}
|
|
7470
|
-
}
|
|
7471
|
-
]
|
|
7472
|
-
},
|
|
7473
|
-
{
|
|
7474
|
-
"kind": "method",
|
|
7475
|
-
"name": "getProps",
|
|
7476
|
-
"privacy": "private",
|
|
7477
|
-
"static": true,
|
|
7478
|
-
"return": {
|
|
7479
|
-
"type": {
|
|
7480
|
-
"text": "Record<string, JSONSchema7Definition>"
|
|
7481
|
-
}
|
|
7482
|
-
},
|
|
7483
|
-
"parameters": [
|
|
7484
|
-
{
|
|
7485
|
-
"name": "model",
|
|
7486
|
-
"type": {
|
|
7487
|
-
"text": "FieldNode"
|
|
7488
|
-
}
|
|
7489
|
-
}
|
|
7490
|
-
]
|
|
7491
|
-
},
|
|
7492
|
-
{
|
|
7493
|
-
"kind": "method",
|
|
7494
|
-
"name": "getRequiredFields",
|
|
7495
|
-
"privacy": "private",
|
|
7496
|
-
"static": true,
|
|
7497
|
-
"return": {
|
|
7498
|
-
"type": {
|
|
7499
|
-
"text": "string[]"
|
|
7500
|
-
}
|
|
7501
|
-
},
|
|
7502
|
-
"parameters": [
|
|
7503
|
-
{
|
|
7504
|
-
"name": "descriptors",
|
|
7505
|
-
"type": {
|
|
7506
|
-
"text": "FieldDescriptor[]"
|
|
7507
|
-
}
|
|
7508
|
-
}
|
|
7509
|
-
]
|
|
7510
|
-
},
|
|
7511
|
-
{
|
|
7512
|
-
"kind": "method",
|
|
7513
|
-
"name": "getConstraints",
|
|
7514
|
-
"privacy": "private",
|
|
7515
|
-
"static": true,
|
|
7516
|
-
"parameters": [
|
|
7517
|
-
{
|
|
7518
|
-
"name": "constraints",
|
|
7519
|
-
"type": {
|
|
7520
|
-
"text": "FieldConstraints | undefined"
|
|
7521
|
-
}
|
|
7522
|
-
}
|
|
7523
|
-
]
|
|
7524
|
-
},
|
|
7525
|
-
{
|
|
7526
|
-
"kind": "method",
|
|
7527
|
-
"name": "createFieldNodeFromSchema",
|
|
7528
|
-
"privacy": "public",
|
|
7529
|
-
"static": true,
|
|
7530
|
-
"return": {
|
|
7531
|
-
"type": {
|
|
7532
|
-
"text": "FieldNode"
|
|
7533
|
-
}
|
|
7534
|
-
},
|
|
7535
|
-
"parameters": [
|
|
7536
|
-
{
|
|
7537
|
-
"name": "schema",
|
|
7538
|
-
"type": {
|
|
7539
|
-
"text": "FieldNodeSchema"
|
|
7540
|
-
}
|
|
7541
|
-
}
|
|
7542
|
-
]
|
|
7543
|
-
}
|
|
7544
|
-
]
|
|
7545
|
-
}
|
|
7546
|
-
],
|
|
7547
|
-
"exports": [
|
|
7548
|
-
{
|
|
7549
|
-
"kind": "js",
|
|
7550
|
-
"name": "SchemaBuilder",
|
|
7551
|
-
"declaration": {
|
|
7552
|
-
"name": "SchemaBuilder",
|
|
7553
|
-
"module": "src/decorators/SchemaBuilder.ts"
|
|
7554
|
-
}
|
|
7555
|
-
}
|
|
7556
|
-
]
|
|
7557
|
-
},
|
|
7558
|
-
{
|
|
7559
|
-
"kind": "javascript-module",
|
|
7560
|
-
"path": "dist/decorators/ServiceDecorators.js",
|
|
7561
|
-
"declarations": [
|
|
7562
|
-
{
|
|
7563
|
-
"kind": "function",
|
|
7564
|
-
"name": "ServiceBindings",
|
|
7565
|
-
"parameters": [
|
|
7566
|
-
{
|
|
7567
|
-
"name": "service",
|
|
7568
|
-
"type": {
|
|
7569
|
-
"text": "EventTarget"
|
|
7570
|
-
},
|
|
7571
|
-
"description": "The EventTarget service to bind to"
|
|
7572
|
-
}
|
|
7573
|
-
],
|
|
7574
|
-
"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",
|
|
7575
|
-
"return": {
|
|
7576
|
-
"type": {
|
|
7577
|
-
"text": ""
|
|
7578
|
-
}
|
|
7579
|
-
}
|
|
7580
|
-
}
|
|
7581
|
-
],
|
|
7582
|
-
"exports": [
|
|
7583
|
-
{
|
|
7584
|
-
"kind": "js",
|
|
7585
|
-
"name": "ServiceBindings",
|
|
7586
|
-
"declaration": {
|
|
7587
|
-
"name": "ServiceBindings",
|
|
7588
|
-
"module": "src/decorators/ServiceDecorators.ts"
|
|
7589
|
-
}
|
|
7590
|
-
}
|
|
7591
|
-
]
|
|
7592
|
-
},
|
|
7593
7600
|
{
|
|
7594
7601
|
"kind": "javascript-module",
|
|
7595
7602
|
"path": "dist/primitives/BOOLEAN.js",
|