@vixoniccom/modules 2.19.0-dev.0 → 2.20.0-4dev.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,45 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.20.0-4dev.0](https://github.com/Vixonic/store-modules/compare/v2.20.0...v2.20.0-4dev.0) (2025-05-15)
6
+
7
+
8
+ ### Features
9
+
10
+ * BirthdayAppService added on ServiceType ([5442410](https://github.com/Vixonic/store-modules/commit/54424102bce82f16e70781ace23501d49af51342))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * new script for dev version prerelease ([e4b0452](https://github.com/Vixonic/store-modules/commit/e4b0452a8ff5e29faf9b39066c4cec0388e523c7))
16
+
17
+ ## [2.20.0](https://bitbucket.org/vixonic_dev/modules/compare/v2.20.0-dev.2...v2.20.0) (2025-02-17)
18
+
19
+ ## [2.20.0-dev.2](https://bitbucket.org/vixonic_dev/modules/compare/v2.20.0-dev.1...v2.20.0-dev.2) (2025-02-11)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * eval functions were removed and also a lot to imports no used were removed too ([f00db84](https://bitbucket.org/vixonic_dev/modules/commit/f00db8441836236756fc3a5517c3b4268f788a20))
25
+
26
+ ## [2.20.0-dev.1](https://bitbucket.org/vixonic_dev/modules/compare/v2.20.0-dev.0...v2.20.0-dev.1) (2025-01-29)
27
+
28
+
29
+ ### Features
30
+
31
+ * add description prop to RedirectButton component ([9d7dbce](https://bitbucket.org/vixonic_dev/modules/commit/9d7dbce06324c03320283984af28a8b991fbc23d))
32
+
33
+ ## [2.20.0-dev.0](https://bitbucket.org/vixonic_dev/modules/compare/v2.17.0...v2.20.0-dev.0) (2025-01-29)
34
+
35
+
36
+ ### Features
37
+
38
+ * added rexmasservice in types ([4460544](https://bitbucket.org/vixonic_dev/modules/commit/4460544ef29cfe192a8c1d14a565d4bed3aa82f1))
39
+ * Buk birthday service was added ([dfca21f](https://bitbucket.org/vixonic_dev/modules/commit/dfca21fb56b173024d2d0b099905d6f616ac57d7))
40
+ * create RedirectButton component ([dff817b](https://bitbucket.org/vixonic_dev/modules/commit/dff817b145c233ec77231fb5f687604cc0e7eb8f))
41
+
42
+ ## [2.19.0](https://bitbucket.org/vixonic_dev/modules/compare/v2.19.0-dev.0...v2.19.0) (2024-11-29)
43
+
5
44
  ## [2.19.0-dev.0](https://bitbucket.org/vixonic_dev/modules/compare/v2.18.2-dev.0...v2.19.0-dev.0) (2024-10-08)
6
45
 
7
46
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { Configuration } from './lib';
2
2
  export { Errors, ErrorsMap } from './lib/errors';
3
- export { Autocomplete, BitlyInput, ColorPicker, DateInput, NumberInput, SelectAssetKna, SelectInput, Switch, Slider, TextArea, TextFormat, TextInput, ServiceInput, isInput, InputValue, InputComponent, isInputInstance } from './lib/inputs';
3
+ export { Autocomplete, BitlyInput, ColorPicker, DateInput, NumberInput, SelectAssetKna, SelectInput, Switch, Slider, TextArea, TextFormat, TextInput, ServiceInput, isInput, InputValue, RedirectButton, InputComponent, isInputInstance } from './lib/inputs';
4
4
  export { Label } from './lib/ui';
5
5
  export { Group, List, DynamicMatrix } from './lib/containers';
6
6
  export { RangeValue, DateRangeValue, NumberRangeValue } from './lib/values';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NumberRangeValue = exports.DateRangeValue = exports.RangeValue = exports.DynamicMatrix = exports.List = exports.Group = exports.Label = exports.isInputInstance = exports.isInput = exports.ServiceInput = exports.TextInput = exports.TextFormat = exports.TextArea = exports.Slider = exports.Switch = exports.SelectInput = exports.SelectAssetKna = exports.NumberInput = exports.DateInput = exports.ColorPicker = exports.BitlyInput = exports.Autocomplete = exports.Errors = exports.Configuration = void 0;
3
+ exports.NumberRangeValue = exports.DateRangeValue = exports.RangeValue = exports.DynamicMatrix = exports.List = exports.Group = exports.Label = exports.isInputInstance = exports.RedirectButton = exports.isInput = exports.ServiceInput = exports.TextInput = exports.TextFormat = exports.TextArea = exports.Slider = exports.Switch = exports.SelectInput = exports.SelectAssetKna = exports.NumberInput = exports.DateInput = exports.ColorPicker = exports.BitlyInput = exports.Autocomplete = exports.Errors = exports.Configuration = void 0;
4
4
  var lib_1 = require("./lib");
5
5
  Object.defineProperty(exports, "Configuration", { enumerable: true, get: function () { return lib_1.Configuration; } });
6
6
  var errors_1 = require("./lib/errors");
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "TextFormat", { enumerable: true, get: function (
20
20
  Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return inputs_1.TextInput; } });
21
21
  Object.defineProperty(exports, "ServiceInput", { enumerable: true, get: function () { return inputs_1.ServiceInput; } });
22
22
  Object.defineProperty(exports, "isInput", { enumerable: true, get: function () { return inputs_1.isInput; } });
23
+ Object.defineProperty(exports, "RedirectButton", { enumerable: true, get: function () { return inputs_1.RedirectButton; } });
23
24
  Object.defineProperty(exports, "isInputInstance", { enumerable: true, get: function () { return inputs_1.isInputInstance; } });
24
25
  var ui_1 = require("./lib/ui");
25
26
  Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return ui_1.Label; } });
@@ -1,6 +1,6 @@
1
- import { InputValue } from "./inputs";
2
- import { ValueError } from "./errors";
3
- import { Configuration } from ".";
1
+ import { InputValue } from './inputs';
2
+ import { ValueError } from './errors';
3
+ import { Configuration } from '.';
4
4
  export interface IBaseElement {
5
5
  readonly id: string;
6
6
  readonly label: string;
@@ -6,12 +6,13 @@ import { Autocomplete } from './autocomplete';
6
6
  import { SelectInput } from './select-input';
7
7
  import { Switch } from './switch';
8
8
  import { NumberInput } from './number-input';
9
+ import { RedirectButton } from './redirect-button';
9
10
  import { ColorPicker } from './color-picker';
10
11
  import { DateInput } from './date-input';
11
12
  import { SelectAssetKna } from './select-asset-kna';
12
13
  import { Slider } from './slider';
13
14
  import { ServiceInput } from './service-input';
14
- export { BitlyInput, TextFormat, TextInput, SelectInput, Switch, TextArea, Autocomplete, NumberInput, ColorPicker, DateInput, SelectAssetKna, Slider, ServiceInput };
15
+ export { BitlyInput, TextFormat, TextInput, SelectInput, Switch, TextArea, Autocomplete, NumberInput, ColorPicker, DateInput, SelectAssetKna, Slider, ServiceInput, RedirectButton };
15
16
  export type AnyJson = boolean | number | string | null | JsonArray | JsonMap | undefined;
16
17
  export interface JsonMap {
17
18
  [key: string]: AnyJson | undefined;
@@ -19,7 +20,7 @@ export interface JsonMap {
19
20
  export interface JsonArray extends Array<AnyJson> {
20
21
  }
21
22
  export type InputValue = AnyJson;
22
- export type InputComponent = TextInput | TextFormat | BitlyInput | SelectInput<string | number> | TextArea | Switch | Autocomplete<string | number> | NumberInput | ColorPicker | DateInput | SelectAssetKna | Slider | ServiceInput;
23
- export declare const allInputs: (typeof TextInput | typeof BitlyInput | typeof TextFormat | typeof Autocomplete | typeof Switch | typeof NumberInput | typeof ColorPicker | typeof DateInput | typeof SelectAssetKna | typeof Slider | typeof ServiceInput)[];
23
+ export type InputComponent = TextInput | TextFormat | BitlyInput | SelectInput<string | number> | TextArea | Switch | Autocomplete<string | number> | NumberInput | ColorPicker | DateInput | SelectAssetKna | Slider | ServiceInput | RedirectButton;
24
+ export declare const allInputs: (typeof TextInput | typeof BitlyInput | typeof TextFormat | typeof Autocomplete | typeof Switch | typeof NumberInput | typeof RedirectButton | typeof ColorPicker | typeof DateInput | typeof SelectAssetKna | typeof Slider | typeof ServiceInput)[];
24
25
  export declare const isInput: (arg: any) => arg is InputComponent;
25
26
  export declare const isInputInstance: <T>(arg: any, type: string | string[]) => arg is T;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isInputInstance = exports.isInput = exports.allInputs = exports.ServiceInput = exports.Slider = exports.SelectAssetKna = exports.DateInput = exports.ColorPicker = exports.NumberInput = exports.Autocomplete = exports.TextArea = exports.Switch = exports.SelectInput = exports.TextInput = exports.TextFormat = exports.BitlyInput = void 0;
3
+ exports.isInputInstance = exports.isInput = exports.allInputs = exports.RedirectButton = exports.ServiceInput = exports.Slider = exports.SelectAssetKna = exports.DateInput = exports.ColorPicker = exports.NumberInput = exports.Autocomplete = exports.TextArea = exports.Switch = exports.SelectInput = exports.TextInput = exports.TextFormat = exports.BitlyInput = void 0;
4
4
  var text_area_1 = require("./text-area");
5
5
  Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return text_area_1.TextArea; } });
6
6
  var bitly_input_1 = require("./bitly-input");
@@ -17,6 +17,8 @@ var switch_1 = require("./switch");
17
17
  Object.defineProperty(exports, "Switch", { enumerable: true, get: function () { return switch_1.Switch; } });
18
18
  var number_input_1 = require("./number-input");
19
19
  Object.defineProperty(exports, "NumberInput", { enumerable: true, get: function () { return number_input_1.NumberInput; } });
20
+ var redirect_button_1 = require("./redirect-button");
21
+ Object.defineProperty(exports, "RedirectButton", { enumerable: true, get: function () { return redirect_button_1.RedirectButton; } });
20
22
  var color_picker_1 = require("./color-picker");
21
23
  Object.defineProperty(exports, "ColorPicker", { enumerable: true, get: function () { return color_picker_1.ColorPicker; } });
22
24
  var date_input_1 = require("./date-input");
@@ -40,7 +42,8 @@ exports.allInputs = [
40
42
  date_input_1.DateInput,
41
43
  select_asset_kna_1.SelectAssetKna,
42
44
  slider_1.Slider,
43
- service_input_1.ServiceInput
45
+ service_input_1.ServiceInput,
46
+ redirect_button_1.RedirectButton
44
47
  ];
45
48
  var isInput = function (arg) {
46
49
  return arg && arg.id !== undefined && arg.valueTypeDef !== undefined;
@@ -0,0 +1,19 @@
1
+ import { Input, IInput } from '../base';
2
+ import { ValueError } from '../errors';
3
+ export interface IRedirectButton extends IInput {
4
+ description?: string;
5
+ }
6
+ export declare namespace RedirectButton {
7
+ type Error = ValueError.InvalidValue;
8
+ type Value = string;
9
+ }
10
+ export declare class RedirectButton extends Input<RedirectButton.Value> {
11
+ static type: string;
12
+ type: string;
13
+ readonly description?: string;
14
+ constructor(options: IRedirectButton);
15
+ validateInput(value: RedirectButton.Value): ValueError.InvalidValue[];
16
+ isValidValue(v: any): v is RedirectButton.Value;
17
+ static fromJSON: (value: IRedirectButton) => RedirectButton;
18
+ valueTypeDef: () => string;
19
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RedirectButton = void 0;
19
+ var base_1 = require("../base");
20
+ var validation_1 = require("../utils/validation");
21
+ var RedirectButton = /** @class */ (function (_super) {
22
+ __extends(RedirectButton, _super);
23
+ function RedirectButton(options) {
24
+ var _this = _super.call(this, options) || this;
25
+ _this.type = RedirectButton.type;
26
+ _this.valueTypeDef = function () {
27
+ return 'string';
28
+ };
29
+ _this.description = options.description;
30
+ return _this;
31
+ }
32
+ RedirectButton.prototype.validateInput = function (value) {
33
+ var regex = /^(https?:\/\/)?(www\.)?([a-zA-Z0-9.-]+)\.([a-zA-Z]{2,})(\/[^\s]*)?$/;
34
+ var errors = [];
35
+ if (!regex.test(value)) {
36
+ errors = errors.concat(validation_1.Validator.invalidValue());
37
+ }
38
+ return errors;
39
+ };
40
+ RedirectButton.prototype.isValidValue = function (v) {
41
+ return typeof v === 'string';
42
+ };
43
+ RedirectButton.type = 'redirect-button';
44
+ RedirectButton.fromJSON = function (value) {
45
+ return new RedirectButton(value);
46
+ };
47
+ return RedirectButton;
48
+ }(base_1.Input));
49
+ exports.RedirectButton = RedirectButton;
@@ -1,6 +1,6 @@
1
1
  import { Input, IInput } from '../base';
2
2
  import { ValueError } from '../errors';
3
- export type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService' | 'VixonicStoriesService' | 'TwitterService' | 'TimezoneService' | 'ColabraService' | 'RexmasBirthdayService' | 'RexmasAnniversarieService' | 'RexmasNewEmployeesService' | 'TikTokService' | 'BukBirthdayService';
3
+ export type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService' | 'VixonicStoriesService' | 'TwitterService' | 'TimezoneService' | 'ColabraService' | 'RexmasBirthdayService' | 'RexmasAnniversarieService' | 'RexmasNewEmployeesService' | 'TikTokService' | 'BukBirthdayService' | 'BirthdayAppService';
4
4
  export interface IServiceInput extends IInput {
5
5
  serviceType: ServiceType;
6
6
  required?: boolean;
@@ -1,4 +1,4 @@
1
- import { InputComponent } from "../index";
1
+ import { InputComponent } from '../index';
2
2
  export type TypeDefMap = {
3
3
  id: string;
4
4
  typeDef: string;
@@ -1,4 +1,4 @@
1
- import { ValueError } from "../errors";
1
+ import { ValueError } from '../errors';
2
2
  export declare namespace Validator {
3
3
  const required: (value: any, required: boolean | undefined, onlyUndefined?: boolean) => Array<ValueError.Required>;
4
4
  const min: (value: number, min: number | undefined) => Array<ValueError.Min>;
@@ -9,8 +9,8 @@ function shouldBeVisible(item, _values) {
9
9
  var regexp = new RegExp('{{(.*?)}}', 'ig');
10
10
  jsEval = jsEval.replace(regexp, "_values.$1");
11
11
  // tslint:disable-next-line
12
- var show = eval(jsEval);
13
- return show === true;
12
+ var show = new Function('_values', "return ".concat(jsEval, ";"))(_values);
13
+ return !!show;
14
14
  }
15
15
  catch (e) {
16
16
  console.warn('Unable to parse expression:', jsEval);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vixoniccom/modules",
3
- "version": "2.19.0-dev.0",
3
+ "version": "2.20.0-4dev.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,7 @@
9
9
  "build": "tsc",
10
10
  "release": "standard-version",
11
11
  "prerelease-dev": "standard-version --prerelease dev",
12
+ "prerelease-4dev": "standard-version --prerelease 4dev",
12
13
  "prerelease-rc": "standard-version --prerelease rc",
13
14
  "test": "ts-node ./test/index.ts"
14
15
  },