glass-easel-miniprogram-adapter 0.2.0 → 0.3.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.
Files changed (62) hide show
  1. package/.eslintignore +4 -0
  2. package/dist/glass_easel_miniprogram_adapter.d.ts +872 -1
  3. package/dist/glass_easel_miniprogram_adapter.es.js +2 -0
  4. package/dist/glass_easel_miniprogram_adapter.es.js.map +1 -0
  5. package/dist/glass_easel_miniprogram_adapter.js +2 -2
  6. package/dist/glass_easel_miniprogram_adapter.js.map +1 -1
  7. package/jest.config.js +7 -4
  8. package/package.json +8 -6
  9. package/rollup.config.ts +83 -0
  10. package/src/backend.ts +7 -3
  11. package/src/behavior.ts +8 -2
  12. package/src/builder/base_behavior_builder.ts +437 -0
  13. package/src/builder/behavior_builder.ts +265 -0
  14. package/src/builder/component_builder.ts +337 -0
  15. package/src/builder/index.ts +2 -0
  16. package/src/builder/type_utils.ts +98 -0
  17. package/src/component.ts +10 -7
  18. package/src/env.ts +73 -0
  19. package/src/index.ts +3 -77
  20. package/src/intersection.ts +2 -2
  21. package/src/media_query.ts +4 -6
  22. package/src/selector_query.ts +3 -3
  23. package/src/space.ts +11 -1030
  24. package/src/types.ts +7 -5
  25. package/tests/base/env.ts +1 -1
  26. package/tests/env.test.ts +3 -3
  27. package/tests/selector.test.ts +137 -14
  28. package/tests/space.test.ts +8 -14
  29. package/tsconfig.json +1 -3
  30. package/dist/types/src/backend.d.ts +0 -59
  31. package/dist/types/src/backend.d.ts.map +0 -1
  32. package/dist/types/src/behavior.d.ts +0 -35
  33. package/dist/types/src/behavior.d.ts.map +0 -1
  34. package/dist/types/src/component.d.ts +0 -170
  35. package/dist/types/src/component.d.ts.map +0 -1
  36. package/dist/types/src/index.d.ts +0 -58
  37. package/dist/types/src/index.d.ts.map +0 -1
  38. package/dist/types/src/intersection.d.ts +0 -24
  39. package/dist/types/src/intersection.d.ts.map +0 -1
  40. package/dist/types/src/media_query.d.ts +0 -13
  41. package/dist/types/src/media_query.d.ts.map +0 -1
  42. package/dist/types/src/selector_query.d.ts +0 -98
  43. package/dist/types/src/selector_query.d.ts.map +0 -1
  44. package/dist/types/src/space.d.ts +0 -369
  45. package/dist/types/src/space.d.ts.map +0 -1
  46. package/dist/types/src/types.d.ts +0 -77
  47. package/dist/types/src/types.d.ts.map +0 -1
  48. package/dist/types/src/utils.d.ts +0 -2
  49. package/dist/types/src/utils.d.ts.map +0 -1
  50. package/dist/types/tests/base/env.d.ts +0 -3
  51. package/dist/types/tests/base/env.d.ts.map +0 -1
  52. package/dist/types/tests/data_update.test.d.ts +0 -2
  53. package/dist/types/tests/data_update.test.d.ts.map +0 -1
  54. package/dist/types/tests/env.test.d.ts +0 -2
  55. package/dist/types/tests/env.test.d.ts.map +0 -1
  56. package/dist/types/tests/selector.test.d.ts +0 -2
  57. package/dist/types/tests/selector.test.d.ts.map +0 -1
  58. package/dist/types/tests/space.test.d.ts +0 -2
  59. package/dist/types/tests/space.test.d.ts.map +0 -1
  60. package/dist/types/tests/trait_behavior.test.d.ts +0 -2
  61. package/dist/types/tests/trait_behavior.test.d.ts.map +0 -1
  62. package/webpack.config.js +0 -79
package/src/types.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { DeepCopyKind, typeUtils as utils } from 'glass-easel'
2
- import type { DefinitionFilter, GeneralBehavior, Behavior } from './behavior'
1
+ import { type DeepCopyKind, type typeUtils as utils } from 'glass-easel'
2
+ import type { Behavior, DefinitionFilter, GeneralBehavior } from './behavior'
3
+ import { type GeneralComponent } from './component'
3
4
 
