@semcore/notice-bubble 4.7.8 → 4.7.10

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":["NoticeBubbleManager","noticeBubbleDefaultManager"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { IPortalProps } from '@semcore/portal';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\n\nexport interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {\n /** Manager copy */\n manager?: INoticeBubbleManager;\n locale?: string;\n}\n\nexport interface INoticeBubbleProps extends IBoxProps {\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children: React.ReactNode;\n}\nexport interface INoticeBubbleInfoProps extends INoticeBubbleProps {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n}\n\nexport interface INoticeBubbleWarningProps extends INoticeBubbleProps {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n}\n\nexport interface INoticeBubbleManager {\n /**\n * Creates and shows a notice.\n * */\n add: (props: INoticeBubbleInfoProps | INoticeBubbleWarningProps) => {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: string) => boolean;\n}\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;\ndeclare const NoticeBubbleContainer: (<T>(\n props: CProps<INoticeBubbleContainerProps & T>,\n) => ReturnEl) & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\ndeclare class NoticeBubbleManager implements INoticeBubbleManager {\n /**\n * Creates and shows a notice.\n * */\n add(props: INoticeBubbleInfoProps | INoticeBubbleWarningProps): {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ): boolean;\n /**\n * Removes notice by uid.\n * */\n remove(uid: string): boolean;\n}\n\nconst noticeBubbleDefaultManager = new NoticeBubbleManager();\n\nexport {\n NoticeBubbleContainer,\n NoticeBubble,\n NoticeBubbleWarning,\n NoticeBubbleManager,\n noticeBubbleDefaultManager,\n};\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default new NoticeBubbleManager();\n"],"mappings":";;;AA8EA;AACA;AACA;;AAEA;AACA;AACA;IAecA,mB;;;;AAwBd,IAAMC,0BAA0B,GAAG,IAAID,mBAAJ,EAAnC;AAEA,SAKEC,0BALF;AAOA;AACA;AACA;;AACA,eAAe,IAAID,mBAAJ,EAAf"}
1
+ {"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass","_classCallCheck","noticeBubbleDefaultManager"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { IPortalProps } from '@semcore/portal';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\n\nexport interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {\n /** Manager copy */\n manager?: INoticeBubbleManager;\n locale?: string;\n}\n\nexport interface INoticeBubbleProps extends IBoxProps {\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children: React.ReactNode;\n}\nexport interface INoticeBubbleInfoProps extends INoticeBubbleProps {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n}\n\nexport interface INoticeBubbleWarningProps extends INoticeBubbleProps {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n}\n\nexport interface INoticeBubbleManager {\n /**\n * Creates and shows a notice.\n * */\n add: (props: INoticeBubbleInfoProps | INoticeBubbleWarningProps) => {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: string) => boolean;\n}\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;\ndeclare const NoticeBubbleContainer: (<T>(\n props: CProps<INoticeBubbleContainerProps & T>,\n) => ReturnEl) & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\ndeclare class NoticeBubbleManager implements INoticeBubbleManager {\n /**\n * Creates and shows a notice.\n * */\n add(props: INoticeBubbleInfoProps | INoticeBubbleWarningProps): {\n uid: string;\n update: (\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,\n ): boolean;\n /**\n * Removes notice by uid.\n * */\n remove(uid: string): boolean;\n}\n\nconst noticeBubbleDefaultManager = new NoticeBubbleManager();\n\nexport {\n NoticeBubbleContainer,\n NoticeBubble,\n NoticeBubbleWarning,\n NoticeBubbleManager,\n noticeBubbleDefaultManager,\n};\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default new NoticeBubbleManager();\n"],"mappings":";;AA8EA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAiBcA,mBAAmB,gBAAAC,YAAA,UAAAD,oBAAA;EAAAE,eAAA,OAAAF,mBAAA;AAAA;AAwBjC,IAAMG,0BAA0B,GAAG,IAAIH,mBAAmB,EAAE;AAE5D,SAKEG,0BAA0B;AAE5B;AACA;AACA;AACA,eAAe,IAAIH,mBAAmB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","NoticeBubbleContainer","noticeBubbleDefaultManager"],"sources":["../../src/index.js"],"sourcesContent":["import { default as NoticeBubbleContainer } from './NoticeBubble';\nexport * from './NoticeBubble';\n\nimport { default as noticeBubbleDefaultManager } from './NoticeBubbleManager';\n\nexport * from './NoticeBubbleManager';\n\nexport default noticeBubbleDefaultManager;\nexport { NoticeBubbleContainer, noticeBubbleDefaultManager };\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,qBAApB,QAAiD,gBAAjD;AACA,cAAc,gBAAd;AAEA,SAASD,OAAO,IAAIE,0BAApB,QAAsD,uBAAtD;AAEA,cAAc,uBAAd;AAEA,eAAeA,0BAAf;AACA,SAASD,qBAAT,EAAgCC,0BAAhC"}
1
+ {"version":3,"file":"index.js","names":["default","NoticeBubbleContainer","noticeBubbleDefaultManager"],"sources":["../../src/index.js"],"sourcesContent":["import { default as NoticeBubbleContainer } from './NoticeBubble';\nexport * from './NoticeBubble';\n\nimport { default as noticeBubbleDefaultManager } from './NoticeBubbleManager';\n\nexport * from './NoticeBubbleManager';\n\nexport default noticeBubbleDefaultManager;\nexport { NoticeBubbleContainer, noticeBubbleDefaultManager };\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,qBAAqB,QAAQ,gBAAgB;AACjE,cAAc,gBAAgB;AAE9B,SAASD,OAAO,IAAIE,0BAA0B,QAAQ,uBAAuB;AAE7E,cAAc,uBAAuB;AAErC,eAAeA,0BAA0B;AACzC,SAASD,qBAAqB,EAAEC,0BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","pt","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n tr,\n vi,\n zh,\n};\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AACA,OAAOC,EAAP,MAAe,WAAf;AAEA,OAAO,IAAMC,iBAAiB,GAAG;EAC/BX,EAAE,EAAFA,EAD+B;EAE/BC,EAAE,EAAFA,EAF+B;EAG/BC,EAAE,EAAFA,EAH+B;EAI/BC,EAAE,EAAFA,EAJ+B;EAK/BC,EAAE,EAAFA,EAL+B;EAM/BC,EAAE,EAAFA,EAN+B;EAO/BC,EAAE,EAAFA,EAP+B;EAQ/BC,EAAE,EAAFA,EAR+B;EAS/BC,EAAE,EAAFA,EAT+B;EAU/BC,EAAE,EAAFA,EAV+B;EAW/BC,EAAE,EAAFA;AAX+B,CAA1B"}
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","pt","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n pt,\n tr,\n vi,\n zh,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/BX,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA;AACF,CAAC"}
package/lib/es6/utils.js CHANGED
@@ -1,16 +1,13 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
-
4
3
  var Timer = /*#__PURE__*/function () {
5
4
  function Timer(callback, delay) {
6
5
  _classCallCheck(this, Timer);
7
-
8
6
  this.callback = callback;
9
7
  this.delay = delay;
10
8
  this.remaining = delay;
11
9
  this.resume();
12
10
  }
13
-
14
11
  _createClass(Timer, [{
15
12
  key: "pause",
16
13
  value: function pause() {
@@ -36,9 +33,7 @@ var Timer = /*#__PURE__*/function () {
36
33
  clearTimeout(this.timerId);
37
34
  }
38
35
  }]);
39
-
40
36
  return Timer;
41
37
  }();
42
-
43
38
  export { Timer };
44
39
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["Timer","callback","delay","remaining","resume","clearTimeout","timerId","Date","now","start","setTimeout"],"sources":["../../src/utils.js"],"sourcesContent":["class Timer {\n constructor(callback, delay) {\n this.callback = callback;\n this.delay = delay;\n this.remaining = delay;\n this.resume();\n }\n\n pause() {\n clearTimeout(this.timerId);\n this.remaining -= Date.now() - this.start;\n }\n\n resume() {\n this.start = Date.now();\n clearTimeout(this.timerId);\n this.timerId = setTimeout(this.callback, this.remaining);\n }\n\n reset() {\n this.remaining = this.delay;\n this.resume();\n }\n\n clear() {\n clearTimeout(this.timerId);\n }\n}\n\nexport { Timer };\n"],"mappings":";;;IAAMA,K;EACJ,eAAYC,QAAZ,EAAsBC,KAAtB,EAA6B;IAAA;;IAC3B,KAAKD,QAAL,GAAgBA,QAAhB;IACA,KAAKC,KAAL,GAAaA,KAAb;IACA,KAAKC,SAAL,GAAiBD,KAAjB;IACA,KAAKE,MAAL;EACD;;;;WAED,iBAAQ;MACNC,YAAY,CAAC,KAAKC,OAAN,CAAZ;MACA,KAAKH,SAAL,IAAkBI,IAAI,CAACC,GAAL,KAAa,KAAKC,KAApC;IACD;;;WAED,kBAAS;MACP,KAAKA,KAAL,GAAaF,IAAI,CAACC,GAAL,EAAb;MACAH,YAAY,CAAC,KAAKC,OAAN,CAAZ;MACA,KAAKA,OAAL,GAAeI,UAAU,CAAC,KAAKT,QAAN,EAAgB,KAAKE,SAArB,CAAzB;IACD;;;WAED,iBAAQ;MACN,KAAKA,SAAL,GAAiB,KAAKD,KAAtB;MACA,KAAKE,MAAL;IACD;;;WAED,iBAAQ;MACNC,YAAY,CAAC,KAAKC,OAAN,CAAZ;IACD;;;;;;AAGH,SAASN,KAAT"}
1
+ {"version":3,"file":"utils.js","names":["Timer","callback","delay","_classCallCheck","remaining","resume","_createClass","key","value","pause","clearTimeout","timerId","Date","now","start","setTimeout","reset","clear"],"sources":["../../src/utils.js"],"sourcesContent":["class Timer {\n constructor(callback, delay) {\n this.callback = callback;\n this.delay = delay;\n this.remaining = delay;\n this.resume();\n }\n\n pause() {\n clearTimeout(this.timerId);\n this.remaining -= Date.now() - this.start;\n }\n\n resume() {\n this.start = Date.now();\n clearTimeout(this.timerId);\n this.timerId = setTimeout(this.callback, this.remaining);\n }\n\n reset() {\n this.remaining = this.delay;\n this.resume();\n }\n\n clear() {\n clearTimeout(this.timerId);\n }\n}\n\nexport { Timer };\n"],"mappings":";;IAAMA,KAAK;EACT,SAAAA,MAAYC,QAAQ,EAAEC,KAAK,EAAE;IAAAC,eAAA,OAAAH,KAAA;IAC3B,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACE,SAAS,GAAGF,KAAK;IACtB,IAAI,CAACG,MAAM,EAAE;EACf;EAACC,YAAA,CAAAN,KAAA;IAAAO,GAAA;IAAAC,KAAA,EAED,SAAAC,MAAA,EAAQ;MACNC,YAAY,CAAC,IAAI,CAACC,OAAO,CAAC;MAC1B,IAAI,CAACP,SAAS,IAAIQ,IAAI,CAACC,GAAG,EAAE,GAAG,IAAI,CAACC,KAAK;IAC3C;EAAC;IAAAP,GAAA;IAAAC,KAAA,EAED,SAAAH,OAAA,EAAS;MACP,IAAI,CAACS,KAAK,GAAGF,IAAI,CAACC,GAAG,EAAE;MACvBH,YAAY,CAAC,IAAI,CAACC,OAAO,CAAC;MAC1B,IAAI,CAACA,OAAO,GAAGI,UAAU,CAAC,IAAI,CAACd,QAAQ,EAAE,IAAI,CAACG,SAAS,CAAC;IAC1D;EAAC;IAAAG,GAAA;IAAAC,KAAA,EAED,SAAAQ,MAAA,EAAQ;MACN,IAAI,CAACZ,SAAS,GAAG,IAAI,CAACF,KAAK;MAC3B,IAAI,CAACG,MAAM,EAAE;IACf;EAAC;IAAAE,GAAA;IAAAC,KAAA,EAED,SAAAS,MAAA,EAAQ;MACNP,YAAY,CAAC,IAAI,CAACC,OAAO,CAAC;IAC5B;EAAC;EAAA,OAAAX,KAAA;AAAA;AAGH,SAASA,KAAK"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/notice-bubble",
3
3
  "description": "Semrush NoticeBubble Component",
4
- "version": "4.7.8",
4
+ "version": "4.7.10",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",