@aquera/nile-elements 0.0.36-3 → 0.0.37

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 (34) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +0 -1
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js +5 -73
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +17 -39
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +111 -217
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +1 -1
  11. package/dist/index.iife.js +340 -454
  12. package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
  13. package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
  14. package/dist/nile-content-editor/nile-content-editor.css.esm.js +0 -1
  15. package/dist/nile-switcher/index.cjs.js +1 -1
  16. package/dist/nile-switcher/index.esm.js +1 -1
  17. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  18. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  19. package/dist/nile-switcher/nile-switcher.css.cjs.js +1 -1
  20. package/dist/nile-switcher/nile-switcher.css.cjs.js.map +1 -1
  21. package/dist/nile-switcher/nile-switcher.css.esm.js +7 -75
  22. package/dist/nile-switcher/nile-switcher.esm.js +51 -101
  23. package/dist/src/nile-content-editor/nile-content-editor.css.js +0 -1
  24. package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  25. package/dist/src/nile-switcher/nile-switcher.css.js +5 -73
  26. package/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  27. package/dist/src/nile-switcher/nile-switcher.d.ts +17 -39
  28. package/dist/src/nile-switcher/nile-switcher.js +111 -217
  29. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/src/nile-content-editor/nile-content-editor.css.ts +0 -1
  33. package/src/nile-switcher/nile-switcher.css.ts +5 -73
  34. package/src/nile-switcher/nile-switcher.ts +172 -255
@@ -12,7 +12,6 @@ export const styles = css `
12
12
  :host {
13
13
  box-sizing: border-box;
14
14
  font-size: 14px;
15
- overflow: hidden;
16
15
  }
17
16
 
18
17
  .content-editable-wrapper {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-content-editor.css.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * AttributeExpression CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n font-size: 14px;\n overflow: hidden;\n }\n\n .content-editable-wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n }\n\n .dropdown-position {\n position: relative;\n bottom: 1px;\n }\n .content-editable-input {\n box-sizing: border-box;\n width: 100%;\n padding: 9px;\n border: 1px solid #c7ced4;\n border-radius: 4px;\n overflow: auto;\n overflow-x: auto;\n overflow-anchor: none;\n scrollbar-width: none;\n -ms-overflow-style: none;\n cursor: text;\n white-space: nowrap;\n background-color: #ffffff;\n height: 38px;\n }\n .content-editable-input:focus {\n outline: none;\n }\n\n .error {\n border-color: #e5434d;\n }\n\n .read-only {\n background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .chips {\n display: inline;\n background: #e5e9eb;\n color: #000;\n border-radius: 4px;\n padding: 6px;\n height: 24px;\n line-height: 10px;\n margin-left: 3px;\n letter-spacing: 0.2px;\n }\n\n .text-area {\n height: 120px;\n overflow: scroll;\n line-height: 26px;\n }\n\n .text-area .chips {\n padding: 4px 8px;\n }\n\n .chip-error {\n background: #f3a5aa;\n }\n .nile-options-container {\n box-sizing: border-box;\n background-color: #ffffff;\n border: 1px solid #c7ced4;\n overflow: auto;\n max-height: 150px;\n }\n\n label {\n display: inline-block;\n margin-bottom: 6px;\n font-family: 'colfax-medium';\n }\n\n .asterik {\n color: #e5434d;\n }\n\n .no-border {\n border: none;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-content-editor.css.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * AttributeExpression CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n font-size: 14px;\n }\n\n .content-editable-wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n }\n\n .dropdown-position {\n position: relative;\n bottom: 1px;\n }\n .content-editable-input {\n box-sizing: border-box;\n width: 100%;\n padding: 9px;\n border: 1px solid #c7ced4;\n border-radius: 4px;\n overflow: auto;\n overflow-x: auto;\n overflow-anchor: none;\n scrollbar-width: none;\n -ms-overflow-style: none;\n cursor: text;\n white-space: nowrap;\n background-color: #ffffff;\n height: 38px;\n }\n .content-editable-input:focus {\n outline: none;\n }\n\n .error {\n border-color: #e5434d;\n }\n\n .read-only {\n background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .chips {\n display: inline;\n background: #e5e9eb;\n color: #000;\n border-radius: 4px;\n padding: 6px;\n height: 24px;\n line-height: 10px;\n margin-left: 3px;\n letter-spacing: 0.2px;\n }\n\n .text-area {\n height: 120px;\n overflow: scroll;\n line-height: 26px;\n }\n\n .text-area .chips {\n padding: 4px 8px;\n }\n\n .chip-error {\n background: #f3a5aa;\n }\n .nile-options-container {\n box-sizing: border-box;\n background-color: #ffffff;\n border: 1px solid #c7ced4;\n overflow: auto;\n max-height: 150px;\n }\n\n label {\n display: inline-block;\n margin-bottom: 6px;\n font-family: 'colfax-medium';\n }\n\n .asterik {\n color: #e5434d;\n }\n\n .no-border {\n border: none;\n }\n`;\n\nexport default [styles];\n"]}
