@webiny/admin-ui 0.0.0-unstable.e53eceafb5 → 0.0.0-unstable.eb196ccd2f

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 (73) hide show
  1. package/Alert/Alert.d.ts +1 -1
  2. package/Button/IconButton.d.ts +1 -1
  3. package/Card/components/CardRoot.d.ts +3 -3
  4. package/Command/Command.d.ts +5 -5
  5. package/Dialog/components/DialogContent.d.ts +1 -1
  6. package/Dialog/components/DialogFooter.d.ts +1 -1
  7. package/Dialog/components/DialogTitle.d.ts +1 -1
  8. package/Grid/Grid.d.ts +4 -4
  9. package/Heading/Heading.d.ts +1 -1
  10. package/Link/Link.d.ts +1 -1
  11. package/RadioGroup/primitives/RadioGroupPrimitive.js +1 -1
  12. package/RadioGroup/primitives/RadioGroupPrimitive.js.map +1 -1
  13. package/Separator/Separator.d.ts +2 -2
  14. package/Skeleton/Skeleton.d.ts +1 -1
  15. package/Slider/primitives/components/SliderTooltip.d.ts +1 -1
  16. package/Tag/Tag.d.ts +1 -1
  17. package/Tags/Tags.d.ts +24 -0
  18. package/Tags/Tags.js +59 -0
  19. package/Tags/Tags.js.map +1 -0
  20. package/Tags/Tags.stories.d.ts +13 -0
  21. package/Tags/Tags.stories.js +92 -0
  22. package/Tags/Tags.stories.js.map +1 -0
  23. package/Tags/domain/TagItem.d.ts +18 -0
  24. package/Tags/domain/TagItem.js +26 -0
  25. package/Tags/domain/TagItem.js.map +1 -0
  26. package/Tags/domain/TagItemDto.d.ts +5 -0
  27. package/Tags/domain/TagItemDto.js +3 -0
  28. package/Tags/domain/TagItemDto.js.map +1 -0
  29. package/Tags/domain/TagItemFormatted.d.ts +5 -0
  30. package/Tags/domain/TagItemFormatted.js +3 -0
  31. package/Tags/domain/TagItemFormatted.js.map +1 -0
  32. package/Tags/domain/TagItemMapper.d.ts +5 -0
  33. package/Tags/domain/TagItemMapper.js +11 -0
  34. package/Tags/domain/TagItemMapper.js.map +1 -0
  35. package/Tags/domain/index.d.ts +4 -0
  36. package/Tags/domain/index.js +6 -0
  37. package/Tags/domain/index.js.map +1 -0
  38. package/Tags/index.d.ts +1 -0
  39. package/Tags/index.js +3 -0
  40. package/Tags/index.js.map +1 -0
  41. package/Tags/primitives/TagsPrimitive.d.ts +81 -0
  42. package/Tags/primitives/TagsPrimitive.js +54 -0
  43. package/Tags/primitives/TagsPrimitive.js.map +1 -0
  44. package/Tags/primitives/TagsPrimitive.stories.d.ts +26 -0
  45. package/Tags/primitives/TagsPrimitive.stories.js +185 -0
  46. package/Tags/primitives/TagsPrimitive.stories.js.map +1 -0
  47. package/Tags/primitives/index.d.ts +1 -0
  48. package/Tags/primitives/index.js +3 -0
  49. package/Tags/primitives/index.js.map +1 -0
  50. package/Tags/primitives/presenters/TagsInputPresenter.d.ts +22 -0
  51. package/Tags/primitives/presenters/TagsInputPresenter.js +22 -0
  52. package/Tags/primitives/presenters/TagsInputPresenter.js.map +1 -0
  53. package/Tags/primitives/presenters/TagsPresenter.d.ts +42 -0
  54. package/Tags/primitives/presenters/TagsPresenter.js +68 -0
  55. package/Tags/primitives/presenters/TagsPresenter.js.map +1 -0
  56. package/Tags/primitives/presenters/TagsPresenter.test.d.ts +1 -0
  57. package/Tags/primitives/presenters/TagsPresenter.test.js +220 -0
  58. package/Tags/primitives/presenters/TagsPresenter.test.js.map +1 -0
  59. package/Tags/primitives/presenters/TagsValuesPresenter.d.ts +28 -0
  60. package/Tags/primitives/presenters/TagsValuesPresenter.js +41 -0
  61. package/Tags/primitives/presenters/TagsValuesPresenter.js.map +1 -0
  62. package/Tags/primitives/presenters/index.d.ts +3 -0
  63. package/Tags/primitives/presenters/index.js +5 -0
  64. package/Tags/primitives/presenters/index.js.map +1 -0
  65. package/Tags/primitives/useTags.d.ts +15 -0
  66. package/Tags/primitives/useTags.js +36 -0
  67. package/Tags/primitives/useTags.js.map +1 -0
  68. package/Textarea/Textarea.d.ts +1 -1
  69. package/Textarea/Textarea.js.map +1 -1
  70. package/index.d.ts +1 -0
  71. package/index.js +1 -0
  72. package/index.js.map +1 -1
  73. package/package.json +9 -8
