@skyux/colorpicker 7.4.1 → 7.5.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/documentation.json +29 -29
- package/esm2020/lib/modules/colorpicker/colorpicker-classes.mjs +1 -2
- package/esm2020/lib/modules/colorpicker/colorpicker-slider.directive.mjs +1 -2
- package/esm2020/lib/modules/colorpicker/colorpicker-text.directive.mjs +1 -2
- package/esm2020/lib/modules/colorpicker/colorpicker.service.mjs +1 -2
- package/esm2020/lib/modules/colorpicker/types/colorpicker-axis.mjs +1 -1
- package/esm2020/lib/modules/colorpicker/types/colorpicker-cmyk.mjs +1 -1
- package/esm2020/lib/modules/colorpicker/types/colorpicker-color.mjs +1 -1
- package/esm2020/lib/modules/colorpicker/types/colorpicker-hsla.mjs +1 -1
- package/esm2020/lib/modules/colorpicker/types/colorpicker-hsva.mjs +1 -1
- package/esm2020/lib/modules/colorpicker/types/colorpicker-output.mjs +1 -1
- package/esm2020/lib/modules/colorpicker/types/colorpicker-rgba.mjs +1 -1
- package/esm2020/testing/colorpicker-fixture.mjs +2 -2
- package/fesm2015/skyux-colorpicker-testing.mjs +1 -1
- package/fesm2015/skyux-colorpicker-testing.mjs.map +1 -1
- package/fesm2015/skyux-colorpicker.mjs +0 -2
- package/fesm2015/skyux-colorpicker.mjs.map +1 -1
- package/fesm2020/skyux-colorpicker-testing.mjs +1 -1
- package/fesm2020/skyux-colorpicker-testing.mjs.map +1 -1
- package/fesm2020/skyux-colorpicker.mjs +0 -2
- package/fesm2020/skyux-colorpicker.mjs.map +1 -1
- package/package.json +7 -7
- package/testing/colorpicker-fixture.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-colorpicker-testing.mjs","sources":["../../../../../libs/components/colorpicker/testing/src/colorpicker-fixture.ts","../../../../../libs/components/colorpicker/testing/src/skyux-colorpicker-testing.ts"],"sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX colorpicker component.\n * @internal\n */\nexport class SkyColorpickerFixture {\n #debugEl: DebugElement;\n #fixture: ComponentFixture<unknown>;\n\n constructor(fixture: ComponentFixture<unknown>, skyTestId: string) {\n this.#fixture = fixture;\n this.#debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-colorpicker'\n );\n }\n\n /**\n * The colorpicker's currently selected color formatted to the `outputFormat`.\n */\n public get value(): string {\n return this.#getColorpickerInputEl().nativeElement.value;\n }\n\n /**\n * Set the colorpicker's color hex code.\n * @param hexValue The new color hex code. Must
|
|
1
|
+
{"version":3,"file":"skyux-colorpicker-testing.mjs","sources":["../../../../../libs/components/colorpicker/testing/src/colorpicker-fixture.ts","../../../../../libs/components/colorpicker/testing/src/skyux-colorpicker-testing.ts"],"sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX colorpicker component.\n * @internal\n */\nexport class SkyColorpickerFixture {\n #debugEl: DebugElement;\n #fixture: ComponentFixture<unknown>;\n\n constructor(fixture: ComponentFixture<unknown>, skyTestId: string) {\n this.#fixture = fixture;\n this.#debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-colorpicker'\n );\n }\n\n /**\n * The colorpicker's currently selected color formatted to the `outputFormat`.\n */\n public get value(): string {\n return this.#getColorpickerInputEl().nativeElement.value;\n }\n\n /**\n * Set the colorpicker's color hex code.\n * @param hexValue The new color hex code. Must include '#'.\n */\n public async setValueFromHex(hexValue: string): Promise<void> {\n await this.#clickColorpickerButtonEl();\n\n const hexInput = document.querySelector(\n 'input[id^=sky-colorpicker-hex-]'\n ) as HTMLInputElement;\n\n hexInput.value = hexValue;\n SkyAppTestUtility.fireDomEvent(hexInput, 'input');\n\n await this.#clickColorpickerApplyButtonEl();\n\n return this.#fixture.whenStable();\n }\n\n /**\n * Set the colorpicker's color RGB values.\n * @param red The red color value.\n * @param green The green color value.\n * @param blue The blue color value.\n * @param alpha The alpha channel value.\n */\n public async setValueFromRGBA(\n red: number,\n green: number,\n blue: number,\n alpha: number\n ): Promise<void> {\n await this.#clickColorpickerButtonEl();\n\n const rInput = document.querySelector(\n 'input[id^=sky-colorpicker-red-]'\n ) as HTMLInputElement;\n const gInput = document.querySelector(\n 'input[id^=sky-colorpicker-green-]'\n ) as HTMLInputElement;\n const bInput = document.querySelector(\n 'input[id^=sky-colorpicker-blue-]'\n ) as HTMLInputElement;\n const aInput = document.querySelector(\n 'input[id^=sky-colorpicker-alpha-]'\n ) as HTMLInputElement;\n\n rInput.value = red.toString();\n gInput.value = green.toString();\n bInput.value = blue.toString();\n aInput.value = alpha.toString();\n\n SkyAppTestUtility.fireDomEvent(rInput, 'input');\n SkyAppTestUtility.fireDomEvent(gInput, 'input');\n SkyAppTestUtility.fireDomEvent(bInput, 'input');\n SkyAppTestUtility.fireDomEvent(aInput, 'input');\n\n await this.#clickColorpickerApplyButtonEl();\n\n return this.#fixture.whenStable();\n }\n\n /**\n * Set the colorpicker's color to the provided preset color at the given index.\n * @param presetIndex The index of the color in the `presetColors` list to select.\n */\n public async setValueFromPresets(presetIndex: number): Promise<void> {\n await this.#clickColorpickerButtonEl();\n\n const presetColors = document.querySelectorAll(\n '.sky-colorpicker-preset-color-area button'\n );\n const presetColor =\n presetColors && (presetColors[presetIndex] as HTMLButtonElement);\n\n if (presetColor) {\n presetColor.click();\n this.#fixture.detectChanges();\n }\n\n await this.#clickColorpickerApplyButtonEl();\n\n return this.#fixture.whenStable();\n }\n\n async #clickColorpickerButtonEl(): Promise<void> {\n const colorpickerButton = this.#debugEl.query(\n By.css('sky-colorpicker button')\n ).nativeElement;\n\n colorpickerButton.click();\n\n this.#fixture.detectChanges();\n\n return this.#fixture.whenStable();\n }\n\n async #clickColorpickerApplyButtonEl(): Promise<void> {\n const applyButton = document.querySelector(\n '.sky-btn-colorpicker-apply'\n ) as HTMLButtonElement;\n\n applyButton.click();\n\n this.#fixture.detectChanges();\n\n return this.#fixture.whenStable();\n }\n\n #getColorpickerInputEl(): DebugElement {\n return this.#debugEl.query(By.css('sky-colorpicker input'));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAKA;;;AAGG;MACU,qBAAqB,CAAA;IAIhC,WAAY,CAAA,OAAkC,EAAE,SAAiB,EAAA;;QAHjE,8BAAuB,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QACvB,8BAAoC,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGlC,QAAA,sBAAA,CAAA,IAAI,EAAA,8BAAA,EAAY,OAAO,EAAA,GAAA,CAAA,CAAC;AACxB,QAAA,sBAAA,CAAA,IAAI,EAAA,8BAAA,EAAY,iBAAiB,CAAC,uBAAuB,CACvD,OAAO,EACP,SAAS,EACT,iBAAiB,CAClB,MAAA,CAAC;KACH;AAED;;AAEG;AACH,IAAA,IAAW,KAAK,GAAA;QACd,OAAO,sBAAA,CAAA,IAAI,EAAA,gCAAA,EAAA,GAAA,EAAA,4CAAA,CAAuB,CAA3B,IAAA,CAAA,IAAI,CAAyB,CAAC,aAAa,CAAC,KAAK,CAAC;KAC1D;AAED;;;AAGG;IACI,MAAM,eAAe,CAAC,QAAgB,EAAA;AAC3C,QAAA,MAAM,uBAAA,IAAI,EAAA,gCAAA,EAAA,GAAA,EAAA,+CAAA,CAA0B,CAA9B,IAAA,CAAA,IAAI,CAA4B,CAAC;QAEvC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CACrC,iCAAiC,CACd,CAAC;AAEtB,QAAA,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC;AAC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,CAAA,IAAI,EAAA,8BAAA,EAAA,GAAA,CAAS,CAAC,aAAa,EAAE,CAAC;AAE9B,IAAA,OAAO,uBAAA,IAAI,EAAA,8BAAA,EAAA,GAAA,CAAS,CAAC,UAAU,EAAE,CAAC;AACpC,CAAC,yDAED,eAAK,oDAAA,GAAA;IACH,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CACxC,4BAA4B,CACR,CAAC;IAEvB,WAAW,CAAC,KAAK,EAAE,CAAC;AAEpB,IAAA,sBAAA,CAAA,IAAI,EAAA,8BAAA,EAAA,GAAA,CAAS,CAAC,aAAa,EAAE,CAAC;AAE9B,IAAA,OAAO,uBAAA,IAAI,EAAA,8BAAA,EAAA,GAAA,CAAS,CAAC,UAAU,EAAE,CAAC;AACpC,CAAC,EAAA,4CAAA,GAAA,SAAA,4CAAA,GAAA;AAGC,IAAA,OAAO,sBAAA,CAAA,IAAI,EAAS,8BAAA,EAAA,GAAA,CAAA,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAC9D,CAAC;;AC5IH;;AAEG;;;;"}
|
|
@@ -766,7 +766,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
766
766
|
args: ['mousedown', ['$event']]
|
|
767
767
|
}] } });
|
|
768
768
|
|
|
769
|
-
// spell-checker:ignore Colorpicker
|
|
770
769
|
/**
|
|
771
770
|
* @internal
|
|
772
771
|
*/
|
|
@@ -818,7 +817,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
818
817
|
args: ['input', ['$event']]
|
|
819
818
|
}] } });
|
|
820
819
|
|
|
821
|
-
// spell-checker:ignore colorpicker
|
|
822
820
|
/**
|
|
823
821
|
* @internal
|
|
824
822
|
*/
|