@salutejs/plasma-new-hope 0.186.0-canary.1541.11711445984.0 → 0.186.0-canary.1542.11716355955.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +22 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
- package/cjs/components/TextField/TextField.js +0 -11
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/index.js +2 -0
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/index.js +8 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getForm.js +90 -0
- package/{styled-components/cjs → emotion/cjs/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
- package/emotion/cjs/components/Combobox/index.js +6 -0
- package/emotion/cjs/components/TextField/TextField.js +1 -12
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
- package/emotion/es/components/Combobox/ComboboxNew/index.js +2 -1
- package/emotion/es/components/Combobox/ComboboxNew/utils/getForm.js +83 -0
- package/{styled-components/es → emotion/es/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
- package/emotion/es/components/Combobox/index.js +1 -1
- package/emotion/es/components/TextField/TextField.js +1 -12
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
- package/es/components/Combobox/ComboboxNew/Combobox.boundler.js +18 -0
- package/es/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
- package/es/components/TextField/TextField.js +0 -11
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/index.js +8 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getForm.js +90 -0
- package/{emotion/cjs → styled-components/cjs/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
- package/styled-components/cjs/components/Combobox/index.js +6 -0
- package/styled-components/cjs/components/TextField/TextField.js +0 -11
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
- package/styled-components/es/components/Combobox/ComboboxNew/index.js +2 -1
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getForm.js +83 -0
- package/{emotion/es → styled-components/es/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
- package/styled-components/es/components/Combobox/index.js +1 -1
- package/styled-components/es/components/TextField/TextField.js +0 -11
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
- package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +21 -0
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/index.d.ts +1 -0
- package/types/components/Combobox/ComboboxNew/index.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts.map +1 -0
- package/types/components/Combobox/index.d.ts +1 -1
- package/types/components/Combobox/index.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +3 -2
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/cjs/utils/syntheticEvent.js +0 -56
- package/cjs/utils/syntheticEvent.js.map +0 -1
- package/es/utils/syntheticEvent.js +0 -51
- package/es/utils/syntheticEvent.js.map +0 -1
- package/types/utils/syntheticEvent.d.ts +0 -4
- package/types/utils/syntheticEvent.d.ts.map +0 -1
@@ -1,51 +0,0 @@
|
|
1
|
-
var createEvent = function createEvent(ref) {
|
2
|
-
if (ref.current) {
|
3
|
-
var event = new Event('change', {
|
4
|
-
bubbles: true
|
5
|
-
});
|
6
|
-
Object.defineProperty(event, 'target', {
|
7
|
-
writable: false,
|
8
|
-
value: ref.current
|
9
|
-
});
|
10
|
-
var syntheticEvent = createSyntheticEvent(event);
|
11
|
-
console.log(syntheticEvent);
|
12
|
-
return syntheticEvent;
|
13
|
-
}
|
14
|
-
return null;
|
15
|
-
};
|
16
|
-
var createSyntheticEvent = function createSyntheticEvent(event) {
|
17
|
-
var _isDefaultPrevented = false;
|
18
|
-
var _isPropagationStopped = false;
|
19
|
-
var preventDefault = function preventDefault() {
|
20
|
-
_isDefaultPrevented = true;
|
21
|
-
event.preventDefault();
|
22
|
-
};
|
23
|
-
var stopPropagation = function stopPropagation() {
|
24
|
-
_isPropagationStopped = true;
|
25
|
-
event.stopPropagation();
|
26
|
-
};
|
27
|
-
return {
|
28
|
-
nativeEvent: event,
|
29
|
-
currentTarget: event.currentTarget,
|
30
|
-
target: event.target,
|
31
|
-
bubbles: event.bubbles,
|
32
|
-
cancelable: event.cancelable,
|
33
|
-
defaultPrevented: event.defaultPrevented,
|
34
|
-
eventPhase: event.eventPhase,
|
35
|
-
isTrusted: event.isTrusted,
|
36
|
-
preventDefault: preventDefault,
|
37
|
-
isDefaultPrevented: function isDefaultPrevented() {
|
38
|
-
return _isDefaultPrevented;
|
39
|
-
},
|
40
|
-
stopPropagation: stopPropagation,
|
41
|
-
isPropagationStopped: function isPropagationStopped() {
|
42
|
-
return _isPropagationStopped;
|
43
|
-
},
|
44
|
-
persist: function persist() {},
|
45
|
-
timeStamp: event.timeStamp,
|
46
|
-
type: event.type
|
47
|
-
};
|
48
|
-
};
|
49
|
-
|
50
|
-
export { createEvent, createSyntheticEvent };
|
51
|
-
//# sourceMappingURL=syntheticEvent.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"syntheticEvent.js","sources":["../../src/utils/syntheticEvent.ts"],"sourcesContent":["import { RefObject } from 'react';\n\nexport const createEvent = (ref: RefObject<HTMLInputElement>) => {\n if (ref.current) {\n const event = new Event('change', { bubbles: true });\n Object.defineProperty(event, 'target', { writable: false, value: ref.current });\n const syntheticEvent = createSyntheticEvent(event) as React.ChangeEvent<typeof ref.current>;\n console.log(syntheticEvent);\n return syntheticEvent;\n }\n\n return null;\n};\n\nexport const createSyntheticEvent = <T extends Element, E extends Event>(event: E): React.SyntheticEvent<T, E> => {\n let isDefaultPrevented = false;\n let isPropagationStopped = false;\n const preventDefault = () => {\n isDefaultPrevented = true;\n event.preventDefault();\n };\n const stopPropagation = () => {\n isPropagationStopped = true;\n event.stopPropagation();\n };\n return {\n nativeEvent: event,\n currentTarget: event.currentTarget as EventTarget & T,\n target: event.target as EventTarget & T,\n bubbles: event.bubbles,\n cancelable: event.cancelable,\n defaultPrevented: event.defaultPrevented,\n eventPhase: event.eventPhase,\n isTrusted: event.isTrusted,\n preventDefault,\n isDefaultPrevented: () => isDefaultPrevented,\n stopPropagation,\n isPropagationStopped: () => isPropagationStopped,\n persist: () => {},\n timeStamp: event.timeStamp,\n type: event.type,\n };\n};\n"],"names":["createEvent","ref","current","event","Event","bubbles","Object","defineProperty","writable","value","syntheticEvent","createSyntheticEvent","console","log","isDefaultPrevented","isPropagationStopped","preventDefault","stopPropagation","nativeEvent","currentTarget","target","cancelable","defaultPrevented","eventPhase","isTrusted","persist","timeStamp","type"],"mappings":"IAEaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,GAAgC,EAAK;EAC7D,IAAIA,GAAG,CAACC,OAAO,EAAE;AACb,IAAA,IAAMC,KAAK,GAAG,IAAIC,KAAK,CAAC,QAAQ,EAAE;AAAEC,MAAAA,OAAO,EAAE,IAAA;AAAK,KAAC,CAAC,CAAA;AACpDC,IAAAA,MAAM,CAACC,cAAc,CAACJ,KAAK,EAAE,QAAQ,EAAE;AAAEK,MAAAA,QAAQ,EAAE,KAAK;MAAEC,KAAK,EAAER,GAAG,CAACC,OAAAA;AAAQ,KAAC,CAAC,CAAA;AAC/E,IAAA,IAAMQ,cAAc,GAAGC,oBAAoB,CAACR,KAAK,CAA0C,CAAA;AAC3FS,IAAAA,OAAO,CAACC,GAAG,CAACH,cAAc,CAAC,CAAA;AAC3B,IAAA,OAAOA,cAAc,CAAA;AACzB,GAAA;AAEA,EAAA,OAAO,IAAI,CAAA;AACf,EAAC;IAEYC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAwCR,KAAQ,EAAiC;EAC9G,IAAIW,mBAAkB,GAAG,KAAK,CAAA;EAC9B,IAAIC,qBAAoB,GAAG,KAAK,CAAA;AAChC,EAAA,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,GAAS;AACzBF,IAAAA,mBAAkB,GAAG,IAAI,CAAA;IACzBX,KAAK,CAACa,cAAc,EAAE,CAAA;GACzB,CAAA;AACD,EAAA,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAS;AAC1BF,IAAAA,qBAAoB,GAAG,IAAI,CAAA;IAC3BZ,KAAK,CAACc,eAAe,EAAE,CAAA;GAC1B,CAAA;EACD,OAAO;AACHC,IAAAA,WAAW,EAAEf,KAAK;IAClBgB,aAAa,EAAEhB,KAAK,CAACgB,aAAgC;IACrDC,MAAM,EAAEjB,KAAK,CAACiB,MAAyB;IACvCf,OAAO,EAAEF,KAAK,CAACE,OAAO;IACtBgB,UAAU,EAAElB,KAAK,CAACkB,UAAU;IAC5BC,gBAAgB,EAAEnB,KAAK,CAACmB,gBAAgB;IACxCC,UAAU,EAAEpB,KAAK,CAACoB,UAAU;IAC5BC,SAAS,EAAErB,KAAK,CAACqB,SAAS;AAC1BR,IAAAA,cAAc,EAAdA,cAAc;IACdF,kBAAkB,EAAE,SAAAA,kBAAA,GAAA;AAAA,MAAA,OAAMA,mBAAkB,CAAA;AAAA,KAAA;AAC5CG,IAAAA,eAAe,EAAfA,eAAe;IACfF,oBAAoB,EAAE,SAAAA,oBAAA,GAAA;AAAA,MAAA,OAAMA,qBAAoB,CAAA;AAAA,KAAA;AAChDU,IAAAA,OAAO,EAAE,SAAAA,OAAA,GAAM,EAAE;IACjBC,SAAS,EAAEvB,KAAK,CAACuB,SAAS;IAC1BC,IAAI,EAAExB,KAAK,CAACwB,IAAAA;GACf,CAAA;AACL;;;;"}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { RefObject } from 'react';
|
2
|
-
export declare const createEvent: (ref: RefObject<HTMLInputElement>) => import("react").ChangeEvent<HTMLInputElement> | null;
|
3
|
-
export declare const createSyntheticEvent: <T extends Element, E extends Event>(event: E) => import("react").SyntheticEvent<T, E>;
|
4
|
-
//# sourceMappingURL=syntheticEvent.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"syntheticEvent.d.ts","sourceRoot":"","sources":["../../src/utils/syntheticEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,eAAO,MAAM,WAAW,QAAS,UAAU,gBAAgB,CAAC,yDAU3D,CAAC;AAEF,eAAO,MAAM,oBAAoB,wFA4BhC,CAAC"}
|