@@ -17,92 +17,24 @@ export const styles = css `
17
17
  .pointer-cursor {
18
18
  cursor: pointer;
19
19
  }
20
-
21
- .switcher__label {
22
- display: flex;
23
- align-items: center;
24
- color: inherit;
25
- color: var(--nile-colors-dark-900);
26
- font-family: Colfax-regular;
27
- font-size: 14px;
28
- font-style: normal;
29
- font-weight: 400;
30
- line-height: 14px;
31
- letter-spacing: 0.2px;
32
- }
33
-
34
- switcher-object-mapper:hover {
35
- display: flex;
36
- }
37
- .switcher-icon-container.current {
38
- background: var(--nile-colors-primary-100);
39
- }
40
-
41
- .switcher-container {
20
+ .input-container {
42
21
  display: flex;
43
- }
44
-
45
- .switcher-inline {
46
22
  gap: 0.5rem;
47
23
  }
48
24
 
49
- .switcher-block {
50
- flex-direction: column;
51
- }
52
-
53
- .switcher-inline > :nth-child(2) {
54
- flex: 1;
55
- overflow: hidden;
25
+ .input-container > :first-child {
26
+ max-width: 98%;
27
+ min-width: 98%;
56
28
  }
57
29
 
58
- .switcher-icons-container {
59
- display: flex;
60
- margin-left: auto;
61
- gap: 0.5rem;
30
+ nile-icon {
62
31
  max-height: 38px;
63
- align-items: center;
64
- }
65
-
66
- .switcher-block > .switcher-icons-container {
67
- margin-left: auto;
68
- }
69
-
70
- .label-container {
71
- display: flex;
72
32
  }
73
33
 
74
- .switcher-icon-container {
75
- cursor: pointer;
76
- justify-content: center;
77
- display: flex;
78
- align-items: center;
79
- margin-bottom: 6px;
80
- height: 28px;
81
- width: 28px;
82
- border-radius: 4px;
83
- }
84
34
  nile-radio {
85
35
  display: inline-block;
86
36
  padding-right: 10px;
87
37
  }
88
-
89
- .switcher-object-mapper-icon {
90
- display: none;
91
- }
92
- .switcher-object-mapper:hover > .switcher-object-mapper-icon {
93
- display: block;
94
- }
95
- .switcher-object-mapper::part(input) {
96
- color: var(--nile-colors-primary-600);
97
- cursor: pointer;
98
- }
99
-
100
- .switcher-input--noborder::part(base) {
101
- border: none;
102
- }
103
- .switcher-object-mapper--noborder::part(base) {
104
- border: none;
105
- }
106
38
  `;
107
39
  export default [styles];
