@teambit/component.ui.component-filters.env-filter 0.0.220 → 0.0.221

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.
File without changes
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "name": "@teambit/component.ui.component-filters.env-filter",
3
- "version": "0.0.220",
3
+ "version": "0.0.221",
4
4
  "homepage": "https://bit.cloud/teambit/component/ui/component-filters/env-filter",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "ui/component-filters/env-filter",
9
- "version": "0.0.220"
9
+ "version": "0.0.221"
10
10
  },
11
11
  "dependencies": {
12
12
  "classnames": "2.2.6",
13
13
  "core-js": "^3.0.0",
14
- "@teambit/base-react.navigation.link": "2.0.27",
14
+ "@teambit/base-react.navigation.link": "2.0.31",
15
+ "@teambit/component.modules.component-url": "0.0.167",
16
+ "@teambit/component.ui.component-filters.component-filter-context": "0.0.217",
15
17
  "@teambit/design.inputs.selectors.multi-select": "0.0.20",
16
18
  "@teambit/design.ui.styles.ellipsis": "0.0.357",
17
19
  "@teambit/design.ui.tooltip": "0.0.361",
18
- "@teambit/ui-foundation.ui.constants.z-indexes": "0.0.504",
19
- "@teambit/component.modules.component-url": "0.0.153",
20
- "@teambit/component.ui.component-filters.component-filter-context": "0.0.214"
20
+ "@teambit/ui-foundation.ui.constants.z-indexes": "0.0.504"
21
21
  },
22
22
  "devDependencies": {
23
+ "@babel/runtime": "7.20.0",
23
24
  "@types/classnames": "2.2.11",
24
- "@types/react": "^17.0.8",
25
+ "@types/jest": "^26.0.0",
25
26
  "@types/mocha": "9.1.0",
26
27
  "@types/node": "12.20.4",
28
+ "@types/react": "^17.0.8",
27
29
  "@types/react-dom": "^17.0.5",
28
- "@types/jest": "^26.0.0",
29
- "@babel/runtime": "7.20.0",
30
30
  "@types/testing-library__jest-dom": "5.9.5"
31
31
  },
