@blackbaud/skyux-lib-code-block 4.0.3 → 6.0.0-beta.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/LICENSE +21 -0
- package/blackbaud-skyux-lib-code-block.d.ts +2 -5
- package/esm2020/blackbaud-skyux-lib-code-block.mjs +5 -0
- package/esm2020/modules/code/code.component.mjs +11 -0
- package/esm2020/modules/code/code.module.mjs +26 -0
- package/esm2020/modules/code-block/code-block.component.mjs +98 -0
- package/esm2020/modules/code-block/code-block.module.mjs +34 -0
- package/esm2020/modules/code-block/prism-languages.mjs +307 -0
- package/esm2020/modules/shared/sky-code-block-resources.module.mjs +41 -0
- package/esm2020/public-api.mjs +7 -0
- package/fesm2015/blackbaud-skyux-lib-code-block.mjs +511 -0
- package/fesm2015/blackbaud-skyux-lib-code-block.mjs.map +1 -0
- package/fesm2020/blackbaud-skyux-lib-code-block.mjs +511 -0
- package/fesm2020/blackbaud-skyux-lib-code-block.mjs.map +1 -0
- package/modules/code/code.component.d.ts +3 -0
- package/modules/code/code.module.d.ts +6 -0
- package/modules/code-block/code-block.component.d.ts +9 -3
- package/modules/code-block/code-block.module.d.ts +8 -0
- package/modules/shared/sky-code-block-resources.module.d.ts +14 -0
- package/package.json +26 -24
- package/public-api.d.ts +4 -0
- package/CHANGELOG.md +0 -102
- package/blackbaud-skyux-lib-code-block.metadata.json +0 -1
- package/bundles/blackbaud-skyux-lib-code-block.umd.js +0 -567
- package/bundles/blackbaud-skyux-lib-code-block.umd.js.map +0 -1
- package/bundles/blackbaud-skyux-lib-code-block.umd.min.js +0 -16
- package/bundles/blackbaud-skyux-lib-code-block.umd.min.js.map +0 -1
- package/esm2015/blackbaud-skyux-lib-code-block.js +0 -9
- package/esm2015/modules/code/code.component.js +0 -14
- package/esm2015/modules/code/code.module.js +0 -21
- package/esm2015/modules/code-block/code-block.component.js +0 -96
- package/esm2015/modules/code-block/code-block.module.js +0 -25
- package/esm2015/modules/code-block/prism-languages.js +0 -307
- package/esm2015/modules/shared/code-block-resources.module.js +0 -20
- package/esm2015/plugin-resources/code-block-resources-provider.js +0 -16
- package/esm2015/public_api.js +0 -3
- package/esm5/blackbaud-skyux-lib-code-block.js +0 -9
- package/esm5/modules/code/code.component.js +0 -17
- package/esm5/modules/code/code.module.js +0 -24
- package/esm5/modules/code-block/code-block.component.js +0 -102
- package/esm5/modules/code-block/code-block.module.js +0 -28
- package/esm5/modules/code-block/prism-languages.js +0 -307
- package/esm5/modules/shared/code-block-resources.module.js +0 -23
- package/esm5/plugin-resources/code-block-resources-provider.js +0 -17
- package/esm5/public_api.js +0 -3
- package/fesm2015/blackbaud-skyux-lib-code-block.js +0 -483
- package/fesm2015/blackbaud-skyux-lib-code-block.js.map +0 -1
- package/fesm5/blackbaud-skyux-lib-code-block.js +0 -502
- package/fesm5/blackbaud-skyux-lib-code-block.js.map +0 -1
- package/modules/shared/code-block-resources.module.d.ts +0 -2
- package/plugin-resources/code-block-resources-provider.d.ts +0 -5
- package/public_api.d.ts +0 -2
- package/src/assets/locales/resources_en_US.json +0 -14
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
3
|
+
* The contents of this file were automatically generated by
|
|
4
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-code-block' schematic.
|
|
5
|
+
* To update this file, simply rerun the command.
|
|
6
|
+
*/
|
|
7
|
+
import { NgModule } from '@angular/core';
|
|
8
|
+
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
const RESOURCES = {
|
|
11
|
+
'EN-US': { "sky_copy_to_clipboard_button_title": { "message": "Copy to clipboard" }, "sky_copy_to_clipboard_button": { "message": "Copy" }, "sky_copy_to_clipboard_button_success": { "message": "Copied!" } },
|
|
12
|
+
};
|
|
13
|
+
export class SkyCodeBlockResourcesProvider {
|
|
14
|
+
getString(localeInfo, name) {
|
|
15
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Import into any component library module that needs to use resource strings.
|
|
20
|
+
*/
|
|
21
|
+
export class SkyCodeBlockResourcesModule {
|
|
22
|
+
}
|
|
23
|
+
SkyCodeBlockResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
24
|
+
SkyCodeBlockResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockResourcesModule, exports: [SkyI18nModule] });
|
|
25
|
+
SkyCodeBlockResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockResourcesModule, providers: [{
|
|
26
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
27
|
+
useClass: SkyCodeBlockResourcesProvider,
|
|
28
|
+
multi: true
|
|
29
|
+
}], imports: [SkyI18nModule] });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockResourcesModule, decorators: [{
|
|
31
|
+
type: NgModule,
|
|
32
|
+
args: [{
|
|
33
|
+
exports: [SkyI18nModule],
|
|
34
|
+
providers: [{
|
|
35
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
36
|
+
useClass: SkyCodeBlockResourcesProvider,
|
|
37
|
+
multi: true
|
|
38
|
+
}]
|
|
39
|
+
}]
|
|
40
|
+
}] });
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2t5LWNvZGUtYmxvY2stcmVzb3VyY2VzLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZGUtYmxvY2svc3JjL21vZHVsZXMvc2hhcmVkL3NreS1jb2RlLWJsb2NrLXJlc291cmNlcy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7QUFFSCxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFDTCxxQkFBcUIsRUFFckIsYUFBYSxFQUdiLDJCQUEyQixFQUM1QixNQUFNLGFBQWEsQ0FBQzs7QUFFckIsTUFBTSxTQUFTLEdBQTBDO0lBQ3ZELE9BQU8sRUFBRSxFQUFDLG9DQUFvQyxFQUFDLEVBQUMsU0FBUyxFQUFDLG1CQUFtQixFQUFDLEVBQUMsOEJBQThCLEVBQUMsRUFBQyxTQUFTLEVBQUMsTUFBTSxFQUFDLEVBQUMsc0NBQXNDLEVBQUMsRUFBQyxTQUFTLEVBQUMsU0FBUyxFQUFDLEVBQUM7Q0FDL0wsQ0FBQztBQUVGLE1BQU0sT0FBTyw2QkFBNkI7SUFDakMsU0FBUyxDQUFDLFVBQTRCLEVBQUUsSUFBWTtRQUN6RCxPQUFPLHFCQUFxQixDQUFDLFNBQVMsRUFBRSxVQUFVLENBQUMsTUFBTSxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQ25FLENBQUM7Q0FDRjtBQUVEOztHQUVHO0FBU0gsTUFBTSxPQUFPLDJCQUEyQjs7eUhBQTNCLDJCQUEyQjswSEFBM0IsMkJBQTJCLFlBUDVCLGFBQWE7MEhBT1osMkJBQTJCLGFBTjNCLENBQUM7WUFDVixPQUFPLEVBQUUsMkJBQTJCO1lBQ3BDLFFBQVEsRUFBRSw2QkFBNkI7WUFDdkMsS0FBSyxFQUFFLElBQUk7U0FDWixDQUFDLFlBTFEsYUFBYTs0RkFPWiwyQkFBMkI7a0JBUnZDLFFBQVE7bUJBQUM7b0JBQ1IsT0FBTyxFQUFFLENBQUMsYUFBYSxDQUFDO29CQUN4QixTQUFTLEVBQUUsQ0FBQzs0QkFDVixPQUFPLEVBQUUsMkJBQTJCOzRCQUNwQyxRQUFRLEVBQUUsNkJBQTZCOzRCQUN2QyxLQUFLLEVBQUUsSUFBSTt5QkFDWixDQUFDO2lCQUNIIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBOT1RJQ0U6IERPIE5PVCBNT0RJRlkgVEhJUyBGSUxFIVxuICogVGhlIGNvbnRlbnRzIG9mIHRoaXMgZmlsZSB3ZXJlIGF1dG9tYXRpY2FsbHkgZ2VuZXJhdGVkIGJ5XG4gKiB0aGUgJ25nIGdlbmVyYXRlIEBza3l1eC9pMThuOmxpYi1yZXNvdXJjZXMtbW9kdWxlIG1vZHVsZXMvc2hhcmVkL3NreS1jb2RlLWJsb2NrJyBzY2hlbWF0aWMuXG4gKiBUbyB1cGRhdGUgdGhpcyBmaWxlLCBzaW1wbHkgcmVydW4gdGhlIGNvbW1hbmQuXG4gKi9cblxuaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7XG4gIGdldExpYlN0cmluZ0ZvckxvY2FsZSxcbiAgU2t5QXBwTG9jYWxlSW5mbyxcbiAgU2t5STE4bk1vZHVsZSxcbiAgU2t5TGliUmVzb3VyY2VzLFxuICBTa3lMaWJSZXNvdXJjZXNQcm92aWRlcixcbiAgU0tZX0xJQl9SRVNPVVJDRVNfUFJPVklERVJTXG59IGZyb20gJ0Bza3l1eC9pMThuJztcblxuY29uc3QgUkVTT1VSQ0VTOiB7IFtsb2NhbGU6IHN0cmluZ106IFNreUxpYlJlc291cmNlcyB9ID0ge1xuICAnRU4tVVMnOiB7XCJza3lfY29weV90b19jbGlwYm9hcmRfYnV0dG9uX3RpdGxlXCI6e1wibWVzc2FnZVwiOlwiQ29weSB0byBjbGlwYm9hcmRcIn0sXCJza3lfY29weV90b19jbGlwYm9hcmRfYnV0dG9uXCI6e1wibWVzc2FnZVwiOlwiQ29weVwifSxcInNreV9jb3B5X3RvX2NsaXBib2FyZF9idXR0b25fc3VjY2Vzc1wiOntcIm1lc3NhZ2VcIjpcIkNvcGllZCFcIn19LFxufTtcblxuZXhwb3J0IGNsYXNzIFNreUNvZGVCbG9ja1Jlc291cmNlc1Byb3ZpZGVyIGltcGxlbWVudHMgU2t5TGliUmVzb3VyY2VzUHJvdmlkZXIge1xuICBwdWJsaWMgZ2V0U3RyaW5nKGxvY2FsZUluZm86IFNreUFwcExvY2FsZUluZm8sIG5hbWU6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgcmV0dXJuIGdldExpYlN0cmluZ0ZvckxvY2FsZShSRVNPVVJDRVMsIGxvY2FsZUluZm8ubG9jYWxlLCBuYW1lKTtcbiAgfVxufVxuXG4vKipcbiAqIEltcG9ydCBpbnRvIGFueSBjb21wb25lbnQgbGlicmFyeSBtb2R1bGUgdGhhdCBuZWVkcyB0byB1c2UgcmVzb3VyY2Ugc3RyaW5ncy5cbiAqL1xuQE5nTW9kdWxlKHtcbiAgZXhwb3J0czogW1NreUkxOG5Nb2R1bGVdLFxuICBwcm92aWRlcnM6IFt7XG4gICAgcHJvdmlkZTogU0tZX0xJQl9SRVNPVVJDRVNfUFJPVklERVJTLFxuICAgIHVzZUNsYXNzOiBTa3lDb2RlQmxvY2tSZXNvdXJjZXNQcm92aWRlcixcbiAgICBtdWx0aTogdHJ1ZVxuICB9XVxufSlcbmV4cG9ydCBjbGFzcyBTa3lDb2RlQmxvY2tSZXNvdXJjZXNNb2R1bGUgeyB9XG4iXX0=
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './modules/code-block/code-block.module';
|
|
2
|
+
export * from './modules/code/code.module';
|
|
3
|
+
// Components and directives must be exported to support Angular's "partial" Ivy compiler.
|
|
4
|
+
// Obscure names are used to indicate types are not part of the public API.
|
|
5
|
+
export { SkyCodeComponent as λ1 } from './modules/code/code.component';
|
|
6
|
+
export { SkyCodeBlockComponent as λ2 } from './modules/code-block/code-block.component';
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NvZGUtYmxvY2svc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3Q0FBd0MsQ0FBQztBQUV2RCxjQUFjLDRCQUE0QixDQUFDO0FBRTNDLDBGQUEwRjtBQUMxRiwyRUFBMkU7QUFDM0UsT0FBTyxFQUFFLGdCQUFnQixJQUFJLEVBQUUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQ3ZFLE9BQU8sRUFBRSxxQkFBcUIsSUFBSSxFQUFFLEVBQUUsTUFBTSwyQ0FBMkMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbW9kdWxlcy9jb2RlLWJsb2NrL2NvZGUtYmxvY2subW9kdWxlJztcblxuZXhwb3J0ICogZnJvbSAnLi9tb2R1bGVzL2NvZGUvY29kZS5tb2R1bGUnO1xuXG4vLyBDb21wb25lbnRzIGFuZCBkaXJlY3RpdmVzIG11c3QgYmUgZXhwb3J0ZWQgdG8gc3VwcG9ydCBBbmd1bGFyJ3MgXCJwYXJ0aWFsXCIgSXZ5IGNvbXBpbGVyLlxuLy8gT2JzY3VyZSBuYW1lcyBhcmUgdXNlZCB0byBpbmRpY2F0ZSB0eXBlcyBhcmUgbm90IHBhcnQgb2YgdGhlIHB1YmxpYyBBUEkuXG5leHBvcnQgeyBTa3lDb2RlQ29tcG9uZW50IGFzIM67MSB9IGZyb20gJy4vbW9kdWxlcy9jb2RlL2NvZGUuY29tcG9uZW50JztcbmV4cG9ydCB7IFNreUNvZGVCbG9ja0NvbXBvbmVudCBhcyDOuzIgfSBmcm9tICcuL21vZHVsZXMvY29kZS1ibG9jay9jb2RlLWJsb2NrLmNvbXBvbmVudCc7XG4iXX0=
|
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgModule, ElementRef, Component, Input, ViewChild, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import * as i3 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@blackbaud/skyux-lib-clipboard';
|
|
6
|
+
import { SkyClipboardModule } from '@blackbaud/skyux-lib-clipboard';
|
|
7
|
+
import * as i4 from '@skyux/i18n';
|
|
8
|
+
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
9
|
+
import * as Prism from 'prismjs';
|
|
10
|
+
import 'prismjs/plugins/normalize-whitespace/prism-normalize-whitespace';
|
|
11
|
+
import 'prismjs/components/prism-basic';
|
|
12
|
+
import 'prismjs/components/prism-markup-templating';
|
|
13
|
+
import 'prismjs/components/prism-markup';
|
|
14
|
+
import 'prismjs/components/prism-c';
|
|
15
|
+
import 'prismjs/components/prism-css';
|
|
16
|
+
import 'prismjs/components/prism-clike';
|
|
17
|
+
import 'prismjs/components/prism-javascript';
|
|
18
|
+
import 'prismjs/components/prism-abap';
|
|
19
|
+
import 'prismjs/components/prism-actionscript';
|
|
20
|
+
import 'prismjs/components/prism-ada';
|
|
21
|
+
import 'prismjs/components/prism-apacheconf';
|
|
22
|
+
import 'prismjs/components/prism-apl';
|
|
23
|
+
import 'prismjs/components/prism-applescript';
|
|
24
|
+
import 'prismjs/components/prism-arff';
|
|
25
|
+
import 'prismjs/components/prism-asciidoc';
|
|
26
|
+
import 'prismjs/components/prism-asm6502';
|
|
27
|
+
import 'prismjs/components/prism-aspnet';
|
|
28
|
+
import 'prismjs/components/prism-autohotkey';
|
|
29
|
+
import 'prismjs/components/prism-autoit';
|
|
30
|
+
import 'prismjs/components/prism-bash';
|
|
31
|
+
import 'prismjs/components/prism-batch';
|
|
32
|
+
import 'prismjs/components/prism-bison';
|
|
33
|
+
import 'prismjs/components/prism-brainfuck';
|
|
34
|
+
import 'prismjs/components/prism-bro';
|
|
35
|
+
import 'prismjs/components/prism-csharp';
|
|
36
|
+
import 'prismjs/components/prism-cpp';
|
|
37
|
+
import 'prismjs/components/prism-coffeescript';
|
|
38
|
+
import 'prismjs/components/prism-clojure';
|
|
39
|
+
import 'prismjs/components/prism-csp';
|
|
40
|
+
import 'prismjs/components/prism-css-extras';
|
|
41
|
+
import 'prismjs/components/prism-d';
|
|
42
|
+
import 'prismjs/components/prism-dart';
|
|
43
|
+
import 'prismjs/components/prism-diff';
|
|
44
|
+
import 'prismjs/components/prism-django';
|
|
45
|
+
import 'prismjs/components/prism-docker';
|
|
46
|
+
import 'prismjs/components/prism-eiffel';
|
|
47
|
+
import 'prismjs/components/prism-elixir';
|
|
48
|
+
import 'prismjs/components/prism-elm';
|
|
49
|
+
import 'prismjs/components/prism-erb';
|
|
50
|
+
import 'prismjs/components/prism-erlang';
|
|
51
|
+
import 'prismjs/components/prism-fsharp';
|
|
52
|
+
import 'prismjs/components/prism-flow';
|
|
53
|
+
import 'prismjs/components/prism-fortran';
|
|
54
|
+
import 'prismjs/components/prism-gedcom';
|
|
55
|
+
import 'prismjs/components/prism-gherkin';
|
|
56
|
+
import 'prismjs/components/prism-git';
|
|
57
|
+
import 'prismjs/components/prism-glsl';
|
|
58
|
+
import 'prismjs/components/prism-go';
|
|
59
|
+
import 'prismjs/components/prism-graphql';
|
|
60
|
+
import 'prismjs/components/prism-groovy';
|
|
61
|
+
import 'prismjs/components/prism-haml';
|
|
62
|
+
import 'prismjs/components/prism-handlebars';
|
|
63
|
+
import 'prismjs/components/prism-haskell';
|
|
64
|
+
import 'prismjs/components/prism-haxe';
|
|
65
|
+
import 'prismjs/components/prism-http';
|
|
66
|
+
import 'prismjs/components/prism-hpkp';
|
|
67
|
+
import 'prismjs/components/prism-hsts';
|
|
68
|
+
import 'prismjs/components/prism-ichigojam';
|
|
69
|
+
import 'prismjs/components/prism-icon';
|
|
70
|
+
import 'prismjs/components/prism-inform7';
|
|
71
|
+
import 'prismjs/components/prism-ini';
|
|
72
|
+
import 'prismjs/components/prism-io';
|
|
73
|
+
import 'prismjs/components/prism-j';
|
|
74
|
+
import 'prismjs/components/prism-java';
|
|
75
|
+
import 'prismjs/components/prism-jolie';
|
|
76
|
+
import 'prismjs/components/prism-json';
|
|
77
|
+
import 'prismjs/components/prism-julia';
|
|
78
|
+
import 'prismjs/components/prism-keyman';
|
|
79
|
+
import 'prismjs/components/prism-kotlin';
|
|
80
|
+
import 'prismjs/components/prism-latex';
|
|
81
|
+
import 'prismjs/components/prism-less';
|
|
82
|
+
import 'prismjs/components/prism-liquid';
|
|
83
|
+
import 'prismjs/components/prism-lisp';
|
|
84
|
+
import 'prismjs/components/prism-livescript';
|
|
85
|
+
import 'prismjs/components/prism-lolcode';
|
|
86
|
+
import 'prismjs/components/prism-lua';
|
|
87
|
+
import 'prismjs/components/prism-makefile';
|
|
88
|
+
import 'prismjs/components/prism-markdown';
|
|
89
|
+
import 'prismjs/components/prism-matlab';
|
|
90
|
+
import 'prismjs/components/prism-mel';
|
|
91
|
+
import 'prismjs/components/prism-mizar';
|
|
92
|
+
import 'prismjs/components/prism-monkey';
|
|
93
|
+
import 'prismjs/components/prism-n4js';
|
|
94
|
+
import 'prismjs/components/prism-nasm';
|
|
95
|
+
import 'prismjs/components/prism-nginx';
|
|
96
|
+
import 'prismjs/components/prism-nim';
|
|
97
|
+
import 'prismjs/components/prism-nix';
|
|
98
|
+
import 'prismjs/components/prism-nsis';
|
|
99
|
+
import 'prismjs/components/prism-objectivec';
|
|
100
|
+
import 'prismjs/components/prism-ocaml';
|
|
101
|
+
import 'prismjs/components/prism-opencl';
|
|
102
|
+
import 'prismjs/components/prism-oz';
|
|
103
|
+
import 'prismjs/components/prism-parigp';
|
|
104
|
+
import 'prismjs/components/prism-parser';
|
|
105
|
+
import 'prismjs/components/prism-pascal';
|
|
106
|
+
import 'prismjs/components/prism-perl';
|
|
107
|
+
import 'prismjs/components/prism-php';
|
|
108
|
+
import 'prismjs/components/prism-php-extras';
|
|
109
|
+
import 'prismjs/components/prism-powershell';
|
|
110
|
+
import 'prismjs/components/prism-processing';
|
|
111
|
+
import 'prismjs/components/prism-prolog';
|
|
112
|
+
import 'prismjs/components/prism-properties';
|
|
113
|
+
import 'prismjs/components/prism-protobuf';
|
|
114
|
+
import 'prismjs/components/prism-pug';
|
|
115
|
+
import 'prismjs/components/prism-puppet';
|
|
116
|
+
import 'prismjs/components/prism-pure';
|
|
117
|
+
import 'prismjs/components/prism-python';
|
|
118
|
+
import 'prismjs/components/prism-q';
|
|
119
|
+
import 'prismjs/components/prism-qore';
|
|
120
|
+
import 'prismjs/components/prism-r';
|
|
121
|
+
import 'prismjs/components/prism-jsx';
|
|
122
|
+
import 'prismjs/components/prism-tsx';
|
|
123
|
+
import 'prismjs/components/prism-renpy';
|
|
124
|
+
import 'prismjs/components/prism-reason';
|
|
125
|
+
import 'prismjs/components/prism-rest';
|
|
126
|
+
import 'prismjs/components/prism-rip';
|
|
127
|
+
import 'prismjs/components/prism-roboconf';
|
|
128
|
+
import 'prismjs/components/prism-ruby';
|
|
129
|
+
import 'prismjs/components/prism-rust';
|
|
130
|
+
import 'prismjs/components/prism-sas';
|
|
131
|
+
import 'prismjs/components/prism-sass';
|
|
132
|
+
import 'prismjs/components/prism-scss';
|
|
133
|
+
import 'prismjs/components/prism-scala';
|
|
134
|
+
import 'prismjs/components/prism-scheme';
|
|
135
|
+
import 'prismjs/components/prism-smalltalk';
|
|
136
|
+
import 'prismjs/components/prism-smarty';
|
|
137
|
+
import 'prismjs/components/prism-sql';
|
|
138
|
+
import 'prismjs/components/prism-soy';
|
|
139
|
+
import 'prismjs/components/prism-stylus';
|
|
140
|
+
import 'prismjs/components/prism-swift';
|
|
141
|
+
import 'prismjs/components/prism-tap';
|
|
142
|
+
import 'prismjs/components/prism-tcl';
|
|
143
|
+
import 'prismjs/components/prism-textile';
|
|
144
|
+
import 'prismjs/components/prism-tt2';
|
|
145
|
+
import 'prismjs/components/prism-twig';
|
|
146
|
+
import 'prismjs/components/prism-typescript';
|
|
147
|
+
import 'prismjs/components/prism-vbnet';
|
|
148
|
+
import 'prismjs/components/prism-velocity';
|
|
149
|
+
import 'prismjs/components/prism-verilog';
|
|
150
|
+
import 'prismjs/components/prism-vhdl';
|
|
151
|
+
import 'prismjs/components/prism-vim';
|
|
152
|
+
import 'prismjs/components/prism-visual-basic';
|
|
153
|
+
import 'prismjs/components/prism-wasm';
|
|
154
|
+
import 'prismjs/components/prism-wiki';
|
|
155
|
+
import 'prismjs/components/prism-xeora';
|
|
156
|
+
import 'prismjs/components/prism-xojo';
|
|
157
|
+
import 'prismjs/components/prism-xquery';
|
|
158
|
+
import 'prismjs/components/prism-yaml';
|
|
159
|
+
import 'prismjs/components/prism-arduino';
|
|
160
|
+
import 'prismjs/components/prism-crystal';
|
|
161
|
+
import 'prismjs/components/prism-plsql';
|
|
162
|
+
import * as i1 from '@angular/platform-browser';
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
166
|
+
* The contents of this file were automatically generated by
|
|
167
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-code-block' schematic.
|
|
168
|
+
* To update this file, simply rerun the command.
|
|
169
|
+
*/
|
|
170
|
+
const RESOURCES = {
|
|
171
|
+
'EN-US': { "sky_copy_to_clipboard_button_title": { "message": "Copy to clipboard" }, "sky_copy_to_clipboard_button": { "message": "Copy" }, "sky_copy_to_clipboard_button_success": { "message": "Copied!" } },
|
|
172
|
+
};
|
|
173
|
+
class SkyCodeBlockResourcesProvider {
|
|
174
|
+
getString(localeInfo, name) {
|
|
175
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Import into any component library module that needs to use resource strings.
|
|
180
|
+
*/
|
|
181
|
+
class SkyCodeBlockResourcesModule {
|
|
182
|
+
}
|
|
183
|
+
SkyCodeBlockResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
184
|
+
SkyCodeBlockResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockResourcesModule, exports: [SkyI18nModule] });
|
|
185
|
+
SkyCodeBlockResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockResourcesModule, providers: [{
|
|
186
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
187
|
+
useClass: SkyCodeBlockResourcesProvider,
|
|
188
|
+
multi: true
|
|
189
|
+
}], imports: [SkyI18nModule] });
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockResourcesModule, decorators: [{
|
|
191
|
+
type: NgModule,
|
|
192
|
+
args: [{
|
|
193
|
+
exports: [SkyI18nModule],
|
|
194
|
+
providers: [{
|
|
195
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
196
|
+
useClass: SkyCodeBlockResourcesProvider,
|
|
197
|
+
multi: true
|
|
198
|
+
}]
|
|
199
|
+
}]
|
|
200
|
+
}] });
|
|
201
|
+
|
|
202
|
+
const prismLanguages = {
|
|
203
|
+
'properties': '.properties',
|
|
204
|
+
'asm6502': '6502 Assembly',
|
|
205
|
+
'abap': 'ABAP',
|
|
206
|
+
'apl': 'APL',
|
|
207
|
+
'arff': 'ARFF',
|
|
208
|
+
'aspnet': 'ASP.NET (C#)',
|
|
209
|
+
'actionscript': 'ActionScript',
|
|
210
|
+
'ada': 'Ada',
|
|
211
|
+
'apacheconf': 'Apache Configuration',
|
|
212
|
+
'applescript': 'AppleScript',
|
|
213
|
+
'arduino': 'Arduino',
|
|
214
|
+
'asciidoc': 'AsciiDoc',
|
|
215
|
+
'autohotkey': 'AutoHotkey',
|
|
216
|
+
'autoit': 'AutoIt',
|
|
217
|
+
'basic': 'BASIC',
|
|
218
|
+
'bash': 'Bash',
|
|
219
|
+
'batch': 'Batch',
|
|
220
|
+
'bison': 'Bison',
|
|
221
|
+
'brainfuck': 'Brainfuck',
|
|
222
|
+
'bro': 'Bro',
|
|
223
|
+
'c': 'C',
|
|
224
|
+
'csharp': 'C#',
|
|
225
|
+
'cpp': 'C++',
|
|
226
|
+
'clike': 'C-like',
|
|
227
|
+
'css': 'CSS',
|
|
228
|
+
'css-extras': 'CSS Extras',
|
|
229
|
+
'clojure': 'Clojure',
|
|
230
|
+
'coffeescript': 'CoffeeScript',
|
|
231
|
+
'csp': 'Content-Security-Policy',
|
|
232
|
+
'crystal': 'Crystal',
|
|
233
|
+
'd': 'D',
|
|
234
|
+
'dart': 'Dart',
|
|
235
|
+
'diff': 'Diff',
|
|
236
|
+
'django': 'Django/Jinja2',
|
|
237
|
+
'docker': 'Docker',
|
|
238
|
+
'erb': 'ERB',
|
|
239
|
+
'eiffel': 'Eiffel',
|
|
240
|
+
'elixir': 'Elixir',
|
|
241
|
+
'elm': 'Elm',
|
|
242
|
+
'erlang': 'Erlang',
|
|
243
|
+
'fsharp': 'F#',
|
|
244
|
+
'flow': 'Flow',
|
|
245
|
+
'fortran': 'Fortran',
|
|
246
|
+
'gedcom': 'GEDCOM',
|
|
247
|
+
'glsl': 'GLSL',
|
|
248
|
+
'gml': 'GameMaker Language',
|
|
249
|
+
'gherkin': 'Gherkin',
|
|
250
|
+
'git': 'Git',
|
|
251
|
+
'go': 'Go',
|
|
252
|
+
'graphql': 'GraphQL',
|
|
253
|
+
'groovy': 'Groovy',
|
|
254
|
+
'http': 'HTTP',
|
|
255
|
+
'hpkp': 'HTTP Public-Key-Pins',
|
|
256
|
+
'hsts': 'HTTP Strict-Transport-Security',
|
|
257
|
+
'haml': 'Haml',
|
|
258
|
+
'handlebars': 'Handlebars',
|
|
259
|
+
'haskell': 'Haskell',
|
|
260
|
+
'haxe': 'Haxe',
|
|
261
|
+
'ichigojam': 'IchigoJam',
|
|
262
|
+
'icon': 'Icon',
|
|
263
|
+
'inform7': 'Inform 7',
|
|
264
|
+
'ini': 'Ini',
|
|
265
|
+
'io': 'Io',
|
|
266
|
+
'j': 'J',
|
|
267
|
+
'json': 'JSON',
|
|
268
|
+
'java': 'Java',
|
|
269
|
+
'javascript': 'JavaScript',
|
|
270
|
+
'js': 'JavaScript',
|
|
271
|
+
'jolie': 'Jolie',
|
|
272
|
+
'julia': 'Julia',
|
|
273
|
+
'keyman': 'Keyman',
|
|
274
|
+
'kotlin': 'Kotlin',
|
|
275
|
+
'lolcode': 'LOLCODE',
|
|
276
|
+
'latex': 'LaTeX',
|
|
277
|
+
'less': 'Less',
|
|
278
|
+
'liquid': 'Liquid',
|
|
279
|
+
'lisp': 'Lisp',
|
|
280
|
+
'livescript': 'LiveScript',
|
|
281
|
+
'lua': 'Lua',
|
|
282
|
+
'matlab': 'MATLAB',
|
|
283
|
+
'mel': 'MEL',
|
|
284
|
+
'makefile': 'Makefile',
|
|
285
|
+
'markdown': 'Markdown',
|
|
286
|
+
'markup': 'Markup',
|
|
287
|
+
'markup-templating': 'Markup templating',
|
|
288
|
+
'mizar': 'Mizar',
|
|
289
|
+
'monkey': 'Monkey',
|
|
290
|
+
'n4js': 'N4JS',
|
|
291
|
+
'nasm': 'NASM',
|
|
292
|
+
'nsis': 'NSIS',
|
|
293
|
+
'nim': 'Nim',
|
|
294
|
+
'nix': 'Nix',
|
|
295
|
+
'ocaml': 'OCaml',
|
|
296
|
+
'objectivec': 'Objective-C',
|
|
297
|
+
'opencl': 'OpenCL',
|
|
298
|
+
'oz': 'Oz',
|
|
299
|
+
'parigp': 'PARI/GP',
|
|
300
|
+
'php': 'PHP',
|
|
301
|
+
'php-extras': 'PHP Extras',
|
|
302
|
+
'plsql': 'PL/SQL',
|
|
303
|
+
'parser': 'Parser',
|
|
304
|
+
'pascal': 'Pascal',
|
|
305
|
+
'perl': 'Perl',
|
|
306
|
+
'powershell': 'PowerShell',
|
|
307
|
+
'processing': 'Processing',
|
|
308
|
+
'prolog': 'Prolog',
|
|
309
|
+
'protobuf': 'Protocol Buffers',
|
|
310
|
+
'pug': 'Pug',
|
|
311
|
+
'puppet': 'Puppet',
|
|
312
|
+
'pure': 'Pure',
|
|
313
|
+
'python': 'Python',
|
|
314
|
+
'q': 'Q (kdb+ database)',
|
|
315
|
+
'qore': 'Qore',
|
|
316
|
+
'r': 'R',
|
|
317
|
+
'jsx': 'React JSX',
|
|
318
|
+
'tsx': 'React TSX',
|
|
319
|
+
'reason': 'Reason',
|
|
320
|
+
'renpy': "Ren'py",
|
|
321
|
+
'rip': 'Rip',
|
|
322
|
+
'roboconf': 'Roboconf',
|
|
323
|
+
'ruby': 'Ruby',
|
|
324
|
+
'rust': 'Rust',
|
|
325
|
+
'sas': 'SAS',
|
|
326
|
+
'sql': 'SQL',
|
|
327
|
+
'sass': 'Sass (Sass)',
|
|
328
|
+
'scss': 'Sass (Scss)',
|
|
329
|
+
'scala': 'Scala',
|
|
330
|
+
'scheme': 'Scheme',
|
|
331
|
+
'smalltalk': 'Smalltalk',
|
|
332
|
+
'smarty': 'Smarty',
|
|
333
|
+
'soy': 'Soy (Closure Template)',
|
|
334
|
+
'stylus': 'Stylus',
|
|
335
|
+
'swift': 'Swift',
|
|
336
|
+
'tap': 'TAP',
|
|
337
|
+
'tcl': 'Tcl',
|
|
338
|
+
'tt2': 'Template Toolkit 2',
|
|
339
|
+
'textile': 'Textile',
|
|
340
|
+
'twig': 'Twig',
|
|
341
|
+
'typescript': 'TypeScript',
|
|
342
|
+
'vbnet': 'VB.Net',
|
|
343
|
+
'vhdl': 'VHDL',
|
|
344
|
+
'velocity': 'Velocity',
|
|
345
|
+
'verilog': 'Verilog',
|
|
346
|
+
'visual-basic': 'Visual Basic',
|
|
347
|
+
'wasm': 'WebAssembly',
|
|
348
|
+
'wiki': 'Wiki markup',
|
|
349
|
+
'xquery': 'XQuery',
|
|
350
|
+
'xeora': 'Xeora',
|
|
351
|
+
'xojo': 'Xojo (REALbasic)',
|
|
352
|
+
'yaml': 'YAML',
|
|
353
|
+
'nginx': 'nginx',
|
|
354
|
+
'rest': 'reST (reStructuredText)',
|
|
355
|
+
'vim': 'vim'
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
class SkyCodeBlockComponent {
|
|
359
|
+
constructor(cdRef, sanitizer) {
|
|
360
|
+
this.cdRef = cdRef;
|
|
361
|
+
this.sanitizer = sanitizer;
|
|
362
|
+
this.hideCopyToClipboard = false;
|
|
363
|
+
this.defaultLanguage = 'markup';
|
|
364
|
+
this._languageType = this.defaultLanguage;
|
|
365
|
+
this.validLanguages = Object.keys(Prism.languages);
|
|
366
|
+
}
|
|
367
|
+
set code(value) {
|
|
368
|
+
/*istanbul ignore else*/
|
|
369
|
+
if (value !== this._code) {
|
|
370
|
+
this._code = value;
|
|
371
|
+
this.initCodeBlockDisplay();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
get code() {
|
|
375
|
+
return this._code;
|
|
376
|
+
}
|
|
377
|
+
set languageType(value) {
|
|
378
|
+
this.setDisplayName(value);
|
|
379
|
+
if (this.validLanguages.indexOf(value) > -1) {
|
|
380
|
+
this._languageType = value;
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
this._languageType = this.defaultLanguage;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
get languageType() {
|
|
387
|
+
return this._languageType;
|
|
388
|
+
}
|
|
389
|
+
ngOnInit() {
|
|
390
|
+
this.hideHeader = this.hideHeader
|
|
391
|
+
|| (!this.displayName && !this.fileName && this.hideCopyToClipboard);
|
|
392
|
+
}
|
|
393
|
+
ngAfterViewInit() {
|
|
394
|
+
this.initCodeBlockDisplay();
|
|
395
|
+
}
|
|
396
|
+
getClassName() {
|
|
397
|
+
return `language-${this.languageType}`;
|
|
398
|
+
}
|
|
399
|
+
setDisplayName(value = '') {
|
|
400
|
+
this.displayName = prismLanguages[value];
|
|
401
|
+
}
|
|
402
|
+
formatCode(code) {
|
|
403
|
+
return Prism.plugins.NormalizeWhitespace.normalize(code, {
|
|
404
|
+
'remove-trailing': true,
|
|
405
|
+
'remove-indent': true,
|
|
406
|
+
'left-trim': true,
|
|
407
|
+
'right-trim': true,
|
|
408
|
+
'indent': 0,
|
|
409
|
+
'remove-initial-line-feed': true,
|
|
410
|
+
'tabs-to-spaces': 2
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
highlightCode(code) {
|
|
414
|
+
return Prism.highlight(code, Prism.languages[this.languageType], this.languageType);
|
|
415
|
+
}
|
|
416
|
+
initCodeBlockDisplay() {
|
|
417
|
+
if (this.codeTemplateRef) {
|
|
418
|
+
const textContent = this.codeTemplateRef.nativeElement.textContent;
|
|
419
|
+
let code = this.code || textContent;
|
|
420
|
+
code = this.formatCode(code);
|
|
421
|
+
code = this.highlightCode(code);
|
|
422
|
+
this.output = this.sanitizer.bypassSecurityTrustHtml(code);
|
|
423
|
+
this.cdRef.detectChanges();
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
SkyCodeBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
428
|
+
SkyCodeBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SkyCodeBlockComponent, selector: "sky-code-block", inputs: { code: "code", fileName: "fileName", languageType: "languageType", hideCopyToClipboard: "hideCopyToClipboard", hideHeader: "hideHeader" }, viewQueries: [{ propertyName: "codeTemplateRef", first: true, predicate: ["codeFromContent"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"sky-code-block\">\n <div *ngIf=\"!hideHeader\" class=\"sky-code-block-header\">\n <div>\n <span *ngIf=\"fileName\"\n class=\"sky-emphasized sky-margin-inline-default\"\n >\n {{ fileName }}\n </span>\n <span *ngIf=\"displayName\"\n class=\"sky-deemphasized\"\n >\n {{ displayName }}\n </span>\n </div>\n <sky-copy-to-clipboard\n *ngIf=\"!hideCopyToClipboard\"\n [copyTarget]=\"skyCodeOutput\"\n buttonText=\"{{ 'sky_copy_to_clipboard_button' | skyLibResources }}\"\n buttonClickedText=\"{{ 'sky_copy_to_clipboard_button_success' | skyLibResources }}\">\n </sky-copy-to-clipboard>\n </div>\n <div #codeFromContent class=\"sky-code-input\">\n <ng-content></ng-content>\n </div>\n <div>\n <pre #skyCodeOutput class=\"sky-code-output\"><code\n [ngClass]=\"getClassName()\"\n [innerHTML]=\"output\"></code></pre>\n </div>\n</div>\n", styles: ["::ng-deep code[class*=language-],pre[class*=language-]{color:#000;text-shadow:0 1px white;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}::ng-deep code[class*=language-] .token.comment,::ng-deep code[class*=language-] .token.prolog,::ng-deep code[class*=language-] .token.doctype,::ng-deep code[class*=language-] .token.cdata,pre[class*=language-] .token.comment,pre[class*=language-] .token.prolog,pre[class*=language-] .token.doctype,pre[class*=language-] .token.cdata{color:#5f6c79}::ng-deep code[class*=language-] .token.punctuation,pre[class*=language-] .token.punctuation{color:#5f6c79}::ng-deep code[class*=language-] .namespace,pre[class*=language-] .namespace{color:#10776e}::ng-deep code[class*=language-] .token.property,::ng-deep code[class*=language-] .token.tag,::ng-deep code[class*=language-] .token.boolean,::ng-deep code[class*=language-] .token.number,::ng-deep code[class*=language-] .token.constant,::ng-deep code[class*=language-] .token.symbol,::ng-deep code[class*=language-] .token.deleted,pre[class*=language-] .token.property,pre[class*=language-] .token.tag,pre[class*=language-] .token.boolean,pre[class*=language-] .token.number,pre[class*=language-] .token.constant,pre[class*=language-] .token.symbol,pre[class*=language-] .token.deleted{color:#c50028}::ng-deep code[class*=language-] .token.selector,::ng-deep code[class*=language-] .token.attr-name,::ng-deep code[class*=language-] .token.string,::ng-deep code[class*=language-] .token.char,::ng-deep code[class*=language-] .token.builtin,::ng-deep code[class*=language-] .token.inserted,pre[class*=language-] .token.selector,pre[class*=language-] .token.attr-name,pre[class*=language-] .token.string,pre[class*=language-] .token.char,pre[class*=language-] .token.builtin,pre[class*=language-] .token.inserted{color:#627932}::ng-deep code[class*=language-] .token.operator,::ng-deep code[class*=language-] .token.entity,::ng-deep code[class*=language-] .token.url,::ng-deep code[class*=language-] .language-css .token.string,::ng-deep code[class*=language-] .style .token.string,pre[class*=language-] .token.operator,pre[class*=language-] .token.entity,pre[class*=language-] .token.url,pre[class*=language-] .language-css .token.string,pre[class*=language-] .style .token.string{color:#996525}::ng-deep code[class*=language-] .token.atrule,::ng-deep code[class*=language-] .token.attr-value,::ng-deep code[class*=language-] .token.keyword,pre[class*=language-] .token.atrule,pre[class*=language-] .token.attr-value,pre[class*=language-] .token.keyword{color:#07a}::ng-deep code[class*=language-] .token.function,::ng-deep code[class*=language-] .token.class-name,pre[class*=language-] .token.function,pre[class*=language-] .token.class-name{color:#c50028}::ng-deep code[class*=language-] .token.regex,::ng-deep code[class*=language-] .token.important,::ng-deep code[class*=language-] .token.variable,pre[class*=language-] .token.regex,pre[class*=language-] .token.important,pre[class*=language-] .token.variable{color:#9a690f}::ng-deep code[class*=language-] .token.important,::ng-deep code[class*=language-] .token.bold,pre[class*=language-] .token.important,pre[class*=language-] .token.bold{font-weight:700}::ng-deep code[class*=language-] .token.italic,pre[class*=language-] .token.italic{font-style:italic}::ng-deep code[class*=language-] .token.entity,pre[class*=language-] .token.entity{cursor:help}pre[class*=language-]::selection,pre[class*=language-] ::selection,code[class*=language-]::selection,code[class*=language-] ::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}.sky-code-input{display:none}.sky-code-output{border-top:1px solid #cdcfd2;border-right:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;margin-top:0;padding:20px;background-color:#fff;overflow-x:auto;margin-bottom:20px}.sky-code-block-header{height:45px;border-top:1px solid #cdcfd2;border-right:1px solid #cdcfd2;border-left:1px solid #cdcfd2;background-color:#fff;display:flex;justify-content:space-between;align-items:center;padding:5px 5px 5px 20px}\n"], components: [{ type: i2.λ1, selector: "sky-copy-to-clipboard", inputs: ["ariaLabel", "ariaLabelledBy", "copyTarget", "buttonText", "buttonClickedText", "title"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "skyLibResources": i4.SkyLibResourcesPipe } });
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockComponent, decorators: [{
|
|
430
|
+
type: Component,
|
|
431
|
+
args: [{ selector: 'sky-code-block', template: "<div class=\"sky-code-block\">\n <div *ngIf=\"!hideHeader\" class=\"sky-code-block-header\">\n <div>\n <span *ngIf=\"fileName\"\n class=\"sky-emphasized sky-margin-inline-default\"\n >\n {{ fileName }}\n </span>\n <span *ngIf=\"displayName\"\n class=\"sky-deemphasized\"\n >\n {{ displayName }}\n </span>\n </div>\n <sky-copy-to-clipboard\n *ngIf=\"!hideCopyToClipboard\"\n [copyTarget]=\"skyCodeOutput\"\n buttonText=\"{{ 'sky_copy_to_clipboard_button' | skyLibResources }}\"\n buttonClickedText=\"{{ 'sky_copy_to_clipboard_button_success' | skyLibResources }}\">\n </sky-copy-to-clipboard>\n </div>\n <div #codeFromContent class=\"sky-code-input\">\n <ng-content></ng-content>\n </div>\n <div>\n <pre #skyCodeOutput class=\"sky-code-output\"><code\n [ngClass]=\"getClassName()\"\n [innerHTML]=\"output\"></code></pre>\n </div>\n</div>\n", styles: ["::ng-deep code[class*=language-],pre[class*=language-]{color:#000;text-shadow:0 1px white;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}::ng-deep code[class*=language-] .token.comment,::ng-deep code[class*=language-] .token.prolog,::ng-deep code[class*=language-] .token.doctype,::ng-deep code[class*=language-] .token.cdata,pre[class*=language-] .token.comment,pre[class*=language-] .token.prolog,pre[class*=language-] .token.doctype,pre[class*=language-] .token.cdata{color:#5f6c79}::ng-deep code[class*=language-] .token.punctuation,pre[class*=language-] .token.punctuation{color:#5f6c79}::ng-deep code[class*=language-] .namespace,pre[class*=language-] .namespace{color:#10776e}::ng-deep code[class*=language-] .token.property,::ng-deep code[class*=language-] .token.tag,::ng-deep code[class*=language-] .token.boolean,::ng-deep code[class*=language-] .token.number,::ng-deep code[class*=language-] .token.constant,::ng-deep code[class*=language-] .token.symbol,::ng-deep code[class*=language-] .token.deleted,pre[class*=language-] .token.property,pre[class*=language-] .token.tag,pre[class*=language-] .token.boolean,pre[class*=language-] .token.number,pre[class*=language-] .token.constant,pre[class*=language-] .token.symbol,pre[class*=language-] .token.deleted{color:#c50028}::ng-deep code[class*=language-] .token.selector,::ng-deep code[class*=language-] .token.attr-name,::ng-deep code[class*=language-] .token.string,::ng-deep code[class*=language-] .token.char,::ng-deep code[class*=language-] .token.builtin,::ng-deep code[class*=language-] .token.inserted,pre[class*=language-] .token.selector,pre[class*=language-] .token.attr-name,pre[class*=language-] .token.string,pre[class*=language-] .token.char,pre[class*=language-] .token.builtin,pre[class*=language-] .token.inserted{color:#627932}::ng-deep code[class*=language-] .token.operator,::ng-deep code[class*=language-] .token.entity,::ng-deep code[class*=language-] .token.url,::ng-deep code[class*=language-] .language-css .token.string,::ng-deep code[class*=language-] .style .token.string,pre[class*=language-] .token.operator,pre[class*=language-] .token.entity,pre[class*=language-] .token.url,pre[class*=language-] .language-css .token.string,pre[class*=language-] .style .token.string{color:#996525}::ng-deep code[class*=language-] .token.atrule,::ng-deep code[class*=language-] .token.attr-value,::ng-deep code[class*=language-] .token.keyword,pre[class*=language-] .token.atrule,pre[class*=language-] .token.attr-value,pre[class*=language-] .token.keyword{color:#07a}::ng-deep code[class*=language-] .token.function,::ng-deep code[class*=language-] .token.class-name,pre[class*=language-] .token.function,pre[class*=language-] .token.class-name{color:#c50028}::ng-deep code[class*=language-] .token.regex,::ng-deep code[class*=language-] .token.important,::ng-deep code[class*=language-] .token.variable,pre[class*=language-] .token.regex,pre[class*=language-] .token.important,pre[class*=language-] .token.variable{color:#9a690f}::ng-deep code[class*=language-] .token.important,::ng-deep code[class*=language-] .token.bold,pre[class*=language-] .token.important,pre[class*=language-] .token.bold{font-weight:700}::ng-deep code[class*=language-] .token.italic,pre[class*=language-] .token.italic{font-style:italic}::ng-deep code[class*=language-] .token.entity,pre[class*=language-] .token.entity{cursor:help}pre[class*=language-]::selection,pre[class*=language-] ::selection,code[class*=language-]::selection,code[class*=language-] ::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}.sky-code-input{display:none}.sky-code-output{border-top:1px solid #cdcfd2;border-right:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;margin-top:0;padding:20px;background-color:#fff;overflow-x:auto;margin-bottom:20px}.sky-code-block-header{height:45px;border-top:1px solid #cdcfd2;border-right:1px solid #cdcfd2;border-left:1px solid #cdcfd2;background-color:#fff;display:flex;justify-content:space-between;align-items:center;padding:5px 5px 5px 20px}\n"] }]
|
|
432
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.DomSanitizer }]; }, propDecorators: { code: [{
|
|
433
|
+
type: Input
|
|
434
|
+
}], fileName: [{
|
|
435
|
+
type: Input
|
|
436
|
+
}], languageType: [{
|
|
437
|
+
type: Input
|
|
438
|
+
}], hideCopyToClipboard: [{
|
|
439
|
+
type: Input
|
|
440
|
+
}], hideHeader: [{
|
|
441
|
+
type: Input
|
|
442
|
+
}], codeTemplateRef: [{
|
|
443
|
+
type: ViewChild,
|
|
444
|
+
args: ['codeFromContent', { read: ElementRef }]
|
|
445
|
+
}] } });
|
|
446
|
+
|
|
447
|
+
class SkyCodeBlockModule {
|
|
448
|
+
}
|
|
449
|
+
SkyCodeBlockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
450
|
+
SkyCodeBlockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockModule, declarations: [SkyCodeBlockComponent], imports: [CommonModule,
|
|
451
|
+
SkyClipboardModule,
|
|
452
|
+
SkyCodeBlockResourcesModule], exports: [SkyCodeBlockComponent] });
|
|
453
|
+
SkyCodeBlockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockModule, imports: [[
|
|
454
|
+
CommonModule,
|
|
455
|
+
SkyClipboardModule,
|
|
456
|
+
SkyCodeBlockResourcesModule
|
|
457
|
+
]] });
|
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeBlockModule, decorators: [{
|
|
459
|
+
type: NgModule,
|
|
460
|
+
args: [{
|
|
461
|
+
declarations: [
|
|
462
|
+
SkyCodeBlockComponent
|
|
463
|
+
],
|
|
464
|
+
imports: [
|
|
465
|
+
CommonModule,
|
|
466
|
+
SkyClipboardModule,
|
|
467
|
+
SkyCodeBlockResourcesModule
|
|
468
|
+
],
|
|
469
|
+
exports: [
|
|
470
|
+
SkyCodeBlockComponent
|
|
471
|
+
]
|
|
472
|
+
}]
|
|
473
|
+
}] });
|
|
474
|
+
|
|
475
|
+
class SkyCodeComponent {
|
|
476
|
+
}
|
|
477
|
+
SkyCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
478
|
+
SkyCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SkyCodeComponent, selector: "sky-code", ngImport: i0, template: "<code class=\"sky-code\"><ng-content></ng-content></code>\n", styles: [".sky-code{border-top:1px solid #cdcfd2;border-right:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;overflow-wrap:break-word;font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:90%;color:#d1282c;padding:0 4px;background-color:#f1eef6}.sky-code ::ng-deep a{color:#d93a3d;text-decoration:underline}::ng-deep a .sky-code{text-decoration:underline}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeComponent, decorators: [{
|
|
480
|
+
type: Component,
|
|
481
|
+
args: [{ selector: 'sky-code', changeDetection: ChangeDetectionStrategy.OnPush, template: "<code class=\"sky-code\"><ng-content></ng-content></code>\n", styles: [".sky-code{border-top:1px solid #cdcfd2;border-right:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;overflow-wrap:break-word;font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:90%;color:#d1282c;padding:0 4px;background-color:#f1eef6}.sky-code ::ng-deep a{color:#d93a3d;text-decoration:underline}::ng-deep a .sky-code{text-decoration:underline}\n"] }]
|
|
482
|
+
}] });
|
|
483
|
+
|
|
484
|
+
class SkyCodeModule {
|
|
485
|
+
}
|
|
486
|
+
SkyCodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
487
|
+
SkyCodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeModule, declarations: [SkyCodeComponent], imports: [CommonModule], exports: [SkyCodeComponent] });
|
|
488
|
+
SkyCodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeModule, imports: [[
|
|
489
|
+
CommonModule
|
|
490
|
+
]] });
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkyCodeModule, decorators: [{
|
|
492
|
+
type: NgModule,
|
|
493
|
+
args: [{
|
|
494
|
+
declarations: [
|
|
495
|
+
SkyCodeComponent
|
|
496
|
+
],
|
|
497
|
+
imports: [
|
|
498
|
+
CommonModule
|
|
499
|
+
],
|
|
500
|
+
exports: [
|
|
501
|
+
SkyCodeComponent
|
|
502
|
+
]
|
|
503
|
+
}]
|
|
504
|
+
}] });
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Generated bundle index. Do not edit.
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
export { SkyCodeBlockModule, SkyCodeModule, SkyCodeComponent as λ1, SkyCodeBlockComponent as λ2 };
|
|
511
|
+
//# sourceMappingURL=blackbaud-skyux-lib-code-block.mjs.map
|