4
5
  export { typeUtils as utils } from 'glass-easel'
5
6
 
@@ -40,8 +41,9 @@ export type BehaviorDefinition<
40
41
  TData extends utils.DataList,
41
42
  TProperty extends utils.PropertyList,
42
43
  TMethod extends utils.MethodList,
44
+ TComponentExport,
43
45
  > = {
44
- behaviors?: Behavior<any, any, any, any>[]
46
+ behaviors?: Behavior<any, any, any, any, any>[]
45
47
  properties?: TProperty
46
48
  data?: TData | (() => TData)
47
49
  observers?:
@@ -61,6 +63,7 @@ export type BehaviorDefinition<
61
63
  relations?: utils.RelationParamsWithKey
62
64
  externalClasses?: string[]
63
65
  definitionFilter?: DefinitionFilter
66
+ export?: (source: GeneralComponent | null) => TComponentExport
64
67
  }
65
68
 
66
69
  export type ComponentDefinition<
@@ -70,8 +73,7 @@ export type ComponentDefinition<
70
73
  TComponentExport,
71
74
  > = {
72
75
  options?: ComponentDefinitionOptions
73
- export?: () => TComponentExport
74
- } & BehaviorDefinition<TData, TProperty, TMethod>
76
+ } & BehaviorDefinition<TData, TProperty, TMethod, TComponentExport>
75
77
 
76
78
  export type GeneralComponentDefinition = ComponentDefinition<any, any, any, any>
77
79
 
package/tests/base/env.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-new-func */
2
2
  /* eslint-disable @typescript-eslint/no-implied-eval */
3
3
 
4
- import * as glassEasel from 'glass-easel'
4
+ import type * as glassEasel from 'glass-easel'
5
5
  import { TmplGroup } from 'glass-easel-template-compiler'
6
6
 