32
32
  "peerDependencies": {
package/schema.json ADDED
@@ -0,0 +1,610 @@
1
+ {
2
+ "__schema": "APISchema",
3
+ "location": {
4
+ "filePath": "index.ts",
5
+ "line": 1,
6
+ "character": 1
7
+ },
8
+ "module": {
9
+ "__schema": "ModuleSchema",
10
+ "location": {
11
+ "filePath": "index.ts",
12
+ "line": 1,
13
+ "character": 1
14
+ },
15
+ "exports": [
16
+ {
17
+ "__schema": "VariableLikeSchema",
18
+ "location": {
19
+ "filePath": "envs-filter.tsx",
20
+ "line": 33,
21
+ "character": 14
22
+ },
23
+ "signature": "const EnvsFilter: EnvsFilterCriteria",
24
+ "name": "EnvsFilter",
25
+ "type": {
26
+ "__schema": "TypeRefSchema",
27
+ "location": {
28
+ "filePath": "envs-filter.tsx",
29
+ "line": 33,
30
+ "character": 14
31
+ },
32
+ "name": "EnvsFilterCriteria",
33
+ "internalFilePath": "envs-filter.tsx"
34
+ },
35
+ "isOptional": false,
36
+ "defaultValue": "{\n id: 'envs',\n match: ({ component }, filter) => {\n const { envsState } = filter;\n const activeEnvs = [...envsState.values()].filter((envState) => envState.active).map((envState) => envState.id);\n // match everything when no envs are set\n if (activeEnvs.length === 0) return true;\n const envId =\n component.environment && ComponentID.tryFromString(component.environment.id)?.toStringWithoutVersion();\n const matches = !!envId && activeEnvs.indexOf(envId) >= 0;\n return matches;\n },\n state: {\n envsState: new Map<string, EnvFilterEnvState>(),\n dropdownState: false,\n },\n order: 1,\n render: envsFilter,\n}"
37
+ }
38
+ ],
39
+ "internals": []
40
+ },
41
+ "internals": [
42
+ {
43
+ "__schema": "ModuleSchema",
44
+ "location": {
45
+ "filePath": "envs-filter.tsx",
46
+ "line": 1,
47
+ "character": 1
48
+ },
49
+ "exports": [
50
+ {
51
+ "__schema": "TypeSchema",
52
+ "location": {
53
+ "filePath": "envs-filter.tsx",
54
+ "line": 27,
55
+ "character": 1
56
+ },
57
+ "signature": "type EnvFilterState = {\n envsState: Map<string, EnvFilterEnvState>;\n dropdownState: boolean;\n}",
58
+ "name": "EnvFilterState",
59
+ "type": {
60
+ "__schema": "TypeLiteralSchema",
61
+ "location": {
62
+ "filePath": "envs-filter.tsx",
63
+ "line": 27,
64
+ "character": 30
65
+ },
66
+ "members": [
67
+ {
68
+ "__schema": "VariableLikeSchema",
69
+ "location": {
70
+ "filePath": "envs-filter.tsx",
71
+ "line": 28,
72
+ "character": 3
73
+ },
74
+ "signature": "(property) envsState: Map<string, EnvFilterEnvState>",
75
+ "name": "envsState",
76
+ "type": {
77
+ "__schema": "TypeRefSchema",
78
+ "location": {
79
+ "filePath": "envs-filter.tsx",
80
+ "line": 28,
81
+ "character": 14
82
+ },
83
+ "name": "Map",
84
+ "typeArgs": [
85
+ {
86
+ "__schema": "KeywordTypeSchema",
87
+ "location": {
88
+ "filePath": "envs-filter.tsx",
89
+ "line": 28,
90
+ "character": 18
91
+ },
92
+ "name": "string"
93
+ },
94
+ {
95
+ "__schema": "TypeRefSchema",
96
+ "location": {
97
+ "filePath": "envs-filter.tsx",
98
+ "line": 28,
99
+ "character": 26
100
+ },
101
+ "name": "EnvFilterEnvState",
102
+ "internalFilePath": "envs-filter.tsx"
103
+ }
104
+ ]
105
+ },
106
+ "isOptional": false
107
+ },
108
+ {
109
+ "__schema": "VariableLikeSchema",
110
+ "location": {
111
+ "filePath": "envs-filter.tsx",
112
+ "line": 29,
113
+ "character": 3
114
+ },
115
+ "signature": "(property) dropdownState: boolean",
116
+ "name": "dropdownState",
117
+ "type": {
118
+ "__schema": "KeywordTypeSchema",
119
+ "location": {
120
+ "filePath": "envs-filter.tsx",
121
+ "line": 29,
122
+ "character": 18
123
+ },
124
+ "name": "boolean"
125
+ },
126
+ "isOptional": false
127
+ }
128
+ ]
129
+ }
130
+ },
131
+ {
132
+ "__schema": "TypeSchema",
133
+ "location": {
134
+ "filePath": "envs-filter.tsx",
135
+ "line": 31,
136
+ "character": 1
137
+ },
138
+ "signature": "type EnvsFilterCriteria = {\n id: string;\n render: React.ComponentType<ComponentFilterRenderProps>;\n match: (data: {\n component: ComponentModel;\n lanes?: LanesModel;\n }, state: EnvFilterState) => boolean;\n state: EnvFilterState;\n order?: number;\n}",
139
+ "name": "EnvsFilterCriteria",
140
+ "type": {
141
+ "__schema": "TypeRefSchema",
142
+ "location": {
143
+ "filePath": "envs-filter.tsx",
144
+ "line": 31,
145
+ "character": 34
146
+ },
147
+ "name": "ComponentFilterCriteria",
148
+ "componentId": {
149
+ "scope": "teambit.component",
150
+ "name": "ui/component-filters/component-filter-context",
151
+ "version": "0.0.216"
152
+ },
153
+ "typeArgs": [
154
+ {
155
+ "__schema": "TypeRefSchema",
156
+ "location": {
157
+ "filePath": "envs-filter.tsx",
158
+ "line": 31,
159
+ "character": 58
160
+ },
161
+ "name": "EnvFilterState",
162
+ "internalFilePath": "envs-filter.tsx"
163
+ }
164
+ ]
165
+ }
166
+ },
167
+ {
168
+ "__schema": "VariableLikeSchema",
169
+ "location": {
170
+ "filePath": "envs-filter.tsx",
171
+ "line": 33,
172
+ "character": 14
173
+ },
174
+ "signature": "const EnvsFilter: EnvsFilterCriteria",
175
+ "name": "EnvsFilter",
176
+ "type": {
177
+ "__schema": "TypeRefSchema",
178
+ "location": {
179
+ "filePath": "envs-filter.tsx",
180
+ "line": 33,
181
+ "character": 14
182
+ },
183
+ "name": "EnvsFilterCriteria",
184
+ "internalFilePath": "envs-filter.tsx"
185
+ },
186
+ "isOptional": false,
187
+ "defaultValue": "{\n id: 'envs',\n match: ({ component }, filter) => {\n const { envsState } = filter;\n const activeEnvs = [...envsState.values()].filter((envState) => envState.active).map((envState) => envState.id);\n // match everything when no envs are set\n if (activeEnvs.length === 0) return true;\n const envId =\n component.environment && ComponentID.tryFromString(component.environment.id)?.toStringWithoutVersion();\n const matches = !!envId && activeEnvs.indexOf(envId) >= 0;\n return matches;\n },\n state: {\n envsState: new Map<string, EnvFilterEnvState>(),\n dropdownState: false,\n },\n order: 1,\n render: envsFilter,\n}"
188
+ }
189
+ ],
190
+ "internals": [
191
+ {
192
+ "__schema": "TypeSchema",
193
+ "location": {
194
+ "filePath": "envs-filter.tsx",
195
+ "line": 19,
196
+ "character": 1
197
+ },
198
+ "signature": "type EnvFilterEnvState = {\n active: boolean;\n icon?: string;\n displayName: string;\n id: string;\n description: string;\n componentId: ComponentID;\n}",
199
+ "name": "EnvFilterEnvState",
200
+ "type": {
201
+ "__schema": "TypeLiteralSchema",
202
+ "location": {
203
+ "filePath": "envs-filter.tsx",
204
+ "line": 19,
205
+ "character": 26
206
+ },
207
+ "members": [
208
+ {
209
+ "__schema": "VariableLikeSchema",
210
+ "location": {
211
+ "filePath": "envs-filter.tsx",
212
+ "line": 20,
213
+ "character": 3
214
+ },
215
+ "signature": "(property) active: boolean",
216
+ "name": "active",
217
+ "type": {
218
+ "__schema": "KeywordTypeSchema",
219
+ "location": {
220
+ "filePath": "envs-filter.tsx",
221
+ "line": 20,
222
+ "character": 11
223
+ },
224
+ "name": "boolean"
225
+ },
226
+ "isOptional": false
227
+ },
228
+ {
229
+ "__schema": "VariableLikeSchema",
230
+ "location": {
231
+ "filePath": "envs-filter.tsx",
232
+ "line": 21,
233
+ "character": 3
234
+ },
235
+ "signature": "(property) icon?: string",
236
+ "name": "icon",
237
+ "type": {
238
+ "__schema": "KeywordTypeSchema",
239
+ "location": {
240
+ "filePath": "envs-filter.tsx",
241
+ "line": 21,
242
+ "character": 10
243
+ },
244
+ "name": "string"
245
+ },
246
+ "isOptional": true
247
+ },
248
+ {
249
+ "__schema": "VariableLikeSchema",
250
+ "location": {
251
+ "filePath": "envs-filter.tsx",
252
+ "line": 22,
253
+ "character": 3
254
+ },
255
+ "signature": "(property) displayName: string",
256
+ "name": "displayName",
257
+ "type": {
258
+ "__schema": "KeywordTypeSchema",
259
+ "location": {
260
+ "filePath": "envs-filter.tsx",
261
+ "line": 22,
262
+ "character": 16
263
+ },
264
+ "name": "string"
265
+ },
266
+ "isOptional": false
267
+ },
268
+ {
269
+ "__schema": "VariableLikeSchema",
270
+ "location": {
271
+ "filePath": "envs-filter.tsx",
272
+ "line": 23,
273
+ "character": 3
274
+ },
275
+ "signature": "(property) id: string",
276
+ "name": "id",
277
+ "type": {
278
+ "__schema": "KeywordTypeSchema",
279
+ "location": {
280
+ "filePath": "envs-filter.tsx",
281
+ "line": 23,
282
+ "character": 7
283
+ },
284
+ "name": "string"
285
+ },
286
+ "isOptional": false
287
+ },
288
+ {
289
+ "__schema": "VariableLikeSchema",
290
+ "location": {
291
+ "filePath": "envs-filter.tsx",
292
+ "line": 24,
293
+ "character": 3
294
+ },
295
+ "signature": "(property) description: string",
296
+ "name": "description",
297
+ "type": {
298
+ "__schema": "KeywordTypeSchema",
299
+ "location": {
300
+ "filePath": "envs-filter.tsx",
301
+ "line": 24,
302
+ "character": 16
303
+ },
304
+ "name": "string"
305
+ },
306
+ "isOptional": false
307
+ },
308
+ {
309
+ "__schema": "VariableLikeSchema",
310
+ "location": {
311
+ "filePath": "envs-filter.tsx",
312
+ "line": 25,
313
+ "character": 3
314
+ },
315
+ "signature": "(property) componentId: ComponentID",
316
+ "name": "componentId",
317
+ "type": {
318
+ "__schema": "TypeRefSchema",
319
+ "location": {
320
+ "filePath": "envs-filter.tsx",
321
+ "line": 25,
322
+ "character": 3
323
+ },
324
+ "name": "ComponentID",
325
+ "componentId": {
326
+ "scope": "teambit.component",
327
+ "name": "component"
328
+ }
329
+ },
330
+ "isOptional": false
331
+ }
332
+ ]
333
+ }
334
+ },
335
+ {
336
+ "__schema": "ModuleSchema",
337
+ "location": {
338
+ "filePath": "envs-filter.tsx",
339
+ "line": 53,
340
+ "character": 1
341
+ },
342
+ "exports": [
343
+ {
344
+ "__schema": "FunctionLikeSchema",
345
+ "location": {
346
+ "filePath": "envs-filter.tsx",
347
+ "line": 53,
348
+ "character": 7
349
+ },
350
+ "signature": "function(components: ComponentModel[]): {\n dropdownState: boolean;\n envsState: Map<string, EnvFilterEnvState>;\n}",
351
+ "name": "deriveEnvsFilterState",
352
+ "params": [
353
+ {
354
+ "__schema": "ParameterSchema",
355
+ "location": {
356
+ "filePath": "envs-filter.tsx",
357
+ "line": 53,
358
+ "character": 32
359
+ },
360
+ "name": "components",
361
+ "type": {
362
+ "__schema": "TypeArraySchema",
363
+ "location": {
364
+ "filePath": "envs-filter.tsx",
365
+ "line": 53,
366
+ "character": 44
367
+ },
368
+ "type": {
369
+ "__schema": "TypeRefSchema",
370
+ "location": {
371
+ "filePath": "envs-filter.tsx",
372
+ "line": 53,
373
+ "character": 44
374
+ },
375
+ "name": "ComponentModel",
376
+ "componentId": {
377
+ "scope": "teambit.component",
378
+ "name": "component"
379
+ }
380
+ }
381
+ },
382
+ "isOptional": false,
383
+ "isSpread": false
384
+ }
385
+ ],
386
+ "returnType": {
387
+ "__schema": "InferenceTypeSchema",
388
+ "location": {
389
+ "filePath": "envs-filter.tsx",
390
+ "line": 53,
391
+ "character": 31
392
+ },
393
+ "type": "{\n dropdownState: boolean;\n envsState: Map<string, EnvFilterEnvState>;\n}"
394
+ },
395
+ "modifiers": []
396
+ }
397
+ ],
398
+ "internals": []
399
+ },
400
+ {
401
+ "__schema": "ReactSchema",
402
+ "location": {
403
+ "filePath": "envs-filter.tsx",
404
+ "line": 95,
405
+ "character": 1
406
+ },
407
+ "signature": "function envsFilter({ components, className, lanes }: ComponentFilterRenderProps): React.JSX.Element",
408
+ "name": "envsFilter",
409
+ "props": {
410
+ "__schema": "ParameterSchema",
411
+ "location": {
412
+ "filePath": "envs-filter.tsx",
413
+ "line": 95,
414
+ "character": 21
415
+ },
416
+ "name": "{ components, className, lanes }",
417
+ "type": {
418
+ "__schema": "TypeRefSchema",
419
+ "location": {
420
+ "filePath": "envs-filter.tsx",
421
+ "line": 95,
422
+ "character": 55
423
+ },
424
+ "name": "ComponentFilterRenderProps",
425
+ "componentId": {
426
+ "scope": "teambit.component",
427
+ "name": "ui/component-filters/component-filter-context",
428
+ "version": "0.0.216"
429
+ }
430
+ },
431
+ "isOptional": false,
432
+ "objectBindingNodes": [
433
+ {
434
+ "__schema": "InferenceTypeSchema",
435
+ "location": {
436
+ "filePath": "envs-filter.tsx",
437
+ "line": 95,
438
+ "character": 23
439
+ },
440
+ "name": "components",
441
+ "type": "ComponentModel[]",
442
+ "isSpread": false
443
+ },
444
+ {
445
+ "__schema": "InferenceTypeSchema",
446
+ "location": {
447
+ "filePath": "envs-filter.tsx",
448
+ "line": 95,
449
+ "character": 35
450
+ },
451
+ "name": "className",
452
+ "type": "string",
453
+ "isSpread": false
454
+ },
455
+ {
456
+ "__schema": "InferenceTypeSchema",
457
+ "location": {
458
+ "filePath": "envs-filter.tsx",
459
+ "line": 95,
460
+ "character": 46
461
+ },
462
+ "name": "lanes",
463
+ "type": "LanesModel",
464
+ "isSpread": false
465
+ }
466
+ ],
467
+ "isSpread": false
468
+ },
469
+ "returnType": {
470
+ "__schema": "TypeRefSchema",
471
+ "location": {
472
+ "filePath": "envs-filter.tsx",
473
+ "line": 95,
474
+ "character": 1
475
+ },
476
+ "name": "React.JSX.Element",
477
+ "packageName": "react"
478
+ },
479
+ "modifiers": []
480
+ },
481
+ {
482
+ "__schema": "ReactSchema",
483
+ "location": {
484
+ "filePath": "envs-filter.tsx",
485
+ "line": 192,
486
+ "character": 1
487
+ },
488
+ "signature": "function EnvsPlaceholder(): React.JSX.Element",
489
+ "name": "EnvsPlaceholder",
490
+ "returnType": {
491
+ "__schema": "TypeRefSchema",
492
+ "location": {
493
+ "filePath": "envs-filter.tsx",
494
+ "line": 192,
495
+ "character": 1
496
+ },
497
+ "name": "React.JSX.Element",
498
+ "packageName": "react"
499
+ },
500
+ "modifiers": []
501
+ },
502
+ {
503
+ "__schema": "ReactSchema",
504
+ "location": {
505
+ "filePath": "envs-filter.tsx",
506
+ "line": 204,
507
+ "character": 1
508
+ },
509
+ "signature": "function EnvsDropdownItem({ displayName, icon, description, componentId, id }: EnvFilterEnvState): React.JSX.Element",
510
+ "name": "EnvsDropdownItem",
511
+ "props": {
512
+ "__schema": "ParameterSchema",
513
+ "location": {
514
+ "filePath": "envs-filter.tsx",
515
+ "line": 204,
516
+ "character": 27
517
+ },
518
+ "name": "{ displayName, icon, description, componentId, id }",
519
+ "type": {
520
+ "__schema": "TypeRefSchema",
521
+ "location": {
522
+ "filePath": "envs-filter.tsx",
523
+ "line": 204,
524
+ "character": 80
525
+ },
526
+ "name": "EnvFilterEnvState",
527
+ "internalFilePath": "envs-filter.tsx"
528
+ },
529
+ "isOptional": false,
530
+ "objectBindingNodes": [
531
+ {
532
+ "__schema": "InferenceTypeSchema",
533
+ "location": {
534
+ "filePath": "envs-filter.tsx",
535
+ "line": 204,
536
+ "character": 29
537
+ },
538
+ "name": "displayName",
539
+ "type": "string",
540
+ "isSpread": false
541
+ },
542
+ {
543
+ "__schema": "InferenceTypeSchema",
544
+ "location": {
545
+ "filePath": "envs-filter.tsx",
546
+ "line": 204,
547
+ "character": 42
548
+ },
549
+ "name": "icon",
550
+ "type": "string",
551
+ "isSpread": false
552
+ },
553
+ {
554
+ "__schema": "InferenceTypeSchema",
555
+ "location": {
556
+ "filePath": "envs-filter.tsx",
557
+ "line": 204,
558
+ "character": 48
559
+ },
560
+ "name": "description",
561
+ "type": "string",
562
+ "isSpread": false
563
+ },
564
+ {
565
+ "__schema": "InferenceTypeSchema",
566
+ "location": {
567
+ "filePath": "envs-filter.tsx",
568
+ "line": 204,
569
+ "character": 61
570
+ },
571
+ "name": "componentId",
572
+ "type": "ComponentID",
573
+ "isSpread": false
574
+ },
575
+ {
576
+ "__schema": "InferenceTypeSchema",
577
+ "location": {
578
+ "filePath": "envs-filter.tsx",
579
+ "line": 204,
580
+ "character": 74
581
+ },
582
+ "name": "id",
583
+ "type": "string",
584
+ "isSpread": false
585
+ }
586
+ ],
587
+ "isSpread": false
588
+ },
589
+ "returnType": {
590
+ "__schema": "TypeRefSchema",
591
+ "location": {
592
+ "filePath": "envs-filter.tsx",
593
+ "line": 204,
594
+ "character": 1
595
+ },
596
+ "name": "React.JSX.Element",
597
+ "packageName": "react"
598
+ },
599
+ "modifiers": []
600
+ }
601
+ ]
602
+ }
603
+ ],
604
+ "componentId": {
605
+ "scope": "teambit.component",
606
+ "name": "ui/component-filters/env-filter",
607
+ "version": "f682e6135c6958dbae39521311f4c0d5a2384682"
608
+ },
609
+ "taggedModuleExports": []
610
+ }