@@ -0,0 +1,220 @@
1
+ import { TagsPresenter } from "./TagsPresenter";
2
+ import { TagsValuesPresenter } from "./TagsValuesPresenter";
3
+ import { TagsInputPresenter } from "./TagsInputPresenter";
4
+ describe("TagsPresenter", () => {
5
+ let presenter;
6
+ const onValueChange = jest.fn();
7
+ const onValueInput = jest.fn();
8
+ const onValueAdd = jest.fn();
9
+ const onValueRemove = jest.fn();
10
+ beforeEach(() => {
11
+ const tagsInputPresenter = new TagsInputPresenter();
12
+ const tagsValuesPresenter = new TagsValuesPresenter();
13
+ presenter = new TagsPresenter(tagsInputPresenter, tagsValuesPresenter);
14
+ });
15
+ it("should return the compatible `vm.inputVm` based on", () => {
16
+ presenter.init({
17
+ placeholder: "Custom placeholder"
18
+ });
19
+ expect(presenter.vm.inputVm.placeholder).toBe("Custom placeholder");
20
+ });
21
+ it("should return the compatible `vm.valuesVm` based on", () => {
22
+ presenter.init({
23
+ values: ["tag1", "tag2"]
24
+ });
25
+ expect(presenter.vm.valuesVm.values).toEqual([{
26
+ id: expect.any(String),
27
+ label: "tag1",
28
+ protected: false
29
+ }, {
30
+ id: expect.any(String),
31
+ label: "tag2",
32
+ protected: false
33
+ }]);
34
+ });
35
+ it("should call `onValueInput` and add the new value when input a value", () => {
36
+ presenter.init({
37
+ onValueInput
38
+ });
39
+ const value1 = "value 1";
40
+ presenter.inputValue(value1);
41
+ expect(onValueInput).toHaveBeenCalledWith(value1);
42
+ expect(presenter.vm.inputVm.value).toBe(value1);
43
+ const value2 = "value 2";
44
+ presenter.inputValue(value2);
45
+ expect(onValueInput).toHaveBeenCalledWith(value2);
46
+ expect(presenter.vm.inputVm.value).toBe(value2);
47
+ });
48
+ it("should call `onValueAdd` and add the new value when adding a value", () => {
49
+ presenter.init({
50
+ onValueAdd,
51
+ onValueChange
52
+ });
53
+
54
+ // It should add a value and call `onValueAdd` and `onValueChange`
55
+ const value1 = "value 1";
56
+ presenter.inputValue(value1);
57
+ presenter.addValue(value1);
58
+ expect(onValueAdd).toHaveBeenCalledWith(value1);
59
+ expect(presenter.vm.valuesVm.values).toEqual([{
60
+ id: expect.any(String),
61
+ label: value1,
62
+ protected: false
63
+ }]);
64
+ expect(onValueChange).toHaveBeenCalledWith([value1]);
65
+
66
+ // It should add another value and call `onValueAdd` and `onValueChange`
67
+ const value2 = "value 2";
68
+ presenter.inputValue(value2);
69
+ presenter.addValue(value2);
70
+ expect(onValueAdd).toHaveBeenCalledWith(value2);
71
+ expect(presenter.vm.valuesVm.values).toEqual([{
72
+ id: expect.any(String),
73
+ label: value1,
74
+ protected: false
75
+ }, {
76
+ id: expect.any(String),
77
+ label: value2,
78
+ protected: false
79
+ }]);
80
+ expect(onValueChange).toHaveBeenCalledWith([value1, value2]);
81
+
82
+ // It should not add an empty value
83
+ const emptyValue = " ";
84
+ presenter.inputValue(emptyValue);
85
+ presenter.addValue(emptyValue);
86
+ expect(onValueAdd).not.toHaveBeenCalledWith(emptyValue);
87
+ expect(presenter.vm.valuesVm.values).toEqual([{
88
+ id: expect.any(String),
89
+ label: value1,
90
+ protected: false
91
+ }, {
92
+ id: expect.any(String),
93
+ label: value2,
94
+ protected: false
95
+ }]);
96
+ expect(onValueChange).toHaveBeenCalledWith([value1, value2]);
97
+
98
+ // It should not add a duplicate value
99
+ presenter.inputValue(value1);
100
+ presenter.addValue(value1);
101
+ expect(onValueAdd).not.toHaveBeenLastCalledWith(value1);
102
+ expect(presenter.vm.valuesVm.values).toEqual([{
103
+ id: expect.any(String),
104
+ label: value1,
105
+ protected: false
106
+ }, {
107
+ id: expect.any(String),
108
+ label: value2,
109
+ protected: false
110
+ }]);
111
+ });
112
+ it("should call `onValueRemove` and remove the value when removing a value", () => {
113
+ const initialValues = ["tag1", "tag2"];
114
+ presenter.init({
115
+ values: initialValues,
116
+ onValueRemove,
117
+ onValueChange
118
+ });
119
+ const valueToRemove = "tag1";
120
+ presenter.removeValue(valueToRemove);
121
+ expect(onValueRemove).toHaveBeenCalledWith(valueToRemove);
122
+ expect(presenter.vm.valuesVm.values).toEqual([{
123
+ id: expect.any(String),
124
+ label: "tag2",
125
+ protected: false
126
+ }]);
127
+ expect(onValueChange).toHaveBeenCalledWith(["tag2"]);
128
+ });
129
+ it("should not remove a protected value", () => {
130
+ const initialValues = ["tag1", "tag2"];
131
+ const protectedValues = ["tag1"];
132
+ presenter.init({
133
+ values: initialValues,
134
+ protectedValues,
135
+ onValueRemove,
136
+ onValueChange
137
+ });
138
+ expect(presenter.vm.valuesVm.values).toEqual([{
139
+ id: expect.any(String),
140
+ label: "tag1",
141
+ protected: true
142
+ }, {
143
+ id: expect.any(String),
144
+ label: "tag2",
145
+ protected: false
146
+ }]);
147
+ const valueToRemove = "tag1";
148
+ presenter.removeValue(valueToRemove);
149
+ expect(onValueRemove).not.toHaveBeenCalled();
150
+ expect(onValueChange).not.toHaveBeenCalled();
151
+ expect(presenter.vm.valuesVm.values).toEqual([{
152
+ id: expect.any(String),
153
+ label: "tag1",
154
+ protected: true
155
+ }, {
156
+ id: expect.any(String),
157
+ label: "tag2",
158
+ protected: false
159
+ }]);
160
+ });
161
+ it("should not remove a value based on a pattern", () => {
162
+ const initialValues = ["tag1", "tag2", "another-tag"];
163
+ const protectedValues = ["tag*"];
164
+ presenter.init({
165
+ values: initialValues,
166
+ protectedValues,
167
+ onValueRemove,
168
+ onValueChange
169
+ });
170
+ expect(presenter.vm.valuesVm.values).toEqual([{
171
+ id: expect.any(String),
172
+ label: "tag1",
173
+ protected: true
174
+ }, {
175
+ id: expect.any(String),
176
+ label: "tag2",
177
+ protected: true
178
+ }, {
179
+ id: expect.any(String),
180
+ label: "another-tag",
181
+ protected: false
182
+ }]);
183
+
184
+ // Try to remove a protected value
185
+ const valueToRemove = "tag1";
186
+ presenter.removeValue(valueToRemove);
187
+ expect(onValueRemove).not.toHaveBeenCalled();
188
+ expect(onValueChange).not.toHaveBeenCalled();
189
+ expect(presenter.vm.valuesVm.values).toEqual([{
190
+ id: expect.any(String),
191
+ label: "tag1",
192
+ protected: true
193
+ }, {
194
+ id: expect.any(String),
195
+ label: "tag2",
196
+ protected: true
197
+ }, {
198
+ id: expect.any(String),
199
+ label: "another-tag",
200
+ protected: false
201
+ }]);
202
+
203
+ // Try to remove a non-protected value
204
+ const anotherValueToRemove = "another-tag";
205
+ presenter.removeValue(anotherValueToRemove);
206
+ expect(onValueRemove).toHaveBeenCalledWith(anotherValueToRemove);
207
+ expect(onValueChange).toHaveBeenCalledWith(["tag1", "tag2"]);
208
+ expect(presenter.vm.valuesVm.values).toEqual([{
209
+ id: expect.any(String),
210
+ label: "tag1",
211
+ protected: true
212
+ }, {
213
+ id: expect.any(String),
214
+ label: "tag2",
215
+ protected: true
216
+ }]);
217
+ });
218
+ });
219
+
220
+ //# sourceMappingURL=TagsPresenter.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TagsPresenter","TagsValuesPresenter","TagsInputPresenter","describe","presenter","onValueChange","jest","fn","onValueInput","onValueAdd","onValueRemove","beforeEach","tagsInputPresenter","tagsValuesPresenter","it","init","placeholder","expect","vm","inputVm","toBe","values","valuesVm","toEqual","id","any","String","label","protected","value1","inputValue","toHaveBeenCalledWith","value","value2","addValue","emptyValue","not","toHaveBeenLastCalledWith","initialValues","valueToRemove","removeValue","protectedValues","toHaveBeenCalled","anotherValueToRemove"],"sources":["TagsPresenter.test.ts"],"sourcesContent":["import { type ITagsPresenter, TagsPresenter } from \"./TagsPresenter\";\nimport { TagsValuesPresenter } from \"./TagsValuesPresenter\";\nimport { TagsInputPresenter } from \"./TagsInputPresenter\";\n\ndescribe(\"TagsPresenter\", () => {\n let presenter: ITagsPresenter;\n const onValueChange = jest.fn();\n const onValueInput = jest.fn();\n const onValueAdd = jest.fn();\n const onValueRemove = jest.fn();\n\n beforeEach(() => {\n const tagsInputPresenter = new TagsInputPresenter();\n const tagsValuesPresenter = new TagsValuesPresenter();\n presenter = new TagsPresenter(tagsInputPresenter, tagsValuesPresenter);\n });\n\n it(\"should return the compatible `vm.inputVm` based on\", () => {\n presenter.init({\n placeholder: \"Custom placeholder\"\n });\n\n expect(presenter.vm.inputVm.placeholder).toBe(\"Custom placeholder\");\n });\n\n it(\"should return the compatible `vm.valuesVm` based on\", () => {\n presenter.init({\n values: [\"tag1\", \"tag2\"]\n });\n\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: \"tag1\",\n protected: false\n },\n {\n id: expect.any(String),\n label: \"tag2\",\n protected: false\n }\n ]);\n });\n\n it(\"should call `onValueInput` and add the new value when input a value\", () => {\n presenter.init({\n onValueInput\n });\n\n const value1 = \"value 1\";\n presenter.inputValue(value1);\n\n expect(onValueInput).toHaveBeenCalledWith(value1);\n expect(presenter.vm.inputVm.value).toBe(value1);\n\n const value2 = \"value 2\";\n presenter.inputValue(value2);\n expect(onValueInput).toHaveBeenCalledWith(value2);\n expect(presenter.vm.inputVm.value).toBe(value2);\n });\n\n it(\"should call `onValueAdd` and add the new value when adding a value\", () => {\n presenter.init({\n onValueAdd,\n onValueChange\n });\n\n // It should add a value and call `onValueAdd` and `onValueChange`\n const value1 = \"value 1\";\n presenter.inputValue(value1);\n presenter.addValue(value1);\n\n expect(onValueAdd).toHaveBeenCalledWith(value1);\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: value1,\n protected: false\n }\n ]);\n expect(onValueChange).toHaveBeenCalledWith([value1]);\n\n // It should add another value and call `onValueAdd` and `onValueChange`\n const value2 = \"value 2\";\n presenter.inputValue(value2);\n presenter.addValue(value2);\n\n expect(onValueAdd).toHaveBeenCalledWith(value2);\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: value1,\n protected: false\n },\n {\n id: expect.any(String),\n label: value2,\n protected: false\n }\n ]);\n expect(onValueChange).toHaveBeenCalledWith([value1, value2]);\n\n // It should not add an empty value\n const emptyValue = \" \";\n presenter.inputValue(emptyValue);\n presenter.addValue(emptyValue);\n\n expect(onValueAdd).not.toHaveBeenCalledWith(emptyValue);\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: value1,\n protected: false\n },\n {\n id: expect.any(String),\n label: value2,\n protected: false\n }\n ]);\n expect(onValueChange).toHaveBeenCalledWith([value1, value2]);\n\n // It should not add a duplicate value\n presenter.inputValue(value1);\n presenter.addValue(value1);\n\n expect(onValueAdd).not.toHaveBeenLastCalledWith(value1);\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: value1,\n protected: false\n },\n {\n id: expect.any(String),\n label: value2,\n protected: false\n }\n ]);\n });\n\n it(\"should call `onValueRemove` and remove the value when removing a value\", () => {\n const initialValues = [\"tag1\", \"tag2\"];\n presenter.init({\n values: initialValues,\n onValueRemove,\n onValueChange\n });\n\n const valueToRemove = \"tag1\";\n presenter.removeValue(valueToRemove);\n\n expect(onValueRemove).toHaveBeenCalledWith(valueToRemove);\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: \"tag2\",\n protected: false\n }\n ]);\n expect(onValueChange).toHaveBeenCalledWith([\"tag2\"]);\n });\n\n it(\"should not remove a protected value\", () => {\n const initialValues = [\"tag1\", \"tag2\"];\n const protectedValues = [\"tag1\"];\n presenter.init({\n values: initialValues,\n protectedValues,\n onValueRemove,\n onValueChange\n });\n\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: \"tag1\",\n protected: true\n },\n {\n id: expect.any(String),\n label: \"tag2\",\n protected: false\n }\n ]);\n\n const valueToRemove = \"tag1\";\n presenter.removeValue(valueToRemove);\n\n expect(onValueRemove).not.toHaveBeenCalled();\n expect(onValueChange).not.toHaveBeenCalled();\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: \"tag1\",\n protected: true\n },\n {\n id: expect.any(String),\n label: \"tag2\",\n protected: false\n }\n ]);\n });\n\n it(\"should not remove a value based on a pattern\", () => {\n const initialValues = [\"tag1\", \"tag2\", \"another-tag\"];\n const protectedValues = [\"tag*\"];\n presenter.init({\n values: initialValues,\n protectedValues,\n onValueRemove,\n onValueChange\n });\n\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: \"tag1\",\n protected: true\n },\n {\n id: expect.any(String),\n label: \"tag2\",\n protected: true\n },\n {\n id: expect.any(String),\n label: \"another-tag\",\n protected: false\n }\n ]);\n\n // Try to remove a protected value\n const valueToRemove = \"tag1\";\n presenter.removeValue(valueToRemove);\n\n expect(onValueRemove).not.toHaveBeenCalled();\n expect(onValueChange).not.toHaveBeenCalled();\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: \"tag1\",\n protected: true\n },\n {\n id: expect.any(String),\n label: \"tag2\",\n protected: true\n },\n {\n id: expect.any(String),\n label: \"another-tag\",\n protected: false\n }\n ]);\n\n // Try to remove a non-protected value\n const anotherValueToRemove = \"another-tag\";\n presenter.removeValue(anotherValueToRemove);\n\n expect(onValueRemove).toHaveBeenCalledWith(anotherValueToRemove);\n expect(onValueChange).toHaveBeenCalledWith([\"tag1\", \"tag2\"]);\n expect(presenter.vm.valuesVm.values).toEqual([\n {\n id: expect.any(String),\n label: \"tag1\",\n protected: true\n },\n {\n id: expect.any(String),\n label: \"tag2\",\n protected: true\n }\n ]);\n });\n});\n"],"mappings":"AAAA,SAA8BA,aAAa;AAC3C,SAASC,mBAAmB;AAC5B,SAASC,kBAAkB;AAE3BC,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC5B,IAAIC,SAAyB;EAC7B,MAAMC,aAAa,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B,MAAMC,YAAY,GAAGF,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B,MAAME,UAAU,GAAGH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5B,MAAMG,aAAa,GAAGJ,IAAI,CAACC,EAAE,CAAC,CAAC;EAE/BI,UA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,EAAE,MAAM,CAAC,CAAC;IAC5Dd,MAAM,CAACb,SAAS,CAACc,EAAE,CAACI,QAAQ,CAACD,MAAM,CAAC,CAACE,OAAO,CAAC,CACzC;MACIC,EAAE,EAAEP,MAAM,CAACQ,GAAG,CAACC,MAAM,CAAC;MACtBC,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE;IACf,CAAC,EACD;MACIJ,EAAE,EAAEP,MAAM,CAACQ,GAAG,CAACC,MAAM,CAAC;MACtBC,KAAK,EAAE,MAAM;MACbC,SAAS,EAAE;IACf,CAAC,CACJ,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ import { type TagItemFormatted } from "../../domain";
2
+ interface TagsValuesPresenterParams {
3
+ values?: string[];
4
+ protectedValues?: string[];
5
+ }
6
+ interface ITagsValuesPresenter {
7
+ vm: {
8
+ values: TagItemFormatted[];
9
+ };
10
+ init: (params: TagsValuesPresenterParams) => void;
11
+ addValue: (value: string) => void;
12
+ removeValue: (value: string) => void;
13
+ hasValue: (value: string) => boolean;
14
+ isValueProtected: (value: string) => boolean;
15
+ }
16
+ declare class TagsValuesPresenter implements ITagsValuesPresenter {
17
+ private values;
18
+ constructor();
19
+ init(params: TagsValuesPresenterParams): void;
20
+ get vm(): {
21
+ values: TagItemFormatted[];
22
+ };
23
+ addValue: (value: string) => void;
24
+ removeValue: (value: string) => void;
25
+ hasValue: (value: string) => boolean;
26
+ isValueProtected: (value: string) => boolean;
27
+ }
28
+ export { TagsValuesPresenter, type ITagsValuesPresenter, type TagsValuesPresenterParams };
@@ -0,0 +1,41 @@
1
+ import { makeAutoObservable } from "mobx";
2
+ import minimatch from "minimatch";
3
+ import { TagItem, TagItemMapper } from "../../domain";
4
+ class TagsValuesPresenter {
5
+ values = [];
6
+ constructor() {
7
+ makeAutoObservable(this);
8
+ }
9
+ init(params) {
10
+ this.values = params.values?.map(value => TagItem.create({
11
+ label: value,
12
+ protected: params.protectedValues ? params.protectedValues.some(pattern => minimatch(value, pattern)) : false
13
+ })) ?? [];
14
+ }
15
+ get vm() {
16
+ return {
17
+ values: this.values.map(value => TagItemMapper.toFormatted(value))
18
+ };
19
+ }
20
+ addValue = value => {
21
+ if (!value || this.values.find(tag => tag.label === value)) {
22
+ return;
23
+ }
24
+ const tagItem = TagItem.create({
25
+ label: value
26
+ });
27
+ this.values.push(tagItem);
28
+ };
29
+ removeValue = value => {
30
+ this.values = this.values.filter(tagItem => tagItem.label !== value || this.isValueProtected(tagItem.label));
31
+ };
32
+ hasValue = value => {
33
+ return !!this.values.find(tag => tag.label === value);
34
+ };
35
+ isValueProtected = value => {
36
+ return !!this.values.find(tag => tag.label === value && tag.protected);
37
+ };
38
+ }
39
+ export { TagsValuesPresenter };
40
+
41
+ //# sourceMappingURL=TagsValuesPresenter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["makeAutoObservable","minimatch","TagItem","TagItemMapper","TagsValuesPresenter","values","constructor","init","params","map","value","create","label","protected","protectedValues","some","pattern","vm","toFormatted","addValue","find","tag","tagItem","push","removeValue","filter","isValueProtected","hasValue"],"sources":["TagsValuesPresenter.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport minimatch from \"minimatch\";\nimport { TagItem, type TagItemFormatted, TagItemMapper } from \"~/Tags/domain\";\n\ninterface TagsValuesPresenterParams {\n values?: string[];\n protectedValues?: string[];\n}\n\ninterface ITagsValuesPresenter {\n vm: {\n values: TagItemFormatted[];\n };\n init: (params: TagsValuesPresenterParams) => void;\n addValue: (value: string) => void;\n removeValue: (value: string) => void;\n hasValue: (value: string) => boolean;\n isValueProtected: (value: string) => boolean;\n}\n\nclass TagsValuesPresenter implements ITagsValuesPresenter {\n private values: TagItem[] = [];\n\n constructor() {\n makeAutoObservable(this);\n }\n\n init(params: TagsValuesPresenterParams) {\n this.values =\n params.values?.map(value =>\n TagItem.create({\n label: value,\n protected: params.protectedValues\n ? params.protectedValues.some(pattern => minimatch(value, pattern))\n : false\n })\n ) ?? [];\n }\n\n get vm() {\n return {\n values: this.values.map(value => TagItemMapper.toFormatted(value))\n };\n }\n\n public addValue = (value: string) => {\n if (!value || this.values.find(tag => tag.label === value)) {\n return;\n }\n const tagItem = TagItem.create({ label: value });\n this.values.push(tagItem);\n };\n\n public removeValue = (value: string) => {\n this.values = this.values.filter(\n tagItem => tagItem.label !== value || this.isValueProtected(tagItem.label)\n );\n };\n\n public hasValue = (value: string) => {\n return !!this.values.find(tag => tag.label === value);\n };\n\n public isValueProtected = (value: string) => {\n return !!this.values.find(tag => tag.label === value && tag.protected);\n };\n}\n\nexport { TagsValuesPresenter, type ITagsValuesPresenter, type TagsValuesPresenterParams };\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AACzC,OAAOC,SAAS,MAAM,WAAW;AACjC,SAASC,OAAO,EAAyBC,aAAa;AAkBtD,MAAMC,mBAAmB,CAAiC;EAC9CC,MAAM,GAAc,EAAE;EAE9BC,WAAWA,CAAA,EAAG;IACVN,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEAO,IAAIA,CAACC,MAAiC,EAAE;IACpC,IAAI,CAACH,MAAM,GACPG,MAAM,CAACH,MAAM,EAAEI,GAAG,CAACC,KAAK,IACpBR,OAAO,CAACS,MAAM,CAAC;MACXC,KAAK,EAAEF,KAAK;MACZG,SAAS,EAAEL,MAAM,CAACM,eAAe,GAC3BN,MAAM,CAACM,eAAe,CAACC,IAAI,CAACC,OAAO,IAAIf,SAAS,CAACS,KAAK,EAAEM,OAAO,CAAC,CAAC,GACjE;IACV,CAAC,CACL,CAAC,IAAI,EAAE;EACf;EAEA,IAAIC,EAAEA,CAAA,EAAG;IACL,OAAO;MACHZ,MAAM,EAAE,IAAI,CAACA,MAAM,CAACI,GAAG,CAACC,KAAK,IAAIP,aAAa,CAACe,WAAW,CAACR,KAAK,CAAC;IACrE,CAAC;EACL;EAEOS,QAAQ,GAAIT,KAAa,IAAK;IACjC,IAAI,CAACA,KAAK,IAAI,IAAI,CAACL,MAAM,CAACe,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACT,KAAK,KAAKF,KAAK,CAAC,EAAE;MACxD;IACJ;IACA,MAAMY,OAAO,GAAGpB,OAAO,CAACS,MAAM,CAAC;MAAEC,KAAK,EAAEF;IAAM,CAAC,CAAC;IAChD,IAAI,CAACL,MAAM,CAACkB,IAAI,CAACD,OAAO,CAAC;EAC7B,CAAC;EAEME,WAAW,GAAId,KAAa,IAAK;IACpC,IAAI,CAACL,MAAM,GAAG,IAAI,CAACA,MAAM,CAACoB,MAAM,CAC5BH,OAAO,IAAIA,OAAO,CAACV,KAAK,KAAKF,KAAK,IAAI,IAAI,CAACgB,gBAAgB,CAACJ,OAAO,CAACV,KAAK,CAC7E,CAAC;EACL,CAAC;EAEMe,QAAQ,GAAIjB,KAAa,IAAK;IACjC,OAAO,CAAC,CAAC,IAAI,CAACL,MAAM,CAACe,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACT,KAAK,KAAKF,KAAK,CAAC;EACzD,CAAC;EAEMgB,gBAAgB,GAAIhB,KAAa,IAAK;IACzC,OAAO,CAAC,CAAC,IAAI,CAACL,MAAM,CAACe,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACT,KAAK,KAAKF,KAAK,IAAIW,GAAG,CAACR,SAAS,CAAC;EAC1E,CAAC;AACL;AAEA,SAAST,mBAAmB","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export * from "./TagsPresenter";
2
+ export * from "./TagsInputPresenter";
3
+ export * from "./TagsValuesPresenter";
@@ -0,0 +1,5 @@
1
+ export * from "./TagsPresenter";
2
+ export * from "./TagsInputPresenter";
3
+ export * from "./TagsValuesPresenter";
4
+
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./TagsPresenter\";\nexport * from \"./TagsInputPresenter\";\nexport * from \"./TagsValuesPresenter\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ import type { TagsPrimitiveProps } from "./TagsPrimitive";
2
+ export declare const useTags: (props: TagsPrimitiveProps) => {
3
+ vm: {
4
+ inputVm: {
5
+ placeholder: string;
6
+ value: string;
7
+ };
8
+ valuesVm: {
9
+ values: import("../domain").TagItemFormatted[];
10
+ };
11
+ };
12
+ inputValue: (value: string) => void;
13
+ addValue: () => void;
14
+ removeValue: (value: string) => void;
15
+ };
@@ -0,0 +1,36 @@
1
+ import { useEffect, useMemo, useState } from "react";
2
+ import { autorun } from "mobx";
3
+ import { TagsInputPresenter, TagsPresenter, TagsValuesPresenter } from "./presenters";
4
+ export const useTags = props => {
5
+ const params = useMemo(() => ({
6
+ values: props.value,
7
+ protectedValues: props.protectedValues,
8
+ placeholder: props.placeholder,
9
+ onValueChange: props.onChange,
10
+ onValueInput: props.onValueInput,
11
+ onValueAdd: props.onValueAdd,
12
+ onValueRemove: props.onValueRemove
13
+ }), [props.value, props.protectedValues, props.placeholder, props.onChange, props.onValueInput, props.onValueAdd, props.onValueRemove]);
14
+ const presenter = useMemo(() => {
15
+ const inputPresenter = new TagsInputPresenter();
16
+ const valuesPresenter = new TagsValuesPresenter();
17
+ return new TagsPresenter(inputPresenter, valuesPresenter);
18
+ }, []);
19
+ const [vm, setVm] = useState(presenter.vm);
20
+ useEffect(() => {
21
+ presenter.init(params);
22
+ }, [params, presenter]);
23
+ useEffect(() => {
24
+ return autorun(() => {
25
+ setVm(presenter.vm);
26
+ });
27
+ }, [presenter]);
28
+ return {
29
+ vm,
30
+ inputValue: presenter.inputValue,
31
+ addValue: presenter.addValue,
32
+ removeValue: presenter.removeValue
33
+ };
34
+ };
35
+
36
+ //# sourceMappingURL=useTags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useMemo","useState","autorun","TagsInputPresenter","TagsPresenter","TagsValuesPresenter","useTags","props","params","values","value","protectedValues","placeholder","onValueChange","onChange","onValueInput","onValueAdd","onValueRemove","presenter","inputPresenter","valuesPresenter","vm","setVm","init","inputValue","addValue","removeValue"],"sources":["useTags.ts"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { autorun } from \"mobx\";\nimport {\n TagsInputPresenter,\n TagsPresenter,\n type TagsPresenterParams,\n TagsValuesPresenter\n} from \"./presenters\";\nimport type { TagsPrimitiveProps } from \"./TagsPrimitive\";\n\nexport const useTags = (props: TagsPrimitiveProps) => {\n const params: TagsPresenterParams = useMemo(\n () => ({\n values: props.value,\n protectedValues: props.protectedValues,\n placeholder: props.placeholder,\n onValueChange: props.onChange,\n onValueInput: props.onValueInput,\n onValueAdd: props.onValueAdd,\n onValueRemove: props.onValueRemove\n }),\n [\n props.value,\n props.protectedValues,\n props.placeholder,\n props.onChange,\n props.onValueInput,\n props.onValueAdd,\n props.onValueRemove\n ]\n );\n\n const presenter = useMemo(() => {\n const inputPresenter = new TagsInputPresenter();\n const valuesPresenter = new TagsValuesPresenter();\n\n return new TagsPresenter(inputPresenter, valuesPresenter);\n }, []);\n\n const [vm, setVm] = useState(presenter.vm);\n\n useEffect(() => {\n presenter.init(params);\n }, [params, presenter]);\n\n useEffect(() => {\n return autorun(() => {\n setVm(presenter.vm);\n });\n }, [presenter]);\n\n return {\n vm,\n inputValue: presenter.inputValue,\n addValue: presenter.addValue,\n removeValue: presenter.removeValue\n };\n};\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACpD,SAASC,OAAO,QAAQ,MAAM;AAC9B,SACIC,kBAAkB,EAClBC,aAAa,EAEbC,mBAAmB;AAIvB,OAAO,MAAMC,OAAO,GAAIC,KAAyB,IAAK;EAClD,MAAMC,MAA2B,GAAGR,OAAO,CACvC,OAAO;IACHS,MAAM,EAAEF,KAAK,CAACG,KAAK;IACnBC,eAAe,EAAEJ,KAAK,CAACI,eAAe;IACtCC,WAAW,EAAEL,KAAK,CAACK,WAAW;IAC9BC,aAAa,EAAEN,KAAK,CAACO,QAAQ;IAC7BC,YAAY,EAAER,KAAK,CAACQ,YAAY;IAChCC,UAAU,EAAET,KAAK,CAACS,UAAU;IAC5BC,aAAa,EAAEV,KAAK,CAACU;EACzB,CAAC,CAAC,EACF,CACIV,KAAK,CAACG,KAAK,EACXH,KAAK,CAACI,eAAe,EACrBJ,KAAK,CAACK,WAAW,EACjBL,KAAK,CAACO,QAAQ,EACdP,KAAK,CAACQ,YAAY,EAClBR,KAAK,CAACS,UAAU,EAChBT,KAAK,CAACU,aAAa,CAE3B,CAAC;EAED,MAAMC,SAAS,GAAGlB,OAAO,CAAC,MAAM;IAC5B,MAAMmB,cAAc,GAAG,IAAIhB,kBAAkB,CAAC,CAAC;IAC/C,MAAMiB,eAAe,GAAG,IAAIf,mBAAmB,CAAC,CAAC;IAEjD,OAAO,IAAID,aAAa,CAACe,cAAc,EAAEC,eAAe,CAAC;EAC7D,CAAC,EAAE,EAAE,CAAC;EAEN,MAAM,CAACC,EAAE,EAAEC,KAAK,CAAC,GAAGrB,QAAQ,CAACiB,SAAS,CAACG,EAAE,CAAC;EAE1CtB,SAAS,CAAC,MAAM;IACZmB,SAAS,CAACK,IAAI,CAACf,MAAM,CAAC;EAC1B,CAAC,EAAE,CAACA,MAAM,EAAEU,SAAS,CAAC,CAAC;EAEvBnB,SAAS,CAAC,MAAM;IACZ,OAAOG,OAAO,CAAC,MAAM;MACjBoB,KAAK,CAACJ,SAAS,CAACG,EAAE,CAAC;IACvB,CAAC,CAAC;EACN,CAAC,EAAE,CAACH,SAAS,CAAC,CAAC;EAEf,OAAO;IACHG,EAAE;IACFG,UAAU,EAAEN,SAAS,CAACM,UAAU;IAChCC,QAAQ,EAAEP,SAAS,CAACO,QAAQ;IAC5BC,WAAW,EAAER,SAAS,CAACQ;EAC3B,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import type { TextareaPrimitiveProps } from "./TextareaPrimitive";
3
3
  import type { FormComponentProps } from "../FormComponent";