7
7
  export const tmpl = (src: string): glassEasel.template.ComponentTemplate => {
package/tests/env.test.ts CHANGED
@@ -45,7 +45,7 @@ describe('env', () => {
45
45
  Component().register()
46
46
  })
47
47
 
48
- const backend = new glassEasel.domlikeBackend.CurrentWindowBackendContext()
48
+ const backend = new glassEasel.CurrentWindowBackendContext()
49
49
  const ab = env.associateBackend(backend)
50
50
  const root = ab.createRoot('body', codeSpace, 'path/to/comp')
51
51
  expect(domHtml(root.getComponent())).toBe(
@@ -71,7 +71,7 @@ describe('env', () => {
71
71
  Component().behavior(beh).register()
72
72
  })
73
73
 
74
- const backend = new glassEasel.domlikeBackend.CurrentWindowBackendContext()
74
+ const backend = new glassEasel.CurrentWindowBackendContext()
75
75
  const ab = env.associateBackend(backend)
76
76
  const root = ab.createRoot('body', codeSpace, 'path/to/comp')
77
77
  expect(domHtml(root.getComponent())).toBe('<div>123</div>')
@@ -131,7 +131,7 @@ describe('env', () => {
131
131
  Component().register()
132
132
  })
133
133
 
134
- const backend = new glassEasel.domlikeBackend.CurrentWindowBackendContext()
134
+ const backend = new glassEasel.CurrentWindowBackendContext()
135
135
  const ab = env.associateBackend(backend)
136
136
  const root = ab.createRoot('body', codeSpace, 'path/to/comp')
137
137
  expect(domHtml(root.getComponent())).toBe(
@@ -79,48 +79,171 @@ describe('selector query', () => {
79
79
  const env = new MiniProgramEnv()
80
80
  const codeSpace = env.createCodeSpace('', true)
81
81
 
82
- codeSpace.addComponentStaticConfig('child/comp', {
83
- component: true,
82
+ codeSpace.addComponentStaticConfig('child1/comp', { component: true })
83
+ codeSpace.addComponentStaticConfig('child2/comp', { component: true })
84
+ codeSpace.addCompiledTemplate('child1/comp', tmpl('{{a}}'))
85
+ codeSpace.addCompiledTemplate('child2/comp', tmpl('{{a}}'))
86
+
87
+ const child1Def = codeSpace.componentEnv('child1/comp', ({ Component }) =>
88
+ Component()
89
+ .data(() => ({
90
+ a: 123,
91
+ }))
92
+ .export(function () {
93
+ return {
94
+ id: 1,
95
+ set: (d: { a: number }) => {
96
+ this.setData(d)
97
+ },
98
+ }
99
+ })
100
+ .register(),
101
+ )
102
+
103
+ const child2Def = codeSpace.componentEnv('child2/comp', ({ Component }) =>
104
+ Component()
105
+ .definition({
106
+ data: () => ({
107
+ a: 123,
108
+ }),
109
+ export() {
110
+ return {
111
+ id: 2,
112
+ set: (d: { a: number }) => {
113
+ this.setData(d)
114
+ },
115
+ }
116
+ },
117
+ })
118
+ .register(),
119
+ )
120
+
121
+ codeSpace.addComponentStaticConfig('path/to/comp', {
122
+ usingComponents: {
123
+ child1: '/child1/comp',
124
+ child2: '/child2/comp',
125
+ },
84
126
  })
85
- codeSpace.addCompiledTemplate('child/comp', tmpl('{{a}}'))
127
+ codeSpace.addCompiledTemplate(
128
+ 'path/to/comp',
129
+ tmpl(`
130
+ <div id="d">
131
+ <child1 id="c1" />
132
+ <child2 id="c2" />
133
+ </div>
134
+ `),
135
+ )
136
+ codeSpace.componentEnv('path/to/comp', ({ Component }) => {
137
+ const selfDef = Component()
138
+ .lifetime('attached', function () {
139
+ expect(this.selectComponent('#d')).toBe(null)
140
+ expect(this.selectComponent('#c1', child2Def)).toBe(null)
141
+ expect(this.selectComponent('#c1', selfDef)).toBe(null)
142
+ expect(this.selectComponent('#c2', child1Def)).toBe(null)
143
+ expect(this.selectComponent('#c2', selfDef)).toBe(null)
144
+
145
+ const c1any = this.selectComponent('#c1') as { id: number }
146
+ const c1 = this.selectComponent('#c1', child1Def)!
147
+ const c2any = this.selectComponent('#c2') as { id: number }
148
+ const c2 = this.selectComponent('#c2', child2Def)!
149
+
150
+ expect(c1any.id).toBe(c1.id)
151
+ expect(c2any.id).toBe(c2.id)
152
+
153
+ c1.set({ a: 456 })
154
+ c2.set({ a: 789 })
155
+ })
156
+ .register()
157
+ })
158
+
159
+ const ab = env.associateBackend()
160
+ const root = ab.createRoot('body', codeSpace, 'path/to/comp')
161
+ glassEasel.Element.pretendAttached(root.getComponent())
162
+ expect(domHtml(root.getComponent())).toBe('<div><child1>456</child1><child2>789</child2></div>')
163
+ })
164
+
165
+ test('select single component (with custom export on behavior)', () => {
166
+ const env = new MiniProgramEnv()
167
+ const codeSpace = env.createCodeSpace('', true)
168
+
169
+ codeSpace.addComponentStaticConfig('child1/comp', { component: true })
170
+ codeSpace.addComponentStaticConfig('child2/comp', { component: true })
171
+ codeSpace.addCompiledTemplate('child1/comp', tmpl('{{a}}'))
172
+ codeSpace.addCompiledTemplate('child2/comp', tmpl('{{a}}'))
173
+
86
174
  // eslint-disable-next-line arrow-body-style
87
- const childDef = codeSpace.componentEnv('child/comp', ({ Component }) => {
88
- return Component()
175
+ const child1Def = codeSpace.componentEnv('child1/comp', ({ Behavior, Component }) => {
176
+ const beh = Behavior()
89
177
  .data(() => ({
90
178
  a: 123,
91
179
  }))
92
180
  .export(function () {
93
181
  return {
182
+ id: 1,
94
183
  set: (d: { a: number }) => {
95
184
  this.setData(d)
96
185
  },
97
186
  }
98
187
  })
99
188
  .register()
189
+
190
+ return Component().behavior(beh).register()
191
+ })
192
+
193
+ const child2Def = codeSpace.componentEnv('child2/comp', ({ Behavior, Component }) => {
194
+ const beh = Behavior()
195
+ .definition({
196
+ data: () => ({
197
+ a: 123,
198
+ }),
199
+ export() {
200
+ return {
201
+ id: 2,
202
+ set: (d: { a: number }) => {
203
+ this.setData(d)
204
+ },
205
+ }
206
+ },
207
+ })
208
+ .register()
209
+
210
+ return Component().behavior(beh).register()
100
211
  })
101
212
 
102
213
  codeSpace.addComponentStaticConfig('path/to/comp', {
103
214
  usingComponents: {
104
- child: '/child/comp',
215
+ child1: '/child1/comp',
216
+ child2: '/child2/comp',
105
217
  },
106
218
  })
107
219
  codeSpace.addCompiledTemplate(
108
220
  'path/to/comp',
109
221
  tmpl(`
110
222
  <div id="d">
111
- <child id="c1" />
112
- <child id="c2" />
223
+ <child1 id="c1" />
224
+ <child2 id="c2" />
113
225
  </div>
114
226
  `),
115
227
  )
116
228
  codeSpace.componentEnv('path/to/comp', ({ Component }) => {
117
229
  const selfDef = Component()
118
230
  .lifetime('attached', function () {
119
- // eslint-disable-next-line
120
- this.selectComponent('#c1').set({ a: 456 })
121
- this.selectComponent('#c2', childDef)!.set({ a: 789 })
122
- expect(this.selectComponent('#c2', selfDef)).toBe(null)
123
231
  expect(this.selectComponent('#d')).toBe(null)
232
+ expect(this.selectComponent('#c1', child2Def)).toBe(null)
233
+ expect(this.selectComponent('#c1', selfDef)).toBe(null)
234
+ expect(this.selectComponent('#c2', child1Def)).toBe(null)
235
+ expect(this.selectComponent('#c2', selfDef)).toBe(null)
236
+
237
+ const c1any = this.selectComponent('#c1') as { id: number }
238
+ const c1 = this.selectComponent('#c1', child1Def)!
239
+ const c2any = this.selectComponent('#c2') as { id: number }
240
+ const c2 = this.selectComponent('#c2', child2Def)!
241
+
242
+ expect(c1any.id).toBe(c1.id)
243
+ expect(c2any.id).toBe(c2.id)
244
+
245
+ c1.set({ a: 456 })
246
+ c2.set({ a: 789 })
124
247
  })
125
248
  .register()
126
249
  })
@@ -128,7 +251,7 @@ describe('selector query', () => {
128
251
  const ab = env.associateBackend()
129
252
  const root = ab.createRoot('body', codeSpace, 'path/to/comp')
130
253
  glassEasel.Element.pretendAttached(root.getComponent())
131
- expect(domHtml(root.getComponent())).toBe('<div><child>456</child><child>789</child></div>')
254
+ expect(domHtml(root.getComponent())).toBe('<div><child1>456</child1><child2>789</child2></div>')
132
255
  })
133
256
 
134
257
  test('select all components', () => {
@@ -471,7 +594,7 @@ describe('intersection observer', () => {
471
594
  .register()
472
595
  })
473
596
 
474
- const backendContext = new glassEasel.composedBackend.EmptyComposedBackendContext()
597
+ const backendContext = new glassEasel.EmptyComposedBackendContext()
475
598
  const ab = env.associateBackend(backendContext)
476
599
  const root = ab.createRoot('body', codeSpace, 'path/to/comp')
477
600
  glassEasel.Element.pretendAttached(root.getComponent())
@@ -1,12 +1,6 @@
1
1
  import * as glassEasel from 'glass-easel'
2
+ import { type BehaviorConstructor, type ComponentConstructor, MiniProgramEnv, types } from '../src'
2
3
  import { tmpl } from './base/env'
3
- import {
4
- MiniProgramEnv,
5
- StyleIsolation,
6
- BehaviorConstructor,
7
- ComponentConstructor,
8
- types,
9
- } from '../src'
10
4
 
11
5
  const domHtml = (elem: glassEasel.Element): string => {
12
6
  const domElem = elem.getBackendElement() as unknown as Element
@@ -430,7 +424,7 @@ describe('define', () => {
430
424
  codeSpace.addStyleSheet('child/comp', 'empty-style-sheet', 'child-comp')
431
425
  codeSpace.addComponentStaticConfig('child/comp', {
432
426
  component: true,
433
- styleIsolation: StyleIsolation.Shared,
427
+ styleIsolation: types.StyleIsolation.Shared,
434
428
  })
435
429
  codeSpace.addCompiledTemplate(
436
430
  'child/comp',
@@ -451,7 +445,7 @@ describe('define', () => {
451
445
  usingComponents: {
452
446
  child: '/child/comp',
453
447
  },
454
- styleIsolation: StyleIsolation.PageShared,
448
+ styleIsolation: types.StyleIsolation.PageShared,
455
449
  })
456
450
  codeSpace.addCompiledTemplate(
457
451
  'path/to/comp',
@@ -478,7 +472,7 @@ describe('define', () => {
478
472
  codeSpace.addStyleSheet('child/comp', 'empty-style-sheet', 'child-comp')
479
473
  codeSpace.addComponentStaticConfig('child/comp', {
480
474
  component: true,
481
- styleIsolation: StyleIsolation.ApplyShared,
475
+ styleIsolation: types.StyleIsolation.ApplyShared,
482
476
  })
483
477
  codeSpace.addCompiledTemplate(
484
478
  'child/comp',
@@ -499,7 +493,7 @@ describe('define', () => {
499
493
  usingComponents: {
500
494
  child: '/child/comp',
501
495
  },
502
- styleIsolation: StyleIsolation.PageApplyShared,
496
+ styleIsolation: types.StyleIsolation.PageApplyShared,
503
497
  })
504
498
  codeSpace.addCompiledTemplate(
505
499
  'path/to/comp',
@@ -528,7 +522,7 @@ describe('define', () => {
528
522
  codeSpace.addStyleSheet('child/comp', 'empty-style-sheet', 'child-comp')
529
523
  codeSpace.addComponentStaticConfig('child/comp', {
530
524
  component: true,
531
- styleIsolation: StyleIsolation.Isolated,
525
+ styleIsolation: types.StyleIsolation.Isolated,
532
526
  })
533
527
  codeSpace.addCompiledTemplate(
534
528
  'child/comp',
@@ -549,7 +543,7 @@ describe('define', () => {
549
543
  usingComponents: {
550
544
  child: '/child/comp',
551
545
  },
552
- styleIsolation: StyleIsolation.PageIsolated,
546
+ styleIsolation: types.StyleIsolation.PageIsolated,
553
547
  })
554
548
  codeSpace.addCompiledTemplate(
555
549
  'path/to/comp',
@@ -627,7 +621,7 @@ describe('define', () => {
627
621
  usingComponents: {
628
622
  child: '/child/comp',
629
623
  },
630
- styleIsolation: StyleIsolation.PageIsolated,
624
+ styleIsolation: types.StyleIsolation.PageIsolated,
631
625
  })
632
626
  codeSpace.addCompiledTemplate(
633
627
  'path/to/comp',
package/tsconfig.json CHANGED
@@ -1,9 +1,7 @@
1
1
  {
2
2
  "extends": "../tsconfig.json",
3
- "compilerOptions": {
4
- "declarationDir": "dist/types"
5
- },
6
3
  "include": [
4
+ "*.ts",
7
5
  "src/**/*.ts",
8
6
  "tests/**/*.ts",
9
7
  "examples/**/*.ts"
@@ -1,59 +0,0 @@
1
- import * as glassEasel from 'glass-easel';
2
- import { MiniProgramEnv } from '.';
3
- import { CodeSpace } from './space';
4
- /**
5
- * A backend context that has been associated to an environment
6
- */
7
- export declare class AssociatedBackend {
8
- private _$env;
9
- /** @internal */
10
- _$: glassEasel.GeneralBackendContext;
11
- /** @internal */
12
- constructor(env: MiniProgramEnv, backendContext: glassEasel.GeneralBackendContext);
13
- /**
14
- * Register a style sheet resource
15
- *
16
- * Some backend cannot load style sheet URL.
17
- * In this cases, the content should be registered here.
18
- */
19
- registerStyleSheetContent(url: string, content: any): void;
20
- /**
21
- * Create a root component in specified backend
22
- *
23
- * The component is searched in the `codeSpace` with `url` .
24
- * If `url` contains "?" params, it will be parsed and try to set to component properties.
25
- */
26
- createRoot(tagName: string, codeSpace: CodeSpace, url: string, genericTargets?: {
27
- [key: string]: string;
28
- }): Root;
29
- }
30
- /**
31
- * A root component
32
- */
33
- export declare class Root {
34
- private _$comp;
35
- /** @internal */
36
- constructor(backendContext: glassEasel.GeneralBackendContext, tagName: string, codeSpace: CodeSpace, url: string, genericTargets?: {
37
- [key: string]: string;
38
- });
39
- /**
40
- * Get the underlying component
41
- */
42
- getComponent(): glassEasel.GeneralComponent;
43
- /**
44
- * Attach the root component to the backend
45
- *
46
- * This component, the `parent` and the `placeholder` MUST be in the same context.
47
- * The `parent` MUST be a parent node of the `placeholder` .
48
- * This also triggers `attached` lifetimes for components.
49
- */
50
- attach(parent: glassEasel.GeneralBackendElement, placeholder: glassEasel.GeneralBackendElement): void;
51
- /**
52
- * Release the root component
53
- *
54
- * Some backends require this explicit call to avoid memory leaks.
55
- * This also triggers `detached` lifetimes for components.
56
- */
57
- release(): void;
58
- }
59
- //# sourceMappingURL=backend.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,cAAc,EAAkB,MAAM,GAAG,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,KAAK,CAAgB;IAC7B,gBAAgB;IAChB,EAAE,EAAE,UAAU,CAAC,qBAAqB,CAAA;IAEpC,gBAAgB;gBACJ,GAAG,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,CAAC,qBAAqB;IAKjF;;;;;OAKG;IACH,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG;IAInD;;;;;OAKG;IACH,UAAU,CACR,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GACzC,IAAI;CAKR;AAED;;GAEG;AACH,qBAAa,IAAI;IACf,OAAO,CAAC,MAAM,CAA6B;IAE3C,gBAAgB;gBAEd,cAAc,EAAE,UAAU,CAAC,qBAAqB,EAChD,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IA6B5C;;OAEG;IACH,YAAY,IAAI,UAAU,CAAC,gBAAgB;IAI3C;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,qBAAqB,EAAE,WAAW,EAAE,UAAU,CAAC,qBAAqB;IAI9F;;;;;OAKG;IACH,OAAO;CAIR"}
@@ -1,35 +0,0 @@
1
- import * as glassEasel from 'glass-easel';
2
- import { GeneralComponentDefinition, utils as typeUtils } from './types';
3
- type DataList = typeUtils.DataList;
4
- type PropertyList = typeUtils.PropertyList;
5
- type MethodList = typeUtils.MethodList;
6
- type ChainingFilterType = typeUtils.ChainingFilterType;
7
- export type DefinitionFilter = (target: GeneralComponentDefinition, childFilters: (((target: GeneralComponentDefinition) => void) | null)[]) => void;
8
- export type GeneralBehavior = Behavior<Record<string, any>, Record<string, any>, Record<string, any>, any>;
9
- export declare class Behavior<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TChainingFilter extends ChainingFilterType> {
10
- /** @internal */
11
- _$: glassEasel.GeneralBehavior;
12
- /** @internal */
13
- _$bindedDefinitionFilter?: (target: GeneralComponentDefinition) => void;
14
- /** @internal */
15
- constructor(inner: glassEasel.Behavior<TData, TProperty, TMethod, TChainingFilter>, parents: GeneralBehavior[], definitionFilter: DefinitionFilter | undefined);
16
- }
17
- export declare class ComponentType<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TComponentExport> {
18
- /** @internal */
19
- _$: glassEasel.ComponentDefinition<TData, TProperty, TMethod>;
20
- /** @internal */
21
- constructor(inner: glassEasel.ComponentDefinition<TData, TProperty, TMethod>);
22
- }
23
- export declare class TraitBehavior<TIn extends {
24
- [key: string]: any;
25
- }, TOut extends {
26
- [key: string]: any;
27
- } = TIn> {
28
- /** @internal */
29
- _$: glassEasel.TraitBehavior<TIn, TOut>;
30
- /** @internal */
31
- constructor(inner: glassEasel.TraitBehavior<TIn>);
32
- constructor(inner: glassEasel.TraitBehavior<TIn, TOut>);
33
- }
34
- export {};
35
- //# sourceMappingURL=behavior.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"behavior.d.ts","sourceRoot":"","sources":["../../../src/behavior.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,0BAA0B,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA;AAExE,KAAK,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAA;AAClC,KAAK,YAAY,GAAG,SAAS,CAAC,YAAY,CAAA;AAC1C,KAAK,UAAU,GAAG,SAAS,CAAC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AS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAClC,IAAI,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,GAAG;IAEzC,gBAAgB;IAChB,EAAE,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAEvC,gBAAgB;gBACJ,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC;gBACpC,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC;CAIvD"}
@@ -1,170 +0,0 @@
1
- import * as glassEasel from 'glass-easel';
2
- import { utils as typeUtils } from './types';
3
- import { ComponentType, GeneralBehavior, TraitBehavior } from './behavior';
4
- import { SelectorQuery } from './selector_query';
5
- import { IntersectionObserver } from './intersection';
6
- import { MediaQueryObserver } from './media_query';
7
- type DataList = typeUtils.DataList;
8
- type PropertyList = typeUtils.PropertyList;
9
- type MethodList = typeUtils.MethodList;
10
- export type AllData<TData extends DataList, TProperty extends PropertyList> = typeUtils.DataWithPropertyValues<TData, TProperty>;
11
- type ExportType<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport> = UComponentExport extends undefined ? Component<UData, UProperty, UMethod, UComponentExport> : UComponentExport;
12
- export type GeneralComponent = Component<any, any, any, any>;
13
- export type Component<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TComponentExport> = ComponentCaller<TData, TProperty, TMethod, TComponentExport> & {
14
- [k in keyof TMethod]: TMethod[k];
15
- };
16
- export declare class ComponentCaller<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TComponentExport> {
17
- /** The corresponding `Component` */
18
- _$: glassEasel.Component<TData, TProperty, TMethod>;
19
- /** @internal */
20
- _$export?: (source: GeneralComponent | null) => TComponentExport;
21
- /** The component path in the code space */
22
- get is(): string;
23
- set is(value: string);
24
- /** The `id` field in the template */
25
- get id(): string;
26
- set id(value: string);
27
- /** The `data-*` field in the template */
28
- get dataset(): {
29
- [key: string]: any;
30
- } | null;
31
- set dataset(value: {
32
- [key: string]: any;
33
- } | null);
34
- /** The component data and property values */
35
- get data(): AllData<TData, TProperty>;
36
- set data(value: AllData<TData, TProperty>);
37
- /** The component data and property values (same as `data` ) */
38
- get properties(): AllData<TData, TProperty>;
39
- set properties(value: AllData<TData, TProperty>);
40
- /**
41
- * Group several data update calls
42
- *
43
- * This method is designed for hinting the backend that some updates should be handled together.
44
- * However, this is done automatically now,
45
- * so this method is just for backward compatibilities.
46
- */
47
- groupSetData(callback: () => void): void;
48
- /**
49
- * Do a classic data update
50
- *
51
- * The `callback` is called after the update applies in the backend.
52
- * In most cases, you SHOULD NOT wait the backend update (that might be very slow),
53
- * and most calls, including read calls such as `selectComponent` , simply works immediately.
54
- * However, when called inside observers,
55
- * the data update will not be applied to templates immediately
56
- * (it is recommanded to use `updateData` instead in observers).
57
- */
58
- setData(newData: Partial<typeUtils.SetDataSetter<typeUtils.DataWithPropertyValues<TData, TProperty>>>, callback?: () => void): void;
59
- /**
60
- * Schedule a classic data updates
61
- *
62
- * The data update will not be applied until next `setData` or `applyDataUpdates` call.
63
- * When called inside observers, the data update will be applied when observer ends.
64
- * All data observers will not be triggered immediately before applied.
65
- * Reads of the data will get the unchanged value before applied.
66
- */
67
- updateData(newData: Partial<typeUtils.SetDataSetter<typeUtils.DataWithPropertyValues<TData, TProperty>>>): void;
68
- /**
69
- * Schedule a data update on a single specified path
70
- *
71
- * The data update will not be applied until next `setData` or `applyDataUpdates` call.
72
- * All data observers will not be triggered immediately before applied.
73
- * Reads of the data will get the unchanged value before applied.
74
- */
75
- replaceDataOnPath<T extends (string | number)[]>(path: readonly [...T], data: typeUtils.GetFromDataPath<typeUtils.DataWithPropertyValues<TData, TProperty>, T>): void;
76
- /**
77
- * Schedule an array update
78
- *
79
- * The behavior is like `Array.prototype.slice` .
80
- * Break the array before the `index`-th item, delete `del` items, and insert some items here.
81
- * If `index` is undefined, negative, or larger than the length of the array,
82
- * no items will be deleted and new items will be appended to the end of the array.
83
- * The data update will not be applied until next `setData` or `applyDataUpdates` call.
84
- * All data observers will not be triggered immediately before applied.
85
- * Reads of the data will get the unchanged value before applied.
86
- */
87
- spliceArrayDataOnPath<T extends (string | number)[]>(path: readonly [...T], index: typeUtils.GetFromDataPath<typeUtils.DataWithPropertyValues<TData, TProperty>, T> extends any[] ? number | undefined : never, del: typeUtils.GetFromDataPath<typeUtils.DataWithPropertyValues<TData, TProperty>, T> extends any[] ? number | undefined : never, inserts: typeUtils.GetFromDataPath<typeUtils.DataWithPropertyValues<TData, TProperty>, T> extends (infer I)[] ? I[] : never): void;
88
- /**
89
- * Apply all scheduled updates immediately
90
- *
91
- * Inside observers, it is generally not .
92
- */
93
- applyDataUpdates(): void;
94
- /**
95
- * Pending all data updates in the callback, and apply updates after callback returns
96
- *
97
- * This function helps grouping several `replaceDataOnPath` or `spliceArrayDataOnPath` calls,
98
- * and then apply them at the end of the callback.
99
- * `setData` and `applyDataUpdates` calls inside the callback still apply updates immediately.
100
- */
101
- groupUpdates<T>(callback: () => T): T;
102
- /**
103
- * Check whether the `other` behavior is a dependent behavior or a implemented trait behavior
104
- */
105
- hasBehavior(behavior: GeneralBehavior | TraitBehavior<any, any>): boolean;
106
- /**
107
- * Get the trait behavior implementation of the component
108
- *
109
- * Returns `undefined` if the specified trait behavior is not implemented.
110
- */
111
- traitBehavior<TOut extends {
112
- [key: string]: any;
113
- }>(traitBehavior: TraitBehavior<any, TOut>): TOut | undefined;
114
- /** Trigger an event */
115
- triggerEvent(name: string, detail: any, options: {
116
- bubbles?: boolean;
117
- composed?: boolean;
118
- capturePhase?: boolean;
119
- }): void;
120
- /** Create a selector query for searching element inside the component */
121
- createSelectorQuery(): SelectorQuery;
122
- /** Create an intersection observer */
123
- createIntersectionObserver(options?: {
124
- thresholds?: number[];
125
- initialRatio?: number;
126
- observeAll?: boolean;
127
- }): IntersectionObserver;
128
- /** Create an media query observer */
129
- createMediaQueryObserver(): MediaQueryObserver;
130
- /**
131
- * Query an element inside the component
132
- *
133
- * If `componentType` is provided, this method will check the selected component type.
134
- * If the component type does not match, `null` is returned.
135
- */
136
- selectComponent(selector: string): any;
137
- selectComponent<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport>(selector: string, componentType: ComponentType<UData, UProperty, UMethod, UComponentExport>): ExportType<UData, UProperty, UMethod, UComponentExport> | null;
138
- /**
139
- * Query all elements inside the component
140
- *
141
- * If `componentType` is provided, this method will check the selected component type.
142
- * If a component type does not match, it is not returned.
143
- */
144
- selectAllComponents(selector: string): GeneralComponent[];
145
- selectAllComponents<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport>(selector: string, componentType: ComponentType<UData, UProperty, UMethod, UComponentExport>): ExportType<UData, UProperty, UMethod, UComponentExport>[];
146
- /**
147
- * Get the owner component
148
- *
149
- * If `componentType` is provided, this method will check the selected component type.
150
- * If a component type does not match, `null` is returned.
151
- */
152
- selectOwnerComponent(): any;
153
- selectOwnerComponent<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport>(componentType: ComponentType<UData, UProperty, UMethod, UComponentExport>): ExportType<UData, UProperty, UMethod, UComponentExport> | null;
154
- getRelationNodes(relationKey: string): GeneralComponent[];
155
- /** Cast the component into a general-typed one */
156
- general(): GeneralComponent;
157
- /**
158
- * Cast the component into the specified type
159
- *
160
- * Returns `null` if the component node is not the instance of the specified component.
161
- */
162
- asInstanceOf<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport>(componentType: ComponentType<UData, UProperty, UMethod, UComponentExport>): Component<UData, UProperty, UMethod, UComponentExport> | null;
163
- }
164
- export declare class ComponentProto<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TComponentExport> {
165
- private proto;
166
- constructor(methods: TMethod, componentExport?: () => TComponentExport);
167
- derive(): Component<TData, TProperty, TMethod, TComponentExport>;
168
- }
169
- export {};
170
- //# sourceMapping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