idlize

Форк
0
725 строк · 27.8 Кб
1
import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethod, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, ESObject, ForEach, GestureGroup, IDataSource, ImageBitmap, Indicator, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, OffscreenCanvasRenderingContext2D, OnChange, PanGesture, PanGestureOptions, PatternLockController, PinchGesture, RenderingContextSettings, RichEditorController, Scroller, SearchController, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextInputOptions, TextTimerController, TransitionEffect, VideoController, WebController, XComponentController, animateTo, bindCustomDialog, contextLocal, contextLocalStateOf, objectLinkState, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui";
2
import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router";
3
export class ArkEntryExampleComponent extends ArkStructBase<ArkEntryExampleComponent> {
4
    private _entry_local_storage_ = new LocalStorage();
5
    __initializeStruct(/**/
6
    /** @memo */
7
    content?: () => void, initializers?: Partial<ArkEntryExampleComponent>): void {
8
    }
9
    /** @memo */
10
    _build(/**/
11
    /** @memo */
12
    builder: ((instance: ArkEntryExampleComponent) => void) | undefined) { }
13
}
14
class ArkComponentExampleComponent extends ArkStructBase<ArkComponentExampleComponent> {
15
    private _entry_local_storage_ = new LocalStorage();
16
    __initializeStruct(/**/
17
    /** @memo */
18
    content?: () => void, initializers?: Partial<ArkComponentExampleComponent>): void {
19
    }
20
    /** @memo */
21
    _build(/**/
22
    /** @memo */
23
    builder: ((instance: ArkComponentExampleComponent) => void) | undefined) { }
24
}
25
class ArkBuildExampleComponent extends ArkStructBase<ArkBuildExampleComponent> {
26
    private _entry_local_storage_ = new LocalStorage();
27
    __initializeStruct(/**/
28
    /** @memo */
29
    content?: () => void, initializers?: Partial<ArkBuildExampleComponent>): void {
30
    }
31
    /** @memo */
32
    _build(/**/
33
    /** @memo */
34
    builder: ((instance: ArkBuildExampleComponent) => void) | undefined) {
35
        ArkText((instance: ArkTextComponent) => {
36
            instance.fontColor(Color.Red)
37
                .width(100);
38
        }, undefined, "message");
39
    }
40
}
41
class ArkStateExampleComponent extends ArkStructBase<ArkStateExampleComponent> {
42
    private _entry_local_storage_ = new LocalStorage();
43
    __initializeStruct(/**/
44
    /** @memo */
45
    content?: () => void, initializers?: Partial<ArkStateExampleComponent>): void {
46
        this._x = stateOf<string>(initializers?.x ?? ("hello"), this);
47
    }
48
    _x!: MutableState<string>;
49
    get x(): string {
50
        return this._x!.value;
51
    }
52
    set x(value: string) {
53
        this._x!.value = observableProxy(value);
54
    }
55
    /** @memo */
56
    _build(/**/
57
    /** @memo */
58
    builder: ((instance: ArkStateExampleComponent) => void) | undefined) {
59
        ArkText(undefined, undefined, this.x);
60
    }
61
}
62
class ArkLinkExampleComponent extends ArkStructBase<ArkLinkExampleComponent> {
63
    private _entry_local_storage_ = new LocalStorage();
64
    __initializeStruct(/**/
65
    /** @memo */
66
    content?: () => void, initializers?: Partial<ArkLinkExampleComponent>): void {
67
        this._x = initializers!._x!;
68
    }
69
    _x!: MutableState<string>;
70
    get x(): string {
71
        return this._x!.value;
72
    }
73
    set x(value: string) {
74
        this._x!.value = observableProxy(value);
75
    }
76
    /** @memo */
77
    _build(/**/
78
    /** @memo */
79
    builder: ((instance: ArkLinkExampleComponent) => void) | undefined) {
80
        ArkText(undefined, undefined, this.x);
81
    }
82
}
83
class ArkPropExampleComponent extends ArkStructBase<ArkPropExampleComponent> {
84
    private _entry_local_storage_ = new LocalStorage();
85
    __initializeStruct(/**/
86
    /** @memo */
87
    content?: () => void, initializers?: Partial<ArkPropExampleComponent>): void {
88
        this._x = propState<string>();
89
    }
90
    _x!: SyncedProperty<string>;
91
    get x(): string {
92
        return this._x!.value;
93
    }
94
    set x(value: string) {
95
        this._x!.value = observableProxy(value);
96
    }
97
    /** @memo */
98
    __updateStruct(initializers: Partial<ArkPropExampleComponent> | undefined): void {
99
        this._x.update(initializers?.x);
100
    }
101
    /** @memo */
102
    _build(/**/
103
    /** @memo */
104
    builder: ((instance: ArkPropExampleComponent) => void) | undefined) {
105
        ArkText(undefined, undefined, this.x);
106
    }
107
}
108
class ArkPropInitializedExampleComponent extends ArkStructBase<ArkPropInitializedExampleComponent> {
109
    private _entry_local_storage_ = new LocalStorage();
110
    __initializeStruct(/**/
111
    /** @memo */
112
    content?: () => void, initializers?: Partial<ArkPropInitializedExampleComponent>): void {
113
        this._x = propState<string>("init");
114
    }
115
    _x!: SyncedProperty<string>;
116
    get x(): string {
117
        return this._x!.value;
118
    }
119
    set x(value: string) {
120
        this._x!.value = observableProxy(value);
121
    }
122
    /** @memo */
123
    __updateStruct(initializers: Partial<ArkPropInitializedExampleComponent> | undefined): void {
124
        this._x.update(initializers?.x);
125
    }
126
    /** @memo */
127
    _build(/**/
128
    /** @memo */
129
    builder: ((instance: ArkPropInitializedExampleComponent) => void) | undefined) {
130
        ArkText(undefined, undefined, this.x);
131
    }
132
}
133
class ArkProvideExampleComponent extends ArkStructBase<ArkProvideExampleComponent> {
134
    private _entry_local_storage_ = new LocalStorage();
135
    __initializeStruct(/**/
136
    /** @memo */
137
    content?: () => void, initializers?: Partial<ArkProvideExampleComponent>): void {
138
        this._x = initializers!._x!;
139
    }
140
    _x!: MutableState<string>;
141
    get x(): string {
142
        return this._x!.value;
143
    }
144
    set x(value: string) {
145
        this._x!.value = observableProxy(value);
146
    }
147
    /** @memo */
148
    _build(/**/
149
    /** @memo */
150
    builder: ((instance: ArkProvideExampleComponent) => void) | undefined) {
151
        ArkText(undefined, undefined, this.x);
152
    }
153
}
154
class ArkConsumeExampleComponent extends ArkStructBase<ArkConsumeExampleComponent> {
155
    private _entry_local_storage_ = new LocalStorage();
156
    __initializeStruct(/**/
157
    /** @memo */
158
    content?: () => void, initializers?: Partial<ArkConsumeExampleComponent>): void {
159
        this._x = initializers!._x!;
160
    }
161
    _x!: MutableState<string>;
162
    get x(): string {
163
        return this._x!.value;
164
    }
165
    set x(value: string) {
166
        this._x!.value = observableProxy(value);
167
    }
168
    /** @memo */
169
    _build(/**/
170
    /** @memo */
171
    builder: ((instance: ArkConsumeExampleComponent) => void) | undefined) {
172
        ArkText(undefined, undefined, this.x);
173
    }
174
}
175
class ArkBuilderExampleComponent extends ArkStructBase<ArkBuilderExampleComponent> {
176
    private _entry_local_storage_ = new LocalStorage();
177
    __initializeStruct(/**/
178
    /** @memo */
179
    content?: () => void, initializers?: Partial<ArkBuilderExampleComponent>): void {
180
    }
181
    /** @memo */
182
    foo() {
183
        ArkText(undefined, undefined, "hello");
184
    }
185
    /** @memo */
186
    _build(/**/
187
    /** @memo */
188
    builder: ((instance: ArkBuilderExampleComponent) => void) | undefined) {
189
        this.foo();
190
    }
191
}
192
/** @memo */
193
function bar() {
194
    ArkText(undefined, undefined, "hello");
195
}
196
class ArkGlobalBuilderExampleComponent extends ArkStructBase<ArkGlobalBuilderExampleComponent> {
197
    private _entry_local_storage_ = new LocalStorage();
198
    __initializeStruct(/**/
199
    /** @memo */
200
    content?: () => void, initializers?: Partial<ArkGlobalBuilderExampleComponent>): void {
201
    }
202
    /** @memo */
203
    _build(/**/
204
    /** @memo */
205
    builder: ((instance: ArkGlobalBuilderExampleComponent) => void) | undefined) {
206
        bar();
207
    }
208
}
209
class ArkBuilderParamExampleComponent extends ArkStructBase<ArkBuilderParamExampleComponent> {
210
    private _entry_local_storage_ = new LocalStorage();
211
    __initializeStruct(/**/
212
    /** @memo */
213
    content?: () => void, initializers?: Partial<ArkBuilderParamExampleComponent>): void {
214
        if (initializers?.foo) {
215
            this._foo = initializers?.foo;
216
        }
217
        if (!this._foo && content)
218
            this._foo = content;
219
    }
220
    /** @memo */
221
    _foo!: () => {};
222
    /** @memo */
223
    get foo(): () => {} {
224
        return this._foo;
225
    }
226
    set foo(/**/
227
    /** @memo */
228
    value: () => {}) {
229
        this._foo = value;
230
    }
231
    /** @memo */
232
    _build(/**/
233
    /** @memo */
234
    builder: ((instance: ArkBuilderParamExampleComponent) => void) | undefined) {
235
        this.foo();
236
    }
237
}
238
/** @memo */
239
function looks<T extends ArkCommonMethod<T>>(CommonInstance: any): T {
240
    return CommonInstance.height(500)
241
        .width(400)
242
        .backgroundColor(Color.Gray);
243
}
244
class ArkStylesExampleComponent extends ArkStructBase<ArkStylesExampleComponent> {
245
    private _entry_local_storage_ = new LocalStorage();
246
    __initializeStruct(/**/
247
    /** @memo */
248
    content?: () => void, initializers?: Partial<ArkStylesExampleComponent>): void {
249
    }
250
    /** @memo */
251
    _build(/**/
252
    /** @memo */
253
    builder: ((instance: ArkStylesExampleComponent) => void) | undefined) {
254
        ArkText((instance: ArkTextComponent) => {
255
            instance.width(17).__applyStyle(looks);
256
        }, undefined);
257
    }
258
}
259
class ArkStylesMethodExampleComponent extends ArkStructBase<ArkStylesMethodExampleComponent> {
260
    private _entry_local_storage_ = new LocalStorage();
261
    __initializeStruct(/**/
262
    /** @memo */
263
    content?: () => void, initializers?: Partial<ArkStylesMethodExampleComponent>): void {
264
    }
265
    /** @memo */
266
    nice<T extends ArkCommonMethod<T>>(CommonInstance: any): T {
267
        return CommonInstance.height(500)
268
            .width(400)
269
            .backgroundColor(Color.Gray);
270
    }
271
    /** @memo */
272
    _build(/**/
273
    /** @memo */
274
    builder: ((instance: ArkStylesMethodExampleComponent) => void) | undefined) {
275
        ArkText((instance: ArkTextComponent) => {
276
            instance.width(17).__applyStyle(this.nice.bind(this));
277
        }, undefined);
278
    }
279
}
280
/** @memo */
281
function clown__Column<T extends ArkColumnComponent>(ColumnInstance: any): ArkColumnComponent {
282
    return ColumnInstance.height(500)
283
        .width(400)
284
        .backgroundColor(Color.Gray);
285
}
286
class ArkExtendExampleComponent extends ArkStructBase<ArkExtendExampleComponent> {
287
    private _entry_local_storage_ = new LocalStorage();
288
    __initializeStruct(/**/
289
    /** @memo */
290
    content?: () => void, initializers?: Partial<ArkExtendExampleComponent>): void {
291
    }
292
    /** @memo */
293
    _build(/**/
294
    /** @memo */
295
    builder: ((instance: ArkExtendExampleComponent) => void) | undefined) {
296
        ArkColumn((instance: ArkColumnComponent) => {
297
            instance.width(17).__applyStyle(clown__Column);
298
        }, undefined);
299
    }
300
}
301
/** @memo */
302
function attributeExtend__Text<T extends ArkTextComponent>(TextInstance: any, n: number, unused: any): ArkTextComponent {
303
    return TextInstance.fontSize(n);
304
}
305
class ArkAnimatableExtendExampleComponent extends ArkStructBase<ArkAnimatableExtendExampleComponent> {
306
    private _entry_local_storage_ = new LocalStorage();
307
    __initializeStruct(/**/
308
    /** @memo */
309
    content?: () => void, initializers?: Partial<ArkAnimatableExtendExampleComponent>): void {
310
    }
311
    /** @memo */
312
    _build(/**/
313
    /** @memo */
314
    builder: ((instance: ArkAnimatableExtendExampleComponent) => void) | undefined) {
315
        ArkText((instance: ArkTextComponent) => {
316
            instance.width(17).__applyAnimatableExtend(attributeExtend__Text, 50, "unused");
317
        }, undefined);
318
    }
319
}
320
class ArkWatchExampleComponent extends ArkStructBase<ArkWatchExampleComponent> {
321
    private _entry_local_storage_ = new LocalStorage();
322
    __initializeStruct(/**/
323
    /** @memo */
324
    content?: () => void, initializers?: Partial<ArkWatchExampleComponent>): void {
325
        this._x = stateOf<string>(initializers?.x ?? ("hello"), this);
326
    }
327
    _x!: MutableState<string>;
328
    get x(): string {
329
        return this._x!.value;
330
    }
331
    set x(value: string) {
332
        this._x!.value = observableProxy(value);
333
    }
334
    /** @memo */
335
    __updateStruct(initializers: Partial<ArkWatchExampleComponent> | undefined): void {
336
        OnChange(this.x, () => this.watchFunction());
337
    }
338
    watchFunction() {
339
        console.log("Watch function");
340
    }
341
    /** @memo */
342
    _build(/**/
343
    /** @memo */
344
    builder: ((instance: ArkWatchExampleComponent) => void) | undefined) {
345
    }
346
}
347
class ArkStorageLinkExampleComponent extends ArkStructBase<ArkStorageLinkExampleComponent> {
348
    private _entry_local_storage_ = new LocalStorage();
349
    __initializeStruct(/**/
350
    /** @memo */
351
    content?: () => void, initializers?: Partial<ArkStorageLinkExampleComponent>): void {
352
        this._link = AppStorageLinkState<string>("storage", "Start");
353
    }
354
    _link!: MutableState<string>;
355
    get link(): string {
356
        return this._link!.value;
357
    }
358
    set link(value: string) {
359
        this._link!.value = observableProxy(value);
360
    }
361
    /** @memo */
362
    _build(/**/
363
    /** @memo */
364
    builder: ((instance: ArkStorageLinkExampleComponent) => void) | undefined) {
365
    }
366
}
367
class ArkStoragePropExampleComponent extends ArkStructBase<ArkStoragePropExampleComponent> {
368
    private _entry_local_storage_ = new LocalStorage();
369
    __initializeStruct(/**/
370
    /** @memo */
371
    content?: () => void, initializers?: Partial<ArkStoragePropExampleComponent>): void {
372
        this._prop = propState<string>(AppStorageLinkState<string>("storage", "Start").value);
373
    }
374
    _prop!: SyncedProperty<string>;
375
    get prop(): string {
376
        return this._prop!.value;
377
    }
378
    set prop(value: string) {
379
        this._prop!.value = observableProxy(value);
380
    }
381
    /** @memo */
382
    __updateStruct(initializers: Partial<ArkStoragePropExampleComponent> | undefined): void {
383
        this._prop.update(AppStorageLinkState<string>("storage", "Start").value);
384
    }
385
    /** @memo */
386
    _build(/**/
387
    /** @memo */
388
    builder: ((instance: ArkStoragePropExampleComponent) => void) | undefined) {
389
    }
390
}
391
class ArkCustomDialogExampleComponent extends ArkStructBase<ArkCustomDialogExampleComponent> {
392
    private _entry_local_storage_ = new LocalStorage();
393
    __initializeStruct(/**/
394
    /** @memo */
395
    content?: () => void, initializers?: Partial<ArkCustomDialogExampleComponent>): void {
396
        if (initializers?.controller) {
397
            this._controller = initializers?.controller;
398
        }
399
    }
400
    _controller!: CustomDialogController;
401
    get controller(): CustomDialogController {
402
        return this._controller;
403
    }
404
    set controller(value: CustomDialogController) {
405
        this._controller = value;
406
    }
407
    /** @memo */
408
    _build(/**/
409
    /** @memo */
410
    builder: ((instance: ArkCustomDialogExampleComponent) => void) | undefined) {
411
    }
412
}
413
export class ArkCustomDialogControllerExampleComponent extends ArkStructBase<ArkCustomDialogControllerExampleComponent> {
414
    private _entry_local_storage_ = new LocalStorage();
415
    __initializeStruct(/**/
416
    /** @memo */
417
    content?: () => void, initializers?: Partial<ArkCustomDialogControllerExampleComponent>): void {
418
        this._dialogController = initializers?.dialogController ?? (new CustomDialogController({
419
            builder: CustomDialogExample(),
420
            autoCancel: true,
421
            alignment: DialogAlignment.Default,
422
            offset: { dx: 0, dy: 0 },
423
            gridCount: 4,
424
            customStyle: false
425
        }));
426
    }
427
    _dialogController!: CustomDialogController;
428
    get dialogController(): CustomDialogController {
429
        return this._dialogController;
430
    }
431
    set dialogController(value: CustomDialogController) {
432
        this._dialogController = value;
433
    }
434
    aboutToAppear() {
435
        this.dialogController.open();
436
    }
437
    aboutToDisappear() {
438
        this.dialogController.close();
439
    }
440
    /** @memo */
441
    _build(/**/
442
    /** @memo */
443
    builder: ((instance: ArkCustomDialogControllerExampleComponent) => void) | undefined) {
444
    }
445
}
446
// ObjectLink and Observed
447
@Observed
448
class ObservedExample {
449
    public c: number;
450
    constructor(c: number) {
451
        this.c = c;
452
    }
453
}
454
class ArkObjectLinkExampleComponent extends ArkStructBase<ArkObjectLinkExampleComponent> {
455
    private _entry_local_storage_ = new LocalStorage();
456
    __initializeStruct(/**/
457
    /** @memo */
458
    content?: () => void, initializers?: Partial<ArkObjectLinkExampleComponent>): void {
459
        this._a = objectLinkState<ObservedExample>();
460
    }
461
    _a!: SyncedProperty<ObservedExample>;
462
    get a(): ObservedExample {
463
        return this._a!.value;
464
    }
465
    set a(value: ObservedExample) {
466
        this._a!.value = observableProxy(value);
467
    }
468
    /** @memo */
469
    __updateStruct(initializers: Partial<ArkObjectLinkExampleComponent> | undefined): void {
470
        this._a.update(initializers?.a);
471
    }
472
    /** @memo */
473
    _build(/**/
474
    /** @memo */
475
    builder: ((instance: ArkObjectLinkExampleComponent) => void) | undefined) {
476
        ArkButton((instance: ArkButtonComponent) => {
477
            instance.onClick(() => {
478
                this.a.c += 1;
479
            });
480
        }, undefined);
481
    }
482
}
483
class ArkObjectLinkExampleParentComponent extends ArkStructBase<ArkObjectLinkExampleParentComponent> {
484
    private _entry_local_storage_ = new LocalStorage();
485
    __initializeStruct(/**/
486
    /** @memo */
487
    content?: () => void, initializers?: Partial<ArkObjectLinkExampleParentComponent>): void {
488
        this._a = stateOf<ObservedExample[]>(initializers?.a ?? ([new ObservedExample(0), new ObservedExample(0)]), this);
489
    }
490
    _a!: MutableState<ObservedExample[]>;
491
    get a(): ObservedExample[] {
492
        return this._a!.value;
493
    }
494
    set a(value: ObservedExample[]) {
495
        this._a!.value = observableProxy(value);
496
    }
497
    /** @memo */
498
    _build(/**/
499
    /** @memo */
500
    builder: ((instance: ArkObjectLinkExampleParentComponent) => void) | undefined) {
501
        ObjectLinkExample(undefined, undefined);
502
    }
503
}
504
class ArkPlainPropertyExampleComponent extends ArkStructBase<ArkPlainPropertyExampleComponent> {
505
    private _entry_local_storage_ = new LocalStorage();
506
    __initializeStruct(/**/
507
    /** @memo */
508
    content?: () => void, initializers?: Partial<ArkPlainPropertyExampleComponent>): void {
509
        this._field = initializers?.field ?? (17);
510
    }
511
    _field!: any;
512
    get field(): any {
513
        return this._field;
514
    }
515
    set field(value: any) {
516
        this._field = value;
517
    }
518
}
519
class ArkCallExampleComponent extends ArkStructBase<ArkCallExampleComponent> {
520
    private _entry_local_storage_ = new LocalStorage();
521
    __initializeStruct(/**/
522
    /** @memo */
523
    content?: () => void, initializers?: Partial<ArkCallExampleComponent>): void {
524
        this._state = stateOf<number>(initializers?.state ?? (17), this);
525
    }
526
    _state!: MutableState<number>;
527
    get state(): number {
528
        return this._state!.value;
529
    }
530
    set state(value: number) {
531
        this._state!.value = observableProxy(value);
532
    }
533
    /** @memo */
534
    _build(/**/
535
    /** @memo */
536
    builder: ((instance: ArkCallExampleComponent) => void) | undefined) {
537
        Child(undefined, undefined, { _counter: this._state });
538
    }
539
}
540
class ArkChildComponent extends ArkStructBase<ArkChildComponent> {
541
    private _entry_local_storage_ = new LocalStorage();
542
    __initializeStruct(/**/
543
    /** @memo */
544
    content?: () => void, initializers?: Partial<ArkChildComponent>): void {
545
        this._counter = initializers!._counter!;
546
    }
547
    _counter!: MutableState<number>;
548
    get counter(): number {
549
        return this._counter!.value;
550
    }
551
    set counter(value: number) {
552
        this._counter!.value = observableProxy(value);
553
    }
554
    /** @memo */
555
    _build(/**/
556
    /** @memo */
557
    builder: ((instance: ArkChildComponent) => void) | undefined) { }
558
}
559
/** @memo */
560
export function EntryExample(style?: any, /**/
561
/** @memo */
562
content?: () => void, initializers?: Partial<ArkEntryExampleComponent>): ArkEntryExampleComponent {
563
    return ArkEntryExampleComponent._instantiate(style, () => new ArkEntryExampleComponent, content, initializers);
564
}
565
/** @memo */
566
export function ComponentExample(style?: any, /**/
567
/** @memo */
568
content?: () => void, initializers?: Partial<ArkComponentExampleComponent>): ArkComponentExampleComponent {
569
    return ArkComponentExampleComponent._instantiate(style, () => new ArkComponentExampleComponent, content, initializers);
570
}
571
/** @memo */
572
export function BuildExample(style?: any, /**/
573
/** @memo */
574
content?: () => void, initializers?: Partial<ArkBuildExampleComponent>): ArkBuildExampleComponent {
575
    return ArkBuildExampleComponent._instantiate(style, () => new ArkBuildExampleComponent, content, initializers);
576
}
577
/** @memo */
578
export function StateExample(style?: any, /**/
579
/** @memo */
580
content?: () => void, initializers?: Partial<ArkStateExampleComponent>): ArkStateExampleComponent {
581
    return ArkStateExampleComponent._instantiate(style, () => new ArkStateExampleComponent, content, initializers);
582
}
583
/** @memo */
584
export function LinkExample(style?: any, /**/
585
/** @memo */
586
content?: () => void, initializers?: Partial<ArkLinkExampleComponent>): ArkLinkExampleComponent {
587
    return ArkLinkExampleComponent._instantiate(style, () => new ArkLinkExampleComponent, content, initializers);
588
}
589
/** @memo */
590
export function PropExample(style?: any, /**/
591
/** @memo */
592
content?: () => void, initializers?: Partial<ArkPropExampleComponent>): ArkPropExampleComponent {
593
    return ArkPropExampleComponent._instantiate(style, () => new ArkPropExampleComponent, content, initializers);
594
}
595
/** @memo */
596
export function PropInitializedExample(style?: any, /**/
597
/** @memo */
598
content?: () => void, initializers?: Partial<ArkPropInitializedExampleComponent>): ArkPropInitializedExampleComponent {
599
    return ArkPropInitializedExampleComponent._instantiate(style, () => new ArkPropInitializedExampleComponent, content, initializers);
600
}
601
/** @memo */
602
export function ProvideExample(style?: any, /**/
603
/** @memo */
604
content?: () => void, initializers?: Partial<ArkProvideExampleComponent>): ArkProvideExampleComponent {
605
    const __provide_name = contextLocalStateOf<string>("name", () => "text");
606
    return ArkProvideExampleComponent._instantiate(style, () => new ArkProvideExampleComponent, content, {
607
        _x: __provide_name,
608
        ...initializers
609
    });
610
}
611
/** @memo */
612
export function ConsumeExample(style?: any, /**/
613
/** @memo */
614
content?: () => void, initializers?: Partial<ArkConsumeExampleComponent>): ArkConsumeExampleComponent {
615
    const __consume_name = contextLocal<string>("name") as MutableState<string>;
616
    return ArkConsumeExampleComponent._instantiate(style, () => new ArkConsumeExampleComponent, content, {
617
        _x: __consume_name,
618
        ...initializers
619
    });
620
}
621
/** @memo */
622
export function BuilderExample(style?: any, /**/
623
/** @memo */
624
content?: () => void, initializers?: Partial<ArkBuilderExampleComponent>): ArkBuilderExampleComponent {
625
    return ArkBuilderExampleComponent._instantiate(style, () => new ArkBuilderExampleComponent, content, initializers);
626
}
627
/** @memo */
628
export function GlobalBuilderExample(style?: any, /**/
629
/** @memo */
630
content?: () => void, initializers?: Partial<ArkGlobalBuilderExampleComponent>): ArkGlobalBuilderExampleComponent {
631
    return ArkGlobalBuilderExampleComponent._instantiate(style, () => new ArkGlobalBuilderExampleComponent, content, initializers);
632
}
633
/** @memo */
634
export function BuilderParamExample(style?: any, /**/
635
/** @memo */
636
content?: () => void, initializers?: Partial<ArkBuilderParamExampleComponent>): ArkBuilderParamExampleComponent {
637
    return ArkBuilderParamExampleComponent._instantiate(style, () => new ArkBuilderParamExampleComponent, content, initializers);
638
}
639
/** @memo */
640
export function StylesExample(style?: any, /**/
641
/** @memo */
642
content?: () => void, initializers?: Partial<ArkStylesExampleComponent>): ArkStylesExampleComponent {
643
    return ArkStylesExampleComponent._instantiate(style, () => new ArkStylesExampleComponent, content, initializers);
644
}
645
/** @memo */
646
export function StylesMethodExample(style?: any, /**/
647
/** @memo */
648
content?: () => void, initializers?: Partial<ArkStylesMethodExampleComponent>): ArkStylesMethodExampleComponent {
649
    return ArkStylesMethodExampleComponent._instantiate(style, () => new ArkStylesMethodExampleComponent, content, initializers);
650
}
651
/** @memo */
652
export function ExtendExample(style?: any, /**/
653
/** @memo */
654
content?: () => void, initializers?: Partial<ArkExtendExampleComponent>): ArkExtendExampleComponent {
655
    return ArkExtendExampleComponent._instantiate(style, () => new ArkExtendExampleComponent, content, initializers);
656
}
657
/** @memo */
658
export function AnimatableExtendExample(style?: any, /**/
659
/** @memo */
660
content?: () => void, initializers?: Partial<ArkAnimatableExtendExampleComponent>): ArkAnimatableExtendExampleComponent {
661
    return ArkAnimatableExtendExampleComponent._instantiate(style, () => new ArkAnimatableExtendExampleComponent, content, initializers);
662
}
663
/** @memo */
664
export function WatchExample(style?: any, /**/
665
/** @memo */
666
content?: () => void, initializers?: Partial<ArkWatchExampleComponent>): ArkWatchExampleComponent {
667
    return ArkWatchExampleComponent._instantiate(style, () => new ArkWatchExampleComponent, content, initializers);
668
}
669
/** @memo */
670
export function StorageLinkExample(style?: any, /**/
671
/** @memo */
672
content?: () => void, initializers?: Partial<ArkStorageLinkExampleComponent>): ArkStorageLinkExampleComponent {
673
    return ArkStorageLinkExampleComponent._instantiate(style, () => new ArkStorageLinkExampleComponent, content, initializers);
674
}
675
/** @memo */
676
export function StoragePropExample(style?: any, /**/
677
/** @memo */
678
content?: () => void, initializers?: Partial<ArkStoragePropExampleComponent>): ArkStoragePropExampleComponent {
679
    return ArkStoragePropExampleComponent._instantiate(style, () => new ArkStoragePropExampleComponent, content, initializers);
680
}
681
/** @memo */
682
export function CustomDialogExampleImpl(initializers?: Partial<ArkCustomDialogExampleComponent>): ArkCustomDialogExampleComponent {
683
    return ArkCustomDialogExampleComponent._instantiate(undefined, () => new ArkCustomDialogExampleComponent, undefined, initializers);
684
}
685
export function CustomDialogExample(initializer: any = {}) {
686
    return { build: bindCustomDialog(CustomDialogExampleImpl, initializer), buildOptions: initializer };
687
}
688
/** @memo */
689
export function CustomDialogControllerExample(style?: any, /**/
690
/** @memo */
691
content?: () => void, initializers?: Partial<ArkCustomDialogControllerExampleComponent>): ArkCustomDialogControllerExampleComponent {
692
    return ArkCustomDialogControllerExampleComponent._instantiate(style, () => new ArkCustomDialogControllerExampleComponent, content, initializers);
693
}
694
/** @memo */
695
export function ObjectLinkExample(style?: any, /**/
696
/** @memo */
697
content?: () => void, initializers?: Partial<ArkObjectLinkExampleComponent>): ArkObjectLinkExampleComponent {
698
    return ArkObjectLinkExampleComponent._instantiate(style, () => new ArkObjectLinkExampleComponent, content, initializers);
699
}
700
/** @memo */
701
export function ObjectLinkExampleParent(style?: any, /**/
702
/** @memo */
703
content?: () => void, initializers?: Partial<ArkObjectLinkExampleParentComponent>): ArkObjectLinkExampleParentComponent {
704
    return ArkObjectLinkExampleParentComponent._instantiate(style, () => new ArkObjectLinkExampleParentComponent, content, initializers);
705
}
706
/** @memo */
707
export function PlainPropertyExample(style?: any, /**/
708
/** @memo */
709
content?: () => void, initializers?: Partial<ArkPlainPropertyExampleComponent>): ArkPlainPropertyExampleComponent {
710
    return ArkPlainPropertyExampleComponent._instantiate(style, () => new ArkPlainPropertyExampleComponent, content, initializers);
711
}
712
/** @memo */
713
export function CallExample(style?: any, /**/
714
/** @memo */
715
content?: () => void, initializers?: Partial<ArkCallExampleComponent>): ArkCallExampleComponent {
716
    return ArkCallExampleComponent._instantiate(style, () => new ArkCallExampleComponent, content, initializers);
717
}
718
/** @memo */
719
export function Child(style?: any, /**/
720
/** @memo */
721
content?: () => void, initializers?: Partial<ArkChildComponent>): ArkChildComponent {
722
    return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, initializers);
723
}
724
registerArkuiEntry(EntryExample, "Rewrite");
725
export const __Entry = EntryExample;
726

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.