aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats
diff options
context:
space:
mode:
authorNevena Bojovic <nenabojov@gmail.com>2022-03-01 20:05:50 +0100
committerNevena Bojovic <nenabojov@gmail.com>2022-03-01 20:05:50 +0100
commit291803c31f829fe0d32bb3207bc11def95a7408c (patch)
treec7d43107d79291b19d8c9eceefbe91c9f9a52acf /sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats
parent1fa69862057db4db53cfda5be9c24b4228ef63f7 (diff)
Urađena test aplikacija. Povezan front i back.
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/format-validator.d.ts10
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/format-validator.js20
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/html-selector.d.ts9
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/html-selector.js44
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/index.d.ts11
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/index.js17
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/path.d.ts9
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/path.js24
8 files changed, 144 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/format-validator.d.ts b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/format-validator.d.ts
new file mode 100644
index 00000000..88952600
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/format-validator.d.ts
@@ -0,0 +1,10 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+import { JsonObject, JsonValue, schema } from '@angular-devkit/core';
+import { Observable } from 'rxjs';
+export declare function formatValidator(data: JsonValue, dataSchema: JsonObject, formats: schema.SchemaFormat[]): Observable<schema.SchemaValidatorResult>;
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/format-validator.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/format-validator.js
new file mode 100644
index 00000000..208e1d14
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/format-validator.js
@@ -0,0 +1,20 @@
+"use strict";
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.formatValidator = void 0;
+const core_1 = require("@angular-devkit/core");
+const operators_1 = require("rxjs/operators");
+function formatValidator(data, dataSchema, formats) {
+ const registry = new core_1.schema.CoreSchemaRegistry();
+ for (const format of formats) {
+ registry.addFormat(format);
+ }
+ return registry.compile(dataSchema).pipe((0, operators_1.mergeMap)((validator) => validator(data)));
+}
+exports.formatValidator = formatValidator;
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/html-selector.d.ts b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/html-selector.d.ts
new file mode 100644
index 00000000..95616881
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/html-selector.d.ts
@@ -0,0 +1,9 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+import { schema } from '@angular-devkit/core';
+export declare const htmlSelectorFormat: schema.SchemaFormat;
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/html-selector.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/html-selector.js
new file mode 100644
index 00000000..8005c035
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/html-selector.js
@@ -0,0 +1,44 @@
+"use strict";
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.htmlSelectorFormat = void 0;
+// As per https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
+// * Without mandatory `-` as the application prefix will generally cover its inclusion
+// * And an allowance for upper alpha characters
+// NOTE: This should eventually be broken out into two formats: full and partial (allows for prefix)
+const unicodeRanges = [
+ [0xc0, 0xd6],
+ [0xd8, 0xf6],
+ [0xf8, 0x37d],
+ [0x37f, 0x1fff],
+ [0x200c, 0x200d],
+ [0x203f, 0x2040],
+ [0x2070, 0x218f],
+ [0x2c00, 0x2fef],
+ [0x3001, 0xd7ff],
+ [0xf900, 0xfdcf],
+ [0xfdf0, 0xfffd],
+ [0x10000, 0xeffff],
+];
+function isValidElementName(name) {
+ let regex = '^[a-zA-Z][';
+ regex += '-.0-9_a-zA-Z\\u{B7}';
+ for (const range of unicodeRanges) {
+ regex += `\\u{${range[0].toString(16)}}-\\u{${range[1].toString(16)}}`;
+ }
+ regex += ']*$';
+ return new RegExp(regex, 'u').test(name);
+}
+exports.htmlSelectorFormat = {
+ name: 'html-selector',
+ formatter: {
+ async: false,
+ validate: (name) => typeof name === 'string' && isValidElementName(name),
+ },
+};
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/index.d.ts b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/index.d.ts
new file mode 100644
index 00000000..a3b4bd37
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/index.d.ts
@@ -0,0 +1,11 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+import { schema } from '@angular-devkit/core';
+export { htmlSelectorFormat } from './html-selector';
+export { pathFormat } from './path';
+export declare const standardFormats: schema.SchemaFormat[];
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/index.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/index.js
new file mode 100644
index 00000000..1fce3ace
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/index.js
@@ -0,0 +1,17 @@
+"use strict";
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.standardFormats = exports.pathFormat = exports.htmlSelectorFormat = void 0;
+const html_selector_1 = require("./html-selector");
+const path_1 = require("./path");
+var html_selector_2 = require("./html-selector");
+Object.defineProperty(exports, "htmlSelectorFormat", { enumerable: true, get: function () { return html_selector_2.htmlSelectorFormat; } });
+var path_2 = require("./path");
+Object.defineProperty(exports, "pathFormat", { enumerable: true, get: function () { return path_2.pathFormat; } });
+exports.standardFormats = [html_selector_1.htmlSelectorFormat, path_1.pathFormat];
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/path.d.ts b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/path.d.ts
new file mode 100644
index 00000000..9957e37c
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/path.d.ts
@@ -0,0 +1,9 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+import { schema } from '@angular-devkit/core';
+export declare const pathFormat: schema.SchemaFormat;
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/path.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/path.js
new file mode 100644
index 00000000..3a9d1240
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/formats/path.js
@@ -0,0 +1,24 @@
+"use strict";
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.pathFormat = void 0;
+const core_1 = require("@angular-devkit/core");
+exports.pathFormat = {
+ name: 'path',
+ formatter: {
+ async: false,
+ validate: (path) => {
+ // Check path is normalized already.
+ return path === (0, core_1.normalize)(path);
+ // TODO: check if path is valid (is that just checking if it's normalized?)
+ // TODO: check path is from root of schematics even if passed absolute
+ // TODO: error out if path is outside of host
+ },
+ },
+};