108
40
  //# sourceMappingURL=nile-switcher.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-switcher.css.js","sourceRoot":"","sources":["../../../src/nile-switcher/nile-switcher.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * FieldGenerator CSS\n */\nexport const styles = css`\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .pointer-cursor {\n cursor: pointer;\n }\n\n .switcher__label {\n display: flex;\n align-items: center;\n color: inherit;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n switcher-object-mapper:hover {\n display: flex;\n }\n .switcher-icon-container.current {\n background: var(--nile-colors-primary-100);\n }\n\n .switcher-container {\n display: flex;\n }\n\n .switcher-inline {\n gap: 0.5rem;\n }\n\n .switcher-block {\n flex-direction: column;\n }\n\n .switcher-inline > :nth-child(2) {\n flex: 1;\n overflow: hidden;\n }\n\n .switcher-icons-container {\n display: flex;\n margin-left: auto;\n gap: 0.5rem;\n max-height: 38px;\n align-items: center;\n }\n\n .switcher-block > .switcher-icons-container {\n margin-left: auto;\n }\n\n .label-container {\n display: flex;\n }\n\n .switcher-icon-container {\n cursor: pointer;\n justify-content: center;\n display: flex;\n align-items: center;\n margin-bottom: 6px;\n height: 28px;\n width: 28px;\n border-radius: 4px;\n }\n nile-radio {\n display: inline-block;\n padding-right: 10px;\n }\n\n .switcher-object-mapper-icon {\n display: none;\n }\n .switcher-object-mapper:hover > .switcher-object-mapper-icon {\n display: block;\n }\n .switcher-object-mapper::part(input) {\n color: var(--nile-colors-primary-600);\n cursor: pointer;\n }\n\n .switcher-input--noborder::part(base) {\n border: none;\n }\n .switcher-object-mapper--noborder::part(base) {\n border: none;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-switcher.css.js","sourceRoot":"","sources":["../../../src/nile-switcher/nile-switcher.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * FieldGenerator CSS\n */\nexport const styles = css`\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .pointer-cursor {\n cursor: pointer;\n }\n .input-container {\n display: flex;\n gap: 0.5rem;\n }\n\n .input-container > :first-child {\n max-width: 98%;\n min-width: 98%;\n }\n\n nile-icon {\n max-height: 38px;\n }\n\n nile-radio {\n display: inline-block;\n padding-right: 10px;\n }\n`;\n\nexport default [styles];\n"]}
@@ -9,48 +9,41 @@ import NileElement from '../internal/nile-element';
9
9
  import { CSSResultGroup } from 'lit';
10
10
  /**
11
11
  * @summary Allows you to switch between nile elements
12
- *
12
+
13
13
  * @dependency nile-icon
14
14
  * @dependency nile-input
15
15
  * @dependency nile-checkbox
16
16
  * @dependency nile-dropdown
17
17
  * @dependency nile-textarea
18
18
  *
19
+
19
20
  * @event nile-change - Emitted when the control's value changes.
20
21
  * @event nile-switch - Emitted when the nile component is being switched.
22
+
21
23
  */
22
24
  export interface switchconfig {
23
25
  [key: string]: any;
24
26
  toggleSwitch: boolean;
25
27
  disable?: boolean;
26
28
  confirmation?: boolean;
27
- align: 'block' | 'inline';
28
- inputs: switchInputType[];
29
+ defaultInput: switchInputType;
30
+ switchInput: switchInputType;
29
31
  }
30
32
  export interface switchInputType {
31
- inputType: INPUT_TYPE_NAMES.DROPDOWN | INPUT_TYPE_NAMES.TEXT | INPUT_TYPE_NAMES.CHECKBOX | INPUT_TYPE_NAMES.TEXTAREA | INPUT_TYPE_NAMES.RADIO | INPUT_TYPE_NAMES.CONTENTEDITOR | INPUT_TYPE_NAMES.OBJECT_MAPPER | INPUT_TYPE_NAMES.CODE_EDITOR;
33
+ inputType: INPUT_TYPE_NAMES.DROPDOWN | INPUT_TYPE_NAMES.TEXT | INPUT_TYPE_NAMES.CHECKBOX | INPUT_TYPE_NAMES.TEXTAREA | INPUT_TYPE_NAMES.RADIO | INPUT_TYPE_NAMES.CONTENTEDITOR;
32
34
  value?: String | boolean;
33
35
  label?: String;
34
36
  readonly?: boolean;
35
37
  type?: string;
36
- icon: string;
37
- mode?: string;
38
38
  placeholder?: string;
39
39
  disabled?: boolean;
40
40
  required?: boolean;
41
41
  error?: boolean;
42
42
  errorMessage?: string;
43
43
  options?: Array<any>;
44
- customAutoCompletions?: any;
45
44
  helperText?: string;
46
45
  multiple?: boolean;
47
46
  noborder?: boolean;
48
- multiLine?: boolean;
49
- expand?: boolean;
50
- }
51
- export declare enum POSITIONS {
52
- INLINE = "inline",
53
- BLOCK = "block"
54
47
  }