4
- type TextareaGroupProps = TextareaPrimitiveProps & FormComponentProps;
4
+ type TextareaGroupProps = Omit<TextareaPrimitiveProps, "onChange"> & FormComponentProps;
5
5
  declare const Textarea: (({ label, description, note, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TextareaGroupProps) => React.JSX.Element) & {
6
6
  original: ({ label, description, note, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TextareaGroupProps) => React.JSX.Element;
7
7
  originalName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useMemo","generateId","makeDecoratable","TextareaPrimitive","FormComponentDescription","FormComponentErrorMessage","FormComponentLabel","FormComponentNote","DecoratableTextarea","label","description","note","required","disabled","validation","validate","onBlur","originalOnBlur","props","isValid","validationIsValid","message","validationMessage","id","invalid","e","persist","createElement","className","htmlFor","text","Object","assign","Textarea"],"sources":["Textarea.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { generateId, makeDecoratable } from \"~/utils\";\nimport type { TextareaPrimitiveProps } from \"./TextareaPrimitive\";\nimport { TextareaPrimitive } from \"./TextareaPrimitive\";\nimport type { FormComponentProps } from \"~/FormComponent\";\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel,\n FormComponentNote\n} from \"~/FormComponent\";\n\ntype TextareaGroupProps = TextareaPrimitiveProps & FormComponentProps;\n\nconst DecoratableTextarea = ({\n label,\n description,\n note,\n required,\n disabled,\n validation,\n validate,\n onBlur: originalOnBlur,\n ...props\n}: TextareaGroupProps) => {\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n const id = useMemo(() => generateId(props.id), [props.id]);\n const invalid = useMemo(() => validationIsValid === false, [validationIsValid]);\n\n const onBlur = useCallback(\n async (e: React.FocusEvent<HTMLTextAreaElement>) => {\n if (validate) {\n // Since we are accessing event in an async operation, we need to persist it.\n // See https://reactjs.org/docs/events.html#event-pooling.\n e.persist();\n await validate();\n }\n originalOnBlur && originalOnBlur(e);\n },\n [validate, originalOnBlur]\n );\n\n return (\n <div className={\"wby-w-full\"}>\n <FormComponentLabel\n htmlFor={id}\n text={label}\n required={required}\n disabled={disabled}\n invalid={invalid}\n />\n <FormComponentDescription text={description} disabled={disabled} />\n <TextareaPrimitive\n {...props}\n id={id}\n disabled={disabled}\n invalid={invalid}\n onBlur={onBlur}\n />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={disabled}\n />\n <FormComponentNote text={note} disabled={disabled} />\n </div>\n );\n};\nconst Textarea = makeDecoratable(\"Textarea\", DecoratableTextarea);\n\nexport { Textarea };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,UAAU,EAAEC,eAAe;AAEpC,SAASC,iBAAiB;AAE1B,SACIC,wBAAwB,EACxBC,yBAAyB,EACzBC,kBAAkB,EAClBC,iBAAiB;AAKrB,MAAMC,mBAAmB,GAAGA,CAAC;EACzBC,KAAK;EACLC,WAAW;EACXC,IAAI;EACJC,QAAQ;EACRC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,MAAM,EAAEC,cAAc;EACtB,GAAGC;AACa,CAAC,KAAK;EACtB,MAAM;IAAEC,OAAO,EAAEC,iBAAiB;IAAEC,OAAO,EAAEC;EAAkB,CAAC,GAAGR,UAAU,IAAI,CAAC,CAAC;EACnF,MAAMS,EAAE,GAAGvB,OAAO,CAAC,MAAMC,UAAU,CAACiB,KAAK,CAACK,EAAE,CAAC,EAAE,CAACL,KAAK,CAACK,EAAE,CAAC,CAAC;EAC1D,MAAMC,OAAO,GAAGxB,OAAO,CAAC,MAAMoB,iBAAiB,KAAK,KAAK,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAE/E,MAAMJ,MAAM,GAAGjB,WAAW,CACtB,MAAO0B,CAAwC,IAAK;IAChD,IAAIV,QAAQ,EAAE;MACV;MACA;MACAU,CAAC,CAACC,OAAO,CAAC,CAAC;MACX,MAAMX,QAAQ,CAAC,CAAC;IACpB;IACAE,cAAc,IAAIA,cAAc,CAACQ,CAAC,CAAC;EACvC,CAAC,EACD,CAACV,QAAQ,EAAEE,cAAc,CAC7B,CAAC;EAED,oBACInB,KAAA,CAAA6B,aAAA;IAAKC,SAAS,EAAE;EAAa,gBACzB9B,KAAA,CAAA6B,aAAA,CAACrB,kBAAkB;IACfuB,OAAO,EAAEN,EAAG;IACZO,IAAI,EAAErB,KAAM;IACZG,QAAQ,EAAEA,QAAS;IACnBC,QAAQ,EAAEA,QAAS;IACnBW,OAAO,EAAEA;EAAQ,CACpB,CAAC,eACF1B,KAAA,CAAA6B,aAAA,CAACvB,wBAAwB;IAAC0B,IAAI,EAAEpB,WAAY;IAACG,QAAQ,EAAEA;EAAS,CAAE,CAAC,eACnEf,KAAA,CAAA6B,aAAA,CAACxB,iBAAiB,EAAA4B,MAAA,CAAAC,MAAA,KACVd,KAAK;IACTK,EAAE,EAAEA,EAAG;IACPV,QAAQ,EAAEA,QAAS;IACnBW,OAAO,EAAEA,OAAQ;IACjBR,MAAM,EAAEA;EAAO,EAClB,CAAC,eACFlB,KAAA,CAAA6B,aAAA,CAACtB,yBAAyB;IACtByB,IAAI,EAAER,iBAAkB;IACxBE,OAAO,EAAEA,OAAQ;IACjBX,QAAQ,EAAEA;EAAS,CACtB,CAAC,eACFf,KAAA,CAAA6B,aAAA,CAACpB,iBAAiB;IAACuB,IAAI,EAAEnB,IAAK;IAACE,QAAQ,EAAEA;EAAS,CAAE,CACnD,CAAC;AAEd,CAAC;AACD,MAAMoB,QAAQ,GAAG/B,eAAe,CAAC,UAAU,EAAEM,mBAAmB,CAAC;AAEjE,SAASyB,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useMemo","generateId","makeDecoratable","TextareaPrimitive","FormComponentDescription","FormComponentErrorMessage","FormComponentLabel","FormComponentNote","DecoratableTextarea","label","description","note","required","disabled","validation","validate","onBlur","originalOnBlur","props","isValid","validationIsValid","message","validationMessage","id","invalid","e","persist","createElement","className","htmlFor","text","Object","assign","Textarea"],"sources":["Textarea.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { generateId, makeDecoratable } from \"~/utils\";\nimport type { TextareaPrimitiveProps } from \"./TextareaPrimitive\";\nimport { TextareaPrimitive } from \"./TextareaPrimitive\";\nimport type { FormComponentProps } from \"~/FormComponent\";\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel,\n FormComponentNote\n} from \"~/FormComponent\";\n\ntype TextareaGroupProps = Omit<TextareaPrimitiveProps, \"onChange\"> & FormComponentProps;\n\nconst DecoratableTextarea = ({\n label,\n description,\n note,\n required,\n disabled,\n validation,\n validate,\n onBlur: originalOnBlur,\n ...props\n}: TextareaGroupProps) => {\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n const id = useMemo(() => generateId(props.id), [props.id]);\n const invalid = useMemo(() => validationIsValid === false, [validationIsValid]);\n\n const onBlur = useCallback(\n async (e: React.FocusEvent<HTMLTextAreaElement>) => {\n if (validate) {\n // Since we are accessing event in an async operation, we need to persist it.\n // See https://reactjs.org/docs/events.html#event-pooling.\n e.persist();\n await validate();\n }\n originalOnBlur && originalOnBlur(e);\n },\n [validate, originalOnBlur]\n );\n\n return (\n <div className={\"wby-w-full\"}>\n <FormComponentLabel\n htmlFor={id}\n text={label}\n required={required}\n disabled={disabled}\n invalid={invalid}\n />\n <FormComponentDescription text={description} disabled={disabled} />\n <TextareaPrimitive\n {...props}\n id={id}\n disabled={disabled}\n invalid={invalid}\n onBlur={onBlur}\n />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={disabled}\n />\n <FormComponentNote text={note} disabled={disabled} />\n </div>\n );\n};\nconst Textarea = makeDecoratable(\"Textarea\", DecoratableTextarea);\n\nexport { Textarea };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,UAAU,EAAEC,eAAe;AAEpC,SAASC,iBAAi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,CAAA6B,aAAA,CAACxB,iBAAiB,EAAA4B,MAAA,CAAAC,MAAA,KACVd,KAAK;IACTK,EAAE,EAAEA,EAAG;IACPV,QAAQ,EAAEA,QAAS;IACnBW,OAAO,EAAEA,OAAQ;IACjBR,MAAM,EAAEA;EAAO,EAClB,CAAC,eACFlB,KAAA,CAAA6B,aAAA,CAACtB,yBAAyB;IACtByB,IAAI,EAAER,iBAAkB;IACxBE,OAAO,EAAEA,OAAQ;IACjBX,QAAQ,EAAEA;EAAS,CACtB,CAAC,eACFf,KAAA,CAAA6B,aAAA,CAACpB,iBAAiB;IAACuB,IAAI,EAAEnB,IAAK;IAACE,QAAQ,EAAEA;EAAS,CAAE,CACnD,CAAC;AAEd,CAAC;AACD,MAAMoB,QAAQ,GAAG/B,eAAe,CAAC,UAAU,EAAEM,mBAAmB,CAAC;AAEjE,SAASyB,QAAQ","ignoreList":[]}
package/index.d.ts CHANGED
@@ -49,6 +49,7 @@ export * from "./Switch";
49
49
  export * from "./Table";
50
50
  export * from "./Tabs";
51
51
  export * from "./Tag";
52
+ export * from "./Tags";
52
53
  export * from "./Text";
53
54
  export * from "./Textarea";
54
55
  export * from "./TimeAgo";
package/index.js CHANGED
@@ -49,6 +49,7 @@ export * from "./Switch";
49
49
  export * from "./Table";
50
50
  export * from "./Tabs";
51
51
  export * from "./Tag";
52
+ export * from "./Tags";
52
53
  export * from "./Text";
53
54
  export * from "./Textarea";
54
55
  export * from "./TimeAgo";
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Accordion\";\nexport * from \"./Alert\";\nexport * from \"./AutoComplete\";\nexport * from \"./Avatar\";\nexport * from \"./Button\";\nexport * from \"./Card\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./CodeEditor\";\nexport * from \"./ColorPicker\";\nexport * from \"./DataList\";\nexport * from \"./DataTable\";\nexport * from \"./DelayedOnChange\";\nexport * from \"./Dialog\";\nexport * from \"./Drawer\";\nexport * from \"./DropdownMenu\";\nexport * from \"./DynamicFieldset\";\nexport * from \"./FilePicker\";\nexport * from \"./FormComponent\";\nexport * from \"./Grid\";\nexport * from \"./HeaderBar\";\nexport * from \"./HeaderBar\";\nexport * from \"./Heading\";\nexport * from \"./Icon\";\nexport * from \"./IconPicker\";\nexport * from \"./Image\";\nexport * from \"./Input\";\nexport * from \"./Label\";\nexport * from \"./Link\";\nexport * from \"./List\";\nexport * from \"./Loader\";\nexport * from \"./MultiAutoComplete\";\nexport * from \"./MultiFilePicker\";\nexport * from \"./Portal\";\nexport * from \"./Popover\";\nexport * from \"./ProgressBar\";\nexport * from \"./Providers\";\nexport * from \"./RadioGroup\";\nexport * from \"./RangeSlider\";\nexport * from \"./RichTextEditor\";\nexport * from \"./Scrollbar\";\nexport * from \"./Select\";\nexport * from \"./Separator\";\nexport * from \"./Sidebar\";\nexport * from \"./Skeleton\";\nexport * from \"./Slider\";\nexport * from \"./SteppedProgress\";\nexport * from \"./Switch\";\nexport * from \"./Table\";\nexport * from \"./Tabs\";\nexport * from \"./Tag\";\nexport * from \"./Text\";\nexport * from \"./Textarea\";\nexport * from \"./TimeAgo\";\nexport * from \"./Toast\";\nexport * from \"./Tooltip\";\nexport * from \"./Tree\";\nexport * from \"./utils\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Accordion\";\nexport * from \"./Alert\";\nexport * from \"./AutoComplete\";\nexport * from \"./Avatar\";\nexport * from \"./Button\";\nexport * from \"./Card\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./CodeEditor\";\nexport * from \"./ColorPicker\";\nexport * from \"./DataList\";\nexport * from \"./DataTable\";\nexport * from \"./DelayedOnChange\";\nexport * from \"./Dialog\";\nexport * from \"./Drawer\";\nexport * from \"./DropdownMenu\";\nexport * from \"./DynamicFieldset\";\nexport * from \"./FilePicker\";\nexport * from \"./FormComponent\";\nexport * from \"./Grid\";\nexport * from \"./HeaderBar\";\nexport * from \"./HeaderBar\";\nexport * from \"./Heading\";\nexport * from \"./Icon\";\nexport * from \"./IconPicker\";\nexport * from \"./Image\";\nexport * from \"./Input\";\nexport * from \"./Label\";\nexport * from \"./Link\";\nexport * from \"./List\";\nexport * from \"./Loader\";\nexport * from \"./MultiAutoComplete\";\nexport * from \"./MultiFilePicker\";\nexport * from \"./Portal\";\nexport * from \"./Popover\";\nexport * from \"./ProgressBar\";\nexport * from \"./Providers\";\nexport * from \"./RadioGroup\";\nexport * from \"./RangeSlider\";\nexport * from \"./RichTextEditor\";\nexport * from \"./Scrollbar\";\nexport * from \"./Select\";\nexport * from \"./Separator\";\nexport * from \"./Sidebar\";\nexport * from \"./Skeleton\";\nexport * from \"./Slider\";\nexport * from \"./SteppedProgress\";\nexport * from \"./Switch\";\nexport * from \"./Table\";\nexport * from \"./Tabs\";\nexport * from \"./Tag\";\nexport * from \"./Tags\";\nexport * from \"./Text\";\nexport * from \"./Textarea\";\nexport * from \"./TimeAgo\";\nexport * from \"./Toast\";\nexport * from \"./Tooltip\";\nexport * from \"./Tree\";\nexport * from \"./utils\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/admin-ui",
3
- "version": "0.0.0-unstable.e53eceafb5",
3
+ "version": "0.0.0-unstable.eb196ccd2f",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,16 +14,17 @@
14
14
  "@fortawesome/react-fontawesome": "0.1.19",
15
15
  "@minoru/react-dnd-treeview": "3.5.2",
16
16
  "@tanstack/react-table": "8.20.6",
17
- "@webiny/icons": "0.0.0-unstable.e53eceafb5",
18
- "@webiny/react-composition": "0.0.0-unstable.e53eceafb5",
19
- "@webiny/react-router": "0.0.0-unstable.e53eceafb5",
20
- "@webiny/utils": "0.0.0-unstable.e53eceafb5",
17
+ "@webiny/icons": "0.0.0-unstable.eb196ccd2f",
18
+ "@webiny/react-composition": "0.0.0-unstable.eb196ccd2f",
19
+ "@webiny/react-router": "0.0.0-unstable.eb196ccd2f",
20
+ "@webiny/utils": "0.0.0-unstable.eb196ccd2f",
21
21
  "ace-builds": "1.37.5",
22
22
  "bytes": "3.1.2",
23
23
  "class-variance-authority": "0.7.1",
24
24
  "clsx": "2.1.1",
25
25
  "cmdk": "1.0.4",
26
26
  "lodash": "4.17.21",
27
+ "minimatch": "5.1.6",
27
28
  "mobx": "6.9.0",
28
29
  "radix-ui": "1.4.2",
29
30
  "react": "18.2.0",
@@ -50,8 +51,8 @@
50
51
  "@types/react-color": "2.17.11",
51
52
  "@types/react-custom-scrollbars": "4.0.10",
52
53
  "@types/react-virtualized": "9.22.0",
53
- "@webiny/cli": "0.0.0-unstable.e53eceafb5",
54
- "@webiny/project-utils": "0.0.0-unstable.e53eceafb5",
54
+ "@webiny/cli": "0.0.0-unstable.eb196ccd2f",
55
+ "@webiny/project-utils": "0.0.0-unstable.eb196ccd2f",
55
56
  "chalk": "4.1.2",
56
57
  "css-loader": "6.10.0",
57
58
  "file-loader": "6.2.0",
@@ -81,5 +82,5 @@
81
82
  ]
82
83
  }
83
84
  },
84
- "gitHead": "e53eceafb5ce1a3872c9b4548939bb2eae5b1aef"
85
+ "gitHead": "eb196ccd2f32296e10f7add6dd7220d4e3abece4"
85
86
  }