55
48
  export declare enum INPUT_TYPE {
56
49
  DEFAULT = "defaultInput",
@@ -62,13 +55,7 @@ export declare enum INPUT_TYPE_NAMES {
62
55
  CHECKBOX = "checkbox",
63
56
  TEXTAREA = "text-area",
64
57
  RADIO = "radio",
65
- CONTENTEDITOR = "content-editor",
66
- OBJECT_MAPPER = "object-mapper",
67
- CODE_EDITOR = "code-editor"
68
- }
69
- export declare enum MODE {
70
- CREATE = "create",
71
- EDIT = "edit"
58
+ CONTENTEDITOR = "content-editor"
72
59
  }
73
60
  export declare class NileSwitcher extends NileElement {
74
61
  /**
@@ -76,29 +63,20 @@ export declare class NileSwitcher extends NileElement {
76
63
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
77
64
  */
78
65
  static styles: CSSResultGroup;
79
- private readonly hasSlotController;
80
66
  nileSwitchConfig: switchconfig;
81
- current: Number;
82
- currentInput: switchInputType;
83
67
  connectedCallback(): void;
84
- handleSwitcherChange(): void;
85
- setCurrentInput(): void;
86
68
  disconnectedCallback(): void;
87
- renderNileText(Input: switchInputType): TemplateResult<1>;
88
- renderDropdown(Input: switchInputType): TemplateResult<1>;
89
- renderNileTextArea(Input: switchInputType): TemplateResult<1>;
90
- renderNileCheckBox(Input: switchInputType): TemplateResult<1>;
91
- renderNileRadio(Input: switchInputType): TemplateResult<1>;
69
+ renderNileText(Input: switchInputType, inputType: string): TemplateResult<1>;
70
+ renderDropdown(Input: switchInputType, inputType: string): TemplateResult<1>;
71
+ renderNileTextArea(Input: switchInputType, inputType: string): TemplateResult<1>;
72
+ renderNileCheckBox(Input: switchInputType, inputType: string): TemplateResult<1>;
73
+ renderNileRadio(Input: switchInputType, inputType: string): TemplateResult<1>;
92
74
  renderErrorMessage(errorMessage: string): TemplateResult<1>;
93
- renderContentEditor(Input: switchInputType): TemplateResult<1>;
94
- renderObjectMapper(): TemplateResult<1>;
95
- renderCodeEditor(Input: switchInputType): TemplateResult<1>;
96
- handleExpand(event: CustomEvent, inputType: string): void;
97
- handleChange(event: CustomEvent, inputType: string): void;
98
- renderIcon(): TemplateResult<1>;
99
- isToggleSwitch: (item: any) => any;
100
- toggleField(currentInput: switchInputType, index: Number): void;
101
- singleFieldSwitcher(): TemplateResult<1>;
75
+ renderContentEditor(Input: switchInputType, inputType: string): TemplateResult<1>;
76
+ handleChange(event: CustomEvent, inputType: string, inputTypeName: string): void;
77
+ renderIcon(defaultInput: switchInputType, switchInput: switchInputType): TemplateResult<1>;
78
+ toggleField(): void;
79
+ singleFieldSwitcher(defaultInput: switchInputType, switchInput: switchInputType, toggleField: boolean, disable: boolean): TemplateResult<1>;
102
80
  render(): TemplateResult;
103
81
  }
104
82
  export default NileSwitcher;